@jean2/client 0.4.5 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,545 @@
1
+ function sE(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in t)){const l=Object.getOwnPropertyDescriptor(i,o);l&&Object.defineProperty(t,o,l.get?l:{enumerable:!0,get:()=>i[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const d of l.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function qf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Sm={exports:{}},nu={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and 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 p0;function oE(){if(p0)return nu;p0=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(i,o,l){var d=null;if(l!==void 0&&(d=""+l),o.key!==void 0&&(d=""+o.key),"key"in o){l={};for(var a in o)a!=="key"&&(l[a]=o[a])}else l=o;return o=l.ref,{$$typeof:t,type:i,key:d,ref:o!==void 0?o:null,props:l}}return nu.Fragment=e,nu.jsx=n,nu.jsxs=n,nu}var m0;function aE(){return m0||(m0=1,Sm.exports=oE()),Sm.exports}var g=aE(),wm={exports:{}},ft={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and 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 g0;function lE(){if(g0)return ft;g0=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),d=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),y=Symbol.iterator;function S(B){return B===null||typeof B!="object"?null:(B=y&&B[y]||B["@@iterator"],typeof B=="function"?B:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,_={};function v(B,H,P){this.props=B,this.context=H,this.refs=_,this.updater=P||C}v.prototype.isReactComponent={},v.prototype.setState=function(B,H){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,H,"setState")},v.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function b(){}b.prototype=v.prototype;function x(B,H,P){this.props=B,this.context=H,this.refs=_,this.updater=P||C}var E=x.prototype=new b;E.constructor=x,w(E,v.prototype),E.isPureReactComponent=!0;var N=Array.isArray;function A(){}var M={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function j(B,H,P){var ee=P.ref;return{$$typeof:t,type:B,key:H,ref:ee!==void 0?ee:null,props:P}}function O(B,H){return j(B.type,H,B.props)}function F(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function U(B){var H={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(P){return H[P]})}var $=/\/+/g;function G(B,H){return typeof B=="object"&&B!==null&&B.key!=null?U(""+B.key):H.toString(36)}function K(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(A,A):(B.status="pending",B.then(function(H){B.status==="pending"&&(B.status="fulfilled",B.value=H)},function(H){B.status==="pending"&&(B.status="rejected",B.reason=H)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function V(B,H,P,ee,ne){var Q=typeof B;(Q==="undefined"||Q==="boolean")&&(B=null);var W=!1;if(B===null)W=!0;else switch(Q){case"bigint":case"string":case"number":W=!0;break;case"object":switch(B.$$typeof){case t:case e:W=!0;break;case p:return W=B._init,V(W(B._payload),H,P,ee,ne)}}if(W)return ne=ne(B),W=ee===""?"."+G(B,0):ee,N(ne)?(P="",W!=null&&(P=W.replace($,"$&/")+"/"),V(ne,H,P,"",function(ie){return ie})):ne!=null&&(F(ne)&&(ne=O(ne,P+(ne.key==null||B&&B.key===ne.key?"":(""+ne.key).replace($,"$&/")+"/")+W)),H.push(ne)),1;W=0;var q=ee===""?".":ee+":";if(N(B))for(var J=0;J<B.length;J++)ee=B[J],Q=q+G(ee,J),W+=V(ee,H,P,Q,ne);else if(J=S(B),typeof J=="function")for(B=J.call(B),J=0;!(ee=B.next()).done;)ee=ee.value,Q=q+G(ee,J++),W+=V(ee,H,P,Q,ne);else if(Q==="object"){if(typeof B.then=="function")return V(K(B),H,P,ee,ne);throw H=String(B),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return W}function X(B,H,P){if(B==null)return B;var ee=[],ne=0;return V(B,ee,"","",function(Q){return H.call(P,Q,ne++)}),ee}function Z(B){if(B._status===-1){var H=B._result;H=H(),H.then(function(P){(B._status===0||B._status===-1)&&(B._status=1,B._result=P)},function(P){(B._status===0||B._status===-1)&&(B._status=2,B._result=P)}),B._status===-1&&(B._status=0,B._result=H)}if(B._status===1)return B._result.default;throw B._result}var I=typeof reportError=="function"?reportError:function(B){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B),error:B});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",B);return}console.error(B)},L={map:X,forEach:function(B,H,P){X(B,function(){H.apply(this,arguments)},P)},count:function(B){var H=0;return X(B,function(){H++}),H},toArray:function(B){return X(B,function(H){return H})||[]},only:function(B){if(!F(B))throw Error("React.Children.only expected to receive a single React element child.");return B}};return ft.Activity=h,ft.Children=L,ft.Component=v,ft.Fragment=n,ft.Profiler=o,ft.PureComponent=x,ft.StrictMode=i,ft.Suspense=u,ft.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,ft.__COMPILER_RUNTIME={__proto__:null,c:function(B){return M.H.useMemoCache(B)}},ft.cache=function(B){return function(){return B.apply(null,arguments)}},ft.cacheSignal=function(){return null},ft.cloneElement=function(B,H,P){if(B==null)throw Error("The argument must be a React element, but you passed "+B+".");var ee=w({},B.props),ne=B.key;if(H!=null)for(Q in H.key!==void 0&&(ne=""+H.key),H)!T.call(H,Q)||Q==="key"||Q==="__self"||Q==="__source"||Q==="ref"&&H.ref===void 0||(ee[Q]=H[Q]);var Q=arguments.length-2;if(Q===1)ee.children=P;else if(1<Q){for(var W=Array(Q),q=0;q<Q;q++)W[q]=arguments[q+2];ee.children=W}return j(B.type,ne,ee)},ft.createContext=function(B){return B={$$typeof:d,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:l,_context:B},B},ft.createElement=function(B,H,P){var ee,ne={},Q=null;if(H!=null)for(ee in H.key!==void 0&&(Q=""+H.key),H)T.call(H,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(ne[ee]=H[ee]);var W=arguments.length-2;if(W===1)ne.children=P;else if(1<W){for(var q=Array(W),J=0;J<W;J++)q[J]=arguments[J+2];ne.children=q}if(B&&B.defaultProps)for(ee in W=B.defaultProps,W)ne[ee]===void 0&&(ne[ee]=W[ee]);return j(B,Q,ne)},ft.createRef=function(){return{current:null}},ft.forwardRef=function(B){return{$$typeof:a,render:B}},ft.isValidElement=F,ft.lazy=function(B){return{$$typeof:p,_payload:{_status:-1,_result:B},_init:Z}},ft.memo=function(B,H){return{$$typeof:f,type:B,compare:H===void 0?null:H}},ft.startTransition=function(B){var H=M.T,P={};M.T=P;try{var ee=B(),ne=M.S;ne!==null&&ne(P,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(A,I)}catch(Q){I(Q)}finally{H!==null&&P.types!==null&&(H.types=P.types),M.T=H}},ft.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},ft.use=function(B){return M.H.use(B)},ft.useActionState=function(B,H,P){return M.H.useActionState(B,H,P)},ft.useCallback=function(B,H){return M.H.useCallback(B,H)},ft.useContext=function(B){return M.H.useContext(B)},ft.useDebugValue=function(){},ft.useDeferredValue=function(B,H){return M.H.useDeferredValue(B,H)},ft.useEffect=function(B,H){return M.H.useEffect(B,H)},ft.useEffectEvent=function(B){return M.H.useEffectEvent(B)},ft.useId=function(){return M.H.useId()},ft.useImperativeHandle=function(B,H,P){return M.H.useImperativeHandle(B,H,P)},ft.useInsertionEffect=function(B,H){return M.H.useInsertionEffect(B,H)},ft.useLayoutEffect=function(B,H){return M.H.useLayoutEffect(B,H)},ft.useMemo=function(B,H){return M.H.useMemo(B,H)},ft.useOptimistic=function(B,H){return M.H.useOptimistic(B,H)},ft.useReducer=function(B,H,P){return M.H.useReducer(B,H,P)},ft.useRef=function(B){return M.H.useRef(B)},ft.useState=function(B){return M.H.useState(B)},ft.useSyncExternalStore=function(B,H,P){return M.H.useSyncExternalStore(B,H,P)},ft.useTransition=function(){return M.H.useTransition()},ft.version="19.2.4",ft}var v0;function Vf(){return v0||(v0=1,wm.exports=lE()),wm.exports}var D=Vf();const Br=qf(D),Nx=sE({__proto__:null,default:Br},[D]);var Cm={exports:{}},ru={},km={exports:{}},Em={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and 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 _0;function cE(){return _0||(_0=1,(function(t){function e(V,X){var Z=V.length;V.push(X);e:for(;0<Z;){var I=Z-1>>>1,L=V[I];if(0<o(L,X))V[I]=X,V[Z]=L,Z=I;else break e}}function n(V){return V.length===0?null:V[0]}function i(V){if(V.length===0)return null;var X=V[0],Z=V.pop();if(Z!==X){V[0]=Z;e:for(var I=0,L=V.length,B=L>>>1;I<B;){var H=2*(I+1)-1,P=V[H],ee=H+1,ne=V[ee];if(0>o(P,Z))ee<L&&0>o(ne,P)?(V[I]=ne,V[ee]=Z,I=ee):(V[I]=P,V[H]=Z,I=H);else if(ee<L&&0>o(ne,Z))V[I]=ne,V[ee]=Z,I=ee;else break e}}return X}function o(V,X){var Z=V.sortIndex-X.sortIndex;return Z!==0?Z:V.id-X.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var d=Date,a=d.now();t.unstable_now=function(){return d.now()-a}}var u=[],f=[],p=1,h=null,y=3,S=!1,C=!1,w=!1,_=!1,v=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function E(V){for(var X=n(f);X!==null;){if(X.callback===null)i(f);else if(X.startTime<=V)i(f),X.sortIndex=X.expirationTime,e(u,X);else break;X=n(f)}}function N(V){if(w=!1,E(V),!C)if(n(u)!==null)C=!0,A||(A=!0,U());else{var X=n(f);X!==null&&K(N,X.startTime-V)}}var A=!1,M=-1,T=5,j=-1;function O(){return _?!0:!(t.unstable_now()-j<T)}function F(){if(_=!1,A){var V=t.unstable_now();j=V;var X=!0;try{e:{C=!1,w&&(w=!1,b(M),M=-1),S=!0;var Z=y;try{t:{for(E(V),h=n(u);h!==null&&!(h.expirationTime>V&&O());){var I=h.callback;if(typeof I=="function"){h.callback=null,y=h.priorityLevel;var L=I(h.expirationTime<=V);if(V=t.unstable_now(),typeof L=="function"){h.callback=L,E(V),X=!0;break t}h===n(u)&&i(u),E(V)}else i(u);h=n(u)}if(h!==null)X=!0;else{var B=n(f);B!==null&&K(N,B.startTime-V),X=!1}}break e}finally{h=null,y=Z,S=!1}X=void 0}}finally{X?U():A=!1}}}var U;if(typeof x=="function")U=function(){x(F)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,G=$.port2;$.port1.onmessage=F,U=function(){G.postMessage(null)}}else U=function(){v(F,0)};function K(V,X){M=v(function(){V(t.unstable_now())},X)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(V){V.callback=null},t.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<V?Math.floor(1e3/V):5},t.unstable_getCurrentPriorityLevel=function(){return y},t.unstable_next=function(V){switch(y){case 1:case 2:case 3:var X=3;break;default:X=y}var Z=y;y=X;try{return V()}finally{y=Z}},t.unstable_requestPaint=function(){_=!0},t.unstable_runWithPriority=function(V,X){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var Z=y;y=V;try{return X()}finally{y=Z}},t.unstable_scheduleCallback=function(V,X,Z){var I=t.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?I+Z:I):Z=I,V){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=Z+L,V={id:p++,callback:X,priorityLevel:V,startTime:Z,expirationTime:L,sortIndex:-1},Z>I?(V.sortIndex=Z,e(f,V),n(u)===null&&V===n(f)&&(w?(b(M),M=-1):w=!0,K(N,Z-I))):(V.sortIndex=L,e(u,V),C||S||(C=!0,A||(A=!0,U()))),V},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(V){var X=y;return function(){var Z=y;y=X;try{return V.apply(this,arguments)}finally{y=Z}}}})(Em)),Em}var y0;function uE(){return y0||(y0=1,km.exports=cE()),km.exports}var Am={exports:{}},In={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and 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 b0;function dE(){if(b0)return In;b0=1;var t=Vf();function e(u){var f="https://react.dev/errors/"+u;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function l(u,f,p){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:h==null?null:""+h,children:u,containerInfo:f,implementation:p}}var d=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(u,f){if(u==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return In.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,In.createPortal=function(u,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(e(299));return l(u,f,null,p)},In.flushSync=function(u){var f=d.T,p=i.p;try{if(d.T=null,i.p=2,u)return u()}finally{d.T=f,i.p=p,i.d.f()}},In.preconnect=function(u,f){typeof u=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,i.d.C(u,f))},In.prefetchDNS=function(u){typeof u=="string"&&i.d.D(u)},In.preinit=function(u,f){if(typeof u=="string"&&f&&typeof f.as=="string"){var p=f.as,h=a(p,f.crossOrigin),y=typeof f.integrity=="string"?f.integrity:void 0,S=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?i.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:h,integrity:y,fetchPriority:S}):p==="script"&&i.d.X(u,{crossOrigin:h,integrity:y,fetchPriority:S,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},In.preinitModule=function(u,f){if(typeof u=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=a(f.as,f.crossOrigin);i.d.M(u,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&i.d.M(u)},In.preload=function(u,f){if(typeof u=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,h=a(p,f.crossOrigin);i.d.L(u,p,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},In.preloadModule=function(u,f){if(typeof u=="string")if(f){var p=a(f.as,f.crossOrigin);i.d.m(u,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else i.d.m(u)},In.requestFormReset=function(u){i.d.r(u)},In.unstable_batchedUpdates=function(u,f){return u(f)},In.useFormState=function(u,f,p){return d.H.useFormState(u,f,p)},In.useFormStatus=function(){return d.H.useHostTransitionStatus()},In.version="19.2.4",In}var x0;function Dx(){if(x0)return Am.exports;x0=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Am.exports=dE(),Am.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var S0;function fE(){if(S0)return ru;S0=1;var t=uE(),e=Vf(),n=Dx();function i(r){var s="https://react.dev/errors/"+r;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var s=r,c=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(c=s.return),r=s.return;while(r)}return s.tag===3?c:null}function d(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function a(r){if(r.tag===31){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function u(r){if(l(r)!==r)throw Error(i(188))}function f(r){var s=r.alternate;if(!s){if(s=l(r),s===null)throw Error(i(188));return s!==r?null:r}for(var c=r,m=s;;){var k=c.return;if(k===null)break;var R=k.alternate;if(R===null){if(m=k.return,m!==null){c=m;continue}break}if(k.child===R.child){for(R=k.child;R;){if(R===c)return u(k),r;if(R===m)return u(k),s;R=R.sibling}throw Error(i(188))}if(c.return!==m.return)c=k,m=R;else{for(var z=!1,Y=k.child;Y;){if(Y===c){z=!0,c=k,m=R;break}if(Y===m){z=!0,m=k,c=R;break}Y=Y.sibling}if(!z){for(Y=R.child;Y;){if(Y===c){z=!0,c=R,m=k;break}if(Y===m){z=!0,m=R,c=k;break}Y=Y.sibling}if(!z)throw Error(i(189))}}if(c.alternate!==m)throw Error(i(190))}if(c.tag!==3)throw Error(i(188));return c.stateNode.current===c?r:s}function p(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r;for(r=r.child;r!==null;){if(s=p(r),s!==null)return s;r=r.sibling}return null}var h=Object.assign,y=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),b=Symbol.for("react.consumer"),x=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function U(r){return r===null||typeof r!="object"?null:(r=F&&r[F]||r["@@iterator"],typeof r=="function"?r:null)}var $=Symbol.for("react.client.reference");function G(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===$?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case w:return"Fragment";case v:return"Profiler";case _:return"StrictMode";case N:return"Suspense";case A:return"SuspenseList";case j:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case C:return"Portal";case x:return r.displayName||"Context";case b:return(r._context.displayName||"Context")+".Consumer";case E:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case M:return s=r.displayName||null,s!==null?s:G(r.type)||"Memo";case T:s=r._payload,r=r._init;try{return G(r(s))}catch{}}return null}var K=Array.isArray,V=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},I=[],L=-1;function B(r){return{current:r}}function H(r){0>L||(r.current=I[L],I[L]=null,L--)}function P(r,s){L++,I[L]=r.current,r.current=s}var ee=B(null),ne=B(null),Q=B(null),W=B(null);function q(r,s){switch(P(Q,s),P(ne,r),P(ee,null),s.nodeType){case 9:case 11:r=(r=s.documentElement)&&(r=r.namespaceURI)?By(r):0;break;default:if(r=s.tagName,s=s.namespaceURI)s=By(s),r=zy(s,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}H(ee),P(ee,r)}function J(){H(ee),H(ne),H(Q)}function ie(r){r.memoizedState!==null&&P(W,r);var s=ee.current,c=zy(s,r.type);s!==c&&(P(ne,r),P(ee,c))}function ce(r){ne.current===r&&(H(ee),H(ne)),W.current===r&&(H(W),Qc._currentValue=Z)}var ae,_e;function Ee(r){if(ae===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);ae=s&&s[1]||"",_e=-1<c.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<c.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+ae+r+_e}var Te=!1;function Be(r,s){if(!r||Te)return"";Te=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(s){var be=function(){throw Error()};if(Object.defineProperty(be.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(be,[])}catch(pe){var he=pe}Reflect.construct(r,[],be)}else{try{be.call()}catch(pe){he=pe}r.call(be.prototype)}}else{try{throw Error()}catch(pe){he=pe}(be=r())&&typeof be.catch=="function"&&be.catch(function(){})}}catch(pe){if(pe&&he&&typeof pe.stack=="string")return[pe.stack,he.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var k=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");k&&k.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var R=m.DetermineComponentFrameRoot(),z=R[0],Y=R[1];if(z&&Y){var re=z.split(`
44
+ `),de=Y.split(`
45
+ `);for(k=m=0;m<re.length&&!re[m].includes("DetermineComponentFrameRoot");)m++;for(;k<de.length&&!de[k].includes("DetermineComponentFrameRoot");)k++;if(m===re.length||k===de.length)for(m=re.length-1,k=de.length-1;1<=m&&0<=k&&re[m]!==de[k];)k--;for(;1<=m&&0<=k;m--,k--)if(re[m]!==de[k]){if(m!==1||k!==1)do if(m--,k--,0>k||re[m]!==de[k]){var ve=`
46
+ `+re[m].replace(" at new "," at ");return r.displayName&&ve.includes("<anonymous>")&&(ve=ve.replace("<anonymous>",r.displayName)),ve}while(1<=m&&0<=k);break}}}finally{Te=!1,Error.prepareStackTrace=c}return(c=r?r.displayName||r.name:"")?Ee(c):""}function se(r,s){switch(r.tag){case 26:case 27:case 5:return Ee(r.type);case 16:return Ee("Lazy");case 13:return r.child!==s&&s!==null?Ee("Suspense Fallback"):Ee("Suspense");case 19:return Ee("SuspenseList");case 0:case 15:return Be(r.type,!1);case 11:return Be(r.type.render,!1);case 1:return Be(r.type,!0);case 31:return Ee("Activity");default:return""}}function Ye(r){try{var s="",c=null;do s+=se(r,c),c=r,r=r.return;while(r);return s}catch(m){return`
47
+ Error generating stack: `+m.message+`
48
+ `+m.stack}}var rt=Object.prototype.hasOwnProperty,nt=t.unstable_scheduleCallback,Ge=t.unstable_cancelCallback,gt=t.unstable_shouldYield,it=t.unstable_requestPaint,Je=t.unstable_now,at=t.unstable_getCurrentPriorityLevel,fe=t.unstable_ImmediatePriority,ge=t.unstable_UserBlockingPriority,Ae=t.unstable_NormalPriority,Me=t.unstable_LowPriority,Le=t.unstable_IdlePriority,st=t.log,Se=t.unstable_setDisableYieldValue,Ze=null,Ie=null;function ot(r){if(typeof st=="function"&&Se(r),Ie&&typeof Ie.setStrictMode=="function")try{Ie.setStrictMode(Ze,r)}catch{}}var Ce=Math.clz32?Math.clz32:Dt,Ve=Math.log,lt=Math.LN2;function Dt(r){return r>>>=0,r===0?32:31-(Ve(r)/lt|0)|0}var Xt=256,Ot=262144,Jt=4194304;function Et(r){var s=r&42;if(s!==0)return s;switch(r&-r){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function vn(r,s,c){var m=r.pendingLanes;if(m===0)return 0;var k=0,R=r.suspendedLanes,z=r.pingedLanes;r=r.warmLanes;var Y=m&134217727;return Y!==0?(m=Y&~R,m!==0?k=Et(m):(z&=Y,z!==0?k=Et(z):c||(c=Y&~r,c!==0&&(k=Et(c))))):(Y=m&~R,Y!==0?k=Et(Y):z!==0?k=Et(z):c||(c=m&~r,c!==0&&(k=Et(c)))),k===0?0:s!==0&&s!==k&&(s&R)===0&&(R=k&-k,c=s&-s,R>=c||R===32&&(c&4194048)!==0)?s:k}function Vt(r,s){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&s)===0}function Do(r,s){switch(r){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32: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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function en(){var r=Jt;return Jt<<=1,(Jt&62914560)===0&&(Jt=4194304),r}function kn(r){for(var s=[],c=0;31>c;c++)s.push(r);return s}function rn(r,s){r.pendingLanes|=s,s!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function qn(r,s,c,m,k,R){var z=r.pendingLanes;r.pendingLanes=c,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=c,r.entangledLanes&=c,r.errorRecoveryDisabledLanes&=c,r.shellSuspendCounter=0;var Y=r.entanglements,re=r.expirationTimes,de=r.hiddenUpdates;for(c=z&~c;0<c;){var ve=31-Ce(c),be=1<<ve;Y[ve]=0,re[ve]=-1;var he=de[ve];if(he!==null)for(de[ve]=null,ve=0;ve<he.length;ve++){var pe=he[ve];pe!==null&&(pe.lane&=-536870913)}c&=~be}m!==0&&nr(r,m,0),R!==0&&k===0&&r.tag!==0&&(r.suspendedLanes|=R&~(z&~s))}function nr(r,s,c){r.pendingLanes|=s,r.suspendedLanes&=~s;var m=31-Ce(s);r.entangledLanes|=s,r.entanglements[m]=r.entanglements[m]|1073741824|c&261930}function rr(r,s){var c=r.entangledLanes|=s;for(r=r.entanglements;c;){var m=31-Ce(c),k=1<<m;k&s|r[m]&s&&(r[m]|=s),c&=~k}}function jn(r,s){var c=s&-s;return c=(c&42)!==0?1:On(c),(c&(r.suspendedLanes|s))!==0?0:c}function On(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function Fn(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Ur(){var r=X.p;return r!==0?r:(r=window.event,r===void 0?32:a0(r.type))}function $r(r,s){var c=X.p;try{return X.p=r,s()}finally{X.p=c}}var sn=Math.random().toString(36).slice(2),Ht="__reactFiber$"+sn,Gt="__reactProps$"+sn,_n="__reactContainer$"+sn,br="__reactEvents$"+sn,xr="__reactListeners$"+sn,Ca="__reactHandles$"+sn,ka="__reactResources$"+sn,Ke="__reactMarker$"+sn;function We(r){delete r[Ht],delete r[Gt],delete r[br],delete r[xr],delete r[Ca]}function qr(r){var s=r[Ht];if(s)return s;for(var c=r.parentNode;c;){if(s=c[_n]||c[Ht]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(r=Vy(r);r!==null;){if(c=r[Ht])return c;r=Vy(r)}return s}r=c,c=r.parentNode}return null}function Vr(r){if(r=r[Ht]||r[_n]){var s=r.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return r}return null}function ci(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r.stateNode;throw Error(i(33))}function Gr(r){var s=r[ka];return s||(s=r[ka]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Yt(r){r[Ke]=!0}var Mo=new Set,jo={};function Sr(r,s){Wr(r,s),Wr(r+"Capture",s)}function Wr(r,s){for(jo[r]=s,r=0;r<s.length;r++)Mo.add(s[r])}var yn=RegExp("^[: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]*$"),Oo={},Qu={};function Ea(r){return rt.call(Qu,r)?!0:rt.call(Oo,r)?!1:yn.test(r)?Qu[r]=!0:(Oo[r]=!0,!1)}function Ts(r,s,c){if(Ea(s))if(c===null)r.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":r.removeAttribute(s);return;case"boolean":var m=s.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){r.removeAttribute(s);return}}r.setAttribute(s,""+c)}}function Oi(r,s,c){if(c===null)r.removeAttribute(s);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttribute(s,""+c)}}function zt(r,s,c,m){if(m===null)r.removeAttribute(c);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(c);return}r.setAttributeNS(s,c,""+m)}}function En(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Aa(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Ta(r,s,c){var m=Object.getOwnPropertyDescriptor(r.constructor.prototype,s);if(!r.hasOwnProperty(s)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var k=m.get,R=m.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return k.call(this)},set:function(z){c=""+z,R.call(this,z)}}),Object.defineProperty(r,s,{enumerable:m.enumerable}),{getValue:function(){return c},setValue:function(z){c=""+z},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function Rs(r){if(!r._valueTracker){var s=Aa(r)?"checked":"value";r._valueTracker=Ta(r,s,""+r[s])}}function Lo(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var c=s.getValue(),m="";return r&&(m=Aa(r)?r.checked?"true":"false":r.value),r=m,r!==c?(s.setValue(r),!0):!1}function Li(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var Ra=/[\n"\\]/g;function An(r){return r.replace(Ra,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Ns(r,s,c,m,k,R,z,Y){r.name="",z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?r.type=z:r.removeAttribute("type"),s!=null?z==="number"?(s===0&&r.value===""||r.value!=s)&&(r.value=""+En(s)):r.value!==""+En(s)&&(r.value=""+En(s)):z!=="submit"&&z!=="reset"||r.removeAttribute("value"),s!=null?Ds(r,z,En(s)):c!=null?Ds(r,z,En(c)):m!=null&&r.removeAttribute("value"),k==null&&R!=null&&(r.defaultChecked=!!R),k!=null&&(r.checked=k&&typeof k!="function"&&typeof k!="symbol"),Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"?r.name=""+En(Y):r.removeAttribute("name")}function Io(r,s,c,m,k,R,z,Y){if(R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(r.type=R),s!=null||c!=null){if(!(R!=="submit"&&R!=="reset"||s!=null)){Rs(r);return}c=c!=null?""+En(c):"",s=s!=null?""+En(s):c,Y||s===r.value||(r.value=s),r.defaultValue=s}m=m!=null?m:k,m=typeof m!="function"&&typeof m!="symbol"&&!!m,r.checked=Y?r.checked:!!m,r.defaultChecked=!!m,z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"&&(r.name=z),Rs(r)}function Ds(r,s,c){s==="number"&&Li(r.ownerDocument)===r||r.defaultValue===""+c||(r.defaultValue=""+c)}function Kr(r,s,c,m){if(r=r.options,s){s={};for(var k=0;k<c.length;k++)s["$"+c[k]]=!0;for(c=0;c<r.length;c++)k=s.hasOwnProperty("$"+r[c].value),r[c].selected!==k&&(r[c].selected=k),k&&m&&(r[c].defaultSelected=!0)}else{for(c=""+En(c),s=null,k=0;k<r.length;k++){if(r[k].value===c){r[k].selected=!0,m&&(r[k].defaultSelected=!0);return}s!==null||r[k].disabled||(s=r[k])}s!==null&&(s.selected=!0)}}function Bo(r,s,c){if(s!=null&&(s=""+En(s),s!==r.value&&(r.value=s),c==null)){r.defaultValue!==s&&(r.defaultValue=s);return}r.defaultValue=c!=null?""+En(c):""}function zo(r,s,c,m){if(s==null){if(m!=null){if(c!=null)throw Error(i(92));if(K(m)){if(1<m.length)throw Error(i(93));m=m[0]}c=m}c==null&&(c=""),s=c}c=En(s),r.defaultValue=c,m=r.textContent,m===c&&m!==""&&m!==null&&(r.value=m),Rs(r)}function Yr(r,s){if(s){var c=r.firstChild;if(c&&c===r.lastChild&&c.nodeType===3){c.nodeValue=s;return}}r.textContent=s}var Na=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Po(r,s,c){var m=s.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?m?r.setProperty(s,""):s==="float"?r.cssFloat="":r[s]="":m?r.setProperty(s,c):typeof c!="number"||c===0||Na.has(s)?s==="float"?r.cssFloat=c:r[s]=(""+c).trim():r[s]=c+"px"}function Ii(r,s,c){if(s!=null&&typeof s!="object")throw Error(i(62));if(r=r.style,c!=null){for(var m in c)!c.hasOwnProperty(m)||s!=null&&s.hasOwnProperty(m)||(m.indexOf("--")===0?r.setProperty(m,""):m==="float"?r.cssFloat="":r[m]="");for(var k in s)m=s[k],s.hasOwnProperty(k)&&c[k]!==m&&Po(r,k,m)}else for(var R in s)s.hasOwnProperty(R)&&Po(r,R,s[R])}function Ms(r){if(r.indexOf("-")===-1)return!1;switch(r){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 Ih=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Da=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Fo(r){return Da.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Vn(){}var Bi=null;function js(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var wr=null,Xr=null;function Os(r){var s=Vr(r);if(s&&(r=s.stateNode)){var c=r[Gt]||null;e:switch(r=s.stateNode,s.type){case"input":if(Ns(r,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),s=c.name,c.type==="radio"&&s!=null){for(c=r;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+An(""+s)+'"][type="radio"]'),s=0;s<c.length;s++){var m=c[s];if(m!==r&&m.form===r.form){var k=m[Gt]||null;if(!k)throw Error(i(90));Ns(m,k.value,k.defaultValue,k.defaultValue,k.checked,k.defaultChecked,k.type,k.name)}}for(s=0;s<c.length;s++)m=c[s],m.form===r.form&&Lo(m)}break e;case"textarea":Bo(r,c.value,c.defaultValue);break e;case"select":s=c.value,s!=null&&Kr(r,!!c.multiple,s,!1)}}}var Ls=!1;function Ho(r,s,c){if(Ls)return r(s,c);Ls=!0;try{var m=r(s);return m}finally{if(Ls=!1,(wr!==null||Xr!==null)&&(Od(),wr&&(s=wr,r=Xr,Xr=wr=null,Os(s),r)))for(s=0;s<r.length;s++)Os(r[s])}}function ui(r,s){var c=r.stateNode;if(c===null)return null;var m=c[Gt]||null;if(m===null)return null;c=m[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(r=r.type,m=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!m;break e;default:r=!1}if(r)return null;if(c&&typeof c!="function")throw Error(i(231,s,typeof c));return c}var Gn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Is=!1;if(Gn)try{var Oe={};Object.defineProperty(Oe,"passive",{get:function(){Is=!0}}),window.addEventListener("test",Oe,Oe),window.removeEventListener("test",Oe,Oe)}catch{Is=!1}var ir=null,Cr=null,zi=null;function kr(){if(zi)return zi;var r,s=Cr,c=s.length,m,k="value"in ir?ir.value:ir.textContent,R=k.length;for(r=0;r<c&&s[r]===k[r];r++);var z=c-r;for(m=1;m<=z&&s[c-m]===k[R-m];m++);return zi=k.slice(r,1<m?1-m:void 0)}function Pi(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function di(){return!0}function Uo(){return!1}function bn(r){function s(c,m,k,R,z){this._reactName=c,this._targetInst=k,this.type=m,this.nativeEvent=R,this.target=z,this.currentTarget=null;for(var Y in r)r.hasOwnProperty(Y)&&(c=r[Y],this[Y]=c?c(R):R[Y]);return this.isDefaultPrevented=(R.defaultPrevented!=null?R.defaultPrevented:R.returnValue===!1)?di:Uo,this.isPropagationStopped=Uo,this}return h(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=di)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=di)},persist:function(){},isPersistent:di}),s}var Er={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bs=bn(Er),fi=h({},Er,{view:0,detail:0}),sc=bn(fi),zs,Fi,hi,pi=h({},fi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vo,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==hi&&(hi&&r.type==="mousemove"?(zs=r.screenX-hi.screenX,Fi=r.screenY-hi.screenY):Fi=zs=0,hi=r),zs)},movementY:function(r){return"movementY"in r?r.movementY:Fi}}),$o=bn(pi),oc=h({},pi,{dataTransfer:0}),Ma=bn(oc),ac=h({},fi,{relatedTarget:0}),Ps=bn(ac),lc=h({},Er,{animationName:0,elapsedTime:0,pseudoElement:0}),ja=bn(lc),cc=h({},Er,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Oa=bn(cc),uc=h({},Er,{data:0}),qo=bn(uc),dc={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},La={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"},fc={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ia(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=fc[r])?!!s[r]:!1}function Vo(){return Ia}var Ba=h({},fi,{key:function(r){if(r.key){var s=dc[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=Pi(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?La[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vo,charCode:function(r){return r.type==="keypress"?Pi(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Pi(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),hc=bn(Ba),za=h({},pi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hi=bn(za),Pa=h({},fi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vo}),pc=bn(Pa),Fa=h({},Er,{propertyName:0,elapsedTime:0,pseudoElement:0}),mc=bn(Fa),Ha=h({},pi,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),gc=bn(Ha),Ua=h({},Er,{newState:0,oldState:0}),Go=bn(Ua),$a=[9,13,27,32],Ui=Gn&&"CompositionEvent"in window,Ar=null;Gn&&"documentMode"in document&&(Ar=document.documentMode);var ut=Gn&&"TextEvent"in window&&!Ar,$i=Gn&&(!Ui||Ar&&8<Ar&&11>=Ar),Zr=" ",Qr=!1;function Jr(r,s){switch(r){case"keyup":return $a.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qi(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var sr=!1;function mi(r,s){switch(r){case"compositionend":return qi(s);case"keypress":return s.which!==32?null:(Qr=!0,Zr);case"textInput":return r=s.data,r===Zr&&Qr?null:r;default:return null}}function gi(r,s){if(sr)return r==="compositionend"||!Ui&&Jr(r,s)?(r=kr(),zi=Cr=ir=null,sr=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return $i&&s.locale!=="ko"?null:s.data;default:return null}}var Fs={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Vi(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!Fs[r.type]:s==="textarea"}function Gi(r,s,c,m){wr?Xr?Xr.push(m):Xr=[m]:wr=m,s=Hd(s,"onChange"),0<s.length&&(c=new Bs("onChange","change",null,c,m),r.push({event:c,listeners:s}))}var vi=null,Tr=null;function qa(r){Dy(r,0)}function Wo(r){var s=ci(r);if(Lo(s))return r}function vc(r,s){if(r==="change")return s}var _c=!1;if(Gn){var Va;if(Gn){var Ga="oninput"in document;if(!Ga){var yc=document.createElement("div");yc.setAttribute("oninput","return;"),Ga=typeof yc.oninput=="function"}Va=Ga}else Va=!1;_c=Va&&(!document.documentMode||9<document.documentMode)}function bc(){vi&&(vi.detachEvent("onpropertychange",xc),Tr=vi=null)}function xc(r){if(r.propertyName==="value"&&Wo(Tr)){var s=[];Gi(s,Tr,r,js(r)),Ho(qa,s)}}function Ju(r,s,c){r==="focusin"?(bc(),vi=s,Tr=c,vi.attachEvent("onpropertychange",xc)):r==="focusout"&&bc()}function ed(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Wo(Tr)}function te(r,s){if(r==="click")return Wo(s)}function De(r,s){if(r==="input"||r==="change")return Wo(s)}function ct(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var et=typeof Object.is=="function"?Object.is:ct;function we(r,s){if(et(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var c=Object.keys(r),m=Object.keys(s);if(c.length!==m.length)return!1;for(m=0;m<c.length;m++){var k=c[m];if(!rt.call(s,k)||!et(r[k],s[k]))return!1}return!0}function Ne(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function dt(r,s){var c=Ne(r);r=0;for(var m;c;){if(c.nodeType===3){if(m=r+c.textContent.length,r<=s&&m>=s)return{node:c,offset:s-r};r=m}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=Ne(c)}}function Nt(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?Nt(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function fn(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var s=Li(r.document);s instanceof r.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch{c=!1}if(c)r=s.contentWindow;else break;s=Li(r.document)}return s}function hn(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}var Wn=Gn&&"documentMode"in document&&11>=document.documentMode,Ln=null,ei=null,Wi=null,Sc=!1;function Ki(r,s,c){var m=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Sc||Ln==null||Ln!==Li(m)||(m=Ln,"selectionStart"in m&&hn(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Wi&&we(Wi,m)||(Wi=m,m=Hd(ei,"onSelect"),0<m.length&&(s=new Bs("onSelect","select",null,s,c),r.push({event:s,listeners:m}),s.target=Ln)))}function Rr(r,s){var c={};return c[r.toLowerCase()]=s.toLowerCase(),c["Webkit"+r]="webkit"+s,c["Moz"+r]="moz"+s,c}var or={animationend:Rr("Animation","AnimationEnd"),animationiteration:Rr("Animation","AnimationIteration"),animationstart:Rr("Animation","AnimationStart"),transitionrun:Rr("Transition","TransitionRun"),transitionstart:Rr("Transition","TransitionStart"),transitioncancel:Rr("Transition","TransitionCancel"),transitionend:Rr("Transition","TransitionEnd")},_i={},Yi={};Gn&&(Yi=document.createElement("div").style,"AnimationEvent"in window||(delete or.animationend.animation,delete or.animationiteration.animation,delete or.animationstart.animation),"TransitionEvent"in window||delete or.transitionend.transition);function Kn(r){if(_i[r])return _i[r];if(!or[r])return r;var s=or[r],c;for(c in s)if(s.hasOwnProperty(c)&&c in Yi)return _i[r]=s[c];return r}var Xi=Kn("animationend"),Zi=Kn("animationiteration"),Qi=Kn("animationstart"),Wa=Kn("transitionrun"),Hs=Kn("transitionstart"),Us=Kn("transitioncancel"),Ji=Kn("transitionend"),es=new Map,yi="abort auxClick beforeToggle 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(" ");yi.push("scrollEnd");function xn(r,s){es.set(r,s),Sr(s,[r])}var Wt=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},on=[],ts=0,wc=0;function td(){for(var r=ts,s=wc=ts=0;s<r;){var c=on[s];on[s++]=null;var m=on[s];on[s++]=null;var k=on[s];on[s++]=null;var R=on[s];if(on[s++]=null,m!==null&&k!==null){var z=m.pending;z===null?k.next=k:(k.next=z.next,z.next=k),m.pending=k}R!==0&&f1(c,k,R)}}function nd(r,s,c,m){on[ts++]=r,on[ts++]=s,on[ts++]=c,on[ts++]=m,wc|=m,r.lanes|=m,r=r.alternate,r!==null&&(r.lanes|=m)}function Bh(r,s,c,m){return nd(r,s,c,m),rd(r)}function Ko(r,s){return nd(r,null,null,s),rd(r)}function f1(r,s,c){r.lanes|=c;var m=r.alternate;m!==null&&(m.lanes|=c);for(var k=!1,R=r.return;R!==null;)R.childLanes|=c,m=R.alternate,m!==null&&(m.childLanes|=c),R.tag===22&&(r=R.stateNode,r===null||r._visibility&1||(k=!0)),r=R,R=R.return;return r.tag===3?(R=r.stateNode,k&&s!==null&&(k=31-Ce(c),r=R.hiddenUpdates,m=r[k],m===null?r[k]=[s]:m.push(s),s.lane=c|536870912),R):null}function rd(r){if(50<Vc)throw Vc=0,Gp=null,Error(i(185));for(var s=r.return;s!==null;)r=s,s=r.return;return r.tag===3?r.stateNode:null}var Ka={};function U3(r,s,c,m){this.tag=r,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ar(r,s,c,m){return new U3(r,s,c,m)}function zh(r){return r=r.prototype,!(!r||!r.isReactComponent)}function ns(r,s){var c=r.alternate;return c===null?(c=ar(r.tag,s,r.key,r.mode),c.elementType=r.elementType,c.type=r.type,c.stateNode=r.stateNode,c.alternate=r,r.alternate=c):(c.pendingProps=s,c.type=r.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=r.flags&65011712,c.childLanes=r.childLanes,c.lanes=r.lanes,c.child=r.child,c.memoizedProps=r.memoizedProps,c.memoizedState=r.memoizedState,c.updateQueue=r.updateQueue,s=r.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=r.sibling,c.index=r.index,c.ref=r.ref,c.refCleanup=r.refCleanup,c}function h1(r,s){r.flags&=65011714;var c=r.alternate;return c===null?(r.childLanes=0,r.lanes=s,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=c.childLanes,r.lanes=c.lanes,r.child=c.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=c.memoizedProps,r.memoizedState=c.memoizedState,r.updateQueue=c.updateQueue,r.type=c.type,s=c.dependencies,r.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),r}function id(r,s,c,m,k,R){var z=0;if(m=r,typeof r=="function")zh(r)&&(z=1);else if(typeof r=="string")z=Wk(r,c,ee.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case j:return r=ar(31,c,s,k),r.elementType=j,r.lanes=R,r;case w:return Yo(c.children,k,R,s);case _:z=8,k|=24;break;case v:return r=ar(12,c,s,k|2),r.elementType=v,r.lanes=R,r;case N:return r=ar(13,c,s,k),r.elementType=N,r.lanes=R,r;case A:return r=ar(19,c,s,k),r.elementType=A,r.lanes=R,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case x:z=10;break e;case b:z=9;break e;case E:z=11;break e;case M:z=14;break e;case T:z=16,m=null;break e}z=29,c=Error(i(130,r===null?"null":typeof r,"")),m=null}return s=ar(z,c,s,k),s.elementType=r,s.type=m,s.lanes=R,s}function Yo(r,s,c,m){return r=ar(7,r,m,s),r.lanes=c,r}function Ph(r,s,c){return r=ar(6,r,null,s),r.lanes=c,r}function p1(r){var s=ar(18,null,null,0);return s.stateNode=r,s}function Fh(r,s,c){return s=ar(4,r.children!==null?r.children:[],r.key,s),s.lanes=c,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}var m1=new WeakMap;function Nr(r,s){if(typeof r=="object"&&r!==null){var c=m1.get(r);return c!==void 0?c:(s={value:r,source:s,stack:Ye(s)},m1.set(r,s),s)}return{value:r,source:s,stack:Ye(s)}}var Ya=[],Xa=0,sd=null,Cc=0,Dr=[],Mr=0,$s=null,bi=1,xi="";function rs(r,s){Ya[Xa++]=Cc,Ya[Xa++]=sd,sd=r,Cc=s}function g1(r,s,c){Dr[Mr++]=bi,Dr[Mr++]=xi,Dr[Mr++]=$s,$s=r;var m=bi;r=xi;var k=32-Ce(m)-1;m&=~(1<<k),c+=1;var R=32-Ce(s)+k;if(30<R){var z=k-k%5;R=(m&(1<<z)-1).toString(32),m>>=z,k-=z,bi=1<<32-Ce(s)+k|c<<k|m,xi=R+r}else bi=1<<R|c<<k|m,xi=r}function Hh(r){r.return!==null&&(rs(r,1),g1(r,1,0))}function Uh(r){for(;r===sd;)sd=Ya[--Xa],Ya[Xa]=null,Cc=Ya[--Xa],Ya[Xa]=null;for(;r===$s;)$s=Dr[--Mr],Dr[Mr]=null,xi=Dr[--Mr],Dr[Mr]=null,bi=Dr[--Mr],Dr[Mr]=null}function v1(r,s){Dr[Mr++]=bi,Dr[Mr++]=xi,Dr[Mr++]=$s,bi=s.id,xi=s.overflow,$s=r}var Tn=null,$t=null,Ct=!1,qs=null,jr=!1,$h=Error(i(519));function Vs(r){var s=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw kc(Nr(s,r)),$h}function _1(r){var s=r.stateNode,c=r.type,m=r.memoizedProps;switch(s[Ht]=r,s[Gt]=m,c){case"dialog":bt("cancel",s),bt("close",s);break;case"iframe":case"object":case"embed":bt("load",s);break;case"video":case"audio":for(c=0;c<Wc.length;c++)bt(Wc[c],s);break;case"source":bt("error",s);break;case"img":case"image":case"link":bt("error",s),bt("load",s);break;case"details":bt("toggle",s);break;case"input":bt("invalid",s),Io(s,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":bt("invalid",s);break;case"textarea":bt("invalid",s),zo(s,m.value,m.defaultValue,m.children)}c=m.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||s.textContent===""+c||m.suppressHydrationWarning===!0||Ly(s.textContent,c)?(m.popover!=null&&(bt("beforetoggle",s),bt("toggle",s)),m.onScroll!=null&&bt("scroll",s),m.onScrollEnd!=null&&bt("scrollend",s),m.onClick!=null&&(s.onclick=Vn),s=!0):s=!1,s||Vs(r,!0)}function y1(r){for(Tn=r.return;Tn;)switch(Tn.tag){case 5:case 31:case 13:jr=!1;return;case 27:case 3:jr=!0;return;default:Tn=Tn.return}}function Za(r){if(r!==Tn)return!1;if(!Ct)return y1(r),Ct=!0,!1;var s=r.tag,c;if((c=s!==3&&s!==27)&&((c=s===5)&&(c=r.type,c=!(c!=="form"&&c!=="button")||am(r.type,r.memoizedProps)),c=!c),c&&$t&&Vs(r),y1(r),s===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));$t=qy(r)}else if(s===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));$t=qy(r)}else s===27?(s=$t,so(r.type)?(r=fm,fm=null,$t=r):$t=s):$t=Tn?Lr(r.stateNode.nextSibling):null;return!0}function Xo(){$t=Tn=null,Ct=!1}function qh(){var r=qs;return r!==null&&(Qn===null?Qn=r:Qn.push.apply(Qn,r),qs=null),r}function kc(r){qs===null?qs=[r]:qs.push(r)}var Vh=B(null),Zo=null,is=null;function Gs(r,s,c){P(Vh,s._currentValue),s._currentValue=c}function ss(r){r._currentValue=Vh.current,H(Vh)}function Gh(r,s,c){for(;r!==null;){var m=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,m!==null&&(m.childLanes|=s)):m!==null&&(m.childLanes&s)!==s&&(m.childLanes|=s),r===c)break;r=r.return}}function Wh(r,s,c,m){var k=r.child;for(k!==null&&(k.return=r);k!==null;){var R=k.dependencies;if(R!==null){var z=k.child;R=R.firstContext;e:for(;R!==null;){var Y=R;R=k;for(var re=0;re<s.length;re++)if(Y.context===s[re]){R.lanes|=c,Y=R.alternate,Y!==null&&(Y.lanes|=c),Gh(R.return,c,r),m||(z=null);break e}R=Y.next}}else if(k.tag===18){if(z=k.return,z===null)throw Error(i(341));z.lanes|=c,R=z.alternate,R!==null&&(R.lanes|=c),Gh(z,c,r),z=null}else z=k.child;if(z!==null)z.return=k;else for(z=k;z!==null;){if(z===r){z=null;break}if(k=z.sibling,k!==null){k.return=z.return,z=k;break}z=z.return}k=z}}function Qa(r,s,c,m){r=null;for(var k=s,R=!1;k!==null;){if(!R){if((k.flags&524288)!==0)R=!0;else if((k.flags&262144)!==0)break}if(k.tag===10){var z=k.alternate;if(z===null)throw Error(i(387));if(z=z.memoizedProps,z!==null){var Y=k.type;et(k.pendingProps.value,z.value)||(r!==null?r.push(Y):r=[Y])}}else if(k===W.current){if(z=k.alternate,z===null)throw Error(i(387));z.memoizedState.memoizedState!==k.memoizedState.memoizedState&&(r!==null?r.push(Qc):r=[Qc])}k=k.return}r!==null&&Wh(s,r,c,m),s.flags|=262144}function od(r){for(r=r.firstContext;r!==null;){if(!et(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Qo(r){Zo=r,is=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Rn(r){return b1(Zo,r)}function ad(r,s){return Zo===null&&Qo(r),b1(r,s)}function b1(r,s){var c=s._currentValue;if(s={context:s,memoizedValue:c,next:null},is===null){if(r===null)throw Error(i(308));is=s,r.dependencies={lanes:0,firstContext:s},r.flags|=524288}else is=is.next=s;return c}var $3=typeof AbortController<"u"?AbortController:function(){var r=[],s=this.signal={aborted:!1,addEventListener:function(c,m){r.push(m)}};this.abort=function(){s.aborted=!0,r.forEach(function(c){return c()})}},q3=t.unstable_scheduleCallback,V3=t.unstable_NormalPriority,an={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Kh(){return{controller:new $3,data:new Map,refCount:0}}function Ec(r){r.refCount--,r.refCount===0&&q3(V3,function(){r.controller.abort()})}var Ac=null,Yh=0,Ja=0,el=null;function G3(r,s){if(Ac===null){var c=Ac=[];Yh=0,Ja=Qp(),el={status:"pending",value:void 0,then:function(m){c.push(m)}}}return Yh++,s.then(x1,x1),s}function x1(){if(--Yh===0&&Ac!==null){el!==null&&(el.status="fulfilled");var r=Ac;Ac=null,Ja=0,el=null;for(var s=0;s<r.length;s++)(0,r[s])()}}function W3(r,s){var c=[],m={status:"pending",value:null,reason:null,then:function(k){c.push(k)}};return r.then(function(){m.status="fulfilled",m.value=s;for(var k=0;k<c.length;k++)(0,c[k])(s)},function(k){for(m.status="rejected",m.reason=k,k=0;k<c.length;k++)(0,c[k])(void 0)}),m}var S1=V.S;V.S=function(r,s){sy=Je(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&G3(r,s),S1!==null&&S1(r,s)};var Jo=B(null);function Xh(){var r=Jo.current;return r!==null?r:Pt.pooledCache}function ld(r,s){s===null?P(Jo,Jo.current):P(Jo,s.pool)}function w1(){var r=Xh();return r===null?null:{parent:an._currentValue,pool:r}}var tl=Error(i(460)),Zh=Error(i(474)),cd=Error(i(542)),ud={then:function(){}};function C1(r){return r=r.status,r==="fulfilled"||r==="rejected"}function k1(r,s,c){switch(c=r[c],c===void 0?r.push(s):c!==s&&(s.then(Vn,Vn),s=c),s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,A1(r),r;default:if(typeof s.status=="string")s.then(Vn,Vn);else{if(r=Pt,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=s,r.status="pending",r.then(function(m){if(s.status==="pending"){var k=s;k.status="fulfilled",k.value=m}},function(m){if(s.status==="pending"){var k=s;k.status="rejected",k.reason=m}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,A1(r),r}throw ta=s,tl}}function ea(r){try{var s=r._init;return s(r._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(ta=c,tl):c}}var ta=null;function E1(){if(ta===null)throw Error(i(459));var r=ta;return ta=null,r}function A1(r){if(r===tl||r===cd)throw Error(i(483))}var nl=null,Tc=0;function dd(r){var s=Tc;return Tc+=1,nl===null&&(nl=[]),k1(nl,r,s)}function Rc(r,s){s=s.props.ref,r.ref=s!==void 0?s:null}function fd(r,s){throw s.$$typeof===y?Error(i(525)):(r=Object.prototype.toString.call(s),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r)))}function T1(r){function s(le,oe){if(r){var ue=le.deletions;ue===null?(le.deletions=[oe],le.flags|=16):ue.push(oe)}}function c(le,oe){if(!r)return null;for(;oe!==null;)s(le,oe),oe=oe.sibling;return null}function m(le){for(var oe=new Map;le!==null;)le.key!==null?oe.set(le.key,le):oe.set(le.index,le),le=le.sibling;return oe}function k(le,oe){return le=ns(le,oe),le.index=0,le.sibling=null,le}function R(le,oe,ue){return le.index=ue,r?(ue=le.alternate,ue!==null?(ue=ue.index,ue<oe?(le.flags|=67108866,oe):ue):(le.flags|=67108866,oe)):(le.flags|=1048576,oe)}function z(le){return r&&le.alternate===null&&(le.flags|=67108866),le}function Y(le,oe,ue,ye){return oe===null||oe.tag!==6?(oe=Ph(ue,le.mode,ye),oe.return=le,oe):(oe=k(oe,ue),oe.return=le,oe)}function re(le,oe,ue,ye){var Xe=ue.type;return Xe===w?ve(le,oe,ue.props.children,ye,ue.key):oe!==null&&(oe.elementType===Xe||typeof Xe=="object"&&Xe!==null&&Xe.$$typeof===T&&ea(Xe)===oe.type)?(oe=k(oe,ue.props),Rc(oe,ue),oe.return=le,oe):(oe=id(ue.type,ue.key,ue.props,null,le.mode,ye),Rc(oe,ue),oe.return=le,oe)}function de(le,oe,ue,ye){return oe===null||oe.tag!==4||oe.stateNode.containerInfo!==ue.containerInfo||oe.stateNode.implementation!==ue.implementation?(oe=Fh(ue,le.mode,ye),oe.return=le,oe):(oe=k(oe,ue.children||[]),oe.return=le,oe)}function ve(le,oe,ue,ye,Xe){return oe===null||oe.tag!==7?(oe=Yo(ue,le.mode,ye,Xe),oe.return=le,oe):(oe=k(oe,ue),oe.return=le,oe)}function be(le,oe,ue){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return oe=Ph(""+oe,le.mode,ue),oe.return=le,oe;if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case S:return ue=id(oe.type,oe.key,oe.props,null,le.mode,ue),Rc(ue,oe),ue.return=le,ue;case C:return oe=Fh(oe,le.mode,ue),oe.return=le,oe;case T:return oe=ea(oe),be(le,oe,ue)}if(K(oe)||U(oe))return oe=Yo(oe,le.mode,ue,null),oe.return=le,oe;if(typeof oe.then=="function")return be(le,dd(oe),ue);if(oe.$$typeof===x)return be(le,ad(le,oe),ue);fd(le,oe)}return null}function he(le,oe,ue,ye){var Xe=oe!==null?oe.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Xe!==null?null:Y(le,oe,""+ue,ye);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case S:return ue.key===Xe?re(le,oe,ue,ye):null;case C:return ue.key===Xe?de(le,oe,ue,ye):null;case T:return ue=ea(ue),he(le,oe,ue,ye)}if(K(ue)||U(ue))return Xe!==null?null:ve(le,oe,ue,ye,null);if(typeof ue.then=="function")return he(le,oe,dd(ue),ye);if(ue.$$typeof===x)return he(le,oe,ad(le,ue),ye);fd(le,ue)}return null}function pe(le,oe,ue,ye,Xe){if(typeof ye=="string"&&ye!==""||typeof ye=="number"||typeof ye=="bigint")return le=le.get(ue)||null,Y(oe,le,""+ye,Xe);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case S:return le=le.get(ye.key===null?ue:ye.key)||null,re(oe,le,ye,Xe);case C:return le=le.get(ye.key===null?ue:ye.key)||null,de(oe,le,ye,Xe);case T:return ye=ea(ye),pe(le,oe,ue,ye,Xe)}if(K(ye)||U(ye))return le=le.get(ue)||null,ve(oe,le,ye,Xe,null);if(typeof ye.then=="function")return pe(le,oe,ue,dd(ye),Xe);if(ye.$$typeof===x)return pe(le,oe,ue,ad(oe,ye),Xe);fd(oe,ye)}return null}function Fe(le,oe,ue,ye){for(var Xe=null,At=null,$e=oe,pt=oe=0,wt=null;$e!==null&&pt<ue.length;pt++){$e.index>pt?(wt=$e,$e=null):wt=$e.sibling;var Tt=he(le,$e,ue[pt],ye);if(Tt===null){$e===null&&($e=wt);break}r&&$e&&Tt.alternate===null&&s(le,$e),oe=R(Tt,oe,pt),At===null?Xe=Tt:At.sibling=Tt,At=Tt,$e=wt}if(pt===ue.length)return c(le,$e),Ct&&rs(le,pt),Xe;if($e===null){for(;pt<ue.length;pt++)$e=be(le,ue[pt],ye),$e!==null&&(oe=R($e,oe,pt),At===null?Xe=$e:At.sibling=$e,At=$e);return Ct&&rs(le,pt),Xe}for($e=m($e);pt<ue.length;pt++)wt=pe($e,le,pt,ue[pt],ye),wt!==null&&(r&&wt.alternate!==null&&$e.delete(wt.key===null?pt:wt.key),oe=R(wt,oe,pt),At===null?Xe=wt:At.sibling=wt,At=wt);return r&&$e.forEach(function(uo){return s(le,uo)}),Ct&&rs(le,pt),Xe}function tt(le,oe,ue,ye){if(ue==null)throw Error(i(151));for(var Xe=null,At=null,$e=oe,pt=oe=0,wt=null,Tt=ue.next();$e!==null&&!Tt.done;pt++,Tt=ue.next()){$e.index>pt?(wt=$e,$e=null):wt=$e.sibling;var uo=he(le,$e,Tt.value,ye);if(uo===null){$e===null&&($e=wt);break}r&&$e&&uo.alternate===null&&s(le,$e),oe=R(uo,oe,pt),At===null?Xe=uo:At.sibling=uo,At=uo,$e=wt}if(Tt.done)return c(le,$e),Ct&&rs(le,pt),Xe;if($e===null){for(;!Tt.done;pt++,Tt=ue.next())Tt=be(le,Tt.value,ye),Tt!==null&&(oe=R(Tt,oe,pt),At===null?Xe=Tt:At.sibling=Tt,At=Tt);return Ct&&rs(le,pt),Xe}for($e=m($e);!Tt.done;pt++,Tt=ue.next())Tt=pe($e,le,pt,Tt.value,ye),Tt!==null&&(r&&Tt.alternate!==null&&$e.delete(Tt.key===null?pt:Tt.key),oe=R(Tt,oe,pt),At===null?Xe=Tt:At.sibling=Tt,At=Tt);return r&&$e.forEach(function(iE){return s(le,iE)}),Ct&&rs(le,pt),Xe}function Bt(le,oe,ue,ye){if(typeof ue=="object"&&ue!==null&&ue.type===w&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case S:e:{for(var Xe=ue.key;oe!==null;){if(oe.key===Xe){if(Xe=ue.type,Xe===w){if(oe.tag===7){c(le,oe.sibling),ye=k(oe,ue.props.children),ye.return=le,le=ye;break e}}else if(oe.elementType===Xe||typeof Xe=="object"&&Xe!==null&&Xe.$$typeof===T&&ea(Xe)===oe.type){c(le,oe.sibling),ye=k(oe,ue.props),Rc(ye,ue),ye.return=le,le=ye;break e}c(le,oe);break}else s(le,oe);oe=oe.sibling}ue.type===w?(ye=Yo(ue.props.children,le.mode,ye,ue.key),ye.return=le,le=ye):(ye=id(ue.type,ue.key,ue.props,null,le.mode,ye),Rc(ye,ue),ye.return=le,le=ye)}return z(le);case C:e:{for(Xe=ue.key;oe!==null;){if(oe.key===Xe)if(oe.tag===4&&oe.stateNode.containerInfo===ue.containerInfo&&oe.stateNode.implementation===ue.implementation){c(le,oe.sibling),ye=k(oe,ue.children||[]),ye.return=le,le=ye;break e}else{c(le,oe);break}else s(le,oe);oe=oe.sibling}ye=Fh(ue,le.mode,ye),ye.return=le,le=ye}return z(le);case T:return ue=ea(ue),Bt(le,oe,ue,ye)}if(K(ue))return Fe(le,oe,ue,ye);if(U(ue)){if(Xe=U(ue),typeof Xe!="function")throw Error(i(150));return ue=Xe.call(ue),tt(le,oe,ue,ye)}if(typeof ue.then=="function")return Bt(le,oe,dd(ue),ye);if(ue.$$typeof===x)return Bt(le,oe,ad(le,ue),ye);fd(le,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,oe!==null&&oe.tag===6?(c(le,oe.sibling),ye=k(oe,ue),ye.return=le,le=ye):(c(le,oe),ye=Ph(ue,le.mode,ye),ye.return=le,le=ye),z(le)):c(le,oe)}return function(le,oe,ue,ye){try{Tc=0;var Xe=Bt(le,oe,ue,ye);return nl=null,Xe}catch($e){if($e===tl||$e===cd)throw $e;var At=ar(29,$e,null,le.mode);return At.lanes=ye,At.return=le,At}finally{}}}var na=T1(!0),R1=T1(!1),Ws=!1;function Qh(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jh(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function Ks(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function Ys(r,s,c){var m=r.updateQueue;if(m===null)return null;if(m=m.shared,(Rt&2)!==0){var k=m.pending;return k===null?s.next=s:(s.next=k.next,k.next=s),m.pending=s,s=rd(r),f1(r,null,c),s}return nd(r,m,s,c),rd(r)}function Nc(r,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194048)!==0)){var m=s.lanes;m&=r.pendingLanes,c|=m,s.lanes=c,rr(r,c)}}function ep(r,s){var c=r.updateQueue,m=r.alternate;if(m!==null&&(m=m.updateQueue,c===m)){var k=null,R=null;if(c=c.firstBaseUpdate,c!==null){do{var z={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};R===null?k=R=z:R=R.next=z,c=c.next}while(c!==null);R===null?k=R=s:R=R.next=s}else k=R=s;c={baseState:m.baseState,firstBaseUpdate:k,lastBaseUpdate:R,shared:m.shared,callbacks:m.callbacks},r.updateQueue=c;return}r=c.lastBaseUpdate,r===null?c.firstBaseUpdate=s:r.next=s,c.lastBaseUpdate=s}var tp=!1;function Dc(){if(tp){var r=el;if(r!==null)throw r}}function Mc(r,s,c,m){tp=!1;var k=r.updateQueue;Ws=!1;var R=k.firstBaseUpdate,z=k.lastBaseUpdate,Y=k.shared.pending;if(Y!==null){k.shared.pending=null;var re=Y,de=re.next;re.next=null,z===null?R=de:z.next=de,z=re;var ve=r.alternate;ve!==null&&(ve=ve.updateQueue,Y=ve.lastBaseUpdate,Y!==z&&(Y===null?ve.firstBaseUpdate=de:Y.next=de,ve.lastBaseUpdate=re))}if(R!==null){var be=k.baseState;z=0,ve=de=re=null,Y=R;do{var he=Y.lane&-536870913,pe=he!==Y.lane;if(pe?(St&he)===he:(m&he)===he){he!==0&&he===Ja&&(tp=!0),ve!==null&&(ve=ve.next={lane:0,tag:Y.tag,payload:Y.payload,callback:null,next:null});e:{var Fe=r,tt=Y;he=s;var Bt=c;switch(tt.tag){case 1:if(Fe=tt.payload,typeof Fe=="function"){be=Fe.call(Bt,be,he);break e}be=Fe;break e;case 3:Fe.flags=Fe.flags&-65537|128;case 0:if(Fe=tt.payload,he=typeof Fe=="function"?Fe.call(Bt,be,he):Fe,he==null)break e;be=h({},be,he);break e;case 2:Ws=!0}}he=Y.callback,he!==null&&(r.flags|=64,pe&&(r.flags|=8192),pe=k.callbacks,pe===null?k.callbacks=[he]:pe.push(he))}else pe={lane:he,tag:Y.tag,payload:Y.payload,callback:Y.callback,next:null},ve===null?(de=ve=pe,re=be):ve=ve.next=pe,z|=he;if(Y=Y.next,Y===null){if(Y=k.shared.pending,Y===null)break;pe=Y,Y=pe.next,pe.next=null,k.lastBaseUpdate=pe,k.shared.pending=null}}while(!0);ve===null&&(re=be),k.baseState=re,k.firstBaseUpdate=de,k.lastBaseUpdate=ve,R===null&&(k.shared.lanes=0),eo|=z,r.lanes=z,r.memoizedState=be}}function N1(r,s){if(typeof r!="function")throw Error(i(191,r));r.call(s)}function D1(r,s){var c=r.callbacks;if(c!==null)for(r.callbacks=null,r=0;r<c.length;r++)N1(c[r],s)}var rl=B(null),hd=B(0);function M1(r,s){r=ps,P(hd,r),P(rl,s),ps=r|s.baseLanes}function np(){P(hd,ps),P(rl,rl.current)}function rp(){ps=hd.current,H(rl),H(hd)}var lr=B(null),Or=null;function Xs(r){var s=r.alternate;P(tn,tn.current&1),P(lr,r),Or===null&&(s===null||rl.current!==null||s.memoizedState!==null)&&(Or=r)}function ip(r){P(tn,tn.current),P(lr,r),Or===null&&(Or=r)}function j1(r){r.tag===22?(P(tn,tn.current),P(lr,r),Or===null&&(Or=r)):Zs()}function Zs(){P(tn,tn.current),P(lr,lr.current)}function cr(r){H(lr),Or===r&&(Or=null),H(tn)}var tn=B(0);function pd(r){for(var s=r;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||um(c)||dm(c)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var os=0,ht=null,Lt=null,ln=null,md=!1,il=!1,ra=!1,gd=0,jc=0,sl=null,K3=0;function Zt(){throw Error(i(321))}function sp(r,s){if(s===null)return!1;for(var c=0;c<s.length&&c<r.length;c++)if(!et(r[c],s[c]))return!1;return!0}function op(r,s,c,m,k,R){return os=R,ht=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,V.H=r===null||r.memoizedState===null?g_:xp,ra=!1,R=c(m,k),ra=!1,il&&(R=L1(s,c,m,k)),O1(r),R}function O1(r){V.H=Ic;var s=Lt!==null&&Lt.next!==null;if(os=0,ln=Lt=ht=null,md=!1,jc=0,sl=null,s)throw Error(i(300));r===null||cn||(r=r.dependencies,r!==null&&od(r)&&(cn=!0))}function L1(r,s,c,m){ht=r;var k=0;do{if(il&&(sl=null),jc=0,il=!1,25<=k)throw Error(i(301));if(k+=1,ln=Lt=null,r.updateQueue!=null){var R=r.updateQueue;R.lastEffect=null,R.events=null,R.stores=null,R.memoCache!=null&&(R.memoCache.index=0)}V.H=v_,R=s(c,m)}while(il);return R}function Y3(){var r=V.H,s=r.useState()[0];return s=typeof s.then=="function"?Oc(s):s,r=r.useState()[0],(Lt!==null?Lt.memoizedState:null)!==r&&(ht.flags|=1024),s}function ap(){var r=gd!==0;return gd=0,r}function lp(r,s,c){s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~c}function cp(r){if(md){for(r=r.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}md=!1}os=0,ln=Lt=ht=null,il=!1,jc=gd=0,sl=null}function Hn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ln===null?ht.memoizedState=ln=r:ln=ln.next=r,ln}function nn(){if(Lt===null){var r=ht.alternate;r=r!==null?r.memoizedState:null}else r=Lt.next;var s=ln===null?ht.memoizedState:ln.next;if(s!==null)ln=s,Lt=r;else{if(r===null)throw ht.alternate===null?Error(i(467)):Error(i(310));Lt=r,r={memoizedState:Lt.memoizedState,baseState:Lt.baseState,baseQueue:Lt.baseQueue,queue:Lt.queue,next:null},ln===null?ht.memoizedState=ln=r:ln=ln.next=r}return ln}function vd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Oc(r){var s=jc;return jc+=1,sl===null&&(sl=[]),r=k1(sl,r,s),s=ht,(ln===null?s.memoizedState:ln.next)===null&&(s=s.alternate,V.H=s===null||s.memoizedState===null?g_:xp),r}function _d(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Oc(r);if(r.$$typeof===x)return Rn(r)}throw Error(i(438,String(r)))}function up(r){var s=null,c=ht.updateQueue;if(c!==null&&(s=c.memoCache),s==null){var m=ht.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(s={data:m.data.map(function(k){return k.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),c===null&&(c=vd(),ht.updateQueue=c),c.memoCache=s,c=s.data[s.index],c===void 0)for(c=s.data[s.index]=Array(r),m=0;m<r;m++)c[m]=O;return s.index++,c}function as(r,s){return typeof s=="function"?s(r):s}function yd(r){var s=nn();return dp(s,Lt,r)}function dp(r,s,c){var m=r.queue;if(m===null)throw Error(i(311));m.lastRenderedReducer=c;var k=r.baseQueue,R=m.pending;if(R!==null){if(k!==null){var z=k.next;k.next=R.next,R.next=z}s.baseQueue=k=R,m.pending=null}if(R=r.baseState,k===null)r.memoizedState=R;else{s=k.next;var Y=z=null,re=null,de=s,ve=!1;do{var be=de.lane&-536870913;if(be!==de.lane?(St&be)===be:(os&be)===be){var he=de.revertLane;if(he===0)re!==null&&(re=re.next={lane:0,revertLane:0,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null}),be===Ja&&(ve=!0);else if((os&he)===he){de=de.next,he===Ja&&(ve=!0);continue}else be={lane:0,revertLane:de.revertLane,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},re===null?(Y=re=be,z=R):re=re.next=be,ht.lanes|=he,eo|=he;be=de.action,ra&&c(R,be),R=de.hasEagerState?de.eagerState:c(R,be)}else he={lane:be,revertLane:de.revertLane,gesture:de.gesture,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},re===null?(Y=re=he,z=R):re=re.next=he,ht.lanes|=be,eo|=be;de=de.next}while(de!==null&&de!==s);if(re===null?z=R:re.next=Y,!et(R,r.memoizedState)&&(cn=!0,ve&&(c=el,c!==null)))throw c;r.memoizedState=R,r.baseState=z,r.baseQueue=re,m.lastRenderedState=R}return k===null&&(m.lanes=0),[r.memoizedState,m.dispatch]}function fp(r){var s=nn(),c=s.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=r;var m=c.dispatch,k=c.pending,R=s.memoizedState;if(k!==null){c.pending=null;var z=k=k.next;do R=r(R,z.action),z=z.next;while(z!==k);et(R,s.memoizedState)||(cn=!0),s.memoizedState=R,s.baseQueue===null&&(s.baseState=R),c.lastRenderedState=R}return[R,m]}function I1(r,s,c){var m=ht,k=nn(),R=Ct;if(R){if(c===void 0)throw Error(i(407));c=c()}else c=s();var z=!et((Lt||k).memoizedState,c);if(z&&(k.memoizedState=c,cn=!0),k=k.queue,mp(P1.bind(null,m,k,r),[r]),k.getSnapshot!==s||z||ln!==null&&ln.memoizedState.tag&1){if(m.flags|=2048,ol(9,{destroy:void 0},z1.bind(null,m,k,c,s),null),Pt===null)throw Error(i(349));R||(os&127)!==0||B1(m,s,c)}return c}function B1(r,s,c){r.flags|=16384,r={getSnapshot:s,value:c},s=ht.updateQueue,s===null?(s=vd(),ht.updateQueue=s,s.stores=[r]):(c=s.stores,c===null?s.stores=[r]:c.push(r))}function z1(r,s,c,m){s.value=c,s.getSnapshot=m,F1(s)&&H1(r)}function P1(r,s,c){return c(function(){F1(s)&&H1(r)})}function F1(r){var s=r.getSnapshot;r=r.value;try{var c=s();return!et(r,c)}catch{return!0}}function H1(r){var s=Ko(r,2);s!==null&&Jn(s,r,2)}function hp(r){var s=Hn();if(typeof r=="function"){var c=r;if(r=c(),ra){ot(!0);try{c()}finally{ot(!1)}}}return s.memoizedState=s.baseState=r,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:r},s}function U1(r,s,c,m){return r.baseState=c,dp(r,Lt,typeof m=="function"?m:as)}function X3(r,s,c,m,k){if(Sd(r))throw Error(i(485));if(r=s.action,r!==null){var R={payload:k,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(z){R.listeners.push(z)}};V.T!==null?c(!0):R.isTransition=!1,m(R),c=s.pending,c===null?(R.next=s.pending=R,$1(s,R)):(R.next=c.next,s.pending=c.next=R)}}function $1(r,s){var c=s.action,m=s.payload,k=r.state;if(s.isTransition){var R=V.T,z={};V.T=z;try{var Y=c(k,m),re=V.S;re!==null&&re(z,Y),q1(r,s,Y)}catch(de){pp(r,s,de)}finally{R!==null&&z.types!==null&&(R.types=z.types),V.T=R}}else try{R=c(k,m),q1(r,s,R)}catch(de){pp(r,s,de)}}function q1(r,s,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(m){V1(r,s,m)},function(m){return pp(r,s,m)}):V1(r,s,c)}function V1(r,s,c){s.status="fulfilled",s.value=c,G1(s),r.state=c,s=r.pending,s!==null&&(c=s.next,c===s?r.pending=null:(c=c.next,s.next=c,$1(r,c)))}function pp(r,s,c){var m=r.pending;if(r.pending=null,m!==null){m=m.next;do s.status="rejected",s.reason=c,G1(s),s=s.next;while(s!==m)}r.action=null}function G1(r){r=r.listeners;for(var s=0;s<r.length;s++)(0,r[s])()}function W1(r,s){return s}function K1(r,s){if(Ct){var c=Pt.formState;if(c!==null){e:{var m=ht;if(Ct){if($t){t:{for(var k=$t,R=jr;k.nodeType!==8;){if(!R){k=null;break t}if(k=Lr(k.nextSibling),k===null){k=null;break t}}R=k.data,k=R==="F!"||R==="F"?k:null}if(k){$t=Lr(k.nextSibling),m=k.data==="F!";break e}}Vs(m)}m=!1}m&&(s=c[0])}}return c=Hn(),c.memoizedState=c.baseState=s,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:W1,lastRenderedState:s},c.queue=m,c=h_.bind(null,ht,m),m.dispatch=c,m=hp(!1),R=bp.bind(null,ht,!1,m.queue),m=Hn(),k={state:s,dispatch:null,action:r,pending:null},m.queue=k,c=X3.bind(null,ht,k,R,c),k.dispatch=c,m.memoizedState=r,[s,c,!1]}function Y1(r){var s=nn();return X1(s,Lt,r)}function X1(r,s,c){if(s=dp(r,s,W1)[0],r=yd(as)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var m=Oc(s)}catch(z){throw z===tl?cd:z}else m=s;s=nn();var k=s.queue,R=k.dispatch;return c!==s.memoizedState&&(ht.flags|=2048,ol(9,{destroy:void 0},Z3.bind(null,k,c),null)),[m,R,r]}function Z3(r,s){r.action=s}function Z1(r){var s=nn(),c=Lt;if(c!==null)return X1(s,c,r);nn(),s=s.memoizedState,c=nn();var m=c.queue.dispatch;return c.memoizedState=r,[s,m,!1]}function ol(r,s,c,m){return r={tag:r,create:c,deps:m,inst:s,next:null},s=ht.updateQueue,s===null&&(s=vd(),ht.updateQueue=s),c=s.lastEffect,c===null?s.lastEffect=r.next=r:(m=c.next,c.next=r,r.next=m,s.lastEffect=r),r}function Q1(){return nn().memoizedState}function bd(r,s,c,m){var k=Hn();ht.flags|=r,k.memoizedState=ol(1|s,{destroy:void 0},c,m===void 0?null:m)}function xd(r,s,c,m){var k=nn();m=m===void 0?null:m;var R=k.memoizedState.inst;Lt!==null&&m!==null&&sp(m,Lt.memoizedState.deps)?k.memoizedState=ol(s,R,c,m):(ht.flags|=r,k.memoizedState=ol(1|s,R,c,m))}function J1(r,s){bd(8390656,8,r,s)}function mp(r,s){xd(2048,8,r,s)}function Q3(r){ht.flags|=4;var s=ht.updateQueue;if(s===null)s=vd(),ht.updateQueue=s,s.events=[r];else{var c=s.events;c===null?s.events=[r]:c.push(r)}}function e_(r){var s=nn().memoizedState;return Q3({ref:s,nextImpl:r}),function(){if((Rt&2)!==0)throw Error(i(440));return s.impl.apply(void 0,arguments)}}function t_(r,s){return xd(4,2,r,s)}function n_(r,s){return xd(4,4,r,s)}function r_(r,s){if(typeof s=="function"){r=r();var c=s(r);return function(){typeof c=="function"?c():s(null)}}if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function i_(r,s,c){c=c!=null?c.concat([r]):null,xd(4,4,r_.bind(null,s,r),c)}function gp(){}function s_(r,s){var c=nn();s=s===void 0?null:s;var m=c.memoizedState;return s!==null&&sp(s,m[1])?m[0]:(c.memoizedState=[r,s],r)}function o_(r,s){var c=nn();s=s===void 0?null:s;var m=c.memoizedState;if(s!==null&&sp(s,m[1]))return m[0];if(m=r(),ra){ot(!0);try{r()}finally{ot(!1)}}return c.memoizedState=[m,s],m}function vp(r,s,c){return c===void 0||(os&1073741824)!==0&&(St&261930)===0?r.memoizedState=s:(r.memoizedState=c,r=ay(),ht.lanes|=r,eo|=r,c)}function a_(r,s,c,m){return et(c,s)?c:rl.current!==null?(r=vp(r,c,m),et(r,s)||(cn=!0),r):(os&42)===0||(os&1073741824)!==0&&(St&261930)===0?(cn=!0,r.memoizedState=c):(r=ay(),ht.lanes|=r,eo|=r,s)}function l_(r,s,c,m,k){var R=X.p;X.p=R!==0&&8>R?R:8;var z=V.T,Y={};V.T=Y,bp(r,!1,s,c);try{var re=k(),de=V.S;if(de!==null&&de(Y,re),re!==null&&typeof re=="object"&&typeof re.then=="function"){var ve=W3(re,m);Lc(r,s,ve,fr(r))}else Lc(r,s,m,fr(r))}catch(be){Lc(r,s,{then:function(){},status:"rejected",reason:be},fr())}finally{X.p=R,z!==null&&Y.types!==null&&(z.types=Y.types),V.T=z}}function J3(){}function _p(r,s,c,m){if(r.tag!==5)throw Error(i(476));var k=c_(r).queue;l_(r,k,s,Z,c===null?J3:function(){return u_(r),c(m)})}function c_(r){var s=r.memoizedState;if(s!==null)return s;s={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:Z},next:null};var c={};return s.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:c},next:null},r.memoizedState=s,r=r.alternate,r!==null&&(r.memoizedState=s),s}function u_(r){var s=c_(r);s.next===null&&(s=r.alternate.memoizedState),Lc(r,s.next.queue,{},fr())}function yp(){return Rn(Qc)}function d_(){return nn().memoizedState}function f_(){return nn().memoizedState}function ek(r){for(var s=r.return;s!==null;){switch(s.tag){case 24:case 3:var c=fr();r=Ks(c);var m=Ys(s,r,c);m!==null&&(Jn(m,s,c),Nc(m,s,c)),s={cache:Kh()},r.payload=s;return}s=s.return}}function tk(r,s,c){var m=fr();c={lane:m,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Sd(r)?p_(s,c):(c=Bh(r,s,c,m),c!==null&&(Jn(c,r,m),m_(c,s,m)))}function h_(r,s,c){var m=fr();Lc(r,s,c,m)}function Lc(r,s,c,m){var k={lane:m,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(Sd(r))p_(s,k);else{var R=r.alternate;if(r.lanes===0&&(R===null||R.lanes===0)&&(R=s.lastRenderedReducer,R!==null))try{var z=s.lastRenderedState,Y=R(z,c);if(k.hasEagerState=!0,k.eagerState=Y,et(Y,z))return nd(r,s,k,0),Pt===null&&td(),!1}catch{}finally{}if(c=Bh(r,s,k,m),c!==null)return Jn(c,r,m),m_(c,s,m),!0}return!1}function bp(r,s,c,m){if(m={lane:2,revertLane:Qp(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Sd(r)){if(s)throw Error(i(479))}else s=Bh(r,c,m,2),s!==null&&Jn(s,r,2)}function Sd(r){var s=r.alternate;return r===ht||s!==null&&s===ht}function p_(r,s){il=md=!0;var c=r.pending;c===null?s.next=s:(s.next=c.next,c.next=s),r.pending=s}function m_(r,s,c){if((c&4194048)!==0){var m=s.lanes;m&=r.pendingLanes,c|=m,s.lanes=c,rr(r,c)}}var Ic={readContext:Rn,use:_d,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useLayoutEffect:Zt,useInsertionEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useSyncExternalStore:Zt,useId:Zt,useHostTransitionStatus:Zt,useFormState:Zt,useActionState:Zt,useOptimistic:Zt,useMemoCache:Zt,useCacheRefresh:Zt};Ic.useEffectEvent=Zt;var g_={readContext:Rn,use:_d,useCallback:function(r,s){return Hn().memoizedState=[r,s===void 0?null:s],r},useContext:Rn,useEffect:J1,useImperativeHandle:function(r,s,c){c=c!=null?c.concat([r]):null,bd(4194308,4,r_.bind(null,s,r),c)},useLayoutEffect:function(r,s){return bd(4194308,4,r,s)},useInsertionEffect:function(r,s){bd(4,2,r,s)},useMemo:function(r,s){var c=Hn();s=s===void 0?null:s;var m=r();if(ra){ot(!0);try{r()}finally{ot(!1)}}return c.memoizedState=[m,s],m},useReducer:function(r,s,c){var m=Hn();if(c!==void 0){var k=c(s);if(ra){ot(!0);try{c(s)}finally{ot(!1)}}}else k=s;return m.memoizedState=m.baseState=k,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:k},m.queue=r,r=r.dispatch=tk.bind(null,ht,r),[m.memoizedState,r]},useRef:function(r){var s=Hn();return r={current:r},s.memoizedState=r},useState:function(r){r=hp(r);var s=r.queue,c=h_.bind(null,ht,s);return s.dispatch=c,[r.memoizedState,c]},useDebugValue:gp,useDeferredValue:function(r,s){var c=Hn();return vp(c,r,s)},useTransition:function(){var r=hp(!1);return r=l_.bind(null,ht,r.queue,!0,!1),Hn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,s,c){var m=ht,k=Hn();if(Ct){if(c===void 0)throw Error(i(407));c=c()}else{if(c=s(),Pt===null)throw Error(i(349));(St&127)!==0||B1(m,s,c)}k.memoizedState=c;var R={value:c,getSnapshot:s};return k.queue=R,J1(P1.bind(null,m,R,r),[r]),m.flags|=2048,ol(9,{destroy:void 0},z1.bind(null,m,R,c,s),null),c},useId:function(){var r=Hn(),s=Pt.identifierPrefix;if(Ct){var c=xi,m=bi;c=(m&~(1<<32-Ce(m)-1)).toString(32)+c,s="_"+s+"R_"+c,c=gd++,0<c&&(s+="H"+c.toString(32)),s+="_"}else c=K3++,s="_"+s+"r_"+c.toString(32)+"_";return r.memoizedState=s},useHostTransitionStatus:yp,useFormState:K1,useActionState:K1,useOptimistic:function(r){var s=Hn();s.memoizedState=s.baseState=r;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=c,s=bp.bind(null,ht,!0,c),c.dispatch=s,[r,s]},useMemoCache:up,useCacheRefresh:function(){return Hn().memoizedState=ek.bind(null,ht)},useEffectEvent:function(r){var s=Hn(),c={impl:r};return s.memoizedState=c,function(){if((Rt&2)!==0)throw Error(i(440));return c.impl.apply(void 0,arguments)}}},xp={readContext:Rn,use:_d,useCallback:s_,useContext:Rn,useEffect:mp,useImperativeHandle:i_,useInsertionEffect:t_,useLayoutEffect:n_,useMemo:o_,useReducer:yd,useRef:Q1,useState:function(){return yd(as)},useDebugValue:gp,useDeferredValue:function(r,s){var c=nn();return a_(c,Lt.memoizedState,r,s)},useTransition:function(){var r=yd(as)[0],s=nn().memoizedState;return[typeof r=="boolean"?r:Oc(r),s]},useSyncExternalStore:I1,useId:d_,useHostTransitionStatus:yp,useFormState:Y1,useActionState:Y1,useOptimistic:function(r,s){var c=nn();return U1(c,Lt,r,s)},useMemoCache:up,useCacheRefresh:f_};xp.useEffectEvent=e_;var v_={readContext:Rn,use:_d,useCallback:s_,useContext:Rn,useEffect:mp,useImperativeHandle:i_,useInsertionEffect:t_,useLayoutEffect:n_,useMemo:o_,useReducer:fp,useRef:Q1,useState:function(){return fp(as)},useDebugValue:gp,useDeferredValue:function(r,s){var c=nn();return Lt===null?vp(c,r,s):a_(c,Lt.memoizedState,r,s)},useTransition:function(){var r=fp(as)[0],s=nn().memoizedState;return[typeof r=="boolean"?r:Oc(r),s]},useSyncExternalStore:I1,useId:d_,useHostTransitionStatus:yp,useFormState:Z1,useActionState:Z1,useOptimistic:function(r,s){var c=nn();return Lt!==null?U1(c,Lt,r,s):(c.baseState=r,[r,c.queue.dispatch])},useMemoCache:up,useCacheRefresh:f_};v_.useEffectEvent=e_;function Sp(r,s,c,m){s=r.memoizedState,c=c(m,s),c=c==null?s:h({},s,c),r.memoizedState=c,r.lanes===0&&(r.updateQueue.baseState=c)}var wp={enqueueSetState:function(r,s,c){r=r._reactInternals;var m=fr(),k=Ks(m);k.payload=s,c!=null&&(k.callback=c),s=Ys(r,k,m),s!==null&&(Jn(s,r,m),Nc(s,r,m))},enqueueReplaceState:function(r,s,c){r=r._reactInternals;var m=fr(),k=Ks(m);k.tag=1,k.payload=s,c!=null&&(k.callback=c),s=Ys(r,k,m),s!==null&&(Jn(s,r,m),Nc(s,r,m))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var c=fr(),m=Ks(c);m.tag=2,s!=null&&(m.callback=s),s=Ys(r,m,c),s!==null&&(Jn(s,r,c),Nc(s,r,c))}};function __(r,s,c,m,k,R,z){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(m,R,z):s.prototype&&s.prototype.isPureReactComponent?!we(c,m)||!we(k,R):!0}function y_(r,s,c,m){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,m),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,m),s.state!==r&&wp.enqueueReplaceState(s,s.state,null)}function ia(r,s){var c=s;if("ref"in s){c={};for(var m in s)m!=="ref"&&(c[m]=s[m])}if(r=r.defaultProps){c===s&&(c=h({},c));for(var k in r)c[k]===void 0&&(c[k]=r[k])}return c}function b_(r){Wt(r)}function x_(r){console.error(r)}function S_(r){Wt(r)}function wd(r,s){try{var c=r.onUncaughtError;c(s.value,{componentStack:s.stack})}catch(m){setTimeout(function(){throw m})}}function w_(r,s,c){try{var m=r.onCaughtError;m(c.value,{componentStack:c.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(k){setTimeout(function(){throw k})}}function Cp(r,s,c){return c=Ks(c),c.tag=3,c.payload={element:null},c.callback=function(){wd(r,s)},c}function C_(r){return r=Ks(r),r.tag=3,r}function k_(r,s,c,m){var k=c.type.getDerivedStateFromError;if(typeof k=="function"){var R=m.value;r.payload=function(){return k(R)},r.callback=function(){w_(s,c,m)}}var z=c.stateNode;z!==null&&typeof z.componentDidCatch=="function"&&(r.callback=function(){w_(s,c,m),typeof k!="function"&&(to===null?to=new Set([this]):to.add(this));var Y=m.stack;this.componentDidCatch(m.value,{componentStack:Y!==null?Y:""})})}function nk(r,s,c,m,k){if(c.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(s=c.alternate,s!==null&&Qa(s,c,k,!0),c=lr.current,c!==null){switch(c.tag){case 31:case 13:return Or===null?Ld():c.alternate===null&&Qt===0&&(Qt=3),c.flags&=-257,c.flags|=65536,c.lanes=k,m===ud?c.flags|=16384:(s=c.updateQueue,s===null?c.updateQueue=new Set([m]):s.add(m),Yp(r,m,k)),!1;case 22:return c.flags|=65536,m===ud?c.flags|=16384:(s=c.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([m])},c.updateQueue=s):(c=s.retryQueue,c===null?s.retryQueue=new Set([m]):c.add(m)),Yp(r,m,k)),!1}throw Error(i(435,c.tag))}return Yp(r,m,k),Ld(),!1}if(Ct)return s=lr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=k,m!==$h&&(r=Error(i(422),{cause:m}),kc(Nr(r,c)))):(m!==$h&&(s=Error(i(423),{cause:m}),kc(Nr(s,c))),r=r.current.alternate,r.flags|=65536,k&=-k,r.lanes|=k,m=Nr(m,c),k=Cp(r.stateNode,m,k),ep(r,k),Qt!==4&&(Qt=2)),!1;var R=Error(i(520),{cause:m});if(R=Nr(R,c),qc===null?qc=[R]:qc.push(R),Qt!==4&&(Qt=2),s===null)return!0;m=Nr(m,c),c=s;do{switch(c.tag){case 3:return c.flags|=65536,r=k&-k,c.lanes|=r,r=Cp(c.stateNode,m,r),ep(c,r),!1;case 1:if(s=c.type,R=c.stateNode,(c.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(to===null||!to.has(R))))return c.flags|=65536,k&=-k,c.lanes|=k,k=C_(k),k_(k,r,c,m),ep(c,k),!1}c=c.return}while(c!==null);return!1}var kp=Error(i(461)),cn=!1;function Nn(r,s,c,m){s.child=r===null?R1(s,null,c,m):na(s,r.child,c,m)}function E_(r,s,c,m,k){c=c.render;var R=s.ref;if("ref"in m){var z={};for(var Y in m)Y!=="ref"&&(z[Y]=m[Y])}else z=m;return Qo(s),m=op(r,s,c,z,R,k),Y=ap(),r!==null&&!cn?(lp(r,s,k),ls(r,s,k)):(Ct&&Y&&Hh(s),s.flags|=1,Nn(r,s,m,k),s.child)}function A_(r,s,c,m,k){if(r===null){var R=c.type;return typeof R=="function"&&!zh(R)&&R.defaultProps===void 0&&c.compare===null?(s.tag=15,s.type=R,T_(r,s,R,m,k)):(r=id(c.type,null,m,s,s.mode,k),r.ref=s.ref,r.return=s,s.child=r)}if(R=r.child,!jp(r,k)){var z=R.memoizedProps;if(c=c.compare,c=c!==null?c:we,c(z,m)&&r.ref===s.ref)return ls(r,s,k)}return s.flags|=1,r=ns(R,m),r.ref=s.ref,r.return=s,s.child=r}function T_(r,s,c,m,k){if(r!==null){var R=r.memoizedProps;if(we(R,m)&&r.ref===s.ref)if(cn=!1,s.pendingProps=m=R,jp(r,k))(r.flags&131072)!==0&&(cn=!0);else return s.lanes=r.lanes,ls(r,s,k)}return Ep(r,s,c,m,k)}function R_(r,s,c,m){var k=m.children,R=r!==null?r.memoizedState:null;if(r===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((s.flags&128)!==0){if(R=R!==null?R.baseLanes|c:c,r!==null){for(m=s.child=r.child,k=0;m!==null;)k=k|m.lanes|m.childLanes,m=m.sibling;m=k&~R}else m=0,s.child=null;return N_(r,s,R,c,m)}if((c&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},r!==null&&ld(s,R!==null?R.cachePool:null),R!==null?M1(s,R):np(),j1(s);else return m=s.lanes=536870912,N_(r,s,R!==null?R.baseLanes|c:c,c,m)}else R!==null?(ld(s,R.cachePool),M1(s,R),Zs(),s.memoizedState=null):(r!==null&&ld(s,null),np(),Zs());return Nn(r,s,k,c),s.child}function Bc(r,s){return r!==null&&r.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function N_(r,s,c,m,k){var R=Xh();return R=R===null?null:{parent:an._currentValue,pool:R},s.memoizedState={baseLanes:c,cachePool:R},r!==null&&ld(s,null),np(),j1(s),r!==null&&Qa(r,s,m,!0),s.childLanes=k,null}function Cd(r,s){return s=Ed({mode:s.mode,children:s.children},r.mode),s.ref=r.ref,r.child=s,s.return=r,s}function D_(r,s,c){return na(s,r.child,null,c),r=Cd(s,s.pendingProps),r.flags|=2,cr(s),s.memoizedState=null,r}function rk(r,s,c){var m=s.pendingProps,k=(s.flags&128)!==0;if(s.flags&=-129,r===null){if(Ct){if(m.mode==="hidden")return r=Cd(s,m),s.lanes=536870912,Bc(null,r);if(ip(s),(r=$t)?(r=$y(r,jr),r=r!==null&&r.data==="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:$s!==null?{id:bi,overflow:xi}:null,retryLane:536870912,hydrationErrors:null},c=p1(r),c.return=s,s.child=c,Tn=s,$t=null)):r=null,r===null)throw Vs(s);return s.lanes=536870912,null}return Cd(s,m)}var R=r.memoizedState;if(R!==null){var z=R.dehydrated;if(ip(s),k)if(s.flags&256)s.flags&=-257,s=D_(r,s,c);else if(s.memoizedState!==null)s.child=r.child,s.flags|=128,s=null;else throw Error(i(558));else if(cn||Qa(r,s,c,!1),k=(c&r.childLanes)!==0,cn||k){if(m=Pt,m!==null&&(z=jn(m,c),z!==0&&z!==R.retryLane))throw R.retryLane=z,Ko(r,z),Jn(m,r,z),kp;Ld(),s=D_(r,s,c)}else r=R.treeContext,$t=Lr(z.nextSibling),Tn=s,Ct=!0,qs=null,jr=!1,r!==null&&v1(s,r),s=Cd(s,m),s.flags|=4096;return s}return r=ns(r.child,{mode:m.mode,children:m.children}),r.ref=s.ref,s.child=r,r.return=s,r}function kd(r,s){var c=s.ref;if(c===null)r!==null&&r.ref!==null&&(s.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(i(284));(r===null||r.ref!==c)&&(s.flags|=4194816)}}function Ep(r,s,c,m,k){return Qo(s),c=op(r,s,c,m,void 0,k),m=ap(),r!==null&&!cn?(lp(r,s,k),ls(r,s,k)):(Ct&&m&&Hh(s),s.flags|=1,Nn(r,s,c,k),s.child)}function M_(r,s,c,m,k,R){return Qo(s),s.updateQueue=null,c=L1(s,m,c,k),O1(r),m=ap(),r!==null&&!cn?(lp(r,s,R),ls(r,s,R)):(Ct&&m&&Hh(s),s.flags|=1,Nn(r,s,c,R),s.child)}function j_(r,s,c,m,k){if(Qo(s),s.stateNode===null){var R=Ka,z=c.contextType;typeof z=="object"&&z!==null&&(R=Rn(z)),R=new c(m,R),s.memoizedState=R.state!==null&&R.state!==void 0?R.state:null,R.updater=wp,s.stateNode=R,R._reactInternals=s,R=s.stateNode,R.props=m,R.state=s.memoizedState,R.refs={},Qh(s),z=c.contextType,R.context=typeof z=="object"&&z!==null?Rn(z):Ka,R.state=s.memoizedState,z=c.getDerivedStateFromProps,typeof z=="function"&&(Sp(s,c,z,m),R.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof R.getSnapshotBeforeUpdate=="function"||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(z=R.state,typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount(),z!==R.state&&wp.enqueueReplaceState(R,R.state,null),Mc(s,m,R,k),Dc(),R.state=s.memoizedState),typeof R.componentDidMount=="function"&&(s.flags|=4194308),m=!0}else if(r===null){R=s.stateNode;var Y=s.memoizedProps,re=ia(c,Y);R.props=re;var de=R.context,ve=c.contextType;z=Ka,typeof ve=="object"&&ve!==null&&(z=Rn(ve));var be=c.getDerivedStateFromProps;ve=typeof be=="function"||typeof R.getSnapshotBeforeUpdate=="function",Y=s.pendingProps!==Y,ve||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(Y||de!==z)&&y_(s,R,m,z),Ws=!1;var he=s.memoizedState;R.state=he,Mc(s,m,R,k),Dc(),de=s.memoizedState,Y||he!==de||Ws?(typeof be=="function"&&(Sp(s,c,be,m),de=s.memoizedState),(re=Ws||__(s,c,re,m,he,de,z))?(ve||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount()),typeof R.componentDidMount=="function"&&(s.flags|=4194308)):(typeof R.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=m,s.memoizedState=de),R.props=m,R.state=de,R.context=z,m=re):(typeof R.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{R=s.stateNode,Jh(r,s),z=s.memoizedProps,ve=ia(c,z),R.props=ve,be=s.pendingProps,he=R.context,de=c.contextType,re=Ka,typeof de=="object"&&de!==null&&(re=Rn(de)),Y=c.getDerivedStateFromProps,(de=typeof Y=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(z!==be||he!==re)&&y_(s,R,m,re),Ws=!1,he=s.memoizedState,R.state=he,Mc(s,m,R,k),Dc();var pe=s.memoizedState;z!==be||he!==pe||Ws||r!==null&&r.dependencies!==null&&od(r.dependencies)?(typeof Y=="function"&&(Sp(s,c,Y,m),pe=s.memoizedState),(ve=Ws||__(s,c,ve,m,he,pe,re)||r!==null&&r.dependencies!==null&&od(r.dependencies))?(de||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(m,pe,re),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(m,pe,re)),typeof R.componentDidUpdate=="function"&&(s.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof R.componentDidUpdate!="function"||z===r.memoizedProps&&he===r.memoizedState||(s.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||z===r.memoizedProps&&he===r.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=pe),R.props=m,R.state=pe,R.context=re,m=ve):(typeof R.componentDidUpdate!="function"||z===r.memoizedProps&&he===r.memoizedState||(s.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||z===r.memoizedProps&&he===r.memoizedState||(s.flags|=1024),m=!1)}return R=m,kd(r,s),m=(s.flags&128)!==0,R||m?(R=s.stateNode,c=m&&typeof c.getDerivedStateFromError!="function"?null:R.render(),s.flags|=1,r!==null&&m?(s.child=na(s,r.child,null,k),s.child=na(s,null,c,k)):Nn(r,s,c,k),s.memoizedState=R.state,r=s.child):r=ls(r,s,k),r}function O_(r,s,c,m){return Xo(),s.flags|=256,Nn(r,s,c,m),s.child}var Ap={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Tp(r){return{baseLanes:r,cachePool:w1()}}function Rp(r,s,c){return r=r!==null?r.childLanes&~c:0,s&&(r|=dr),r}function L_(r,s,c){var m=s.pendingProps,k=!1,R=(s.flags&128)!==0,z;if((z=R)||(z=r!==null&&r.memoizedState===null?!1:(tn.current&2)!==0),z&&(k=!0,s.flags&=-129),z=(s.flags&32)!==0,s.flags&=-33,r===null){if(Ct){if(k?Xs(s):Zs(),(r=$t)?(r=$y(r,jr),r=r!==null&&r.data!=="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:$s!==null?{id:bi,overflow:xi}:null,retryLane:536870912,hydrationErrors:null},c=p1(r),c.return=s,s.child=c,Tn=s,$t=null)):r=null,r===null)throw Vs(s);return dm(r)?s.lanes=32:s.lanes=536870912,null}var Y=m.children;return m=m.fallback,k?(Zs(),k=s.mode,Y=Ed({mode:"hidden",children:Y},k),m=Yo(m,k,c,null),Y.return=s,m.return=s,Y.sibling=m,s.child=Y,m=s.child,m.memoizedState=Tp(c),m.childLanes=Rp(r,z,c),s.memoizedState=Ap,Bc(null,m)):(Xs(s),Np(s,Y))}var re=r.memoizedState;if(re!==null&&(Y=re.dehydrated,Y!==null)){if(R)s.flags&256?(Xs(s),s.flags&=-257,s=Dp(r,s,c)):s.memoizedState!==null?(Zs(),s.child=r.child,s.flags|=128,s=null):(Zs(),Y=m.fallback,k=s.mode,m=Ed({mode:"visible",children:m.children},k),Y=Yo(Y,k,c,null),Y.flags|=2,m.return=s,Y.return=s,m.sibling=Y,s.child=m,na(s,r.child,null,c),m=s.child,m.memoizedState=Tp(c),m.childLanes=Rp(r,z,c),s.memoizedState=Ap,s=Bc(null,m));else if(Xs(s),dm(Y)){if(z=Y.nextSibling&&Y.nextSibling.dataset,z)var de=z.dgst;z=de,m=Error(i(419)),m.stack="",m.digest=z,kc({value:m,source:null,stack:null}),s=Dp(r,s,c)}else if(cn||Qa(r,s,c,!1),z=(c&r.childLanes)!==0,cn||z){if(z=Pt,z!==null&&(m=jn(z,c),m!==0&&m!==re.retryLane))throw re.retryLane=m,Ko(r,m),Jn(z,r,m),kp;um(Y)||Ld(),s=Dp(r,s,c)}else um(Y)?(s.flags|=192,s.child=r.child,s=null):(r=re.treeContext,$t=Lr(Y.nextSibling),Tn=s,Ct=!0,qs=null,jr=!1,r!==null&&v1(s,r),s=Np(s,m.children),s.flags|=4096);return s}return k?(Zs(),Y=m.fallback,k=s.mode,re=r.child,de=re.sibling,m=ns(re,{mode:"hidden",children:m.children}),m.subtreeFlags=re.subtreeFlags&65011712,de!==null?Y=ns(de,Y):(Y=Yo(Y,k,c,null),Y.flags|=2),Y.return=s,m.return=s,m.sibling=Y,s.child=m,Bc(null,m),m=s.child,Y=r.child.memoizedState,Y===null?Y=Tp(c):(k=Y.cachePool,k!==null?(re=an._currentValue,k=k.parent!==re?{parent:re,pool:re}:k):k=w1(),Y={baseLanes:Y.baseLanes|c,cachePool:k}),m.memoizedState=Y,m.childLanes=Rp(r,z,c),s.memoizedState=Ap,Bc(r.child,m)):(Xs(s),c=r.child,r=c.sibling,c=ns(c,{mode:"visible",children:m.children}),c.return=s,c.sibling=null,r!==null&&(z=s.deletions,z===null?(s.deletions=[r],s.flags|=16):z.push(r)),s.child=c,s.memoizedState=null,c)}function Np(r,s){return s=Ed({mode:"visible",children:s},r.mode),s.return=r,r.child=s}function Ed(r,s){return r=ar(22,r,null,s),r.lanes=0,r}function Dp(r,s,c){return na(s,r.child,null,c),r=Np(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function I_(r,s,c){r.lanes|=s;var m=r.alternate;m!==null&&(m.lanes|=s),Gh(r.return,s,c)}function Mp(r,s,c,m,k,R){var z=r.memoizedState;z===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:c,tailMode:k,treeForkCount:R}:(z.isBackwards=s,z.rendering=null,z.renderingStartTime=0,z.last=m,z.tail=c,z.tailMode=k,z.treeForkCount=R)}function B_(r,s,c){var m=s.pendingProps,k=m.revealOrder,R=m.tail;m=m.children;var z=tn.current,Y=(z&2)!==0;if(Y?(z=z&1|2,s.flags|=128):z&=1,P(tn,z),Nn(r,s,m,c),m=Ct?Cc:0,!Y&&r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&I_(r,c,s);else if(r.tag===19)I_(r,c,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(k){case"forwards":for(c=s.child,k=null;c!==null;)r=c.alternate,r!==null&&pd(r)===null&&(k=c),c=c.sibling;c=k,c===null?(k=s.child,s.child=null):(k=c.sibling,c.sibling=null),Mp(s,!1,k,c,R,m);break;case"backwards":case"unstable_legacy-backwards":for(c=null,k=s.child,s.child=null;k!==null;){if(r=k.alternate,r!==null&&pd(r)===null){s.child=k;break}r=k.sibling,k.sibling=c,c=k,k=r}Mp(s,!0,c,null,R,m);break;case"together":Mp(s,!1,null,null,void 0,m);break;default:s.memoizedState=null}return s.child}function ls(r,s,c){if(r!==null&&(s.dependencies=r.dependencies),eo|=s.lanes,(c&s.childLanes)===0)if(r!==null){if(Qa(r,s,c,!1),(c&s.childLanes)===0)return null}else return null;if(r!==null&&s.child!==r.child)throw Error(i(153));if(s.child!==null){for(r=s.child,c=ns(r,r.pendingProps),s.child=c,c.return=s;r.sibling!==null;)r=r.sibling,c=c.sibling=ns(r,r.pendingProps),c.return=s;c.sibling=null}return s.child}function jp(r,s){return(r.lanes&s)!==0?!0:(r=r.dependencies,!!(r!==null&&od(r)))}function ik(r,s,c){switch(s.tag){case 3:q(s,s.stateNode.containerInfo),Gs(s,an,r.memoizedState.cache),Xo();break;case 27:case 5:ie(s);break;case 4:q(s,s.stateNode.containerInfo);break;case 10:Gs(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,ip(s),null;break;case 13:var m=s.memoizedState;if(m!==null)return m.dehydrated!==null?(Xs(s),s.flags|=128,null):(c&s.child.childLanes)!==0?L_(r,s,c):(Xs(s),r=ls(r,s,c),r!==null?r.sibling:null);Xs(s);break;case 19:var k=(r.flags&128)!==0;if(m=(c&s.childLanes)!==0,m||(Qa(r,s,c,!1),m=(c&s.childLanes)!==0),k){if(m)return B_(r,s,c);s.flags|=128}if(k=s.memoizedState,k!==null&&(k.rendering=null,k.tail=null,k.lastEffect=null),P(tn,tn.current),m)break;return null;case 22:return s.lanes=0,R_(r,s,c,s.pendingProps);case 24:Gs(s,an,r.memoizedState.cache)}return ls(r,s,c)}function z_(r,s,c){if(r!==null)if(r.memoizedProps!==s.pendingProps)cn=!0;else{if(!jp(r,c)&&(s.flags&128)===0)return cn=!1,ik(r,s,c);cn=(r.flags&131072)!==0}else cn=!1,Ct&&(s.flags&1048576)!==0&&g1(s,Cc,s.index);switch(s.lanes=0,s.tag){case 16:e:{var m=s.pendingProps;if(r=ea(s.elementType),s.type=r,typeof r=="function")zh(r)?(m=ia(r,m),s.tag=1,s=j_(null,s,r,m,c)):(s.tag=0,s=Ep(null,s,r,m,c));else{if(r!=null){var k=r.$$typeof;if(k===E){s.tag=11,s=E_(null,s,r,m,c);break e}else if(k===M){s.tag=14,s=A_(null,s,r,m,c);break e}}throw s=G(r)||r,Error(i(306,s,""))}}return s;case 0:return Ep(r,s,s.type,s.pendingProps,c);case 1:return m=s.type,k=ia(m,s.pendingProps),j_(r,s,m,k,c);case 3:e:{if(q(s,s.stateNode.containerInfo),r===null)throw Error(i(387));m=s.pendingProps;var R=s.memoizedState;k=R.element,Jh(r,s),Mc(s,m,null,c);var z=s.memoizedState;if(m=z.cache,Gs(s,an,m),m!==R.cache&&Wh(s,[an],c,!0),Dc(),m=z.element,R.isDehydrated)if(R={element:m,isDehydrated:!1,cache:z.cache},s.updateQueue.baseState=R,s.memoizedState=R,s.flags&256){s=O_(r,s,m,c);break e}else if(m!==k){k=Nr(Error(i(424)),s),kc(k),s=O_(r,s,m,c);break e}else{switch(r=s.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for($t=Lr(r.firstChild),Tn=s,Ct=!0,qs=null,jr=!0,c=R1(s,null,m,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling}else{if(Xo(),m===k){s=ls(r,s,c);break e}Nn(r,s,m,c)}s=s.child}return s;case 26:return kd(r,s),r===null?(c=Yy(s.type,null,s.pendingProps,null))?s.memoizedState=c:Ct||(c=s.type,r=s.pendingProps,m=Ud(Q.current).createElement(c),m[Ht]=s,m[Gt]=r,Dn(m,c,r),Yt(m),s.stateNode=m):s.memoizedState=Yy(s.type,r.memoizedProps,s.pendingProps,r.memoizedState),null;case 27:return ie(s),r===null&&Ct&&(m=s.stateNode=Gy(s.type,s.pendingProps,Q.current),Tn=s,jr=!0,k=$t,so(s.type)?(fm=k,$t=Lr(m.firstChild)):$t=k),Nn(r,s,s.pendingProps.children,c),kd(r,s),r===null&&(s.flags|=4194304),s.child;case 5:return r===null&&Ct&&((k=m=$t)&&(m=Ok(m,s.type,s.pendingProps,jr),m!==null?(s.stateNode=m,Tn=s,$t=Lr(m.firstChild),jr=!1,k=!0):k=!1),k||Vs(s)),ie(s),k=s.type,R=s.pendingProps,z=r!==null?r.memoizedProps:null,m=R.children,am(k,R)?m=null:z!==null&&am(k,z)&&(s.flags|=32),s.memoizedState!==null&&(k=op(r,s,Y3,null,null,c),Qc._currentValue=k),kd(r,s),Nn(r,s,m,c),s.child;case 6:return r===null&&Ct&&((r=c=$t)&&(c=Lk(c,s.pendingProps,jr),c!==null?(s.stateNode=c,Tn=s,$t=null,r=!0):r=!1),r||Vs(s)),null;case 13:return L_(r,s,c);case 4:return q(s,s.stateNode.containerInfo),m=s.pendingProps,r===null?s.child=na(s,null,m,c):Nn(r,s,m,c),s.child;case 11:return E_(r,s,s.type,s.pendingProps,c);case 7:return Nn(r,s,s.pendingProps,c),s.child;case 8:return Nn(r,s,s.pendingProps.children,c),s.child;case 12:return Nn(r,s,s.pendingProps.children,c),s.child;case 10:return m=s.pendingProps,Gs(s,s.type,m.value),Nn(r,s,m.children,c),s.child;case 9:return k=s.type._context,m=s.pendingProps.children,Qo(s),k=Rn(k),m=m(k),s.flags|=1,Nn(r,s,m,c),s.child;case 14:return A_(r,s,s.type,s.pendingProps,c);case 15:return T_(r,s,s.type,s.pendingProps,c);case 19:return B_(r,s,c);case 31:return rk(r,s,c);case 22:return R_(r,s,c,s.pendingProps);case 24:return Qo(s),m=Rn(an),r===null?(k=Xh(),k===null&&(k=Pt,R=Kh(),k.pooledCache=R,R.refCount++,R!==null&&(k.pooledCacheLanes|=c),k=R),s.memoizedState={parent:m,cache:k},Qh(s),Gs(s,an,k)):((r.lanes&c)!==0&&(Jh(r,s),Mc(s,null,null,c),Dc()),k=r.memoizedState,R=s.memoizedState,k.parent!==m?(k={parent:m,cache:m},s.memoizedState=k,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=k),Gs(s,an,m)):(m=R.cache,Gs(s,an,m),m!==k.cache&&Wh(s,[an],c,!0))),Nn(r,s,s.pendingProps.children,c),s.child;case 29:throw s.pendingProps}throw Error(i(156,s.tag))}function cs(r){r.flags|=4}function Op(r,s,c,m,k){if((s=(r.mode&32)!==0)&&(s=!1),s){if(r.flags|=16777216,(k&335544128)===k)if(r.stateNode.complete)r.flags|=8192;else if(dy())r.flags|=8192;else throw ta=ud,Zh}else r.flags&=-16777217}function P_(r,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!e0(s))if(dy())r.flags|=8192;else throw ta=ud,Zh}function Ad(r,s){s!==null&&(r.flags|=4),r.flags&16384&&(s=r.tag!==22?en():536870912,r.lanes|=s,ul|=s)}function zc(r,s){if(!Ct)switch(r.tailMode){case"hidden":s=r.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?r.tail=null:c.sibling=null;break;case"collapsed":c=r.tail;for(var m=null;c!==null;)c.alternate!==null&&(m=c),c=c.sibling;m===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:m.sibling=null}}function qt(r){var s=r.alternate!==null&&r.alternate.child===r.child,c=0,m=0;if(s)for(var k=r.child;k!==null;)c|=k.lanes|k.childLanes,m|=k.subtreeFlags&65011712,m|=k.flags&65011712,k.return=r,k=k.sibling;else for(k=r.child;k!==null;)c|=k.lanes|k.childLanes,m|=k.subtreeFlags,m|=k.flags,k.return=r,k=k.sibling;return r.subtreeFlags|=m,r.childLanes=c,s}function sk(r,s,c){var m=s.pendingProps;switch(Uh(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qt(s),null;case 1:return qt(s),null;case 3:return c=s.stateNode,m=null,r!==null&&(m=r.memoizedState.cache),s.memoizedState.cache!==m&&(s.flags|=2048),ss(an),J(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(r===null||r.child===null)&&(Za(s)?cs(s):r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,qh())),qt(s),null;case 26:var k=s.type,R=s.memoizedState;return r===null?(cs(s),R!==null?(qt(s),P_(s,R)):(qt(s),Op(s,k,null,m,c))):R?R!==r.memoizedState?(cs(s),qt(s),P_(s,R)):(qt(s),s.flags&=-16777217):(r=r.memoizedProps,r!==m&&cs(s),qt(s),Op(s,k,r,m,c)),null;case 27:if(ce(s),c=Q.current,k=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==m&&cs(s);else{if(!m){if(s.stateNode===null)throw Error(i(166));return qt(s),null}r=ee.current,Za(s)?_1(s):(r=Gy(k,m,c),s.stateNode=r,cs(s))}return qt(s),null;case 5:if(ce(s),k=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==m&&cs(s);else{if(!m){if(s.stateNode===null)throw Error(i(166));return qt(s),null}if(R=ee.current,Za(s))_1(s);else{var z=Ud(Q.current);switch(R){case 1:R=z.createElementNS("http://www.w3.org/2000/svg",k);break;case 2:R=z.createElementNS("http://www.w3.org/1998/Math/MathML",k);break;default:switch(k){case"svg":R=z.createElementNS("http://www.w3.org/2000/svg",k);break;case"math":R=z.createElementNS("http://www.w3.org/1998/Math/MathML",k);break;case"script":R=z.createElement("div"),R.innerHTML="<script><\/script>",R=R.removeChild(R.firstChild);break;case"select":R=typeof m.is=="string"?z.createElement("select",{is:m.is}):z.createElement("select"),m.multiple?R.multiple=!0:m.size&&(R.size=m.size);break;default:R=typeof m.is=="string"?z.createElement(k,{is:m.is}):z.createElement(k)}}R[Ht]=s,R[Gt]=m;e:for(z=s.child;z!==null;){if(z.tag===5||z.tag===6)R.appendChild(z.stateNode);else if(z.tag!==4&&z.tag!==27&&z.child!==null){z.child.return=z,z=z.child;continue}if(z===s)break e;for(;z.sibling===null;){if(z.return===null||z.return===s)break e;z=z.return}z.sibling.return=z.return,z=z.sibling}s.stateNode=R;e:switch(Dn(R,k,m),k){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&cs(s)}}return qt(s),Op(s,s.type,r===null?null:r.memoizedProps,s.pendingProps,c),null;case 6:if(r&&s.stateNode!=null)r.memoizedProps!==m&&cs(s);else{if(typeof m!="string"&&s.stateNode===null)throw Error(i(166));if(r=Q.current,Za(s)){if(r=s.stateNode,c=s.memoizedProps,m=null,k=Tn,k!==null)switch(k.tag){case 27:case 5:m=k.memoizedProps}r[Ht]=s,r=!!(r.nodeValue===c||m!==null&&m.suppressHydrationWarning===!0||Ly(r.nodeValue,c)),r||Vs(s,!0)}else r=Ud(r).createTextNode(m),r[Ht]=s,s.stateNode=r}return qt(s),null;case 31:if(c=s.memoizedState,r===null||r.memoizedState!==null){if(m=Za(s),c!==null){if(r===null){if(!m)throw Error(i(318));if(r=s.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(557));r[Ht]=s}else Xo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;qt(s),r=!1}else c=qh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=c),r=!0;if(!r)return s.flags&256?(cr(s),s):(cr(s),null);if((s.flags&128)!==0)throw Error(i(558))}return qt(s),null;case 13:if(m=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(k=Za(s),m!==null&&m.dehydrated!==null){if(r===null){if(!k)throw Error(i(318));if(k=s.memoizedState,k=k!==null?k.dehydrated:null,!k)throw Error(i(317));k[Ht]=s}else Xo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;qt(s),k=!1}else k=qh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=k),k=!0;if(!k)return s.flags&256?(cr(s),s):(cr(s),null)}return cr(s),(s.flags&128)!==0?(s.lanes=c,s):(c=m!==null,r=r!==null&&r.memoizedState!==null,c&&(m=s.child,k=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(k=m.alternate.memoizedState.cachePool.pool),R=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(R=m.memoizedState.cachePool.pool),R!==k&&(m.flags|=2048)),c!==r&&c&&(s.child.flags|=8192),Ad(s,s.updateQueue),qt(s),null);case 4:return J(),r===null&&nm(s.stateNode.containerInfo),qt(s),null;case 10:return ss(s.type),qt(s),null;case 19:if(H(tn),m=s.memoizedState,m===null)return qt(s),null;if(k=(s.flags&128)!==0,R=m.rendering,R===null)if(k)zc(m,!1);else{if(Qt!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(R=pd(r),R!==null){for(s.flags|=128,zc(m,!1),r=R.updateQueue,s.updateQueue=r,Ad(s,r),s.subtreeFlags=0,r=c,c=s.child;c!==null;)h1(c,r),c=c.sibling;return P(tn,tn.current&1|2),Ct&&rs(s,m.treeForkCount),s.child}r=r.sibling}m.tail!==null&&Je()>Md&&(s.flags|=128,k=!0,zc(m,!1),s.lanes=4194304)}else{if(!k)if(r=pd(R),r!==null){if(s.flags|=128,k=!0,r=r.updateQueue,s.updateQueue=r,Ad(s,r),zc(m,!0),m.tail===null&&m.tailMode==="hidden"&&!R.alternate&&!Ct)return qt(s),null}else 2*Je()-m.renderingStartTime>Md&&c!==536870912&&(s.flags|=128,k=!0,zc(m,!1),s.lanes=4194304);m.isBackwards?(R.sibling=s.child,s.child=R):(r=m.last,r!==null?r.sibling=R:s.child=R,m.last=R)}return m.tail!==null?(r=m.tail,m.rendering=r,m.tail=r.sibling,m.renderingStartTime=Je(),r.sibling=null,c=tn.current,P(tn,k?c&1|2:c&1),Ct&&rs(s,m.treeForkCount),r):(qt(s),null);case 22:case 23:return cr(s),rp(),m=s.memoizedState!==null,r!==null?r.memoizedState!==null!==m&&(s.flags|=8192):m&&(s.flags|=8192),m?(c&536870912)!==0&&(s.flags&128)===0&&(qt(s),s.subtreeFlags&6&&(s.flags|=8192)):qt(s),c=s.updateQueue,c!==null&&Ad(s,c.retryQueue),c=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),m=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),m!==c&&(s.flags|=2048),r!==null&&H(Jo),null;case 24:return c=null,r!==null&&(c=r.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),ss(an),qt(s),null;case 25:return null;case 30:return null}throw Error(i(156,s.tag))}function ok(r,s){switch(Uh(s),s.tag){case 1:return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return ss(an),J(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 26:case 27:case 5:return ce(s),null;case 31:if(s.memoizedState!==null){if(cr(s),s.alternate===null)throw Error(i(340));Xo()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 13:if(cr(s),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(i(340));Xo()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return H(tn),null;case 4:return J(),null;case 10:return ss(s.type),null;case 22:case 23:return cr(s),rp(),r!==null&&H(Jo),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 24:return ss(an),null;case 25:return null;default:return null}}function F_(r,s){switch(Uh(s),s.tag){case 3:ss(an),J();break;case 26:case 27:case 5:ce(s);break;case 4:J();break;case 31:s.memoizedState!==null&&cr(s);break;case 13:cr(s);break;case 19:H(tn);break;case 10:ss(s.type);break;case 22:case 23:cr(s),rp(),r!==null&&H(Jo);break;case 24:ss(an)}}function Pc(r,s){try{var c=s.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var k=m.next;c=k;do{if((c.tag&r)===r){m=void 0;var R=c.create,z=c.inst;m=R(),z.destroy=m}c=c.next}while(c!==k)}}catch(Y){jt(s,s.return,Y)}}function Qs(r,s,c){try{var m=s.updateQueue,k=m!==null?m.lastEffect:null;if(k!==null){var R=k.next;m=R;do{if((m.tag&r)===r){var z=m.inst,Y=z.destroy;if(Y!==void 0){z.destroy=void 0,k=s;var re=c,de=Y;try{de()}catch(ve){jt(k,re,ve)}}}m=m.next}while(m!==R)}}catch(ve){jt(s,s.return,ve)}}function H_(r){var s=r.updateQueue;if(s!==null){var c=r.stateNode;try{D1(s,c)}catch(m){jt(r,r.return,m)}}}function U_(r,s,c){c.props=ia(r.type,r.memoizedProps),c.state=r.memoizedState;try{c.componentWillUnmount()}catch(m){jt(r,s,m)}}function Fc(r,s){try{var c=r.ref;if(c!==null){switch(r.tag){case 26:case 27:case 5:var m=r.stateNode;break;case 30:m=r.stateNode;break;default:m=r.stateNode}typeof c=="function"?r.refCleanup=c(m):c.current=m}}catch(k){jt(r,s,k)}}function Si(r,s){var c=r.ref,m=r.refCleanup;if(c!==null)if(typeof m=="function")try{m()}catch(k){jt(r,s,k)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(k){jt(r,s,k)}else c.current=null}function $_(r){var s=r.type,c=r.memoizedProps,m=r.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":c.autoFocus&&m.focus();break e;case"img":c.src?m.src=c.src:c.srcSet&&(m.srcset=c.srcSet)}}catch(k){jt(r,r.return,k)}}function Lp(r,s,c){try{var m=r.stateNode;Tk(m,r.type,c,s),m[Gt]=s}catch(k){jt(r,r.return,k)}}function q_(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&so(r.type)||r.tag===4}function Ip(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||q_(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&so(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Bp(r,s,c){var m=r.tag;if(m===5||m===6)r=r.stateNode,s?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(r,s):(s=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,s.appendChild(r),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=Vn));else if(m!==4&&(m===27&&so(r.type)&&(c=r.stateNode,s=null),r=r.child,r!==null))for(Bp(r,s,c),r=r.sibling;r!==null;)Bp(r,s,c),r=r.sibling}function Td(r,s,c){var m=r.tag;if(m===5||m===6)r=r.stateNode,s?c.insertBefore(r,s):c.appendChild(r);else if(m!==4&&(m===27&&so(r.type)&&(c=r.stateNode),r=r.child,r!==null))for(Td(r,s,c),r=r.sibling;r!==null;)Td(r,s,c),r=r.sibling}function V_(r){var s=r.stateNode,c=r.memoizedProps;try{for(var m=r.type,k=s.attributes;k.length;)s.removeAttributeNode(k[0]);Dn(s,m,c),s[Ht]=r,s[Gt]=c}catch(R){jt(r,r.return,R)}}var us=!1,un=!1,zp=!1,G_=typeof WeakSet=="function"?WeakSet:Set,Sn=null;function ak(r,s){if(r=r.containerInfo,sm=Yd,r=fn(r),hn(r)){if("selectionStart"in r)var c={start:r.selectionStart,end:r.selectionEnd};else e:{c=(c=r.ownerDocument)&&c.defaultView||window;var m=c.getSelection&&c.getSelection();if(m&&m.rangeCount!==0){c=m.anchorNode;var k=m.anchorOffset,R=m.focusNode;m=m.focusOffset;try{c.nodeType,R.nodeType}catch{c=null;break e}var z=0,Y=-1,re=-1,de=0,ve=0,be=r,he=null;t:for(;;){for(var pe;be!==c||k!==0&&be.nodeType!==3||(Y=z+k),be!==R||m!==0&&be.nodeType!==3||(re=z+m),be.nodeType===3&&(z+=be.nodeValue.length),(pe=be.firstChild)!==null;)he=be,be=pe;for(;;){if(be===r)break t;if(he===c&&++de===k&&(Y=z),he===R&&++ve===m&&(re=z),(pe=be.nextSibling)!==null)break;be=he,he=be.parentNode}be=pe}c=Y===-1||re===-1?null:{start:Y,end:re}}else c=null}c=c||{start:0,end:0}}else c=null;for(om={focusedElem:r,selectionRange:c},Yd=!1,Sn=s;Sn!==null;)if(s=Sn,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,Sn=r;else for(;Sn!==null;){switch(s=Sn,R=s.alternate,r=s.flags,s.tag){case 0:if((r&4)!==0&&(r=s.updateQueue,r=r!==null?r.events:null,r!==null))for(c=0;c<r.length;c++)k=r[c],k.ref.impl=k.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&R!==null){r=void 0,c=s,k=R.memoizedProps,R=R.memoizedState,m=c.stateNode;try{var Fe=ia(c.type,k);r=m.getSnapshotBeforeUpdate(Fe,R),m.__reactInternalSnapshotBeforeUpdate=r}catch(tt){jt(c,c.return,tt)}}break;case 3:if((r&1024)!==0){if(r=s.stateNode.containerInfo,c=r.nodeType,c===9)cm(r);else if(c===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":cm(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(i(163))}if(r=s.sibling,r!==null){r.return=s.return,Sn=r;break}Sn=s.return}}function W_(r,s,c){var m=c.flags;switch(c.tag){case 0:case 11:case 15:fs(r,c),m&4&&Pc(5,c);break;case 1:if(fs(r,c),m&4)if(r=c.stateNode,s===null)try{r.componentDidMount()}catch(z){jt(c,c.return,z)}else{var k=ia(c.type,s.memoizedProps);s=s.memoizedState;try{r.componentDidUpdate(k,s,r.__reactInternalSnapshotBeforeUpdate)}catch(z){jt(c,c.return,z)}}m&64&&H_(c),m&512&&Fc(c,c.return);break;case 3:if(fs(r,c),m&64&&(r=c.updateQueue,r!==null)){if(s=null,c.child!==null)switch(c.child.tag){case 27:case 5:s=c.child.stateNode;break;case 1:s=c.child.stateNode}try{D1(r,s)}catch(z){jt(c,c.return,z)}}break;case 27:s===null&&m&4&&V_(c);case 26:case 5:fs(r,c),s===null&&m&4&&$_(c),m&512&&Fc(c,c.return);break;case 12:fs(r,c);break;case 31:fs(r,c),m&4&&X_(r,c);break;case 13:fs(r,c),m&4&&Z_(r,c),m&64&&(r=c.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(c=gk.bind(null,c),Ik(r,c))));break;case 22:if(m=c.memoizedState!==null||us,!m){s=s!==null&&s.memoizedState!==null||un,k=us;var R=un;us=m,(un=s)&&!R?hs(r,c,(c.subtreeFlags&8772)!==0):fs(r,c),us=k,un=R}break;case 30:break;default:fs(r,c)}}function K_(r){var s=r.alternate;s!==null&&(r.alternate=null,K_(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&We(s)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var Kt=null,Yn=!1;function ds(r,s,c){for(c=c.child;c!==null;)Y_(r,s,c),c=c.sibling}function Y_(r,s,c){if(Ie&&typeof Ie.onCommitFiberUnmount=="function")try{Ie.onCommitFiberUnmount(Ze,c)}catch{}switch(c.tag){case 26:un||Si(c,s),ds(r,s,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:un||Si(c,s);var m=Kt,k=Yn;so(c.type)&&(Kt=c.stateNode,Yn=!1),ds(r,s,c),Yc(c.stateNode),Kt=m,Yn=k;break;case 5:un||Si(c,s);case 6:if(m=Kt,k=Yn,Kt=null,ds(r,s,c),Kt=m,Yn=k,Kt!==null)if(Yn)try{(Kt.nodeType===9?Kt.body:Kt.nodeName==="HTML"?Kt.ownerDocument.body:Kt).removeChild(c.stateNode)}catch(R){jt(c,s,R)}else try{Kt.removeChild(c.stateNode)}catch(R){jt(c,s,R)}break;case 18:Kt!==null&&(Yn?(r=Kt,Hy(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,c.stateNode),_l(r)):Hy(Kt,c.stateNode));break;case 4:m=Kt,k=Yn,Kt=c.stateNode.containerInfo,Yn=!0,ds(r,s,c),Kt=m,Yn=k;break;case 0:case 11:case 14:case 15:Qs(2,c,s),un||Qs(4,c,s),ds(r,s,c);break;case 1:un||(Si(c,s),m=c.stateNode,typeof m.componentWillUnmount=="function"&&U_(c,s,m)),ds(r,s,c);break;case 21:ds(r,s,c);break;case 22:un=(m=un)||c.memoizedState!==null,ds(r,s,c),un=m;break;default:ds(r,s,c)}}function X_(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{_l(r)}catch(c){jt(s,s.return,c)}}}function Z_(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{_l(r)}catch(c){jt(s,s.return,c)}}function lk(r){switch(r.tag){case 31:case 13:case 19:var s=r.stateNode;return s===null&&(s=r.stateNode=new G_),s;case 22:return r=r.stateNode,s=r._retryCache,s===null&&(s=r._retryCache=new G_),s;default:throw Error(i(435,r.tag))}}function Rd(r,s){var c=lk(r);s.forEach(function(m){if(!c.has(m)){c.add(m);var k=vk.bind(null,r,m);m.then(k,k)}})}function Xn(r,s){var c=s.deletions;if(c!==null)for(var m=0;m<c.length;m++){var k=c[m],R=r,z=s,Y=z;e:for(;Y!==null;){switch(Y.tag){case 27:if(so(Y.type)){Kt=Y.stateNode,Yn=!1;break e}break;case 5:Kt=Y.stateNode,Yn=!1;break e;case 3:case 4:Kt=Y.stateNode.containerInfo,Yn=!0;break e}Y=Y.return}if(Kt===null)throw Error(i(160));Y_(R,z,k),Kt=null,Yn=!1,R=k.alternate,R!==null&&(R.return=null),k.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)Q_(s,r),s=s.sibling}var ti=null;function Q_(r,s){var c=r.alternate,m=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Xn(s,r),Zn(r),m&4&&(Qs(3,r,r.return),Pc(3,r),Qs(5,r,r.return));break;case 1:Xn(s,r),Zn(r),m&512&&(un||c===null||Si(c,c.return)),m&64&&us&&(r=r.updateQueue,r!==null&&(m=r.callbacks,m!==null&&(c=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=c===null?m:c.concat(m))));break;case 26:var k=ti;if(Xn(s,r),Zn(r),m&512&&(un||c===null||Si(c,c.return)),m&4){var R=c!==null?c.memoizedState:null;if(m=r.memoizedState,c===null)if(m===null)if(r.stateNode===null){e:{m=r.type,c=r.memoizedProps,k=k.ownerDocument||k;t:switch(m){case"title":R=k.getElementsByTagName("title")[0],(!R||R[Ke]||R[Ht]||R.namespaceURI==="http://www.w3.org/2000/svg"||R.hasAttribute("itemprop"))&&(R=k.createElement(m),k.head.insertBefore(R,k.querySelector("head > title"))),Dn(R,m,c),R[Ht]=r,Yt(R),m=R;break e;case"link":var z=Qy("link","href",k).get(m+(c.href||""));if(z){for(var Y=0;Y<z.length;Y++)if(R=z[Y],R.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&R.getAttribute("rel")===(c.rel==null?null:c.rel)&&R.getAttribute("title")===(c.title==null?null:c.title)&&R.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){z.splice(Y,1);break t}}R=k.createElement(m),Dn(R,m,c),k.head.appendChild(R);break;case"meta":if(z=Qy("meta","content",k).get(m+(c.content||""))){for(Y=0;Y<z.length;Y++)if(R=z[Y],R.getAttribute("content")===(c.content==null?null:""+c.content)&&R.getAttribute("name")===(c.name==null?null:c.name)&&R.getAttribute("property")===(c.property==null?null:c.property)&&R.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&R.getAttribute("charset")===(c.charSet==null?null:c.charSet)){z.splice(Y,1);break t}}R=k.createElement(m),Dn(R,m,c),k.head.appendChild(R);break;default:throw Error(i(468,m))}R[Ht]=r,Yt(R),m=R}r.stateNode=m}else Jy(k,r.type,r.stateNode);else r.stateNode=Zy(k,m,r.memoizedProps);else R!==m?(R===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):R.count--,m===null?Jy(k,r.type,r.stateNode):Zy(k,m,r.memoizedProps)):m===null&&r.stateNode!==null&&Lp(r,r.memoizedProps,c.memoizedProps)}break;case 27:Xn(s,r),Zn(r),m&512&&(un||c===null||Si(c,c.return)),c!==null&&m&4&&Lp(r,r.memoizedProps,c.memoizedProps);break;case 5:if(Xn(s,r),Zn(r),m&512&&(un||c===null||Si(c,c.return)),r.flags&32){k=r.stateNode;try{Yr(k,"")}catch(Fe){jt(r,r.return,Fe)}}m&4&&r.stateNode!=null&&(k=r.memoizedProps,Lp(r,k,c!==null?c.memoizedProps:k)),m&1024&&(zp=!0);break;case 6:if(Xn(s,r),Zn(r),m&4){if(r.stateNode===null)throw Error(i(162));m=r.memoizedProps,c=r.stateNode;try{c.nodeValue=m}catch(Fe){jt(r,r.return,Fe)}}break;case 3:if(Vd=null,k=ti,ti=$d(s.containerInfo),Xn(s,r),ti=k,Zn(r),m&4&&c!==null&&c.memoizedState.isDehydrated)try{_l(s.containerInfo)}catch(Fe){jt(r,r.return,Fe)}zp&&(zp=!1,J_(r));break;case 4:m=ti,ti=$d(r.stateNode.containerInfo),Xn(s,r),Zn(r),ti=m;break;case 12:Xn(s,r),Zn(r);break;case 31:Xn(s,r),Zn(r),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Rd(r,m)));break;case 13:Xn(s,r),Zn(r),r.child.flags&8192&&r.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(Dd=Je()),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Rd(r,m)));break;case 22:k=r.memoizedState!==null;var re=c!==null&&c.memoizedState!==null,de=us,ve=un;if(us=de||k,un=ve||re,Xn(s,r),un=ve,us=de,Zn(r),m&8192)e:for(s=r.stateNode,s._visibility=k?s._visibility&-2:s._visibility|1,k&&(c===null||re||us||un||sa(r)),c=null,s=r;;){if(s.tag===5||s.tag===26){if(c===null){re=c=s;try{if(R=re.stateNode,k)z=R.style,typeof z.setProperty=="function"?z.setProperty("display","none","important"):z.display="none";else{Y=re.stateNode;var be=re.memoizedProps.style,he=be!=null&&be.hasOwnProperty("display")?be.display:null;Y.style.display=he==null||typeof he=="boolean"?"":(""+he).trim()}}catch(Fe){jt(re,re.return,Fe)}}}else if(s.tag===6){if(c===null){re=s;try{re.stateNode.nodeValue=k?"":re.memoizedProps}catch(Fe){jt(re,re.return,Fe)}}}else if(s.tag===18){if(c===null){re=s;try{var pe=re.stateNode;k?Uy(pe,!0):Uy(re.stateNode,!1)}catch(Fe){jt(re,re.return,Fe)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===r)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break e;for(;s.sibling===null;){if(s.return===null||s.return===r)break e;c===s&&(c=null),s=s.return}c===s&&(c=null),s.sibling.return=s.return,s=s.sibling}m&4&&(m=r.updateQueue,m!==null&&(c=m.retryQueue,c!==null&&(m.retryQueue=null,Rd(r,c))));break;case 19:Xn(s,r),Zn(r),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Rd(r,m)));break;case 30:break;case 21:break;default:Xn(s,r),Zn(r)}}function Zn(r){var s=r.flags;if(s&2){try{for(var c,m=r.return;m!==null;){if(q_(m)){c=m;break}m=m.return}if(c==null)throw Error(i(160));switch(c.tag){case 27:var k=c.stateNode,R=Ip(r);Td(r,R,k);break;case 5:var z=c.stateNode;c.flags&32&&(Yr(z,""),c.flags&=-33);var Y=Ip(r);Td(r,Y,z);break;case 3:case 4:var re=c.stateNode.containerInfo,de=Ip(r);Bp(r,de,re);break;default:throw Error(i(161))}}catch(ve){jt(r,r.return,ve)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function J_(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var s=r;J_(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),r=r.sibling}}function fs(r,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)W_(r,s.alternate,s),s=s.sibling}function sa(r){for(r=r.child;r!==null;){var s=r;switch(s.tag){case 0:case 11:case 14:case 15:Qs(4,s,s.return),sa(s);break;case 1:Si(s,s.return);var c=s.stateNode;typeof c.componentWillUnmount=="function"&&U_(s,s.return,c),sa(s);break;case 27:Yc(s.stateNode);case 26:case 5:Si(s,s.return),sa(s);break;case 22:s.memoizedState===null&&sa(s);break;case 30:sa(s);break;default:sa(s)}r=r.sibling}}function hs(r,s,c){for(c=c&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var m=s.alternate,k=r,R=s,z=R.flags;switch(R.tag){case 0:case 11:case 15:hs(k,R,c),Pc(4,R);break;case 1:if(hs(k,R,c),m=R,k=m.stateNode,typeof k.componentDidMount=="function")try{k.componentDidMount()}catch(de){jt(m,m.return,de)}if(m=R,k=m.updateQueue,k!==null){var Y=m.stateNode;try{var re=k.shared.hiddenCallbacks;if(re!==null)for(k.shared.hiddenCallbacks=null,k=0;k<re.length;k++)N1(re[k],Y)}catch(de){jt(m,m.return,de)}}c&&z&64&&H_(R),Fc(R,R.return);break;case 27:V_(R);case 26:case 5:hs(k,R,c),c&&m===null&&z&4&&$_(R),Fc(R,R.return);break;case 12:hs(k,R,c);break;case 31:hs(k,R,c),c&&z&4&&X_(k,R);break;case 13:hs(k,R,c),c&&z&4&&Z_(k,R);break;case 22:R.memoizedState===null&&hs(k,R,c),Fc(R,R.return);break;case 30:break;default:hs(k,R,c)}s=s.sibling}}function Pp(r,s){var c=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),r=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(r=s.memoizedState.cachePool.pool),r!==c&&(r!=null&&r.refCount++,c!=null&&Ec(c))}function Fp(r,s){r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&Ec(r))}function ni(r,s,c,m){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)ey(r,s,c,m),s=s.sibling}function ey(r,s,c,m){var k=s.flags;switch(s.tag){case 0:case 11:case 15:ni(r,s,c,m),k&2048&&Pc(9,s);break;case 1:ni(r,s,c,m);break;case 3:ni(r,s,c,m),k&2048&&(r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&Ec(r)));break;case 12:if(k&2048){ni(r,s,c,m),r=s.stateNode;try{var R=s.memoizedProps,z=R.id,Y=R.onPostCommit;typeof Y=="function"&&Y(z,s.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(re){jt(s,s.return,re)}}else ni(r,s,c,m);break;case 31:ni(r,s,c,m);break;case 13:ni(r,s,c,m);break;case 23:break;case 22:R=s.stateNode,z=s.alternate,s.memoizedState!==null?R._visibility&2?ni(r,s,c,m):Hc(r,s):R._visibility&2?ni(r,s,c,m):(R._visibility|=2,al(r,s,c,m,(s.subtreeFlags&10256)!==0||!1)),k&2048&&Pp(z,s);break;case 24:ni(r,s,c,m),k&2048&&Fp(s.alternate,s);break;default:ni(r,s,c,m)}}function al(r,s,c,m,k){for(k=k&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var R=r,z=s,Y=c,re=m,de=z.flags;switch(z.tag){case 0:case 11:case 15:al(R,z,Y,re,k),Pc(8,z);break;case 23:break;case 22:var ve=z.stateNode;z.memoizedState!==null?ve._visibility&2?al(R,z,Y,re,k):Hc(R,z):(ve._visibility|=2,al(R,z,Y,re,k)),k&&de&2048&&Pp(z.alternate,z);break;case 24:al(R,z,Y,re,k),k&&de&2048&&Fp(z.alternate,z);break;default:al(R,z,Y,re,k)}s=s.sibling}}function Hc(r,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var c=r,m=s,k=m.flags;switch(m.tag){case 22:Hc(c,m),k&2048&&Pp(m.alternate,m);break;case 24:Hc(c,m),k&2048&&Fp(m.alternate,m);break;default:Hc(c,m)}s=s.sibling}}var Uc=8192;function ll(r,s,c){if(r.subtreeFlags&Uc)for(r=r.child;r!==null;)ty(r,s,c),r=r.sibling}function ty(r,s,c){switch(r.tag){case 26:ll(r,s,c),r.flags&Uc&&r.memoizedState!==null&&Kk(c,ti,r.memoizedState,r.memoizedProps);break;case 5:ll(r,s,c);break;case 3:case 4:var m=ti;ti=$d(r.stateNode.containerInfo),ll(r,s,c),ti=m;break;case 22:r.memoizedState===null&&(m=r.alternate,m!==null&&m.memoizedState!==null?(m=Uc,Uc=16777216,ll(r,s,c),Uc=m):ll(r,s,c));break;default:ll(r,s,c)}}function ny(r){var s=r.alternate;if(s!==null&&(r=s.child,r!==null)){s.child=null;do s=r.sibling,r.sibling=null,r=s;while(r!==null)}}function $c(r){var s=r.deletions;if((r.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var m=s[c];Sn=m,iy(m,r)}ny(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)ry(r),r=r.sibling}function ry(r){switch(r.tag){case 0:case 11:case 15:$c(r),r.flags&2048&&Qs(9,r,r.return);break;case 3:$c(r);break;case 12:$c(r);break;case 22:var s=r.stateNode;r.memoizedState!==null&&s._visibility&2&&(r.return===null||r.return.tag!==13)?(s._visibility&=-3,Nd(r)):$c(r);break;default:$c(r)}}function Nd(r){var s=r.deletions;if((r.flags&16)!==0){if(s!==null)for(var c=0;c<s.length;c++){var m=s[c];Sn=m,iy(m,r)}ny(r)}for(r=r.child;r!==null;){switch(s=r,s.tag){case 0:case 11:case 15:Qs(8,s,s.return),Nd(s);break;case 22:c=s.stateNode,c._visibility&2&&(c._visibility&=-3,Nd(s));break;default:Nd(s)}r=r.sibling}}function iy(r,s){for(;Sn!==null;){var c=Sn;switch(c.tag){case 0:case 11:case 15:Qs(8,c,s);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var m=c.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:Ec(c.memoizedState.cache)}if(m=c.child,m!==null)m.return=c,Sn=m;else e:for(c=r;Sn!==null;){m=Sn;var k=m.sibling,R=m.return;if(K_(m),m===c){Sn=null;break e}if(k!==null){k.return=R,Sn=k;break e}Sn=R}}}var ck={getCacheForType:function(r){var s=Rn(an),c=s.data.get(r);return c===void 0&&(c=r(),s.data.set(r,c)),c},cacheSignal:function(){return Rn(an).controller.signal}},uk=typeof WeakMap=="function"?WeakMap:Map,Rt=0,Pt=null,yt=null,St=0,Mt=0,ur=null,Js=!1,cl=!1,Hp=!1,ps=0,Qt=0,eo=0,oa=0,Up=0,dr=0,ul=0,qc=null,Qn=null,$p=!1,Dd=0,sy=0,Md=1/0,jd=null,to=null,pn=0,no=null,dl=null,ms=0,qp=0,Vp=null,oy=null,Vc=0,Gp=null;function fr(){return(Rt&2)!==0&&St!==0?St&-St:V.T!==null?Qp():Ur()}function ay(){if(dr===0)if((St&536870912)===0||Ct){var r=Ot;Ot<<=1,(Ot&3932160)===0&&(Ot=262144),dr=r}else dr=536870912;return r=lr.current,r!==null&&(r.flags|=32),dr}function Jn(r,s,c){(r===Pt&&(Mt===2||Mt===9)||r.cancelPendingCommit!==null)&&(fl(r,0),ro(r,St,dr,!1)),rn(r,c),((Rt&2)===0||r!==Pt)&&(r===Pt&&((Rt&2)===0&&(oa|=c),Qt===4&&ro(r,St,dr,!1)),wi(r))}function ly(r,s,c){if((Rt&6)!==0)throw Error(i(327));var m=!c&&(s&127)===0&&(s&r.expiredLanes)===0||Vt(r,s),k=m?hk(r,s):Kp(r,s,!0),R=m;do{if(k===0){cl&&!m&&ro(r,s,0,!1);break}else{if(c=r.current.alternate,R&&!dk(c)){k=Kp(r,s,!1),R=!1;continue}if(k===2){if(R=s,r.errorRecoveryDisabledLanes&R)var z=0;else z=r.pendingLanes&-536870913,z=z!==0?z:z&536870912?536870912:0;if(z!==0){s=z;e:{var Y=r;k=qc;var re=Y.current.memoizedState.isDehydrated;if(re&&(fl(Y,z).flags|=256),z=Kp(Y,z,!1),z!==2){if(Hp&&!re){Y.errorRecoveryDisabledLanes|=R,oa|=R,k=4;break e}R=Qn,Qn=k,R!==null&&(Qn===null?Qn=R:Qn.push.apply(Qn,R))}k=z}if(R=!1,k!==2)continue}}if(k===1){fl(r,0),ro(r,s,0,!0);break}e:{switch(m=r,R=k,R){case 0:case 1:throw Error(i(345));case 4:if((s&4194048)!==s)break;case 6:ro(m,s,dr,!Js);break e;case 2:Qn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((s&62914560)===s&&(k=Dd+300-Je(),10<k)){if(ro(m,s,dr,!Js),vn(m,0,!0)!==0)break e;ms=s,m.timeoutHandle=Py(cy.bind(null,m,c,Qn,jd,$p,s,dr,oa,ul,Js,R,"Throttled",-0,0),k);break e}cy(m,c,Qn,jd,$p,s,dr,oa,ul,Js,R,null,-0,0)}}break}while(!0);wi(r)}function cy(r,s,c,m,k,R,z,Y,re,de,ve,be,he,pe){if(r.timeoutHandle=-1,be=s.subtreeFlags,be&8192||(be&16785408)===16785408){be={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vn},ty(s,R,be);var Fe=(R&62914560)===R?Dd-Je():(R&4194048)===R?sy-Je():0;if(Fe=Yk(be,Fe),Fe!==null){ms=R,r.cancelPendingCommit=Fe(vy.bind(null,r,s,R,c,m,k,z,Y,re,ve,be,null,he,pe)),ro(r,R,z,!de);return}}vy(r,s,R,c,m,k,z,Y,re)}function dk(r){for(var s=r;;){var c=s.tag;if((c===0||c===11||c===15)&&s.flags&16384&&(c=s.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var m=0;m<c.length;m++){var k=c[m],R=k.getSnapshot;k=k.value;try{if(!et(R(),k))return!1}catch{return!1}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function ro(r,s,c,m){s&=~Up,s&=~oa,r.suspendedLanes|=s,r.pingedLanes&=~s,m&&(r.warmLanes|=s),m=r.expirationTimes;for(var k=s;0<k;){var R=31-Ce(k),z=1<<R;m[R]=-1,k&=~z}c!==0&&nr(r,c,s)}function Od(){return(Rt&6)===0?(Gc(0),!1):!0}function Wp(){if(yt!==null){if(Mt===0)var r=yt.return;else r=yt,is=Zo=null,cp(r),nl=null,Tc=0,r=yt;for(;r!==null;)F_(r.alternate,r),r=r.return;yt=null}}function fl(r,s){var c=r.timeoutHandle;c!==-1&&(r.timeoutHandle=-1,Dk(c)),c=r.cancelPendingCommit,c!==null&&(r.cancelPendingCommit=null,c()),ms=0,Wp(),Pt=r,yt=c=ns(r.current,null),St=s,Mt=0,ur=null,Js=!1,cl=Vt(r,s),Hp=!1,ul=dr=Up=oa=eo=Qt=0,Qn=qc=null,$p=!1,(s&8)!==0&&(s|=s&32);var m=r.entangledLanes;if(m!==0)for(r=r.entanglements,m&=s;0<m;){var k=31-Ce(m),R=1<<k;s|=r[k],m&=~R}return ps=s,td(),c}function uy(r,s){ht=null,V.H=Ic,s===tl||s===cd?(s=E1(),Mt=3):s===Zh?(s=E1(),Mt=4):Mt=s===kp?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,ur=s,yt===null&&(Qt=1,wd(r,Nr(s,r.current)))}function dy(){var r=lr.current;return r===null?!0:(St&4194048)===St?Or===null:(St&62914560)===St||(St&536870912)!==0?r===Or:!1}function fy(){var r=V.H;return V.H=Ic,r===null?Ic:r}function hy(){var r=V.A;return V.A=ck,r}function Ld(){Qt=4,Js||(St&4194048)!==St&&lr.current!==null||(cl=!0),(eo&134217727)===0&&(oa&134217727)===0||Pt===null||ro(Pt,St,dr,!1)}function Kp(r,s,c){var m=Rt;Rt|=2;var k=fy(),R=hy();(Pt!==r||St!==s)&&(jd=null,fl(r,s)),s=!1;var z=Qt;e:do try{if(Mt!==0&&yt!==null){var Y=yt,re=ur;switch(Mt){case 8:Wp(),z=6;break e;case 3:case 2:case 9:case 6:lr.current===null&&(s=!0);var de=Mt;if(Mt=0,ur=null,hl(r,Y,re,de),c&&cl){z=0;break e}break;default:de=Mt,Mt=0,ur=null,hl(r,Y,re,de)}}fk(),z=Qt;break}catch(ve){uy(r,ve)}while(!0);return s&&r.shellSuspendCounter++,is=Zo=null,Rt=m,V.H=k,V.A=R,yt===null&&(Pt=null,St=0,td()),z}function fk(){for(;yt!==null;)py(yt)}function hk(r,s){var c=Rt;Rt|=2;var m=fy(),k=hy();Pt!==r||St!==s?(jd=null,Md=Je()+500,fl(r,s)):cl=Vt(r,s);e:do try{if(Mt!==0&&yt!==null){s=yt;var R=ur;t:switch(Mt){case 1:Mt=0,ur=null,hl(r,s,R,1);break;case 2:case 9:if(C1(R)){Mt=0,ur=null,my(s);break}s=function(){Mt!==2&&Mt!==9||Pt!==r||(Mt=7),wi(r)},R.then(s,s);break e;case 3:Mt=7;break e;case 4:Mt=5;break e;case 7:C1(R)?(Mt=0,ur=null,my(s)):(Mt=0,ur=null,hl(r,s,R,7));break;case 5:var z=null;switch(yt.tag){case 26:z=yt.memoizedState;case 5:case 27:var Y=yt;if(z?e0(z):Y.stateNode.complete){Mt=0,ur=null;var re=Y.sibling;if(re!==null)yt=re;else{var de=Y.return;de!==null?(yt=de,Id(de)):yt=null}break t}}Mt=0,ur=null,hl(r,s,R,5);break;case 6:Mt=0,ur=null,hl(r,s,R,6);break;case 8:Wp(),Qt=6;break e;default:throw Error(i(462))}}pk();break}catch(ve){uy(r,ve)}while(!0);return is=Zo=null,V.H=m,V.A=k,Rt=c,yt!==null?0:(Pt=null,St=0,td(),Qt)}function pk(){for(;yt!==null&&!gt();)py(yt)}function py(r){var s=z_(r.alternate,r,ps);r.memoizedProps=r.pendingProps,s===null?Id(r):yt=s}function my(r){var s=r,c=s.alternate;switch(s.tag){case 15:case 0:s=M_(c,s,s.pendingProps,s.type,void 0,St);break;case 11:s=M_(c,s,s.pendingProps,s.type.render,s.ref,St);break;case 5:cp(s);default:F_(c,s),s=yt=h1(s,ps),s=z_(c,s,ps)}r.memoizedProps=r.pendingProps,s===null?Id(r):yt=s}function hl(r,s,c,m){is=Zo=null,cp(s),nl=null,Tc=0;var k=s.return;try{if(nk(r,k,s,c,St)){Qt=1,wd(r,Nr(c,r.current)),yt=null;return}}catch(R){if(k!==null)throw yt=k,R;Qt=1,wd(r,Nr(c,r.current)),yt=null;return}s.flags&32768?(Ct||m===1?r=!0:cl||(St&536870912)!==0?r=!1:(Js=r=!0,(m===2||m===9||m===3||m===6)&&(m=lr.current,m!==null&&m.tag===13&&(m.flags|=16384))),gy(s,r)):Id(s)}function Id(r){var s=r;do{if((s.flags&32768)!==0){gy(s,Js);return}r=s.return;var c=sk(s.alternate,s,ps);if(c!==null){yt=c;return}if(s=s.sibling,s!==null){yt=s;return}yt=s=r}while(s!==null);Qt===0&&(Qt=5)}function gy(r,s){do{var c=ok(r.alternate,r);if(c!==null){c.flags&=32767,yt=c;return}if(c=r.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!s&&(r=r.sibling,r!==null)){yt=r;return}yt=r=c}while(r!==null);Qt=6,yt=null}function vy(r,s,c,m,k,R,z,Y,re){r.cancelPendingCommit=null;do Bd();while(pn!==0);if((Rt&6)!==0)throw Error(i(327));if(s!==null){if(s===r.current)throw Error(i(177));if(R=s.lanes|s.childLanes,R|=wc,qn(r,c,R,z,Y,re),r===Pt&&(yt=Pt=null,St=0),dl=s,no=r,ms=c,qp=R,Vp=k,oy=m,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,_k(Ae,function(){return Sy(),null})):(r.callbackNode=null,r.callbackPriority=0),m=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||m){m=V.T,V.T=null,k=X.p,X.p=2,z=Rt,Rt|=4;try{ak(r,s,c)}finally{Rt=z,X.p=k,V.T=m}}pn=1,_y(),yy(),by()}}function _y(){if(pn===1){pn=0;var r=no,s=dl,c=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||c){c=V.T,V.T=null;var m=X.p;X.p=2;var k=Rt;Rt|=4;try{Q_(s,r);var R=om,z=fn(r.containerInfo),Y=R.focusedElem,re=R.selectionRange;if(z!==Y&&Y&&Y.ownerDocument&&Nt(Y.ownerDocument.documentElement,Y)){if(re!==null&&hn(Y)){var de=re.start,ve=re.end;if(ve===void 0&&(ve=de),"selectionStart"in Y)Y.selectionStart=de,Y.selectionEnd=Math.min(ve,Y.value.length);else{var be=Y.ownerDocument||document,he=be&&be.defaultView||window;if(he.getSelection){var pe=he.getSelection(),Fe=Y.textContent.length,tt=Math.min(re.start,Fe),Bt=re.end===void 0?tt:Math.min(re.end,Fe);!pe.extend&&tt>Bt&&(z=Bt,Bt=tt,tt=z);var le=dt(Y,tt),oe=dt(Y,Bt);if(le&&oe&&(pe.rangeCount!==1||pe.anchorNode!==le.node||pe.anchorOffset!==le.offset||pe.focusNode!==oe.node||pe.focusOffset!==oe.offset)){var ue=be.createRange();ue.setStart(le.node,le.offset),pe.removeAllRanges(),tt>Bt?(pe.addRange(ue),pe.extend(oe.node,oe.offset)):(ue.setEnd(oe.node,oe.offset),pe.addRange(ue))}}}}for(be=[],pe=Y;pe=pe.parentNode;)pe.nodeType===1&&be.push({element:pe,left:pe.scrollLeft,top:pe.scrollTop});for(typeof Y.focus=="function"&&Y.focus(),Y=0;Y<be.length;Y++){var ye=be[Y];ye.element.scrollLeft=ye.left,ye.element.scrollTop=ye.top}}Yd=!!sm,om=sm=null}finally{Rt=k,X.p=m,V.T=c}}r.current=s,pn=2}}function yy(){if(pn===2){pn=0;var r=no,s=dl,c=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||c){c=V.T,V.T=null;var m=X.p;X.p=2;var k=Rt;Rt|=4;try{W_(r,s.alternate,s)}finally{Rt=k,X.p=m,V.T=c}}pn=3}}function by(){if(pn===4||pn===3){pn=0,it();var r=no,s=dl,c=ms,m=oy;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?pn=5:(pn=0,dl=no=null,xy(r,r.pendingLanes));var k=r.pendingLanes;if(k===0&&(to=null),Fn(c),s=s.stateNode,Ie&&typeof Ie.onCommitFiberRoot=="function")try{Ie.onCommitFiberRoot(Ze,s,void 0,(s.current.flags&128)===128)}catch{}if(m!==null){s=V.T,k=X.p,X.p=2,V.T=null;try{for(var R=r.onRecoverableError,z=0;z<m.length;z++){var Y=m[z];R(Y.value,{componentStack:Y.stack})}}finally{V.T=s,X.p=k}}(ms&3)!==0&&Bd(),wi(r),k=r.pendingLanes,(c&261930)!==0&&(k&42)!==0?r===Gp?Vc++:(Vc=0,Gp=r):Vc=0,Gc(0)}}function xy(r,s){(r.pooledCacheLanes&=s)===0&&(s=r.pooledCache,s!=null&&(r.pooledCache=null,Ec(s)))}function Bd(){return _y(),yy(),by(),Sy()}function Sy(){if(pn!==5)return!1;var r=no,s=qp;qp=0;var c=Fn(ms),m=V.T,k=X.p;try{X.p=32>c?32:c,V.T=null,c=Vp,Vp=null;var R=no,z=ms;if(pn=0,dl=no=null,ms=0,(Rt&6)!==0)throw Error(i(331));var Y=Rt;if(Rt|=4,ry(R.current),ey(R,R.current,z,c),Rt=Y,Gc(0,!1),Ie&&typeof Ie.onPostCommitFiberRoot=="function")try{Ie.onPostCommitFiberRoot(Ze,R)}catch{}return!0}finally{X.p=k,V.T=m,xy(r,s)}}function wy(r,s,c){s=Nr(c,s),s=Cp(r.stateNode,s,2),r=Ys(r,s,2),r!==null&&(rn(r,2),wi(r))}function jt(r,s,c){if(r.tag===3)wy(r,r,c);else for(;s!==null;){if(s.tag===3){wy(s,r,c);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(to===null||!to.has(m))){r=Nr(c,r),c=C_(2),m=Ys(s,c,2),m!==null&&(k_(c,m,s,r),rn(m,2),wi(m));break}}s=s.return}}function Yp(r,s,c){var m=r.pingCache;if(m===null){m=r.pingCache=new uk;var k=new Set;m.set(s,k)}else k=m.get(s),k===void 0&&(k=new Set,m.set(s,k));k.has(c)||(Hp=!0,k.add(c),r=mk.bind(null,r,s,c),s.then(r,r))}function mk(r,s,c){var m=r.pingCache;m!==null&&m.delete(s),r.pingedLanes|=r.suspendedLanes&c,r.warmLanes&=~c,Pt===r&&(St&c)===c&&(Qt===4||Qt===3&&(St&62914560)===St&&300>Je()-Dd?(Rt&2)===0&&fl(r,0):Up|=c,ul===St&&(ul=0)),wi(r)}function Cy(r,s){s===0&&(s=en()),r=Ko(r,s),r!==null&&(rn(r,s),wi(r))}function gk(r){var s=r.memoizedState,c=0;s!==null&&(c=s.retryLane),Cy(r,c)}function vk(r,s){var c=0;switch(r.tag){case 31:case 13:var m=r.stateNode,k=r.memoizedState;k!==null&&(c=k.retryLane);break;case 19:m=r.stateNode;break;case 22:m=r.stateNode._retryCache;break;default:throw Error(i(314))}m!==null&&m.delete(s),Cy(r,c)}function _k(r,s){return nt(r,s)}var zd=null,pl=null,Xp=!1,Pd=!1,Zp=!1,io=0;function wi(r){r!==pl&&r.next===null&&(pl===null?zd=pl=r:pl=pl.next=r),Pd=!0,Xp||(Xp=!0,bk())}function Gc(r,s){if(!Zp&&Pd){Zp=!0;do for(var c=!1,m=zd;m!==null;){if(r!==0){var k=m.pendingLanes;if(k===0)var R=0;else{var z=m.suspendedLanes,Y=m.pingedLanes;R=(1<<31-Ce(42|r)+1)-1,R&=k&~(z&~Y),R=R&201326741?R&201326741|1:R?R|2:0}R!==0&&(c=!0,Ty(m,R))}else R=St,R=vn(m,m===Pt?R:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(R&3)===0||Vt(m,R)||(c=!0,Ty(m,R));m=m.next}while(c);Zp=!1}}function yk(){ky()}function ky(){Pd=Xp=!1;var r=0;io!==0&&Nk()&&(r=io);for(var s=Je(),c=null,m=zd;m!==null;){var k=m.next,R=Ey(m,s);R===0?(m.next=null,c===null?zd=k:c.next=k,k===null&&(pl=c)):(c=m,(r!==0||(R&3)!==0)&&(Pd=!0)),m=k}pn!==0&&pn!==5||Gc(r),io!==0&&(io=0)}function Ey(r,s){for(var c=r.suspendedLanes,m=r.pingedLanes,k=r.expirationTimes,R=r.pendingLanes&-62914561;0<R;){var z=31-Ce(R),Y=1<<z,re=k[z];re===-1?((Y&c)===0||(Y&m)!==0)&&(k[z]=Do(Y,s)):re<=s&&(r.expiredLanes|=Y),R&=~Y}if(s=Pt,c=St,c=vn(r,r===s?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),m=r.callbackNode,c===0||r===s&&(Mt===2||Mt===9)||r.cancelPendingCommit!==null)return m!==null&&m!==null&&Ge(m),r.callbackNode=null,r.callbackPriority=0;if((c&3)===0||Vt(r,c)){if(s=c&-c,s===r.callbackPriority)return s;switch(m!==null&&Ge(m),Fn(c)){case 2:case 8:c=ge;break;case 32:c=Ae;break;case 268435456:c=Le;break;default:c=Ae}return m=Ay.bind(null,r),c=nt(c,m),r.callbackPriority=s,r.callbackNode=c,s}return m!==null&&m!==null&&Ge(m),r.callbackPriority=2,r.callbackNode=null,2}function Ay(r,s){if(pn!==0&&pn!==5)return r.callbackNode=null,r.callbackPriority=0,null;var c=r.callbackNode;if(Bd()&&r.callbackNode!==c)return null;var m=St;return m=vn(r,r===Pt?m:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),m===0?null:(ly(r,m,s),Ey(r,Je()),r.callbackNode!=null&&r.callbackNode===c?Ay.bind(null,r):null)}function Ty(r,s){if(Bd())return null;ly(r,s,!0)}function bk(){Mk(function(){(Rt&6)!==0?nt(fe,yk):ky()})}function Qp(){if(io===0){var r=Ja;r===0&&(r=Xt,Xt<<=1,(Xt&261888)===0&&(Xt=256)),io=r}return io}function Ry(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Fo(""+r)}function Ny(r,s){var c=s.ownerDocument.createElement("input");return c.name=s.name,c.value=s.value,r.id&&c.setAttribute("form",r.id),s.parentNode.insertBefore(c,s),r=new FormData(r),c.parentNode.removeChild(c),r}function xk(r,s,c,m,k){if(s==="submit"&&c&&c.stateNode===k){var R=Ry((k[Gt]||null).action),z=m.submitter;z&&(s=(s=z[Gt]||null)?Ry(s.formAction):z.getAttribute("formAction"),s!==null&&(R=s,z=null));var Y=new Bs("action","action",null,m,k);r.push({event:Y,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(io!==0){var re=z?Ny(k,z):new FormData(k);_p(c,{pending:!0,data:re,method:k.method,action:R},null,re)}}else typeof R=="function"&&(Y.preventDefault(),re=z?Ny(k,z):new FormData(k),_p(c,{pending:!0,data:re,method:k.method,action:R},R,re))},currentTarget:k}]})}}for(var Jp=0;Jp<yi.length;Jp++){var em=yi[Jp],Sk=em.toLowerCase(),wk=em[0].toUpperCase()+em.slice(1);xn(Sk,"on"+wk)}xn(Xi,"onAnimationEnd"),xn(Zi,"onAnimationIteration"),xn(Qi,"onAnimationStart"),xn("dblclick","onDoubleClick"),xn("focusin","onFocus"),xn("focusout","onBlur"),xn(Wa,"onTransitionRun"),xn(Hs,"onTransitionStart"),xn(Us,"onTransitionCancel"),xn(Ji,"onTransitionEnd"),Wr("onMouseEnter",["mouseout","mouseover"]),Wr("onMouseLeave",["mouseout","mouseover"]),Wr("onPointerEnter",["pointerout","pointerover"]),Wr("onPointerLeave",["pointerout","pointerover"]),Sr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Sr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Sr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Sr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Sr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Sr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wc="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(" "),Ck=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wc));function Dy(r,s){s=(s&4)!==0;for(var c=0;c<r.length;c++){var m=r[c],k=m.event;m=m.listeners;e:{var R=void 0;if(s)for(var z=m.length-1;0<=z;z--){var Y=m[z],re=Y.instance,de=Y.currentTarget;if(Y=Y.listener,re!==R&&k.isPropagationStopped())break e;R=Y,k.currentTarget=de;try{R(k)}catch(ve){Wt(ve)}k.currentTarget=null,R=re}else for(z=0;z<m.length;z++){if(Y=m[z],re=Y.instance,de=Y.currentTarget,Y=Y.listener,re!==R&&k.isPropagationStopped())break e;R=Y,k.currentTarget=de;try{R(k)}catch(ve){Wt(ve)}k.currentTarget=null,R=re}}}}function bt(r,s){var c=s[br];c===void 0&&(c=s[br]=new Set);var m=r+"__bubble";c.has(m)||(My(s,r,2,!1),c.add(m))}function tm(r,s,c){var m=0;s&&(m|=4),My(c,r,m,s)}var Fd="_reactListening"+Math.random().toString(36).slice(2);function nm(r){if(!r[Fd]){r[Fd]=!0,Mo.forEach(function(c){c!=="selectionchange"&&(Ck.has(c)||tm(c,!1,r),tm(c,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[Fd]||(s[Fd]=!0,tm("selectionchange",!1,s))}}function My(r,s,c,m){switch(a0(s)){case 2:var k=Qk;break;case 8:k=Jk;break;default:k=vm}c=k.bind(null,s,c,r),k=void 0,!Is||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(k=!0),m?k!==void 0?r.addEventListener(s,c,{capture:!0,passive:k}):r.addEventListener(s,c,!0):k!==void 0?r.addEventListener(s,c,{passive:k}):r.addEventListener(s,c,!1)}function rm(r,s,c,m,k){var R=m;if((s&1)===0&&(s&2)===0&&m!==null)e:for(;;){if(m===null)return;var z=m.tag;if(z===3||z===4){var Y=m.stateNode.containerInfo;if(Y===k)break;if(z===4)for(z=m.return;z!==null;){var re=z.tag;if((re===3||re===4)&&z.stateNode.containerInfo===k)return;z=z.return}for(;Y!==null;){if(z=qr(Y),z===null)return;if(re=z.tag,re===5||re===6||re===26||re===27){m=R=z;continue e}Y=Y.parentNode}}m=m.return}Ho(function(){var de=R,ve=js(c),be=[];e:{var he=es.get(r);if(he!==void 0){var pe=Bs,Fe=r;switch(r){case"keypress":if(Pi(c)===0)break e;case"keydown":case"keyup":pe=hc;break;case"focusin":Fe="focus",pe=Ps;break;case"focusout":Fe="blur",pe=Ps;break;case"beforeblur":case"afterblur":pe=Ps;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":pe=$o;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":pe=Ma;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":pe=pc;break;case Xi:case Zi:case Qi:pe=ja;break;case Ji:pe=mc;break;case"scroll":case"scrollend":pe=sc;break;case"wheel":pe=gc;break;case"copy":case"cut":case"paste":pe=Oa;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":pe=Hi;break;case"toggle":case"beforetoggle":pe=Go}var tt=(s&4)!==0,Bt=!tt&&(r==="scroll"||r==="scrollend"),le=tt?he!==null?he+"Capture":null:he;tt=[];for(var oe=de,ue;oe!==null;){var ye=oe;if(ue=ye.stateNode,ye=ye.tag,ye!==5&&ye!==26&&ye!==27||ue===null||le===null||(ye=ui(oe,le),ye!=null&&tt.push(Kc(oe,ye,ue))),Bt)break;oe=oe.return}0<tt.length&&(he=new pe(he,Fe,null,c,ve),be.push({event:he,listeners:tt}))}}if((s&7)===0){e:{if(he=r==="mouseover"||r==="pointerover",pe=r==="mouseout"||r==="pointerout",he&&c!==Bi&&(Fe=c.relatedTarget||c.fromElement)&&(qr(Fe)||Fe[_n]))break e;if((pe||he)&&(he=ve.window===ve?ve:(he=ve.ownerDocument)?he.defaultView||he.parentWindow:window,pe?(Fe=c.relatedTarget||c.toElement,pe=de,Fe=Fe?qr(Fe):null,Fe!==null&&(Bt=l(Fe),tt=Fe.tag,Fe!==Bt||tt!==5&&tt!==27&&tt!==6)&&(Fe=null)):(pe=null,Fe=de),pe!==Fe)){if(tt=$o,ye="onMouseLeave",le="onMouseEnter",oe="mouse",(r==="pointerout"||r==="pointerover")&&(tt=Hi,ye="onPointerLeave",le="onPointerEnter",oe="pointer"),Bt=pe==null?he:ci(pe),ue=Fe==null?he:ci(Fe),he=new tt(ye,oe+"leave",pe,c,ve),he.target=Bt,he.relatedTarget=ue,ye=null,qr(ve)===de&&(tt=new tt(le,oe+"enter",Fe,c,ve),tt.target=ue,tt.relatedTarget=Bt,ye=tt),Bt=ye,pe&&Fe)t:{for(tt=kk,le=pe,oe=Fe,ue=0,ye=le;ye;ye=tt(ye))ue++;ye=0;for(var Xe=oe;Xe;Xe=tt(Xe))ye++;for(;0<ue-ye;)le=tt(le),ue--;for(;0<ye-ue;)oe=tt(oe),ye--;for(;ue--;){if(le===oe||oe!==null&&le===oe.alternate){tt=le;break t}le=tt(le),oe=tt(oe)}tt=null}else tt=null;pe!==null&&jy(be,he,pe,tt,!1),Fe!==null&&Bt!==null&&jy(be,Bt,Fe,tt,!0)}}e:{if(he=de?ci(de):window,pe=he.nodeName&&he.nodeName.toLowerCase(),pe==="select"||pe==="input"&&he.type==="file")var At=vc;else if(Vi(he))if(_c)At=De;else{At=ed;var $e=Ju}else pe=he.nodeName,!pe||pe.toLowerCase()!=="input"||he.type!=="checkbox"&&he.type!=="radio"?de&&Ms(de.elementType)&&(At=vc):At=te;if(At&&(At=At(r,de))){Gi(be,At,c,ve);break e}$e&&$e(r,he,de),r==="focusout"&&de&&he.type==="number"&&de.memoizedProps.value!=null&&Ds(he,"number",he.value)}switch($e=de?ci(de):window,r){case"focusin":(Vi($e)||$e.contentEditable==="true")&&(Ln=$e,ei=de,Wi=null);break;case"focusout":Wi=ei=Ln=null;break;case"mousedown":Sc=!0;break;case"contextmenu":case"mouseup":case"dragend":Sc=!1,Ki(be,c,ve);break;case"selectionchange":if(Wn)break;case"keydown":case"keyup":Ki(be,c,ve)}var pt;if(Ui)e:{switch(r){case"compositionstart":var wt="onCompositionStart";break e;case"compositionend":wt="onCompositionEnd";break e;case"compositionupdate":wt="onCompositionUpdate";break e}wt=void 0}else sr?Jr(r,c)&&(wt="onCompositionEnd"):r==="keydown"&&c.keyCode===229&&(wt="onCompositionStart");wt&&($i&&c.locale!=="ko"&&(sr||wt!=="onCompositionStart"?wt==="onCompositionEnd"&&sr&&(pt=kr()):(ir=ve,Cr="value"in ir?ir.value:ir.textContent,sr=!0)),$e=Hd(de,wt),0<$e.length&&(wt=new qo(wt,r,null,c,ve),be.push({event:wt,listeners:$e}),pt?wt.data=pt:(pt=qi(c),pt!==null&&(wt.data=pt)))),(pt=ut?mi(r,c):gi(r,c))&&(wt=Hd(de,"onBeforeInput"),0<wt.length&&($e=new qo("onBeforeInput","beforeinput",null,c,ve),be.push({event:$e,listeners:wt}),$e.data=pt)),xk(be,r,de,c,ve)}Dy(be,s)})}function Kc(r,s,c){return{instance:r,listener:s,currentTarget:c}}function Hd(r,s){for(var c=s+"Capture",m=[];r!==null;){var k=r,R=k.stateNode;if(k=k.tag,k!==5&&k!==26&&k!==27||R===null||(k=ui(r,c),k!=null&&m.unshift(Kc(r,k,R)),k=ui(r,s),k!=null&&m.push(Kc(r,k,R))),r.tag===3)return m;r=r.return}return[]}function kk(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function jy(r,s,c,m,k){for(var R=s._reactName,z=[];c!==null&&c!==m;){var Y=c,re=Y.alternate,de=Y.stateNode;if(Y=Y.tag,re!==null&&re===m)break;Y!==5&&Y!==26&&Y!==27||de===null||(re=de,k?(de=ui(c,R),de!=null&&z.unshift(Kc(c,de,re))):k||(de=ui(c,R),de!=null&&z.push(Kc(c,de,re)))),c=c.return}z.length!==0&&r.push({event:s,listeners:z})}var Ek=/\r\n?/g,Ak=/\u0000|\uFFFD/g;function Oy(r){return(typeof r=="string"?r:""+r).replace(Ek,`
49
+ `).replace(Ak,"")}function Ly(r,s){return s=Oy(s),Oy(r)===s}function It(r,s,c,m,k,R){switch(c){case"children":typeof m=="string"?s==="body"||s==="textarea"&&m===""||Yr(r,m):(typeof m=="number"||typeof m=="bigint")&&s!=="body"&&Yr(r,""+m);break;case"className":Oi(r,"class",m);break;case"tabIndex":Oi(r,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":Oi(r,c,m);break;case"style":Ii(r,m,R);break;case"data":if(s!=="object"){Oi(r,"data",m);break}case"src":case"href":if(m===""&&(s!=="a"||c!=="href")){r.removeAttribute(c);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(c);break}m=Fo(""+m),r.setAttribute(c,m);break;case"action":case"formAction":if(typeof m=="function"){r.setAttribute(c,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof R=="function"&&(c==="formAction"?(s!=="input"&&It(r,s,"name",k.name,k,null),It(r,s,"formEncType",k.formEncType,k,null),It(r,s,"formMethod",k.formMethod,k,null),It(r,s,"formTarget",k.formTarget,k,null)):(It(r,s,"encType",k.encType,k,null),It(r,s,"method",k.method,k,null),It(r,s,"target",k.target,k,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(c);break}m=Fo(""+m),r.setAttribute(c,m);break;case"onClick":m!=null&&(r.onclick=Vn);break;case"onScroll":m!=null&&bt("scroll",r);break;case"onScrollEnd":m!=null&&bt("scrollend",r);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(c=m.__html,c!=null){if(k.children!=null)throw Error(i(60));r.innerHTML=c}}break;case"multiple":r.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":r.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){r.removeAttribute("xlink:href");break}c=Fo(""+m),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,""+m):r.removeAttribute(c);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,""):r.removeAttribute(c);break;case"capture":case"download":m===!0?r.setAttribute(c,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,m):r.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?r.setAttribute(c,m):r.removeAttribute(c);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?r.removeAttribute(c):r.setAttribute(c,m);break;case"popover":bt("beforetoggle",r),bt("toggle",r),Ts(r,"popover",m);break;case"xlinkActuate":zt(r,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":zt(r,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":zt(r,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":zt(r,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":zt(r,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":zt(r,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":zt(r,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":zt(r,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":zt(r,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Ts(r,"is",m);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=Ih.get(c)||c,Ts(r,c,m))}}function im(r,s,c,m,k,R){switch(c){case"style":Ii(r,m,R);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(c=m.__html,c!=null){if(k.children!=null)throw Error(i(60));r.innerHTML=c}}break;case"children":typeof m=="string"?Yr(r,m):(typeof m=="number"||typeof m=="bigint")&&Yr(r,""+m);break;case"onScroll":m!=null&&bt("scroll",r);break;case"onScrollEnd":m!=null&&bt("scrollend",r);break;case"onClick":m!=null&&(r.onclick=Vn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!jo.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(k=c.endsWith("Capture"),s=c.slice(2,k?c.length-7:void 0),R=r[Gt]||null,R=R!=null?R[c]:null,typeof R=="function"&&r.removeEventListener(s,R,k),typeof m=="function")){typeof R!="function"&&R!==null&&(c in r?r[c]=null:r.hasAttribute(c)&&r.removeAttribute(c)),r.addEventListener(s,m,k);break e}c in r?r[c]=m:m===!0?r.setAttribute(c,""):Ts(r,c,m)}}}function Dn(r,s,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":bt("error",r),bt("load",r);var m=!1,k=!1,R;for(R in c)if(c.hasOwnProperty(R)){var z=c[R];if(z!=null)switch(R){case"src":m=!0;break;case"srcSet":k=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:It(r,s,R,z,c,null)}}k&&It(r,s,"srcSet",c.srcSet,c,null),m&&It(r,s,"src",c.src,c,null);return;case"input":bt("invalid",r);var Y=R=z=k=null,re=null,de=null;for(m in c)if(c.hasOwnProperty(m)){var ve=c[m];if(ve!=null)switch(m){case"name":k=ve;break;case"type":z=ve;break;case"checked":re=ve;break;case"defaultChecked":de=ve;break;case"value":R=ve;break;case"defaultValue":Y=ve;break;case"children":case"dangerouslySetInnerHTML":if(ve!=null)throw Error(i(137,s));break;default:It(r,s,m,ve,c,null)}}Io(r,R,Y,re,de,z,k,!1);return;case"select":bt("invalid",r),m=z=R=null;for(k in c)if(c.hasOwnProperty(k)&&(Y=c[k],Y!=null))switch(k){case"value":R=Y;break;case"defaultValue":z=Y;break;case"multiple":m=Y;default:It(r,s,k,Y,c,null)}s=R,c=z,r.multiple=!!m,s!=null?Kr(r,!!m,s,!1):c!=null&&Kr(r,!!m,c,!0);return;case"textarea":bt("invalid",r),R=k=m=null;for(z in c)if(c.hasOwnProperty(z)&&(Y=c[z],Y!=null))switch(z){case"value":m=Y;break;case"defaultValue":k=Y;break;case"children":R=Y;break;case"dangerouslySetInnerHTML":if(Y!=null)throw Error(i(91));break;default:It(r,s,z,Y,c,null)}zo(r,m,k,R);return;case"option":for(re in c)if(c.hasOwnProperty(re)&&(m=c[re],m!=null))switch(re){case"selected":r.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:It(r,s,re,m,c,null)}return;case"dialog":bt("beforetoggle",r),bt("toggle",r),bt("cancel",r),bt("close",r);break;case"iframe":case"object":bt("load",r);break;case"video":case"audio":for(m=0;m<Wc.length;m++)bt(Wc[m],r);break;case"image":bt("error",r),bt("load",r);break;case"details":bt("toggle",r);break;case"embed":case"source":case"link":bt("error",r),bt("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(de in c)if(c.hasOwnProperty(de)&&(m=c[de],m!=null))switch(de){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,s));default:It(r,s,de,m,c,null)}return;default:if(Ms(s)){for(ve in c)c.hasOwnProperty(ve)&&(m=c[ve],m!==void 0&&im(r,s,ve,m,c,void 0));return}}for(Y in c)c.hasOwnProperty(Y)&&(m=c[Y],m!=null&&It(r,s,Y,m,c,null))}function Tk(r,s,c,m){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var k=null,R=null,z=null,Y=null,re=null,de=null,ve=null;for(pe in c){var be=c[pe];if(c.hasOwnProperty(pe)&&be!=null)switch(pe){case"checked":break;case"value":break;case"defaultValue":re=be;default:m.hasOwnProperty(pe)||It(r,s,pe,null,m,be)}}for(var he in m){var pe=m[he];if(be=c[he],m.hasOwnProperty(he)&&(pe!=null||be!=null))switch(he){case"type":R=pe;break;case"name":k=pe;break;case"checked":de=pe;break;case"defaultChecked":ve=pe;break;case"value":z=pe;break;case"defaultValue":Y=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(i(137,s));break;default:pe!==be&&It(r,s,he,pe,m,be)}}Ns(r,z,Y,re,de,ve,R,k);return;case"select":pe=z=Y=he=null;for(R in c)if(re=c[R],c.hasOwnProperty(R)&&re!=null)switch(R){case"value":break;case"multiple":pe=re;default:m.hasOwnProperty(R)||It(r,s,R,null,m,re)}for(k in m)if(R=m[k],re=c[k],m.hasOwnProperty(k)&&(R!=null||re!=null))switch(k){case"value":he=R;break;case"defaultValue":Y=R;break;case"multiple":z=R;default:R!==re&&It(r,s,k,R,m,re)}s=Y,c=z,m=pe,he!=null?Kr(r,!!c,he,!1):!!m!=!!c&&(s!=null?Kr(r,!!c,s,!0):Kr(r,!!c,c?[]:"",!1));return;case"textarea":pe=he=null;for(Y in c)if(k=c[Y],c.hasOwnProperty(Y)&&k!=null&&!m.hasOwnProperty(Y))switch(Y){case"value":break;case"children":break;default:It(r,s,Y,null,m,k)}for(z in m)if(k=m[z],R=c[z],m.hasOwnProperty(z)&&(k!=null||R!=null))switch(z){case"value":he=k;break;case"defaultValue":pe=k;break;case"children":break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(i(91));break;default:k!==R&&It(r,s,z,k,m,R)}Bo(r,he,pe);return;case"option":for(var Fe in c)if(he=c[Fe],c.hasOwnProperty(Fe)&&he!=null&&!m.hasOwnProperty(Fe))switch(Fe){case"selected":r.selected=!1;break;default:It(r,s,Fe,null,m,he)}for(re in m)if(he=m[re],pe=c[re],m.hasOwnProperty(re)&&he!==pe&&(he!=null||pe!=null))switch(re){case"selected":r.selected=he&&typeof he!="function"&&typeof he!="symbol";break;default:It(r,s,re,he,m,pe)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var tt in c)he=c[tt],c.hasOwnProperty(tt)&&he!=null&&!m.hasOwnProperty(tt)&&It(r,s,tt,null,m,he);for(de in m)if(he=m[de],pe=c[de],m.hasOwnProperty(de)&&he!==pe&&(he!=null||pe!=null))switch(de){case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(i(137,s));break;default:It(r,s,de,he,m,pe)}return;default:if(Ms(s)){for(var Bt in c)he=c[Bt],c.hasOwnProperty(Bt)&&he!==void 0&&!m.hasOwnProperty(Bt)&&im(r,s,Bt,void 0,m,he);for(ve in m)he=m[ve],pe=c[ve],!m.hasOwnProperty(ve)||he===pe||he===void 0&&pe===void 0||im(r,s,ve,he,m,pe);return}}for(var le in c)he=c[le],c.hasOwnProperty(le)&&he!=null&&!m.hasOwnProperty(le)&&It(r,s,le,null,m,he);for(be in m)he=m[be],pe=c[be],!m.hasOwnProperty(be)||he===pe||he==null&&pe==null||It(r,s,be,he,m,pe)}function Iy(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Rk(){if(typeof performance.getEntriesByType=="function"){for(var r=0,s=0,c=performance.getEntriesByType("resource"),m=0;m<c.length;m++){var k=c[m],R=k.transferSize,z=k.initiatorType,Y=k.duration;if(R&&Y&&Iy(z)){for(z=0,Y=k.responseEnd,m+=1;m<c.length;m++){var re=c[m],de=re.startTime;if(de>Y)break;var ve=re.transferSize,be=re.initiatorType;ve&&Iy(be)&&(re=re.responseEnd,z+=ve*(re<Y?1:(Y-de)/(re-de)))}if(--m,s+=8*(R+z)/(k.duration/1e3),r++,10<r)break}}if(0<r)return s/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var sm=null,om=null;function Ud(r){return r.nodeType===9?r:r.ownerDocument}function By(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function zy(r,s){if(r===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&s==="foreignObject"?0:r}function am(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var lm=null;function Nk(){var r=window.event;return r&&r.type==="popstate"?r===lm?!1:(lm=r,!0):(lm=null,!1)}var Py=typeof setTimeout=="function"?setTimeout:void 0,Dk=typeof clearTimeout=="function"?clearTimeout:void 0,Fy=typeof Promise=="function"?Promise:void 0,Mk=typeof queueMicrotask=="function"?queueMicrotask:typeof Fy<"u"?function(r){return Fy.resolve(null).then(r).catch(jk)}:Py;function jk(r){setTimeout(function(){throw r})}function so(r){return r==="head"}function Hy(r,s){var c=s,m=0;do{var k=c.nextSibling;if(r.removeChild(c),k&&k.nodeType===8)if(c=k.data,c==="/$"||c==="/&"){if(m===0){r.removeChild(k),_l(s);return}m--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")m++;else if(c==="html")Yc(r.ownerDocument.documentElement);else if(c==="head"){c=r.ownerDocument.head,Yc(c);for(var R=c.firstChild;R;){var z=R.nextSibling,Y=R.nodeName;R[Ke]||Y==="SCRIPT"||Y==="STYLE"||Y==="LINK"&&R.rel.toLowerCase()==="stylesheet"||c.removeChild(R),R=z}}else c==="body"&&Yc(r.ownerDocument.body);c=k}while(c);_l(s)}function Uy(r,s){var c=r;r=0;do{var m=c.nextSibling;if(c.nodeType===1?s?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(s?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),m&&m.nodeType===8)if(c=m.data,c==="/$"){if(r===0)break;r--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||r++;c=m}while(c)}function cm(r){var s=r.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var c=s;switch(s=s.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":cm(c),We(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}r.removeChild(c)}}function Ok(r,s,c,m){for(;r.nodeType===1;){var k=c;if(r.nodeName.toLowerCase()!==s.toLowerCase()){if(!m&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(m){if(!r[Ke])switch(s){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(R=r.getAttribute("rel"),R==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(R!==k.rel||r.getAttribute("href")!==(k.href==null||k.href===""?null:k.href)||r.getAttribute("crossorigin")!==(k.crossOrigin==null?null:k.crossOrigin)||r.getAttribute("title")!==(k.title==null?null:k.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(R=r.getAttribute("src"),(R!==(k.src==null?null:k.src)||r.getAttribute("type")!==(k.type==null?null:k.type)||r.getAttribute("crossorigin")!==(k.crossOrigin==null?null:k.crossOrigin))&&R&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(s==="input"&&r.type==="hidden"){var R=k.name==null?null:""+k.name;if(k.type==="hidden"&&r.getAttribute("name")===R)return r}else return r;if(r=Lr(r.nextSibling),r===null)break}return null}function Lk(r,s,c){if(s==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!c||(r=Lr(r.nextSibling),r===null))return null;return r}function $y(r,s){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=Lr(r.nextSibling),r===null))return null;return r}function um(r){return r.data==="$?"||r.data==="$~"}function dm(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function Ik(r,s){var c=r.ownerDocument;if(r.data==="$~")r._reactRetry=s;else if(r.data!=="$?"||c.readyState!=="loading")s();else{var m=function(){s(),c.removeEventListener("DOMContentLoaded",m)};c.addEventListener("DOMContentLoaded",m),r._reactRetry=m}}function Lr(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return r}var fm=null;function qy(r){r=r.nextSibling;for(var s=0;r;){if(r.nodeType===8){var c=r.data;if(c==="/$"||c==="/&"){if(s===0)return Lr(r.nextSibling);s--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||s++}r=r.nextSibling}return null}function Vy(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var c=r.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(s===0)return r;s--}else c!=="/$"&&c!=="/&"||s++}r=r.previousSibling}return null}function Gy(r,s,c){switch(s=Ud(c),r){case"html":if(r=s.documentElement,!r)throw Error(i(452));return r;case"head":if(r=s.head,!r)throw Error(i(453));return r;case"body":if(r=s.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function Yc(r){for(var s=r.attributes;s.length;)r.removeAttributeNode(s[0]);We(r)}var Ir=new Map,Wy=new Set;function $d(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var gs=X.d;X.d={f:Bk,r:zk,D:Pk,C:Fk,L:Hk,m:Uk,X:qk,S:$k,M:Vk};function Bk(){var r=gs.f(),s=Od();return r||s}function zk(r){var s=Vr(r);s!==null&&s.tag===5&&s.type==="form"?u_(s):gs.r(r)}var ml=typeof document>"u"?null:document;function Ky(r,s,c){var m=ml;if(m&&typeof s=="string"&&s){var k=An(s);k='link[rel="'+r+'"][href="'+k+'"]',typeof c=="string"&&(k+='[crossorigin="'+c+'"]'),Wy.has(k)||(Wy.add(k),r={rel:r,crossOrigin:c,href:s},m.querySelector(k)===null&&(s=m.createElement("link"),Dn(s,"link",r),Yt(s),m.head.appendChild(s)))}}function Pk(r){gs.D(r),Ky("dns-prefetch",r,null)}function Fk(r,s){gs.C(r,s),Ky("preconnect",r,s)}function Hk(r,s,c){gs.L(r,s,c);var m=ml;if(m&&r&&s){var k='link[rel="preload"][as="'+An(s)+'"]';s==="image"&&c&&c.imageSrcSet?(k+='[imagesrcset="'+An(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(k+='[imagesizes="'+An(c.imageSizes)+'"]')):k+='[href="'+An(r)+'"]';var R=k;switch(s){case"style":R=gl(r);break;case"script":R=vl(r)}Ir.has(R)||(r=h({rel:"preload",href:s==="image"&&c&&c.imageSrcSet?void 0:r,as:s},c),Ir.set(R,r),m.querySelector(k)!==null||s==="style"&&m.querySelector(Xc(R))||s==="script"&&m.querySelector(Zc(R))||(s=m.createElement("link"),Dn(s,"link",r),Yt(s),m.head.appendChild(s)))}}function Uk(r,s){gs.m(r,s);var c=ml;if(c&&r){var m=s&&typeof s.as=="string"?s.as:"script",k='link[rel="modulepreload"][as="'+An(m)+'"][href="'+An(r)+'"]',R=k;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":R=vl(r)}if(!Ir.has(R)&&(r=h({rel:"modulepreload",href:r},s),Ir.set(R,r),c.querySelector(k)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(Zc(R)))return}m=c.createElement("link"),Dn(m,"link",r),Yt(m),c.head.appendChild(m)}}}function $k(r,s,c){gs.S(r,s,c);var m=ml;if(m&&r){var k=Gr(m).hoistableStyles,R=gl(r);s=s||"default";var z=k.get(R);if(!z){var Y={loading:0,preload:null};if(z=m.querySelector(Xc(R)))Y.loading=5;else{r=h({rel:"stylesheet",href:r,"data-precedence":s},c),(c=Ir.get(R))&&hm(r,c);var re=z=m.createElement("link");Yt(re),Dn(re,"link",r),re._p=new Promise(function(de,ve){re.onload=de,re.onerror=ve}),re.addEventListener("load",function(){Y.loading|=1}),re.addEventListener("error",function(){Y.loading|=2}),Y.loading|=4,qd(z,s,m)}z={type:"stylesheet",instance:z,count:1,state:Y},k.set(R,z)}}}function qk(r,s){gs.X(r,s);var c=ml;if(c&&r){var m=Gr(c).hoistableScripts,k=vl(r),R=m.get(k);R||(R=c.querySelector(Zc(k)),R||(r=h({src:r,async:!0},s),(s=Ir.get(k))&&pm(r,s),R=c.createElement("script"),Yt(R),Dn(R,"link",r),c.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},m.set(k,R))}}function Vk(r,s){gs.M(r,s);var c=ml;if(c&&r){var m=Gr(c).hoistableScripts,k=vl(r),R=m.get(k);R||(R=c.querySelector(Zc(k)),R||(r=h({src:r,async:!0,type:"module"},s),(s=Ir.get(k))&&pm(r,s),R=c.createElement("script"),Yt(R),Dn(R,"link",r),c.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},m.set(k,R))}}function Yy(r,s,c,m){var k=(k=Q.current)?$d(k):null;if(!k)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(s=gl(c.href),c=Gr(k).hoistableStyles,m=c.get(s),m||(m={type:"style",instance:null,count:0,state:null},c.set(s,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){r=gl(c.href);var R=Gr(k).hoistableStyles,z=R.get(r);if(z||(k=k.ownerDocument||k,z={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},R.set(r,z),(R=k.querySelector(Xc(r)))&&!R._p&&(z.instance=R,z.state.loading=5),Ir.has(r)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},Ir.set(r,c),R||Gk(k,r,c,z.state))),s&&m===null)throw Error(i(528,""));return z}if(s&&m!==null)throw Error(i(529,""));return null;case"script":return s=c.async,c=c.src,typeof c=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=vl(c),c=Gr(k).hoistableScripts,m=c.get(s),m||(m={type:"script",instance:null,count:0,state:null},c.set(s,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function gl(r){return'href="'+An(r)+'"'}function Xc(r){return'link[rel="stylesheet"]['+r+"]"}function Xy(r){return h({},r,{"data-precedence":r.precedence,precedence:null})}function Gk(r,s,c,m){r.querySelector('link[rel="preload"][as="style"]['+s+"]")?m.loading=1:(s=r.createElement("link"),m.preload=s,s.addEventListener("load",function(){return m.loading|=1}),s.addEventListener("error",function(){return m.loading|=2}),Dn(s,"link",c),Yt(s),r.head.appendChild(s))}function vl(r){return'[src="'+An(r)+'"]'}function Zc(r){return"script[async]"+r}function Zy(r,s,c){if(s.count++,s.instance===null)switch(s.type){case"style":var m=r.querySelector('style[data-href~="'+An(c.href)+'"]');if(m)return s.instance=m,Yt(m),m;var k=h({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return m=(r.ownerDocument||r).createElement("style"),Yt(m),Dn(m,"style",k),qd(m,c.precedence,r),s.instance=m;case"stylesheet":k=gl(c.href);var R=r.querySelector(Xc(k));if(R)return s.state.loading|=4,s.instance=R,Yt(R),R;m=Xy(c),(k=Ir.get(k))&&hm(m,k),R=(r.ownerDocument||r).createElement("link"),Yt(R);var z=R;return z._p=new Promise(function(Y,re){z.onload=Y,z.onerror=re}),Dn(R,"link",m),s.state.loading|=4,qd(R,c.precedence,r),s.instance=R;case"script":return R=vl(c.src),(k=r.querySelector(Zc(R)))?(s.instance=k,Yt(k),k):(m=c,(k=Ir.get(R))&&(m=h({},c),pm(m,k)),r=r.ownerDocument||r,k=r.createElement("script"),Yt(k),Dn(k,"link",m),r.head.appendChild(k),s.instance=k);case"void":return null;default:throw Error(i(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(m=s.instance,s.state.loading|=4,qd(m,c.precedence,r));return s.instance}function qd(r,s,c){for(var m=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),k=m.length?m[m.length-1]:null,R=k,z=0;z<m.length;z++){var Y=m[z];if(Y.dataset.precedence===s)R=Y;else if(R!==k)break}R?R.parentNode.insertBefore(r,R.nextSibling):(s=c.nodeType===9?c.head:c,s.insertBefore(r,s.firstChild))}function hm(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.title==null&&(r.title=s.title)}function pm(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.integrity==null&&(r.integrity=s.integrity)}var Vd=null;function Qy(r,s,c){if(Vd===null){var m=new Map,k=Vd=new Map;k.set(c,m)}else k=Vd,m=k.get(c),m||(m=new Map,k.set(c,m));if(m.has(r))return m;for(m.set(r,null),c=c.getElementsByTagName(r),k=0;k<c.length;k++){var R=c[k];if(!(R[Ke]||R[Ht]||r==="link"&&R.getAttribute("rel")==="stylesheet")&&R.namespaceURI!=="http://www.w3.org/2000/svg"){var z=R.getAttribute(s)||"";z=r+z;var Y=m.get(z);Y?Y.push(R):m.set(z,[R])}}return m}function Jy(r,s,c){r=r.ownerDocument||r,r.head.insertBefore(c,s==="title"?r.querySelector("head > title"):null)}function Wk(r,s,c){if(c===1||s.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return r=s.disabled,typeof s.precedence=="string"&&r==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function e0(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function Kk(r,s,c,m){if(c.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var k=gl(m.href),R=s.querySelector(Xc(k));if(R){s=R._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(r.count++,r=Gd.bind(r),s.then(r,r)),c.state.loading|=4,c.instance=R,Yt(R);return}R=s.ownerDocument||s,m=Xy(m),(k=Ir.get(k))&&hm(m,k),R=R.createElement("link"),Yt(R);var z=R;z._p=new Promise(function(Y,re){z.onload=Y,z.onerror=re}),Dn(R,"link",m),c.instance=R}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(c,s),(s=c.state.preload)&&(c.state.loading&3)===0&&(r.count++,c=Gd.bind(r),s.addEventListener("load",c),s.addEventListener("error",c))}}var mm=0;function Yk(r,s){return r.stylesheets&&r.count===0&&Kd(r,r.stylesheets),0<r.count||0<r.imgCount?function(c){var m=setTimeout(function(){if(r.stylesheets&&Kd(r,r.stylesheets),r.unsuspend){var R=r.unsuspend;r.unsuspend=null,R()}},6e4+s);0<r.imgBytes&&mm===0&&(mm=62500*Rk());var k=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Kd(r,r.stylesheets),r.unsuspend)){var R=r.unsuspend;r.unsuspend=null,R()}},(r.imgBytes>mm?50:800)+s);return r.unsuspend=c,function(){r.unsuspend=null,clearTimeout(m),clearTimeout(k)}}:null}function Gd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Kd(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Wd=null;function Kd(r,s){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Wd=new Map,s.forEach(Xk,r),Wd=null,Gd.call(r))}function Xk(r,s){if(!(s.state.loading&4)){var c=Wd.get(r);if(c)var m=c.get(null);else{c=new Map,Wd.set(r,c);for(var k=r.querySelectorAll("link[data-precedence],style[data-precedence]"),R=0;R<k.length;R++){var z=k[R];(z.nodeName==="LINK"||z.getAttribute("media")!=="not all")&&(c.set(z.dataset.precedence,z),m=z)}m&&c.set(null,m)}k=s.instance,z=k.getAttribute("data-precedence"),R=c.get(z)||m,R===m&&c.set(null,k),c.set(z,k),this.count++,m=Gd.bind(this),k.addEventListener("load",m),k.addEventListener("error",m),R?R.parentNode.insertBefore(k,R.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(k,r.firstChild)),s.state.loading|=4}}var Qc={$$typeof:x,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function Zk(r,s,c,m,k,R,z,Y,re){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=kn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kn(0),this.hiddenUpdates=kn(null),this.identifierPrefix=m,this.onUncaughtError=k,this.onCaughtError=R,this.onRecoverableError=z,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=re,this.incompleteTransitions=new Map}function t0(r,s,c,m,k,R,z,Y,re,de,ve,be){return r=new Zk(r,s,c,z,re,de,ve,be,Y),s=1,R===!0&&(s|=24),R=ar(3,null,null,s),r.current=R,R.stateNode=r,s=Kh(),s.refCount++,r.pooledCache=s,s.refCount++,R.memoizedState={element:m,isDehydrated:c,cache:s},Qh(R),r}function n0(r){return r?(r=Ka,r):Ka}function r0(r,s,c,m,k,R){k=n0(k),m.context===null?m.context=k:m.pendingContext=k,m=Ks(s),m.payload={element:c},R=R===void 0?null:R,R!==null&&(m.callback=R),c=Ys(r,m,s),c!==null&&(Jn(c,r,s),Nc(c,r,s))}function i0(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var c=r.retryLane;r.retryLane=c!==0&&c<s?c:s}}function gm(r,s){i0(r,s),(r=r.alternate)&&i0(r,s)}function s0(r){if(r.tag===13||r.tag===31){var s=Ko(r,67108864);s!==null&&Jn(s,r,67108864),gm(r,67108864)}}function o0(r){if(r.tag===13||r.tag===31){var s=fr();s=On(s);var c=Ko(r,s);c!==null&&Jn(c,r,s),gm(r,s)}}var Yd=!0;function Qk(r,s,c,m){var k=V.T;V.T=null;var R=X.p;try{X.p=2,vm(r,s,c,m)}finally{X.p=R,V.T=k}}function Jk(r,s,c,m){var k=V.T;V.T=null;var R=X.p;try{X.p=8,vm(r,s,c,m)}finally{X.p=R,V.T=k}}function vm(r,s,c,m){if(Yd){var k=_m(m);if(k===null)rm(r,s,m,Xd,c),l0(r,m);else if(tE(k,r,s,c,m))m.stopPropagation();else if(l0(r,m),s&4&&-1<eE.indexOf(r)){for(;k!==null;){var R=Vr(k);if(R!==null)switch(R.tag){case 3:if(R=R.stateNode,R.current.memoizedState.isDehydrated){var z=Et(R.pendingLanes);if(z!==0){var Y=R;for(Y.pendingLanes|=2,Y.entangledLanes|=2;z;){var re=1<<31-Ce(z);Y.entanglements[1]|=re,z&=~re}wi(R),(Rt&6)===0&&(Md=Je()+500,Gc(0))}}break;case 31:case 13:Y=Ko(R,2),Y!==null&&Jn(Y,R,2),Od(),gm(R,2)}if(R=_m(m),R===null&&rm(r,s,m,Xd,c),R===k)break;k=R}k!==null&&m.stopPropagation()}else rm(r,s,m,null,c)}}function _m(r){return r=js(r),ym(r)}var Xd=null;function ym(r){if(Xd=null,r=qr(r),r!==null){var s=l(r);if(s===null)r=null;else{var c=s.tag;if(c===13){if(r=d(s),r!==null)return r;r=null}else if(c===31){if(r=a(s),r!==null)return r;r=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null)}}return Xd=r,null}function a0(r){switch(r){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(at()){case fe:return 2;case ge:return 8;case Ae:case Me:return 32;case Le:return 268435456;default:return 32}default:return 32}}var bm=!1,oo=null,ao=null,lo=null,Jc=new Map,eu=new Map,co=[],eE="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".split(" ");function l0(r,s){switch(r){case"focusin":case"focusout":oo=null;break;case"dragenter":case"dragleave":ao=null;break;case"mouseover":case"mouseout":lo=null;break;case"pointerover":case"pointerout":Jc.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":eu.delete(s.pointerId)}}function tu(r,s,c,m,k,R){return r===null||r.nativeEvent!==R?(r={blockedOn:s,domEventName:c,eventSystemFlags:m,nativeEvent:R,targetContainers:[k]},s!==null&&(s=Vr(s),s!==null&&s0(s)),r):(r.eventSystemFlags|=m,s=r.targetContainers,k!==null&&s.indexOf(k)===-1&&s.push(k),r)}function tE(r,s,c,m,k){switch(s){case"focusin":return oo=tu(oo,r,s,c,m,k),!0;case"dragenter":return ao=tu(ao,r,s,c,m,k),!0;case"mouseover":return lo=tu(lo,r,s,c,m,k),!0;case"pointerover":var R=k.pointerId;return Jc.set(R,tu(Jc.get(R)||null,r,s,c,m,k)),!0;case"gotpointercapture":return R=k.pointerId,eu.set(R,tu(eu.get(R)||null,r,s,c,m,k)),!0}return!1}function c0(r){var s=qr(r.target);if(s!==null){var c=l(s);if(c!==null){if(s=c.tag,s===13){if(s=d(c),s!==null){r.blockedOn=s,$r(r.priority,function(){o0(c)});return}}else if(s===31){if(s=a(c),s!==null){r.blockedOn=s,$r(r.priority,function(){o0(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){r.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Zd(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var c=_m(r.nativeEvent);if(c===null){c=r.nativeEvent;var m=new c.constructor(c.type,c);Bi=m,c.target.dispatchEvent(m),Bi=null}else return s=Vr(c),s!==null&&s0(s),r.blockedOn=c,!1;s.shift()}return!0}function u0(r,s,c){Zd(r)&&c.delete(s)}function nE(){bm=!1,oo!==null&&Zd(oo)&&(oo=null),ao!==null&&Zd(ao)&&(ao=null),lo!==null&&Zd(lo)&&(lo=null),Jc.forEach(u0),eu.forEach(u0)}function Qd(r,s){r.blockedOn===s&&(r.blockedOn=null,bm||(bm=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,nE)))}var Jd=null;function d0(r){Jd!==r&&(Jd=r,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Jd===r&&(Jd=null);for(var s=0;s<r.length;s+=3){var c=r[s],m=r[s+1],k=r[s+2];if(typeof m!="function"){if(ym(m||c)===null)continue;break}var R=Vr(c);R!==null&&(r.splice(s,3),s-=3,_p(R,{pending:!0,data:k,method:c.method,action:m},m,k))}}))}function _l(r){function s(re){return Qd(re,r)}oo!==null&&Qd(oo,r),ao!==null&&Qd(ao,r),lo!==null&&Qd(lo,r),Jc.forEach(s),eu.forEach(s);for(var c=0;c<co.length;c++){var m=co[c];m.blockedOn===r&&(m.blockedOn=null)}for(;0<co.length&&(c=co[0],c.blockedOn===null);)c0(c),c.blockedOn===null&&co.shift();if(c=(r.ownerDocument||r).$$reactFormReplay,c!=null)for(m=0;m<c.length;m+=3){var k=c[m],R=c[m+1],z=k[Gt]||null;if(typeof R=="function")z||d0(c);else if(z){var Y=null;if(R&&R.hasAttribute("formAction")){if(k=R,z=R[Gt]||null)Y=z.formAction;else if(ym(k)!==null)continue}else Y=z.action;typeof Y=="function"?c[m+1]=Y:(c.splice(m,3),m-=3),d0(c)}}}function f0(){function r(R){R.canIntercept&&R.info==="react-transition"&&R.intercept({handler:function(){return new Promise(function(z){return k=z})},focusReset:"manual",scroll:"manual"})}function s(){k!==null&&(k(),k=null),m||setTimeout(c,20)}function c(){if(!m&&!navigation.transition){var R=navigation.currentEntry;R&&R.url!=null&&navigation.navigate(R.url,{state:R.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,k=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(c,100),function(){m=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),k!==null&&(k(),k=null)}}}function xm(r){this._internalRoot=r}ef.prototype.render=xm.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(i(409));var c=s.current,m=fr();r0(c,m,r,s,null,null)},ef.prototype.unmount=xm.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;r0(r.current,2,null,r,null,null),Od(),s[_n]=null}};function ef(r){this._internalRoot=r}ef.prototype.unstable_scheduleHydration=function(r){if(r){var s=Ur();r={blockedOn:null,target:r,priority:s};for(var c=0;c<co.length&&s!==0&&s<co[c].priority;c++);co.splice(c,0,r),c===0&&c0(r)}};var h0=e.version;if(h0!=="19.2.4")throw Error(i(527,h0,"19.2.4"));X.findDOMNode=function(r){var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=f(s),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var rE={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var tf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tf.isDisabled&&tf.supportsFiber)try{Ze=tf.inject(rE),Ie=tf}catch{}}return ru.createRoot=function(r,s){if(!o(r))throw Error(i(299));var c=!1,m="",k=b_,R=x_,z=S_;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(k=s.onUncaughtError),s.onCaughtError!==void 0&&(R=s.onCaughtError),s.onRecoverableError!==void 0&&(z=s.onRecoverableError)),s=t0(r,1,!1,null,null,c,m,null,k,R,z,f0),r[_n]=s.current,nm(r),new xm(s)},ru.hydrateRoot=function(r,s,c){if(!o(r))throw Error(i(299));var m=!1,k="",R=b_,z=x_,Y=S_,re=null;return c!=null&&(c.unstable_strictMode===!0&&(m=!0),c.identifierPrefix!==void 0&&(k=c.identifierPrefix),c.onUncaughtError!==void 0&&(R=c.onUncaughtError),c.onCaughtError!==void 0&&(z=c.onCaughtError),c.onRecoverableError!==void 0&&(Y=c.onRecoverableError),c.formState!==void 0&&(re=c.formState)),s=t0(r,1,!0,s,c!=null?c:null,m,k,re,R,z,Y,f0),s.context=n0(null),c=s.current,m=fr(),m=On(m),k=Ks(m),k.callback=null,Ys(c,k,m),c=m,s.current.lanes=c,rn(s,c),wi(s),r[_n]=s.current,nm(r),new ef(s)},ru.version="19.2.4",ru}var w0;function hE(){if(w0)return Cm.exports;w0=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Cm.exports=fE(),Cm.exports}var pE=hE();const C0="jean2-theme",Xg="neutral",Mx="system",mE={mode:Mx,scheme:Xg,setMode:()=>null,setScheme:()=>null,resolvedMode:"dark"},jx=D.createContext(mE);function gE(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function k0(t){return t==="system"?gE():t}function vE(t){const e=localStorage.getItem(C0);if(!e||!["light","dark","system"].includes(e))return null;const i={mode:e,scheme:Xg};return localStorage.setItem(t,JSON.stringify(i)),localStorage.removeItem(C0),i}function _E({children:t,defaultMode:e=Mx,defaultScheme:n=Xg,storageKey:i="jean2-theme-settings",...o}){const[l,d]=D.useState(()=>{const S=vE(i);if(S)return S;const C=localStorage.getItem(i);if(C)try{const w=JSON.parse(C);if(typeof w=="object"&&w!==null&&"mode"in w&&"scheme"in w)return w}catch{}return{mode:e,scheme:n}}),[a,u]=D.useState(()=>k0(l.mode)),f=D.useCallback((S,C)=>{const w=window.document.documentElement,_=k0(S);w.classList.remove("light","dark"),w.classList.remove("neutral","ocean","forest","sunset","amethyst"),w.classList.add(_),w.classList.add(C),u(_)},[]);D.useEffect(()=>{f(l.mode,l.scheme)},[l,f]),D.useEffect(()=>{if(l.mode!=="system")return;const S=window.matchMedia("(prefers-color-scheme: dark)"),C=()=>{f(l.mode,l.scheme)};return S.addEventListener("change",C),()=>S.removeEventListener("change",C)},[l.mode,l.scheme,f]);const p=D.useCallback(S=>{const C={...l,mode:S};d(C),localStorage.setItem(i,JSON.stringify(C))},[l,i]),h=D.useCallback(S=>{const C={...l,scheme:S};d(C),localStorage.setItem(i,JSON.stringify(C))},[l,i]),y={mode:l.mode,scheme:l.scheme,setMode:p,setScheme:h,resolvedMode:a};return g.jsx(jx.Provider,{...o,value:y,children:t})}const yE=()=>{const t=D.useContext(jx);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t};var Tm={exports:{}},Rm={};/**
50
+ * @license React
51
+ * react-compiler-runtime.production.js
52
+ *
53
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
54
+ *
55
+ * This source code is licensed under the MIT license found in the
56
+ * LICENSE file in the root directory of this source tree.
57
+ */var E0;function bE(){if(E0)return Rm;E0=1;var t=Vf().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Rm.c=function(e){return t.H.useMemoCache(e)},Rm}var A0;function xE(){return A0||(A0=1,Tm.exports=bE()),Tm.exports}var me=xE();/**
58
+ * @license lucide-react v0.577.0 - ISC
59
+ *
60
+ * This source code is licensed under the ISC license.
61
+ * See the LICENSE file in the root directory of this source tree.
62
+ */const Ox=(...t)=>t.filter((e,n,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===n).join(" ").trim();/**
63
+ * @license lucide-react v0.577.0 - ISC
64
+ *
65
+ * This source code is licensed under the ISC license.
66
+ * See the LICENSE file in the root directory of this source tree.
67
+ */const SE=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
68
+ * @license lucide-react v0.577.0 - ISC
69
+ *
70
+ * This source code is licensed under the ISC license.
71
+ * See the LICENSE file in the root directory of this source tree.
72
+ */const wE=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,i)=>i?i.toUpperCase():n.toLowerCase());/**
73
+ * @license lucide-react v0.577.0 - ISC
74
+ *
75
+ * This source code is licensed under the ISC license.
76
+ * See the LICENSE file in the root directory of this source tree.
77
+ */const T0=t=>{const e=wE(t);return e.charAt(0).toUpperCase()+e.slice(1)};/**
78
+ * @license lucide-react v0.577.0 - ISC
79
+ *
80
+ * This source code is licensed under the ISC license.
81
+ * See the LICENSE file in the root directory of this source tree.
82
+ */var CE={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"};/**
83
+ * @license lucide-react v0.577.0 - ISC
84
+ *
85
+ * This source code is licensed under the ISC license.
86
+ * See the LICENSE file in the root directory of this source tree.
87
+ */const kE=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};/**
88
+ * @license lucide-react v0.577.0 - ISC
89
+ *
90
+ * This source code is licensed under the ISC license.
91
+ * See the LICENSE file in the root directory of this source tree.
92
+ */const EE=D.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:o="",children:l,iconNode:d,...a},u)=>D.createElement("svg",{ref:u,...CE,width:e,height:e,stroke:t,strokeWidth:i?Number(n)*24/Number(e):n,className:Ox("lucide",o),...!l&&!kE(a)&&{"aria-hidden":"true"},...a},[...d.map(([f,p])=>D.createElement(f,p)),...Array.isArray(l)?l:[l]]));/**
93
+ * @license lucide-react v0.577.0 - ISC
94
+ *
95
+ * This source code is licensed under the ISC license.
96
+ * See the LICENSE file in the root directory of this source tree.
97
+ */const ze=(t,e)=>{const n=D.forwardRef(({className:i,...o},l)=>D.createElement(EE,{ref:l,iconNode:e,className:Ox(`lucide-${SE(T0(t))}`,`lucide-${t}`,i),...o}));return n.displayName=T0(t),n};/**
98
+ * @license lucide-react v0.577.0 - ISC
99
+ *
100
+ * This source code is licensed under the ISC license.
101
+ * See the LICENSE file in the root directory of this source tree.
102
+ */const AE=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],TE=ze("archive",AE);/**
103
+ * @license lucide-react v0.577.0 - ISC
104
+ *
105
+ * This source code is licensed under the ISC license.
106
+ * See the LICENSE file in the root directory of this source tree.
107
+ */const RE=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],NE=ze("arrow-left",RE);/**
108
+ * @license lucide-react v0.577.0 - ISC
109
+ *
110
+ * This source code is licensed under the ISC license.
111
+ * See the LICENSE file in the root directory of this source tree.
112
+ */const DE=[["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"}]],ME=ze("bot",DE);/**
113
+ * @license lucide-react v0.577.0 - ISC
114
+ *
115
+ * This source code is licensed under the ISC license.
116
+ * See the LICENSE file in the root directory of this source tree.
117
+ */const jE=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],vg=ze("box",jE);/**
118
+ * @license lucide-react v0.577.0 - ISC
119
+ *
120
+ * This source code is licensed under the ISC license.
121
+ * See the LICENSE file in the root directory of this source tree.
122
+ */const OE=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],LE=ze("brain",OE);/**
123
+ * @license lucide-react v0.577.0 - ISC
124
+ *
125
+ * This source code is licensed under the ISC license.
126
+ * See the LICENSE file in the root directory of this source tree.
127
+ */const IE=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],xs=ze("check",IE);/**
128
+ * @license lucide-react v0.577.0 - ISC
129
+ *
130
+ * This source code is licensed under the ISC license.
131
+ * See the LICENSE file in the root directory of this source tree.
132
+ */const BE=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],$l=ze("chevron-down",BE);/**
133
+ * @license lucide-react v0.577.0 - ISC
134
+ *
135
+ * This source code is licensed under the ISC license.
136
+ * See the LICENSE file in the root directory of this source tree.
137
+ */const zE=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],PE=ze("chevron-left",zE);/**
138
+ * @license lucide-react v0.577.0 - ISC
139
+ *
140
+ * This source code is licensed under the ISC license.
141
+ * See the LICENSE file in the root directory of this source tree.
142
+ */const FE=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],si=ze("chevron-right",FE);/**
143
+ * @license lucide-react v0.577.0 - ISC
144
+ *
145
+ * This source code is licensed under the ISC license.
146
+ * See the LICENSE file in the root directory of this source tree.
147
+ */const HE=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],UE=ze("chevron-up",HE);/**
148
+ * @license lucide-react v0.577.0 - ISC
149
+ *
150
+ * This source code is licensed under the ISC license.
151
+ * See the LICENSE file in the root directory of this source tree.
152
+ */const $E=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Lx=ze("chevrons-up-down",$E);/**
153
+ * @license lucide-react v0.577.0 - ISC
154
+ *
155
+ * This source code is licensed under the ISC license.
156
+ * See the LICENSE file in the root directory of this source tree.
157
+ */const qE=[["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"}]],mu=ze("circle-alert",qE);/**
158
+ * @license lucide-react v0.577.0 - ISC
159
+ *
160
+ * This source code is licensed under the ISC license.
161
+ * See the LICENSE file in the root directory of this source tree.
162
+ */const VE=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Nu=ze("circle-check-big",VE);/**
163
+ * @license lucide-react v0.577.0 - ISC
164
+ *
165
+ * This source code is licensed under the ISC license.
166
+ * See the LICENSE file in the root directory of this source tree.
167
+ */const GE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],WE=ze("circle-check",GE);/**
168
+ * @license lucide-react v0.577.0 - ISC
169
+ *
170
+ * This source code is licensed under the ISC license.
171
+ * See the LICENSE file in the root directory of this source tree.
172
+ */const KE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Gf=ze("circle-x",KE);/**
173
+ * @license lucide-react v0.577.0 - ISC
174
+ *
175
+ * This source code is licensed under the ISC license.
176
+ * See the LICENSE file in the root directory of this source tree.
177
+ */const YE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],XE=ze("circle",YE);/**
178
+ * @license lucide-react v0.577.0 - ISC
179
+ *
180
+ * This source code is licensed under the ISC license.
181
+ * See the LICENSE file in the root directory of this source tree.
182
+ */const ZE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Ix=ze("clock",ZE);/**
183
+ * @license lucide-react v0.577.0 - ISC
184
+ *
185
+ * This source code is licensed under the ISC license.
186
+ * See the LICENSE file in the root directory of this source tree.
187
+ */const QE=[["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"}]],yu=ze("copy",QE);/**
188
+ * @license lucide-react v0.577.0 - ISC
189
+ *
190
+ * This source code is licensed under the ISC license.
191
+ * See the LICENSE file in the root directory of this source tree.
192
+ */const JE=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],e4=ze("cpu",JE);/**
193
+ * @license lucide-react v0.577.0 - ISC
194
+ *
195
+ * This source code is licensed under the ISC license.
196
+ * See the LICENSE file in the root directory of this source tree.
197
+ */const t4=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],n4=ze("ellipsis",t4);/**
198
+ * @license lucide-react v0.577.0 - ISC
199
+ *
200
+ * This source code is licensed under the ISC license.
201
+ * See the LICENSE file in the root directory of this source tree.
202
+ */const r4=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],_g=ze("external-link",r4);/**
203
+ * @license lucide-react v0.577.0 - ISC
204
+ *
205
+ * This source code is licensed under the ISC license.
206
+ * See the LICENSE file in the root directory of this source tree.
207
+ */const i4=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],s4=ze("eye-off",i4);/**
208
+ * @license lucide-react v0.577.0 - ISC
209
+ *
210
+ * This source code is licensed under the ISC license.
211
+ * See the LICENSE file in the root directory of this source tree.
212
+ */const o4=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],a4=ze("eye",o4);/**
213
+ * @license lucide-react v0.577.0 - ISC
214
+ *
215
+ * This source code is licensed under the ISC license.
216
+ * See the LICENSE file in the root directory of this source tree.
217
+ */const l4=[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],c4=ze("file-pen",l4);/**
218
+ * @license lucide-react v0.577.0 - ISC
219
+ *
220
+ * This source code is licensed under the ISC license.
221
+ * See the LICENSE file in the root directory of this source tree.
222
+ */const u4=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Zg=ze("file-text",u4);/**
223
+ * @license lucide-react v0.577.0 - ISC
224
+ *
225
+ * This source code is licensed under the ISC license.
226
+ * See the LICENSE file in the root directory of this source tree.
227
+ */const d4=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],Ci=ze("file",d4);/**
228
+ * @license lucide-react v0.577.0 - ISC
229
+ *
230
+ * This source code is licensed under the ISC license.
231
+ * See the LICENSE file in the root directory of this source tree.
232
+ */const f4=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],yg=ze("folder-open",f4);/**
233
+ * @license lucide-react v0.577.0 - ISC
234
+ *
235
+ * This source code is licensed under the ISC license.
236
+ * See the LICENSE file in the root directory of this source tree.
237
+ */const h4=[["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"}]],vo=ze("folder",h4);/**
238
+ * @license lucide-react v0.577.0 - ISC
239
+ *
240
+ * This source code is licensed under the ISC license.
241
+ * See the LICENSE file in the root directory of this source tree.
242
+ */const p4=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],m4=ze("git-branch",p4);/**
243
+ * @license lucide-react v0.577.0 - ISC
244
+ *
245
+ * This source code is licensed under the ISC license.
246
+ * See the LICENSE file in the root directory of this source tree.
247
+ */const g4=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],R0=ze("info",g4);/**
248
+ * @license lucide-react v0.577.0 - ISC
249
+ *
250
+ * This source code is licensed under the ISC license.
251
+ * See the LICENSE file in the root directory of this source tree.
252
+ */const v4=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],_4=ze("keyboard",v4);/**
253
+ * @license lucide-react v0.577.0 - ISC
254
+ *
255
+ * This source code is licensed under the ISC license.
256
+ * See the LICENSE file in the root directory of this source tree.
257
+ */const y4=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],b4=ze("layout-grid",y4);/**
258
+ * @license lucide-react v0.577.0 - ISC
259
+ *
260
+ * This source code is licensed under the ISC license.
261
+ * See the LICENSE file in the root directory of this source tree.
262
+ */const x4=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]],S4=ze("layout-list",x4);/**
263
+ * @license lucide-react v0.577.0 - ISC
264
+ *
265
+ * This source code is licensed under the ISC license.
266
+ * See the LICENSE file in the root directory of this source tree.
267
+ */const w4=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],C4=ze("link-2",w4);/**
268
+ * @license lucide-react v0.577.0 - ISC
269
+ *
270
+ * This source code is licensed under the ISC license.
271
+ * See the LICENSE file in the root directory of this source tree.
272
+ */const k4=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],gr=ze("loader-circle",k4);/**
273
+ * @license lucide-react v0.577.0 - ISC
274
+ *
275
+ * This source code is licensed under the ISC license.
276
+ * See the LICENSE file in the root directory of this source tree.
277
+ */const E4=[["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"}]],A4=ze("lock",E4);/**
278
+ * @license lucide-react v0.577.0 - ISC
279
+ *
280
+ * This source code is licensed under the ISC license.
281
+ * See the LICENSE file in the root directory of this source tree.
282
+ */const T4=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],R4=ze("message-square",T4);/**
283
+ * @license lucide-react v0.577.0 - ISC
284
+ *
285
+ * This source code is licensed under the ISC license.
286
+ * See the LICENSE file in the root directory of this source tree.
287
+ */const N4=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],Bx=ze("minimize-2",N4);/**
288
+ * @license lucide-react v0.577.0 - ISC
289
+ *
290
+ * This source code is licensed under the ISC license.
291
+ * See the LICENSE file in the root directory of this source tree.
292
+ */const D4=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],M4=ze("monitor",D4);/**
293
+ * @license lucide-react v0.577.0 - ISC
294
+ *
295
+ * This source code is licensed under the ISC license.
296
+ * See the LICENSE file in the root directory of this source tree.
297
+ */const j4=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],O4=ze("moon",j4);/**
298
+ * @license lucide-react v0.577.0 - ISC
299
+ *
300
+ * This source code is licensed under the ISC license.
301
+ * See the LICENSE file in the root directory of this source tree.
302
+ */const L4=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],I4=ze("palette",L4);/**
303
+ * @license lucide-react v0.577.0 - ISC
304
+ *
305
+ * This source code is licensed under the ISC license.
306
+ * See the LICENSE file in the root directory of this source tree.
307
+ */const B4=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],z4=ze("panel-left",B4);/**
308
+ * @license lucide-react v0.577.0 - ISC
309
+ *
310
+ * This source code is licensed under the ISC license.
311
+ * See the LICENSE file in the root directory of this source tree.
312
+ */const P4=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],zx=ze("pause",P4);/**
313
+ * @license lucide-react v0.577.0 - ISC
314
+ *
315
+ * This source code is licensed under the ISC license.
316
+ * See the LICENSE file in the root directory of this source tree.
317
+ */const F4=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]],H4=ze("plug-zap",F4);/**
318
+ * @license lucide-react v0.577.0 - ISC
319
+ *
320
+ * This source code is licensed under the ISC license.
321
+ * See the LICENSE file in the root directory of this source tree.
322
+ */const U4=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],$4=ze("plug",U4);/**
323
+ * @license lucide-react v0.577.0 - ISC
324
+ *
325
+ * This source code is licensed under the ISC license.
326
+ * See the LICENSE file in the root directory of this source tree.
327
+ */const q4=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ql=ze("plus",q4);/**
328
+ * @license lucide-react v0.577.0 - ISC
329
+ *
330
+ * This source code is licensed under the ISC license.
331
+ * See the LICENSE file in the root directory of this source tree.
332
+ */const V4=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Tl=ze("refresh-cw",V4);/**
333
+ * @license lucide-react v0.577.0 - ISC
334
+ *
335
+ * This source code is licensed under the ISC license.
336
+ * See the LICENSE file in the root directory of this source tree.
337
+ */const G4=[["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"}]],Px=ze("rotate-ccw",G4);/**
338
+ * @license lucide-react v0.577.0 - ISC
339
+ *
340
+ * This source code is licensed under the ISC license.
341
+ * See the LICENSE file in the root directory of this source tree.
342
+ */const W4=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Qg=ze("search",W4);/**
343
+ * @license lucide-react v0.577.0 - ISC
344
+ *
345
+ * This source code is licensed under the ISC license.
346
+ * See the LICENSE file in the root directory of this source tree.
347
+ */const K4=[["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"}]],Y4=ze("send",K4);/**
348
+ * @license lucide-react v0.577.0 - ISC
349
+ *
350
+ * This source code is licensed under the ISC license.
351
+ * See the LICENSE file in the root directory of this source tree.
352
+ */const X4=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],fa=ze("server",X4);/**
353
+ * @license lucide-react v0.577.0 - ISC
354
+ *
355
+ * This source code is licensed under the ISC license.
356
+ * See the LICENSE file in the root directory of this source tree.
357
+ */const Z4=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Fx=ze("settings",Z4);/**
358
+ * @license lucide-react v0.577.0 - ISC
359
+ *
360
+ * This source code is licensed under the ISC license.
361
+ * See the LICENSE file in the root directory of this source tree.
362
+ */const Q4=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Hx=ze("shield",Q4);/**
363
+ * @license lucide-react v0.577.0 - ISC
364
+ *
365
+ * This source code is licensed under the ISC license.
366
+ * See the LICENSE file in the root directory of this source tree.
367
+ */const J4=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],N0=ze("square-terminal",J4);/**
368
+ * @license lucide-react v0.577.0 - ISC
369
+ *
370
+ * This source code is licensed under the ISC license.
371
+ * See the LICENSE file in the root directory of this source tree.
372
+ */const e5=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Ux=ze("square",e5);/**
373
+ * @license lucide-react v0.577.0 - ISC
374
+ *
375
+ * This source code is licensed under the ISC license.
376
+ * See the LICENSE file in the root directory of this source tree.
377
+ */const t5=[["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"}]],D0=ze("star",t5);/**
378
+ * @license lucide-react v0.577.0 - ISC
379
+ *
380
+ * This source code is licensed under the ISC license.
381
+ * See the LICENSE file in the root directory of this source tree.
382
+ */const n5=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],r5=ze("sun",n5);/**
383
+ * @license lucide-react v0.577.0 - ISC
384
+ *
385
+ * This source code is licensed under the ISC license.
386
+ * See the LICENSE file in the root directory of this source tree.
387
+ */const i5=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],M0=ze("terminal",i5);/**
388
+ * @license lucide-react v0.577.0 - ISC
389
+ *
390
+ * This source code is licensed under the ISC license.
391
+ * See the LICENSE file in the root directory of this source tree.
392
+ */const s5=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Du=ze("trash-2",s5);/**
393
+ * @license lucide-react v0.577.0 - ISC
394
+ *
395
+ * This source code is licensed under the ISC license.
396
+ * See the LICENSE file in the root directory of this source tree.
397
+ */const o5=[["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"}]],bu=ze("triangle-alert",o5);/**
398
+ * @license lucide-react v0.577.0 - ISC
399
+ *
400
+ * This source code is licensed under the ISC license.
401
+ * See the LICENSE file in the root directory of this source tree.
402
+ */const a5=[["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"}]],l5=ze("undo-2",a5);/**
403
+ * @license lucide-react v0.577.0 - ISC
404
+ *
405
+ * This source code is licensed under the ISC license.
406
+ * See the LICENSE file in the root directory of this source tree.
407
+ */const c5=[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]],u5=ze("unplug",c5);/**
408
+ * @license lucide-react v0.577.0 - ISC
409
+ *
410
+ * This source code is licensed under the ISC license.
411
+ * See the LICENSE file in the root directory of this source tree.
412
+ */const d5=[["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"}]],$x=ze("user",d5);/**
413
+ * @license lucide-react v0.577.0 - ISC
414
+ *
415
+ * This source code is licensed under the ISC license.
416
+ * See the LICENSE file in the root directory of this source tree.
417
+ */const f5=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],qx=ze("wifi-off",f5);/**
418
+ * @license lucide-react v0.577.0 - ISC
419
+ *
420
+ * This source code is licensed under the ISC license.
421
+ * See the LICENSE file in the root directory of this source tree.
422
+ */const h5=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],p5=ze("wifi",h5);/**
423
+ * @license lucide-react v0.577.0 - ISC
424
+ *
425
+ * This source code is licensed under the ISC license.
426
+ * See the LICENSE file in the root directory of this source tree.
427
+ */const m5=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],g5=ze("wrench",m5);/**
428
+ * @license lucide-react v0.577.0 - ISC
429
+ *
430
+ * This source code is licensed under the ISC license.
431
+ * See the LICENSE file in the root directory of this source tree.
432
+ */const v5=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],bs=ze("x",v5);/**
433
+ * @license lucide-react v0.577.0 - ISC
434
+ *
435
+ * This source code is licensed under the ISC license.
436
+ * See the LICENSE file in the root directory of this source tree.
437
+ */const _5=[["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"}]],Nm=ze("zap",_5);function y5(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}async function Jg(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}var j0;(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_CREATED="tauri://window-created",t.WEBVIEW_CREATED="tauri://webview-created",t.DRAG_ENTER="tauri://drag-enter",t.DRAG_OVER="tauri://drag-over",t.DRAG_DROP="tauri://drag-drop",t.DRAG_LEAVE="tauri://drag-leave"})(j0||(j0={}));async function b5(t,e){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(t,e),await Jg("plugin:event|unlisten",{event:t,eventId:e})}async function O0(t,e,n){var i;const o=(i=void 0)!==null&&i!==void 0?i:{kind:"Any"};return Jg("plugin:event|listen",{event:t,target:o,handler:y5(e)}).then(l=>async()=>b5(t,l))}const Pr={SERVERS:"jean2_servers",ACTIVE_SERVER_ID:"jean2_active_server_id",QUICK_CONNECTIONS:"jean2_quick_connections"};function _s(){try{const t=localStorage.getItem(Pr.SERVERS);return t?JSON.parse(t):[]}catch(t){return console.error("Error reading saved servers from localStorage:",t),[]}}function x5(t){return _s().find(n=>n.id===t)||null}function S5(t){try{const e=_s();e.push(t),localStorage.setItem(Pr.SERVERS,JSON.stringify(e))}catch(e){console.error("Error saving server to localStorage:",e)}}function w5(t,e){try{const n=_s(),i=n.findIndex(o=>o.id===t);if(i===-1){console.error("Server not found:",t);return}n[i]={...n[i],...e},localStorage.setItem(Pr.SERVERS,JSON.stringify(n))}catch(n){console.error("Error updating server in localStorage:",n)}}function C5(t){try{const n=_s().filter(d=>d.id!==t);localStorage.setItem(Pr.SERVERS,JSON.stringify(n));const o=ys().filter(d=>d.serverId!==t);localStorage.setItem(Pr.QUICK_CONNECTIONS,JSON.stringify(o)),Vx()===t&&localStorage.removeItem(Pr.ACTIVE_SERVER_ID)}catch(e){console.error("Error deleting server from localStorage:",e)}}function Vx(){try{return localStorage.getItem(Pr.ACTIVE_SERVER_ID)}catch(t){return console.error("Error reading active server ID from localStorage:",t),null}}function Dm(t){try{localStorage.setItem(Pr.ACTIVE_SERVER_ID,t)}catch(e){console.error("Error setting active server ID in localStorage:",e)}}function L0(){const t=Vx();return t?x5(t):null}function ys(){try{const t=localStorage.getItem(Pr.QUICK_CONNECTIONS);return t?JSON.parse(t):[]}catch(t){return console.error("Error reading quick connections from localStorage:",t),[]}}function k5(t){const e=ys(),n=e.reduce((o,l)=>Math.max(o,l.order),-1),i={...t,id:crypto.randomUUID(),order:n+1};e.push(i);try{localStorage.setItem(Pr.QUICK_CONNECTIONS,JSON.stringify(e))}catch(o){console.error("Error saving quick connection to localStorage:",o)}return i}function E5(t){try{const n=ys().filter(i=>i.id!==t);localStorage.setItem(Pr.QUICK_CONNECTIONS,JSON.stringify(n))}catch(e){console.error("Error removing quick connection from localStorage:",e)}}function A5(t){try{const e=ys(),n=new Map(e.map(i=>[i.id,i]));t.forEach((i,o)=>{const l=n.get(i);l&&(l.order=o)}),localStorage.setItem(Pr.QUICK_CONNECTIONS,JSON.stringify(e))}catch(e){console.error("Error reordering quick connections in localStorage:",e)}}function Gx(t){return/^[a-f0-9]{64}$/.test(t)}function T5(t){return t.length<12?t:`${t.slice(0,4)}...${t.slice(-4)}`}function wf(t){let e=t.trim();return e=e.replace(/^(https?:\/\/|wss?:\/\/)/i,""),e=e.replace(/\/+$/,""),e}const Wx=D.createContext(null),R5=t=>{const e=me.c(30),{children:n}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=[],e[0]=i):i=e[0];const[o,l]=D.useState(i),[d,a]=D.useState(null);let u;e[1]===Symbol.for("react.memo_cache_sentinel")?(u=[],e[1]=u):u=e[1];const[f,p]=D.useState(u),[h,y]=D.useState(!1),S=D.useRef(null);let C,w;e[2]===Symbol.for("react.memo_cache_sentinel")?(C=()=>{const I=_s(),L=L0(),B=ys();l(I),a(L),p(B)},w=[],e[2]=C,e[3]=w):(C=e[2],w=e[3]),D.useEffect(C,w);let _;e[4]!==o?(_=(I,L,B)=>{const H=wf(L),P={id:crypto.randomUUID(),name:I,url:H,token:B,createdAt:new Date().toISOString()};return S5(P),l(_s()),o.length===0&&(Dm(P.id),a(P)),P},e[4]=o,e[5]=_):_=e[5];const v=_;let b;e[6]!==(d==null?void 0:d.id)?(b=(I,L)=>{const B={...L,...L.url&&{url:wf(L.url)}};w5(I,B),l(_s()),(d==null?void 0:d.id)===I&&a(L0())},e[6]=d==null?void 0:d.id,e[7]=b):b=e[7];const x=b;let E;e[8]!==(d==null?void 0:d.id)?(E=I=>{const L=(d==null?void 0:d.id)===I;if(C5(I),l(_s()),L){const B=_s(),H=B.length>0?B[0]:null;H?(Dm(H.id),a(H)):a(null)}p(ys())},e[8]=d==null?void 0:d.id,e[9]=E):E=e[9];const N=E;let A;e[10]!==(d==null?void 0:d.id)||e[11]!==h||e[12]!==o?(A=I=>(S.current&&(clearTimeout(S.current),S.current=null),h&&(d==null?void 0:d.id)===I?!1:(h&&y(!1),y(!0),S.current=setTimeout(()=>{Dm(I);const L=o.find(B=>B.id===I)||null;a(L),y(!1)},100),!0)),e[10]=d==null?void 0:d.id,e[11]=h,e[12]=o,e[13]=A):A=e[13];const M=A;let T;e[14]===Symbol.for("react.memo_cache_sentinel")?(T=()=>{y(!1)},e[14]=T):T=e[14];const j=T;let O;e[15]===Symbol.for("react.memo_cache_sentinel")?(O=(I,L,B,H)=>{k5({serverId:I,serverName:L,workspaceId:B,workspaceName:H}),p(ys())},e[15]=O):O=e[15];const F=O;let U;e[16]===Symbol.for("react.memo_cache_sentinel")?(U=I=>{E5(I),p(ys())},e[16]=U):U=e[16];const $=U;let G;e[17]===Symbol.for("react.memo_cache_sentinel")?(G=I=>{A5(I),p(ys())},e[17]=G):G=e[17];const K=G;let V;e[18]!==d||e[19]!==v||e[20]!==x||e[21]!==h||e[22]!==f||e[23]!==N||e[24]!==o||e[25]!==M?(V={servers:o,activeServer:d,quickConnections:f,isSwitching:h,addServer:v,editServer:x,removeServer:N,switchServer:M,clearSwitchingState:j,addToQuickConnections:F,removeFromQuickConnections:$,reorderQuick:K},e[18]=d,e[19]=v,e[20]=x,e[21]=h,e[22]=f,e[23]=N,e[24]=o,e[25]=M,e[26]=V):V=e[26];const X=V;let Z;return e[27]!==n||e[28]!==X?(Z=g.jsx(Wx.Provider,{value:X,children:n}),e[27]=n,e[28]=X,e[29]=Z):Z=e[29],Z},Vl=()=>{const t=D.useContext(Wx);if(t===null)throw new Error("useServerContext must be used within a ServerProvider");return t};function Kx(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=Kx(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function Wf(){for(var t,e,n=0,i="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Kx(t))&&(i&&(i+=" "),i+=e);return i}const I0=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,B0=Wf,Gl=(t,e)=>n=>{var i;if((e==null?void 0:e.variants)==null)return B0(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:l}=e,d=Object.keys(o).map(f=>{const p=n==null?void 0:n[f],h=l==null?void 0:l[f];if(p===null)return null;const y=I0(p)||I0(h);return o[f][y]}),a=n&&Object.entries(n).reduce((f,p)=>{let[h,y]=p;return y===void 0||(f[h]=y),f},{}),u=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((f,p)=>{let{class:h,className:y,...S}=p;return Object.entries(S).every(C=>{let[w,_]=C;return Array.isArray(_)?_.includes({...l,...a}[w]):{...l,...a}[w]===_})?[...f,h,y]:f},[]);return B0(t,d,u,n==null?void 0:n.class,n==null?void 0:n.className)};var Mu=Dx();const N5=qf(Mu);function z0(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Ss(...t){return e=>{let n=!1;const i=t.map(o=>{const l=z0(o,e);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let o=0;o<i.length;o++){const l=i[o];typeof l=="function"?l():z0(t[o],null)}}}}function _t(...t){return D.useCallback(Ss(...t),t)}function _o(t){const e=D5(t),n=D.forwardRef((i,o)=>{const{children:l,...d}=i,a=D.Children.toArray(l),u=a.find(j5);if(u){const f=u.props.children,p=a.map(h=>h===u?D.Children.count(f)>1?D.Children.only(null):D.isValidElement(f)?f.props.children:null:h);return g.jsx(e,{...d,ref:o,children:D.isValidElement(f)?D.cloneElement(f,void 0,p):null})}return g.jsx(e,{...d,ref:o,children:l})});return n.displayName=`${t}.Slot`,n}var ju=_o("Slot");function D5(t){const e=D.forwardRef((n,i)=>{const{children:o,...l}=n;if(D.isValidElement(o)){const d=L5(o),a=O5(l,o.props);return o.type!==D.Fragment&&(a.ref=i?Ss(i,d):d),D.cloneElement(o,a)}return D.Children.count(o)>1?D.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Yx=Symbol("radix.slottable");function M5(t){const e=({children:n})=>g.jsx(g.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=Yx,e}function j5(t){return D.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Yx}function O5(t,e){const n={...e};for(const i in e){const o=t[i],l=e[i];/^on[A-Z]/.test(i)?o&&l?n[i]=(...a)=>{const u=l(...a);return o(...a),u}:o&&(n[i]=o):i==="style"?n[i]={...o,...l}:i==="className"&&(n[i]=[o,l].filter(Boolean).join(" "))}return{...t,...n}}function L5(t){var i,o;let e=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var I5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qe=I5.reduce((t,e)=>{const n=_o(`Primitive.${e}`),i=D.forwardRef((o,l)=>{const{asChild:d,...a}=o,u=d?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(u,{...a,ref:l})});return i.displayName=`Primitive.${e}`,{...t,[e]:i}},{});function Xx(t,e){t&&Mu.flushSync(()=>t.dispatchEvent(e))}var Zx=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),B5="VisuallyHidden",Qx=D.forwardRef((t,e)=>g.jsx(qe.span,{...t,ref:e,style:{...Zx,...t.style}}));Qx.displayName=B5;var z5=Qx;function P5(t,e){const n=D.createContext(e),i=l=>{const{children:d,...a}=l,u=D.useMemo(()=>a,Object.values(a));return g.jsx(n.Provider,{value:u,children:d})};i.displayName=t+"Provider";function o(l){const d=D.useContext(n);if(d)return d;if(e!==void 0)return e;throw new Error(`\`${l}\` must be used within \`${t}\``)}return[i,o]}function yr(t,e=[]){let n=[];function i(l,d){const a=D.createContext(d),u=n.length;n=[...n,d];const f=h=>{var v;const{scope:y,children:S,...C}=h,w=((v=y==null?void 0:y[t])==null?void 0:v[u])||a,_=D.useMemo(()=>C,Object.values(C));return g.jsx(w.Provider,{value:_,children:S})};f.displayName=l+"Provider";function p(h,y){var w;const S=((w=y==null?void 0:y[t])==null?void 0:w[u])||a,C=D.useContext(S);if(C)return C;if(d!==void 0)return d;throw new Error(`\`${h}\` must be used within \`${l}\``)}return[f,p]}const o=()=>{const l=n.map(d=>D.createContext(d));return function(a){const u=(a==null?void 0:a[t])||l;return D.useMemo(()=>({[`__scope${t}`]:{...a,[t]:u}}),[a,u])}};return o.scopeName=t,[i,F5(o,...e)]}function F5(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const i=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(l){const d=i.reduce((a,{useScope:u,scopeName:f})=>{const h=u(l)[`__scope${f}`];return{...a,...h}},{});return D.useMemo(()=>({[`__scope${e.scopeName}`]:d}),[d])}};return n.scopeName=e.scopeName,n}function ev(t){const e=t+"CollectionProvider",[n,i]=yr(e),[o,l]=n(e,{collectionRef:{current:null},itemMap:new Map}),d=w=>{const{scope:_,children:v}=w,b=Br.useRef(null),x=Br.useRef(new Map).current;return g.jsx(o,{scope:_,itemMap:x,collectionRef:b,children:v})};d.displayName=e;const a=t+"CollectionSlot",u=_o(a),f=Br.forwardRef((w,_)=>{const{scope:v,children:b}=w,x=l(a,v),E=_t(_,x.collectionRef);return g.jsx(u,{ref:E,children:b})});f.displayName=a;const p=t+"CollectionItemSlot",h="data-radix-collection-item",y=_o(p),S=Br.forwardRef((w,_)=>{const{scope:v,children:b,...x}=w,E=Br.useRef(null),N=_t(_,E),A=l(p,v);return Br.useEffect(()=>(A.itemMap.set(E,{ref:E,...x}),()=>void A.itemMap.delete(E))),g.jsx(y,{[h]:"",ref:N,children:b})});S.displayName=p;function C(w){const _=l(t+"CollectionConsumer",w);return Br.useCallback(()=>{const b=_.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${h}]`));return Array.from(_.itemMap.values()).sort((A,M)=>x.indexOf(A.ref.current)-x.indexOf(M.ref.current))},[_.collectionRef,_.itemMap])}return[{Provider:d,Slot:f,ItemSlot:S},C,i]}function je(t,e,{checkForDefaultPrevented:n=!0}={}){return function(o){if(t==null||t(o),n===!1||!o.defaultPrevented)return e==null?void 0:e(o)}}var wn=globalThis!=null&&globalThis.document?D.useLayoutEffect:()=>{},H5=Nx[" useInsertionEffect ".trim().toString()]||wn;function ws({prop:t,defaultProp:e,onChange:n=()=>{},caller:i}){const[o,l,d]=U5({defaultProp:e,onChange:n}),a=t!==void 0,u=a?t:o;{const p=D.useRef(t!==void 0);D.useEffect(()=>{const h=p.current;h!==a&&console.warn(`${i} is changing from ${h?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=a},[a,i])}const f=D.useCallback(p=>{var h;if(a){const y=$5(p)?p(t):p;y!==t&&((h=d.current)==null||h.call(d,y))}else l(p)},[a,t,l,d]);return[u,f]}function U5({defaultProp:t,onChange:e}){const[n,i]=D.useState(t),o=D.useRef(n),l=D.useRef(e);return H5(()=>{l.current=e},[e]),D.useEffect(()=>{var d;o.current!==n&&((d=l.current)==null||d.call(l,n),o.current=n)},[n,o]),[n,i,l]}function $5(t){return typeof t=="function"}function q5(t,e){return D.useReducer((n,i)=>{const o=e[n][i];return o!=null?o:n},t)}var Cn=t=>{const{present:e,children:n}=t,i=V5(e),o=typeof n=="function"?n({present:i.isPresent}):D.Children.only(n),l=_t(i.ref,G5(o));return typeof n=="function"||i.isPresent?D.cloneElement(o,{ref:l}):null};Cn.displayName="Presence";function V5(t){const[e,n]=D.useState(),i=D.useRef(null),o=D.useRef(t),l=D.useRef("none"),d=t?"mounted":"unmounted",[a,u]=q5(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return D.useEffect(()=>{const f=nf(i.current);l.current=a==="mounted"?f:"none"},[a]),wn(()=>{const f=i.current,p=o.current;if(p!==t){const y=l.current,S=nf(f);t?u("MOUNT"):S==="none"||(f==null?void 0:f.display)==="none"?u("UNMOUNT"):u(p&&y!==S?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,u]),wn(()=>{var f;if(e){let p;const h=(f=e.ownerDocument.defaultView)!=null?f:window,y=C=>{const _=nf(i.current).includes(CSS.escape(C.animationName));if(C.target===e&&_&&(u("ANIMATION_END"),!o.current)){const v=e.style.animationFillMode;e.style.animationFillMode="forwards",p=h.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=v)})}},S=C=>{C.target===e&&(l.current=nf(i.current))};return e.addEventListener("animationstart",S),e.addEventListener("animationcancel",y),e.addEventListener("animationend",y),()=>{h.clearTimeout(p),e.removeEventListener("animationstart",S),e.removeEventListener("animationcancel",y),e.removeEventListener("animationend",y)}}else u("ANIMATION_END")},[e,u]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:D.useCallback(f=>{i.current=f?getComputedStyle(f):null,n(f)},[])}}function nf(t){return(t==null?void 0:t.animationName)||"none"}function G5(t){var i,o;let e=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(o=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:o.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var W5=Nx[" useId ".trim().toString()]||(()=>{}),K5=0;function gn(t){const[e,n]=D.useState(W5());return wn(()=>{n(i=>i!=null?i:String(K5++))},[t]),e?`radix-${e}`:""}var Kf="Collapsible",[Y5]=yr(Kf),[X5,tv]=Y5(Kf),Jx=D.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:i,defaultOpen:o,disabled:l,onOpenChange:d,...a}=t,[u,f]=ws({prop:i,defaultProp:o!=null?o:!1,onChange:d,caller:Kf});return g.jsx(X5,{scope:n,disabled:l,contentId:gn(),open:u,onOpenToggle:D.useCallback(()=>f(p=>!p),[f]),children:g.jsx(qe.div,{"data-state":rv(u),"data-disabled":l?"":void 0,...a,ref:e})})});Jx.displayName=Kf;var eS="CollapsibleTrigger",tS=D.forwardRef((t,e)=>{const{__scopeCollapsible:n,...i}=t,o=tv(eS,n);return g.jsx(qe.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":rv(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...i,ref:e,onClick:je(t.onClick,o.onOpenToggle)})});tS.displayName=eS;var nv="CollapsibleContent",nS=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=tv(nv,t.__scopeCollapsible);return g.jsx(Cn,{present:n||o.open,children:({present:l})=>g.jsx(Z5,{...i,ref:e,present:l})})});nS.displayName=nv;var Z5=D.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:i,children:o,...l}=t,d=tv(nv,n),[a,u]=D.useState(i),f=D.useRef(null),p=_t(e,f),h=D.useRef(0),y=h.current,S=D.useRef(0),C=S.current,w=d.open||a,_=D.useRef(w),v=D.useRef(void 0);return D.useEffect(()=>{const b=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(b)},[]),wn(()=>{const b=f.current;if(b){v.current=v.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const x=b.getBoundingClientRect();h.current=x.height,S.current=x.width,_.current||(b.style.transitionDuration=v.current.transitionDuration,b.style.animationName=v.current.animationName),u(i)}},[d.open,i]),g.jsx(qe.div,{"data-state":rv(d.open),"data-disabled":d.disabled?"":void 0,id:d.contentId,hidden:!w,...l,ref:p,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":C?`${C}px`:void 0,...t.style},children:w&&o})});function rv(t){return t?"open":"closed"}var Q5=Jx,J5=D.createContext(void 0);function Ou(t){const e=D.useContext(J5);return t||e||"ltr"}function Mn(t){const e=D.useRef(t);return D.useEffect(()=>{e.current=t}),D.useMemo(()=>(...n)=>{var i;return(i=e.current)==null?void 0:i.call(e,...n)},[])}function eA(t,e=globalThis==null?void 0:globalThis.document){const n=Mn(t);D.useEffect(()=>{const i=o=>{o.key==="Escape"&&n(o)};return e.addEventListener("keydown",i,{capture:!0}),()=>e.removeEventListener("keydown",i,{capture:!0})},[n,e])}var tA="DismissableLayer",bg="dismissableLayer.update",nA="dismissableLayer.pointerDownOutside",rA="dismissableLayer.focusOutside",P0,rS=D.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Wl=D.forwardRef((t,e)=>{var M;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:d,onDismiss:a,...u}=t,f=D.useContext(rS),[p,h]=D.useState(null),y=(M=p==null?void 0:p.ownerDocument)!=null?M:globalThis==null?void 0:globalThis.document,[,S]=D.useState({}),C=_t(e,T=>h(T)),w=Array.from(f.layers),[_]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),v=w.indexOf(_),b=p?w.indexOf(p):-1,x=f.layersWithOutsidePointerEventsDisabled.size>0,E=b>=v,N=oA(T=>{const j=T.target,O=[...f.branches].some(F=>F.contains(j));!E||O||(o==null||o(T),d==null||d(T),T.defaultPrevented||a==null||a())},y),A=aA(T=>{const j=T.target;[...f.branches].some(F=>F.contains(j))||(l==null||l(T),d==null||d(T),T.defaultPrevented||a==null||a())},y);return eA(T=>{b===f.layers.size-1&&(i==null||i(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},y),D.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(P0=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),F0(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=P0)}},[p,y,n,f]),D.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),F0())},[p,f]),D.useEffect(()=>{const T=()=>S({});return document.addEventListener(bg,T),()=>document.removeEventListener(bg,T)},[]),g.jsx(qe.div,{...u,ref:C,style:{pointerEvents:x?E?"auto":"none":void 0,...t.style},onFocusCapture:je(t.onFocusCapture,A.onFocusCapture),onBlurCapture:je(t.onBlurCapture,A.onBlurCapture),onPointerDownCapture:je(t.onPointerDownCapture,N.onPointerDownCapture)})});Wl.displayName=tA;var iA="DismissableLayerBranch",sA=D.forwardRef((t,e)=>{const n=D.useContext(rS),i=D.useRef(null),o=_t(e,i);return D.useEffect(()=>{const l=i.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),g.jsx(qe.div,{...t,ref:o})});sA.displayName=iA;function oA(t,e=globalThis==null?void 0:globalThis.document){const n=Mn(t),i=D.useRef(!1),o=D.useRef(()=>{});return D.useEffect(()=>{const l=a=>{if(a.target&&!i.current){let u=function(){iS(nA,n,f,{discrete:!0})};const f={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",o.current),o.current=u,e.addEventListener("click",o.current,{once:!0})):u()}else e.removeEventListener("click",o.current);i.current=!1},d=window.setTimeout(()=>{e.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(d),e.removeEventListener("pointerdown",l),e.removeEventListener("click",o.current)}},[e,n]),{onPointerDownCapture:()=>i.current=!0}}function aA(t,e=globalThis==null?void 0:globalThis.document){const n=Mn(t),i=D.useRef(!1);return D.useEffect(()=>{const o=l=>{l.target&&!i.current&&iS(rA,n,{originalEvent:l},{discrete:!1})};return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[e,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function F0(){const t=new CustomEvent(bg);document.dispatchEvent(t)}function iS(t,e,n,{discrete:i}){const o=n.originalEvent.target,l=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&o.addEventListener(t,e,{once:!0}),i?Xx(o,l):o.dispatchEvent(l)}var Mm="focusScope.autoFocusOnMount",jm="focusScope.autoFocusOnUnmount",H0={bubbles:!1,cancelable:!0},lA="FocusScope",Lu=D.forwardRef((t,e)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:o,onUnmountAutoFocus:l,...d}=t,[a,u]=D.useState(null),f=Mn(o),p=Mn(l),h=D.useRef(null),y=_t(e,w=>u(w)),S=D.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;D.useEffect(()=>{if(i){let w=function(x){if(S.paused||!a)return;const E=x.target;a.contains(E)?h.current=E:go(h.current,{select:!0})},_=function(x){if(S.paused||!a)return;const E=x.relatedTarget;E!==null&&(a.contains(E)||go(h.current,{select:!0}))},v=function(x){if(document.activeElement===document.body)for(const N of x)N.removedNodes.length>0&&go(a)};document.addEventListener("focusin",w),document.addEventListener("focusout",_);const b=new MutationObserver(v);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",_),b.disconnect()}}},[i,a,S.paused]),D.useEffect(()=>{if(a){$0.add(S);const w=document.activeElement;if(!a.contains(w)){const v=new CustomEvent(Mm,H0);a.addEventListener(Mm,f),a.dispatchEvent(v),v.defaultPrevented||(cA(pA(sS(a)),{select:!0}),document.activeElement===w&&go(a))}return()=>{a.removeEventListener(Mm,f),setTimeout(()=>{const v=new CustomEvent(jm,H0);a.addEventListener(jm,p),a.dispatchEvent(v),v.defaultPrevented||go(w!=null?w:document.body,{select:!0}),a.removeEventListener(jm,p),$0.remove(S)},0)}}},[a,f,p,S]);const C=D.useCallback(w=>{if(!n&&!i||S.paused)return;const _=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,v=document.activeElement;if(_&&v){const b=w.currentTarget,[x,E]=uA(b);x&&E?!w.shiftKey&&v===E?(w.preventDefault(),n&&go(x,{select:!0})):w.shiftKey&&v===x&&(w.preventDefault(),n&&go(E,{select:!0})):v===b&&w.preventDefault()}},[n,i,S.paused]);return g.jsx(qe.div,{tabIndex:-1,...d,ref:y,onKeyDown:C})});Lu.displayName=lA;function cA(t,{select:e=!1}={}){const n=document.activeElement;for(const i of t)if(go(i,{select:e}),document.activeElement!==n)return}function uA(t){const e=sS(t),n=U0(e,t),i=U0(e.reverse(),t);return[n,i]}function sS(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const o=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||o?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function U0(t,e){for(const n of t)if(!dA(n,{upTo:e}))return n}function dA(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function fA(t){return t instanceof HTMLInputElement&&"select"in t}function go(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&fA(t)&&e&&t.select()}}var $0=hA();function hA(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=q0(t,e),t.unshift(e)},remove(e){var n;t=q0(t,e),(n=t[0])==null||n.resume()}}}function q0(t,e){const n=[...t],i=n.indexOf(e);return i!==-1&&n.splice(i,1),n}function pA(t){return t.filter(e=>e.tagName!=="A")}var mA="Portal",Kl=D.forwardRef((t,e)=>{var a;const{container:n,...i}=t,[o,l]=D.useState(!1);wn(()=>l(!0),[]);const d=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return d?N5.createPortal(g.jsx(qe.div,{...i,ref:e}),d):null});Kl.displayName=mA;var Om=0;function Yf(){D.useEffect(()=>{var e,n;const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=t[0])!=null?e:V0()),document.body.insertAdjacentElement("beforeend",(n=t[1])!=null?n:V0()),Om++,()=>{Om===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(i=>i.remove()),Om--}},[])}function V0(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Ei=function(){return Ei=Object.assign||function(e){for(var n,i=1,o=arguments.length;i<o;i++){n=arguments[i];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},Ei.apply(this,arguments)};function oS(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o<i.length;o++)e.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(t,i[o])&&(n[i[o]]=t[i[o]]);return n}function gA(t,e,n){if(n||arguments.length===2)for(var i=0,o=e.length,l;i<o;i++)(l||!(i in e))&&(l||(l=Array.prototype.slice.call(e,0,i)),l[i]=e[i]);return t.concat(l||Array.prototype.slice.call(e))}var gf="right-scroll-bar-position",vf="width-before-scroll-bar",vA="with-scroll-bars-hidden",_A="--removed-body-scroll-bar-size";function Lm(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function yA(t,e){var n=D.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(i){var o=n.value;o!==i&&(n.value=i,n.callback(i,o))}}}})[0];return n.callback=e,n.facade}var bA=typeof window<"u"?D.useLayoutEffect:D.useEffect,G0=new WeakMap;function xA(t,e){var n=yA(null,function(i){return t.forEach(function(o){return Lm(o,i)})});return bA(function(){var i=G0.get(n);if(i){var o=new Set(i),l=new Set(t),d=n.current;o.forEach(function(a){l.has(a)||Lm(a,null)}),l.forEach(function(a){o.has(a)||Lm(a,d)})}G0.set(n,t)},[t]),n}function SA(t){return t}function wA(t,e){e===void 0&&(e=SA);var n=[],i=!1,o={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(l){var d=e(l,i);return n.push(d),function(){n=n.filter(function(a){return a!==d})}},assignSyncMedium:function(l){for(i=!0;n.length;){var d=n;n=[],d.forEach(l)}n={push:function(a){return l(a)},filter:function(){return n}}},assignMedium:function(l){i=!0;var d=[];if(n.length){var a=n;n=[],a.forEach(l),d=n}var u=function(){var p=d;d=[],p.forEach(l)},f=function(){return Promise.resolve().then(u)};f(),n={push:function(p){d.push(p),f()},filter:function(p){return d=d.filter(p),n}}}};return o}function CA(t){t===void 0&&(t={});var e=wA(null);return e.options=Ei({async:!0,ssr:!1},t),e}var aS=function(t){var e=t.sideCar,n=oS(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=e.read();if(!i)throw new Error("Sidecar medium not found");return D.createElement(i,Ei({},n))};aS.isSideCarExport=!0;function kA(t,e){return t.useMedium(e),aS}var lS=CA(),Im=function(){},Xf=D.forwardRef(function(t,e){var n=D.useRef(null),i=D.useState({onScrollCapture:Im,onWheelCapture:Im,onTouchMoveCapture:Im}),o=i[0],l=i[1],d=t.forwardProps,a=t.children,u=t.className,f=t.removeScrollBar,p=t.enabled,h=t.shards,y=t.sideCar,S=t.noRelative,C=t.noIsolation,w=t.inert,_=t.allowPinchZoom,v=t.as,b=v===void 0?"div":v,x=t.gapMode,E=oS(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=y,A=xA([n,e]),M=Ei(Ei({},E),o);return D.createElement(D.Fragment,null,p&&D.createElement(N,{sideCar:lS,removeScrollBar:f,shards:h,noRelative:S,noIsolation:C,inert:w,setCallbacks:l,allowPinchZoom:!!_,lockRef:n,gapMode:x}),d?D.cloneElement(D.Children.only(a),Ei(Ei({},M),{ref:A})):D.createElement(b,Ei({},M,{className:u,ref:A}),a))});Xf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Xf.classNames={fullWidth:vf,zeroRight:gf};var EA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function AA(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=EA();return e&&t.setAttribute("nonce",e),t}function TA(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function RA(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var NA=function(){var t=0,e=null;return{add:function(n){t==0&&(e=AA())&&(TA(e,n),RA(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},DA=function(){var t=NA();return function(e,n){D.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},cS=function(){var t=DA(),e=function(n){var i=n.styles,o=n.dynamic;return t(i,o),null};return e},MA={left:0,top:0,right:0,gap:0},Bm=function(t){return parseInt(t||"",10)||0},jA=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],i=e[t==="padding"?"paddingTop":"marginTop"],o=e[t==="padding"?"paddingRight":"marginRight"];return[Bm(n),Bm(i),Bm(o)]},OA=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return MA;var e=jA(t),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,i-n+e[2]-e[0])}},LA=cS(),Rl="data-scroll-locked",IA=function(t,e,n,i){var o=t.left,l=t.top,d=t.right,a=t.gap;return n===void 0&&(n="margin"),`
438
+ .`.concat(vA,` {
439
+ overflow: hidden `).concat(i,`;
440
+ padding-right: `).concat(a,"px ").concat(i,`;
441
+ }
442
+ body[`).concat(Rl,`] {
443
+ overflow: hidden `).concat(i,`;
444
+ overscroll-behavior: contain;
445
+ `).concat([e&&"position: relative ".concat(i,";"),n==="margin"&&`
446
+ padding-left: `.concat(o,`px;
447
+ padding-top: `).concat(l,`px;
448
+ padding-right: `).concat(d,`px;
449
+ margin-left:0;
450
+ margin-top:0;
451
+ margin-right: `).concat(a,"px ").concat(i,`;
452
+ `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(i,";")].filter(Boolean).join(""),`
453
+ }
454
+
455
+ .`).concat(gf,` {
456
+ right: `).concat(a,"px ").concat(i,`;
457
+ }
458
+
459
+ .`).concat(vf,` {
460
+ margin-right: `).concat(a,"px ").concat(i,`;
461
+ }
462
+
463
+ .`).concat(gf," .").concat(gf,` {
464
+ right: 0 `).concat(i,`;
465
+ }
466
+
467
+ .`).concat(vf," .").concat(vf,` {
468
+ margin-right: 0 `).concat(i,`;
469
+ }
470
+
471
+ body[`).concat(Rl,`] {
472
+ `).concat(_A,": ").concat(a,`px;
473
+ }
474
+ `)},W0=function(){var t=parseInt(document.body.getAttribute(Rl)||"0",10);return isFinite(t)?t:0},BA=function(){D.useEffect(function(){return document.body.setAttribute(Rl,(W0()+1).toString()),function(){var t=W0()-1;t<=0?document.body.removeAttribute(Rl):document.body.setAttribute(Rl,t.toString())}},[])},zA=function(t){var e=t.noRelative,n=t.noImportant,i=t.gapMode,o=i===void 0?"margin":i;BA();var l=D.useMemo(function(){return OA(o)},[o]);return D.createElement(LA,{styles:IA(l,!e,o,n?"":"!important")})},xg=!1;if(typeof window<"u")try{var rf=Object.defineProperty({},"passive",{get:function(){return xg=!0,!0}});window.addEventListener("test",rf,rf),window.removeEventListener("test",rf,rf)}catch{xg=!1}var yl=xg?{passive:!1}:!1,PA=function(t){return t.tagName==="TEXTAREA"},uS=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!PA(t)&&n[e]==="visible")},FA=function(t){return uS(t,"overflowY")},HA=function(t){return uS(t,"overflowX")},K0=function(t,e){var n=e.ownerDocument,i=e;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var o=dS(t,i);if(o){var l=fS(t,i),d=l[1],a=l[2];if(d>a)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},UA=function(t){var e=t.scrollTop,n=t.scrollHeight,i=t.clientHeight;return[e,n,i]},$A=function(t){var e=t.scrollLeft,n=t.scrollWidth,i=t.clientWidth;return[e,n,i]},dS=function(t,e){return t==="v"?FA(e):HA(e)},fS=function(t,e){return t==="v"?UA(e):$A(e)},qA=function(t,e){return t==="h"&&e==="rtl"?-1:1},VA=function(t,e,n,i,o){var l=qA(t,window.getComputedStyle(e).direction),d=l*i,a=n.target,u=e.contains(a),f=!1,p=d>0,h=0,y=0;do{if(!a)break;var S=fS(t,a),C=S[0],w=S[1],_=S[2],v=w-_-l*C;(C||v)&&dS(t,a)&&(h+=v,y+=C);var b=a.parentNode;a=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!u&&a!==document.body||u&&(e.contains(a)||e===a));return(p&&Math.abs(h)<1||!p&&Math.abs(y)<1)&&(f=!0),f},sf=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Y0=function(t){return[t.deltaX,t.deltaY]},X0=function(t){return t&&"current"in t?t.current:t},GA=function(t,e){return t[0]===e[0]&&t[1]===e[1]},WA=function(t){return`
475
+ .block-interactivity-`.concat(t,` {pointer-events: none;}
476
+ .allow-interactivity-`).concat(t,` {pointer-events: all;}
477
+ `)},KA=0,bl=[];function YA(t){var e=D.useRef([]),n=D.useRef([0,0]),i=D.useRef(),o=D.useState(KA++)[0],l=D.useState(cS)[0],d=D.useRef(t);D.useEffect(function(){d.current=t},[t]),D.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(o));var w=gA([t.lockRef.current],(t.shards||[]).map(X0),!0).filter(Boolean);return w.forEach(function(_){return _.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(o))})}}},[t.inert,t.lockRef.current,t.shards]);var a=D.useCallback(function(w,_){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!d.current.allowPinchZoom;var v=sf(w),b=n.current,x="deltaX"in w?w.deltaX:b[0]-v[0],E="deltaY"in w?w.deltaY:b[1]-v[1],N,A=w.target,M=Math.abs(x)>Math.abs(E)?"h":"v";if("touches"in w&&M==="h"&&A.type==="range")return!1;var T=window.getSelection(),j=T&&T.anchorNode,O=j?j===A||j.contains(A):!1;if(O)return!1;var F=K0(M,A);if(!F)return!0;if(F?N=M:(N=M==="v"?"h":"v",F=K0(M,A)),!F)return!1;if(!i.current&&"changedTouches"in w&&(x||E)&&(i.current=N),!N)return!0;var U=i.current||N;return VA(U,_,w,U==="h"?x:E)},[]),u=D.useCallback(function(w){var _=w;if(!(!bl.length||bl[bl.length-1]!==l)){var v="deltaY"in _?Y0(_):sf(_),b=e.current.filter(function(N){return N.name===_.type&&(N.target===_.target||_.target===N.shadowParent)&&GA(N.delta,v)})[0];if(b&&b.should){_.cancelable&&_.preventDefault();return}if(!b){var x=(d.current.shards||[]).map(X0).filter(Boolean).filter(function(N){return N.contains(_.target)}),E=x.length>0?a(_,x[0]):!d.current.noIsolation;E&&_.cancelable&&_.preventDefault()}}},[]),f=D.useCallback(function(w,_,v,b){var x={name:w,delta:_,target:v,should:b,shadowParent:XA(v)};e.current.push(x),setTimeout(function(){e.current=e.current.filter(function(E){return E!==x})},1)},[]),p=D.useCallback(function(w){n.current=sf(w),i.current=void 0},[]),h=D.useCallback(function(w){f(w.type,Y0(w),w.target,a(w,t.lockRef.current))},[]),y=D.useCallback(function(w){f(w.type,sf(w),w.target,a(w,t.lockRef.current))},[]);D.useEffect(function(){return bl.push(l),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:y}),document.addEventListener("wheel",u,yl),document.addEventListener("touchmove",u,yl),document.addEventListener("touchstart",p,yl),function(){bl=bl.filter(function(w){return w!==l}),document.removeEventListener("wheel",u,yl),document.removeEventListener("touchmove",u,yl),document.removeEventListener("touchstart",p,yl)}},[]);var S=t.removeScrollBar,C=t.inert;return D.createElement(D.Fragment,null,C?D.createElement(l,{styles:WA(o)}):null,S?D.createElement(zA,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function XA(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const ZA=kA(lS,YA);var Iu=D.forwardRef(function(t,e){return D.createElement(Xf,Ei({},t,{ref:e,sideCar:ZA}))});Iu.classNames=Xf.classNames;var QA=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},xl=new WeakMap,of=new WeakMap,af={},zm=0,hS=function(t){return t&&(t.host||hS(t.parentNode))},JA=function(t,e){return e.map(function(n){if(t.contains(n))return n;var i=hS(n);return i&&t.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},eT=function(t,e,n,i){var o=JA(e,Array.isArray(t)?t:[t]);af[n]||(af[n]=new WeakMap);var l=af[n],d=[],a=new Set,u=new Set(o),f=function(h){!h||a.has(h)||(a.add(h),f(h.parentNode))};o.forEach(f);var p=function(h){!h||u.has(h)||Array.prototype.forEach.call(h.children,function(y){if(a.has(y))p(y);else try{var S=y.getAttribute(i),C=S!==null&&S!=="false",w=(xl.get(y)||0)+1,_=(l.get(y)||0)+1;xl.set(y,w),l.set(y,_),d.push(y),w===1&&C&&of.set(y,!0),_===1&&y.setAttribute(n,"true"),C||y.setAttribute(i,"true")}catch(v){console.error("aria-hidden: cannot operate on ",y,v)}})};return p(e),a.clear(),zm++,function(){d.forEach(function(h){var y=xl.get(h)-1,S=l.get(h)-1;xl.set(h,y),l.set(h,S),y||(of.has(h)||h.removeAttribute(i),of.delete(h)),S||h.removeAttribute(n)}),zm--,zm||(xl=new WeakMap,xl=new WeakMap,of=new WeakMap,af={})}},Zf=function(t,e,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),o=QA(t);return o?(i.push.apply(i,Array.from(o.querySelectorAll("[aria-live], script"))),eT(i,o,n,"aria-hidden")):function(){return null}},Qf="Dialog",[pS]=yr(Qf),[tT,li]=pS(Qf),mS=t=>{const{__scopeDialog:e,children:n,open:i,defaultOpen:o,onOpenChange:l,modal:d=!0}=t,a=D.useRef(null),u=D.useRef(null),[f,p]=ws({prop:i,defaultProp:o!=null?o:!1,onChange:l,caller:Qf});return g.jsx(tT,{scope:e,triggerRef:a,contentRef:u,contentId:gn(),titleId:gn(),descriptionId:gn(),open:f,onOpenChange:p,onOpenToggle:D.useCallback(()=>p(h=>!h),[p]),modal:d,children:n})};mS.displayName=Qf;var gS="DialogTrigger",vS=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=li(gS,n),l=_t(e,o.triggerRef);return g.jsx(qe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ov(o.open),...i,ref:l,onClick:je(t.onClick,o.onOpenToggle)})});vS.displayName=gS;var iv="DialogPortal",[nT,_S]=pS(iv,{forceMount:void 0}),yS=t=>{const{__scopeDialog:e,forceMount:n,children:i,container:o}=t,l=li(iv,e);return g.jsx(nT,{scope:e,forceMount:n,children:D.Children.map(i,d=>g.jsx(Cn,{present:n||l.open,children:g.jsx(Kl,{asChild:!0,container:o,children:d})}))})};yS.displayName=iv;var Cf="DialogOverlay",bS=D.forwardRef((t,e)=>{const n=_S(Cf,t.__scopeDialog),{forceMount:i=n.forceMount,...o}=t,l=li(Cf,t.__scopeDialog);return l.modal?g.jsx(Cn,{present:i||l.open,children:g.jsx(iT,{...o,ref:e})}):null});bS.displayName=Cf;var rT=_o("DialogOverlay.RemoveScroll"),iT=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=li(Cf,n);return g.jsx(Iu,{as:rT,allowPinchZoom:!0,shards:[o.contentRef],children:g.jsx(qe.div,{"data-state":ov(o.open),...i,ref:e,style:{pointerEvents:"auto",...i.style}})})}),ha="DialogContent",xS=D.forwardRef((t,e)=>{const n=_S(ha,t.__scopeDialog),{forceMount:i=n.forceMount,...o}=t,l=li(ha,t.__scopeDialog);return g.jsx(Cn,{present:i||l.open,children:l.modal?g.jsx(sT,{...o,ref:e}):g.jsx(oT,{...o,ref:e})})});xS.displayName=ha;var sT=D.forwardRef((t,e)=>{const n=li(ha,t.__scopeDialog),i=D.useRef(null),o=_t(e,n.contentRef,i);return D.useEffect(()=>{const l=i.current;if(l)return Zf(l)},[]),g.jsx(SS,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:je(t.onCloseAutoFocus,l=>{var d;l.preventDefault(),(d=n.triggerRef.current)==null||d.focus()}),onPointerDownOutside:je(t.onPointerDownOutside,l=>{const d=l.detail.originalEvent,a=d.button===0&&d.ctrlKey===!0;(d.button===2||a)&&l.preventDefault()}),onFocusOutside:je(t.onFocusOutside,l=>l.preventDefault())})}),oT=D.forwardRef((t,e)=>{const n=li(ha,t.__scopeDialog),i=D.useRef(!1),o=D.useRef(!1);return g.jsx(SS,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var d,a;(d=t.onCloseAutoFocus)==null||d.call(t,l),l.defaultPrevented||(i.current||(a=n.triggerRef.current)==null||a.focus(),l.preventDefault()),i.current=!1,o.current=!1},onInteractOutside:l=>{var u,f;(u=t.onInteractOutside)==null||u.call(t,l),l.defaultPrevented||(i.current=!0,l.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const d=l.target;((f=n.triggerRef.current)==null?void 0:f.contains(d))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&o.current&&l.preventDefault()}})}),SS=D.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:l,...d}=t,a=li(ha,n),u=D.useRef(null),f=_t(e,u);return Yf(),g.jsxs(g.Fragment,{children:[g.jsx(Lu,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:o,onUnmountAutoFocus:l,children:g.jsx(Wl,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":ov(a.open),...d,ref:f,onDismiss:()=>a.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(aT,{titleId:a.titleId}),g.jsx(cT,{contentRef:u,descriptionId:a.descriptionId})]})]})}),sv="DialogTitle",wS=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=li(sv,n);return g.jsx(qe.h2,{id:o.titleId,...i,ref:e})});wS.displayName=sv;var CS="DialogDescription",kS=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=li(CS,n);return g.jsx(qe.p,{id:o.descriptionId,...i,ref:e})});kS.displayName=CS;var ES="DialogClose",AS=D.forwardRef((t,e)=>{const{__scopeDialog:n,...i}=t,o=li(ES,n);return g.jsx(qe.button,{type:"button",...i,ref:e,onClick:je(t.onClick,()=>o.onOpenChange(!1))})});AS.displayName=ES;function ov(t){return t?"open":"closed"}var TS="DialogTitleWarning",[pH,RS]=P5(TS,{contentName:ha,titleName:sv,docsSlug:"dialog"}),aT=({titleId:t})=>{const e=RS(TS),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
478
+
479
+ If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
480
+
481
+ For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return D.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},lT="DialogDescriptionWarning",cT=({contentRef:t,descriptionId:e})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${RS(lT).contentName}}.`;return D.useEffect(()=>{var l;const o=(l=t.current)==null?void 0:l.getAttribute("aria-describedby");e&&o&&(document.getElementById(e)||console.warn(i))},[i,t,e]),null},av=mS,uT=vS,lv=yS,cv=bS,uv=xS,NS=wS,DS=kS,Jf=AS;function dT(t){const e=D.useRef({value:t,previous:t});return D.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function fT(t){const[e,n]=D.useState(void 0);return wn(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const i=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const l=o[0];let d,a;if("borderBoxSize"in l){const u=l.borderBoxSize,f=Array.isArray(u)?u[0]:u;d=f.inlineSize,a=f.blockSize}else d=t.offsetWidth,a=t.offsetHeight;n({width:d,height:a})});return i.observe(t,{box:"border-box"}),()=>i.unobserve(t)}else n(void 0)},[t]),e}const hT=["top","right","bottom","left"],yo=Math.min,mr=Math.max,kf=Math.round,lf=Math.floor,Ri=t=>({x:t,y:t}),pT={left:"right",right:"left",bottom:"top",top:"bottom"};function Sg(t,e,n){return mr(t,yo(e,n))}function Cs(t,e){return typeof t=="function"?t(e):t}function ks(t){return t.split("-")[0]}function Yl(t){return t.split("-")[1]}function dv(t){return t==="x"?"y":"x"}function fv(t){return t==="y"?"height":"width"}function Ai(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function hv(t){return dv(Ai(t))}function mT(t,e,n){n===void 0&&(n=!1);const i=Yl(t),o=hv(t),l=fv(o);let d=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[l]>e.floating[l]&&(d=Ef(d)),[d,Ef(d)]}function gT(t){const e=Ef(t);return[wg(t),e,wg(e)]}function wg(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Z0=["left","right"],Q0=["right","left"],vT=["top","bottom"],_T=["bottom","top"];function yT(t,e,n){switch(t){case"top":case"bottom":return n?e?Q0:Z0:e?Z0:Q0;case"left":case"right":return e?vT:_T;default:return[]}}function bT(t,e,n,i){const o=Yl(t);let l=yT(ks(t),n==="start",i);return o&&(l=l.map(d=>d+"-"+o),e&&(l=l.concat(l.map(wg)))),l}function Ef(t){const e=ks(t);return pT[e]+t.slice(e.length)}function xT(t){return{top:0,right:0,bottom:0,left:0,...t}}function MS(t){return typeof t!="number"?xT(t):{top:t,right:t,bottom:t,left:t}}function Af(t){const{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function J0(t,e,n){let{reference:i,floating:o}=t;const l=Ai(e),d=hv(e),a=fv(d),u=ks(e),f=l==="y",p=i.x+i.width/2-o.width/2,h=i.y+i.height/2-o.height/2,y=i[a]/2-o[a]/2;let S;switch(u){case"top":S={x:p,y:i.y-o.height};break;case"bottom":S={x:p,y:i.y+i.height};break;case"right":S={x:i.x+i.width,y:h};break;case"left":S={x:i.x-o.width,y:h};break;default:S={x:i.x,y:i.y}}switch(Yl(e)){case"start":S[d]-=y*(n&&f?-1:1);break;case"end":S[d]+=y*(n&&f?-1:1);break}return S}async function ST(t,e){var n;e===void 0&&(e={});const{x:i,y:o,platform:l,rects:d,elements:a,strategy:u}=t,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:y=!1,padding:S=0}=Cs(e,t),C=MS(S),_=a[y?h==="floating"?"reference":"floating":h],v=Af(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(_)))==null||n?_:_.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(a.floating)),boundary:f,rootBoundary:p,strategy:u})),b=h==="floating"?{x:i,y:o,width:d.floating.width,height:d.floating.height}:d.reference,x=await(l.getOffsetParent==null?void 0:l.getOffsetParent(a.floating)),E=await(l.isElement==null?void 0:l.isElement(x))?await(l.getScale==null?void 0:l.getScale(x))||{x:1,y:1}:{x:1,y:1},N=Af(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:x,strategy:u}):b);return{top:(v.top-N.top+C.top)/E.y,bottom:(N.bottom-v.bottom+C.bottom)/E.y,left:(v.left-N.left+C.left)/E.x,right:(N.right-v.right+C.right)/E.x}}const wT=50,CT=async(t,e,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:l=[],platform:d}=n,a=d.detectOverflow?d:{...d,detectOverflow:ST},u=await(d.isRTL==null?void 0:d.isRTL(e));let f=await d.getElementRects({reference:t,floating:e,strategy:o}),{x:p,y:h}=J0(f,i,u),y=i,S=0;const C={};for(let w=0;w<l.length;w++){const _=l[w];if(!_)continue;const{name:v,fn:b}=_,{x,y:E,data:N,reset:A}=await b({x:p,y:h,initialPlacement:i,placement:y,strategy:o,middlewareData:C,rects:f,platform:a,elements:{reference:t,floating:e}});p=x!=null?x:p,h=E!=null?E:h,C[v]={...C[v],...N},A&&S<wT&&(S++,typeof A=="object"&&(A.placement&&(y=A.placement),A.rects&&(f=A.rects===!0?await d.getElementRects({reference:t,floating:e,strategy:o}):A.rects),{x:p,y:h}=J0(f,y,u)),w=-1)}return{x:p,y:h,placement:y,strategy:o,middlewareData:C}},kT=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:o,rects:l,platform:d,elements:a,middlewareData:u}=e,{element:f,padding:p=0}=Cs(t,e)||{};if(f==null)return{};const h=MS(p),y={x:n,y:i},S=hv(o),C=fv(S),w=await d.getDimensions(f),_=S==="y",v=_?"top":"left",b=_?"bottom":"right",x=_?"clientHeight":"clientWidth",E=l.reference[C]+l.reference[S]-y[S]-l.floating[C],N=y[S]-l.reference[S],A=await(d.getOffsetParent==null?void 0:d.getOffsetParent(f));let M=A?A[x]:0;(!M||!await(d.isElement==null?void 0:d.isElement(A)))&&(M=a.floating[x]||l.floating[C]);const T=E/2-N/2,j=M/2-w[C]/2-1,O=yo(h[v],j),F=yo(h[b],j),U=O,$=M-w[C]-F,G=M/2-w[C]/2+T,K=Sg(U,G,$),V=!u.arrow&&Yl(o)!=null&&G!==K&&l.reference[C]/2-(G<U?O:F)-w[C]/2<0,X=V?G<U?G-U:G-$:0;return{[S]:y[S]+X,data:{[S]:K,centerOffset:G-K-X,...V&&{alignmentOffset:X}},reset:V}}}),ET=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:o,middlewareData:l,rects:d,initialPlacement:a,platform:u,elements:f}=e,{mainAxis:p=!0,crossAxis:h=!0,fallbackPlacements:y,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:w=!0,..._}=Cs(t,e);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const v=ks(o),b=Ai(a),x=ks(a)===a,E=await(u.isRTL==null?void 0:u.isRTL(f.floating)),N=y||(x||!w?[Ef(a)]:gT(a)),A=C!=="none";!y&&A&&N.push(...bT(a,w,C,E));const M=[a,...N],T=await u.detectOverflow(e,_),j=[];let O=((i=l.flip)==null?void 0:i.overflows)||[];if(p&&j.push(T[v]),h){const G=mT(o,d,E);j.push(T[G[0]],T[G[1]])}if(O=[...O,{placement:o,overflows:j}],!j.every(G=>G<=0)){var F,U;const G=(((F=l.flip)==null?void 0:F.index)||0)+1,K=M[G];if(K&&(!(h==="alignment"?b!==Ai(K):!1)||O.every(Z=>Ai(Z.placement)===b?Z.overflows[0]>0:!0)))return{data:{index:G,overflows:O},reset:{placement:K}};let V=(U=O.filter(X=>X.overflows[0]<=0).sort((X,Z)=>X.overflows[1]-Z.overflows[1])[0])==null?void 0:U.placement;if(!V)switch(S){case"bestFit":{var $;const X=($=O.filter(Z=>{if(A){const I=Ai(Z.placement);return I===b||I==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(I=>I>0).reduce((I,L)=>I+L,0)]).sort((Z,I)=>Z[1]-I[1])[0])==null?void 0:$[0];X&&(V=X);break}case"initialPlacement":V=a;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function eb(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function tb(t){return hT.some(e=>t[e]>=0)}const AT=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:i}=e,{strategy:o="referenceHidden",...l}=Cs(t,e);switch(o){case"referenceHidden":{const d=await i.detectOverflow(e,{...l,elementContext:"reference"}),a=eb(d,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:tb(a)}}}case"escaped":{const d=await i.detectOverflow(e,{...l,altBoundary:!0}),a=eb(d,n.floating);return{data:{escapedOffsets:a,escaped:tb(a)}}}default:return{}}}}},jS=new Set(["left","top"]);async function TT(t,e){const{placement:n,platform:i,elements:o}=t,l=await(i.isRTL==null?void 0:i.isRTL(o.floating)),d=ks(n),a=Yl(n),u=Ai(n)==="y",f=jS.has(d)?-1:1,p=l&&u?-1:1,h=Cs(e,t);let{mainAxis:y,crossAxis:S,alignmentAxis:C}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof C=="number"&&(S=a==="end"?C*-1:C),u?{x:S*p,y:y*f}:{x:y*f,y:S*p}}const RT=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:o,y:l,placement:d,middlewareData:a}=e,u=await TT(e,t);return d===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:o+u.x,y:l+u.y,data:{...u,placement:d}}}}},NT=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:o,platform:l}=e,{mainAxis:d=!0,crossAxis:a=!1,limiter:u={fn:v=>{let{x:b,y:x}=v;return{x:b,y:x}}},...f}=Cs(t,e),p={x:n,y:i},h=await l.detectOverflow(e,f),y=Ai(ks(o)),S=dv(y);let C=p[S],w=p[y];if(d){const v=S==="y"?"top":"left",b=S==="y"?"bottom":"right",x=C+h[v],E=C-h[b];C=Sg(x,C,E)}if(a){const v=y==="y"?"top":"left",b=y==="y"?"bottom":"right",x=w+h[v],E=w-h[b];w=Sg(x,w,E)}const _=u.fn({...e,[S]:C,[y]:w});return{..._,data:{x:_.x-n,y:_.y-i,enabled:{[S]:d,[y]:a}}}}}},DT=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:i,placement:o,rects:l,middlewareData:d}=e,{offset:a=0,mainAxis:u=!0,crossAxis:f=!0}=Cs(t,e),p={x:n,y:i},h=Ai(o),y=dv(h);let S=p[y],C=p[h];const w=Cs(a,e),_=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(u){const x=y==="y"?"height":"width",E=l.reference[y]-l.floating[x]+_.mainAxis,N=l.reference[y]+l.reference[x]-_.mainAxis;S<E?S=E:S>N&&(S=N)}if(f){var v,b;const x=y==="y"?"width":"height",E=jS.has(ks(o)),N=l.reference[h]-l.floating[x]+(E&&((v=d.offset)==null?void 0:v[h])||0)+(E?0:_.crossAxis),A=l.reference[h]+l.reference[x]+(E?0:((b=d.offset)==null?void 0:b[h])||0)-(E?_.crossAxis:0);C<N?C=N:C>A&&(C=A)}return{[y]:S,[h]:C}}}},MT=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;const{placement:o,rects:l,platform:d,elements:a}=e,{apply:u=()=>{},...f}=Cs(t,e),p=await d.detectOverflow(e,f),h=ks(o),y=Yl(o),S=Ai(o)==="y",{width:C,height:w}=l.floating;let _,v;h==="top"||h==="bottom"?(_=h,v=y===(await(d.isRTL==null?void 0:d.isRTL(a.floating))?"start":"end")?"left":"right"):(v=h,_=y==="end"?"top":"bottom");const b=w-p.top-p.bottom,x=C-p.left-p.right,E=yo(w-p[_],b),N=yo(C-p[v],x),A=!e.middlewareData.shift;let M=E,T=N;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(T=x),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(M=b),A&&!y){const O=mr(p.left,0),F=mr(p.right,0),U=mr(p.top,0),$=mr(p.bottom,0);S?T=C-2*(O!==0||F!==0?O+F:mr(p.left,p.right)):M=w-2*(U!==0||$!==0?U+$:mr(p.top,p.bottom))}await u({...e,availableWidth:T,availableHeight:M});const j=await d.getDimensions(a.floating);return C!==j.width||w!==j.height?{reset:{rects:!0}}:{}}}};function eh(){return typeof window<"u"}function Xl(t){return OS(t)?(t.nodeName||"").toLowerCase():"#document"}function vr(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Di(t){var e;return(e=(OS(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function OS(t){return eh()?t instanceof Node||t instanceof vr(t).Node:!1}function oi(t){return eh()?t instanceof Element||t instanceof vr(t).Element:!1}function Es(t){return eh()?t instanceof HTMLElement||t instanceof vr(t).HTMLElement:!1}function nb(t){return!eh()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof vr(t).ShadowRoot}function Bu(t){const{overflow:e,overflowX:n,overflowY:i,display:o}=ai(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&o!=="inline"&&o!=="contents"}function jT(t){return/^(table|td|th)$/.test(Xl(t))}function th(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const OT=/transform|translate|scale|rotate|perspective|filter/,LT=/paint|layout|strict|content/,aa=t=>!!t&&t!=="none";let Pm;function pv(t){const e=oi(t)?ai(t):t;return aa(e.transform)||aa(e.translate)||aa(e.scale)||aa(e.rotate)||aa(e.perspective)||!mv()&&(aa(e.backdropFilter)||aa(e.filter))||OT.test(e.willChange||"")||LT.test(e.contain||"")}function IT(t){let e=bo(t);for(;Es(e)&&!Ol(e);){if(pv(e))return e;if(th(e))return null;e=bo(e)}return null}function mv(){return Pm==null&&(Pm=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Pm}function Ol(t){return/^(html|body|#document)$/.test(Xl(t))}function ai(t){return vr(t).getComputedStyle(t)}function nh(t){return oi(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function bo(t){if(Xl(t)==="html")return t;const e=t.assignedSlot||t.parentNode||nb(t)&&t.host||Di(t);return nb(e)?e.host:e}function LS(t){const e=bo(t);return Ol(e)?t.ownerDocument?t.ownerDocument.body:t.body:Es(e)&&Bu(e)?e:LS(e)}function xu(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=LS(t),l=o===((i=t.ownerDocument)==null?void 0:i.body),d=vr(o);if(l){const a=Cg(d);return e.concat(d,d.visualViewport||[],Bu(o)?o:[],a&&n?xu(a):[])}else return e.concat(o,xu(o,[],n))}function Cg(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function IS(t){const e=ai(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=Es(t),l=o?t.offsetWidth:n,d=o?t.offsetHeight:i,a=kf(n)!==l||kf(i)!==d;return a&&(n=l,i=d),{width:n,height:i,$:a}}function gv(t){return oi(t)?t:t.contextElement}function Nl(t){const e=gv(t);if(!Es(e))return Ri(1);const n=e.getBoundingClientRect(),{width:i,height:o,$:l}=IS(e);let d=(l?kf(n.width):n.width)/i,a=(l?kf(n.height):n.height)/o;return(!d||!Number.isFinite(d))&&(d=1),(!a||!Number.isFinite(a))&&(a=1),{x:d,y:a}}const BT=Ri(0);function BS(t){const e=vr(t);return!mv()||!e.visualViewport?BT:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function zT(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==vr(t)?!1:e}function pa(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),l=gv(t);let d=Ri(1);e&&(i?oi(i)&&(d=Nl(i)):d=Nl(t));const a=zT(l,n,i)?BS(l):Ri(0);let u=(o.left+a.x)/d.x,f=(o.top+a.y)/d.y,p=o.width/d.x,h=o.height/d.y;if(l){const y=vr(l),S=i&&oi(i)?vr(i):i;let C=y,w=Cg(C);for(;w&&i&&S!==C;){const _=Nl(w),v=w.getBoundingClientRect(),b=ai(w),x=v.left+(w.clientLeft+parseFloat(b.paddingLeft))*_.x,E=v.top+(w.clientTop+parseFloat(b.paddingTop))*_.y;u*=_.x,f*=_.y,p*=_.x,h*=_.y,u+=x,f+=E,C=vr(w),w=Cg(C)}}return Af({width:p,height:h,x:u,y:f})}function rh(t,e){const n=nh(t).scrollLeft;return e?e.left+n:pa(Di(t)).left+n}function zS(t,e){const n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-rh(t,n),o=n.top+e.scrollTop;return{x:i,y:o}}function PT(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t;const l=o==="fixed",d=Di(i),a=e?th(e.floating):!1;if(i===d||a&&l)return n;let u={scrollLeft:0,scrollTop:0},f=Ri(1);const p=Ri(0),h=Es(i);if((h||!h&&!l)&&((Xl(i)!=="body"||Bu(d))&&(u=nh(i)),h)){const S=pa(i);f=Nl(i),p.x=S.x+i.clientLeft,p.y=S.y+i.clientTop}const y=d&&!h&&!l?zS(d,u):Ri(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-u.scrollLeft*f.x+p.x+y.x,y:n.y*f.y-u.scrollTop*f.y+p.y+y.y}}function FT(t){return Array.from(t.getClientRects())}function HT(t){const e=Di(t),n=nh(t),i=t.ownerDocument.body,o=mr(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),l=mr(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let d=-n.scrollLeft+rh(t);const a=-n.scrollTop;return ai(i).direction==="rtl"&&(d+=mr(e.clientWidth,i.clientWidth)-o),{width:o,height:l,x:d,y:a}}const rb=25;function UT(t,e){const n=vr(t),i=Di(t),o=n.visualViewport;let l=i.clientWidth,d=i.clientHeight,a=0,u=0;if(o){l=o.width,d=o.height;const p=mv();(!p||p&&e==="fixed")&&(a=o.offsetLeft,u=o.offsetTop)}const f=rh(i);if(f<=0){const p=i.ownerDocument,h=p.body,y=getComputedStyle(h),S=p.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,C=Math.abs(i.clientWidth-h.clientWidth-S);C<=rb&&(l-=C)}else f<=rb&&(l+=f);return{width:l,height:d,x:a,y:u}}function $T(t,e){const n=pa(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,l=Es(t)?Nl(t):Ri(1),d=t.clientWidth*l.x,a=t.clientHeight*l.y,u=o*l.x,f=i*l.y;return{width:d,height:a,x:u,y:f}}function ib(t,e,n){let i;if(e==="viewport")i=UT(t,n);else if(e==="document")i=HT(Di(t));else if(oi(e))i=$T(e,n);else{const o=BS(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Af(i)}function PS(t,e){const n=bo(t);return n===e||!oi(n)||Ol(n)?!1:ai(n).position==="fixed"||PS(n,e)}function qT(t,e){const n=e.get(t);if(n)return n;let i=xu(t,[],!1).filter(a=>oi(a)&&Xl(a)!=="body"),o=null;const l=ai(t).position==="fixed";let d=l?bo(t):t;for(;oi(d)&&!Ol(d);){const a=ai(d),u=pv(d);!u&&a.position==="fixed"&&(o=null),(l?!u&&!o:!u&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Bu(d)&&!u&&PS(t,d))?i=i.filter(p=>p!==d):o=a,d=bo(d)}return e.set(t,i),i}function VT(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t;const d=[...n==="clippingAncestors"?th(e)?[]:qT(e,this._c):[].concat(n),i],a=ib(e,d[0],o);let u=a.top,f=a.right,p=a.bottom,h=a.left;for(let y=1;y<d.length;y++){const S=ib(e,d[y],o);u=mr(S.top,u),f=yo(S.right,f),p=yo(S.bottom,p),h=mr(S.left,h)}return{width:f-h,height:p-u,x:h,y:u}}function GT(t){const{width:e,height:n}=IS(t);return{width:e,height:n}}function WT(t,e,n){const i=Es(e),o=Di(e),l=n==="fixed",d=pa(t,!0,l,e);let a={scrollLeft:0,scrollTop:0};const u=Ri(0);function f(){u.x=rh(o)}if(i||!i&&!l)if((Xl(e)!=="body"||Bu(o))&&(a=nh(e)),i){const S=pa(e,!0,l,e);u.x=S.x+e.clientLeft,u.y=S.y+e.clientTop}else o&&f();l&&!i&&o&&f();const p=o&&!i&&!l?zS(o,a):Ri(0),h=d.left+a.scrollLeft-u.x-p.x,y=d.top+a.scrollTop-u.y-p.y;return{x:h,y,width:d.width,height:d.height}}function Fm(t){return ai(t).position==="static"}function sb(t,e){if(!Es(t)||ai(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Di(t)===n&&(n=n.ownerDocument.body),n}function FS(t,e){const n=vr(t);if(th(t))return n;if(!Es(t)){let o=bo(t);for(;o&&!Ol(o);){if(oi(o)&&!Fm(o))return o;o=bo(o)}return n}let i=sb(t,e);for(;i&&jT(i)&&Fm(i);)i=sb(i,e);return i&&Ol(i)&&Fm(i)&&!pv(i)?n:i||IT(t)||n}const KT=async function(t){const e=this.getOffsetParent||FS,n=this.getDimensions,i=await n(t.floating);return{reference:WT(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function YT(t){return ai(t).direction==="rtl"}const XT={convertOffsetParentRelativeRectToViewportRelativeRect:PT,getDocumentElement:Di,getClippingRect:VT,getOffsetParent:FS,getElementRects:KT,getClientRects:FT,getDimensions:GT,getScale:Nl,isElement:oi,isRTL:YT};function HS(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function ZT(t,e){let n=null,i;const o=Di(t);function l(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function d(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),l();const f=t.getBoundingClientRect(),{left:p,top:h,width:y,height:S}=f;if(a||e(),!y||!S)return;const C=lf(h),w=lf(o.clientWidth-(p+y)),_=lf(o.clientHeight-(h+S)),v=lf(p),x={rootMargin:-C+"px "+-w+"px "+-_+"px "+-v+"px",threshold:mr(0,yo(1,u))||1};let E=!0;function N(A){const M=A[0].intersectionRatio;if(M!==u){if(!E)return d();M?d(!1,M):i=setTimeout(()=>{d(!1,1e-7)},1e3)}M===1&&!HS(f,t.getBoundingClientRect())&&d(),E=!1}try{n=new IntersectionObserver(N,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(N,x)}n.observe(t)}return d(!0),l}function QT(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=i,f=gv(t),p=o||l?[...f?xu(f):[],...e?xu(e):[]]:[];p.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),l&&v.addEventListener("resize",n)});const h=f&&a?ZT(f,n):null;let y=-1,S=null;d&&(S=new ResizeObserver(v=>{let[b]=v;b&&b.target===f&&S&&e&&(S.unobserve(e),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var x;(x=S)==null||x.observe(e)})),n()}),f&&!u&&S.observe(f),e&&S.observe(e));let C,w=u?pa(t):null;u&&_();function _(){const v=pa(t);w&&!HS(w,v)&&n(),w=v,C=requestAnimationFrame(_)}return n(),()=>{var v;p.forEach(b=>{o&&b.removeEventListener("scroll",n),l&&b.removeEventListener("resize",n)}),h==null||h(),(v=S)==null||v.disconnect(),S=null,u&&cancelAnimationFrame(C)}}const JT=RT,eR=NT,tR=ET,nR=MT,rR=AT,ob=kT,iR=DT,sR=(t,e,n)=>{const i=new Map,o={platform:XT,...n},l={...o.platform,_c:i};return CT(t,e,{...o,platform:l})};var oR=typeof document<"u",aR=function(){},_f=oR?D.useLayoutEffect:aR;function Tf(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,i,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(i=n;i--!==0;)if(!Tf(t[i],e[i]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(e,o[i]))return!1;for(i=n;i--!==0;){const l=o[i];if(!(l==="_owner"&&t.$$typeof)&&!Tf(t[l],e[l]))return!1}return!0}return t!==t&&e!==e}function US(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function ab(t,e){const n=US(t);return Math.round(e*n)/n}function Hm(t){const e=D.useRef(t);return _f(()=>{e.current=t}),e}function lR(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:i=[],platform:o,elements:{reference:l,floating:d}={},transform:a=!0,whileElementsMounted:u,open:f}=t,[p,h]=D.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[y,S]=D.useState(i);Tf(y,i)||S(i);const[C,w]=D.useState(null),[_,v]=D.useState(null),b=D.useCallback(Z=>{Z!==A.current&&(A.current=Z,w(Z))},[]),x=D.useCallback(Z=>{Z!==M.current&&(M.current=Z,v(Z))},[]),E=l||C,N=d||_,A=D.useRef(null),M=D.useRef(null),T=D.useRef(p),j=u!=null,O=Hm(u),F=Hm(o),U=Hm(f),$=D.useCallback(()=>{if(!A.current||!M.current)return;const Z={placement:e,strategy:n,middleware:y};F.current&&(Z.platform=F.current),sR(A.current,M.current,Z).then(I=>{const L={...I,isPositioned:U.current!==!1};G.current&&!Tf(T.current,L)&&(T.current=L,Mu.flushSync(()=>{h(L)}))})},[y,e,n,F,U]);_f(()=>{f===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,h(Z=>({...Z,isPositioned:!1})))},[f]);const G=D.useRef(!1);_f(()=>(G.current=!0,()=>{G.current=!1}),[]),_f(()=>{if(E&&(A.current=E),N&&(M.current=N),E&&N){if(O.current)return O.current(E,N,$);$()}},[E,N,$,O,j]);const K=D.useMemo(()=>({reference:A,floating:M,setReference:b,setFloating:x}),[b,x]),V=D.useMemo(()=>({reference:E,floating:N}),[E,N]),X=D.useMemo(()=>{const Z={position:n,left:0,top:0};if(!V.floating)return Z;const I=ab(V.floating,p.x),L=ab(V.floating,p.y);return a?{...Z,transform:"translate("+I+"px, "+L+"px)",...US(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:L}},[n,a,V.floating,p.x,p.y]);return D.useMemo(()=>({...p,update:$,refs:K,elements:V,floatingStyles:X}),[p,$,K,V,X])}const cR=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:i,padding:o}=typeof t=="function"?t(n):t;return i&&e(i)?i.current!=null?ob({element:i.current,padding:o}).fn(n):{}:i?ob({element:i,padding:o}).fn(n):{}}}},uR=(t,e)=>{const n=JT(t);return{name:n.name,fn:n.fn,options:[t,e]}},dR=(t,e)=>{const n=eR(t);return{name:n.name,fn:n.fn,options:[t,e]}},fR=(t,e)=>({fn:iR(t).fn,options:[t,e]}),hR=(t,e)=>{const n=tR(t);return{name:n.name,fn:n.fn,options:[t,e]}},pR=(t,e)=>{const n=nR(t);return{name:n.name,fn:n.fn,options:[t,e]}},mR=(t,e)=>{const n=rR(t);return{name:n.name,fn:n.fn,options:[t,e]}},gR=(t,e)=>{const n=cR(t);return{name:n.name,fn:n.fn,options:[t,e]}};var vR="Arrow",$S=D.forwardRef((t,e)=>{const{children:n,width:i=10,height:o=5,...l}=t;return g.jsx(qe.svg,{...l,ref:e,width:i,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});$S.displayName=vR;var _R=$S,vv="Popper",[qS,ko]=yr(vv),[yR,VS]=qS(vv),GS=t=>{const{__scopePopper:e,children:n}=t,[i,o]=D.useState(null);return g.jsx(yR,{scope:e,anchor:i,onAnchorChange:o,children:n})};GS.displayName=vv;var WS="PopperAnchor",KS=D.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:i,...o}=t,l=VS(WS,n),d=D.useRef(null),a=_t(e,d),u=D.useRef(null);return D.useEffect(()=>{const f=u.current;u.current=(i==null?void 0:i.current)||d.current,f!==u.current&&l.onAnchorChange(u.current)}),i?null:g.jsx(qe.div,{...o,ref:a})});KS.displayName=WS;var _v="PopperContent",[bR,xR]=qS(_v),YS=D.forwardRef((t,e)=>{var W,q,J,ie,ce,ae,_e,Ee;const{__scopePopper:n,side:i="bottom",sideOffset:o=0,align:l="center",alignOffset:d=0,arrowPadding:a=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:y=!1,updatePositionStrategy:S="optimized",onPlaced:C,...w}=t,_=VS(_v,n),[v,b]=D.useState(null),x=_t(e,Te=>b(Te)),[E,N]=D.useState(null),A=fT(E),M=(W=A==null?void 0:A.width)!=null?W:0,T=(q=A==null?void 0:A.height)!=null?q:0,j=i+(l!=="center"?"-"+l:""),O=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},F=Array.isArray(f)?f:[f],U=F.length>0,$={padding:O,boundary:F.filter(wR),altBoundary:U},{refs:G,floatingStyles:K,placement:V,isPositioned:X,middlewareData:Z}=lR({strategy:"fixed",placement:j,whileElementsMounted:(...Te)=>QT(...Te,{animationFrame:S==="always"}),elements:{reference:_.anchor},middleware:[uR({mainAxis:o+T,alignmentAxis:d}),u&&dR({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?fR():void 0,...$}),u&&hR({...$}),pR({...$,apply:({elements:Te,rects:Be,availableWidth:se,availableHeight:Ye})=>{const{width:rt,height:nt}=Be.reference,Ge=Te.floating.style;Ge.setProperty("--radix-popper-available-width",`${se}px`),Ge.setProperty("--radix-popper-available-height",`${Ye}px`),Ge.setProperty("--radix-popper-anchor-width",`${rt}px`),Ge.setProperty("--radix-popper-anchor-height",`${nt}px`)}}),E&&gR({element:E,padding:a}),CR({arrowWidth:M,arrowHeight:T}),y&&mR({strategy:"referenceHidden",...$})]}),[I,L]=QS(V),B=Mn(C);wn(()=>{X&&(B==null||B())},[X,B]);const H=(J=Z.arrow)==null?void 0:J.x,P=(ie=Z.arrow)==null?void 0:ie.y,ee=((ce=Z.arrow)==null?void 0:ce.centerOffset)!==0,[ne,Q]=D.useState();return wn(()=>{v&&Q(window.getComputedStyle(v).zIndex)},[v]),g.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:X?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[(ae=Z.transformOrigin)==null?void 0:ae.x,(_e=Z.transformOrigin)==null?void 0:_e.y].join(" "),...((Ee=Z.hide)==null?void 0:Ee.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:g.jsx(bR,{scope:n,placedSide:I,onArrowChange:N,arrowX:H,arrowY:P,shouldHideArrow:ee,children:g.jsx(qe.div,{"data-side":I,"data-align":L,...w,ref:x,style:{...w.style,animation:X?void 0:"none"}})})})});YS.displayName=_v;var XS="PopperArrow",SR={top:"bottom",right:"left",bottom:"top",left:"right"},ZS=D.forwardRef(function(e,n){const{__scopePopper:i,...o}=e,l=xR(XS,i),d=SR[l.placedSide];return g.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:g.jsx(_R,{...o,ref:n,style:{...o.style,display:"block"}})})});ZS.displayName=XS;function wR(t){return t!==null}var CR=t=>({name:"transformOrigin",options:t,fn(e){var _,v,b,x,E;const{placement:n,rects:i,middlewareData:o}=e,d=((_=o.arrow)==null?void 0:_.centerOffset)!==0,a=d?0:t.arrowWidth,u=d?0:t.arrowHeight,[f,p]=QS(n),h={start:"0%",center:"50%",end:"100%"}[p],y=((b=(v=o.arrow)==null?void 0:v.x)!=null?b:0)+a/2,S=((E=(x=o.arrow)==null?void 0:x.y)!=null?E:0)+u/2;let C="",w="";return f==="bottom"?(C=d?h:`${y}px`,w=`${-u}px`):f==="top"?(C=d?h:`${y}px`,w=`${i.floating.height+u}px`):f==="right"?(C=`${-u}px`,w=d?h:`${S}px`):f==="left"&&(C=`${i.floating.width+u}px`,w=d?h:`${S}px`),{data:{x:C,y:w}}}});function QS(t){const[e,n="center"]=t.split("-");return[e,n]}var ih=GS,zu=KS,sh=YS,oh=ZS,Um="rovingFocusGroup.onEntryFocus",kR={bubbles:!1,cancelable:!0},Pu="RovingFocusGroup",[kg,JS,ER]=ev(Pu),[AR,ah]=yr(Pu,[ER]),[TR,RR]=AR(Pu),e2=D.forwardRef((t,e)=>g.jsx(kg.Provider,{scope:t.__scopeRovingFocusGroup,children:g.jsx(kg.Slot,{scope:t.__scopeRovingFocusGroup,children:g.jsx(NR,{...t,ref:e})})}));e2.displayName=Pu;var NR=D.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:i,loop:o=!1,dir:l,currentTabStopId:d,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:p=!1,...h}=t,y=D.useRef(null),S=_t(e,y),C=Ou(l),[w,_]=ws({prop:d,defaultProp:a!=null?a:null,onChange:u,caller:Pu}),[v,b]=D.useState(!1),x=Mn(f),E=JS(n),N=D.useRef(!1),[A,M]=D.useState(0);return D.useEffect(()=>{const T=y.current;if(T)return T.addEventListener(Um,x),()=>T.removeEventListener(Um,x)},[x]),g.jsx(TR,{scope:n,orientation:i,dir:C,loop:o,currentTabStopId:w,onItemFocus:D.useCallback(T=>_(T),[_]),onItemShiftTab:D.useCallback(()=>b(!0),[]),onFocusableItemAdd:D.useCallback(()=>M(T=>T+1),[]),onFocusableItemRemove:D.useCallback(()=>M(T=>T-1),[]),children:g.jsx(qe.div,{tabIndex:v||A===0?-1:0,"data-orientation":i,...h,ref:S,style:{outline:"none",...t.style},onMouseDown:je(t.onMouseDown,()=>{N.current=!0}),onFocus:je(t.onFocus,T=>{const j=!N.current;if(T.target===T.currentTarget&&j&&!v){const O=new CustomEvent(Um,kR);if(T.currentTarget.dispatchEvent(O),!O.defaultPrevented){const F=E().filter(V=>V.focusable),U=F.find(V=>V.active),$=F.find(V=>V.id===w),K=[U,$,...F].filter(Boolean).map(V=>V.ref.current);r2(K,p)}}N.current=!1}),onBlur:je(t.onBlur,()=>b(!1))})})}),t2="RovingFocusGroupItem",n2=D.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:o=!1,tabStopId:l,children:d,...a}=t,u=gn(),f=l||u,p=RR(t2,n),h=p.currentTabStopId===f,y=JS(n),{onFocusableItemAdd:S,onFocusableItemRemove:C,currentTabStopId:w}=p;return D.useEffect(()=>{if(i)return S(),()=>C()},[i,S,C]),g.jsx(kg.ItemSlot,{scope:n,id:f,focusable:i,active:o,children:g.jsx(qe.span,{tabIndex:h?0:-1,"data-orientation":p.orientation,...a,ref:e,onMouseDown:je(t.onMouseDown,_=>{i?p.onItemFocus(f):_.preventDefault()}),onFocus:je(t.onFocus,()=>p.onItemFocus(f)),onKeyDown:je(t.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){p.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const v=jR(_,p.orientation,p.dir);if(v!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let x=y().filter(E=>E.focusable).map(E=>E.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();const E=x.indexOf(_.currentTarget);x=p.loop?OR(x,E+1):x.slice(E+1)}setTimeout(()=>r2(x))}}),children:typeof d=="function"?d({isCurrentTabStop:h,hasTabStop:w!=null}):d})})});n2.displayName=t2;var DR={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function MR(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function jR(t,e,n){const i=MR(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return DR[i]}function r2(t,e=!1){const n=document.activeElement;for(const i of t)if(i===n||(i.focus({preventScroll:e}),document.activeElement!==n))return}function OR(t,e){return t.map((n,i)=>t[(e+i)%t.length])}var i2=e2,s2=n2,Eg=["Enter"," "],LR=["ArrowDown","PageUp","Home"],o2=["ArrowUp","PageDown","End"],IR=[...LR,...o2],BR={ltr:[...Eg,"ArrowRight"],rtl:[...Eg,"ArrowLeft"]},zR={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Fu="Menu",[Su,PR,FR]=ev(Fu),[ya,a2]=yr(Fu,[FR,ko,ah]),lh=ko(),l2=ah(),[HR,ba]=ya(Fu),[UR,Hu]=ya(Fu),c2=t=>{const{__scopeMenu:e,open:n=!1,children:i,dir:o,onOpenChange:l,modal:d=!0}=t,a=lh(e),[u,f]=D.useState(null),p=D.useRef(!1),h=Mn(l),y=Ou(o);return D.useEffect(()=>{const S=()=>{p.current=!0,document.addEventListener("pointerdown",C,{capture:!0,once:!0}),document.addEventListener("pointermove",C,{capture:!0,once:!0})},C=()=>p.current=!1;return document.addEventListener("keydown",S,{capture:!0}),()=>{document.removeEventListener("keydown",S,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),g.jsx(ih,{...a,children:g.jsx(HR,{scope:e,open:n,onOpenChange:h,content:u,onContentChange:f,children:g.jsx(UR,{scope:e,onClose:D.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:p,dir:y,modal:d,children:i})})})};c2.displayName=Fu;var $R="MenuAnchor",yv=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t,o=lh(n);return g.jsx(zu,{...o,...i,ref:e})});yv.displayName=$R;var bv="MenuPortal",[qR,u2]=ya(bv,{forceMount:void 0}),d2=t=>{const{__scopeMenu:e,forceMount:n,children:i,container:o}=t,l=ba(bv,e);return g.jsx(qR,{scope:e,forceMount:n,children:g.jsx(Cn,{present:n||l.open,children:g.jsx(Kl,{asChild:!0,container:o,children:i})})})};d2.displayName=bv;var Fr="MenuContent",[VR,xv]=ya(Fr),f2=D.forwardRef((t,e)=>{const n=u2(Fr,t.__scopeMenu),{forceMount:i=n.forceMount,...o}=t,l=ba(Fr,t.__scopeMenu),d=Hu(Fr,t.__scopeMenu);return g.jsx(Su.Provider,{scope:t.__scopeMenu,children:g.jsx(Cn,{present:i||l.open,children:g.jsx(Su.Slot,{scope:t.__scopeMenu,children:d.modal?g.jsx(GR,{...o,ref:e}):g.jsx(WR,{...o,ref:e})})})})}),GR=D.forwardRef((t,e)=>{const n=ba(Fr,t.__scopeMenu),i=D.useRef(null),o=_t(e,i);return D.useEffect(()=>{const l=i.current;if(l)return Zf(l)},[]),g.jsx(Sv,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:je(t.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),WR=D.forwardRef((t,e)=>{const n=ba(Fr,t.__scopeMenu);return g.jsx(Sv,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),KR=_o("MenuContent.ScrollLock"),Sv=D.forwardRef((t,e)=>{const{__scopeMenu:n,loop:i=!1,trapFocus:o,onOpenAutoFocus:l,onCloseAutoFocus:d,disableOutsidePointerEvents:a,onEntryFocus:u,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:h,onInteractOutside:y,onDismiss:S,disableOutsideScroll:C,...w}=t,_=ba(Fr,n),v=Hu(Fr,n),b=lh(n),x=l2(n),E=PR(n),[N,A]=D.useState(null),M=D.useRef(null),T=_t(e,M,_.onContentChange),j=D.useRef(0),O=D.useRef(""),F=D.useRef(0),U=D.useRef(null),$=D.useRef("right"),G=D.useRef(0),K=C?Iu:D.Fragment,V=C?{as:KR,allowPinchZoom:!0}:void 0,X=I=>{var W,q;const L=O.current+I,B=E().filter(J=>!J.disabled),H=document.activeElement,P=(W=B.find(J=>J.ref.current===H))==null?void 0:W.textValue,ee=B.map(J=>J.textValue),ne=o6(ee,L,P),Q=(q=B.find(J=>J.textValue===ne))==null?void 0:q.ref.current;(function J(ie){O.current=ie,window.clearTimeout(j.current),ie!==""&&(j.current=window.setTimeout(()=>J(""),1e3))})(L),Q&&setTimeout(()=>Q.focus())};D.useEffect(()=>()=>window.clearTimeout(j.current),[]),Yf();const Z=D.useCallback(I=>{var B,H;return $.current===((B=U.current)==null?void 0:B.side)&&l6(I,(H=U.current)==null?void 0:H.area)},[]);return g.jsx(VR,{scope:n,searchRef:O,onItemEnter:D.useCallback(I=>{Z(I)&&I.preventDefault()},[Z]),onItemLeave:D.useCallback(I=>{var L;Z(I)||((L=M.current)==null||L.focus(),A(null))},[Z]),onTriggerLeave:D.useCallback(I=>{Z(I)&&I.preventDefault()},[Z]),pointerGraceTimerRef:F,onPointerGraceIntentChange:D.useCallback(I=>{U.current=I},[]),children:g.jsx(K,{...V,children:g.jsx(Lu,{asChild:!0,trapped:o,onMountAutoFocus:je(l,I=>{var L;I.preventDefault(),(L=M.current)==null||L.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:g.jsx(Wl,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:h,onInteractOutside:y,onDismiss:S,children:g.jsx(i2,{asChild:!0,...x,dir:v.dir,orientation:"vertical",loop:i,currentTabStopId:N,onCurrentTabStopIdChange:A,onEntryFocus:je(u,I=>{v.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(sh,{role:"menu","aria-orientation":"vertical","data-state":T2(_.open),"data-radix-menu-content":"",dir:v.dir,...b,...w,ref:T,style:{outline:"none",...w.style},onKeyDown:je(w.onKeyDown,I=>{const B=I.target.closest("[data-radix-menu-content]")===I.currentTarget,H=I.ctrlKey||I.altKey||I.metaKey,P=I.key.length===1;B&&(I.key==="Tab"&&I.preventDefault(),!H&&P&&X(I.key));const ee=M.current;if(I.target!==ee||!IR.includes(I.key))return;I.preventDefault();const Q=E().filter(W=>!W.disabled).map(W=>W.ref.current);o2.includes(I.key)&&Q.reverse(),i6(Q)}),onBlur:je(t.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(j.current),O.current="")}),onPointerMove:je(t.onPointerMove,wu(I=>{const L=I.target,B=G.current!==I.clientX;if(I.currentTarget.contains(L)&&B){const H=I.clientX>G.current?"right":"left";$.current=H,G.current=I.clientX}}))})})})})})})});f2.displayName=Fr;var YR="MenuGroup",wv=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t;return g.jsx(qe.div,{role:"group",...i,ref:e})});wv.displayName=YR;var XR="MenuLabel",h2=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t;return g.jsx(qe.div,{...i,ref:e})});h2.displayName=XR;var Rf="MenuItem",lb="menu.itemSelect",ch=D.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:i,...o}=t,l=D.useRef(null),d=Hu(Rf,t.__scopeMenu),a=xv(Rf,t.__scopeMenu),u=_t(e,l),f=D.useRef(!1),p=()=>{const h=l.current;if(!n&&h){const y=new CustomEvent(lb,{bubbles:!0,cancelable:!0});h.addEventListener(lb,S=>i==null?void 0:i(S),{once:!0}),Xx(h,y),y.defaultPrevented?f.current=!1:d.onClose()}};return g.jsx(p2,{...o,ref:u,disabled:n,onClick:je(t.onClick,p),onPointerDown:h=>{var y;(y=t.onPointerDown)==null||y.call(t,h),f.current=!0},onPointerUp:je(t.onPointerUp,h=>{var y;f.current||(y=h.currentTarget)==null||y.click()}),onKeyDown:je(t.onKeyDown,h=>{const y=a.searchRef.current!=="";n||y&&h.key===" "||Eg.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});ch.displayName=Rf;var p2=D.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:i=!1,textValue:o,...l}=t,d=xv(Rf,n),a=l2(n),u=D.useRef(null),f=_t(e,u),[p,h]=D.useState(!1),[y,S]=D.useState("");return D.useEffect(()=>{var w;const C=u.current;C&&S(((w=C.textContent)!=null?w:"").trim())},[l.children]),g.jsx(Su.ItemSlot,{scope:n,disabled:i,textValue:o!=null?o:y,children:g.jsx(s2,{asChild:!0,...a,focusable:!i,children:g.jsx(qe.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...l,ref:f,onPointerMove:je(t.onPointerMove,wu(C=>{i?d.onItemLeave(C):(d.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:je(t.onPointerLeave,wu(C=>d.onItemLeave(C))),onFocus:je(t.onFocus,()=>h(!0)),onBlur:je(t.onBlur,()=>h(!1))})})})}),ZR="MenuCheckboxItem",m2=D.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:i,...o}=t;return g.jsx(b2,{scope:t.__scopeMenu,checked:n,children:g.jsx(ch,{role:"menuitemcheckbox","aria-checked":Nf(n)?"mixed":n,...o,ref:e,"data-state":kv(n),onSelect:je(o.onSelect,()=>i==null?void 0:i(Nf(n)?!0:!n),{checkForDefaultPrevented:!1})})})});m2.displayName=ZR;var g2="MenuRadioGroup",[QR,JR]=ya(g2,{value:void 0,onValueChange:()=>{}}),v2=D.forwardRef((t,e)=>{const{value:n,onValueChange:i,...o}=t,l=Mn(i);return g.jsx(QR,{scope:t.__scopeMenu,value:n,onValueChange:l,children:g.jsx(wv,{...o,ref:e})})});v2.displayName=g2;var _2="MenuRadioItem",y2=D.forwardRef((t,e)=>{const{value:n,...i}=t,o=JR(_2,t.__scopeMenu),l=n===o.value;return g.jsx(b2,{scope:t.__scopeMenu,checked:l,children:g.jsx(ch,{role:"menuitemradio","aria-checked":l,...i,ref:e,"data-state":kv(l),onSelect:je(i.onSelect,()=>{var d;return(d=o.onValueChange)==null?void 0:d.call(o,n)},{checkForDefaultPrevented:!1})})})});y2.displayName=_2;var Cv="MenuItemIndicator",[b2,e6]=ya(Cv,{checked:!1}),x2=D.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:i,...o}=t,l=e6(Cv,n);return g.jsx(Cn,{present:i||Nf(l.checked)||l.checked===!0,children:g.jsx(qe.span,{...o,ref:e,"data-state":kv(l.checked)})})});x2.displayName=Cv;var t6="MenuSeparator",S2=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t;return g.jsx(qe.div,{role:"separator","aria-orientation":"horizontal",...i,ref:e})});S2.displayName=t6;var n6="MenuArrow",w2=D.forwardRef((t,e)=>{const{__scopeMenu:n,...i}=t,o=lh(n);return g.jsx(oh,{...o,...i,ref:e})});w2.displayName=n6;var r6="MenuSub",[mH,C2]=ya(r6),hu="MenuSubTrigger",k2=D.forwardRef((t,e)=>{const n=ba(hu,t.__scopeMenu),i=Hu(hu,t.__scopeMenu),o=C2(hu,t.__scopeMenu),l=xv(hu,t.__scopeMenu),d=D.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:u}=l,f={__scopeMenu:t.__scopeMenu},p=D.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return D.useEffect(()=>p,[p]),D.useEffect(()=>{const h=a.current;return()=>{window.clearTimeout(h),u(null)}},[a,u]),g.jsx(yv,{asChild:!0,...f,children:g.jsx(p2,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":T2(n.open),...t,ref:Ss(e,o.onTriggerChange),onClick:h=>{var y;(y=t.onClick)==null||y.call(t,h),!(t.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:je(t.onPointerMove,wu(h=>{l.onItemEnter(h),!h.defaultPrevented&&!t.disabled&&!n.open&&!d.current&&(l.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:je(t.onPointerLeave,wu(h=>{var S,C;p();const y=(S=n.content)==null?void 0:S.getBoundingClientRect();if(y){const w=(C=n.content)==null?void 0:C.dataset.side,_=w==="right",v=_?-5:5,b=y[_?"left":"right"],x=y[_?"right":"left"];l.onPointerGraceIntentChange({area:[{x:h.clientX+v,y:h.clientY},{x:b,y:y.top},{x,y:y.top},{x,y:y.bottom},{x:b,y:y.bottom}],side:w}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>l.onPointerGraceIntentChange(null),300)}else{if(l.onTriggerLeave(h),h.defaultPrevented)return;l.onPointerGraceIntentChange(null)}})),onKeyDown:je(t.onKeyDown,h=>{var S;const y=l.searchRef.current!=="";t.disabled||y&&h.key===" "||BR[i.dir].includes(h.key)&&(n.onOpenChange(!0),(S=n.content)==null||S.focus(),h.preventDefault())})})})});k2.displayName=hu;var E2="MenuSubContent",A2=D.forwardRef((t,e)=>{const n=u2(Fr,t.__scopeMenu),{forceMount:i=n.forceMount,...o}=t,l=ba(Fr,t.__scopeMenu),d=Hu(Fr,t.__scopeMenu),a=C2(E2,t.__scopeMenu),u=D.useRef(null),f=_t(e,u);return g.jsx(Su.Provider,{scope:t.__scopeMenu,children:g.jsx(Cn,{present:i||l.open,children:g.jsx(Su.Slot,{scope:t.__scopeMenu,children:g.jsx(Sv,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:f,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var h;d.isUsingKeyboardRef.current&&((h=u.current)==null||h.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:je(t.onFocusOutside,p=>{p.target!==a.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:je(t.onEscapeKeyDown,p=>{d.onClose(),p.preventDefault()}),onKeyDown:je(t.onKeyDown,p=>{var S;const h=p.currentTarget.contains(p.target),y=zR[d.dir].includes(p.key);h&&y&&(l.onOpenChange(!1),(S=a.trigger)==null||S.focus(),p.preventDefault())})})})})})});A2.displayName=E2;function T2(t){return t?"open":"closed"}function Nf(t){return t==="indeterminate"}function kv(t){return Nf(t)?"indeterminate":t?"checked":"unchecked"}function i6(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function s6(t,e){return t.map((n,i)=>t[(e+i)%t.length])}function o6(t,e,n){const o=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,l=n?t.indexOf(n):-1;let d=s6(t,Math.max(l,0));o.length===1&&(d=d.filter(f=>f!==n));const u=d.find(f=>f.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function a6(t,e){const{x:n,y:i}=t;let o=!1;for(let l=0,d=e.length-1;l<e.length;d=l++){const a=e[l],u=e[d],f=a.x,p=a.y,h=u.x,y=u.y;p>i!=y>i&&n<(h-f)*(i-p)/(y-p)+f&&(o=!o)}return o}function l6(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return a6(n,e)}function wu(t){return e=>e.pointerType==="mouse"?t(e):void 0}var c6=c2,u6=yv,d6=d2,f6=f2,h6=wv,p6=h2,m6=ch,g6=m2,v6=v2,_6=y2,y6=x2,b6=S2,x6=w2,S6=k2,w6=A2,uh="DropdownMenu",[C6]=yr(uh,[a2]),$n=a2(),[k6,R2]=C6(uh),N2=t=>{const{__scopeDropdownMenu:e,children:n,dir:i,open:o,defaultOpen:l,onOpenChange:d,modal:a=!0}=t,u=$n(e),f=D.useRef(null),[p,h]=ws({prop:o,defaultProp:l!=null?l:!1,onChange:d,caller:uh});return g.jsx(k6,{scope:e,triggerId:gn(),triggerRef:f,contentId:gn(),open:p,onOpenChange:h,onOpenToggle:D.useCallback(()=>h(y=>!y),[h]),modal:a,children:g.jsx(c6,{...u,open:p,onOpenChange:h,dir:i,modal:a,children:n})})};N2.displayName=uh;var D2="DropdownMenuTrigger",M2=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:i=!1,...o}=t,l=R2(D2,n),d=$n(n);return g.jsx(u6,{asChild:!0,...d,children:g.jsx(qe.button,{type:"button",id:l.triggerId,"aria-haspopup":"menu","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":l.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...o,ref:Ss(e,l.triggerRef),onPointerDown:je(t.onPointerDown,a=>{!i&&a.button===0&&a.ctrlKey===!1&&(l.onOpenToggle(),l.open||a.preventDefault())}),onKeyDown:je(t.onKeyDown,a=>{i||(["Enter"," "].includes(a.key)&&l.onOpenToggle(),a.key==="ArrowDown"&&l.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});M2.displayName=D2;var E6="DropdownMenuPortal",j2=t=>{const{__scopeDropdownMenu:e,...n}=t,i=$n(e);return g.jsx(d6,{...i,...n})};j2.displayName=E6;var O2="DropdownMenuContent",L2=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=R2(O2,n),l=$n(n),d=D.useRef(!1);return g.jsx(f6,{id:o.contentId,"aria-labelledby":o.triggerId,...l,...i,ref:e,onCloseAutoFocus:je(t.onCloseAutoFocus,a=>{var u;d.current||(u=o.triggerRef.current)==null||u.focus(),d.current=!1,a.preventDefault()}),onInteractOutside:je(t.onInteractOutside,a=>{const u=a.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,p=u.button===2||f;(!o.modal||p)&&(d.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});L2.displayName=O2;var A6="DropdownMenuGroup",T6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=$n(n);return g.jsx(h6,{...o,...i,ref:e})});T6.displayName=A6;var R6="DropdownMenuLabel",N6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=$n(n);return g.jsx(p6,{...o,...i,ref:e})});N6.displayName=R6;var D6="DropdownMenuItem",I2=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=$n(n);return g.jsx(m6,{...o,...i,ref:e})});I2.displayName=D6;var M6="DropdownMenuCheckboxItem",j6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=$n(n);return g.jsx(g6,{...o,...i,ref:e})});j6.displayName=M6;var O6="DropdownMenuRadioGroup",L6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=$n(n);return g.jsx(v6,{...o,...i,ref:e})});L6.displayName=O6;var I6="DropdownMenuRadioItem",B6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=$n(n);return g.jsx(_6,{...o,...i,ref:e})});B6.displayName=I6;var z6="DropdownMenuItemIndicator",P6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=$n(n);return g.jsx(y6,{...o,...i,ref:e})});P6.displayName=z6;var F6="DropdownMenuSeparator",H6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=$n(n);return g.jsx(b6,{...o,...i,ref:e})});H6.displayName=F6;var U6="DropdownMenuArrow",$6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=$n(n);return g.jsx(x6,{...o,...i,ref:e})});$6.displayName=U6;var q6="DropdownMenuSubTrigger",V6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=$n(n);return g.jsx(S6,{...o,...i,ref:e})});V6.displayName=q6;var G6="DropdownMenuSubContent",W6=D.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...i}=t,o=$n(n);return g.jsx(w6,{...o,...i,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});W6.displayName=G6;var K6=N2,Y6=M2,X6=j2,Z6=L2,Q6=I2,J6="Label",B2=D.forwardRef((t,e)=>g.jsx(qe.label,{...t,ref:e,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=t.onMouseDown)==null||o.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));B2.displayName=J6;var eN=B2;function Ag(t,[e,n]){return Math.min(n,Math.max(e,t))}var dh="Popover",[z2]=yr(dh,[ko]),Uu=ko(),[tN,Eo]=z2(dh),P2=t=>{const{__scopePopover:e,children:n,open:i,defaultOpen:o,onOpenChange:l,modal:d=!1}=t,a=Uu(e),u=D.useRef(null),[f,p]=D.useState(!1),[h,y]=ws({prop:i,defaultProp:o!=null?o:!1,onChange:l,caller:dh});return g.jsx(ih,{...a,children:g.jsx(tN,{scope:e,contentId:gn(),triggerRef:u,open:h,onOpenChange:y,onOpenToggle:D.useCallback(()=>y(S=>!S),[y]),hasCustomAnchor:f,onCustomAnchorAdd:D.useCallback(()=>p(!0),[]),onCustomAnchorRemove:D.useCallback(()=>p(!1),[]),modal:d,children:n})})};P2.displayName=dh;var F2="PopoverAnchor",H2=D.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,o=Eo(F2,n),l=Uu(n),{onCustomAnchorAdd:d,onCustomAnchorRemove:a}=o;return D.useEffect(()=>(d(),()=>a()),[d,a]),g.jsx(zu,{...l,...i,ref:e})});H2.displayName=F2;var U2="PopoverTrigger",$2=D.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,o=Eo(U2,n),l=Uu(n),d=_t(e,o.triggerRef),a=g.jsx(qe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":K2(o.open),...i,ref:d,onClick:je(t.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:g.jsx(zu,{asChild:!0,...l,children:a})});$2.displayName=U2;var Ev="PopoverPortal",[nN,rN]=z2(Ev,{forceMount:void 0}),q2=t=>{const{__scopePopover:e,forceMount:n,children:i,container:o}=t,l=Eo(Ev,e);return g.jsx(nN,{scope:e,forceMount:n,children:g.jsx(Cn,{present:n||l.open,children:g.jsx(Kl,{asChild:!0,container:o,children:i})})})};q2.displayName=Ev;var Ll="PopoverContent",V2=D.forwardRef((t,e)=>{const n=rN(Ll,t.__scopePopover),{forceMount:i=n.forceMount,...o}=t,l=Eo(Ll,t.__scopePopover);return g.jsx(Cn,{present:i||l.open,children:l.modal?g.jsx(sN,{...o,ref:e}):g.jsx(oN,{...o,ref:e})})});V2.displayName=Ll;var iN=_o("PopoverContent.RemoveScroll"),sN=D.forwardRef((t,e)=>{const n=Eo(Ll,t.__scopePopover),i=D.useRef(null),o=_t(e,i),l=D.useRef(!1);return D.useEffect(()=>{const d=i.current;if(d)return Zf(d)},[]),g.jsx(Iu,{as:iN,allowPinchZoom:!0,children:g.jsx(G2,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:je(t.onCloseAutoFocus,d=>{var a;d.preventDefault(),l.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:je(t.onPointerDownOutside,d=>{const a=d.detail.originalEvent,u=a.button===0&&a.ctrlKey===!0,f=a.button===2||u;l.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:je(t.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1})})})}),oN=D.forwardRef((t,e)=>{const n=Eo(Ll,t.__scopePopover),i=D.useRef(!1),o=D.useRef(!1);return g.jsx(G2,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var d,a;(d=t.onCloseAutoFocus)==null||d.call(t,l),l.defaultPrevented||(i.current||(a=n.triggerRef.current)==null||a.focus(),l.preventDefault()),i.current=!1,o.current=!1},onInteractOutside:l=>{var u,f;(u=t.onInteractOutside)==null||u.call(t,l),l.defaultPrevented||(i.current=!0,l.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const d=l.target;((f=n.triggerRef.current)==null?void 0:f.contains(d))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&o.current&&l.preventDefault()}})}),G2=D.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:d,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:p,...h}=t,y=Eo(Ll,n),S=Uu(n);return Yf(),g.jsx(Lu,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:o,onUnmountAutoFocus:l,children:g.jsx(Wl,{asChild:!0,disableOutsidePointerEvents:d,onInteractOutside:p,onEscapeKeyDown:a,onPointerDownOutside:u,onFocusOutside:f,onDismiss:()=>y.onOpenChange(!1),children:g.jsx(sh,{"data-state":K2(y.open),role:"dialog",id:y.contentId,...S,...h,ref:e,style:{...h.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),W2="PopoverClose",aN=D.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,o=Eo(W2,n);return g.jsx(qe.button,{type:"button",...i,ref:e,onClick:je(t.onClick,()=>o.onOpenChange(!1))})});aN.displayName=W2;var lN="PopoverArrow",cN=D.forwardRef((t,e)=>{const{__scopePopover:n,...i}=t,o=Uu(n);return g.jsx(oh,{...o,...i,ref:e})});cN.displayName=lN;function K2(t){return t?"open":"closed"}var uN=P2,dN=H2,fN=$2,hN=q2,pN=V2,Av="Progress",Tv=100,[mN]=yr(Av),[gN,vN]=mN(Av),Y2=D.forwardRef((t,e)=>{const{__scopeProgress:n,value:i=null,max:o,getValueLabel:l=_N,...d}=t;(o||o===0)&&!cb(o)&&console.error(yN(`${o}`,"Progress"));const a=cb(o)?o:Tv;i!==null&&!ub(i,a)&&console.error(bN(`${i}`,"Progress"));const u=ub(i,a)?i:null,f=Df(u)?l(u,a):void 0;return g.jsx(gN,{scope:n,value:u,max:a,children:g.jsx(qe.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Df(u)?u:void 0,"aria-valuetext":f,role:"progressbar","data-state":Q2(u,a),"data-value":u!=null?u:void 0,"data-max":a,...d,ref:e})})});Y2.displayName=Av;var X2="ProgressIndicator",Z2=D.forwardRef((t,e)=>{var l;const{__scopeProgress:n,...i}=t,o=vN(X2,n);return g.jsx(qe.div,{"data-state":Q2(o.value,o.max),"data-value":(l=o.value)!=null?l:void 0,"data-max":o.max,...i,ref:e})});Z2.displayName=X2;function _N(t,e){return`${Math.round(t/e*100)}%`}function Q2(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function Df(t){return typeof t=="number"}function cb(t){return Df(t)&&!isNaN(t)&&t>0}function ub(t,e){return Df(t)&&!isNaN(t)&&t<=e&&t>=0}function yN(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Tv}\`.`}function bN(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be:
482
+ - a positive number
483
+ - less than the value passed to \`max\` (or ${Tv} if no \`max\` prop is set)
484
+ - \`null\` or \`undefined\` if the progress is indeterminate.
485
+
486
+ Defaulting to \`null\`.`}var xN=Y2,SN=Z2;function wN(t,e){return D.useReducer((n,i)=>{const o=e[n][i];return o!=null?o:n},t)}var Rv="ScrollArea",[J2]=yr(Rv),[CN,Hr]=J2(Rv),ew=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,type:i="hover",dir:o,scrollHideDelay:l=600,...d}=t,[a,u]=D.useState(null),[f,p]=D.useState(null),[h,y]=D.useState(null),[S,C]=D.useState(null),[w,_]=D.useState(null),[v,b]=D.useState(0),[x,E]=D.useState(0),[N,A]=D.useState(!1),[M,T]=D.useState(!1),j=_t(e,F=>u(F)),O=Ou(o);return g.jsx(CN,{scope:n,type:i,dir:O,scrollHideDelay:l,scrollArea:a,viewport:f,onViewportChange:p,content:h,onContentChange:y,scrollbarX:S,onScrollbarXChange:C,scrollbarXEnabled:N,onScrollbarXEnabledChange:A,scrollbarY:w,onScrollbarYChange:_,scrollbarYEnabled:M,onScrollbarYEnabledChange:T,onCornerWidthChange:b,onCornerHeightChange:E,children:g.jsx(qe.div,{dir:O,...d,ref:j,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":x+"px",...t.style}})})});ew.displayName=Rv;var tw="ScrollAreaViewport",nw=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,children:i,nonce:o,...l}=t,d=Hr(tw,n),a=D.useRef(null),u=_t(e,a,d.onViewportChange);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),g.jsx(qe.div,{"data-radix-scroll-area-viewport":"",...l,ref:u,style:{overflowX:d.scrollbarXEnabled?"scroll":"hidden",overflowY:d.scrollbarYEnabled?"scroll":"hidden",...t.style},children:g.jsx("div",{ref:d.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});nw.displayName=tw;var Mi="ScrollAreaScrollbar",rw=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=Hr(Mi,t.__scopeScrollArea),{onScrollbarXEnabledChange:l,onScrollbarYEnabledChange:d}=o,a=t.orientation==="horizontal";return D.useEffect(()=>(a?l(!0):d(!0),()=>{a?l(!1):d(!1)}),[a,l,d]),o.type==="hover"?g.jsx(kN,{...i,ref:e,forceMount:n}):o.type==="scroll"?g.jsx(EN,{...i,ref:e,forceMount:n}):o.type==="auto"?g.jsx(iw,{...i,ref:e,forceMount:n}):o.type==="always"?g.jsx(Nv,{...i,ref:e}):null});rw.displayName=Mi;var kN=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=Hr(Mi,t.__scopeScrollArea),[l,d]=D.useState(!1);return D.useEffect(()=>{const a=o.scrollArea;let u=0;if(a){const f=()=>{window.clearTimeout(u),d(!0)},p=()=>{u=window.setTimeout(()=>d(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",f),a.addEventListener("pointerleave",p),()=>{window.clearTimeout(u),a.removeEventListener("pointerenter",f),a.removeEventListener("pointerleave",p)}}},[o.scrollArea,o.scrollHideDelay]),g.jsx(Cn,{present:n||l,children:g.jsx(iw,{"data-state":l?"visible":"hidden",...i,ref:e})})}),EN=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=Hr(Mi,t.__scopeScrollArea),l=t.orientation==="horizontal",d=hh(()=>u("SCROLL_END"),100),[a,u]=wN("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return D.useEffect(()=>{if(a==="idle"){const f=window.setTimeout(()=>u("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(f)}},[a,o.scrollHideDelay,u]),D.useEffect(()=>{const f=o.viewport,p=l?"scrollLeft":"scrollTop";if(f){let h=f[p];const y=()=>{const S=f[p];h!==S&&(u("SCROLL"),d()),h=S};return f.addEventListener("scroll",y),()=>f.removeEventListener("scroll",y)}},[o.viewport,l,u,d]),g.jsx(Cn,{present:n||a!=="hidden",children:g.jsx(Nv,{"data-state":a==="hidden"?"hidden":"visible",...i,ref:e,onPointerEnter:je(t.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:je(t.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),iw=D.forwardRef((t,e)=>{const n=Hr(Mi,t.__scopeScrollArea),{forceMount:i,...o}=t,[l,d]=D.useState(!1),a=t.orientation==="horizontal",u=hh(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,p=n.viewport.offsetHeight<n.viewport.scrollHeight;d(a?f:p)}},10);return Il(n.viewport,u),Il(n.content,u),g.jsx(Cn,{present:i||l,children:g.jsx(Nv,{"data-state":l?"visible":"hidden",...o,ref:e})})}),Nv=D.forwardRef((t,e)=>{const{orientation:n="vertical",...i}=t,o=Hr(Mi,t.__scopeScrollArea),l=D.useRef(null),d=D.useRef(0),[a,u]=D.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=cw(a.viewport,a.content),p={...i,sizes:a,onSizesChange:u,hasThumb:f>0&&f<1,onThumbChange:y=>l.current=y,onThumbPointerUp:()=>d.current=0,onThumbPointerDown:y=>d.current=y};function h(y,S){return MN(y,d.current,a,S)}return n==="horizontal"?g.jsx(AN,{...p,ref:e,onThumbPositionChange:()=>{if(o.viewport&&l.current){const y=o.viewport.scrollLeft,S=db(y,a,o.dir);l.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:y=>{o.viewport&&(o.viewport.scrollLeft=y)},onDragScroll:y=>{o.viewport&&(o.viewport.scrollLeft=h(y,o.dir))}}):n==="vertical"?g.jsx(TN,{...p,ref:e,onThumbPositionChange:()=>{if(o.viewport&&l.current){const y=o.viewport.scrollTop,S=db(y,a);l.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:y=>{o.viewport&&(o.viewport.scrollTop=y)},onDragScroll:y=>{o.viewport&&(o.viewport.scrollTop=h(y))}}):null}),AN=D.forwardRef((t,e)=>{const{sizes:n,onSizesChange:i,...o}=t,l=Hr(Mi,t.__scopeScrollArea),[d,a]=D.useState(),u=D.useRef(null),f=_t(e,u,l.onScrollbarXChange);return D.useEffect(()=>{u.current&&a(getComputedStyle(u.current))},[u]),g.jsx(ow,{"data-orientation":"horizontal",...o,ref:f,sizes:n,style:{bottom:0,left:l.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:l.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":fh(n)+"px",...t.style},onThumbPointerDown:p=>t.onThumbPointerDown(p.x),onDragScroll:p=>t.onDragScroll(p.x),onWheelScroll:(p,h)=>{if(l.viewport){const y=l.viewport.scrollLeft+p.deltaX;t.onWheelScroll(y),dw(y,h)&&p.preventDefault()}},onResize:()=>{u.current&&l.viewport&&d&&i({content:l.viewport.scrollWidth,viewport:l.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:jf(d.paddingLeft),paddingEnd:jf(d.paddingRight)}})}})}),TN=D.forwardRef((t,e)=>{const{sizes:n,onSizesChange:i,...o}=t,l=Hr(Mi,t.__scopeScrollArea),[d,a]=D.useState(),u=D.useRef(null),f=_t(e,u,l.onScrollbarYChange);return D.useEffect(()=>{u.current&&a(getComputedStyle(u.current))},[u]),g.jsx(ow,{"data-orientation":"vertical",...o,ref:f,sizes:n,style:{top:0,right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":fh(n)+"px",...t.style},onThumbPointerDown:p=>t.onThumbPointerDown(p.y),onDragScroll:p=>t.onDragScroll(p.y),onWheelScroll:(p,h)=>{if(l.viewport){const y=l.viewport.scrollTop+p.deltaY;t.onWheelScroll(y),dw(y,h)&&p.preventDefault()}},onResize:()=>{u.current&&l.viewport&&d&&i({content:l.viewport.scrollHeight,viewport:l.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:jf(d.paddingTop),paddingEnd:jf(d.paddingBottom)}})}})}),[RN,sw]=J2(Mi),ow=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,sizes:i,hasThumb:o,onThumbChange:l,onThumbPointerUp:d,onThumbPointerDown:a,onThumbPositionChange:u,onDragScroll:f,onWheelScroll:p,onResize:h,...y}=t,S=Hr(Mi,n),[C,w]=D.useState(null),_=_t(e,j=>w(j)),v=D.useRef(null),b=D.useRef(""),x=S.viewport,E=i.content-i.viewport,N=Mn(p),A=Mn(u),M=hh(h,10);function T(j){if(v.current){const O=j.clientX-v.current.left,F=j.clientY-v.current.top;f({x:O,y:F})}}return D.useEffect(()=>{const j=O=>{const F=O.target;(C==null?void 0:C.contains(F))&&N(O,E)};return document.addEventListener("wheel",j,{passive:!1}),()=>document.removeEventListener("wheel",j,{passive:!1})},[x,C,E,N]),D.useEffect(A,[i,A]),Il(C,M),Il(S.content,M),g.jsx(RN,{scope:n,scrollbar:C,hasThumb:o,onThumbChange:Mn(l),onThumbPointerUp:Mn(d),onThumbPositionChange:A,onThumbPointerDown:Mn(a),children:g.jsx(qe.div,{...y,ref:_,style:{position:"absolute",...y.style},onPointerDown:je(t.onPointerDown,j=>{j.button===0&&(j.target.setPointerCapture(j.pointerId),v.current=C.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),T(j))}),onPointerMove:je(t.onPointerMove,T),onPointerUp:je(t.onPointerUp,j=>{const O=j.target;O.hasPointerCapture(j.pointerId)&&O.releasePointerCapture(j.pointerId),document.body.style.webkitUserSelect=b.current,S.viewport&&(S.viewport.style.scrollBehavior=""),v.current=null})})})}),Mf="ScrollAreaThumb",aw=D.forwardRef((t,e)=>{const{forceMount:n,...i}=t,o=sw(Mf,t.__scopeScrollArea);return g.jsx(Cn,{present:n||o.hasThumb,children:g.jsx(NN,{ref:e,...i})})}),NN=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,style:i,...o}=t,l=Hr(Mf,n),d=sw(Mf,n),{onThumbPositionChange:a}=d,u=_t(e,h=>d.onThumbChange(h)),f=D.useRef(void 0),p=hh(()=>{f.current&&(f.current(),f.current=void 0)},100);return D.useEffect(()=>{const h=l.viewport;if(h){const y=()=>{if(p(),!f.current){const S=jN(h,a);f.current=S,a()}};return a(),h.addEventListener("scroll",y),()=>h.removeEventListener("scroll",y)}},[l.viewport,p,a]),g.jsx(qe.div,{"data-state":d.hasThumb?"visible":"hidden",...o,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:je(t.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),C=h.clientX-S.left,w=h.clientY-S.top;d.onThumbPointerDown({x:C,y:w})}),onPointerUp:je(t.onPointerUp,d.onThumbPointerUp)})});aw.displayName=Mf;var Dv="ScrollAreaCorner",lw=D.forwardRef((t,e)=>{const n=Hr(Dv,t.__scopeScrollArea),i=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&i?g.jsx(DN,{...t,ref:e}):null});lw.displayName=Dv;var DN=D.forwardRef((t,e)=>{const{__scopeScrollArea:n,...i}=t,o=Hr(Dv,n),[l,d]=D.useState(0),[a,u]=D.useState(0),f=!!(l&&a);return Il(o.scrollbarX,()=>{var h;const p=((h=o.scrollbarX)==null?void 0:h.offsetHeight)||0;o.onCornerHeightChange(p),u(p)}),Il(o.scrollbarY,()=>{var h;const p=((h=o.scrollbarY)==null?void 0:h.offsetWidth)||0;o.onCornerWidthChange(p),d(p)}),f?g.jsx(qe.div,{...i,ref:e,style:{width:l,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function jf(t){return t?parseInt(t,10):0}function cw(t,e){const n=t/e;return isNaN(n)?0:n}function fh(t){const e=cw(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=(t.scrollbar.size-n)*e;return Math.max(i,18)}function MN(t,e,n,i="ltr"){const o=fh(n),l=o/2,d=e||l,a=o-d,u=n.scrollbar.paddingStart+d,f=n.scrollbar.size-n.scrollbar.paddingEnd-a,p=n.content-n.viewport,h=i==="ltr"?[0,p]:[p*-1,0];return uw([u,f],h)(t)}function db(t,e,n="ltr"){const i=fh(e),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,l=e.scrollbar.size-o,d=e.content-e.viewport,a=l-i,u=n==="ltr"?[0,d]:[d*-1,0],f=Ag(t,u);return uw([0,d],[0,a])(f)}function uw(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const i=(e[1]-e[0])/(t[1]-t[0]);return e[0]+i*(n-t[0])}}function dw(t,e){return t>0&&t<e}var jN=(t,e=()=>{})=>{let n={left:t.scrollLeft,top:t.scrollTop},i=0;return(function o(){const l={left:t.scrollLeft,top:t.scrollTop},d=n.left!==l.left,a=n.top!==l.top;(d||a)&&e(),n=l,i=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(i)};function hh(t,e){const n=Mn(t),i=D.useRef(0);return D.useEffect(()=>()=>window.clearTimeout(i.current),[]),D.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(n,e)},[n,e])}function Il(t,e){const n=Mn(e);wn(()=>{let i=0;if(t){const o=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(n)});return o.observe(t),()=>{window.cancelAnimationFrame(i),o.unobserve(t)}}},[t,n])}var ON=ew,LN=nw,IN=lw,BN=[" ","Enter","ArrowUp","ArrowDown"],zN=[" ","Enter"],ma="Select",[ph,mh,PN]=ev(ma),[Zl]=yr(ma,[PN,ko]),gh=ko(),[FN,Ao]=Zl(ma),[HN,UN]=Zl(ma),fw=t=>{const{__scopeSelect:e,children:n,open:i,defaultOpen:o,onOpenChange:l,value:d,defaultValue:a,onValueChange:u,dir:f,name:p,autoComplete:h,disabled:y,required:S,form:C}=t,w=gh(e),[_,v]=D.useState(null),[b,x]=D.useState(null),[E,N]=D.useState(!1),A=Ou(f),[M,T]=ws({prop:i,defaultProp:o!=null?o:!1,onChange:l,caller:ma}),[j,O]=ws({prop:d,defaultProp:a,onChange:u,caller:ma}),F=D.useRef(null),U=_?C||!!_.closest("form"):!0,[$,G]=D.useState(new Set),K=Array.from($).map(V=>V.props.value).join(";");return g.jsx(ih,{...w,children:g.jsxs(FN,{required:S,scope:e,trigger:_,onTriggerChange:v,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:E,onValueNodeHasChildrenChange:N,contentId:gn(),value:j,onValueChange:O,open:M,onOpenChange:T,dir:A,triggerPointerDownPosRef:F,disabled:y,children:[g.jsx(ph.Provider,{scope:e,children:g.jsx(HN,{scope:t.__scopeSelect,onNativeOptionAdd:D.useCallback(V=>{G(X=>new Set(X).add(V))},[]),onNativeOptionRemove:D.useCallback(V=>{G(X=>{const Z=new Set(X);return Z.delete(V),Z})},[]),children:n})}),U?g.jsxs(Iw,{"aria-hidden":!0,required:S,tabIndex:-1,name:p,autoComplete:h,value:j,onChange:V=>O(V.target.value),disabled:y,form:C,children:[j===void 0?g.jsx("option",{value:""}):null,Array.from($)]},K):null]})})};fw.displayName=ma;var hw="SelectTrigger",pw=D.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:i=!1,...o}=t,l=gh(n),d=Ao(hw,n),a=d.disabled||i,u=_t(e,d.onTriggerChange),f=mh(n),p=D.useRef("touch"),[h,y,S]=zw(w=>{const _=f().filter(x=>!x.disabled),v=_.find(x=>x.value===d.value),b=Pw(_,w,v);b!==void 0&&d.onValueChange(b.value)}),C=w=>{a||(d.onOpenChange(!0),S()),w&&(d.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return g.jsx(zu,{asChild:!0,...l,children:g.jsx(qe.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Bw(d.value)?"":void 0,...o,ref:u,onClick:je(o.onClick,w=>{w.currentTarget.focus(),p.current!=="mouse"&&C(w)}),onPointerDown:je(o.onPointerDown,w=>{p.current=w.pointerType;const _=w.target;_.hasPointerCapture(w.pointerId)&&_.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(C(w),w.preventDefault())}),onKeyDown:je(o.onKeyDown,w=>{const _=h.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&y(w.key),!(_&&w.key===" ")&&BN.includes(w.key)&&(C(),w.preventDefault())})})})});pw.displayName=hw;var mw="SelectValue",gw=D.forwardRef((t,e)=>{const{__scopeSelect:n,className:i,style:o,children:l,placeholder:d="",...a}=t,u=Ao(mw,n),{onValueNodeHasChildrenChange:f}=u,p=l!==void 0,h=_t(e,u.onValueNodeChange);return wn(()=>{f(p)},[f,p]),g.jsx(qe.span,{...a,ref:h,style:{pointerEvents:"none"},children:Bw(u.value)?g.jsx(g.Fragment,{children:d}):l})});gw.displayName=mw;var $N="SelectIcon",vw=D.forwardRef((t,e)=>{const{__scopeSelect:n,children:i,...o}=t;return g.jsx(qe.span,{"aria-hidden":!0,...o,ref:e,children:i||"▼"})});vw.displayName=$N;var qN="SelectPortal",_w=t=>g.jsx(Kl,{asChild:!0,...t});_w.displayName=qN;var ga="SelectContent",yw=D.forwardRef((t,e)=>{const n=Ao(ga,t.__scopeSelect),[i,o]=D.useState();if(wn(()=>{o(new DocumentFragment)},[]),!n.open){const l=i;return l?Mu.createPortal(g.jsx(bw,{scope:t.__scopeSelect,children:g.jsx(ph.Slot,{scope:t.__scopeSelect,children:g.jsx("div",{children:t.children})})}),l):null}return g.jsx(xw,{...t,ref:e})});yw.displayName=ga;var ri=10,[bw,To]=Zl(ga),VN="SelectContentImpl",GN=_o("SelectContent.RemoveScroll"),xw=D.forwardRef((t,e)=>{const{__scopeSelect:n,position:i="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:l,onPointerDownOutside:d,side:a,sideOffset:u,align:f,alignOffset:p,arrowPadding:h,collisionBoundary:y,collisionPadding:S,sticky:C,hideWhenDetached:w,avoidCollisions:_,...v}=t,b=Ao(ga,n),[x,E]=D.useState(null),[N,A]=D.useState(null),M=_t(e,W=>E(W)),[T,j]=D.useState(null),[O,F]=D.useState(null),U=mh(n),[$,G]=D.useState(!1),K=D.useRef(!1);D.useEffect(()=>{if(x)return Zf(x)},[x]),Yf();const V=D.useCallback(W=>{const[q,...J]=U().map(ae=>ae.ref.current),[ie]=J.slice(-1),ce=document.activeElement;for(const ae of W)if(ae===ce||(ae==null||ae.scrollIntoView({block:"nearest"}),ae===q&&N&&(N.scrollTop=0),ae===ie&&N&&(N.scrollTop=N.scrollHeight),ae==null||ae.focus(),document.activeElement!==ce))return},[U,N]),X=D.useCallback(()=>V([T,x]),[V,T,x]);D.useEffect(()=>{$&&X()},[$,X]);const{onOpenChange:Z,triggerPointerDownPosRef:I}=b;D.useEffect(()=>{if(x){let W={x:0,y:0};const q=ie=>{var ce,ae,_e,Ee;W={x:Math.abs(Math.round(ie.pageX)-((ae=(ce=I.current)==null?void 0:ce.x)!=null?ae:0)),y:Math.abs(Math.round(ie.pageY)-((Ee=(_e=I.current)==null?void 0:_e.y)!=null?Ee:0))}},J=ie=>{W.x<=10&&W.y<=10?ie.preventDefault():x.contains(ie.target)||Z(!1),document.removeEventListener("pointermove",q),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",q),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",q),document.removeEventListener("pointerup",J,{capture:!0})}}},[x,Z,I]),D.useEffect(()=>{const W=()=>Z(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[Z]);const[L,B]=zw(W=>{const q=U().filter(ce=>!ce.disabled),J=q.find(ce=>ce.ref.current===document.activeElement),ie=Pw(q,W,J);ie&&setTimeout(()=>ie.ref.current.focus())}),H=D.useCallback((W,q,J)=>{const ie=!K.current&&!J;(b.value!==void 0&&b.value===q||ie)&&(j(W),ie&&(K.current=!0))},[b.value]),P=D.useCallback(()=>x==null?void 0:x.focus(),[x]),ee=D.useCallback((W,q,J)=>{const ie=!K.current&&!J;(b.value!==void 0&&b.value===q||ie)&&F(W)},[b.value]),ne=i==="popper"?Tg:Sw,Q=ne===Tg?{side:a,sideOffset:u,align:f,alignOffset:p,arrowPadding:h,collisionBoundary:y,collisionPadding:S,sticky:C,hideWhenDetached:w,avoidCollisions:_}:{};return g.jsx(bw,{scope:n,content:x,viewport:N,onViewportChange:A,itemRefCallback:H,selectedItem:T,onItemLeave:P,itemTextRefCallback:ee,focusSelectedItem:X,selectedItemText:O,position:i,isPositioned:$,searchRef:L,children:g.jsx(Iu,{as:GN,allowPinchZoom:!0,children:g.jsx(Lu,{asChild:!0,trapped:b.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:je(o,W=>{var q;(q=b.trigger)==null||q.focus({preventScroll:!0}),W.preventDefault()}),children:g.jsx(Wl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:g.jsx(ne,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:W=>W.preventDefault(),...v,...Q,onPlaced:()=>G(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:je(v.onKeyDown,W=>{const q=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!q&&W.key.length===1&&B(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let ie=U().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);if(["ArrowUp","End"].includes(W.key)&&(ie=ie.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const ce=W.target,ae=ie.indexOf(ce);ie=ie.slice(ae+1)}setTimeout(()=>V(ie)),W.preventDefault()}})})})})})})});xw.displayName=VN;var WN="SelectItemAlignedPosition",Sw=D.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:i,...o}=t,l=Ao(ga,n),d=To(ga,n),[a,u]=D.useState(null),[f,p]=D.useState(null),h=_t(e,M=>p(M)),y=mh(n),S=D.useRef(!1),C=D.useRef(!0),{viewport:w,selectedItem:_,selectedItemText:v,focusSelectedItem:b}=d,x=D.useCallback(()=>{if(l.trigger&&l.valueNode&&a&&f&&w&&_&&v){const M=l.trigger.getBoundingClientRect(),T=f.getBoundingClientRect(),j=l.valueNode.getBoundingClientRect(),O=v.getBoundingClientRect();if(l.dir!=="rtl"){const ce=O.left-T.left,ae=j.left-ce,_e=M.left-ae,Ee=M.width+_e,Te=Math.max(Ee,T.width),Be=window.innerWidth-ri,se=Ag(ae,[ri,Math.max(ri,Be-Te)]);a.style.minWidth=Ee+"px",a.style.left=se+"px"}else{const ce=T.right-O.right,ae=window.innerWidth-j.right-ce,_e=window.innerWidth-M.right-ae,Ee=M.width+_e,Te=Math.max(Ee,T.width),Be=window.innerWidth-ri,se=Ag(ae,[ri,Math.max(ri,Be-Te)]);a.style.minWidth=Ee+"px",a.style.right=se+"px"}const F=y(),U=window.innerHeight-ri*2,$=w.scrollHeight,G=window.getComputedStyle(f),K=parseInt(G.borderTopWidth,10),V=parseInt(G.paddingTop,10),X=parseInt(G.borderBottomWidth,10),Z=parseInt(G.paddingBottom,10),I=K+V+$+Z+X,L=Math.min(_.offsetHeight*5,I),B=window.getComputedStyle(w),H=parseInt(B.paddingTop,10),P=parseInt(B.paddingBottom,10),ee=M.top+M.height/2-ri,ne=U-ee,Q=_.offsetHeight/2,W=_.offsetTop+Q,q=K+V+W,J=I-q;if(q<=ee){const ce=F.length>0&&_===F[F.length-1].ref.current;a.style.bottom="0px";const ae=f.clientHeight-w.offsetTop-w.offsetHeight,_e=Math.max(ne,Q+(ce?P:0)+ae+X),Ee=q+_e;a.style.height=Ee+"px"}else{const ce=F.length>0&&_===F[0].ref.current;a.style.top="0px";const _e=Math.max(ee,K+w.offsetTop+(ce?H:0)+Q)+J;a.style.height=_e+"px",w.scrollTop=q-ee+w.offsetTop}a.style.margin=`${ri}px 0`,a.style.minHeight=L+"px",a.style.maxHeight=U+"px",i==null||i(),requestAnimationFrame(()=>S.current=!0)}},[y,l.trigger,l.valueNode,a,f,w,_,v,l.dir,i]);wn(()=>x(),[x]);const[E,N]=D.useState();wn(()=>{f&&N(window.getComputedStyle(f).zIndex)},[f]);const A=D.useCallback(M=>{M&&C.current===!0&&(x(),b==null||b(),C.current=!1)},[x,b]);return g.jsx(YN,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:S,onScrollButtonChange:A,children:g.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:g.jsx(qe.div,{...o,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Sw.displayName=WN;var KN="SelectPopperPosition",Tg=D.forwardRef((t,e)=>{const{__scopeSelect:n,align:i="start",collisionPadding:o=ri,...l}=t,d=gh(n);return g.jsx(sh,{...d,...l,ref:e,align:i,collisionPadding:o,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Tg.displayName=KN;var[YN,Mv]=Zl(ga,{}),Rg="SelectViewport",ww=D.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:i,...o}=t,l=To(Rg,n),d=Mv(Rg,n),a=_t(e,l.onViewportChange),u=D.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),g.jsx(ph.Slot,{scope:n,children:g.jsx(qe.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:je(o.onScroll,f=>{const p=f.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:y}=d;if(y!=null&&y.current&&h){const S=Math.abs(u.current-p.scrollTop);if(S>0){const C=window.innerHeight-ri*2,w=parseFloat(h.style.minHeight),_=parseFloat(h.style.height),v=Math.max(w,_);if(v<C){const b=v+S,x=Math.min(C,b),E=b-x;h.style.height=x+"px",h.style.bottom==="0px"&&(p.scrollTop=E>0?E:0,h.style.justifyContent="flex-end")}}}u.current=p.scrollTop})})})]})});ww.displayName=Rg;var Cw="SelectGroup",[XN,ZN]=Zl(Cw),kw=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,o=gn();return g.jsx(XN,{scope:n,id:o,children:g.jsx(qe.div,{role:"group","aria-labelledby":o,...i,ref:e})})});kw.displayName=Cw;var Ew="SelectLabel",Aw=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,o=ZN(Ew,n);return g.jsx(qe.div,{id:o.id,...i,ref:e})});Aw.displayName=Ew;var Of="SelectItem",[QN,Tw]=Zl(Of),Rw=D.forwardRef((t,e)=>{const{__scopeSelect:n,value:i,disabled:o=!1,textValue:l,...d}=t,a=Ao(Of,n),u=To(Of,n),f=a.value===i,[p,h]=D.useState(l!=null?l:""),[y,S]=D.useState(!1),C=_t(e,b=>{var x;return(x=u.itemRefCallback)==null?void 0:x.call(u,b,i,o)}),w=gn(),_=D.useRef("touch"),v=()=>{o||(a.onValueChange(i),a.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(QN,{scope:n,value:i,disabled:o,textId:w,isSelected:f,onItemTextChange:D.useCallback(b=>{h(x=>{var E;return x||((E=b==null?void 0:b.textContent)!=null?E:"").trim()})},[]),children:g.jsx(ph.ItemSlot,{scope:n,value:i,disabled:o,textValue:p,children:g.jsx(qe.div,{role:"option","aria-labelledby":w,"data-highlighted":y?"":void 0,"aria-selected":f&&y,"data-state":f?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...d,ref:C,onFocus:je(d.onFocus,()=>S(!0)),onBlur:je(d.onBlur,()=>S(!1)),onClick:je(d.onClick,()=>{_.current!=="mouse"&&v()}),onPointerUp:je(d.onPointerUp,()=>{_.current==="mouse"&&v()}),onPointerDown:je(d.onPointerDown,b=>{_.current=b.pointerType}),onPointerMove:je(d.onPointerMove,b=>{var x;_.current=b.pointerType,o?(x=u.onItemLeave)==null||x.call(u):_.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:je(d.onPointerLeave,b=>{var x;b.currentTarget===document.activeElement&&((x=u.onItemLeave)==null||x.call(u))}),onKeyDown:je(d.onKeyDown,b=>{var E;((E=u.searchRef)==null?void 0:E.current)!==""&&b.key===" "||(zN.includes(b.key)&&v(),b.key===" "&&b.preventDefault())})})})})});Rw.displayName=Of;var pu="SelectItemText",Nw=D.forwardRef((t,e)=>{const{__scopeSelect:n,className:i,style:o,...l}=t,d=Ao(pu,n),a=To(pu,n),u=Tw(pu,n),f=UN(pu,n),[p,h]=D.useState(null),y=_t(e,v=>h(v),u.onItemTextChange,v=>{var b;return(b=a.itemTextRefCallback)==null?void 0:b.call(a,v,u.value,u.disabled)}),S=p==null?void 0:p.textContent,C=D.useMemo(()=>g.jsx("option",{value:u.value,disabled:u.disabled,children:S},u.value),[u.disabled,u.value,S]),{onNativeOptionAdd:w,onNativeOptionRemove:_}=f;return wn(()=>(w(C),()=>_(C)),[w,_,C]),g.jsxs(g.Fragment,{children:[g.jsx(qe.span,{id:u.textId,...l,ref:y}),u.isSelected&&d.valueNode&&!d.valueNodeHasChildren?Mu.createPortal(l.children,d.valueNode):null]})});Nw.displayName=pu;var Dw="SelectItemIndicator",Mw=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t;return Tw(Dw,n).isSelected?g.jsx(qe.span,{"aria-hidden":!0,...i,ref:e}):null});Mw.displayName=Dw;var Ng="SelectScrollUpButton",jw=D.forwardRef((t,e)=>{const n=To(Ng,t.__scopeSelect),i=Mv(Ng,t.__scopeSelect),[o,l]=D.useState(!1),d=_t(e,i.onScrollButtonChange);return wn(()=>{if(n.viewport&&n.isPositioned){let a=function(){const f=u.scrollTop>0;l(f)};const u=n.viewport;return a(),u.addEventListener("scroll",a),()=>u.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?g.jsx(Lw,{...t,ref:d,onAutoScroll:()=>{const{viewport:a,selectedItem:u}=n;a&&u&&(a.scrollTop=a.scrollTop-u.offsetHeight)}}):null});jw.displayName=Ng;var Dg="SelectScrollDownButton",Ow=D.forwardRef((t,e)=>{const n=To(Dg,t.__scopeSelect),i=Mv(Dg,t.__scopeSelect),[o,l]=D.useState(!1),d=_t(e,i.onScrollButtonChange);return wn(()=>{if(n.viewport&&n.isPositioned){let a=function(){const f=u.scrollHeight-u.clientHeight,p=Math.ceil(u.scrollTop)<f;l(p)};const u=n.viewport;return a(),u.addEventListener("scroll",a),()=>u.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?g.jsx(Lw,{...t,ref:d,onAutoScroll:()=>{const{viewport:a,selectedItem:u}=n;a&&u&&(a.scrollTop=a.scrollTop+u.offsetHeight)}}):null});Ow.displayName=Dg;var Lw=D.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:i,...o}=t,l=To("SelectScrollButton",n),d=D.useRef(null),a=mh(n),u=D.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return D.useEffect(()=>()=>u(),[u]),wn(()=>{var p;const f=a().find(h=>h.ref.current===document.activeElement);(p=f==null?void 0:f.ref.current)==null||p.scrollIntoView({block:"nearest"})},[a]),g.jsx(qe.div,{"aria-hidden":!0,...o,ref:e,style:{flexShrink:0,...o.style},onPointerDown:je(o.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(i,50))}),onPointerMove:je(o.onPointerMove,()=>{var f;(f=l.onItemLeave)==null||f.call(l),d.current===null&&(d.current=window.setInterval(i,50))}),onPointerLeave:je(o.onPointerLeave,()=>{u()})})}),JN="SelectSeparator",eD=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t;return g.jsx(qe.div,{"aria-hidden":!0,...i,ref:e})});eD.displayName=JN;var Mg="SelectArrow",tD=D.forwardRef((t,e)=>{const{__scopeSelect:n,...i}=t,o=gh(n),l=Ao(Mg,n),d=To(Mg,n);return l.open&&d.position==="popper"?g.jsx(oh,{...o,...i,ref:e}):null});tD.displayName=Mg;var nD="SelectBubbleInput",Iw=D.forwardRef(({__scopeSelect:t,value:e,...n},i)=>{const o=D.useRef(null),l=_t(i,o),d=dT(e);return D.useEffect(()=>{const a=o.current;if(!a)return;const u=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(u,"value").set;if(d!==e&&p){const h=new Event("change",{bubbles:!0});p.call(a,e),a.dispatchEvent(h)}},[d,e]),g.jsx(qe.select,{...n,style:{...Zx,...n.style},ref:l,defaultValue:e})});Iw.displayName=nD;function Bw(t){return t===""||t===void 0}function zw(t){const e=Mn(t),n=D.useRef(""),i=D.useRef(0),o=D.useCallback(d=>{const a=n.current+d;e(a),(function u(f){n.current=f,window.clearTimeout(i.current),f!==""&&(i.current=window.setTimeout(()=>u(""),1e3))})(a)},[e]),l=D.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return D.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,o,l]}function Pw(t,e,n){const o=e.length>1&&Array.from(e).every(f=>f===e[0])?e[0]:e,l=n?t.indexOf(n):-1;let d=rD(t,Math.max(l,0));o.length===1&&(d=d.filter(f=>f!==n));const u=d.find(f=>f.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}function rD(t,e){return t.map((n,i)=>t[(e+i)%t.length])}var iD=fw,sD=pw,oD=gw,aD=vw,lD=_w,cD=yw,uD=ww,dD=kw,fD=Aw,hD=Rw,pD=Nw,mD=Mw,gD=jw,vD=Ow,_D="Separator",fb="horizontal",yD=["horizontal","vertical"],Fw=D.forwardRef((t,e)=>{const{decorative:n,orientation:i=fb,...o}=t,l=bD(i)?i:fb,a=n?{role:"none"}:{"aria-orientation":l==="vertical"?l:void 0,role:"separator"};return g.jsx(qe.div,{"data-orientation":l,...a,...o,ref:e})});Fw.displayName=_D;function bD(t){return yD.includes(t)}var xD=Fw,vh="Tabs",[SD]=yr(vh,[ah]),Hw=ah(),[wD,jv]=SD(vh),Uw=D.forwardRef((t,e)=>{const{__scopeTabs:n,value:i,onValueChange:o,defaultValue:l,orientation:d="horizontal",dir:a,activationMode:u="automatic",...f}=t,p=Ou(a),[h,y]=ws({prop:i,onChange:o,defaultProp:l!=null?l:"",caller:vh});return g.jsx(wD,{scope:n,baseId:gn(),value:h,onValueChange:y,orientation:d,dir:p,activationMode:u,children:g.jsx(qe.div,{dir:p,"data-orientation":d,...f,ref:e})})});Uw.displayName=vh;var $w="TabsList",qw=D.forwardRef((t,e)=>{const{__scopeTabs:n,loop:i=!0,...o}=t,l=jv($w,n),d=Hw(n);return g.jsx(i2,{asChild:!0,...d,orientation:l.orientation,dir:l.dir,loop:i,children:g.jsx(qe.div,{role:"tablist","aria-orientation":l.orientation,...o,ref:e})})});qw.displayName=$w;var Vw="TabsTrigger",Gw=D.forwardRef((t,e)=>{const{__scopeTabs:n,value:i,disabled:o=!1,...l}=t,d=jv(Vw,n),a=Hw(n),u=Yw(d.baseId,i),f=Xw(d.baseId,i),p=i===d.value;return g.jsx(s2,{asChild:!0,...a,focusable:!o,active:p,children:g.jsx(qe.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":f,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:u,...l,ref:e,onMouseDown:je(t.onMouseDown,h=>{!o&&h.button===0&&h.ctrlKey===!1?d.onValueChange(i):h.preventDefault()}),onKeyDown:je(t.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&d.onValueChange(i)}),onFocus:je(t.onFocus,()=>{const h=d.activationMode!=="manual";!p&&!o&&h&&d.onValueChange(i)})})})});Gw.displayName=Vw;var Ww="TabsContent",Kw=D.forwardRef((t,e)=>{const{__scopeTabs:n,value:i,forceMount:o,children:l,...d}=t,a=jv(Ww,n),u=Yw(a.baseId,i),f=Xw(a.baseId,i),p=i===a.value,h=D.useRef(p);return D.useEffect(()=>{const y=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(y)},[]),g.jsx(Cn,{present:o||p,children:({present:y})=>g.jsx(qe.div,{"data-state":p?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":u,hidden:!y,id:f,tabIndex:0,...d,ref:e,style:{...t.style,animationDuration:h.current?"0s":void 0},children:y&&l})})});Kw.displayName=Ww;function Yw(t,e){return`${t}-trigger-${e}`}function Xw(t,e){return`${t}-content-${e}`}var CD=Uw,kD=qw,ED=Gw,AD=Kw,[_h]=yr("Tooltip",[ko]),yh=ko(),Zw="TooltipProvider",TD=700,jg="tooltip.open",[RD,Ov]=_h(Zw),Qw=t=>{const{__scopeTooltip:e,delayDuration:n=TD,skipDelayDuration:i=300,disableHoverableContent:o=!1,children:l}=t,d=D.useRef(!0),a=D.useRef(!1),u=D.useRef(0);return D.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),g.jsx(RD,{scope:e,isOpenDelayedRef:d,delayDuration:n,onOpen:D.useCallback(()=>{window.clearTimeout(u.current),d.current=!1},[]),onClose:D.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>d.current=!0,i)},[i]),isPointerInTransitRef:a,onPointerInTransitChange:D.useCallback(f=>{a.current=f},[]),disableHoverableContent:o,children:l})};Qw.displayName=Zw;var Cu="Tooltip",[ND,$u]=_h(Cu),Jw=t=>{const{__scopeTooltip:e,children:n,open:i,defaultOpen:o,onOpenChange:l,disableHoverableContent:d,delayDuration:a}=t,u=Ov(Cu,t.__scopeTooltip),f=yh(e),[p,h]=D.useState(null),y=gn(),S=D.useRef(0),C=d!=null?d:u.disableHoverableContent,w=a!=null?a:u.delayDuration,_=D.useRef(!1),[v,b]=ws({prop:i,defaultProp:o!=null?o:!1,onChange:M=>{M?(u.onOpen(),document.dispatchEvent(new CustomEvent(jg))):u.onClose(),l==null||l(M)},caller:Cu}),x=D.useMemo(()=>v?_.current?"delayed-open":"instant-open":"closed",[v]),E=D.useCallback(()=>{window.clearTimeout(S.current),S.current=0,_.current=!1,b(!0)},[b]),N=D.useCallback(()=>{window.clearTimeout(S.current),S.current=0,b(!1)},[b]),A=D.useCallback(()=>{window.clearTimeout(S.current),S.current=window.setTimeout(()=>{_.current=!0,b(!0),S.current=0},w)},[w,b]);return D.useEffect(()=>()=>{S.current&&(window.clearTimeout(S.current),S.current=0)},[]),g.jsx(ih,{...f,children:g.jsx(ND,{scope:e,contentId:y,open:v,stateAttribute:x,trigger:p,onTriggerChange:h,onTriggerEnter:D.useCallback(()=>{u.isOpenDelayedRef.current?A():E()},[u.isOpenDelayedRef,A,E]),onTriggerLeave:D.useCallback(()=>{C?N():(window.clearTimeout(S.current),S.current=0)},[N,C]),onOpen:E,onClose:N,disableHoverableContent:C,children:n})})};Jw.displayName=Cu;var Og="TooltipTrigger",eC=D.forwardRef((t,e)=>{const{__scopeTooltip:n,...i}=t,o=$u(Og,n),l=Ov(Og,n),d=yh(n),a=D.useRef(null),u=_t(e,a,o.onTriggerChange),f=D.useRef(!1),p=D.useRef(!1),h=D.useCallback(()=>f.current=!1,[]);return D.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),g.jsx(zu,{asChild:!0,...d,children:g.jsx(qe.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...i,ref:u,onPointerMove:je(t.onPointerMove,y=>{y.pointerType!=="touch"&&!p.current&&!l.isPointerInTransitRef.current&&(o.onTriggerEnter(),p.current=!0)}),onPointerLeave:je(t.onPointerLeave,()=>{o.onTriggerLeave(),p.current=!1}),onPointerDown:je(t.onPointerDown,()=>{o.open&&o.onClose(),f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:je(t.onFocus,()=>{f.current||o.onOpen()}),onBlur:je(t.onBlur,o.onClose),onClick:je(t.onClick,o.onClose)})})});eC.displayName=Og;var Lv="TooltipPortal",[DD,MD]=_h(Lv,{forceMount:void 0}),tC=t=>{const{__scopeTooltip:e,forceMount:n,children:i,container:o}=t,l=$u(Lv,e);return g.jsx(DD,{scope:e,forceMount:n,children:g.jsx(Cn,{present:n||l.open,children:g.jsx(Kl,{asChild:!0,container:o,children:i})})})};tC.displayName=Lv;var Bl="TooltipContent",nC=D.forwardRef((t,e)=>{const n=MD(Bl,t.__scopeTooltip),{forceMount:i=n.forceMount,side:o="top",...l}=t,d=$u(Bl,t.__scopeTooltip);return g.jsx(Cn,{present:i||d.open,children:d.disableHoverableContent?g.jsx(rC,{side:o,...l,ref:e}):g.jsx(jD,{side:o,...l,ref:e})})}),jD=D.forwardRef((t,e)=>{const n=$u(Bl,t.__scopeTooltip),i=Ov(Bl,t.__scopeTooltip),o=D.useRef(null),l=_t(e,o),[d,a]=D.useState(null),{trigger:u,onClose:f}=n,p=o.current,{onPointerInTransitChange:h}=i,y=D.useCallback(()=>{a(null),h(!1)},[h]),S=D.useCallback((C,w)=>{const _=C.currentTarget,v={x:C.clientX,y:C.clientY},b=BD(v,_.getBoundingClientRect()),x=zD(v,b),E=PD(w.getBoundingClientRect()),N=HD([...x,...E]);a(N),h(!0)},[h]);return D.useEffect(()=>()=>y(),[y]),D.useEffect(()=>{if(u&&p){const C=_=>S(_,p),w=_=>S(_,u);return u.addEventListener("pointerleave",C),p.addEventListener("pointerleave",w),()=>{u.removeEventListener("pointerleave",C),p.removeEventListener("pointerleave",w)}}},[u,p,S,y]),D.useEffect(()=>{if(d){const C=w=>{const _=w.target,v={x:w.clientX,y:w.clientY},b=(u==null?void 0:u.contains(_))||(p==null?void 0:p.contains(_)),x=!FD(v,d);b?y():x&&(y(),f())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[u,p,d,f,y]),g.jsx(rC,{...t,ref:l})}),[OD,LD]=_h(Cu,{isInside:!1}),ID=M5("TooltipContent"),rC=D.forwardRef((t,e)=>{const{__scopeTooltip:n,children:i,"aria-label":o,onEscapeKeyDown:l,onPointerDownOutside:d,...a}=t,u=$u(Bl,n),f=yh(n),{onClose:p}=u;return D.useEffect(()=>(document.addEventListener(jg,p),()=>document.removeEventListener(jg,p)),[p]),D.useEffect(()=>{if(u.trigger){const h=y=>{const S=y.target;S!=null&&S.contains(u.trigger)&&p()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[u.trigger,p]),g.jsx(Wl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:d,onFocusOutside:h=>h.preventDefault(),onDismiss:p,children:g.jsxs(sh,{"data-state":u.stateAttribute,...f,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(ID,{children:i}),g.jsx(OD,{scope:n,isInside:!0,children:g.jsx(z5,{id:u.contentId,role:"tooltip",children:o||i})})]})})});nC.displayName=Bl;var iC="TooltipArrow",sC=D.forwardRef((t,e)=>{const{__scopeTooltip:n,...i}=t,o=yh(n);return LD(iC,n).isInside?null:g.jsx(oh,{...o,...i,ref:e})});sC.displayName=iC;function BD(t,e){const n=Math.abs(e.top-t.y),i=Math.abs(e.bottom-t.y),o=Math.abs(e.right-t.x),l=Math.abs(e.left-t.x);switch(Math.min(n,i,o,l)){case l:return"left";case o:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function zD(t,e,n=5){const i=[];switch(e){case"top":i.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":i.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":i.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":i.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return i}function PD(t){const{top:e,right:n,bottom:i,left:o}=t;return[{x:o,y:e},{x:n,y:e},{x:n,y:i},{x:o,y:i}]}function FD(t,e){const{x:n,y:i}=t;let o=!1;for(let l=0,d=e.length-1;l<e.length;d=l++){const a=e[l],u=e[d],f=a.x,p=a.y,h=u.x,y=u.y;p>i!=y>i&&n<(h-f)*(i-p)/(y-p)+f&&(o=!o)}return o}function HD(t){const e=t.slice();return e.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),UD(e)}function UD(t){if(t.length<=1)return t.slice();const e=[];for(let i=0;i<t.length;i++){const o=t[i];for(;e.length>=2;){const l=e[e.length-1],d=e[e.length-2];if((l.x-d.x)*(o.y-d.y)>=(l.y-d.y)*(o.x-d.x))e.pop();else break}e.push(o)}e.pop();const n=[];for(let i=t.length-1;i>=0;i--){const o=t[i];for(;n.length>=2;){const l=n[n.length-1],d=n[n.length-2];if((l.x-d.x)*(o.y-d.y)>=(l.y-d.y)*(o.x-d.x))n.pop();else break}n.push(o)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var $D=Qw,qD=Jw,VD=eC,GD=tC,WD=nC,KD=sC;const YD=(t,e)=>{const n=new Array(t.length+e.length);for(let i=0;i<t.length;i++)n[i]=t[i];for(let i=0;i<e.length;i++)n[t.length+i]=e[i];return n},XD=(t,e)=>({classGroupId:t,validator:e}),oC=(t=new Map,e=null,n)=>({nextPart:t,validators:e,classGroupId:n}),Lf="-",hb=[],ZD="arbitrary..",QD=t=>{const e=eM(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return JD(d);const a=d.split(Lf),u=a[0]===""&&a.length>1?1:0;return aC(a,u,e)},getConflictingClassGroupIds:(d,a)=>{if(a){const u=i[d],f=n[d];return u?f?YD(f,u):u:f||hb}return n[d]||hb}}},aC=(t,e,n)=>{if(t.length-e===0)return n.classGroupId;const o=t[e],l=n.nextPart.get(o);if(l){const f=aC(t,e+1,l);if(f)return f}const d=n.validators;if(d===null)return;const a=e===0?t.join(Lf):t.slice(e).join(Lf),u=d.length;for(let f=0;f<u;f++){const p=d[f];if(p.validator(a))return p.classGroupId}},JD=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),n=e.indexOf(":"),i=e.slice(0,n);return i?ZD+i:void 0})(),eM=t=>{const{theme:e,classGroups:n}=t;return tM(n,e)},tM=(t,e)=>{const n=oC();for(const i in t){const o=t[i];Iv(o,n,i,e)}return n},Iv=(t,e,n,i)=>{const o=t.length;for(let l=0;l<o;l++){const d=t[l];nM(d,e,n,i)}},nM=(t,e,n,i)=>{if(typeof t=="string"){rM(t,e,n);return}if(typeof t=="function"){iM(t,e,n,i);return}sM(t,e,n,i)},rM=(t,e,n)=>{const i=t===""?e:lC(e,t);i.classGroupId=n},iM=(t,e,n,i)=>{if(oM(t)){Iv(t(i),e,n,i);return}e.validators===null&&(e.validators=[]),e.validators.push(XD(n,t))},sM=(t,e,n,i)=>{const o=Object.entries(t),l=o.length;for(let d=0;d<l;d++){const[a,u]=o[d];Iv(u,lC(e,a),n,i)}},lC=(t,e)=>{let n=t;const i=e.split(Lf),o=i.length;for(let l=0;l<o;l++){const d=i[l];let a=n.nextPart.get(d);a||(a=oC(),n.nextPart.set(d,a)),n=a}return n},oM=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,aM=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=Object.create(null),i=Object.create(null);const o=(l,d)=>{n[l]=d,e++,e>t&&(e=0,i=n,n=Object.create(null))};return{get(l){let d=n[l];if(d!==void 0)return d;if((d=i[l])!==void 0)return o(l,d),d},set(l,d){l in n?n[l]=d:o(l,d)}}},Lg="!",pb=":",lM=[],mb=(t,e,n,i,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:n,maybePostfixModifierPosition:i,isExternal:o}),cM=t=>{const{prefix:e,experimentalParseClassName:n}=t;let i=o=>{const l=[];let d=0,a=0,u=0,f;const p=o.length;for(let w=0;w<p;w++){const _=o[w];if(d===0&&a===0){if(_===pb){l.push(o.slice(u,w)),u=w+1;continue}if(_==="/"){f=w;continue}}_==="["?d++:_==="]"?d--:_==="("?a++:_===")"&&a--}const h=l.length===0?o:o.slice(u);let y=h,S=!1;h.endsWith(Lg)?(y=h.slice(0,-1),S=!0):h.startsWith(Lg)&&(y=h.slice(1),S=!0);const C=f&&f>u?f-u:void 0;return mb(l,S,y,C)};if(e){const o=e+pb,l=i;i=d=>d.startsWith(o)?l(d.slice(o.length)):mb(lM,!1,d,void 0,!0)}if(n){const o=i;i=l=>n({className:l,parseClassName:o})}return i},uM=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((n,i)=>{e.set(n,1e6+i)}),n=>{const i=[];let o=[];for(let l=0;l<n.length;l++){const d=n[l],a=d[0]==="[",u=e.has(d);a||u?(o.length>0&&(o.sort(),i.push(...o),o=[]),i.push(d)):o.push(d)}return o.length>0&&(o.sort(),i.push(...o)),i}},dM=t=>({cache:aM(t.cacheSize),parseClassName:cM(t),sortModifiers:uM(t),...QD(t)}),fM=/\s+/,hM=(t,e)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:l}=e,d=[],a=t.trim().split(fM);let u="";for(let f=a.length-1;f>=0;f-=1){const p=a[f],{isExternal:h,modifiers:y,hasImportantModifier:S,baseClassName:C,maybePostfixModifierPosition:w}=n(p);if(h){u=p+(u.length>0?" "+u:u);continue}let _=!!w,v=i(_?C.substring(0,w):C);if(!v){if(!_){u=p+(u.length>0?" "+u:u);continue}if(v=i(C),!v){u=p+(u.length>0?" "+u:u);continue}_=!1}const b=y.length===0?"":y.length===1?y[0]:l(y).join(":"),x=S?b+Lg:b,E=x+v;if(d.indexOf(E)>-1)continue;d.push(E);const N=o(v,_);for(let A=0;A<N.length;++A){const M=N[A];d.push(x+M)}u=p+(u.length>0?" "+u:u)}return u},pM=(...t)=>{let e=0,n,i,o="";for(;e<t.length;)(n=t[e++])&&(i=cC(n))&&(o&&(o+=" "),o+=i);return o},cC=t=>{if(typeof t=="string")return t;let e,n="";for(let i=0;i<t.length;i++)t[i]&&(e=cC(t[i]))&&(n&&(n+=" "),n+=e);return n},mM=(t,...e)=>{let n,i,o,l;const d=u=>{const f=e.reduce((p,h)=>h(p),t());return n=dM(f),i=n.cache.get,o=n.cache.set,l=a,a(u)},a=u=>{const f=i(u);if(f)return f;const p=hM(u,n);return o(u,p),p};return l=d,(...u)=>l(pM(...u))},gM=[],mn=t=>{const e=n=>n[t]||gM;return e.isThemeGetter=!0,e},uC=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,dC=/^\((?:(\w[\w-]*):)?(.+)\)$/i,vM=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,_M=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,yM=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,bM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,xM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,SM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fo=t=>vM.test(t),vt=t=>!!t&&!Number.isNaN(Number(t)),ho=t=>!!t&&Number.isInteger(Number(t)),$m=t=>t.endsWith("%")&&vt(t.slice(0,-1)),vs=t=>_M.test(t),fC=()=>!0,wM=t=>yM.test(t)&&!bM.test(t),Bv=()=>!1,CM=t=>xM.test(t),kM=t=>SM.test(t),EM=t=>!He(t)&&!Ue(t),AM=t=>Ro(t,mC,Bv),He=t=>uC.test(t),la=t=>Ro(t,gC,wM),gb=t=>Ro(t,LM,vt),TM=t=>Ro(t,_C,fC),RM=t=>Ro(t,vC,Bv),vb=t=>Ro(t,hC,Bv),NM=t=>Ro(t,pC,kM),cf=t=>Ro(t,yC,CM),Ue=t=>dC.test(t),iu=t=>xa(t,gC),DM=t=>xa(t,vC),_b=t=>xa(t,hC),MM=t=>xa(t,mC),jM=t=>xa(t,pC),uf=t=>xa(t,yC,!0),OM=t=>xa(t,_C,!0),Ro=(t,e,n)=>{const i=uC.exec(t);return i?i[1]?e(i[1]):n(i[2]):!1},xa=(t,e,n=!1)=>{const i=dC.exec(t);return i?i[1]?e(i[1]):n:!1},hC=t=>t==="position"||t==="percentage",pC=t=>t==="image"||t==="url",mC=t=>t==="length"||t==="size"||t==="bg-size",gC=t=>t==="length",LM=t=>t==="number",vC=t=>t==="family-name",_C=t=>t==="number"||t==="weight",yC=t=>t==="shadow",IM=()=>{const t=mn("color"),e=mn("font"),n=mn("text"),i=mn("font-weight"),o=mn("tracking"),l=mn("leading"),d=mn("breakpoint"),a=mn("container"),u=mn("spacing"),f=mn("radius"),p=mn("shadow"),h=mn("inset-shadow"),y=mn("text-shadow"),S=mn("drop-shadow"),C=mn("blur"),w=mn("perspective"),_=mn("aspect"),v=mn("ease"),b=mn("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...E(),Ue,He],A=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],T=()=>[Ue,He,u],j=()=>[fo,"full","auto",...T()],O=()=>[ho,"none","subgrid",Ue,He],F=()=>["auto",{span:["full",ho,Ue,He]},ho,Ue,He],U=()=>[ho,"auto",Ue,He],$=()=>["auto","min","max","fr",Ue,He],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...T()],X=()=>[fo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],Z=()=>[fo,"screen","full","dvw","lvw","svw","min","max","fit",...T()],I=()=>[fo,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],L=()=>[t,Ue,He],B=()=>[...E(),_b,vb,{position:[Ue,He]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",MM,AM,{size:[Ue,He]}],ee=()=>[$m,iu,la],ne=()=>["","none","full",f,Ue,He],Q=()=>["",vt,iu,la],W=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>[vt,$m,_b,vb],ie=()=>["","none",C,Ue,He],ce=()=>["none",vt,Ue,He],ae=()=>["none",vt,Ue,He],_e=()=>[vt,Ue,He],Ee=()=>[fo,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[vs],breakpoint:[vs],color:[fC],container:[vs],"drop-shadow":[vs],ease:["in","out","in-out"],font:[EM],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[vs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[vs],shadow:[vs],spacing:["px",vt],text:[vs],"text-shadow":[vs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fo,He,Ue,_]}],container:["container"],columns:[{columns:[vt,He,Ue,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:N()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{"inset-s":j(),start:j()}],end:[{"inset-e":j(),end:j()}],"inset-bs":[{"inset-bs":j()}],"inset-be":[{"inset-be":j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[ho,"auto",Ue,He]}],basis:[{basis:[fo,"full","auto",a,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[vt,fo,"auto","initial","none",He]}],grow:[{grow:["",vt,Ue,He]}],shrink:[{shrink:["",vt,Ue,He]}],order:[{order:[ho,"first","last","none",Ue,He]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pbs:[{pbs:T()}],pbe:[{pbe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mbs:[{mbs:V()}],mbe:[{mbe:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...Z()]}],"min-inline-size":[{"min-inline":["auto",...Z()]}],"max-inline-size":[{"max-inline":["none",...Z()]}],"block-size":[{block:["auto",...I()]}],"min-block-size":[{"min-block":["auto",...I()]}],"max-block-size":[{"max-block":["none",...I()]}],w:[{w:[a,"screen",...X()]}],"min-w":[{"min-w":[a,"screen","none",...X()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[d]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",n,iu,la]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,OM,TM]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",$m,He]}],"font-family":[{font:[DM,RM,e]}],"font-features":[{"font-features":[He]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Ue,He]}],"line-clamp":[{"line-clamp":[vt,"none",Ue,gb]}],leading:[{leading:[l,...T()]}],"list-image":[{"list-image":["none",Ue,He]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ue,He]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:[vt,"from-font","auto",Ue,la]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[vt,"auto",Ue,He]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ue,He]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ue,He]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ho,Ue,He],radial:["",Ue,He],conic:[ho,Ue,He]},jM,NM]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:ee()}],"gradient-via-pos":[{via:ee()}],"gradient-to-pos":[{to:ee()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:ne()}],"rounded-s":[{"rounded-s":ne()}],"rounded-e":[{"rounded-e":ne()}],"rounded-t":[{"rounded-t":ne()}],"rounded-r":[{"rounded-r":ne()}],"rounded-b":[{"rounded-b":ne()}],"rounded-l":[{"rounded-l":ne()}],"rounded-ss":[{"rounded-ss":ne()}],"rounded-se":[{"rounded-se":ne()}],"rounded-ee":[{"rounded-ee":ne()}],"rounded-es":[{"rounded-es":ne()}],"rounded-tl":[{"rounded-tl":ne()}],"rounded-tr":[{"rounded-tr":ne()}],"rounded-br":[{"rounded-br":ne()}],"rounded-bl":[{"rounded-bl":ne()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-bs":[{"border-bs":Q()}],"border-w-be":[{"border-be":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...W(),"hidden","none"]}],"divide-style":[{divide:[...W(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...W(),"none","hidden"]}],"outline-offset":[{"outline-offset":[vt,Ue,He]}],"outline-w":[{outline:["",vt,iu,la]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",p,uf,cf]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",h,uf,cf]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[vt,la]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",y,uf,cf]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[vt,Ue,He]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[vt]}],"mask-image-linear-from-pos":[{"mask-linear-from":J()}],"mask-image-linear-to-pos":[{"mask-linear-to":J()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":J()}],"mask-image-t-to-pos":[{"mask-t-to":J()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":J()}],"mask-image-r-to-pos":[{"mask-r-to":J()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":J()}],"mask-image-b-to-pos":[{"mask-b-to":J()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":J()}],"mask-image-l-to-pos":[{"mask-l-to":J()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":J()}],"mask-image-x-to-pos":[{"mask-x-to":J()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":J()}],"mask-image-y-to-pos":[{"mask-y-to":J()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[Ue,He]}],"mask-image-radial-from-pos":[{"mask-radial-from":J()}],"mask-image-radial-to-pos":[{"mask-radial-to":J()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[vt]}],"mask-image-conic-from-pos":[{"mask-conic-from":J()}],"mask-image-conic-to-pos":[{"mask-conic-to":J()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:B()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ue,He]}],filter:[{filter:["","none",Ue,He]}],blur:[{blur:ie()}],brightness:[{brightness:[vt,Ue,He]}],contrast:[{contrast:[vt,Ue,He]}],"drop-shadow":[{"drop-shadow":["","none",S,uf,cf]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",vt,Ue,He]}],"hue-rotate":[{"hue-rotate":[vt,Ue,He]}],invert:[{invert:["",vt,Ue,He]}],saturate:[{saturate:[vt,Ue,He]}],sepia:[{sepia:["",vt,Ue,He]}],"backdrop-filter":[{"backdrop-filter":["","none",Ue,He]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[vt,Ue,He]}],"backdrop-contrast":[{"backdrop-contrast":[vt,Ue,He]}],"backdrop-grayscale":[{"backdrop-grayscale":["",vt,Ue,He]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[vt,Ue,He]}],"backdrop-invert":[{"backdrop-invert":["",vt,Ue,He]}],"backdrop-opacity":[{"backdrop-opacity":[vt,Ue,He]}],"backdrop-saturate":[{"backdrop-saturate":[vt,Ue,He]}],"backdrop-sepia":[{"backdrop-sepia":["",vt,Ue,He]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ue,He]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[vt,"initial",Ue,He]}],ease:[{ease:["linear","initial",v,Ue,He]}],delay:[{delay:[vt,Ue,He]}],animate:[{animate:["none",b,Ue,He]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,Ue,He]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:ae()}],"scale-x":[{"scale-x":ae()}],"scale-y":[{"scale-y":ae()}],"scale-z":[{"scale-z":ae()}],"scale-3d":["scale-3d"],skew:[{skew:_e()}],"skew-x":[{"skew-x":_e()}],"skew-y":[{"skew-y":_e()}],transform:[{transform:[Ue,He,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ee()}],"translate-x":[{"translate-x":Ee()}],"translate-y":[{"translate-y":Ee()}],"translate-z":[{"translate-z":Ee()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ue,He]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mbs":[{"scroll-mbs":T()}],"scroll-mbe":[{"scroll-mbe":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pbs":[{"scroll-pbs":T()}],"scroll-pbe":[{"scroll-pbe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ue,He]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[vt,iu,la,gb]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},BM=mM(IM);function ke(...t){return BM(Wf(t))}const zM=Gl("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Pe(t){const e=me.c(16);let n,i,o,l,d;e[0]!==t?({className:n,variant:o,size:l,asChild:d,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=d):(n=e[1],i=e[2],o=e[3],l=e[4],d=e[5]);const a=o===void 0?"default":o,u=l===void 0?"default":l,p=(d===void 0?!1:d)?ju:"button";let h;e[6]!==n||e[7]!==u||e[8]!==a?(h=ke(zM({variant:a,size:u,className:n})),e[6]=n,e[7]=u,e[8]=a,e[9]=h):h=e[9];let y;return e[10]!==p||e[11]!==i||e[12]!==u||e[13]!==h||e[14]!==a?(y=g.jsx(p,{"data-slot":"button","data-variant":a,"data-size":u,className:h,...i}),e[10]=p,e[11]=i,e[12]=u,e[13]=h,e[14]=a,e[15]=y):y=e[15],y}function qu(){const t=me.c(1),e=PM;let n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(n={fetchWithAuth:e},t[0]=n):n=t[0],n}async function PM(t,e,n){const i=e===void 0?{}:e,{serverUrl:o,token:l}=n||{};let d=t;t.startsWith("/")&&o&&(d=`http://${o}${t}`);const a=new Headers(i.headers||{});return l&&a.set("Authorization",`Bearer ${l}`),fetch(d,{...i,headers:a})}function Ql(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(av,{"data-slot":"dialog",...n}),e[2]=n,e[3]=i):i=e[3],i}function FM(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(lv,{"data-slot":"dialog-portal",...n}),e[2]=n,e[3]=i):i=e[3],i}function HM(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(Jf,{"data-slot":"dialog-close",...n}),e[2]=n,e[3]=i):i=e[3],i}function UM(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(cv,{"data-slot":"dialog-overlay",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Jl(t){const e=me.c(15);let n,i,o,l;e[0]!==t?({className:i,children:n,showCloseButton:l,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=l===void 0?!0:l;let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx(UM,{}),e[5]=a):a=e[5];let u;e[6]!==i?(u=ke("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",i),e[6]=i,e[7]=u):u=e[7];let f;e[8]!==d?(f=d&&g.jsx(Jf,{"data-slot":"dialog-close",asChild:!0,children:g.jsxs(Pe,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm",children:[g.jsx(bs,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})}),e[8]=d,e[9]=f):f=e[9];let p;return e[10]!==n||e[11]!==o||e[12]!==u||e[13]!==f?(p=g.jsxs(FM,{children:[a,g.jsxs(uv,{"data-slot":"dialog-content",className:u,...o,children:[n,f]})]}),e[10]=n,e[11]=o,e[12]=u,e[13]=f,e[14]=p):p=e[14],p}function ec(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("flex flex-col gap-2",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"dialog-header",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function bh(t){const e=me.c(14);let n,i,o,l;e[0]!==t?({className:i,showCloseButton:l,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=l===void 0?!1:l;let a;e[5]!==i?(a=ke("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",i),e[5]=i,e[6]=a):a=e[6];let u;e[7]!==d?(u=d&&g.jsx(Jf,{asChild:!0,children:g.jsx(Pe,{variant:"outline",children:"Close"})}),e[7]=d,e[8]=u):u=e[8];let f;return e[9]!==n||e[10]!==o||e[11]!==a||e[12]!==u?(f=g.jsxs("div",{"data-slot":"dialog-footer",className:a,...o,children:[n,u]}),e[9]=n,e[10]=o,e[11]=a,e[12]=u,e[13]=f):f=e[13],f}function tc(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("text-base leading-none font-medium",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(NS,{"data-slot":"dialog-title",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Vu(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(DS,{"data-slot":"dialog-description",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function yf(t){const e=me.c(10);let n,i,o;e[0]!==t?({className:n,type:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);let l;e[4]!==n?(l=ke("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",n),e[4]=n,e[5]=l):l=e[5];let d;return e[6]!==i||e[7]!==l||e[8]!==o?(d=g.jsx("input",{type:o,"data-slot":"input",className:l,...i}),e[6]=i,e[7]=l,e[8]=o,e[9]=d):d=e[9],d}const nc=D.forwardRef((t,e)=>{const n=me.c(16);let i,o,l;n[0]!==t?({className:o,children:i,...l}=t,n[0]=t,n[1]=i,n[2]=o,n[3]=l):(i=n[1],o=n[2],l=n[3]);let d;n[4]!==o?(d=ke("relative overflow-hidden",o),n[4]=o,n[5]=d):d=n[5];let a;n[6]===Symbol.for("react.memo_cache_sentinel")?(a={WebkitOverflowScrolling:"touch"},n[6]=a):a=n[6];let u;n[7]!==i||n[8]!==e?(u=g.jsx(LN,{ref:e,"data-slot":"scroll-area-viewport",className:"size-full min-w-0 rounded-[inherit] outline-none",style:a,children:i}),n[7]=i,n[8]=e,n[9]=u):u=n[9];let f,p;n[10]===Symbol.for("react.memo_cache_sentinel")?(f=g.jsx($M,{}),p=g.jsx(IN,{}),n[10]=f,n[11]=p):(f=n[10],p=n[11]);let h;return n[12]!==l||n[13]!==d||n[14]!==u?(h=g.jsxs(ON,{"data-slot":"scroll-area",className:d,...l,children:[u,f,p]}),n[12]=l,n[13]=d,n[14]=u,n[15]=h):h=n[15],h});nc.displayName="ScrollArea";function $M(t){const e=me.c(11);let n,i,o;e[0]!==t?({className:n,orientation:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);const l=o===void 0?"vertical":o;let d;e[4]!==n?(d=ke("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",n),e[4]=n,e[5]=d):d=e[5];let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx(aw,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[6]=a):a=e[6];let u;return e[7]!==l||e[8]!==i||e[9]!==d?(u=g.jsx(rw,{"data-slot":"scroll-area-scrollbar","data-orientation":l,orientation:l,className:d,...i,children:a}),e[7]=l,e[8]=i,e[9]=d,e[10]=u):u=e[10],u}function qM(t){const n=t.replace(/\\/g,"/").split("/");return n.pop(),n.join("/")||"/"}function VM({open:t,onOpenChange:e,onSelect:n,initialPath:i,title:o="Select Folder"}){const[l,d]=D.useState(i||""),[a,u]=D.useState([]),[f,p]=D.useState(!1),[h,y]=D.useState(0),[S,C]=D.useState(null),[w,_]=D.useState(""),v=D.useRef(null),b=D.useRef(null),{fetchWithAuth:x}=qu(),{activeServer:E}=Vl(),N=D.useCallback(async U=>{p(!0),C(null),y(0),_("");try{const $=await x(`/api/fs/browse?path=${encodeURIComponent(U)}`,{},{serverUrl:E==null?void 0:E.url,token:E==null?void 0:E.token}),G=await $.json();if(!$.ok)throw new Error(G.message||"Failed to browse directory");const K=G.files.filter(V=>V.type==="directory");u(K),d(G.currentPath)}catch($){C($ instanceof Error?$.message:"Failed to load directory"),u([])}finally{p(!1)}},[x,E]);D.useEffect(()=>{t&&N(i||"")},[t,i,N]),D.useEffect(()=>{y(0)},[w]);const A=a.filter(U=>U.name.toLowerCase().includes(w.toLowerCase())),M=()=>{const U=qM(l);U!==l&&N(U)},T=()=>{l&&(n(l),e(!1))},j=U=>{const $=l?`${l}/${U.name}`:U.name;N($)},O=U=>{if(A.length!==0)switch(U.key){case"ArrowDown":U.preventDefault(),y($=>Math.min($+1,A.length-1));break;case"ArrowUp":U.preventDefault(),y($=>Math.max($-1,0));break;case"Enter":U.preventDefault(),A[h]&&j(A[h]);break;case"Escape":w&&(U.preventDefault(),_(""));break}};D.useEffect(()=>{if(b.current&&A.length>0){const U=b.current.children[h];U&&U.scrollIntoView({block:"nearest"})}},[h,A.length]),D.useEffect(()=>{t&&setTimeout(()=>{var U;return(U=v.current)==null?void 0:U.focus()},100)},[t]);const F=(U,$=50)=>{if(U.length<=$)return U;const G=U.split("/");return G.length<=2?U:".../"+G.slice(-2).join("/")};return g.jsx(Ql,{open:t,onOpenChange:e,children:g.jsxs(Jl,{className:"sm:max-w-lg",onKeyDown:O,children:[g.jsx(ec,{children:g.jsx(tc,{children:o})}),g.jsxs("div",{className:"space-y-3",children:[g.jsxs("div",{className:"flex items-center gap-2 p-2 bg-muted rounded-md",children:[g.jsx(Pe,{variant:"ghost",size:"icon",className:"h-7 w-7 flex-shrink-0",onClick:M,disabled:f||!l,children:g.jsx(PE,{className:"w-4 h-4"})}),g.jsx("span",{className:"flex-1 text-sm font-mono truncate",title:l,children:F(l)||"Home"})]}),g.jsxs("div",{className:"relative",children:[g.jsx(Qg,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),g.jsx(yf,{ref:v,placeholder:"Filter folders...",value:w,onChange:U=>_(U.target.value),className:"pl-8"})]}),g.jsx(nc,{className:"h-64 border rounded-md",children:f?g.jsxs("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:[g.jsx(gr,{className:"w-4 h-4 animate-spin mr-2"}),"Loading..."]}):S?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground",children:[g.jsx("span",{className:"text-destructive",children:S}),g.jsx(Pe,{variant:"ghost",size:"sm",onClick:()=>N(l),className:"mt-2",children:"Retry"})]}):A.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-muted-foreground text-sm",children:[g.jsx(vo,{className:"w-8 h-8 mb-2 opacity-50"}),w?"No matching folders":"No folders in this directory"]}):g.jsx("div",{className:"p-1",ref:b,children:A.map((U,$)=>g.jsxs("button",{onClick:()=>{y($)},onDoubleClick:()=>j(U),className:ke("flex items-center gap-2 w-full px-2 py-1.5 rounded text-sm text-left","hover:bg-muted",$===h&&"bg-primary/20 text-primary font-medium ring-1 ring-primary/50"),children:[g.jsx(vo,{className:"w-4 h-4 text-amber-500 flex-shrink-0"}),g.jsx("span",{className:"truncate flex-1",children:U.name}),$===h&&g.jsx(xs,{className:"w-4 h-4 text-primary"})]},U.path))})}),S&&g.jsx("p",{className:"text-xs text-destructive",children:S})]}),g.jsxs(bh,{children:[g.jsx(Pe,{variant:"outline",onClick:()=>e(!1),children:"Cancel"}),g.jsx(Pe,{onClick:T,disabled:!l||f,children:"Use This Folder"})]})]})})}var yb=1,GM=.9,WM=.8,KM=.17,qm=.1,Vm=.999,YM=.9999,XM=.99,ZM=/[\\\/_+.#"@\[\(\{&]/,QM=/[\\\/_+.#"@\[\(\{&]/g,JM=/[\s-]/,bC=/[\s-]/g;function Ig(t,e,n,i,o,l,d){if(l===e.length)return o===t.length?yb:XM;var a=`${o},${l}`;if(d[a]!==void 0)return d[a];for(var u=i.charAt(l),f=n.indexOf(u,o),p=0,h,y,S,C;f>=0;)h=Ig(t,e,n,i,f+1,l+1,d),h>p&&(f===o?h*=yb:ZM.test(t.charAt(f-1))?(h*=WM,S=t.slice(o,f-1).match(QM),S&&o>0&&(h*=Math.pow(Vm,S.length))):JM.test(t.charAt(f-1))?(h*=GM,C=t.slice(o,f-1).match(bC),C&&o>0&&(h*=Math.pow(Vm,C.length))):(h*=KM,o>0&&(h*=Math.pow(Vm,f-o))),t.charAt(f)!==e.charAt(l)&&(h*=YM)),(h<qm&&n.charAt(f-1)===i.charAt(l+1)||i.charAt(l+1)===i.charAt(l)&&n.charAt(f-1)!==i.charAt(l))&&(y=Ig(t,e,n,i,f+1,l+2,d),y*qm>h&&(h=y*qm)),h>p&&(p=h),f=n.indexOf(u,f+1);return d[a]=p,p}function bb(t){return t.toLowerCase().replace(bC," ")}function ej(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,Ig(t,e,bb(t),bb(e),0,0,{})}var su='[cmdk-group=""]',Gm='[cmdk-group-items=""]',tj='[cmdk-group-heading=""]',xC='[cmdk-item=""]',xb=`${xC}:not([aria-disabled="true"])`,Bg="cmdk-item-select",Cl="data-value",nj=(t,e,n)=>ej(t,e,n),SC=D.createContext(void 0),Gu=()=>D.useContext(SC),wC=D.createContext(void 0),zv=()=>D.useContext(wC),CC=D.createContext(void 0),kC=D.forwardRef((t,e)=>{let n=kl(()=>{var H,P;return{search:"",value:(P=(H=t.value)!=null?H:t.defaultValue)!=null?P:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=kl(()=>new Set),o=kl(()=>new Map),l=kl(()=>new Map),d=kl(()=>new Set),a=EC(t),{label:u,children:f,value:p,onValueChange:h,filter:y,shouldFilter:S,loop:C,disablePointerSelection:w=!1,vimBindings:_=!0,...v}=t,b=gn(),x=gn(),E=gn(),N=D.useRef(null),A=hj();va(()=>{if(p!==void 0){let H=p.trim();n.current.value=H,M.emit()}},[p]),va(()=>{A(6,$)},[]);let M=D.useMemo(()=>({subscribe:H=>(d.current.add(H),()=>d.current.delete(H)),snapshot:()=>n.current,setState:(H,P,ee)=>{var ne,Q,W,q;if(!Object.is(n.current[H],P)){if(n.current[H]=P,H==="search")U(),O(),A(1,F);else if(H==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let J=document.getElementById(E);J?J.focus():(ne=document.getElementById(b))==null||ne.focus()}if(A(7,()=>{var J;n.current.selectedItemId=(J=G())==null?void 0:J.id,M.emit()}),ee||A(5,$),((Q=a.current)==null?void 0:Q.value)!==void 0){let J=P!=null?P:"";(q=(W=a.current).onValueChange)==null||q.call(W,J);return}}M.emit()}},emit:()=>{d.current.forEach(H=>H())}}),[]),T=D.useMemo(()=>({value:(H,P,ee)=>{var ne;P!==((ne=l.current.get(H))==null?void 0:ne.value)&&(l.current.set(H,{value:P,keywords:ee}),n.current.filtered.items.set(H,j(P,ee)),A(2,()=>{O(),M.emit()}))},item:(H,P)=>(i.current.add(H),P&&(o.current.has(P)?o.current.get(P).add(H):o.current.set(P,new Set([H]))),A(3,()=>{U(),O(),n.current.value||F(),M.emit()}),()=>{l.current.delete(H),i.current.delete(H),n.current.filtered.items.delete(H);let ee=G();A(4,()=>{U(),(ee==null?void 0:ee.getAttribute("id"))===H&&F(),M.emit()})}),group:H=>(o.current.has(H)||o.current.set(H,new Set),()=>{l.current.delete(H),o.current.delete(H)}),filter:()=>a.current.shouldFilter,label:u||t["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:b,inputId:E,labelId:x,listInnerRef:N}),[]);function j(H,P){var ee,ne;let Q=(ne=(ee=a.current)==null?void 0:ee.filter)!=null?ne:nj;return H?Q(H,n.current.search,P):0}function O(){if(!n.current.search||a.current.shouldFilter===!1)return;let H=n.current.filtered.items,P=[];n.current.filtered.groups.forEach(ne=>{let Q=o.current.get(ne),W=0;Q.forEach(q=>{let J=H.get(q);W=Math.max(J,W)}),P.push([ne,W])});let ee=N.current;K().sort((ne,Q)=>{var W,q;let J=ne.getAttribute("id"),ie=Q.getAttribute("id");return((W=H.get(ie))!=null?W:0)-((q=H.get(J))!=null?q:0)}).forEach(ne=>{let Q=ne.closest(Gm);Q?Q.appendChild(ne.parentElement===Q?ne:ne.closest(`${Gm} > *`)):ee.appendChild(ne.parentElement===ee?ne:ne.closest(`${Gm} > *`))}),P.sort((ne,Q)=>Q[1]-ne[1]).forEach(ne=>{var Q;let W=(Q=N.current)==null?void 0:Q.querySelector(`${su}[${Cl}="${encodeURIComponent(ne[0])}"]`);W==null||W.parentElement.appendChild(W)})}function F(){let H=K().find(ee=>ee.getAttribute("aria-disabled")!=="true"),P=H==null?void 0:H.getAttribute(Cl);M.setState("value",P||void 0)}function U(){var H,P,ee,ne;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=i.current.size;return}n.current.filtered.groups=new Set;let Q=0;for(let W of i.current){let q=(P=(H=l.current.get(W))==null?void 0:H.value)!=null?P:"",J=(ne=(ee=l.current.get(W))==null?void 0:ee.keywords)!=null?ne:[],ie=j(q,J);n.current.filtered.items.set(W,ie),ie>0&&Q++}for(let[W,q]of o.current)for(let J of q)if(n.current.filtered.items.get(J)>0){n.current.filtered.groups.add(W);break}n.current.filtered.count=Q}function $(){var H,P,ee;let ne=G();ne&&(((H=ne.parentElement)==null?void 0:H.firstChild)===ne&&((ee=(P=ne.closest(su))==null?void 0:P.querySelector(tj))==null||ee.scrollIntoView({block:"nearest"})),ne.scrollIntoView({block:"nearest"}))}function G(){var H;return(H=N.current)==null?void 0:H.querySelector(`${xC}[aria-selected="true"]`)}function K(){var H;return Array.from(((H=N.current)==null?void 0:H.querySelectorAll(xb))||[])}function V(H){let P=K()[H];P&&M.setState("value",P.getAttribute(Cl))}function X(H){var P;let ee=G(),ne=K(),Q=ne.findIndex(q=>q===ee),W=ne[Q+H];(P=a.current)!=null&&P.loop&&(W=Q+H<0?ne[ne.length-1]:Q+H===ne.length?ne[0]:ne[Q+H]),W&&M.setState("value",W.getAttribute(Cl))}function Z(H){let P=G(),ee=P==null?void 0:P.closest(su),ne;for(;ee&&!ne;)ee=H>0?dj(ee,su):fj(ee,su),ne=ee==null?void 0:ee.querySelector(xb);ne?M.setState("value",ne.getAttribute(Cl)):X(H)}let I=()=>V(K().length-1),L=H=>{H.preventDefault(),H.metaKey?I():H.altKey?Z(1):X(1)},B=H=>{H.preventDefault(),H.metaKey?V(0):H.altKey?Z(-1):X(-1)};return D.createElement(qe.div,{ref:e,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:H=>{var P;(P=v.onKeyDown)==null||P.call(v,H);let ee=H.nativeEvent.isComposing||H.keyCode===229;if(!(H.defaultPrevented||ee))switch(H.key){case"n":case"j":{_&&H.ctrlKey&&L(H);break}case"ArrowDown":{L(H);break}case"p":case"k":{_&&H.ctrlKey&&B(H);break}case"ArrowUp":{B(H);break}case"Home":{H.preventDefault(),V(0);break}case"End":{H.preventDefault(),I();break}case"Enter":{H.preventDefault();let ne=G();if(ne){let Q=new Event(Bg);ne.dispatchEvent(Q)}}}}},D.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:mj},u),xh(t,H=>D.createElement(wC.Provider,{value:M},D.createElement(SC.Provider,{value:T},H))))}),rj=D.forwardRef((t,e)=>{var n,i;let o=gn(),l=D.useRef(null),d=D.useContext(CC),a=Gu(),u=EC(t),f=(i=(n=u.current)==null?void 0:n.forceMount)!=null?i:d==null?void 0:d.forceMount;va(()=>{if(!f)return a.item(o,d==null?void 0:d.id)},[f]);let p=AC(o,l,[t.value,t.children,l],t.keywords),h=zv(),y=xo(A=>A.value&&A.value===p.current),S=xo(A=>f||a.filter()===!1?!0:A.search?A.filtered.items.get(o)>0:!0);D.useEffect(()=>{let A=l.current;if(!(!A||t.disabled))return A.addEventListener(Bg,C),()=>A.removeEventListener(Bg,C)},[S,t.onSelect,t.disabled]);function C(){var A,M;w(),(M=(A=u.current).onSelect)==null||M.call(A,p.current)}function w(){h.setState("value",p.current,!0)}if(!S)return null;let{disabled:_,value:v,onSelect:b,forceMount:x,keywords:E,...N}=t;return D.createElement(qe.div,{ref:Ss(l,e),...N,id:o,"cmdk-item":"",role:"option","aria-disabled":!!_,"aria-selected":!!y,"data-disabled":!!_,"data-selected":!!y,onPointerMove:_||a.getDisablePointerSelection()?void 0:w,onClick:_?void 0:C},t.children)}),ij=D.forwardRef((t,e)=>{let{heading:n,children:i,forceMount:o,...l}=t,d=gn(),a=D.useRef(null),u=D.useRef(null),f=gn(),p=Gu(),h=xo(S=>o||p.filter()===!1?!0:S.search?S.filtered.groups.has(d):!0);va(()=>p.group(d),[]),AC(d,a,[t.value,t.heading,u]);let y=D.useMemo(()=>({id:d,forceMount:o}),[o]);return D.createElement(qe.div,{ref:Ss(a,e),...l,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},n&&D.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),xh(t,S=>D.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},D.createElement(CC.Provider,{value:y},S))))}),sj=D.forwardRef((t,e)=>{let{alwaysRender:n,...i}=t,o=D.useRef(null),l=xo(d=>!d.search);return!n&&!l?null:D.createElement(qe.div,{ref:Ss(o,e),...i,"cmdk-separator":"",role:"separator"})}),oj=D.forwardRef((t,e)=>{let{onValueChange:n,...i}=t,o=t.value!=null,l=zv(),d=xo(f=>f.search),a=xo(f=>f.selectedItemId),u=Gu();return D.useEffect(()=>{t.value!=null&&l.setState("search",t.value)},[t.value]),D.createElement(qe.input,{ref:e,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":a,id:u.inputId,type:"text",value:o?t.value:d,onChange:f=>{o||l.setState("search",f.target.value),n==null||n(f.target.value)}})}),aj=D.forwardRef((t,e)=>{let{children:n,label:i="Suggestions",...o}=t,l=D.useRef(null),d=D.useRef(null),a=xo(f=>f.selectedItemId),u=Gu();return D.useEffect(()=>{if(d.current&&l.current){let f=d.current,p=l.current,h,y=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let S=f.offsetHeight;p.style.setProperty("--cmdk-list-height",S.toFixed(1)+"px")})});return y.observe(f),()=>{cancelAnimationFrame(h),y.unobserve(f)}}},[]),D.createElement(qe.div,{ref:Ss(l,e),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":i,id:u.listId},xh(t,f=>D.createElement("div",{ref:Ss(d,u.listInnerRef),"cmdk-list-sizer":""},f)))}),lj=D.forwardRef((t,e)=>{let{open:n,onOpenChange:i,overlayClassName:o,contentClassName:l,container:d,...a}=t;return D.createElement(av,{open:n,onOpenChange:i},D.createElement(lv,{container:d},D.createElement(cv,{"cmdk-overlay":"",className:o}),D.createElement(uv,{"aria-label":t.label,"cmdk-dialog":"",className:l},D.createElement(kC,{ref:e,...a}))))}),cj=D.forwardRef((t,e)=>xo(n=>n.filtered.count===0)?D.createElement(qe.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),uj=D.forwardRef((t,e)=>{let{progress:n,children:i,label:o="Loading...",...l}=t;return D.createElement(qe.div,{ref:e,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},xh(t,d=>D.createElement("div",{"aria-hidden":!0},d)))}),Sa=Object.assign(kC,{List:aj,Item:rj,Input:oj,Group:ij,Separator:sj,Dialog:lj,Empty:cj,Loading:uj});function dj(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function fj(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function EC(t){let e=D.useRef(t);return va(()=>{e.current=t}),e}var va=typeof window>"u"?D.useEffect:D.useLayoutEffect;function kl(t){let e=D.useRef();return e.current===void 0&&(e.current=t()),e}function xo(t){let e=zv(),n=()=>t(e.snapshot());return D.useSyncExternalStore(e.subscribe,n,n)}function AC(t,e,n,i=[]){let o=D.useRef(),l=Gu();return va(()=>{var d;let a=(()=>{var f;for(let p of n){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(f=p.current.textContent)==null?void 0:f.trim():o.current}})(),u=i.map(f=>f.trim());l.value(t,a,u),(d=e.current)==null||d.setAttribute(Cl,a),o.current=a}),o}var hj=()=>{let[t,e]=D.useState(),n=kl(()=>new Map);return va(()=>{n.current.forEach(i=>i()),n.current=new Map},[t]),(i,o)=>{n.current.set(i,o),e({})}};function pj(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function xh({asChild:t,children:e},n){return t&&D.isValidElement(e)?D.cloneElement(pj(e),{ref:e.ref},n(e.props.children)):n(e)}var mj={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function gj(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("textarea",{"data-slot":"textarea",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function vj(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"input-group",role:"group",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}const _j=Gl("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function yj(t){const e=me.c(11);let n,i,o;e[0]!==t?({className:n,align:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);const l=o===void 0?"inline-start":o;let d;e[4]!==l||e[5]!==n?(d=ke(_j({align:l}),n),e[4]=l,e[5]=n,e[6]=d):d=e[6];let a;return e[7]!==l||e[8]!==i||e[9]!==d?(a=g.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":l,className:d,onClick:bj,...i}),e[7]=l,e[8]=i,e[9]=d,e[10]=a):a=e[10],a}function bj(t){var e,n;t.target.closest("button")||(n=(e=t.currentTarget.parentElement)==null?void 0:e.querySelector("input"))==null||n.focus()}function Pv(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(Sa,{"data-slot":"command",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function TC(t){const e=me.c(11);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",n),e[3]=n,e[4]=o):o=e[4];let l;e[5]!==i||e[6]!==o?(l=g.jsx(Sa.Input,{"data-slot":"command-input",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(yj,{children:g.jsx(Qg,{className:"size-4 shrink-0 opacity-50"})}),e[8]=d):d=e[8];let a;return e[9]!==l?(a=g.jsx("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:g.jsxs(vj,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[l,d]})}),e[9]=l,e[10]=a):a=e[10],a}function Fv(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(Sa.List,{"data-slot":"command-list",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Hv(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("py-6 text-center text-sm",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(Sa.Empty,{"data-slot":"command-empty",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function ku(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(Sa.Group,{"data-slot":"command-group",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function RC(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("-mx-1 h-px bg-border",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(Sa.Separator,{"data-slot":"command-separator",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Dl(t){const e=me.c(11);let n,i,o;e[0]!==t?({className:i,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);let l;e[4]!==i?(l=ke("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",i),e[4]=i,e[5]=l):l=e[5];let d;e[6]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(xs,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"}),e[6]=d):d=e[6];let a;return e[7]!==n||e[8]!==o||e[9]!==l?(a=g.jsxs(Sa.Item,{"data-slot":"command-item",className:l,...o,children:[n,d]}),e[7]=n,e[8]=o,e[9]=l,e[10]=a):a=e[10],a}function Sh(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(uN,{"data-slot":"popover",...n}),e[2]=n,e[3]=i):i=e[3],i}function Uv(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(fN,{"data-slot":"popover-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function wh(t){const e=me.c(12);let n,i,o,l;e[0]!==t?({className:n,align:o,sideOffset:l,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=o===void 0?"center":o,a=l===void 0?4:l;let u;e[5]!==n?(u=ke("z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),e[5]=n,e[6]=u):u=e[6];let f;return e[7]!==d||e[8]!==i||e[9]!==a||e[10]!==u?(f=g.jsx(hN,{children:g.jsx(pN,{"data-slot":"popover-content",align:d,sideOffset:a,className:u,...i})}),e[7]=d,e[8]=i,e[9]=a,e[10]=u,e[11]=f):f=e[11],f}function xj(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(dN,{"data-slot":"popover-anchor",...n}),e[2]=n,e[3]=i):i=e[3],i}function Sj(t){const e=me.c(50),{workspaces:n,activeWorkspace:i,onSelectWorkspace:o,onCreateVirtualWorkspace:l,onCreatePhysicalWorkspace:d,isWorkspaceFavorited:a,onToggleFavorite:u}=t,[f,p]=D.useState(!1),[h,y]=D.useState(!1);let S;e[0]!==(i==null?void 0:i.isVirtual)?(S=i!=null&&i.isVirtual?g.jsx(vg,{className:"size-4 flex-shrink-0 text-muted-foreground"}):g.jsx(vo,{className:"size-4 flex-shrink-0 text-muted-foreground"}),e[0]=i==null?void 0:i.isVirtual,e[1]=S):S=e[1];const C=(i==null?void 0:i.name)||"Select workspace";let w;e[2]!==C?(w=g.jsx("span",{className:"truncate",children:C}),e[2]=C,e[3]=w):w=e[3];let _;e[4]!==S||e[5]!==w?(_=g.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[S,w]}),e[4]=S,e[5]=w,e[6]=_):_=e[6];let v;e[7]===Symbol.for("react.memo_cache_sentinel")?(v=g.jsx(Lx,{className:"ml-auto size-4 shrink-0 opacity-50"}),e[7]=v):v=e[7];let b;e[8]!==f||e[9]!==_?(b=g.jsx(Uv,{asChild:!0,children:g.jsxs(Pe,{variant:"outline",role:"combobox","aria-expanded":f,"aria-label":"Select workspace",className:"w-full justify-between h-9",children:[_,v]})}),e[8]=f,e[9]=_,e[10]=b):b=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=g.jsx(TC,{placeholder:"Search workspace..."}),e[11]=x):x=e[11];let E;e[12]===Symbol.for("react.memo_cache_sentinel")?(E=g.jsx(Hv,{children:"No workspace found."}),e[12]=E):E=e[12];let N;if(e[13]!==(i==null?void 0:i.id)||e[14]!==a||e[15]!==o||e[16]!==u||e[17]!==n){let Z;e[19]!==(i==null?void 0:i.id)||e[20]!==a||e[21]!==o||e[22]!==u?(Z=I=>g.jsxs(Dl,{onSelect:()=>{o(I),p(!1)},className:"justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[I.isVirtual?g.jsx(vg,{className:"size-4 text-muted-foreground"}):g.jsx(vo,{className:"size-4 text-muted-foreground"}),g.jsx("span",{children:I.name})]}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx("button",{className:"p-1 rounded hover:bg-secondary transition-colors",onClick:L=>{L.stopPropagation(),u(I.id,I.name)},title:a(I.id)?"Remove from favorites":"Add to favorites",children:a(I.id)?g.jsx(D0,{className:"size-4 fill-primary text-primary"}):g.jsx(D0,{className:"size-4 text-muted-foreground"})}),g.jsx(xs,{className:ke("size-4",(i==null?void 0:i.id)===I.id?"opacity-100":"opacity-0")})]})]},I.id),e[19]=i==null?void 0:i.id,e[20]=a,e[21]=o,e[22]=u,e[23]=Z):Z=e[23],N=n.map(Z),e[13]=i==null?void 0:i.id,e[14]=a,e[15]=o,e[16]=u,e[17]=n,e[18]=N}else N=e[18];let A;e[24]!==N?(A=g.jsx(ku,{heading:"Workspaces",children:N}),e[24]=N,e[25]=A):A=e[25];let M;e[26]===Symbol.for("react.memo_cache_sentinel")?(M=g.jsx(RC,{}),e[26]=M):M=e[26];let T;e[27]!==l?(T=()=>{l(),p(!1)},e[27]=l,e[28]=T):T=e[28];let j;e[29]===Symbol.for("react.memo_cache_sentinel")?(j=g.jsx(ql,{className:"size-4","data-icon":"inline-start"}),e[29]=j):j=e[29];let O;e[30]!==T?(O=g.jsxs(Dl,{onSelect:T,children:[j,"Create virtual workspace"]}),e[30]=T,e[31]=O):O=e[31];let F;e[32]===Symbol.for("react.memo_cache_sentinel")?(F=g.jsxs(Dl,{onSelect:()=>{p(!1),y(!0)},children:[g.jsx(vo,{className:"size-4","data-icon":"inline-start"}),"Add existing folder"]}),e[32]=F):F=e[32];let U;e[33]!==O?(U=g.jsxs(ku,{children:[O,F]}),e[33]=O,e[34]=U):U=e[34];let $;e[35]!==A||e[36]!==U?($=g.jsx(wh,{className:"w-[240px] p-0 max-h-[80vh]",children:g.jsxs(Pv,{children:[x,g.jsxs(Fv,{className:"max-h-[50vh] overflow-y-auto",children:[E,A,M,U]})]})}),e[35]=A,e[36]=U,e[37]=$):$=e[37];let G;e[38]!==f||e[39]!==$||e[40]!==b?(G=g.jsxs(Sh,{open:f,onOpenChange:p,children:[b,$]}),e[38]=f,e[39]=$,e[40]=b,e[41]=G):G=e[41];let K;e[42]!==d?(K=Z=>{d(Z),y(!1)},e[42]=d,e[43]=K):K=e[43];let V;e[44]!==h||e[45]!==K?(V=g.jsx(VM,{open:h,onOpenChange:y,onSelect:K,title:"Select Workspace Folder"}),e[44]=h,e[45]=K,e[46]=V):V=e[46];let X;return e[47]!==G||e[48]!==V?(X=g.jsxs(g.Fragment,{children:[G,V]}),e[47]=G,e[48]=V,e[49]=X):X=e[49],X}function wj(t){const e=me.c(33),{onOpenAddServer:n,onServerSwitch:i}=t,[o,l]=D.useState(!1),{servers:d,activeServer:a,switchServer:u}=Vl();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=g.jsx(fa,{className:"size-4 flex-shrink-0 text-muted-foreground"}),e[0]=f):f=e[0];const p=(a==null?void 0:a.name)||"Select server";let h;e[1]!==p?(h=g.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[f,g.jsx("span",{className:"truncate",children:p})]}),e[1]=p,e[2]=h):h=e[2];let y;e[3]===Symbol.for("react.memo_cache_sentinel")?(y=g.jsx(Lx,{className:"ml-auto size-4 shrink-0 opacity-50"}),e[3]=y):y=e[3];let S;e[4]!==o||e[5]!==h?(S=g.jsx(Uv,{asChild:!0,children:g.jsxs(Pe,{variant:"outline",role:"combobox","aria-expanded":o,"aria-label":"Select server",className:"w-full justify-between h-9",children:[h,y]})}),e[4]=o,e[5]=h,e[6]=S):S=e[6];let C;e[7]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx(TC,{placeholder:"Search server..."}),e[7]=C):C=e[7];let w;e[8]===Symbol.for("react.memo_cache_sentinel")?(w=g.jsx(Hv,{children:"No server found."}),e[8]=w):w=e[8];let _;if(e[9]!==(a==null?void 0:a.id)||e[10]!==i||e[11]!==d||e[12]!==u){let T;e[14]!==(a==null?void 0:a.id)||e[15]!==i||e[16]!==u?(T=j=>g.jsxs(Dl,{onSelect:()=>{u(j.id),i==null||i(),l(!1)},className:"justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(fa,{className:"size-4 text-muted-foreground"}),g.jsx("span",{children:j.name})]}),g.jsx(xs,{className:ke("size-4",(a==null?void 0:a.id)===j.id?"opacity-100":"opacity-0")})]},j.id),e[14]=a==null?void 0:a.id,e[15]=i,e[16]=u,e[17]=T):T=e[17],_=d.map(T),e[9]=a==null?void 0:a.id,e[10]=i,e[11]=d,e[12]=u,e[13]=_}else _=e[13];let v;e[18]!==_?(v=g.jsx(ku,{heading:"Servers",children:_}),e[18]=_,e[19]=v):v=e[19];let b;e[20]===Symbol.for("react.memo_cache_sentinel")?(b=g.jsx(RC,{}),e[20]=b):b=e[20];let x;e[21]!==n?(x=()=>{n(),l(!1)},e[21]=n,e[22]=x):x=e[22];let E;e[23]===Symbol.for("react.memo_cache_sentinel")?(E=g.jsx(ql,{className:"size-4","data-icon":"inline-start"}),e[23]=E):E=e[23];let N;e[24]!==x?(N=g.jsx(ku,{children:g.jsxs(Dl,{onSelect:x,children:[E,"Add Server..."]})}),e[24]=x,e[25]=N):N=e[25];let A;e[26]!==N||e[27]!==v?(A=g.jsx(wh,{className:"w-[240px] p-0 max-h-[80vh]",children:g.jsxs(Pv,{children:[C,g.jsxs(Fv,{className:"max-h-[50vh] overflow-y-auto",children:[w,v,b,N]})]})}),e[26]=N,e[27]=v,e[28]=A):A=e[28];let M;return e[29]!==o||e[30]!==A||e[31]!==S?(M=g.jsxs(Sh,{open:o,onOpenChange:l,children:[S,A]}),e[29]=o,e[30]=A,e[31]=S,e[32]=M):M=e[32],M}const Wm=640;function Wu(){const t=me.c(2),[e,n]=D.useState(void 0);let i,o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{const l=window.matchMedia(`(max-width: ${Wm-1}px)`),d=()=>{n(window.innerWidth<Wm)};return l.addEventListener("change",d),n(window.innerWidth<Wm),()=>l.removeEventListener("change",d)},o=[],t[0]=i,t[1]=o):(i=t[0],o=t[1]),D.useEffect(i,o),!!e}function ua(t){const e=me.c(12);let n,i,o,l;e[0]!==t?({className:n,orientation:o,decorative:l,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=o===void 0?"horizontal":o,a=l===void 0?!0:l;let u;e[5]!==n?(u=ke("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",n),e[5]=n,e[6]=u):u=e[6];let f;return e[7]!==a||e[8]!==d||e[9]!==i||e[10]!==u?(f=g.jsx(xD,{"data-slot":"separator",decorative:a,orientation:d,className:u,...i}),e[7]=a,e[8]=d,e[9]=i,e[10]=u,e[11]=f):f=e[11],f}function Ch(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(av,{"data-slot":"sheet",...n}),e[2]=n,e[3]=i):i=e[3],i}function Cj(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(uT,{"data-slot":"sheet-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function kj(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(lv,{"data-slot":"sheet-portal",...n}),e[2]=n,e[3]=i):i=e[3],i}function Ej(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(cv,{"data-slot":"sheet-overlay",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function kh(t){const e=me.c(24);let n,i,o,l,d,a;e[0]!==t?({className:i,children:n,side:d,showCloseButton:a,style:l,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=d,e[6]=a):(n=e[1],i=e[2],o=e[3],l=e[4],d=e[5],a=e[6]);const u=d===void 0?"right":d,f=a===void 0?!0:a;let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=g.jsx(Ej,{}),e[7]=p):p=e[7];let h;e[8]!==i?(h=ke("fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",i),e[8]=i,e[9]=h):h=e[9];let y;e[10]!==u?(y=u==="left"||u==="right"?{top:"env(safe-area-inset-top, 0px)",bottom:"env(safe-area-inset-bottom, 0px)",height:"calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))"}:u==="top"?{top:"env(safe-area-inset-top, 0px)"}:u==="bottom"?{bottom:"env(safe-area-inset-bottom, 0px)"}:void 0,e[10]=u,e[11]=y):y=e[11];const S=y;let C;e[12]!==S||e[13]!==l?(C=S?{...S,...l}:l,e[12]=S,e[13]=l,e[14]=C):C=e[14];const w=C;let _;e[15]!==f?(_=f&&g.jsx(Jf,{"data-slot":"sheet-close",asChild:!0,children:g.jsxs(Pe,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm",children:[g.jsx(bs,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})}),e[15]=f,e[16]=_):_=e[16];let v;return e[17]!==n||e[18]!==o||e[19]!==u||e[20]!==h||e[21]!==w||e[22]!==_?(v=g.jsxs(kj,{children:[p,g.jsxs(uv,{"data-slot":"sheet-content","data-side":u,className:h,style:w,...o,children:[n,_]})]}),e[17]=n,e[18]=o,e[19]=u,e[20]=h,e[21]=w,e[22]=_,e[23]=v):v=e[23],v}function Eh(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("flex flex-col gap-0.5 p-4",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"sheet-header",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Ah(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("text-base font-medium text-foreground",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(NS,{"data-slot":"sheet-title",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Aj(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("text-sm text-muted-foreground",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(DS,{"data-slot":"sheet-description",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Eu(t){const e=me.c(6);let n,i;e[0]!==t?({delayDuration:i,...n}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);const o=i===void 0?0:i;let l;return e[3]!==o||e[4]!==n?(l=g.jsx($D,{"data-slot":"tooltip-provider",delayDuration:o,...n}),e[3]=o,e[4]=n,e[5]=l):l=e[5],l}function zl(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(qD,{"data-slot":"tooltip",...n}),e[2]=n,e[3]=i):i=e[3],i}function Pl(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(VD,{"data-slot":"tooltip-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function Fl(t){const e=me.c(13);let n,i,o,l;e[0]!==t?({className:i,sideOffset:l,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=l===void 0?0:l;let a;e[5]!==i?(a=ke("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",i),e[5]=i,e[6]=a):a=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(KD,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"}),e[7]=u):u=e[7];let f;return e[8]!==n||e[9]!==o||e[10]!==d||e[11]!==a?(f=g.jsx(GD,{children:g.jsxs(WD,{"data-slot":"tooltip-content",sideOffset:d,className:a,...o,children:[n,u]})}),e[8]=n,e[9]=o,e[10]=d,e[11]=a,e[12]=f):f=e[12],f}const Tj="sidebar_state",Rj=3600*24*7,Nj="16rem",Dj="18rem",Mj="3rem",NC=D.createContext(null);function Ku(){const t=D.useContext(NC);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function jj(t){const e=me.c(33);let n,i,o,l,d,a,u;e[0]!==t?({defaultOpen:u,open:o,onOpenChange:d,className:i,style:a,children:n,...l}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=d,e[6]=a,e[7]=u):(n=e[1],i=e[2],o=e[3],l=e[4],d=e[5],a=e[6],u=e[7]);const f=u===void 0?!0:u,p=Wu(),[h,y]=D.useState(!1),[S,C]=D.useState(f),w=o!=null?o:S;let _;e[8]!==w||e[9]!==d?(_=U=>{const $=typeof U=="function"?U(w):U;d?d($):C($),document.cookie=`${Tj}=${$}; path=/; max-age=${Rj}`},e[8]=w,e[9]=d,e[10]=_):_=e[10];const v=_;let b;e[11]!==p||e[12]!==v?(b=()=>p?y(Lj):v(Oj),e[11]=p,e[12]=v,e[13]=b):b=e[13];const x=b,E=w?"expanded":"collapsed";let N;e[14]!==p||e[15]!==w||e[16]!==h||e[17]!==v||e[18]!==E||e[19]!==x?(N={state:E,open:w,setOpen:v,isMobile:p,openMobile:h,setOpenMobile:y,toggleSidebar:x},e[14]=p,e[15]=w,e[16]=h,e[17]=v,e[18]=E,e[19]=x,e[20]=N):N=e[20];const A=N;let M;e[21]!==a?(M={"--sidebar-width":Nj,"--sidebar-width-icon":Mj,...a},e[21]=a,e[22]=M):M=e[22];const T=M;let j;e[23]!==i?(j=ke("overflow-hidden group/sidebar-wrapper flex h-full w-full has-data-[variant=inset]:bg-sidebar",i),e[23]=i,e[24]=j):j=e[24];let O;e[25]!==n||e[26]!==l||e[27]!==T||e[28]!==j?(O=g.jsx("div",{"data-slot":"sidebar-wrapper",style:T,className:j,...l,children:n}),e[25]=n,e[26]=l,e[27]=T,e[28]=j,e[29]=O):O=e[29];let F;return e[30]!==A||e[31]!==O?(F=g.jsx(NC.Provider,{value:A,children:O}),e[30]=A,e[31]=O,e[32]=F):F=e[32],F}function Oj(t){return!t}function Lj(t){return!t}function Ij(t){const e=me.c(49);let n,i,o,l,d,a,u;e[0]!==t?({side:d,variant:a,collapsible:u,className:i,children:n,dir:o,...l}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=d,e[6]=a,e[7]=u):(n=e[1],i=e[2],o=e[3],l=e[4],d=e[5],a=e[6],u=e[7]);const f=d===void 0?"left":d,p=a===void 0?"sidebar":a,h=u===void 0?"offcanvas":u,{isMobile:y,state:S,openMobile:C,setOpenMobile:w}=Ku();if(h==="none"){let O;e[8]!==i?(O=ke("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",i),e[8]=i,e[9]=O):O=e[9];let F;return e[10]!==n||e[11]!==l||e[12]!==O?(F=g.jsx("div",{"data-slot":"sidebar",className:O,...l,children:n}),e[10]=n,e[11]=l,e[12]=O,e[13]=F):F=e[13],F}if(y){let O;e[14]===Symbol.for("react.memo_cache_sentinel")?(O={"--sidebar-width":Dj},e[14]=O):O=e[14];let F;e[15]===Symbol.for("react.memo_cache_sentinel")?(F=g.jsxs(Eh,{className:"sr-only",children:[g.jsx(Ah,{children:"Sidebar"}),g.jsx(Aj,{children:"Displays the mobile sidebar."})]}),e[15]=F):F=e[15];let U;e[16]!==n?(U=g.jsx("div",{className:"flex h-full w-full flex-col",children:n}),e[16]=n,e[17]=U):U=e[17];let $;e[18]!==o||e[19]!==f||e[20]!==U?($=g.jsxs(kh,{dir:o,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:O,side:f,children:[F,U]}),e[18]=o,e[19]=f,e[20]=U,e[21]=$):$=e[21];let G;return e[22]!==C||e[23]!==l||e[24]!==w||e[25]!==$?(G=g.jsx(Ch,{open:C,onOpenChange:w,...l,children:$}),e[22]=C,e[23]=l,e[24]=w,e[25]=$,e[26]=G):G=e[26],G}const _=S==="collapsed"?h:"",v=p==="floating"||p==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let b;e[27]!==v?(b=ke("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",v),e[27]=v,e[28]=b):b=e[28];let x;e[29]!==b?(x=g.jsx("div",{"data-slot":"sidebar-gap",className:b}),e[29]=b,e[30]=x):x=e[30];const E=p==="floating"||p==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l";let N;e[31]!==i||e[32]!==E?(N=ke("fixed z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",E,i),e[31]=i,e[32]=E,e[33]=N):N=e[33];let A;e[34]===Symbol.for("react.memo_cache_sentinel")?(A={top:"env(safe-area-inset-top, 0)",bottom:"env(safe-area-inset-bottom, 0)",height:"calc(100vh - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0))"},e[34]=A):A=e[34];let M;e[35]!==n?(M=g.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:n}),e[35]=n,e[36]=M):M=e[36];let T;e[37]!==l||e[38]!==f||e[39]!==M||e[40]!==N?(T=g.jsx("div",{"data-slot":"sidebar-container","data-side":f,className:N,style:A,...l,children:M}),e[37]=l,e[38]=f,e[39]=M,e[40]=N,e[41]=T):T=e[41];let j;return e[42]!==f||e[43]!==S||e[44]!==T||e[45]!==_||e[46]!==x||e[47]!==p?(j=g.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":S,"data-collapsible":_,"data-variant":p,"data-side":f,"data-slot":"sidebar",children:[x,T]}),e[42]=f,e[43]=S,e[44]=T,e[45]=_,e[46]=x,e[47]=p,e[48]=j):j=e[48],j}function Sb(t){const e=me.c(15);let n,i,o;e[0]!==t?({className:n,onClick:i,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);const{toggleSidebar:l}=Ku();let d;e[4]!==n?(d=ke(n),e[4]=n,e[5]=d):d=e[5];let a;e[6]!==i||e[7]!==l?(a=h=>{i==null||i(h),l()},e[6]=i,e[7]=l,e[8]=a):a=e[8];let u,f;e[9]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(z4,{}),f=g.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=u,e[10]=f):(u=e[9],f=e[10]);let p;return e[11]!==o||e[12]!==d||e[13]!==a?(p=g.jsxs(Pe,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:d,onClick:a,...o,children:[u,f]}),e[11]=o,e[12]=d,e[13]=a,e[14]=p):p=e[14],p}function Bj(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("flex flex-col gap-2 p-2",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function zj(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("flex flex-col gap-2 p-2",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Pj(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("mx-2 w-auto bg-sidebar-border",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(ua,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}const Fj=D.forwardRef((t,e)=>{const n=me.c(9);let i,o;n[0]!==t?({className:i,...o}=t,n[0]=t,n[1]=i,n[2]=o):(i=n[1],o=n[2]);let l;n[3]!==i?(l=ke("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",i),n[3]=i,n[4]=l):l=n[4];let d;return n[5]!==o||n[6]!==e||n[7]!==l?(d=g.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:l,ref:e,...o}),n[5]=o,n[6]=e,n[7]=l,n[8]=d):d=n[8],d});function If(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("relative flex w-full min-w-0 flex-col p-2",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Bf(t){const e=me.c(10);let n,i,o;e[0]!==t?({className:n,asChild:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);const d=(o===void 0?!1:o)?ju:"div";let a;e[4]!==n?(a=ke("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",n),e[4]=n,e[5]=a):a=e[5];let u;return e[6]!==d||e[7]!==i||e[8]!==a?(u=g.jsx(d,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:a,...i}),e[6]=d,e[7]=i,e[8]=a,e[9]=u):u=e[9],u}function zf(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("w-full text-sm",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Al(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("flex w-full min-w-0 flex-col gap-0",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function da(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("group/menu-item relative",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}const Hj=Gl("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ml(t){const e=me.c(28);let n,i,o,l,d,a,u;e[0]!==t?({asChild:o,isActive:l,variant:d,size:a,tooltip:u,className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=d,e[6]=a,e[7]=u):(n=e[1],i=e[2],o=e[3],l=e[4],d=e[5],a=e[6],u=e[7]);const f=o===void 0?!1:o,p=l===void 0?!1:l,h=d===void 0?"default":d,y=a===void 0?"default":a,S=f?ju:"button",{isMobile:C,state:w}=Ku();let _;e[8]!==n||e[9]!==y||e[10]!==h?(_=ke(Hj({variant:h,size:y}),n),e[8]=n,e[9]=y,e[10]=h,e[11]=_):_=e[11];let v;e[12]!==S||e[13]!==p||e[14]!==i||e[15]!==y||e[16]!==_?(v=g.jsx(S,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":y,"data-active":p,className:_,...i}),e[12]=S,e[13]=p,e[14]=i,e[15]=y,e[16]=_,e[17]=v):v=e[17];const b=v;if(!u)return b;if(typeof u=="string"){let M;e[18]!==u?(M={children:u},e[18]=u,e[19]=M):M=e[19],u=M}let x;e[20]!==b?(x=g.jsx(Pl,{asChild:!0,children:b}),e[20]=b,e[21]=x):x=e[21];const E=w!=="collapsed"||C;let N;e[22]!==E||e[23]!==u?(N=g.jsx(Fl,{side:"right",align:"center",hidden:E,...u}),e[22]=E,e[23]=u,e[24]=N):N=e[24];let A;return e[25]!==x||e[26]!==N?(A=g.jsxs(zl,{children:[x,N]}),e[25]=x,e[26]=N,e[27]=A):A=e[27],A}function Uj(t){const e=me.c(12);let n,i,o,l;e[0]!==t?({className:n,asChild:o,showOnHover:l,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=o===void 0?!1:o,a=l===void 0?!1:l,u=d?ju:"button",f=a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0";let p;e[5]!==n||e[6]!==f?(p=ke("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",f,n),e[5]=n,e[6]=f,e[7]=p):p=e[7];let h;return e[8]!==u||e[9]!==i||e[10]!==p?(h=g.jsx(u,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:p,...i}),e[8]=u,e[9]=i,e[10]=p,e[11]=h):h=e[11],h}function $j(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("ml-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border pl-2.5 py-0.5 group-data-[collapsible=icon]:hidden",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function So(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(Q5,{"data-slot":"collapsible",...n}),e[2]=n,e[3]=i):i=e[3],i}function wo(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(tS,{"data-slot":"collapsible-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function Co(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(nS,{"data-slot":"collapsible-content",...n}),e[2]=n,e[3]=i):i=e[3],i}function qj(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(K6,{"data-slot":"dropdown-menu",...n}),e[2]=n,e[3]=i):i=e[3],i}function Vj(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(Y6,{"data-slot":"dropdown-menu-trigger",...n}),e[2]=n,e[3]=i):i=e[3],i}function Gj(t){const e=me.c(12);let n,i,o,l;e[0]!==t?({className:n,align:o,sideOffset:l,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=o===void 0?"start":o,a=l===void 0?4:l;let u;e[5]!==n?(u=ke("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),e[5]=n,e[6]=u):u=e[6];let f;return e[7]!==d||e[8]!==i||e[9]!==a||e[10]!==u?(f=g.jsx(X6,{children:g.jsx(Z6,{"data-slot":"dropdown-menu-content",sideOffset:a,align:d,className:u,...i})}),e[7]=d,e[8]=i,e[9]=a,e[10]=u,e[11]=f):f=e[11],f}function Km(t){const e=me.c(12);let n,i,o,l;e[0]!==t?({className:n,inset:i,variant:l,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=l===void 0?"default":l;let a;e[5]!==n?(a=ke("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",n),e[5]=n,e[6]=a):a=e[6];let u;return e[7]!==i||e[8]!==o||e[9]!==a||e[10]!==d?(u=g.jsx(Q6,{"data-slot":"dropdown-menu-item","data-inset":i,"data-variant":d,className:a,...o}),e[7]=i,e[8]=o,e[9]=a,e[10]=d,e[11]=u):u=e[11],u}function Wj(t,e){const n=me.c(6),[i,o]=D.useState(null),l=D.useRef(!1),d=D.useRef(null);let a,u;n[0]!==e||n[1]!==t?(a=()=>(l.current&&!e&&t&&(o(t),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{o(null),d.current=null},5e3)),l.current=e,()=>{d.current&&clearTimeout(d.current)}),u=[e,t],n[0]=e,n[1]=t,n[2]=a,n[3]=u):(a=n[2],u=n[3]),D.useEffect(a,u);const f=t!==null&&i===t;let p;return n[4]!==f?(p={isFlashing:f},n[4]=f,n[5]=p):p=n[5],p}const wb=Br.memo(function(e){const n=me.c(6),{isClosed:i,onReopen:o,onClose:l,onDelete:d}=e;let a;n[0]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx(Vj,{asChild:!0,children:g.jsxs(Uj,{showOnHover:!0,children:[g.jsx(n4,{className:"size-4"}),g.jsx("span",{className:"sr-only",children:"Session actions"})]})}),n[0]=a):a=n[0];let u;return n[1]!==i||n[2]!==l||n[3]!==d||n[4]!==o?(u=g.jsxs(qj,{children:[a,g.jsx(Gj,{align:"end",children:i?g.jsxs(g.Fragment,{children:[g.jsxs(Km,{onClick:o,children:[g.jsx(Px,{className:"size-4"}),"Restore"]}),g.jsxs(Km,{onClick:d,className:"text-destructive focus:text-destructive",children:[g.jsx(Du,{className:"size-4"}),"Delete permanently"]})]}):g.jsxs(Km,{onClick:l,children:[g.jsx(bs,{className:"size-4"}),"Archive"]})})]}),n[1]=i,n[2]=l,n[3]=d,n[4]=o,n[5]=u):u=n[5],u}),Cb=Br.memo(function(e){const n=me.c(4),{status:i,isStreaming:o,runningAt:l}=e;if(o||i==="running"||!!l){let u;return n[0]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(gr,{className:"size-3.5 animate-spin shrink-0"}),n[0]=u):u=n[0],u}if(i==="error"){let u;return n[1]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(Gf,{className:"size-3.5 shrink-0"}),n[1]=u):u=n[1],u}if(i==="interrupted"){let u;return n[2]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(zx,{className:"size-3.5 shrink-0"}),n[2]=u):u=n[2],u}let a;return n[3]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx(Nu,{className:"size-3.5 shrink-0"}),n[3]=a):a=n[3],a}),zg=Br.memo(function t({session:e,allSessions:n,isActive:i,currentSessionId:o,streamingSessionId:l,pendingPermissions:d,onResumeSession:a,onCloseSession:u,onReopenSession:f,onDeleteSession:p}){const h=D.useMemo(()=>n.filter(x=>x.parentId===e.id),[n,e.id]),y=h.length>0,S=e.status==="closed",C=D.useMemo(()=>h.some(x=>x.id===o),[h,o]),w=e.id===l,_=d.some(x=>x.sessionId===e.id),v=w||e.subagentStatus==="running"||!!e.runningAt,{isFlashing:b}=Wj(e.id,v);return y?g.jsx(Eu,{delayDuration:300,children:g.jsx(So,{defaultOpen:i||C,className:"group/collapsible",children:g.jsxs(da,{children:[g.jsxs("div",{className:"flex items-center w-full",children:[g.jsx(wo,{asChild:!0,children:g.jsx("button",{className:"flex items-center justify-center rounded-md hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shrink-0 size-7 p-1","aria-label":"Toggle child sessions",children:g.jsx(si,{className:"size-4 transition-transform duration-200 [[data-state=open]>&]:rotate-90"})})}),g.jsx(Ml,{"data-session-id":e.id,isActive:i,onClick:()=>a(e.id),className:ke("flex-1 min-w-0",b&&"animate-completion-flash rounded-md"),children:g.jsxs(zl,{children:[g.jsx(Pl,{asChild:!0,children:g.jsxs("span",{className:"truncate flex items-center gap-2",children:[g.jsx(Cb,{status:e.subagentStatus,isStreaming:w,runningAt:e.runningAt}),_&&g.jsx(bu,{className:"size-3 text-warning shrink-0 animate-pulse"}),e.title||"Untitled"]})}),g.jsx(Fl,{side:"right",className:"max-w-xs",children:e.title||"Untitled"})]})}),g.jsx(wb,{isClosed:S,onReopen:()=>f(e.id),onClose:()=>u(e.id),onDelete:()=>p(e.id)})]}),g.jsx(Co,{children:g.jsx($j,{children:h.map(x=>g.jsx(t,{session:x,allSessions:n,isActive:o===x.id,currentSessionId:o,streamingSessionId:l,pendingPermissions:d,onResumeSession:a,onCloseSession:u,onReopenSession:f,onDeleteSession:p},x.id))})})]})})}):g.jsx(Eu,{delayDuration:300,children:g.jsx(da,{children:g.jsxs("div",{className:"flex items-center w-full",children:[g.jsx("div",{className:"shrink-0 size-7 p-1"}),g.jsx(Ml,{"data-session-id":e.id,isActive:i,onClick:()=>a(e.id),className:ke("flex-1 min-w-0",b&&"animate-completion-flash rounded-md"),children:g.jsxs(zl,{children:[g.jsx(Pl,{asChild:!0,children:g.jsxs("span",{className:"truncate flex items-center gap-2",children:[g.jsx(Cb,{status:e.subagentStatus,isStreaming:w,runningAt:e.runningAt}),_&&g.jsx(bu,{className:"size-3 text-warning shrink-0 animate-pulse"}),e.title||"Untitled"]})}),g.jsx(Fl,{side:"right",className:"max-w-xs",children:e.title||"Untitled"})]})}),g.jsx(wb,{isClosed:S,onReopen:()=>f(e.id),onClose:()=>u(e.id),onDelete:()=>p(e.id)})]})})})}),Kj=Gl("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function Bn(t){const e=me.c(13);let n,i,o,l;e[0]!==t?({className:n,variant:o,asChild:l,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=o===void 0?"default":o,u=(l===void 0?!1:l)?ju:"span";let f;e[5]!==n||e[6]!==d?(f=ke(Kj({variant:d}),n),e[5]=n,e[6]=d,e[7]=f):f=e[7];let p;return e[8]!==u||e[9]!==i||e[10]!==f||e[11]!==d?(p=g.jsx(u,{"data-slot":"badge","data-variant":d,className:f,...i}),e[8]=u,e[9]=i,e[10]=f,e[11]=d,e[12]=p):p=e[12],p}const Yj=Br.memo(function(e){const n=me.c(43),{allSessions:i,currentSession:o,currentSessionId:l,streamingSessionId:d,pendingPermissions:a,favoritedWorkspaceIds:u,workspaces:f,activeWorkspace:p,onSelectWorkspace:h,onResumeSession:y,onCloseSession:S,onReopenSession:C,onDeleteSession:w,onCreateSessionInWorkspace:_,connected:v}=e;let b;if(n[0]!==u||n[1]!==f){const T=new Map(f.map(Xj));b=u.map(j=>T.get(j)).filter(Zj),n[0]=u,n[1]=f,n[2]=b}else b=n[2];const x=b;let E;if(n[3]!==i||n[4]!==x){E=new Map;for(const T of x){const j=i.filter(O=>O.workspaceId===T.id&&O.status==="active"&&O.parentId===null).sort(Qj);E.set(T.id,j)}n[3]=i,n[4]=x,n[5]=E}else E=n[5];const N=E;if(x.length===0){let T;n[6]===Symbol.for("react.memo_cache_sentinel")?(T=g.jsx(Bf,{children:"Overview"}),n[6]=T):T=n[6];let j;return n[7]===Symbol.for("react.memo_cache_sentinel")?(j=g.jsxs(If,{children:[T,g.jsx(zf,{children:g.jsx("div",{className:"px-2 py-8 text-center text-sm text-muted-foreground",children:"Star a workspace to see it here"})})]}),n[7]=j):j=n[7],j}let A;if(n[8]!==(p==null?void 0:p.id)||n[9]!==i||n[10]!==v||n[11]!==(o==null?void 0:o.id)||n[12]!==(o==null?void 0:o.workspaceId)||n[13]!==l||n[14]!==x||n[15]!==S||n[16]!==_||n[17]!==w||n[18]!==C||n[19]!==y||n[20]!==h||n[21]!==a||n[22]!==d||n[23]!==N){let T;n[25]!==(p==null?void 0:p.id)||n[26]!==i||n[27]!==v||n[28]!==(o==null?void 0:o.id)||n[29]!==(o==null?void 0:o.workspaceId)||n[30]!==l||n[31]!==S||n[32]!==_||n[33]!==w||n[34]!==C||n[35]!==y||n[36]!==h||n[37]!==a||n[38]!==d||n[39]!==N?(T=j=>{const O=j.id===(p==null?void 0:p.id),F=(o==null?void 0:o.workspaceId)===j.id,U=N.get(j.id)||[];return g.jsx(So,{defaultOpen:O,className:"group/collapsible",children:g.jsxs(If,{children:[g.jsx(Bf,{asChild:!0,children:g.jsxs(wo,{className:"flex items-center justify-between w-full",onClick:()=>h(j),children:[g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx(si,{className:"size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"}),j.isVirtual?g.jsx(vg,{className:"size-3.5"}):g.jsx(vo,{className:"size-3.5"}),g.jsx("span",{className:F?"truncate text-sidebar-foreground font-medium":"truncate",children:j.name})]}),g.jsx(Bn,{variant:"secondary",children:U.length})]})}),g.jsx(Co,{children:g.jsxs(zf,{children:[g.jsx(Al,{children:g.jsx(da,{children:g.jsxs(Ml,{onClick:()=>_(j.id),disabled:!v,className:"w-full",children:[g.jsx(ql,{className:"size-4","data-icon":"inline-start"}),g.jsx("span",{children:"New Chat"})]})})}),g.jsx(Pj,{}),g.jsx(Al,{children:U.length===0?g.jsx("div",{className:"px-2 py-1 text-xs text-muted-foreground",children:"(no active sessions)"}):U.map($=>g.jsx(zg,{session:$,allSessions:i,isActive:(o==null?void 0:o.id)===$.id,currentSessionId:l,streamingSessionId:d,pendingPermissions:a,onResumeSession:y,onCloseSession:S,onReopenSession:C,onDeleteSession:w},$.id))})]})})]})},j.id)},n[25]=p==null?void 0:p.id,n[26]=i,n[27]=v,n[28]=o==null?void 0:o.id,n[29]=o==null?void 0:o.workspaceId,n[30]=l,n[31]=S,n[32]=_,n[33]=w,n[34]=C,n[35]=y,n[36]=h,n[37]=a,n[38]=d,n[39]=N,n[40]=T):T=n[40],A=x.map(T),n[8]=p==null?void 0:p.id,n[9]=i,n[10]=v,n[11]=o==null?void 0:o.id,n[12]=o==null?void 0:o.workspaceId,n[13]=l,n[14]=x,n[15]=S,n[16]=_,n[17]=w,n[18]=C,n[19]=y,n[20]=h,n[21]=a,n[22]=d,n[23]=N,n[24]=A}else A=n[24];let M;return n[41]!==A?(M=g.jsx(g.Fragment,{children:A}),n[41]=A,n[42]=M):M=n[42],M});function Xj(t){return[t.id,t]}function Zj(t){return t!==void 0}function Qj(t,e){return new Date(e.updatedAt).getTime()-new Date(t.updatedAt).getTime()}const Jj=D.forwardRef((t,e)=>{const n=me.c(90),{sessions:i,currentSession:o,currentSessionId:l,streamingSessionId:d,pendingPermissions:a,connected:u,workspaces:f,activeWorkspace:p,allSessions:h,viewMode:y,favoritedWorkspaceIds:S,onCreateSession:C,onResumeSession:w,onCloseSession:_,onReopenSession:v,onDeleteSession:b,onSelectWorkspace:x,onCreateVirtualWorkspace:E,onCreatePhysicalWorkspace:N,onCreateSessionInWorkspace:A,onOpenSettings:M,onOpenMCP:T,onOpenAddServer:j,onServerSwitch:O,onEscape:F}=t,{quickConnections:U,addToQuickConnections:$,removeFromQuickConnections:G,activeServer:K}=Vl();Ku();const V=D.useRef(null),X=D.useRef(null);let Z,I;n[0]!==l?(Z=()=>{X.current=l},I=[l],n[0]=l,n[1]=Z,n[2]=I):(Z=n[1],I=n[2]),D.useEffect(Z,I);let L;n[3]===Symbol.for("react.memo_cache_sentinel")?(L=()=>{var Ve;const Ie=V.current;if(!Ie)return;const ot=Array.from(Ie.querySelectorAll('[data-sidebar="menu-button"]'));if(ot.length===0){Ie.focus();return}const Ce=ot.find(lt=>lt.getAttribute("data-session-id")===X.current);Ce?Ce.focus():(Ve=ot[0])==null||Ve.focus()},n[3]=L):L=n[3];const B=L;let H,P;n[4]===Symbol.for("react.memo_cache_sentinel")?(H=()=>({focusSessionPanel:B}),P=[B],n[4]=H,n[5]=P):(H=n[4],P=n[5]),D.useImperativeHandle(e,H,P);let ee;n[6]!==F?(ee=Ie=>{var lt,Dt,Xt,Ot,Jt;const ot=V.current;if(!ot)return;const Ce=Array.from(ot.querySelectorAll('[data-sidebar="menu-button"]')),Ve=Ce.indexOf(document.activeElement);e:switch(Ie.key){case"ArrowDown":{Ie.preventDefault();const Et=Ve<Ce.length-1?Ve+1:0;(lt=Ce[Et])==null||lt.focus();break e}case"ArrowUp":{Ie.preventDefault();const Et=Ve>0?Ve-1:Ce.length-1;(Dt=Ce[Et])==null||Dt.focus();break e}case"ArrowRight":{const Et=(Xt=document.activeElement)==null?void 0:Xt.parentElement;if(!Et)break e;const vn=Et.querySelector('button[aria-label="Toggle child sessions"]');if(!vn)break e;const Vt=Et.closest("[data-state]");(Vt==null?void 0:Vt.dataset.state)==="closed"&&(Ie.preventDefault(),vn.click());break e}case"ArrowLeft":{const Et=(Ot=document.activeElement)==null?void 0:Ot.parentElement;if(!Et)break e;const vn=Et.querySelector('button[aria-label="Toggle child sessions"]');if(!vn)break e;const Vt=Et.closest("[data-state]");(Vt==null?void 0:Vt.dataset.state)==="open"&&(Ie.preventDefault(),vn.click());break e}case"Enter":{document.activeElement instanceof HTMLButtonElement&&document.activeElement.click();break e}case"Escape":Ie.preventDefault(),(Jt=document.activeElement)==null||Jt.blur(),F==null||F()}},n[6]=F,n[7]=ee):ee=n[7];const ne=ee;let Q,W;if(n[8]!==i){const Ie=i.filter(e8);Q=Ie.filter(t8),W=Ie.filter(n8),n[8]=i,n[9]=Q,n[10]=W}else Q=n[9],W=n[10];let q;n[11]!==Q||n[12]!==W?(q={activeSessions:Q,archivedSessions:W},n[11]=Q,n[12]=W,n[13]=q):q=n[13];const{activeSessions:J,archivedSessions:ie}=q;let ce;n[14]!==(K==null?void 0:K.id)||n[15]!==U?(ce=Ie=>U.some(ot=>ot.workspaceId===Ie&&ot.serverId===(K==null?void 0:K.id)),n[14]=K==null?void 0:K.id,n[15]=U,n[16]=ce):ce=n[16];const ae=ce;let _e;n[17]!==K||n[18]!==$||n[19]!==U||n[20]!==G?(_e=(Ie,ot)=>{if(!K)return;const Ce=U.find(Ve=>Ve.workspaceId===Ie&&Ve.serverId===K.id);Ce?G(Ce.id):$(K.id,K.name,Ie,ot)},n[17]=K,n[18]=$,n[19]=U,n[20]=G,n[21]=_e):_e=n[21];const Ee=_e;let Te;n[22]!==j||n[23]!==O?(Te=g.jsx(wj,{onOpenAddServer:j,onServerSwitch:O}),n[22]=j,n[23]=O,n[24]=Te):Te=n[24];let Be;n[25]!==p||n[26]!==Ee||n[27]!==ae||n[28]!==N||n[29]!==E||n[30]!==x||n[31]!==y||n[32]!==f?(Be=y!=="overview"&&g.jsx(Sj,{workspaces:f,activeWorkspace:p,onSelectWorkspace:x,onCreateVirtualWorkspace:E,onCreatePhysicalWorkspace:N,isWorkspaceFavorited:ae,onToggleFavorite:Ee}),n[25]=p,n[26]=Ee,n[27]=ae,n[28]=N,n[29]=E,n[30]=x,n[31]=y,n[32]=f,n[33]=Be):Be=n[33];let se;n[34]!==Te||n[35]!==Be?(se=g.jsxs("div",{className:"p-2 space-y-2",children:[Te,Be]}),n[34]=Te,n[35]=Be,n[36]=se):se=n[36];let Ye;n[37]!==u||n[38]!==C||n[39]!==y?(Ye=y!=="overview"&&g.jsx(Al,{children:g.jsx(da,{children:g.jsxs(Ml,{onClick:C,disabled:!u,className:"w-full",children:[g.jsx(ql,{className:"size-4","data-icon":"inline-start"}),g.jsx("span",{children:"New Chat"})]})})}),n[37]=u,n[38]=C,n[39]=y,n[40]=Ye):Ye=n[40];let rt;n[41]!==se||n[42]!==Ye?(rt=g.jsxs(Bj,{children:[se,Ye]}),n[41]=se,n[42]=Ye,n[43]=rt):rt=n[43];let nt;n[44]!==J||n[45]!==p||n[46]!==h||n[47]!==ie||n[48]!==u||n[49]!==o||n[50]!==l||n[51]!==S||n[52]!==_||n[53]!==A||n[54]!==b||n[55]!==v||n[56]!==w||n[57]!==x||n[58]!==a||n[59]!==i||n[60]!==d||n[61]!==y||n[62]!==f?(nt=y==="overview"?g.jsx(Yj,{allSessions:h,currentSession:o,currentSessionId:l,streamingSessionId:d,favoritedWorkspaceIds:S,workspaces:f,activeWorkspace:p,onSelectWorkspace:x,onResumeSession:w,onCloseSession:_,onReopenSession:v,onDeleteSession:b,onCreateSessionInWorkspace:A,connected:u,pendingPermissions:a}):g.jsxs(g.Fragment,{children:[J.length>0&&g.jsx(So,{defaultOpen:!0,className:"group/collapsible",children:g.jsxs(If,{children:[g.jsx(Bf,{asChild:!0,children:g.jsxs(wo,{className:"flex items-center justify-between w-full",children:[g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx(si,{className:"size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"}),"Active"]}),g.jsx(Bn,{variant:"secondary",children:J.length})]})}),g.jsx(Co,{children:g.jsx(zf,{children:g.jsx(Al,{children:J.map(Ie=>g.jsx(zg,{session:Ie,allSessions:i,isActive:(o==null?void 0:o.id)===Ie.id,currentSessionId:l,streamingSessionId:d,pendingPermissions:a,onResumeSession:w,onCloseSession:_,onReopenSession:v,onDeleteSession:b},Ie.id))})})})]})}),ie.length>0&&g.jsx(So,{defaultOpen:!0,className:"group/collapsible",children:g.jsxs(If,{children:[g.jsx(Bf,{asChild:!0,children:g.jsxs(wo,{className:"flex items-center justify-between w-full",children:[g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx(si,{className:"size-3 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"}),"Archived"]}),g.jsx(Bn,{variant:"secondary",children:ie.length})]})}),g.jsx(Co,{children:g.jsx(zf,{children:g.jsx(Al,{children:ie.map(Ie=>g.jsx(zg,{session:Ie,allSessions:i,isActive:(o==null?void 0:o.id)===Ie.id,currentSessionId:l,streamingSessionId:d,pendingPermissions:a,onResumeSession:w,onCloseSession:_,onReopenSession:v,onDeleteSession:b},Ie.id))})})})]})}),J.length===0&&ie.length===0&&g.jsxs("div",{className:"p-4 text-center text-sm text-muted-foreground",children:["No sessions yet.",g.jsx("br",{}),"Start a new chat to begin."]})]}),n[44]=J,n[45]=p,n[46]=h,n[47]=ie,n[48]=u,n[49]=o,n[50]=l,n[51]=S,n[52]=_,n[53]=A,n[54]=b,n[55]=v,n[56]=w,n[57]=x,n[58]=a,n[59]=i,n[60]=d,n[61]=y,n[62]=f,n[63]=nt):nt=n[63];let Ge;n[64]!==ne||n[65]!==nt?(Ge=g.jsx(Fj,{ref:V,tabIndex:-1,onKeyDown:ne,className:"outline-none",children:nt}),n[64]=ne,n[65]=nt,n[66]=Ge):Ge=n[66];let gt;n[67]!==u?(gt=u?g.jsx(p5,{className:"size-3.5 text-success"}):g.jsx(qx,{className:"size-3.5 text-destructive"}),n[67]=u,n[68]=gt):gt=n[68];const it=u?"Connected":"Disconnected";let Je;n[69]!==it?(Je=g.jsx("span",{className:"text-xs text-muted-foreground",children:it}),n[69]=it,n[70]=Je):Je=n[70];let at;n[71]!==gt||n[72]!==Je?(at=g.jsx(da,{children:g.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[gt,Je]})}),n[71]=gt,n[72]=Je,n[73]=at):at=n[73];let fe,ge;n[74]===Symbol.for("react.memo_cache_sentinel")?(fe=g.jsx(fa,{className:"size-4","data-icon":"inline-start"}),ge=g.jsx("span",{children:"MCP Servers"}),n[74]=fe,n[75]=ge):(fe=n[74],ge=n[75]);let Ae;n[76]!==T?(Ae=g.jsx(da,{children:g.jsxs(Ml,{onClick:T,children:[fe,ge]})}),n[76]=T,n[77]=Ae):Ae=n[77];let Me,Le;n[78]===Symbol.for("react.memo_cache_sentinel")?(Me=g.jsx(Fx,{className:"size-4","data-icon":"inline-start"}),Le=g.jsx("span",{children:"Settings"}),n[78]=Me,n[79]=Le):(Me=n[78],Le=n[79]);let st;n[80]!==M?(st=g.jsx(da,{children:g.jsx("div",{className:"flex items-center gap-1",children:g.jsxs(Ml,{onClick:M,children:[Me,Le]})})}),n[80]=M,n[81]=st):st=n[81];let Se;n[82]!==at||n[83]!==Ae||n[84]!==st?(Se=g.jsx(zj,{className:"pb-4",children:g.jsxs(Al,{children:[at,Ae,st]})}),n[82]=at,n[83]=Ae,n[84]=st,n[85]=Se):Se=n[85];let Ze;return n[86]!==rt||n[87]!==Ge||n[88]!==Se?(Ze=g.jsxs(Ij,{collapsible:"offcanvas",children:[rt,Ge,Se]}),n[86]=rt,n[87]=Ge,n[88]=Se,n[89]=Ze):Ze=n[89],Ze});function e8(t){return!t.parentId}function t8(t){return t.status==="active"}function n8(t){return t.status==="closed"}const r8={".ts":{icon:Ci,color:"text-blue-500"},".tsx":{icon:Ci,color:"text-blue-500"},".js":{icon:Ci,color:"text-yellow-500"},".jsx":{icon:Ci,color:"text-yellow-500"},".json":{icon:Ci,color:"text-yellow-600"},".md":{icon:Ci,color:"text-gray-500"},".css":{icon:Ci,color:"text-purple-500"},".html":{icon:Ci,color:"text-orange-500"}};function DC({entry:t,workspaceId:e,parentPath:n,depth:i,onFileSelect:o,showHidden:l=!0,serverUrl:d,apiToken:a}){const{fetchWithAuth:u}=qu(),[f,p]=D.useState(!1),[h,y]=D.useState([]),[S,C]=D.useState(!1),[w,_]=D.useState(!1),v=n?`${n}/${t.path}`:t.path,b=t.type==="directory",x=async()=>{if(!(w||S)){C(!0);try{const O=await(await u(`/api/workspaces/${e}/files?path=${encodeURIComponent(v)}&showHidden=${l}`,{},{serverUrl:d,token:a})).json();y(O.files||[]),_(!0)}catch(j){console.error("Failed to load children:",j)}finally{C(!1)}}},E=j=>{p(j),j&&b&&x()},N=()=>{!b&&o&&o({...t,path:v})},A=t.extension?r8[t.extension]:null,M=b?f?yg:vo:(A==null?void 0:A.icon)||Ci,T=b?"text-amber-500":(A==null?void 0:A.color)||"text-muted-foreground";return b?g.jsxs(So,{open:f,onOpenChange:E,children:[g.jsx(wo,{asChild:!0,children:g.jsxs("button",{className:ke("flex items-center gap-1.5 w-full min-w-0 overflow-x-hidden px-1.5 py-0.5 rounded text-sm","hover:bg-accent hover:text-accent-foreground","transition-colors text-left"),style:{paddingLeft:`${i*12+6}px`},children:[S?g.jsx(gr,{className:"w-3 h-3 animate-spin shrink-0"}):g.jsx(si,{className:ke("w-3 h-3 shrink-0 transition-transform",f&&"rotate-90")}),g.jsx(M,{className:ke("w-4 h-4 shrink-0",T)}),g.jsx("span",{className:"truncate min-w-0 flex-1",children:t.name})]})}),g.jsx(Co,{children:h.map(j=>g.jsx(DC,{entry:j,workspaceId:e,parentPath:v,depth:i+1,onFileSelect:o,showHidden:l,serverUrl:d,apiToken:a},`${v}/${j.path}`))})]}):g.jsxs("button",{onClick:N,className:ke("flex items-center gap-1.5 w-full min-w-0 overflow-x-hidden px-1.5 py-0.5 rounded text-sm","hover:bg-accent hover:text-accent-foreground","transition-colors text-left"),style:{paddingLeft:`${i*12+6}px`},children:[g.jsx(M,{className:ke("w-4 h-4 shrink-0",T)}),g.jsx("span",{className:"truncate min-w-0 flex-1",children:t.name})]})}function kb({workspaceId:t,serverUrl:e,apiToken:n,onFileSelect:i,showHidden:o=!0}){const[l,d]=D.useState([]),[a,u]=D.useState(""),[f,p]=D.useState(!0),[h,y]=D.useState(null),{fetchWithAuth:S}=qu(),C=D.useCallback(async()=>{p(!0),y(null);try{const w=await S(`/api/workspaces/${t}/files?showHidden=${o}`,{},{serverUrl:e,token:n}),_=await w.json();if(!w.ok)throw new Error(_.message||"Failed to load files");d(_.files),u(_.currentPath)}catch(w){y(w instanceof Error?w.message:"Failed to load files")}finally{p(!1)}},[t,o,S,e,n]);return D.useEffect(()=>{C()},[C]),f?g.jsxs("div",{className:"flex items-center justify-center h-32 text-muted-foreground",children:[g.jsx(gr,{className:"w-4 h-4 animate-spin mr-2"}),"Loading files..."]}):h?g.jsxs("div",{className:"p-4 text-sm text-destructive",children:[h,g.jsx(Pe,{variant:"ghost",size:"sm",onClick:C,className:"ml-2",children:g.jsx(Tl,{className:"w-3 h-3"})})]}):l.length===0?g.jsxs("div",{className:"p-4 text-sm text-muted-foreground",children:["Empty workspace",g.jsx(Pe,{variant:"ghost",size:"sm",onClick:C,className:"ml-2",children:g.jsx(Tl,{className:"w-3 h-3"})})]}):g.jsxs("div",{className:"flex flex-col h-full min-w-0 overflow-hidden",children:[g.jsxs("div",{className:"flex items-center justify-between min-w-0 overflow-hidden px-3 py-2",children:[g.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide truncate min-w-0",children:"Files"}),g.jsx(Pe,{variant:"ghost",size:"icon",className:"h-5 w-5 shrink-0",onClick:C,children:g.jsx(Tl,{className:"w-3 h-3"})})]}),g.jsx(nc,{className:"flex-1 min-h-0 min-w-0",children:g.jsx("div",{className:"px-2 pb-2 min-w-0 overflow-hidden",children:g.jsx("div",{className:"space-y-0.5",children:l.map(w=>g.jsx(DC,{entry:w,workspaceId:t,parentPath:a,depth:0,onFileSelect:i,showHidden:o,serverUrl:e,apiToken:n},w.path))})})})]})}function i8(t){const e=me.c(33),{workspaceId:n,searchQuery:i,selectedIndex:o,onSelect:l,onFilesChange:d,showHidden:a,serverUrl:u,apiToken:f}=t,p=a===void 0?!0:a;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],e[0]=h):h=e[0];const[y,S]=D.useState(h),[C,w]=D.useState(!1),[_,v]=D.useState(i),{fetchWithAuth:b}=qu();let x,E;e[1]!==i?(x=()=>{const G=setTimeout(()=>{v(i)},150);return()=>clearTimeout(G)},E=[i],e[1]=i,e[2]=x,e[3]=E):(x=e[2],E=e[3]),D.useEffect(x,E);let N,A;if(e[4]!==f||e[5]!==_||e[6]!==b||e[7]!==d||e[8]!==u||e[9]!==p||e[10]!==n?(N=()=>{if(!_||_.length<2){S([]),d([]);return}w(!0);const G=new AbortController;return b(`/api/workspaces/${n}/files?search=${encodeURIComponent(_)}&showHidden=${p}`,{signal:G.signal},{serverUrl:u,token:f}).then(o8).then(K=>{const V=K.files||[];S(V),d(V)}).catch(s8).finally(()=>w(!1)),()=>G.abort()},A=[n,_,d,p,b,u,f],e[4]=f,e[5]=_,e[6]=b,e[7]=d,e[8]=u,e[9]=p,e[10]=n,e[11]=N,e[12]=A):(N=e[11],A=e[12]),D.useEffect(N,A),!i||i.length<2){let G;return e[13]===Symbol.for("react.memo_cache_sentinel")?(G=g.jsx("div",{className:"p-2 text-xs text-muted-foreground",children:"Type at least 2 characters to search files..."}),e[13]=G):G=e[13],G}if(C){let G;return e[14]===Symbol.for("react.memo_cache_sentinel")?(G=g.jsxs("div",{className:"flex items-center justify-center p-4 text-muted-foreground",children:[g.jsx(gr,{className:"w-4 h-4 animate-spin mr-2"}),"Searching..."]}),e[14]=G):G=e[14],G}if(y.length===0){let G;return e[15]!==i?(G=g.jsxs("div",{className:"p-2 text-xs text-muted-foreground",children:['No files found matching "',i,'"']}),e[15]=i,e[16]=G):G=e[16],G}let M;if(e[17]!==y||e[18]!==l||e[19]!==o){let G;e[21]!==l||e[22]!==o?(G=(K,V)=>g.jsxs("button",{onClick:()=>l(K),className:ke("flex items-center gap-2 w-full px-2 py-1.5 rounded text-sm text-left","hover:bg-muted",V===o&&"bg-primary/20 text-primary font-medium ring-1 ring-primary/50"),children:[K.type==="directory"?g.jsx(vo,{className:"w-4 h-4 text-amber-500 flex-shrink-0"}):g.jsx(Ci,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),g.jsx("span",{className:"truncate flex-1",children:K.path}),K.extension&&g.jsx("span",{className:"text-xs text-muted-foreground",children:K.extension})]},K.path),e[21]=l,e[22]=o,e[23]=G):G=e[23],M=y.map(G),e[17]=y,e[18]=l,e[19]=o,e[20]=M}else M=e[20];const T=y.length!==1?"s":"";let j;e[24]===Symbol.for("react.memo_cache_sentinel")?(j=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"↑↓"}),e[24]=j):j=e[24];let O;e[25]===Symbol.for("react.memo_cache_sentinel")?(O=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"↵"}),e[25]=O):O=e[25];let F;e[26]===Symbol.for("react.memo_cache_sentinel")?(F=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"esc"}),e[26]=F):F=e[26];let U;e[27]!==y.length||e[28]!==T?(U=g.jsxs("div",{className:"mt-1 pt-1 border-t text-xs text-muted-foreground px-2",children:[y.length," result",T," •",j," navigate",O," select",F," close"]}),e[27]=y.length,e[28]=T,e[29]=U):U=e[29];let $;return e[30]!==U||e[31]!==M?($=g.jsxs("div",{className:"p-1",children:[M,U]}),e[30]=U,e[31]=M,e[32]=$):$=e[32],$}function s8(t){t.name!=="AbortError"&&console.error("File search failed:",t)}function o8(t){return t.json()}function a8(t){const e=me.c(40),{workspaceId:n,serverUrl:i,apiToken:o,isOpen:l,onClose:d}=t,a=Wu();if(!n)return null;if(a){let E;e[0]!==d?(E=U=>!U&&d(),e[0]=d,e[1]=E):E=e[1];let N;e[2]===Symbol.for("react.memo_cache_sentinel")?(N=g.jsx(Eh,{className:"sr-only",children:g.jsx(Ah,{children:"Files"})}),e[2]=N):N=e[2];let A;e[3]===Symbol.for("react.memo_cache_sentinel")?(A=g.jsx("span",{className:"font-semibold text-sm",children:"Files"}),e[3]=A):A=e[3];let M;e[4]===Symbol.for("react.memo_cache_sentinel")?(M=g.jsx(bs,{className:"w-4 h-4"}),e[4]=M):M=e[4];let T;e[5]!==d?(T=g.jsxs("div",{className:"flex items-center justify-between p-3 border-b border-border",children:[A,g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:d,children:M})]}),e[5]=d,e[6]=T):T=e[6];let j;e[7]!==o||e[8]!==i||e[9]!==n?(j=g.jsx("div",{className:"flex flex-1 flex-col min-h-0 overflow-hidden",children:g.jsx(kb,{workspaceId:n,serverUrl:i,apiToken:o,showHidden:!0},n)}),e[7]=o,e[8]=i,e[9]=n,e[10]=j):j=e[10];let O;e[11]!==T||e[12]!==j?(O=g.jsxs(kh,{side:"right",className:"w-72 p-0 bg-sidebar [&>button]:hidden",children:[N,T,j]}),e[11]=T,e[12]=j,e[13]=O):O=e[13];let F;return e[14]!==l||e[15]!==E||e[16]!==O?(F=g.jsx(Ch,{open:l,onOpenChange:E,children:O}),e[14]=l,e[15]=E,e[16]=O,e[17]=F):F=e[17],F}const u=!l&&"w-0";let f;e[18]!==u?(f=ke("relative w-64 bg-transparent transition-[width] duration-200 ease-linear",u),e[18]=u,e[19]=f):f=e[19];let p;e[20]!==f?(p=g.jsx("div",{className:f}),e[20]=f,e[21]=p):p=e[21];const h=!l&&"translate-x-full";let y;e[22]!==h?(y=ke("fixed right-0 z-10 w-64 bg-sidebar border-l border-border flex flex-col overflow-hidden","transform transition-transform duration-200 ease-linear",h),e[22]=h,e[23]=y):y=e[23];let S;e[24]===Symbol.for("react.memo_cache_sentinel")?(S={top:"env(safe-area-inset-top, 0)",bottom:"env(safe-area-inset-bottom, 0)",height:"calc(100vh - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0))"},e[24]=S):S=e[24];let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx("span",{className:"font-semibold text-sm",children:"Files"}),e[25]=C):C=e[25];let w;e[26]===Symbol.for("react.memo_cache_sentinel")?(w=g.jsx(bs,{className:"w-4 h-4"}),e[26]=w):w=e[26];let _;e[27]!==d?(_=g.jsxs("div",{className:"flex items-center justify-between p-3 border-b border-border",children:[C,g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:d,children:w})]}),e[27]=d,e[28]=_):_=e[28];let v;e[29]!==o||e[30]!==i||e[31]!==n?(v=g.jsx("div",{className:"flex flex-1 flex-col min-h-0 overflow-hidden",children:g.jsx(kb,{workspaceId:n,serverUrl:i,apiToken:o,showHidden:!0},n)}),e[29]=o,e[30]=i,e[31]=n,e[32]=v):v=e[32];let b;e[33]!==v||e[34]!==y||e[35]!==_?(b=g.jsxs("div",{className:y,style:S,children:[_,v]}),e[33]=v,e[34]=y,e[35]=_,e[36]=b):b=e[36];let x;return e[37]!==b||e[38]!==p?(x=g.jsxs(g.Fragment,{children:[p,b]}),e[37]=b,e[38]=p,e[39]=x):x=e[39],x}var Ym={exports:{}},Eb;function l8(){return Eb||(Eb=1,(function(t,e){(function(n,i){t.exports=i()})(globalThis,(()=>(()=>{var n={4567:function(d,a,u){var f=this&&this.__decorate||function(b,x,E,N){var A,M=arguments.length,T=M<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,E):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,x,E,N);else for(var j=b.length-1;j>=0;j--)(A=b[j])&&(T=(M<3?A(T):M>3?A(x,E,T):A(x,E))||T);return M>3&&T&&Object.defineProperty(x,E,T),T},p=this&&this.__param||function(b,x){return function(E,N){x(E,N,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const h=u(9042),y=u(9924),S=u(844),C=u(4725),w=u(2585),_=u(3656);let v=a.AccessibilityManager=class extends S.Disposable{constructor(b,x,E,N){super(),this._terminal=b,this._coreBrowserService=E,this._renderService=N,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let A=0;A<this._terminal.rows;A++)this._rowElements[A]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[A]);if(this._topBoundaryFocusListener=A=>this._handleBoundaryFocus(A,0),this._bottomBoundaryFocusListener=A=>this._handleBoundaryFocus(A,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new y.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((A=>this._handleResize(A.rows)))),this.register(this._terminal.onRender((A=>this._refreshRows(A.start,A.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((A=>this._handleChar(A)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
487
+ `)))),this.register(this._terminal.onA11yTab((A=>this._handleTab(A)))),this.register(this._terminal.onKey((A=>this._handleKey(A.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,_.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,S.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(b){for(let x=0;x<b;x++)this._handleChar(" ")}_handleChar(b){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==b&&(this._charsToAnnounce+=b):this._charsToAnnounce+=b,b===`
488
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(b){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(b)||this._charsToConsume.push(b)}_refreshRows(b,x){this._liveRegionDebouncer.refresh(b,x,this._terminal.rows)}_renderRows(b,x){const E=this._terminal.buffer,N=E.lines.length.toString();for(let A=b;A<=x;A++){const M=E.lines.get(E.ydisp+A),T=[],j=(M==null?void 0:M.translateToString(!0,void 0,void 0,T))||"",O=(E.ydisp+A+1).toString(),F=this._rowElements[A];F&&(j.length===0?(F.innerText=" ",this._rowColumns.set(F,[0,1])):(F.textContent=j,this._rowColumns.set(F,T)),F.setAttribute("aria-posinset",O),F.setAttribute("aria-setsize",N))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(b,x){const E=b.target,N=this._rowElements[x===0?1:this._rowElements.length-2];if(E.getAttribute("aria-posinset")===(x===0?"1":`${this._terminal.buffer.lines.length}`)||b.relatedTarget!==N)return;let A,M;if(x===0?(A=E,M=this._rowElements.pop(),this._rowContainer.removeChild(M)):(A=this._rowElements.shift(),M=E,this._rowContainer.removeChild(A)),A.removeEventListener("focus",this._topBoundaryFocusListener),M.removeEventListener("focus",this._bottomBoundaryFocusListener),x===0){const T=this._createAccessibilityTreeNode();this._rowElements.unshift(T),this._rowContainer.insertAdjacentElement("afterbegin",T)}else{const T=this._createAccessibilityTreeNode();this._rowElements.push(T),this._rowContainer.appendChild(T)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(x===0?-1:1),this._rowElements[x===0?1:this._rowElements.length-2].focus(),b.preventDefault(),b.stopImmediatePropagation()}_handleSelectionChange(){var j,O;if(this._rowElements.length===0)return;const b=document.getSelection();if(!b)return;if(b.isCollapsed)return void(this._rowContainer.contains(b.anchorNode)&&this._terminal.clearSelection());if(!b.anchorNode||!b.focusNode)return void console.error("anchorNode and/or focusNode are null");let x={node:b.anchorNode,offset:b.anchorOffset},E={node:b.focusNode,offset:b.focusOffset};if((x.node.compareDocumentPosition(E.node)&Node.DOCUMENT_POSITION_PRECEDING||x.node===E.node&&x.offset>E.offset)&&([x,E]=[E,x]),x.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(x={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(x.node))return;const N=this._rowElements.slice(-1)[0];if(E.node.compareDocumentPosition(N)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(E={node:N,offset:(O=(j=N.textContent)==null?void 0:j.length)!=null?O:0}),!this._rowContainer.contains(E.node))return;const A=({node:F,offset:U})=>{const $=F instanceof Text?F.parentNode:F;let G=parseInt($==null?void 0:$.getAttribute("aria-posinset"),10)-1;if(isNaN(G))return console.warn("row is invalid. Race condition?"),null;const K=this._rowColumns.get($);if(!K)return console.warn("columns is null. Race condition?"),null;let V=U<K.length?K[U]:K.slice(-1)[0]+1;return V>=this._terminal.cols&&(++G,V=0),{row:G,column:V}},M=A(x),T=A(E);if(M&&T){if(M.row>T.row||M.row===T.row&&M.column>=T.column)throw new Error("invalid range");this._terminal.select(M.column,M.row,(T.row-M.row)*this._terminal.cols-M.column+T.column)}}_handleResize(b){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let x=this._rowContainer.children.length;x<this._terminal.rows;x++)this._rowElements[x]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[x]);for(;this._rowElements.length>b;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const b=this._coreBrowserService.mainDocument.createElement("div");return b.setAttribute("role","listitem"),b.tabIndex=-1,this._refreshRowDimensions(b),b}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let b=0;b<this._terminal.rows;b++)this._refreshRowDimensions(this._rowElements[b])}}_refreshRowDimensions(b){b.style.height=`${this._renderService.dimensions.css.cell.height}px`}};a.AccessibilityManager=v=f([p(1,w.IInstantiationService),p(2,C.ICoreBrowserService),p(3,C.IRenderService)],v)},3614:(d,a)=>{function u(y){return y.replace(/\r?\n/g,"\r")}function f(y,S){return S?"\x1B[200~"+y+"\x1B[201~":y}function p(y,S,C,w){y=f(y=u(y),C.decPrivateModes.bracketedPasteMode&&w.rawOptions.ignoreBracketedPasteMode!==!0),C.triggerDataEvent(y,!0),S.value=""}function h(y,S,C){const w=C.getBoundingClientRect(),_=y.clientX-w.left-10,v=y.clientY-w.top-10;S.style.width="20px",S.style.height="20px",S.style.left=`${_}px`,S.style.top=`${v}px`,S.style.zIndex="1000",S.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=u,a.bracketTextForPaste=f,a.copyHandler=function(y,S){y.clipboardData&&y.clipboardData.setData("text/plain",S.selectionText),y.preventDefault()},a.handlePasteEvent=function(y,S,C,w){y.stopPropagation(),y.clipboardData&&p(y.clipboardData.getData("text/plain"),S,C,w)},a.paste=p,a.moveTextAreaUnderMouseCursor=h,a.rightClickHandler=function(y,S,C,w,_){h(y,S,C),_&&w.rightClickSelect(y),S.value=w.selectionText,S.select()}},7239:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const f=u(1505);a.ColorContrastCache=class{constructor(){this._color=new f.TwoKeyMap,this._css=new f.TwoKeyMap}setCss(p,h,y){this._css.set(p,h,y)}getCss(p,h){return this._css.get(p,h)}setColor(p,h,y){this._color.set(p,h,y)}getColor(p,h){return this._color.get(p,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(u,f,p,h){u.addEventListener(f,p,h);let y=!1;return{dispose:()=>{y||(y=!0,u.removeEventListener(f,p,h))}}}},3551:function(d,a,u){var f=this&&this.__decorate||function(v,b,x,E){var N,A=arguments.length,M=A<3?b:E===null?E=Object.getOwnPropertyDescriptor(b,x):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(v,b,x,E);else for(var T=v.length-1;T>=0;T--)(N=v[T])&&(M=(A<3?N(M):A>3?N(b,x,M):N(b,x))||M);return A>3&&M&&Object.defineProperty(b,x,M),M},p=this&&this.__param||function(v,b){return function(x,E){b(x,E,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const h=u(3656),y=u(8460),S=u(844),C=u(2585),w=u(4725);let _=a.Linkifier=class extends S.Disposable{get currentLink(){return this._currentLink}constructor(v,b,x,E,N){super(),this._element=v,this._mouseService=b,this._renderService=x,this._bufferService=E,this._linkProviderService=N,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new y.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new y.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,S.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,S.toDisposable)((()=>{var A;this._lastMouseEvent=void 0,(A=this._activeProviderReplies)==null||A.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(v){this._lastMouseEvent=v;const b=this._positionFromMouseEvent(v,this._element,this._mouseService);if(!b)return;this._isMouseOut=!1;const x=v.composedPath();for(let E=0;E<x.length;E++){const N=x[E];if(N.classList.contains("xterm"))break;if(N.classList.contains("xterm-hover"))return}this._lastBufferCell&&b.x===this._lastBufferCell.x&&b.y===this._lastBufferCell.y||(this._handleHover(b),this._lastBufferCell=b)}_handleHover(v){if(this._activeLine!==v.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(v,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,v)||(this._clearCurrentLink(),this._askForLink(v,!0))}_askForLink(v,b){var E,N;this._activeProviderReplies&&b||((E=this._activeProviderReplies)==null||E.forEach((A=>{A==null||A.forEach((M=>{M.link.dispose&&M.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=v.y);let x=!1;for(const[A,M]of this._linkProviderService.linkProviders.entries())b?(N=this._activeProviderReplies)!=null&&N.get(A)&&(x=this._checkLinkProviderResult(A,v,x)):M.provideLinks(v.y,(T=>{var O,F;if(this._isMouseOut)return;const j=T==null?void 0:T.map((U=>({link:U})));(O=this._activeProviderReplies)==null||O.set(A,j),x=this._checkLinkProviderResult(A,v,x),((F=this._activeProviderReplies)==null?void 0:F.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(v.y,this._activeProviderReplies)}))}_removeIntersectingLinks(v,b){const x=new Set;for(let E=0;E<b.size;E++){const N=b.get(E);if(N)for(let A=0;A<N.length;A++){const M=N[A],T=M.link.range.start.y<v?0:M.link.range.start.x,j=M.link.range.end.y>v?this._bufferService.cols:M.link.range.end.x;for(let O=T;O<=j;O++){if(x.has(O)){N.splice(A--,1);break}x.add(O)}}}}_checkLinkProviderResult(v,b,x){var A;if(!this._activeProviderReplies)return x;const E=this._activeProviderReplies.get(v);let N=!1;for(let M=0;M<v;M++)this._activeProviderReplies.has(M)&&!this._activeProviderReplies.get(M)||(N=!0);if(!N&&E){const M=E.find((T=>this._linkAtPosition(T.link,b)));M&&(x=!0,this._handleNewLink(M))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!x)for(let M=0;M<this._activeProviderReplies.size;M++){const T=(A=this._activeProviderReplies.get(M))==null?void 0:A.find((j=>this._linkAtPosition(j.link,b)));if(T){x=!0,this._handleNewLink(T);break}}return x}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(v){if(!this._currentLink)return;const b=this._positionFromMouseEvent(v,this._element,this._mouseService);b&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,b)&&this._currentLink.link.activate(v,this._currentLink.link.text)}_clearCurrentLink(v,b){this._currentLink&&this._lastMouseEvent&&(!v||!b||this._currentLink.link.range.start.y>=v&&this._currentLink.link.range.end.y<=b)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,S.disposeArray)(this._linkCacheDisposables))}_handleNewLink(v){if(!this._lastMouseEvent)return;const b=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);b&&this._linkAtPosition(v.link,b)&&(this._currentLink=v,this._currentLink.state={decorations:{underline:v.link.decorations===void 0||v.link.decorations.underline,pointerCursor:v.link.decorations===void 0||v.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,v.link,this._lastMouseEvent),v.link.decorations={},Object.defineProperties(v.link.decorations,{pointerCursor:{get:()=>{var x,E;return(E=(x=this._currentLink)==null?void 0:x.state)==null?void 0:E.decorations.pointerCursor},set:x=>{var E;(E=this._currentLink)!=null&&E.state&&this._currentLink.state.decorations.pointerCursor!==x&&(this._currentLink.state.decorations.pointerCursor=x,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",x))}},underline:{get:()=>{var x,E;return(E=(x=this._currentLink)==null?void 0:x.state)==null?void 0:E.decorations.underline},set:x=>{var E,N,A;(E=this._currentLink)!=null&&E.state&&((A=(N=this._currentLink)==null?void 0:N.state)==null?void 0:A.decorations.underline)!==x&&(this._currentLink.state.decorations.underline=x,this._currentLink.state.isHovered&&this._fireUnderlineEvent(v.link,x))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((x=>{if(!this._currentLink)return;const E=x.start===0?0:x.start+1+this._bufferService.buffer.ydisp,N=this._bufferService.buffer.ydisp+1+x.end;if(this._currentLink.link.range.start.y>=E&&this._currentLink.link.range.end.y<=N&&(this._clearCurrentLink(E,N),this._lastMouseEvent)){const A=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);A&&this._askForLink(A,!1)}}))))}_linkHover(v,b,x){var E;(E=this._currentLink)!=null&&E.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(b,!0),this._currentLink.state.decorations.pointerCursor&&v.classList.add("xterm-cursor-pointer")),b.hover&&b.hover(x,b.text)}_fireUnderlineEvent(v,b){const x=v.range,E=this._bufferService.buffer.ydisp,N=this._createLinkUnderlineEvent(x.start.x-1,x.start.y-E-1,x.end.x,x.end.y-E-1,void 0);(b?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(N)}_linkLeave(v,b,x){var E;(E=this._currentLink)!=null&&E.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(b,!1),this._currentLink.state.decorations.pointerCursor&&v.classList.remove("xterm-cursor-pointer")),b.leave&&b.leave(x,b.text)}_linkAtPosition(v,b){const x=v.range.start.y*this._bufferService.cols+v.range.start.x,E=v.range.end.y*this._bufferService.cols+v.range.end.x,N=b.y*this._bufferService.cols+b.x;return x<=N&&N<=E}_positionFromMouseEvent(v,b,x){const E=x.getCoords(v,b,this._bufferService.cols,this._bufferService.rows);if(E)return{x:E[0],y:E[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(v,b,x,E,N){return{x1:v,y1:b,x2:x,y2:E,cols:this._bufferService.cols,fg:N}}};a.Linkifier=_=f([p(1,w.IMouseService),p(2,w.IRenderService),p(3,C.IBufferService),p(4,w.ILinkProviderService)],_)},9042:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(d,a,u){var f=this&&this.__decorate||function(w,_,v,b){var x,E=arguments.length,N=E<3?_:b===null?b=Object.getOwnPropertyDescriptor(_,v):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(w,_,v,b);else for(var A=w.length-1;A>=0;A--)(x=w[A])&&(N=(E<3?x(N):E>3?x(_,v,N):x(_,v))||N);return E>3&&N&&Object.defineProperty(_,v,N),N},p=this&&this.__param||function(w,_){return function(v,b){_(v,b,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const h=u(511),y=u(2585);let S=a.OscLinkProvider=class{constructor(w,_,v){this._bufferService=w,this._optionsService=_,this._oscLinkService=v}provideLinks(w,_){var j;const v=this._bufferService.buffer.lines.get(w-1);if(!v)return void _(void 0);const b=[],x=this._optionsService.rawOptions.linkHandler,E=new h.CellData,N=v.getTrimmedLength();let A=-1,M=-1,T=!1;for(let O=0;O<N;O++)if(M!==-1||v.hasContent(O)){if(v.loadCell(O,E),E.hasExtendedAttrs()&&E.extended.urlId){if(M===-1){M=O,A=E.extended.urlId;continue}T=E.extended.urlId!==A}else M!==-1&&(T=!0);if(T||M!==-1&&O===N-1){const F=(j=this._oscLinkService.getLinkData(A))==null?void 0:j.uri;if(F){const U={start:{x:M+1,y:w},end:{x:O+(T||O!==N-1?0:1),y:w}};let $=!1;if(!(x!=null&&x.allowNonHttpProtocols))try{const G=new URL(F);["http:","https:"].includes(G.protocol)||($=!0)}catch{$=!0}$||b.push({text:F,range:U,activate:(G,K)=>x?x.activate(G,K,U):C(0,K),hover:(G,K)=>{var V;return(V=x==null?void 0:x.hover)==null?void 0:V.call(x,G,K,U)},leave:(G,K)=>{var V;return(V=x==null?void 0:x.leave)==null?void 0:V.call(x,G,K,U)}})}T=!1,E.hasExtendedAttrs()&&E.extended.urlId?(M=O,A=E.extended.urlId):(M=-1,A=-1)}}_(b)}};function C(w,_){if(confirm(`Do you want to navigate to ${_}?
489
+
490
+ WARNING: This link could potentially be dangerous`)){const v=window.open();if(v){try{v.opener=null}catch{}v.location.href=_}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=S=f([p(0,y.IBufferService),p(1,y.IOptionsService),p(2,y.IOscLinkService)],S)},6193:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(u,f){this._renderCallback=u,this._coreBrowserService=f,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(u,f,p){this._rowCount=p,u=u!==void 0?u:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const u=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,f),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const f=u(3614),p=u(3656),h=u(3551),y=u(9042),S=u(3730),C=u(1680),w=u(3107),_=u(5744),v=u(2950),b=u(1296),x=u(428),E=u(4269),N=u(5114),A=u(8934),M=u(3230),T=u(9312),j=u(4725),O=u(6731),F=u(8055),U=u(8969),$=u(8460),G=u(844),K=u(6114),V=u(8437),X=u(2584),Z=u(7399),I=u(5941),L=u(9074),B=u(2585),H=u(5435),P=u(4567),ee=u(779);class ne extends U.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(W={}){super(W),this.browser=K,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new G.MutableDisposable),this._onCursorMove=this.register(new $.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new $.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new $.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new $.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new $.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new $.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new $.EventEmitter),this._onBlur=this.register(new $.EventEmitter),this._onA11yCharEmitter=this.register(new $.EventEmitter),this._onA11yTabEmitter=this.register(new $.EventEmitter),this._onWillOpen=this.register(new $.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(B.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ee.LinkProviderService),this._instantiationService.setService(j.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(S.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((q,J)=>this.refresh(q,J)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((q=>this._reportWindowsOptions(q)))),this.register(this._inputHandler.onColor((q=>this._handleColorEvent(q)))),this.register((0,$.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,$.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,$.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,$.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((q=>this._afterResize(q.cols,q.rows)))),this.register((0,G.toDisposable)((()=>{var q,J;this._customKeyEventHandler=void 0,(J=(q=this.element)==null?void 0:q.parentNode)==null||J.removeChild(this.element)})))}_handleColorEvent(W){if(this._themeService)for(const q of W){let J,ie="";switch(q.index){case 256:J="foreground",ie="10";break;case 257:J="background",ie="11";break;case 258:J="cursor",ie="12";break;default:J="ansi",ie="4;"+q.index}switch(q.type){case 0:const ce=F.color.toColorRGB(J==="ansi"?this._themeService.colors.ansi[q.index]:this._themeService.colors[J]);this.coreService.triggerDataEvent(`${X.C0.ESC}]${ie};${(0,I.toRgbString)(ce)}${X.C1_ESCAPED.ST}`);break;case 1:if(J==="ansi")this._themeService.modifyColors((ae=>ae.ansi[q.index]=F.channels.toColor(...q.color)));else{const ae=J;this._themeService.modifyColors((_e=>_e[ae]=F.channels.toColor(...q.color)))}break;case 2:this._themeService.restoreColor(q.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(W){W?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(P.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(W){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(X.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var W;return(W=this.textarea)==null?void 0:W.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(X.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const W=this.buffer.ybase+this.buffer.y,q=this.buffer.lines.get(W);if(!q)return;const J=Math.min(this.buffer.x,this.cols-1),ie=this._renderService.dimensions.css.cell.height,ce=q.getWidth(J),ae=this._renderService.dimensions.css.cell.width*ce,_e=this.buffer.y*this._renderService.dimensions.css.cell.height,Ee=J*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ee+"px",this.textarea.style.top=_e+"px",this.textarea.style.width=ae+"px",this.textarea.style.height=ie+"px",this.textarea.style.lineHeight=ie+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,p.addDisposableDomListener)(this.element,"copy",(q=>{this.hasSelection()&&(0,f.copyHandler)(q,this._selectionService)})));const W=q=>(0,f.handlePasteEvent)(q,this.textarea,this.coreService,this.optionsService);this.register((0,p.addDisposableDomListener)(this.textarea,"paste",W)),this.register((0,p.addDisposableDomListener)(this.element,"paste",W)),K.isFirefox?this.register((0,p.addDisposableDomListener)(this.element,"mousedown",(q=>{q.button===2&&(0,f.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,p.addDisposableDomListener)(this.element,"contextmenu",(q=>{(0,f.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),K.isLinux&&this.register((0,p.addDisposableDomListener)(this.element,"auxclick",(q=>{q.button===1&&(0,f.moveTextAreaUnderMouseCursor)(q,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,p.addDisposableDomListener)(this.textarea,"keyup",(W=>this._keyUp(W)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keydown",(W=>this._keyDown(W)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keypress",(W=>this._keyPress(W)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionupdate",(W=>this._compositionHelper.compositionupdate(W)))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,p.addDisposableDomListener)(this.textarea,"input",(W=>this._inputEvent(W)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(W){var J,ie,ce;if(!W)throw new Error("Terminal requires a parent element.");if(W.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((J=this.element)==null?void 0:J.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=W.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),W.appendChild(this.element);const q=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),q.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,p.addDisposableDomListener)(this.screenElement,"mousemove",(ae=>this.updateCursorStyle(ae)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),q.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",y.promptLabel),K.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(N.CoreBrowserService,this.textarea,(ie=W.ownerDocument.defaultView)!=null?ie:window,((ce=this._document)!=null?ce:typeof window<"u")?window.document:null)),this._instantiationService.setService(j.ICoreBrowserService,this._coreBrowserService),this.register((0,p.addDisposableDomListener)(this.textarea,"focus",(ae=>this._handleTextAreaFocus(ae)))),this.register((0,p.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(x.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(j.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(O.ThemeService),this._instantiationService.setService(j.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(E.CharacterJoinerService),this._instantiationService.setService(j.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(M.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(j.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ae=>this._onRender.fire(ae)))),this.onResize((ae=>this._renderService.resize(ae.cols,ae.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(v.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(A.MouseService),this._instantiationService.setService(j.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(h.Linkifier,this.screenElement)),this.element.appendChild(q);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(C.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ae=>this.scrollLines(ae.amount,ae.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(T.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(j.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ae=>this.scrollLines(ae.amount,ae.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ae=>this._renderService.handleSelectionChanged(ae.start,ae.end,ae.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ae=>{this.textarea.value=ae,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ae=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,p.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(w.BufferDecorationRenderer,this.screenElement)),this.register((0,p.addDisposableDomListener)(this.element,"mousedown",(ae=>this._selectionService.handleMouseDown(ae)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(P.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ae=>this._handleScreenReaderModeOptionChange(ae)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(_.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ae=>{!this._overviewRulerRenderer&&ae&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(_.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(b.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const W=this,q=this.element;function J(ae){const _e=W._mouseService.getMouseReportCoords(ae,W.screenElement);if(!_e)return!1;let Ee,Te;switch(ae.overrideType||ae.type){case"mousemove":Te=32,ae.buttons===void 0?(Ee=3,ae.button!==void 0&&(Ee=ae.button<3?ae.button:3)):Ee=1&ae.buttons?0:4&ae.buttons?1:2&ae.buttons?2:3;break;case"mouseup":Te=0,Ee=ae.button<3?ae.button:3;break;case"mousedown":Te=1,Ee=ae.button<3?ae.button:3;break;case"wheel":if(W._customWheelEventHandler&&W._customWheelEventHandler(ae)===!1||W.viewport.getLinesScrolled(ae)===0)return!1;Te=ae.deltaY<0?0:1,Ee=4;break;default:return!1}return!(Te===void 0||Ee===void 0||Ee>4)&&W.coreMouseService.triggerMouseEvent({col:_e.col,row:_e.row,x:_e.x,y:_e.y,button:Ee,action:Te,ctrl:ae.ctrlKey,alt:ae.altKey,shift:ae.shiftKey})}const ie={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ce={mouseup:ae=>(J(ae),ae.buttons||(this._document.removeEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.removeEventListener("mousemove",ie.mousedrag)),this.cancel(ae)),wheel:ae=>(J(ae),this.cancel(ae,!0)),mousedrag:ae=>{ae.buttons&&J(ae)},mousemove:ae=>{ae.buttons||J(ae)}};this.register(this.coreMouseService.onProtocolChange((ae=>{ae?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ae)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&ae?ie.mousemove||(q.addEventListener("mousemove",ce.mousemove),ie.mousemove=ce.mousemove):(q.removeEventListener("mousemove",ie.mousemove),ie.mousemove=null),16&ae?ie.wheel||(q.addEventListener("wheel",ce.wheel,{passive:!1}),ie.wheel=ce.wheel):(q.removeEventListener("wheel",ie.wheel),ie.wheel=null),2&ae?ie.mouseup||(ie.mouseup=ce.mouseup):(this._document.removeEventListener("mouseup",ie.mouseup),ie.mouseup=null),4&ae?ie.mousedrag||(ie.mousedrag=ce.mousedrag):(this._document.removeEventListener("mousemove",ie.mousedrag),ie.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,p.addDisposableDomListener)(q,"mousedown",(ae=>{if(ae.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ae))return J(ae),ie.mouseup&&this._document.addEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.addEventListener("mousemove",ie.mousedrag),this.cancel(ae)}))),this.register((0,p.addDisposableDomListener)(q,"wheel",(ae=>{if(!ie.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(ae)===!1)return!1;if(!this.buffer.hasScrollback){const _e=this.viewport.getLinesScrolled(ae);if(_e===0)return;const Ee=X.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ae.deltaY<0?"A":"B");let Te="";for(let Be=0;Be<Math.abs(_e);Be++)Te+=Ee;return this.coreService.triggerDataEvent(Te,!0),this.cancel(ae,!0)}return this.viewport.handleWheel(ae)?this.cancel(ae):void 0}}),{passive:!1})),this.register((0,p.addDisposableDomListener)(q,"touchstart",(ae=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ae),this.cancel(ae)}),{passive:!0})),this.register((0,p.addDisposableDomListener)(q,"touchmove",(ae=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ae)?void 0:this.cancel(ae)}),{passive:!1}))}refresh(W,q){var J;(J=this._renderService)==null||J.refreshRows(W,q)}updateCursorStyle(W){var q;(q=this._selectionService)!=null&&q.shouldColumnSelect(W)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(W,q,J=0){var ie;J===1?(super.scrollLines(W,q,J),this.refresh(0,this.rows-1)):(ie=this.viewport)==null||ie.scrollLines(W)}paste(W){(0,f.paste)(W,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(W){this._customKeyEventHandler=W}attachCustomWheelEventHandler(W){this._customWheelEventHandler=W}registerLinkProvider(W){return this._linkProviderService.registerLinkProvider(W)}registerCharacterJoiner(W){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const q=this._characterJoinerService.register(W);return this.refresh(0,this.rows-1),q}deregisterCharacterJoiner(W){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(W)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(W){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+W)}registerDecoration(W){return this._decorationService.registerDecoration(W)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(W,q,J){this._selectionService.setSelection(W,q,J)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var W;(W=this._selectionService)==null||W.clearSelection()}selectAll(){var W;(W=this._selectionService)==null||W.selectAll()}selectLines(W,q){var J;(J=this._selectionService)==null||J.selectLines(W,q)}_keyDown(W){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(W)===!1)return!1;const q=this.browser.isMac&&this.options.macOptionIsMeta&&W.altKey;if(!q&&!this._compositionHelper.keydown(W))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;q||W.key!=="Dead"&&W.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const J=(0,Z.evaluateKeyboardEvent)(W,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(W),J.type===3||J.type===2){const ie=this.rows-1;return this.scrollLines(J.type===2?-ie:ie),this.cancel(W,!0)}return J.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,W)||(J.cancel&&this.cancel(W,!0),!J.key||!!(W.key&&!W.ctrlKey&&!W.altKey&&!W.metaKey&&W.key.length===1&&W.key.charCodeAt(0)>=65&&W.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(J.key!==X.C0.ETX&&J.key!==X.C0.CR||(this.textarea.value=""),this._onKey.fire({key:J.key,domEvent:W}),this._showCursor(),this.coreService.triggerDataEvent(J.key,!0),!this.optionsService.rawOptions.screenReaderMode||W.altKey||W.ctrlKey?this.cancel(W,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(W,q){const J=W.isMac&&!this.options.macOptionIsMeta&&q.altKey&&!q.ctrlKey&&!q.metaKey||W.isWindows&&q.altKey&&q.ctrlKey&&!q.metaKey||W.isWindows&&q.getModifierState("AltGraph");return q.type==="keypress"?J:J&&(!q.keyCode||q.keyCode>47)}_keyUp(W){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(W)===!1||((function(q){return q.keyCode===16||q.keyCode===17||q.keyCode===18})(W)||this.focus(),this.updateCursorStyle(W),this._keyPressHandled=!1)}_keyPress(W){let q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(W)===!1)return!1;if(this.cancel(W),W.charCode)q=W.charCode;else if(W.which===null||W.which===void 0)q=W.keyCode;else{if(W.which===0||W.charCode===0)return!1;q=W.which}return!(!q||(W.altKey||W.ctrlKey||W.metaKey)&&!this._isThirdLevelShift(this.browser,W)||(q=String.fromCharCode(q),this._onKey.fire({key:q,domEvent:W}),this._showCursor(),this.coreService.triggerDataEvent(q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(W){if(W.data&&W.inputType==="insertText"&&(!W.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const q=W.data;return this.coreService.triggerDataEvent(q,!0),this.cancel(W),!0}return!1}resize(W,q){W!==this.cols||q!==this.rows?super.resize(W,q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(W,q){var J,ie;(J=this._charSizeService)==null||J.measure(),(ie=this.viewport)==null||ie.syncScrollArea(!0)}clear(){var W;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let q=1;q<this.rows;q++)this.buffer.lines.push(this.buffer.getBlankLine(V.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(W=this.viewport)==null||W.reset(),this.refresh(0,this.rows-1)}}reset(){var q,J;this.options.rows=this.rows,this.options.cols=this.cols;const W=this._customKeyEventHandler;this._setup(),super.reset(),(q=this._selectionService)==null||q.reset(),this._decorationService.reset(),(J=this.viewport)==null||J.reset(),this._customKeyEventHandler=W,this.refresh(0,this.rows-1)}clearTextureAtlas(){var W;(W=this._renderService)==null||W.clearTextureAtlas()}_reportFocus(){var W;(W=this.element)!=null&&W.classList.contains("focus")?this.coreService.triggerDataEvent(X.C0.ESC+"[I"):this.coreService.triggerDataEvent(X.C0.ESC+"[O")}_reportWindowsOptions(W){if(this._renderService)switch(W){case H.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const q=this._renderService.dimensions.css.canvas.width.toFixed(0),J=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${X.C0.ESC}[4;${J};${q}t`);break;case H.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ie=this._renderService.dimensions.css.cell.width.toFixed(0),ce=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${X.C0.ESC}[6;${ce};${ie}t`)}}cancel(W,q){if(this.options.cancelEvents||q)return W.preventDefault(),W.stopPropagation(),!1}}a.Terminal=ne},9924:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(u,f=1e3){this._renderCallback=u,this._debounceThresholdMS=f,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,f,p){this._rowCount=p,u=u!==void 0?u:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const y=h-this._lastRefreshMs,S=this._debounceThresholdMS-y;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),S)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const u=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,f)}}},1680:function(d,a,u){var f=this&&this.__decorate||function(v,b,x,E){var N,A=arguments.length,M=A<3?b:E===null?E=Object.getOwnPropertyDescriptor(b,x):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(v,b,x,E);else for(var T=v.length-1;T>=0;T--)(N=v[T])&&(M=(A<3?N(M):A>3?N(b,x,M):N(b,x))||M);return A>3&&M&&Object.defineProperty(b,x,M),M},p=this&&this.__param||function(v,b){return function(x,E){b(x,E,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const h=u(3656),y=u(4725),S=u(8460),C=u(844),w=u(2585);let _=a.Viewport=class extends C.Disposable{constructor(v,b,x,E,N,A,M,T){super(),this._viewportElement=v,this._scrollArea=b,this._bufferService=x,this._optionsService=E,this._charSizeService=N,this._renderService=A,this._coreBrowserService=M,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new S.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((j=>this._activeBuffer=j.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((j=>this._renderDimensions=j))),this._handleThemeChange(T.colors),this.register(T.onChangeColors((j=>this._handleThemeChange(j)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(v){this._viewportElement.style.backgroundColor=v.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(v){if(v)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const b=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==b&&(this._lastRecordedBufferHeight=b,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const v=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==v&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=v),this._refreshAnimationFrame=null}syncScrollArea(v=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(v);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(v)}_handleScroll(v){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const b=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:b,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const v=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(v*(this._smoothScrollState.target-this._smoothScrollState.origin)),v<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(v,b){const x=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(b<0&&this._viewportElement.scrollTop!==0||b>0&&x<this._lastRecordedBufferHeight)||(v.cancelable&&v.preventDefault(),!1)}handleWheel(v){const b=this._getPixelsScrolled(v);return b!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+b:this._smoothScrollState.target+=b,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=b,this._bubbleScroll(v,b))}scrollLines(v){if(v!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const b=v*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+b,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:v,suppressScrollEvent:!1})}_getPixelsScrolled(v){if(v.deltaY===0||v.shiftKey)return 0;let b=this._applyScrollModifier(v.deltaY,v);return v.deltaMode===WheelEvent.DOM_DELTA_LINE?b*=this._currentRowHeight:v.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(b*=this._currentRowHeight*this._bufferService.rows),b}getBufferElements(v,b){var T;let x,E="";const N=[],A=b!=null?b:this._bufferService.buffer.lines.length,M=this._bufferService.buffer.lines;for(let j=v;j<A;j++){const O=M.get(j);if(!O)continue;const F=(T=M.get(j+1))==null?void 0:T.isWrapped;if(E+=O.translateToString(!F),!F||j===M.length-1){const U=document.createElement("div");U.textContent=E,N.push(U),E.length>0&&(x=U),E=""}}return{bufferElements:N,cursorElement:x}}getLinesScrolled(v){if(v.deltaY===0||v.shiftKey)return 0;let b=this._applyScrollModifier(v.deltaY,v);return v.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(b/=this._currentRowHeight+0,this._wheelPartialScroll+=b,b=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):v.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(b*=this._bufferService.rows),b}_applyScrollModifier(v,b){const x=this._optionsService.rawOptions.fastScrollModifier;return x==="alt"&&b.altKey||x==="ctrl"&&b.ctrlKey||x==="shift"&&b.shiftKey?v*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:v*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(v){this._lastTouchY=v.touches[0].pageY}handleTouchMove(v){const b=this._lastTouchY-v.touches[0].pageY;return this._lastTouchY=v.touches[0].pageY,b!==0&&(this._viewportElement.scrollTop+=b,this._bubbleScroll(v,b))}};a.Viewport=_=f([p(2,w.IBufferService),p(3,w.IOptionsService),p(4,y.ICharSizeService),p(5,y.IRenderService),p(6,y.ICoreBrowserService),p(7,y.IThemeService)],_)},3107:function(d,a,u){var f=this&&this.__decorate||function(w,_,v,b){var x,E=arguments.length,N=E<3?_:b===null?b=Object.getOwnPropertyDescriptor(_,v):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(w,_,v,b);else for(var A=w.length-1;A>=0;A--)(x=w[A])&&(N=(E<3?x(N):E>3?x(_,v,N):x(_,v))||N);return E>3&&N&&Object.defineProperty(_,v,N),N},p=this&&this.__param||function(w,_){return function(v,b){_(v,b,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const h=u(4725),y=u(844),S=u(2585);let C=a.BufferDecorationRenderer=class extends y.Disposable{constructor(w,_,v,b,x){super(),this._screenElement=w,this._bufferService=_,this._coreBrowserService=v,this._decorationService=b,this._renderService=x,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((E=>this._removeDecoration(E)))),this.register((0,y.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const w of this._decorationService.decorations)this._renderDecoration(w);this._dimensionsChanged=!1}_renderDecoration(w){this._refreshStyle(w),this._dimensionsChanged&&this._refreshXPosition(w)}_createElement(w){var b,x;const _=this._coreBrowserService.mainDocument.createElement("div");_.classList.add("xterm-decoration"),_.classList.toggle("xterm-decoration-top-layer",((b=w==null?void 0:w.options)==null?void 0:b.layer)==="top"),_.style.width=`${Math.round((w.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,_.style.height=(w.options.height||1)*this._renderService.dimensions.css.cell.height+"px",_.style.top=(w.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",_.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const v=(x=w.options.x)!=null?x:0;return v&&v>this._bufferService.cols&&(_.style.display="none"),this._refreshXPosition(w,_),_}_refreshStyle(w){const _=w.marker.line-this._bufferService.buffers.active.ydisp;if(_<0||_>=this._bufferService.rows)w.element&&(w.element.style.display="none",w.onRenderEmitter.fire(w.element));else{let v=this._decorationElements.get(w);v||(v=this._createElement(w),w.element=v,this._decorationElements.set(w,v),this._container.appendChild(v),w.onDispose((()=>{this._decorationElements.delete(w),v.remove()}))),v.style.top=_*this._renderService.dimensions.css.cell.height+"px",v.style.display=this._altBufferIsActive?"none":"block",w.onRenderEmitter.fire(v)}}_refreshXPosition(w,_=w.element){var b;if(!_)return;const v=(b=w.options.x)!=null?b:0;(w.options.anchor||"left")==="right"?_.style.right=v?v*this._renderService.dimensions.css.cell.width+"px":"":_.style.left=v?v*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(w){var _;(_=this._decorationElements.get(w))==null||_.remove(),this._decorationElements.delete(w),w.dispose()}};a.BufferDecorationRenderer=C=f([p(1,S.IBufferService),p(2,h.ICoreBrowserService),p(3,S.IDecorationService),p(4,h.IRenderService)],C)},5871:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorZoneStore=void 0,a.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(u){if(u.options.overviewRulerOptions){for(const f of this._zones)if(f.color===u.options.overviewRulerOptions.color&&f.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(f,u.marker.line))return;if(this._lineAdjacentToZone(f,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(f,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,f){return f>=u.startBufferLine&&f<=u.endBufferLine}_lineAdjacentToZone(u,f,p){return f>=u.startBufferLine-this._linePadding[p||"full"]&&f<=u.endBufferLine+this._linePadding[p||"full"]}_addLineToZone(u,f){u.startBufferLine=Math.min(u.startBufferLine,f),u.endBufferLine=Math.max(u.endBufferLine,f)}}},5744:function(d,a,u){var f=this&&this.__decorate||function(x,E,N,A){var M,T=arguments.length,j=T<3?E:A===null?A=Object.getOwnPropertyDescriptor(E,N):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(x,E,N,A);else for(var O=x.length-1;O>=0;O--)(M=x[O])&&(j=(T<3?M(j):T>3?M(E,N,j):M(E,N))||j);return T>3&&j&&Object.defineProperty(E,N,j),j},p=this&&this.__param||function(x,E){return function(N,A){E(N,A,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const h=u(5871),y=u(4725),S=u(844),C=u(2585),w={full:0,left:0,center:0,right:0},_={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0};let b=a.OverviewRulerRenderer=class extends S.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(x,E,N,A,M,T,j){var F;super(),this._viewportElement=x,this._screenElement=E,this._bufferService=N,this._decorationService=A,this._renderService=M,this._optionsService=T,this._coreBrowserService=j,this._colorZoneStore=new h.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(F=this._viewportElement.parentElement)==null||F.insertBefore(this._canvas,this._viewportElement);const O=this._canvas.getContext("2d");if(!O)throw new Error("Ctx cannot be null");this._ctx=O,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,S.toDisposable)((()=>{var U;(U=this._canvas)==null||U.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const x=Math.floor(this._canvas.width/3),E=Math.ceil(this._canvas.width/3);_.full=this._canvas.width,_.left=x,_.center=E,_.right=x,this._refreshDrawHeightConstants(),v.full=0,v.left=0,v.center=_.left,v.right=_.left+_.center}_refreshDrawHeightConstants(){w.full=Math.round(2*this._coreBrowserService.dpr);const x=this._canvas.height/this._bufferService.buffer.lines.length,E=Math.round(Math.max(Math.min(x,12),6)*this._coreBrowserService.dpr);w.left=E,w.center=E,w.right=E}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*w.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*w.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*w.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*w.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const E of this._decorationService.decorations)this._colorZoneStore.addDecoration(E);this._ctx.lineWidth=1;const x=this._colorZoneStore.zones;for(const E of x)E.position!=="full"&&this._renderColorZone(E);for(const E of x)E.position==="full"&&this._renderColorZone(E);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(x){this._ctx.fillStyle=x.color,this._ctx.fillRect(v[x.position||"full"],Math.round((this._canvas.height-1)*(x.startBufferLine/this._bufferService.buffers.active.lines.length)-w[x.position||"full"]/2),_[x.position||"full"],Math.round((this._canvas.height-1)*((x.endBufferLine-x.startBufferLine)/this._bufferService.buffers.active.lines.length)+w[x.position||"full"]))}_queueRefresh(x,E){this._shouldUpdateDimensions=x||this._shouldUpdateDimensions,this._shouldUpdateAnchor=E||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};a.OverviewRulerRenderer=b=f([p(2,C.IBufferService),p(3,C.IDecorationService),p(4,y.IRenderService),p(5,C.IOptionsService),p(6,y.ICoreBrowserService)],b)},2950:function(d,a,u){var f=this&&this.__decorate||function(w,_,v,b){var x,E=arguments.length,N=E<3?_:b===null?b=Object.getOwnPropertyDescriptor(_,v):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(w,_,v,b);else for(var A=w.length-1;A>=0;A--)(x=w[A])&&(N=(E<3?x(N):E>3?x(_,v,N):x(_,v))||N);return E>3&&N&&Object.defineProperty(_,v,N),N},p=this&&this.__param||function(w,_){return function(v,b){_(v,b,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const h=u(4725),y=u(2585),S=u(2584);let C=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(w,_,v,b,x,E){this._textarea=w,this._compositionView=_,this._bufferService=v,this._optionsService=b,this._coreService=x,this._renderService=E,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(w){this._compositionView.textContent=w.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(w){if(this._isComposing||this._isSendingComposition){if(w.keyCode===229||w.keyCode===16||w.keyCode===17||w.keyCode===18)return!1;this._finalizeComposition(!1)}return w.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(w){if(this._compositionView.classList.remove("active"),this._isComposing=!1,w){const _={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let v;this._isSendingComposition=!1,_.start+=this._dataAlreadySent.length,v=this._isComposing?this._textarea.value.substring(_.start,_.end):this._textarea.value.substring(_.start),v.length>0&&this._coreService.triggerDataEvent(v,!0)}}),0)}else{this._isSendingComposition=!1;const _=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(_,!0)}}_handleAnyTextareaChanges(){const w=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const _=this._textarea.value,v=_.replace(w,"");this._dataAlreadySent=v,_.length>w.length?this._coreService.triggerDataEvent(v,!0):_.length<w.length?this._coreService.triggerDataEvent(`${S.C0.DEL}`,!0):_.length===w.length&&_!==w&&this._coreService.triggerDataEvent(_,!0)}}),0)}updateCompositionElements(w){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const _=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),v=this._renderService.dimensions.css.cell.height,b=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,x=_*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=x+"px",this._compositionView.style.top=b+"px",this._compositionView.style.height=v+"px",this._compositionView.style.lineHeight=v+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const E=this._compositionView.getBoundingClientRect();this._textarea.style.left=x+"px",this._textarea.style.top=b+"px",this._textarea.style.width=Math.max(E.width,1)+"px",this._textarea.style.height=Math.max(E.height,1)+"px",this._textarea.style.lineHeight=E.height+"px"}w||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};a.CompositionHelper=C=f([p(2,y.IBufferService),p(3,y.IOptionsService),p(4,y.ICoreService),p(5,h.IRenderService)],C)},9806:(d,a)=>{function u(f,p,h){const y=h.getBoundingClientRect(),S=f.getComputedStyle(h),C=parseInt(S.getPropertyValue("padding-left")),w=parseInt(S.getPropertyValue("padding-top"));return[p.clientX-y.left-C,p.clientY-y.top-w]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=u,a.getCoords=function(f,p,h,y,S,C,w,_,v){if(!C)return;const b=u(f,p,h);return b?(b[0]=Math.ceil((b[0]+(v?w/2:0))/w),b[1]=Math.ceil(b[1]/_),b[0]=Math.min(Math.max(b[0],1),y+(v?1:0)),b[1]=Math.min(Math.max(b[1],1),S),b):void 0}},9504:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const f=u(2584);function p(_,v,b,x){const E=_-h(_,b),N=v-h(v,b),A=Math.abs(E-N)-(function(M,T,j){let O=0;const F=M-h(M,j),U=T-h(T,j);for(let $=0;$<Math.abs(F-U);$++){const G=y(M,T)==="A"?-1:1,K=j.buffer.lines.get(F+G*$);K!=null&&K.isWrapped&&O++}return O})(_,v,b);return w(A,C(y(_,v),x))}function h(_,v){let b=0,x=v.buffer.lines.get(_),E=x==null?void 0:x.isWrapped;for(;E&&_>=0&&_<v.rows;)b++,x=v.buffer.lines.get(--_),E=x==null?void 0:x.isWrapped;return b}function y(_,v){return _>v?"A":"B"}function S(_,v,b,x,E,N){let A=_,M=v,T="";for(;A!==b||M!==x;)A+=E?1:-1,E&&A>N.cols-1?(T+=N.buffer.translateBufferLineToString(M,!1,_,A),A=0,_=0,M++):!E&&A<0&&(T+=N.buffer.translateBufferLineToString(M,!1,0,_+1),A=N.cols-1,_=A,M--);return T+N.buffer.translateBufferLineToString(M,!1,_,A)}function C(_,v){const b=v?"O":"[";return f.C0.ESC+b+_}function w(_,v){_=Math.floor(_);let b="";for(let x=0;x<_;x++)b+=v;return b}a.moveToCellSequence=function(_,v,b,x){const E=b.buffer.x,N=b.buffer.y;if(!b.buffer.hasScrollback)return(function(T,j,O,F,U,$){return p(j,F,U,$).length===0?"":w(S(T,j,T,j-h(j,U),!1,U).length,C("D",$))})(E,N,0,v,b,x)+p(N,v,b,x)+(function(T,j,O,F,U,$){let G;G=p(j,F,U,$).length>0?F-h(F,U):j;const K=F,V=(function(X,Z,I,L,B,H){let P;return P=p(I,L,B,H).length>0?L-h(L,B):Z,X<I&&P<=L||X>=I&&P<L?"C":"D"})(T,j,O,F,U,$);return w(S(T,G,O,K,V==="C",U).length,C(V,$))})(E,N,_,v,b,x);let A;if(N===v)return A=E>_?"D":"C",w(Math.abs(E-_),C(A,x));A=N>v?"D":"C";const M=Math.abs(N-v);return w((function(T,j){return j.cols-T})(N>v?_:E,b)+(M-1)*b.cols+1+((N>v?E:_)-1),C(A,x))}},1296:function(d,a,u){var f=this&&this.__decorate||function($,G,K,V){var X,Z=arguments.length,I=Z<3?G:V===null?V=Object.getOwnPropertyDescriptor(G,K):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")I=Reflect.decorate($,G,K,V);else for(var L=$.length-1;L>=0;L--)(X=$[L])&&(I=(Z<3?X(I):Z>3?X(G,K,I):X(G,K))||I);return Z>3&&I&&Object.defineProperty(G,K,I),I},p=this&&this.__param||function($,G){return function(K,V){G(K,V,$)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const h=u(3787),y=u(2550),S=u(2223),C=u(6171),w=u(6052),_=u(4725),v=u(8055),b=u(8460),x=u(844),E=u(2585),N="xterm-dom-renderer-owner-",A="xterm-rows",M="xterm-fg-",T="xterm-bg-",j="xterm-focus",O="xterm-selection";let F=1,U=a.DomRenderer=class extends x.Disposable{constructor($,G,K,V,X,Z,I,L,B,H,P,ee,ne){super(),this._terminal=$,this._document=G,this._element=K,this._screenElement=V,this._viewportElement=X,this._helperContainer=Z,this._linkifier2=I,this._charSizeService=B,this._optionsService=H,this._bufferService=P,this._coreBrowserService=ee,this._themeService=ne,this._terminalClass=F++,this._rowElements=[],this._selectionRenderModel=(0,w.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new b.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(A),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(O),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,C.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((Q=>this._injectCss(Q)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(N+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((Q=>this._handleLinkHover(Q)))),this.register(this._linkifier2.onHideLinkUnderline((Q=>this._handleLinkLeave(Q)))),this.register((0,x.toDisposable)((()=>{this._element.classList.remove(N+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new y.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const $=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*$,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*$),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/$),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/$),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const K of this._rowElements)K.style.width=`${this.dimensions.css.canvas.width}px`,K.style.height=`${this.dimensions.css.cell.height}px`,K.style.lineHeight=`${this.dimensions.css.cell.height}px`,K.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const G=`${this._terminalSelector} .${A} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=G,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss($){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let G=`${this._terminalSelector} .${A} { color: ${$.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;G+=`${this._terminalSelector} .${A} .xterm-dim { color: ${v.color.multiplyOpacity($.foreground,.5).css};}`,G+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const K=`blink_underline_${this._terminalClass}`,V=`blink_bar_${this._terminalClass}`,X=`blink_block_${this._terminalClass}`;G+=`@keyframes ${K} { 50% { border-bottom-style: hidden; }}`,G+=`@keyframes ${V} { 50% { box-shadow: none; }}`,G+=`@keyframes ${X} { 0% { background-color: ${$.cursor.css}; color: ${$.cursorAccent.css}; } 50% { background-color: inherit; color: ${$.cursor.css}; }}`,G+=`${this._terminalSelector} .${A}.${j} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${A}.${j} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${V} 1s step-end infinite;}${this._terminalSelector} .${A}.${j} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${X} 1s step-end infinite;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block { background-color: ${$.cursor.css}; color: ${$.cursorAccent.css};}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${$.cursor.css} !important; color: ${$.cursorAccent.css} !important;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${$.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${$.cursor.css} inset;}${this._terminalSelector} .${A} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${$.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,G+=`${this._terminalSelector} .${O} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${O} div { position: absolute; background-color: ${$.selectionBackgroundOpaque.css};}${this._terminalSelector} .${O} div { position: absolute; background-color: ${$.selectionInactiveBackgroundOpaque.css};}`;for(const[Z,I]of $.ansi.entries())G+=`${this._terminalSelector} .${M}${Z} { color: ${I.css}; }${this._terminalSelector} .${M}${Z}.xterm-dim { color: ${v.color.multiplyOpacity(I,.5).css}; }${this._terminalSelector} .${T}${Z} { background-color: ${I.css}; }`;G+=`${this._terminalSelector} .${M}${S.INVERTED_DEFAULT_COLOR} { color: ${v.color.opaque($.background).css}; }${this._terminalSelector} .${M}${S.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${v.color.multiplyOpacity(v.color.opaque($.background),.5).css}; }${this._terminalSelector} .${T}${S.INVERTED_DEFAULT_COLOR} { background-color: ${$.foreground.css}; }`,this._themeStyleElement.textContent=G}_setDefaultSpacing(){const $=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${$}px`,this._rowFactory.defaultSpacing=$}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements($,G){for(let K=this._rowElements.length;K<=G;K++){const V=this._document.createElement("div");this._rowContainer.appendChild(V),this._rowElements.push(V)}for(;this._rowElements.length>G;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize($,G){this._refreshRowElements($,G),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(j),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(j),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged($,G,K){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged($,G,K),this.renderRows(0,this._bufferService.rows-1),!$||!G)return;this._selectionRenderModel.update(this._terminal,$,G,K);const V=this._selectionRenderModel.viewportStartRow,X=this._selectionRenderModel.viewportEndRow,Z=this._selectionRenderModel.viewportCappedStartRow,I=this._selectionRenderModel.viewportCappedEndRow;if(Z>=this._bufferService.rows||I<0)return;const L=this._document.createDocumentFragment();if(K){const B=$[0]>G[0];L.appendChild(this._createSelectionElement(Z,B?G[0]:$[0],B?$[0]:G[0],I-Z+1))}else{const B=V===Z?$[0]:0,H=Z===X?G[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(Z,B,H));const P=I-Z-1;if(L.appendChild(this._createSelectionElement(Z+1,0,this._bufferService.cols,P)),Z!==I){const ee=X===I?G[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(I,0,ee))}}this._selectionContainer.appendChild(L)}_createSelectionElement($,G,K,V=1){const X=this._document.createElement("div"),Z=G*this.dimensions.css.cell.width;let I=this.dimensions.css.cell.width*(K-G);return Z+I>this.dimensions.css.canvas.width&&(I=this.dimensions.css.canvas.width-Z),X.style.height=V*this.dimensions.css.cell.height+"px",X.style.top=$*this.dimensions.css.cell.height+"px",X.style.left=`${Z}px`,X.style.width=`${I}px`,X}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const $ of this._rowElements)$.replaceChildren()}renderRows($,G){const K=this._bufferService.buffer,V=K.ybase+K.y,X=Math.min(K.x,this._bufferService.cols-1),Z=this._optionsService.rawOptions.cursorBlink,I=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let B=$;B<=G;B++){const H=B+K.ydisp,P=this._rowElements[B],ee=K.lines.get(H);if(!P||!ee)break;P.replaceChildren(...this._rowFactory.createRow(ee,H,H===V,I,L,X,Z,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${N}${this._terminalClass}`}_handleLinkHover($){this._setCellUnderline($.x1,$.x2,$.y1,$.y2,$.cols,!0)}_handleLinkLeave($){this._setCellUnderline($.x1,$.x2,$.y1,$.y2,$.cols,!1)}_setCellUnderline($,G,K,V,X,Z){K<0&&($=0),V<0&&(G=0);const I=this._bufferService.rows-1;K=Math.max(Math.min(K,I),0),V=Math.max(Math.min(V,I),0),X=Math.min(X,this._bufferService.cols);const L=this._bufferService.buffer,B=L.ybase+L.y,H=Math.min(L.x,X-1),P=this._optionsService.rawOptions.cursorBlink,ee=this._optionsService.rawOptions.cursorStyle,ne=this._optionsService.rawOptions.cursorInactiveStyle;for(let Q=K;Q<=V;++Q){const W=Q+L.ydisp,q=this._rowElements[Q],J=L.lines.get(W);if(!q||!J)break;q.replaceChildren(...this._rowFactory.createRow(J,W,W===B,ee,ne,H,P,this.dimensions.css.cell.width,this._widthCache,Z?Q===K?$:0:-1,Z?(Q===V?G:X)-1:-1))}}};a.DomRenderer=U=f([p(7,E.IInstantiationService),p(8,_.ICharSizeService),p(9,E.IOptionsService),p(10,E.IBufferService),p(11,_.ICoreBrowserService),p(12,_.IThemeService)],U)},3787:function(d,a,u){var f=this&&this.__decorate||function(A,M,T,j){var O,F=arguments.length,U=F<3?M:j===null?j=Object.getOwnPropertyDescriptor(M,T):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(A,M,T,j);else for(var $=A.length-1;$>=0;$--)(O=A[$])&&(U=(F<3?O(U):F>3?O(M,T,U):O(M,T))||U);return F>3&&U&&Object.defineProperty(M,T,U),U},p=this&&this.__param||function(A,M){return function(T,j){M(T,j,A)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const h=u(2223),y=u(643),S=u(511),C=u(2585),w=u(8055),_=u(4725),v=u(4269),b=u(6171),x=u(3734);let E=a.DomRendererRowFactory=class{constructor(A,M,T,j,O,F,U){this._document=A,this._characterJoinerService=M,this._optionsService=T,this._coreBrowserService=j,this._coreService=O,this._decorationService=F,this._themeService=U,this._workCell=new S.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(A,M,T){this._selectionStart=A,this._selectionEnd=M,this._columnSelectMode=T}createRow(A,M,T,j,O,F,U,$,G,K,V){const X=[],Z=this._characterJoinerService.getJoinedCharacters(M),I=this._themeService.colors;let L,B=A.getNoBgTrimmedLength();T&&B<F+1&&(B=F+1);let H=0,P="",ee=0,ne=0,Q=0,W=!1,q=0,J=!1,ie=0;const ce=[],ae=K!==-1&&V!==-1;for(let _e=0;_e<B;_e++){A.loadCell(_e,this._workCell);let Ee=this._workCell.getWidth();if(Ee===0)continue;let Te=!1,Be=_e,se=this._workCell;if(Z.length>0&&_e===Z[0][0]){Te=!0;const Se=Z.shift();se=new v.JoinedCellData(this._workCell,A.translateToString(!0,Se[0],Se[1]),Se[1]-Se[0]),Be=Se[1]-1,Ee=se.getWidth()}const Ye=this._isCellInSelection(_e,M),rt=T&&_e===F,nt=ae&&_e>=K&&_e<=V;let Ge=!1;this._decorationService.forEachDecorationAtCell(_e,M,void 0,(Se=>{Ge=!0}));let gt=se.getChars()||y.WHITESPACE_CELL_CHAR;if(gt===" "&&(se.isUnderline()||se.isOverline())&&(gt=" "),ie=Ee*$-G.get(gt,se.isBold(),se.isItalic()),L){if(H&&(Ye&&J||!Ye&&!J&&se.bg===ee)&&(Ye&&J&&I.selectionForeground||se.fg===ne)&&se.extended.ext===Q&&nt===W&&ie===q&&!rt&&!Te&&!Ge){se.isInvisible()?P+=y.WHITESPACE_CELL_CHAR:P+=gt,H++;continue}H&&(L.textContent=P),L=this._document.createElement("span"),H=0,P=""}else L=this._document.createElement("span");if(ee=se.bg,ne=se.fg,Q=se.extended.ext,W=nt,q=ie,J=Ye,Te&&F>=_e&&F<=Be&&(F=_e),!this._coreService.isCursorHidden&&rt&&this._coreService.isCursorInitialized){if(ce.push("xterm-cursor"),this._coreBrowserService.isFocused)U&&ce.push("xterm-cursor-blink"),ce.push(j==="bar"?"xterm-cursor-bar":j==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(O)switch(O){case"outline":ce.push("xterm-cursor-outline");break;case"block":ce.push("xterm-cursor-block");break;case"bar":ce.push("xterm-cursor-bar");break;case"underline":ce.push("xterm-cursor-underline")}}if(se.isBold()&&ce.push("xterm-bold"),se.isItalic()&&ce.push("xterm-italic"),se.isDim()&&ce.push("xterm-dim"),P=se.isInvisible()?y.WHITESPACE_CELL_CHAR:se.getChars()||y.WHITESPACE_CELL_CHAR,se.isUnderline()&&(ce.push(`xterm-underline-${se.extended.underlineStyle}`),P===" "&&(P=" "),!se.isUnderlineColorDefault()))if(se.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${x.AttributeData.toColorRGB(se.getUnderlineColor()).join(",")})`;else{let Se=se.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&se.isBold()&&Se<8&&(Se+=8),L.style.textDecorationColor=I.ansi[Se].css}se.isOverline()&&(ce.push("xterm-overline"),P===" "&&(P=" ")),se.isStrikethrough()&&ce.push("xterm-strikethrough"),nt&&(L.style.textDecoration="underline");let it=se.getFgColor(),Je=se.getFgColorMode(),at=se.getBgColor(),fe=se.getBgColorMode();const ge=!!se.isInverse();if(ge){const Se=it;it=at,at=Se;const Ze=Je;Je=fe,fe=Ze}let Ae,Me,Le,st=!1;switch(this._decorationService.forEachDecorationAtCell(_e,M,void 0,(Se=>{Se.options.layer!=="top"&&st||(Se.backgroundColorRGB&&(fe=50331648,at=Se.backgroundColorRGB.rgba>>8&16777215,Ae=Se.backgroundColorRGB),Se.foregroundColorRGB&&(Je=50331648,it=Se.foregroundColorRGB.rgba>>8&16777215,Me=Se.foregroundColorRGB),st=Se.options.layer==="top")})),!st&&Ye&&(Ae=this._coreBrowserService.isFocused?I.selectionBackgroundOpaque:I.selectionInactiveBackgroundOpaque,at=Ae.rgba>>8&16777215,fe=50331648,st=!0,I.selectionForeground&&(Je=50331648,it=I.selectionForeground.rgba>>8&16777215,Me=I.selectionForeground)),st&&ce.push("xterm-decoration-top"),fe){case 16777216:case 33554432:Le=I.ansi[at],ce.push(`xterm-bg-${at}`);break;case 50331648:Le=w.channels.toColor(at>>16,at>>8&255,255&at),this._addStyle(L,`background-color:#${N((at>>>0).toString(16),"0",6)}`);break;default:ge?(Le=I.foreground,ce.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):Le=I.background}switch(Ae||se.isDim()&&(Ae=w.color.multiplyOpacity(Le,.5)),Je){case 16777216:case 33554432:se.isBold()&&it<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(it+=8),this._applyMinimumContrast(L,Le,I.ansi[it],se,Ae,void 0)||ce.push(`xterm-fg-${it}`);break;case 50331648:const Se=w.channels.toColor(it>>16&255,it>>8&255,255&it);this._applyMinimumContrast(L,Le,Se,se,Ae,Me)||this._addStyle(L,`color:#${N(it.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,Le,I.foreground,se,Ae,Me)||ge&&ce.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}ce.length&&(L.className=ce.join(" "),ce.length=0),rt||Te||Ge?L.textContent=P:H++,ie!==this.defaultSpacing&&(L.style.letterSpacing=`${ie}px`),X.push(L),_e=Be}return L&&H&&(L.textContent=P),X}_applyMinimumContrast(A,M,T,j,O,F){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,b.treatGlyphAsBackgroundColor)(j.getCode()))return!1;const U=this._getContrastCache(j);let $;if(O||F||($=U.getColor(M.rgba,T.rgba)),$===void 0){const G=this._optionsService.rawOptions.minimumContrastRatio/(j.isDim()?2:1);$=w.color.ensureContrastRatio(O||M,F||T,G),U.setColor((O||M).rgba,(F||T).rgba,$!=null?$:null)}return!!$&&(this._addStyle(A,`color:${$.css}`),!0)}_getContrastCache(A){return A.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(A,M){A.setAttribute("style",`${A.getAttribute("style")||""}${M};`)}_isCellInSelection(A,M){const T=this._selectionStart,j=this._selectionEnd;return!(!T||!j)&&(this._columnSelectMode?T[0]<=j[0]?A>=T[0]&&M>=T[1]&&A<j[0]&&M<=j[1]:A<T[0]&&M>=T[1]&&A>=j[0]&&M<=j[1]:M>T[1]&&M<j[1]||T[1]===j[1]&&M===T[1]&&A>=T[0]&&A<j[0]||T[1]<j[1]&&M===j[1]&&A<j[0]||T[1]<j[1]&&M===T[1]&&A>=T[0])}};function N(A,M,T){for(;A.length<T;)A=M+A;return A}a.DomRendererRowFactory=E=f([p(1,_.ICharacterJoinerService),p(2,C.IOptionsService),p(3,_.ICoreBrowserService),p(4,C.ICoreService),p(5,C.IDecorationService),p(6,_.IThemeService)],E)},2550:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(u,f){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const p=u.createElement("span");p.classList.add("xterm-char-measure-element");const h=u.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontWeight="bold";const y=u.createElement("span");y.classList.add("xterm-char-measure-element"),y.style.fontStyle="italic";const S=u.createElement("span");S.classList.add("xterm-char-measure-element"),S.style.fontWeight="bold",S.style.fontStyle="italic",this._measureElements=[p,h,y,S],this._container.appendChild(p),this._container.appendChild(h),this._container.appendChild(y),this._container.appendChild(S),f.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(u,f,p,h){u===this._font&&f===this._fontSize&&p===this._weight&&h===this._weightBold||(this._font=u,this._fontSize=f,this._weight=p,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${p}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${p}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(u,f,p){let h=0;if(!f&&!p&&u.length===1&&(h=u.charCodeAt(0))<256){if(this._flat[h]!==-9999)return this._flat[h];const C=this._measure(u,0);return C>0&&(this._flat[h]=C),C}let y=u;f&&(y+="B"),p&&(y+="I");let S=this._holey.get(y);if(S===void 0){let C=0;f&&(C|=1),p&&(C|=2),S=this._measure(u,C),S>0&&this._holey.set(y,S)}return S}_measure(u,f){const p=this._measureElements[f];return p.textContent=u.repeat(32),p.offsetWidth/32}}},2223:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const f=u(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},6171:(d,a)=>{function u(p){return 57508<=p&&p<=57558}function f(p){return p>=128512&&p<=128591||p>=127744&&p<=128511||p>=128640&&p<=128767||p>=9728&&p<=9983||p>=9984&&p<=10175||p>=65024&&p<=65039||p>=129280&&p<=129535||p>=127462&&p<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(p){if(!p)throw new Error("value must not be falsy");return p},a.isPowerlineGlyph=u,a.isRestrictedPowerlineGlyph=function(p){return 57520<=p&&p<=57527},a.isEmoji=f,a.allowRescaling=function(p,h,y,S){return h===1&&y>Math.ceil(1.5*S)&&p!==void 0&&p>255&&!f(p)&&!u(p)&&!(function(C){return 57344<=C&&C<=63743})(p)},a.treatGlyphAsBackgroundColor=function(p){return u(p)||(function(h){return 9472<=h&&h<=9631})(p)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(p,h,y=0){return(p-(2*Math.round(h)-y))%(2*Math.round(h))}},6052:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(p,h,y,S=!1){if(this.selectionStart=h,this.selectionEnd=y,!h||!y||h[0]===y[0]&&h[1]===y[1])return void this.clear();const C=p.buffers.active.ydisp,w=h[1]-C,_=y[1]-C,v=Math.max(w,0),b=Math.min(_,p.rows-1);v>=p.rows||b<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=S,this.viewportStartRow=w,this.viewportEndRow=_,this.viewportCappedStartRow=v,this.viewportCappedEndRow=b,this.startCol=h[0],this.endCol=y[0])}isCellSelected(p,h,y){return!!this.hasSelection&&(y-=p.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&y>=this.viewportCappedStartRow&&h<this.endCol&&y<=this.viewportCappedEndRow:h<this.startCol&&y>=this.viewportCappedStartRow&&h>=this.endCol&&y<=this.viewportCappedEndRow:y>this.viewportStartRow&&y<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&y===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&y===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&y===this.viewportStartRow&&h>=this.startCol)}}a.createSelectionRenderModel=function(){return new u}},456:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(u){this._bufferService=u,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,f=this.selectionEnd;return!(!u||!f)&&(u[1]>f[1]||u[1]===f[1]&&u[0]>f[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(d,a,u){var f=this&&this.__decorate||function(b,x,E,N){var A,M=arguments.length,T=M<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,E):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,x,E,N);else for(var j=b.length-1;j>=0;j--)(A=b[j])&&(T=(M<3?A(T):M>3?A(x,E,T):A(x,E))||T);return M>3&&T&&Object.defineProperty(x,E,T),T},p=this&&this.__param||function(b,x){return function(E,N){x(E,N,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const h=u(2585),y=u(8460),S=u(844);let C=a.CharSizeService=class extends S.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(b,x,E){super(),this._optionsService=E,this.width=0,this.height=0,this._onCharSizeChange=this.register(new y.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new v(this._optionsService))}catch{this._measureStrategy=this.register(new _(b,x,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const b=this._measureStrategy.measure();b.width===this.width&&b.height===this.height||(this.width=b.width,this.height=b.height,this._onCharSizeChange.fire())}};a.CharSizeService=C=f([p(2,h.IOptionsService)],C);class w extends S.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(x,E){x!==void 0&&x>0&&E!==void 0&&E>0&&(this._result.width=x,this._result.height=E)}}class _ extends w{constructor(x,E,N){super(),this._document=x,this._parentElement=E,this._optionsService=N,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class v extends w{constructor(x){super(),this._optionsService=x,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const E=this._ctx.measureText("W");if(!("width"in E&&"fontBoundingBoxAscent"in E&&"fontBoundingBoxDescent"in E))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const x=this._ctx.measureText("W");return this._validateAndSet(x.width,x.fontBoundingBoxAscent+x.fontBoundingBoxDescent),this._result}}},4269:function(d,a,u){var f=this&&this.__decorate||function(v,b,x,E){var N,A=arguments.length,M=A<3?b:E===null?E=Object.getOwnPropertyDescriptor(b,x):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(v,b,x,E);else for(var T=v.length-1;T>=0;T--)(N=v[T])&&(M=(A<3?N(M):A>3?N(b,x,M):N(b,x))||M);return A>3&&M&&Object.defineProperty(b,x,M),M},p=this&&this.__param||function(v,b){return function(x,E){b(x,E,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const h=u(3734),y=u(643),S=u(511),C=u(2585);class w extends h.AttributeData{constructor(b,x,E){super(),this.content=0,this.combinedData="",this.fg=b.fg,this.bg=b.bg,this.combinedData=x,this._width=E}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(b){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=w;let _=a.CharacterJoinerService=class MC{constructor(b){this._bufferService=b,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new S.CellData}register(b){const x={id:this._nextCharacterJoinerId++,handler:b};return this._characterJoiners.push(x),x.id}deregister(b){for(let x=0;x<this._characterJoiners.length;x++)if(this._characterJoiners[x].id===b)return this._characterJoiners.splice(x,1),!0;return!1}getJoinedCharacters(b){if(this._characterJoiners.length===0)return[];const x=this._bufferService.buffer.lines.get(b);if(!x||x.length===0)return[];const E=[],N=x.translateToString(!0);let A=0,M=0,T=0,j=x.getFg(0),O=x.getBg(0);for(let F=0;F<x.getTrimmedLength();F++)if(x.loadCell(F,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==j||this._workCell.bg!==O){if(F-A>1){const U=this._getJoinedRanges(N,T,M,x,A);for(let $=0;$<U.length;$++)E.push(U[$])}A=F,T=M,j=this._workCell.fg,O=this._workCell.bg}M+=this._workCell.getChars().length||y.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-A>1){const F=this._getJoinedRanges(N,T,M,x,A);for(let U=0;U<F.length;U++)E.push(F[U])}return E}_getJoinedRanges(b,x,E,N,A){const M=b.substring(x,E);let T=[];try{T=this._characterJoiners[0].handler(M)}catch(j){console.error(j)}for(let j=1;j<this._characterJoiners.length;j++)try{const O=this._characterJoiners[j].handler(M);for(let F=0;F<O.length;F++)MC._mergeRanges(T,O[F])}catch(O){console.error(O)}return this._stringRangesToCellRanges(T,N,A),T}_stringRangesToCellRanges(b,x,E){let N=0,A=!1,M=0,T=b[N];if(T){for(let j=E;j<this._bufferService.cols;j++){const O=x.getWidth(j),F=x.getString(j).length||y.WHITESPACE_CELL_CHAR.length;if(O!==0){if(!A&&T[0]<=M&&(T[0]=j,A=!0),T[1]<=M){if(T[1]=j,T=b[++N],!T)break;T[0]<=M?(T[0]=j,A=!0):A=!1}M+=F}}T&&(T[1]=this._bufferService.cols)}}static _mergeRanges(b,x){let E=!1;for(let N=0;N<b.length;N++){const A=b[N];if(E){if(x[1]<=A[0])return b[N-1][1]=x[1],b;if(x[1]<=A[1])return b[N-1][1]=Math.max(x[1],A[1]),b.splice(N,1),b;b.splice(N,1),N--}else{if(x[1]<=A[0])return b.splice(N,0,x),b;if(x[1]<=A[1])return A[0]=Math.min(x[0],A[0]),b;x[0]<A[1]&&(A[0]=Math.min(x[0],A[0]),E=!0)}}return E?b[b.length-1][1]=x[1]:b.push(x),b}};a.CharacterJoinerService=_=f([p(0,C.IBufferService)],_)},5114:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const f=u(844),p=u(8460),h=u(3656);class y extends f.Disposable{constructor(w,_,v){super(),this._textarea=w,this._window=_,this.mainDocument=v,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new S(this._window),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new p.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((b=>this._screenDprMonitor.setWindow(b)))),this.register((0,p.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(w){this._window!==w&&(this._window=w,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}a.CoreBrowserService=y;class S extends f.Disposable{constructor(w){super(),this._parentWindow=w,this._windowResizeListener=this.register(new f.MutableDisposable),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,f.toDisposable)((()=>this.clearListener())))}setWindow(w){this._parentWindow=w,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,h.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var w;this._outerListener&&((w=this._resolutionMediaMatchList)==null||w.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const f=u(844);class p extends f.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,f.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(y){return this.linkProviders.push(y),{dispose:()=>{const S=this.linkProviders.indexOf(y);S!==-1&&this.linkProviders.splice(S,1)}}}}a.LinkProviderService=p},8934:function(d,a,u){var f=this&&this.__decorate||function(C,w,_,v){var b,x=arguments.length,E=x<3?w:v===null?v=Object.getOwnPropertyDescriptor(w,_):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(C,w,_,v);else for(var N=C.length-1;N>=0;N--)(b=C[N])&&(E=(x<3?b(E):x>3?b(w,_,E):b(w,_))||E);return x>3&&E&&Object.defineProperty(w,_,E),E},p=this&&this.__param||function(C,w){return function(_,v){w(_,v,C)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const h=u(4725),y=u(9806);let S=a.MouseService=class{constructor(C,w){this._renderService=C,this._charSizeService=w}getCoords(C,w,_,v,b){return(0,y.getCoords)(window,C,w,_,v,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,b)}getMouseReportCoords(C,w){const _=(0,y.getCoordsRelativeToElement)(window,C,w);if(this._charSizeService.hasValidSize)return _[0]=Math.min(Math.max(_[0],0),this._renderService.dimensions.css.canvas.width-1),_[1]=Math.min(Math.max(_[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(_[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(_[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(_[0]),y:Math.floor(_[1])}}};a.MouseService=S=f([p(0,h.IRenderService),p(1,h.ICharSizeService)],S)},3230:function(d,a,u){var f=this&&this.__decorate||function(b,x,E,N){var A,M=arguments.length,T=M<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,E):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,x,E,N);else for(var j=b.length-1;j>=0;j--)(A=b[j])&&(T=(M<3?A(T):M>3?A(x,E,T):A(x,E))||T);return M>3&&T&&Object.defineProperty(x,E,T),T},p=this&&this.__param||function(b,x){return function(E,N){x(E,N,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const h=u(6193),y=u(4725),S=u(8460),C=u(844),w=u(7226),_=u(2585);let v=a.RenderService=class extends C.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(b,x,E,N,A,M,T,j){super(),this._rowCount=b,this._charSizeService=N,this._renderer=this.register(new C.MutableDisposable),this._pausedResizeTask=new w.DebouncedIdleTask,this._observerDisposable=this.register(new C.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new S.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new S.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new S.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new S.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new h.RenderDebouncer(((O,F)=>this._renderRows(O,F)),T),this.register(this._renderDebouncer),this.register(T.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(M.onResize((()=>this._fullRefresh()))),this.register(M.buffers.onBufferActivate((()=>{var O;return(O=this._renderer.value)==null?void 0:O.clear()}))),this.register(E.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(A.onDecorationRegistered((()=>this._fullRefresh()))),this.register(A.onDecorationRemoved((()=>this._fullRefresh()))),this.register(E.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(M.cols,M.rows),this._fullRefresh()}))),this.register(E.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(M.buffer.y,M.buffer.y,!0)))),this.register(j.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(T.window,x),this.register(T.onWindowChange((O=>this._registerIntersectionObserver(O,x))))}_registerIntersectionObserver(b,x){if("IntersectionObserver"in b){const E=new b.IntersectionObserver((N=>this._handleIntersectionChange(N[N.length-1])),{threshold:0});E.observe(x),this._observerDisposable.value=(0,C.toDisposable)((()=>E.disconnect()))}}_handleIntersectionChange(b){this._isPaused=b.isIntersecting===void 0?b.intersectionRatio===0:!b.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(b,x,E=!1){this._isPaused?this._needsFullRefresh=!0:(E||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(b,x,this._rowCount))}_renderRows(b,x){this._renderer.value&&(b=Math.min(b,this._rowCount-1),x=Math.min(x,this._rowCount-1),this._renderer.value.renderRows(b,x),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:b,end:x}),this._onRender.fire({start:b,end:x}),this._isNextRenderRedrawOnly=!0)}resize(b,x){this._rowCount=x,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(b){this._renderer.value=b,this._renderer.value&&(this._renderer.value.onRequestRedraw((x=>this.refreshRows(x.start,x.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(b){return this._renderDebouncer.addRefreshCallback(b)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var b,x;this._renderer.value&&((x=(b=this._renderer.value).clearTextureAtlas)==null||x.call(b),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(b,x){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var E;return(E=this._renderer.value)==null?void 0:E.handleResize(b,x)})):this._renderer.value.handleResize(b,x),this._fullRefresh())}handleCharSizeChanged(){var b;(b=this._renderer.value)==null||b.handleCharSizeChanged()}handleBlur(){var b;(b=this._renderer.value)==null||b.handleBlur()}handleFocus(){var b;(b=this._renderer.value)==null||b.handleFocus()}handleSelectionChanged(b,x,E){var N;this._selectionState.start=b,this._selectionState.end=x,this._selectionState.columnSelectMode=E,(N=this._renderer.value)==null||N.handleSelectionChanged(b,x,E)}handleCursorMove(){var b;(b=this._renderer.value)==null||b.handleCursorMove()}clear(){var b;(b=this._renderer.value)==null||b.clear()}};a.RenderService=v=f([p(2,_.IOptionsService),p(3,y.ICharSizeService),p(4,_.IDecorationService),p(5,_.IBufferService),p(6,y.ICoreBrowserService),p(7,y.IThemeService)],v)},9312:function(d,a,u){var f=this&&this.__decorate||function(T,j,O,F){var U,$=arguments.length,G=$<3?j:F===null?F=Object.getOwnPropertyDescriptor(j,O):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(T,j,O,F);else for(var K=T.length-1;K>=0;K--)(U=T[K])&&(G=($<3?U(G):$>3?U(j,O,G):U(j,O))||G);return $>3&&G&&Object.defineProperty(j,O,G),G},p=this&&this.__param||function(T,j){return function(O,F){j(O,F,T)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const h=u(9806),y=u(9504),S=u(456),C=u(4725),w=u(8460),_=u(844),v=u(6114),b=u(4841),x=u(511),E=u(2585),N=" ",A=new RegExp(N,"g");let M=a.SelectionService=class extends _.Disposable{constructor(T,j,O,F,U,$,G,K,V){super(),this._element=T,this._screenElement=j,this._linkifier=O,this._bufferService=F,this._coreService=U,this._mouseService=$,this._optionsService=G,this._renderService=K,this._coreBrowserService=V,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new x.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new w.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new w.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new w.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new w.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=X=>this._handleMouseMove(X),this._mouseUpListener=X=>this._handleMouseUp(X),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((X=>this._handleTrim(X))),this.register(this._bufferService.buffers.onBufferActivate((X=>this._handleBufferActivate(X)))),this.enable(),this._model=new S.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,_.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const T=this._model.finalSelectionStart,j=this._model.finalSelectionEnd;return!(!T||!j||T[0]===j[0]&&T[1]===j[1])}get selectionText(){const T=this._model.finalSelectionStart,j=this._model.finalSelectionEnd;if(!T||!j)return"";const O=this._bufferService.buffer,F=[];if(this._activeSelectionMode===3){if(T[0]===j[0])return"";const U=T[0]<j[0]?T[0]:j[0],$=T[0]<j[0]?j[0]:T[0];for(let G=T[1];G<=j[1];G++){const K=O.translateBufferLineToString(G,!0,U,$);F.push(K)}}else{const U=T[1]===j[1]?j[0]:void 0;F.push(O.translateBufferLineToString(T[1],!0,T[0],U));for(let $=T[1]+1;$<=j[1]-1;$++){const G=O.lines.get($),K=O.translateBufferLineToString($,!0);G!=null&&G.isWrapped?F[F.length-1]+=K:F.push(K)}if(T[1]!==j[1]){const $=O.lines.get(j[1]),G=O.translateBufferLineToString(j[1],!0,0,j[0]);$&&$.isWrapped?F[F.length-1]+=G:F.push(G)}}return F.map((U=>U.replace(A," "))).join(v.isWindows?`\r
491
+ `:`
492
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(T){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),v.isLinux&&T&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(T){const j=this._getMouseBufferCoords(T),O=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!!(O&&F&&j)&&this._areCoordsInSelection(j,O,F)}isCellInSelection(T,j){const O=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!(!O||!F)&&this._areCoordsInSelection([T,j],O,F)}_areCoordsInSelection(T,j,O){return T[1]>j[1]&&T[1]<O[1]||j[1]===O[1]&&T[1]===j[1]&&T[0]>=j[0]&&T[0]<O[0]||j[1]<O[1]&&T[1]===O[1]&&T[0]<O[0]||j[1]<O[1]&&T[1]===j[1]&&T[0]>=j[0]}_selectWordAtCursor(T,j){var U,$;const O=($=(U=this._linkifier.currentLink)==null?void 0:U.link)==null?void 0:$.range;if(O)return this._model.selectionStart=[O.start.x-1,O.start.y-1],this._model.selectionStartLength=(0,b.getRangeLength)(O,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const F=this._getMouseBufferCoords(T);return!!F&&(this._selectWordAt(F,j),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(T,j){this._model.clearSelection(),T=Math.max(T,0),j=Math.min(j,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,T],this._model.selectionEnd=[this._bufferService.cols,j],this.refresh(),this._onSelectionChange.fire()}_handleTrim(T){this._model.handleTrim(T)&&this.refresh()}_getMouseBufferCoords(T){const j=this._mouseService.getCoords(T,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(j)return j[0]--,j[1]--,j[1]+=this._bufferService.buffer.ydisp,j}_getMouseEventScrollAmount(T){let j=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,T,this._screenElement)[1];const O=this._renderService.dimensions.css.canvas.height;return j>=0&&j<=O?0:(j>O&&(j-=O),j=Math.min(Math.max(j,-50),50),j/=50,j/Math.abs(j)+Math.round(14*j))}shouldForceSelection(T){return v.isMac?T.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:T.shiftKey}handleMouseDown(T){if(this._mouseDownTimeStamp=T.timeStamp,(T.button!==2||!this.hasSelection)&&T.button===0){if(!this._enabled){if(!this.shouldForceSelection(T))return;T.stopPropagation()}T.preventDefault(),this._dragScrollAmount=0,this._enabled&&T.shiftKey?this._handleIncrementalClick(T):T.detail===1?this._handleSingleClick(T):T.detail===2?this._handleDoubleClick(T):T.detail===3&&this._handleTripleClick(T),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(T){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(T))}_handleSingleClick(T){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(T)?3:0,this._model.selectionStart=this._getMouseBufferCoords(T),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const j=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);j&&j.length!==this._model.selectionStart[0]&&j.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(T){this._selectWordAtCursor(T,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(T){const j=this._getMouseBufferCoords(T);j&&(this._activeSelectionMode=2,this._selectLineAt(j[1]))}shouldColumnSelect(T){return T.altKey&&!(v.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(T){if(T.stopImmediatePropagation(),!this._model.selectionStart)return;const j=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(T),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(T),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const O=this._bufferService.buffer;if(this._model.selectionEnd[1]<O.lines.length){const F=O.lines.get(this._model.selectionEnd[1]);F&&F.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}j&&j[0]===this._model.selectionEnd[0]&&j[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const T=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(T.ydisp+this._bufferService.rows,T.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=T.ydisp),this.refresh()}}_handleMouseUp(T){const j=T.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&j<500&&T.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const O=this._mouseService.getCoords(T,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(O&&O[0]!==void 0&&O[1]!==void 0){const F=(0,y.moveToCellSequence)(O[0]-1,O[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(F,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const T=this._model.finalSelectionStart,j=this._model.finalSelectionEnd,O=!(!T||!j||T[0]===j[0]&&T[1]===j[1]);O?T&&j&&(this._oldSelectionStart&&this._oldSelectionEnd&&T[0]===this._oldSelectionStart[0]&&T[1]===this._oldSelectionStart[1]&&j[0]===this._oldSelectionEnd[0]&&j[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(T,j,O)):this._oldHasSelection&&this._fireOnSelectionChange(T,j,O)}_fireOnSelectionChange(T,j,O){this._oldSelectionStart=T,this._oldSelectionEnd=j,this._oldHasSelection=O,this._onSelectionChange.fire()}_handleBufferActivate(T){this.clearSelection(),this._trimListener.dispose(),this._trimListener=T.activeBuffer.lines.onTrim((j=>this._handleTrim(j)))}_convertViewportColToCharacterIndex(T,j){let O=j;for(let F=0;j>=F;F++){const U=T.loadCell(F,this._workCell).getChars().length;this._workCell.getWidth()===0?O--:U>1&&j!==F&&(O+=U-1)}return O}setSelection(T,j,O){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[T,j],this._model.selectionStartLength=O,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(T){this._isClickInSelection(T)||(this._selectWordAtCursor(T,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(T,j,O=!0,F=!0){if(T[0]>=this._bufferService.cols)return;const U=this._bufferService.buffer,$=U.lines.get(T[1]);if(!$)return;const G=U.translateBufferLineToString(T[1],!1);let K=this._convertViewportColToCharacterIndex($,T[0]),V=K;const X=T[0]-K;let Z=0,I=0,L=0,B=0;if(G.charAt(K)===" "){for(;K>0&&G.charAt(K-1)===" ";)K--;for(;V<G.length&&G.charAt(V+1)===" ";)V++}else{let ee=T[0],ne=T[0];$.getWidth(ee)===0&&(Z++,ee--),$.getWidth(ne)===2&&(I++,ne++);const Q=$.getString(ne).length;for(Q>1&&(B+=Q-1,V+=Q-1);ee>0&&K>0&&!this._isCharWordSeparator($.loadCell(ee-1,this._workCell));){$.loadCell(ee-1,this._workCell);const W=this._workCell.getChars().length;this._workCell.getWidth()===0?(Z++,ee--):W>1&&(L+=W-1,K-=W-1),K--,ee--}for(;ne<$.length&&V+1<G.length&&!this._isCharWordSeparator($.loadCell(ne+1,this._workCell));){$.loadCell(ne+1,this._workCell);const W=this._workCell.getChars().length;this._workCell.getWidth()===2?(I++,ne++):W>1&&(B+=W-1,V+=W-1),V++,ne++}}V++;let H=K+X-Z+L,P=Math.min(this._bufferService.cols,V-K+Z+I-L-B);if(j||G.slice(K,V).trim()!==""){if(O&&H===0&&$.getCodePoint(0)!==32){const ee=U.lines.get(T[1]-1);if(ee&&$.isWrapped&&ee.getCodePoint(this._bufferService.cols-1)!==32){const ne=this._getWordAt([this._bufferService.cols-1,T[1]-1],!1,!0,!1);if(ne){const Q=this._bufferService.cols-ne.start;H-=Q,P+=Q}}}if(F&&H+P===this._bufferService.cols&&$.getCodePoint(this._bufferService.cols-1)!==32){const ee=U.lines.get(T[1]+1);if(ee!=null&&ee.isWrapped&&ee.getCodePoint(0)!==32){const ne=this._getWordAt([0,T[1]+1],!1,!1,!0);ne&&(P+=ne.length)}}return{start:H,length:P}}}_selectWordAt(T,j){const O=this._getWordAt(T,j);if(O){for(;O.start<0;)O.start+=this._bufferService.cols,T[1]--;this._model.selectionStart=[O.start,T[1]],this._model.selectionStartLength=O.length}}_selectToWordAt(T){const j=this._getWordAt(T,!0);if(j){let O=T[1];for(;j.start<0;)j.start+=this._bufferService.cols,O--;if(!this._model.areSelectionValuesReversed())for(;j.start+j.length>this._bufferService.cols;)j.length-=this._bufferService.cols,O++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?j.start:j.start+j.length,O]}}_isCharWordSeparator(T){return T.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(T.getChars())>=0}_selectLineAt(T){const j=this._bufferService.buffer.getWrappedRangeForLine(T),O={start:{x:0,y:j.first},end:{x:this._bufferService.cols-1,y:j.last}};this._model.selectionStart=[0,j.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,b.getRangeLength)(O,this._bufferService.cols)}};a.SelectionService=M=f([p(3,E.IBufferService),p(4,E.ICoreService),p(5,C.IMouseService),p(6,E.IOptionsService),p(7,C.IRenderService),p(8,C.ICoreBrowserService)],M)},4725:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const f=u(8343);a.ICharSizeService=(0,f.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,f.createDecorator)("CoreBrowserService"),a.IMouseService=(0,f.createDecorator)("MouseService"),a.IRenderService=(0,f.createDecorator)("RenderService"),a.ISelectionService=(0,f.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,f.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,f.createDecorator)("ThemeService"),a.ILinkProviderService=(0,f.createDecorator)("LinkProviderService")},6731:function(d,a,u){var f=this&&this.__decorate||function(M,T,j,O){var F,U=arguments.length,$=U<3?T:O===null?O=Object.getOwnPropertyDescriptor(T,j):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(M,T,j,O);else for(var G=M.length-1;G>=0;G--)(F=M[G])&&($=(U<3?F($):U>3?F(T,j,$):F(T,j))||$);return U>3&&$&&Object.defineProperty(T,j,$),$},p=this&&this.__param||function(M,T){return function(j,O){T(j,O,M)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const h=u(7239),y=u(8055),S=u(8460),C=u(844),w=u(2585),_=y.css.toColor("#ffffff"),v=y.css.toColor("#000000"),b=y.css.toColor("#ffffff"),x=y.css.toColor("#000000"),E={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const M=[y.css.toColor("#2e3436"),y.css.toColor("#cc0000"),y.css.toColor("#4e9a06"),y.css.toColor("#c4a000"),y.css.toColor("#3465a4"),y.css.toColor("#75507b"),y.css.toColor("#06989a"),y.css.toColor("#d3d7cf"),y.css.toColor("#555753"),y.css.toColor("#ef2929"),y.css.toColor("#8ae234"),y.css.toColor("#fce94f"),y.css.toColor("#729fcf"),y.css.toColor("#ad7fa8"),y.css.toColor("#34e2e2"),y.css.toColor("#eeeeec")],T=[0,95,135,175,215,255];for(let j=0;j<216;j++){const O=T[j/36%6|0],F=T[j/6%6|0],U=T[j%6];M.push({css:y.channels.toCss(O,F,U),rgba:y.channels.toRgba(O,F,U)})}for(let j=0;j<24;j++){const O=8+10*j;M.push({css:y.channels.toCss(O,O,O),rgba:y.channels.toRgba(O,O,O)})}return M})());let N=a.ThemeService=class extends C.Disposable{get colors(){return this._colors}constructor(M){super(),this._optionsService=M,this._contrastCache=new h.ColorContrastCache,this._halfContrastCache=new h.ColorContrastCache,this._onChangeColors=this.register(new S.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:_,background:v,cursor:b,cursorAccent:x,selectionForeground:void 0,selectionBackgroundTransparent:E,selectionBackgroundOpaque:y.color.blend(v,E),selectionInactiveBackgroundTransparent:E,selectionInactiveBackgroundOpaque:y.color.blend(v,E),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(M={}){const T=this._colors;if(T.foreground=A(M.foreground,_),T.background=A(M.background,v),T.cursor=A(M.cursor,b),T.cursorAccent=A(M.cursorAccent,x),T.selectionBackgroundTransparent=A(M.selectionBackground,E),T.selectionBackgroundOpaque=y.color.blend(T.background,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundTransparent=A(M.selectionInactiveBackground,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundOpaque=y.color.blend(T.background,T.selectionInactiveBackgroundTransparent),T.selectionForeground=M.selectionForeground?A(M.selectionForeground,y.NULL_COLOR):void 0,T.selectionForeground===y.NULL_COLOR&&(T.selectionForeground=void 0),y.color.isOpaque(T.selectionBackgroundTransparent)&&(T.selectionBackgroundTransparent=y.color.opacity(T.selectionBackgroundTransparent,.3)),y.color.isOpaque(T.selectionInactiveBackgroundTransparent)&&(T.selectionInactiveBackgroundTransparent=y.color.opacity(T.selectionInactiveBackgroundTransparent,.3)),T.ansi=a.DEFAULT_ANSI_COLORS.slice(),T.ansi[0]=A(M.black,a.DEFAULT_ANSI_COLORS[0]),T.ansi[1]=A(M.red,a.DEFAULT_ANSI_COLORS[1]),T.ansi[2]=A(M.green,a.DEFAULT_ANSI_COLORS[2]),T.ansi[3]=A(M.yellow,a.DEFAULT_ANSI_COLORS[3]),T.ansi[4]=A(M.blue,a.DEFAULT_ANSI_COLORS[4]),T.ansi[5]=A(M.magenta,a.DEFAULT_ANSI_COLORS[5]),T.ansi[6]=A(M.cyan,a.DEFAULT_ANSI_COLORS[6]),T.ansi[7]=A(M.white,a.DEFAULT_ANSI_COLORS[7]),T.ansi[8]=A(M.brightBlack,a.DEFAULT_ANSI_COLORS[8]),T.ansi[9]=A(M.brightRed,a.DEFAULT_ANSI_COLORS[9]),T.ansi[10]=A(M.brightGreen,a.DEFAULT_ANSI_COLORS[10]),T.ansi[11]=A(M.brightYellow,a.DEFAULT_ANSI_COLORS[11]),T.ansi[12]=A(M.brightBlue,a.DEFAULT_ANSI_COLORS[12]),T.ansi[13]=A(M.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),T.ansi[14]=A(M.brightCyan,a.DEFAULT_ANSI_COLORS[14]),T.ansi[15]=A(M.brightWhite,a.DEFAULT_ANSI_COLORS[15]),M.extendedAnsi){const j=Math.min(T.ansi.length-16,M.extendedAnsi.length);for(let O=0;O<j;O++)T.ansi[O+16]=A(M.extendedAnsi[O],a.DEFAULT_ANSI_COLORS[O+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(M){this._restoreColor(M),this._onChangeColors.fire(this.colors)}_restoreColor(M){if(M!==void 0)switch(M){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[M]=this._restoreColors.ansi[M]}else for(let T=0;T<this._restoreColors.ansi.length;++T)this._colors.ansi[T]=this._restoreColors.ansi[T]}modifyColors(M){M(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function A(M,T){if(M!==void 0)try{return y.css.toColor(M)}catch{}return T}a.ThemeService=N=f([p(0,w.IOptionsService)],N)},6349:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const f=u(8460),p=u(844);class h extends p.Disposable{constructor(S){super(),this._maxLength=S,this.onDeleteEmitter=this.register(new f.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new f.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new f.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(S){if(this._maxLength===S)return;const C=new Array(S);for(let w=0;w<Math.min(S,this.length);w++)C[w]=this._array[this._getCyclicIndex(w)];this._array=C,this._maxLength=S,this._startIndex=0}get length(){return this._length}set length(S){if(S>this._length)for(let C=this._length;C<S;C++)this._array[C]=void 0;this._length=S}get(S){return this._array[this._getCyclicIndex(S)]}set(S,C){this._array[this._getCyclicIndex(S)]=C}push(S){this._array[this._getCyclicIndex(this._length)]=S,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(S,C,...w){if(C){for(let _=S;_<this._length-C;_++)this._array[this._getCyclicIndex(_)]=this._array[this._getCyclicIndex(_+C)];this._length-=C,this.onDeleteEmitter.fire({index:S,amount:C})}for(let _=this._length-1;_>=S;_--)this._array[this._getCyclicIndex(_+w.length)]=this._array[this._getCyclicIndex(_)];for(let _=0;_<w.length;_++)this._array[this._getCyclicIndex(S+_)]=w[_];if(w.length&&this.onInsertEmitter.fire({index:S,amount:w.length}),this._length+w.length>this._maxLength){const _=this._length+w.length-this._maxLength;this._startIndex+=_,this._length=this._maxLength,this.onTrimEmitter.fire(_)}else this._length+=w.length}trimStart(S){S>this._length&&(S=this._length),this._startIndex+=S,this._length-=S,this.onTrimEmitter.fire(S)}shiftElements(S,C,w){if(!(C<=0)){if(S<0||S>=this._length)throw new Error("start argument out of range");if(S+w<0)throw new Error("Cannot shift elements in list beyond index 0");if(w>0){for(let v=C-1;v>=0;v--)this.set(S+v+w,this.get(S+v));const _=S+C+w-this._length;if(_>0)for(this._length+=_;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let _=0;_<C;_++)this.set(S+_+w,this.get(S+_))}}_getCyclicIndex(S){return(this._startIndex+S)%this._maxLength}}a.CircularList=h},1439:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function u(f,p=5){if(typeof f!="object")return f;const h=Array.isArray(f)?[]:{};for(const y in f)h[y]=p<=1?f[y]:f[y]&&u(f[y],p-1);return h}},8055:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let u=0,f=0,p=0,h=0;var y,S,C,w,_;function v(x){const E=x.toString(16);return E.length<2?"0"+E:E}function b(x,E){return x<E?(E+.05)/(x+.05):(x+.05)/(E+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(x){x.toCss=function(E,N,A,M){return M!==void 0?`#${v(E)}${v(N)}${v(A)}${v(M)}`:`#${v(E)}${v(N)}${v(A)}`},x.toRgba=function(E,N,A,M=255){return(E<<24|N<<16|A<<8|M)>>>0},x.toColor=function(E,N,A,M){return{css:x.toCss(E,N,A,M),rgba:x.toRgba(E,N,A,M)}}})(y||(a.channels=y={})),(function(x){function E(N,A){return h=Math.round(255*A),[u,f,p]=_.toChannels(N.rgba),{css:y.toCss(u,f,p,h),rgba:y.toRgba(u,f,p,h)}}x.blend=function(N,A){if(h=(255&A.rgba)/255,h===1)return{css:A.css,rgba:A.rgba};const M=A.rgba>>24&255,T=A.rgba>>16&255,j=A.rgba>>8&255,O=N.rgba>>24&255,F=N.rgba>>16&255,U=N.rgba>>8&255;return u=O+Math.round((M-O)*h),f=F+Math.round((T-F)*h),p=U+Math.round((j-U)*h),{css:y.toCss(u,f,p),rgba:y.toRgba(u,f,p)}},x.isOpaque=function(N){return(255&N.rgba)==255},x.ensureContrastRatio=function(N,A,M){const T=_.ensureContrastRatio(N.rgba,A.rgba,M);if(T)return y.toColor(T>>24&255,T>>16&255,T>>8&255)},x.opaque=function(N){const A=(255|N.rgba)>>>0;return[u,f,p]=_.toChannels(A),{css:y.toCss(u,f,p),rgba:A}},x.opacity=E,x.multiplyOpacity=function(N,A){return h=255&N.rgba,E(N,h*A/255)},x.toColorRGB=function(N){return[N.rgba>>24&255,N.rgba>>16&255,N.rgba>>8&255]}})(S||(a.color=S={})),(function(x){let E,N;try{const A=document.createElement("canvas");A.width=1,A.height=1;const M=A.getContext("2d",{willReadFrequently:!0});M&&(E=M,E.globalCompositeOperation="copy",N=E.createLinearGradient(0,0,1,1))}catch{}x.toColor=function(A){if(A.match(/#[\da-f]{3,8}/i))switch(A.length){case 4:return u=parseInt(A.slice(1,2).repeat(2),16),f=parseInt(A.slice(2,3).repeat(2),16),p=parseInt(A.slice(3,4).repeat(2),16),y.toColor(u,f,p);case 5:return u=parseInt(A.slice(1,2).repeat(2),16),f=parseInt(A.slice(2,3).repeat(2),16),p=parseInt(A.slice(3,4).repeat(2),16),h=parseInt(A.slice(4,5).repeat(2),16),y.toColor(u,f,p,h);case 7:return{css:A,rgba:(parseInt(A.slice(1),16)<<8|255)>>>0};case 9:return{css:A,rgba:parseInt(A.slice(1),16)>>>0}}const M=A.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(M)return u=parseInt(M[1]),f=parseInt(M[2]),p=parseInt(M[3]),h=Math.round(255*(M[5]===void 0?1:parseFloat(M[5]))),y.toColor(u,f,p,h);if(!E||!N)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=N,E.fillStyle=A,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[u,f,p,h]=E.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:y.toRgba(u,f,p,h),css:A}}})(C||(a.css=C={})),(function(x){function E(N,A,M){const T=N/255,j=A/255,O=M/255;return .2126*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))+.7152*(j<=.03928?j/12.92:Math.pow((j+.055)/1.055,2.4))+.0722*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))}x.relativeLuminance=function(N){return E(N>>16&255,N>>8&255,255&N)},x.relativeLuminance2=E})(w||(a.rgb=w={})),(function(x){function E(A,M,T){const j=A>>24&255,O=A>>16&255,F=A>>8&255;let U=M>>24&255,$=M>>16&255,G=M>>8&255,K=b(w.relativeLuminance2(U,$,G),w.relativeLuminance2(j,O,F));for(;K<T&&(U>0||$>0||G>0);)U-=Math.max(0,Math.ceil(.1*U)),$-=Math.max(0,Math.ceil(.1*$)),G-=Math.max(0,Math.ceil(.1*G)),K=b(w.relativeLuminance2(U,$,G),w.relativeLuminance2(j,O,F));return(U<<24|$<<16|G<<8|255)>>>0}function N(A,M,T){const j=A>>24&255,O=A>>16&255,F=A>>8&255;let U=M>>24&255,$=M>>16&255,G=M>>8&255,K=b(w.relativeLuminance2(U,$,G),w.relativeLuminance2(j,O,F));for(;K<T&&(U<255||$<255||G<255);)U=Math.min(255,U+Math.ceil(.1*(255-U))),$=Math.min(255,$+Math.ceil(.1*(255-$))),G=Math.min(255,G+Math.ceil(.1*(255-G))),K=b(w.relativeLuminance2(U,$,G),w.relativeLuminance2(j,O,F));return(U<<24|$<<16|G<<8|255)>>>0}x.blend=function(A,M){if(h=(255&M)/255,h===1)return M;const T=M>>24&255,j=M>>16&255,O=M>>8&255,F=A>>24&255,U=A>>16&255,$=A>>8&255;return u=F+Math.round((T-F)*h),f=U+Math.round((j-U)*h),p=$+Math.round((O-$)*h),y.toRgba(u,f,p)},x.ensureContrastRatio=function(A,M,T){const j=w.relativeLuminance(A>>8),O=w.relativeLuminance(M>>8);if(b(j,O)<T){if(O<j){const $=E(A,M,T),G=b(j,w.relativeLuminance($>>8));if(G<T){const K=N(A,M,T);return G>b(j,w.relativeLuminance(K>>8))?$:K}return $}const F=N(A,M,T),U=b(j,w.relativeLuminance(F>>8));if(U<T){const $=E(A,M,T);return U>b(j,w.relativeLuminance($>>8))?F:$}return F}},x.reduceLuminance=E,x.increaseLuminance=N,x.toChannels=function(A){return[A>>24&255,A>>16&255,A>>8&255,255&A]}})(_||(a.rgba=_={})),a.toPaddedHex=v,a.contrastRatio=b},8969:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const f=u(844),p=u(2585),h=u(4348),y=u(7866),S=u(744),C=u(7302),w=u(6975),_=u(8460),v=u(1753),b=u(1480),x=u(7994),E=u(9282),N=u(5435),A=u(5981),M=u(2660);let T=!1;class j extends f.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new _.EventEmitter),this._onScroll.event((F=>{var U;(U=this._onScrollApi)==null||U.fire(F.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(F){for(const U in F)this.optionsService.options[U]=F[U]}constructor(F){super(),this._windowsWrappingHeuristics=this.register(new f.MutableDisposable),this._onBinary=this.register(new _.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new _.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new _.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new _.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new _.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new _.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new C.OptionsService(F)),this._instantiationService.setService(p.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(S.BufferService)),this._instantiationService.setService(p.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(y.LogService)),this._instantiationService.setService(p.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(w.CoreService)),this._instantiationService.setService(p.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(v.CoreMouseService)),this._instantiationService.setService(p.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(b.UnicodeService)),this._instantiationService.setService(p.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(x.CharsetService),this._instantiationService.setService(p.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(M.OscLinkService),this._instantiationService.setService(p.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new N.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,_.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,_.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,_.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,_.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((U=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((U=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new A.WriteBuffer(((U,$)=>this._inputHandler.parse(U,$)))),this.register((0,_.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(F,U){this._writeBuffer.write(F,U)}writeSync(F,U){this._logService.logLevel<=p.LogLevelEnum.WARN&&!T&&(this._logService.warn("writeSync is unreliable and will be removed soon."),T=!0),this._writeBuffer.writeSync(F,U)}input(F,U=!0){this.coreService.triggerDataEvent(F,U)}resize(F,U){isNaN(F)||isNaN(U)||(F=Math.max(F,S.MINIMUM_COLS),U=Math.max(U,S.MINIMUM_ROWS),this._bufferService.resize(F,U))}scroll(F,U=!1){this._bufferService.scroll(F,U)}scrollLines(F,U,$){this._bufferService.scrollLines(F,U,$)}scrollPages(F){this.scrollLines(F*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(F){const U=F-this._bufferService.buffer.ydisp;U!==0&&this.scrollLines(U)}registerEscHandler(F,U){return this._inputHandler.registerEscHandler(F,U)}registerDcsHandler(F,U){return this._inputHandler.registerDcsHandler(F,U)}registerCsiHandler(F,U){return this._inputHandler.registerCsiHandler(F,U)}registerOscHandler(F,U){return this._inputHandler.registerOscHandler(F,U)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let F=!1;const U=this.optionsService.rawOptions.windowsPty;U&&U.buildNumber!==void 0&&U.buildNumber!==void 0?F=U.backend==="conpty"&&U.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(F=!0),F?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const F=[];F.push(this.onLineFeed(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),F.push(this.registerCsiHandler({final:"H"},(()=>((0,E.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,f.toDisposable)((()=>{for(const U of F)U.dispose()}))}}}a.CoreTerminal=j},8460:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===u)return void this._listeners.splice(f,1)}}})),this._event}fire(u,f){const p=[];for(let h=0;h<this._listeners.length;h++)p.push(this._listeners[h]);for(let h=0;h<p.length;h++)p[h].call(void 0,u,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(u,f){return u((p=>f.fire(p)))},a.runAndSubscribe=function(u,f){return f(void 0),u((p=>f(p)))}},5435:function(d,a,u){var f=this&&this.__decorate||function(Z,I,L,B){var H,P=arguments.length,ee=P<3?I:B===null?B=Object.getOwnPropertyDescriptor(I,L):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate(Z,I,L,B);else for(var ne=Z.length-1;ne>=0;ne--)(H=Z[ne])&&(ee=(P<3?H(ee):P>3?H(I,L,ee):H(I,L))||ee);return P>3&&ee&&Object.defineProperty(I,L,ee),ee},p=this&&this.__param||function(Z,I){return function(L,B){I(L,B,Z)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const h=u(2584),y=u(7116),S=u(2015),C=u(844),w=u(482),_=u(8437),v=u(8460),b=u(643),x=u(511),E=u(3734),N=u(2585),A=u(1480),M=u(6242),T=u(6351),j=u(5941),O={"(":0,")":1,"*":2,"+":3,"-":1,".":2},F=131072;function U(Z,I){if(Z>24)return I.setWinLines||!1;switch(Z){case 1:return!!I.restoreWin;case 2:return!!I.minimizeWin;case 3:return!!I.setWinPosition;case 4:return!!I.setWinSizePixels;case 5:return!!I.raiseWin;case 6:return!!I.lowerWin;case 7:return!!I.refreshWin;case 8:return!!I.setWinSizeChars;case 9:return!!I.maximizeWin;case 10:return!!I.fullscreenWin;case 11:return!!I.getWinState;case 13:return!!I.getWinPosition;case 14:return!!I.getWinSizePixels;case 15:return!!I.getScreenSizePixels;case 16:return!!I.getCellSizePixels;case 18:return!!I.getWinSizeChars;case 19:return!!I.getScreenSizeChars;case 20:return!!I.getIconTitle;case 21:return!!I.getWinTitle;case 22:return!!I.pushTitle;case 23:return!!I.popTitle;case 24:return!!I.setWinLines}return!1}var $;(function(Z){Z[Z.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",Z[Z.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})($||(a.WindowsOptionsReportType=$={}));let G=0;class K extends C.Disposable{getAttrData(){return this._curAttrData}constructor(I,L,B,H,P,ee,ne,Q,W=new S.EscapeSequenceParser){super(),this._bufferService=I,this._charsetService=L,this._coreService=B,this._logService=H,this._optionsService=P,this._oscLinkService=ee,this._coreMouseService=ne,this._unicodeService=Q,this._parser=W,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new w.StringToUtf32,this._utf8Decoder=new w.Utf8ToUtf32,this._workCell=new x.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=_.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=_.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new v.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new v.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new v.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new v.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new v.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new v.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new v.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new v.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new v.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new v.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new v.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new v.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new V(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((q=>this._activeBuffer=q.activeBuffer))),this._parser.setCsiHandlerFallback(((q,J)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(q),params:J.toArray()})})),this._parser.setEscHandlerFallback((q=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(q)})})),this._parser.setExecuteHandlerFallback((q=>{this._logService.debug("Unknown EXECUTE code: ",{code:q})})),this._parser.setOscHandlerFallback(((q,J,ie)=>{this._logService.debug("Unknown OSC code: ",{identifier:q,action:J,data:ie})})),this._parser.setDcsHandlerFallback(((q,J,ie)=>{J==="HOOK"&&(ie=ie.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(q),action:J,payload:ie})})),this._parser.setPrintHandler(((q,J,ie)=>this.print(q,J,ie))),this._parser.registerCsiHandler({final:"@"},(q=>this.insertChars(q))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(q=>this.scrollLeft(q))),this._parser.registerCsiHandler({final:"A"},(q=>this.cursorUp(q))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(q=>this.scrollRight(q))),this._parser.registerCsiHandler({final:"B"},(q=>this.cursorDown(q))),this._parser.registerCsiHandler({final:"C"},(q=>this.cursorForward(q))),this._parser.registerCsiHandler({final:"D"},(q=>this.cursorBackward(q))),this._parser.registerCsiHandler({final:"E"},(q=>this.cursorNextLine(q))),this._parser.registerCsiHandler({final:"F"},(q=>this.cursorPrecedingLine(q))),this._parser.registerCsiHandler({final:"G"},(q=>this.cursorCharAbsolute(q))),this._parser.registerCsiHandler({final:"H"},(q=>this.cursorPosition(q))),this._parser.registerCsiHandler({final:"I"},(q=>this.cursorForwardTab(q))),this._parser.registerCsiHandler({final:"J"},(q=>this.eraseInDisplay(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(q=>this.eraseInDisplay(q,!0))),this._parser.registerCsiHandler({final:"K"},(q=>this.eraseInLine(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(q=>this.eraseInLine(q,!0))),this._parser.registerCsiHandler({final:"L"},(q=>this.insertLines(q))),this._parser.registerCsiHandler({final:"M"},(q=>this.deleteLines(q))),this._parser.registerCsiHandler({final:"P"},(q=>this.deleteChars(q))),this._parser.registerCsiHandler({final:"S"},(q=>this.scrollUp(q))),this._parser.registerCsiHandler({final:"T"},(q=>this.scrollDown(q))),this._parser.registerCsiHandler({final:"X"},(q=>this.eraseChars(q))),this._parser.registerCsiHandler({final:"Z"},(q=>this.cursorBackwardTab(q))),this._parser.registerCsiHandler({final:"`"},(q=>this.charPosAbsolute(q))),this._parser.registerCsiHandler({final:"a"},(q=>this.hPositionRelative(q))),this._parser.registerCsiHandler({final:"b"},(q=>this.repeatPrecedingCharacter(q))),this._parser.registerCsiHandler({final:"c"},(q=>this.sendDeviceAttributesPrimary(q))),this._parser.registerCsiHandler({prefix:">",final:"c"},(q=>this.sendDeviceAttributesSecondary(q))),this._parser.registerCsiHandler({final:"d"},(q=>this.linePosAbsolute(q))),this._parser.registerCsiHandler({final:"e"},(q=>this.vPositionRelative(q))),this._parser.registerCsiHandler({final:"f"},(q=>this.hVPosition(q))),this._parser.registerCsiHandler({final:"g"},(q=>this.tabClear(q))),this._parser.registerCsiHandler({final:"h"},(q=>this.setMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(q=>this.setModePrivate(q))),this._parser.registerCsiHandler({final:"l"},(q=>this.resetMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(q=>this.resetModePrivate(q))),this._parser.registerCsiHandler({final:"m"},(q=>this.charAttributes(q))),this._parser.registerCsiHandler({final:"n"},(q=>this.deviceStatus(q))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(q=>this.deviceStatusPrivate(q))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(q=>this.softReset(q))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(q=>this.setCursorStyle(q))),this._parser.registerCsiHandler({final:"r"},(q=>this.setScrollRegion(q))),this._parser.registerCsiHandler({final:"s"},(q=>this.saveCursor(q))),this._parser.registerCsiHandler({final:"t"},(q=>this.windowOptions(q))),this._parser.registerCsiHandler({final:"u"},(q=>this.restoreCursor(q))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(q=>this.insertColumns(q))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(q=>this.deleteColumns(q))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(q=>this.selectProtected(q))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(q=>this.requestMode(q,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(q=>this.requestMode(q,!1))),this._parser.setExecuteHandler(h.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(h.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(h.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(h.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(h.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(h.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(h.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(h.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(h.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new M.OscHandler((q=>(this.setTitle(q),this.setIconName(q),!0)))),this._parser.registerOscHandler(1,new M.OscHandler((q=>this.setIconName(q)))),this._parser.registerOscHandler(2,new M.OscHandler((q=>this.setTitle(q)))),this._parser.registerOscHandler(4,new M.OscHandler((q=>this.setOrReportIndexedColor(q)))),this._parser.registerOscHandler(8,new M.OscHandler((q=>this.setHyperlink(q)))),this._parser.registerOscHandler(10,new M.OscHandler((q=>this.setOrReportFgColor(q)))),this._parser.registerOscHandler(11,new M.OscHandler((q=>this.setOrReportBgColor(q)))),this._parser.registerOscHandler(12,new M.OscHandler((q=>this.setOrReportCursorColor(q)))),this._parser.registerOscHandler(104,new M.OscHandler((q=>this.restoreIndexedColor(q)))),this._parser.registerOscHandler(110,new M.OscHandler((q=>this.restoreFgColor(q)))),this._parser.registerOscHandler(111,new M.OscHandler((q=>this.restoreBgColor(q)))),this._parser.registerOscHandler(112,new M.OscHandler((q=>this.restoreCursorColor(q)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const q in y.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:q},(()=>this.selectCharset("("+q))),this._parser.registerEscHandler({intermediates:")",final:q},(()=>this.selectCharset(")"+q))),this._parser.registerEscHandler({intermediates:"*",final:q},(()=>this.selectCharset("*"+q))),this._parser.registerEscHandler({intermediates:"+",final:q},(()=>this.selectCharset("+"+q))),this._parser.registerEscHandler({intermediates:"-",final:q},(()=>this.selectCharset("-"+q))),this._parser.registerEscHandler({intermediates:".",final:q},(()=>this.selectCharset("."+q))),this._parser.registerEscHandler({intermediates:"/",final:q},(()=>this.selectCharset("/"+q)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((q=>(this._logService.error("Parsing error: ",q),q))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new T.DcsHandler(((q,J)=>this.requestStatusString(q,J))))}_preserveStack(I,L,B,H){this._parseStack.paused=!0,this._parseStack.cursorStartX=I,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=B,this._parseStack.position=H}_logSlowResolvingAsync(I){this._logService.logLevel<=N.LogLevelEnum.WARN&&Promise.race([I,new Promise(((L,B)=>setTimeout((()=>B("#SLOW_TIMEOUT")),5e3)))]).catch((L=>{if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(I,L){let B,H=this._activeBuffer.x,P=this._activeBuffer.y,ee=0;const ne=this._parseStack.paused;if(ne){if(B=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(B),B;H=this._parseStack.cursorStartX,P=this._parseStack.cursorStartY,this._parseStack.paused=!1,I.length>F&&(ee=this._parseStack.position+F)}if(this._logService.logLevel<=N.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof I=="string"?` "${I}"`:` "${Array.prototype.map.call(I,(q=>String.fromCharCode(q))).join("")}"`),typeof I=="string"?I.split("").map((q=>q.charCodeAt(0))):I),this._parseBuffer.length<I.length&&this._parseBuffer.length<F&&(this._parseBuffer=new Uint32Array(Math.min(I.length,F))),ne||this._dirtyRowTracker.clearRange(),I.length>F)for(let q=ee;q<I.length;q+=F){const J=q+F<I.length?q+F:I.length,ie=typeof I=="string"?this._stringDecoder.decode(I.substring(q,J),this._parseBuffer):this._utf8Decoder.decode(I.subarray(q,J),this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,ie))return this._preserveStack(H,P,ie,q),this._logSlowResolvingAsync(B),B}else if(!ne){const q=typeof I=="string"?this._stringDecoder.decode(I,this._parseBuffer):this._utf8Decoder.decode(I,this._parseBuffer);if(B=this._parser.parse(this._parseBuffer,q))return this._preserveStack(H,P,q,0),this._logSlowResolvingAsync(B),B}this._activeBuffer.x===H&&this._activeBuffer.y===P||this._onCursorMove.fire();const Q=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),W=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);W<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(W,this._bufferService.rows-1),Math.min(Q,this._bufferService.rows-1))}print(I,L,B){let H,P;const ee=this._charsetService.charset,ne=this._optionsService.rawOptions.screenReaderMode,Q=this._bufferService.cols,W=this._coreService.decPrivateModes.wraparound,q=this._coreService.modes.insertMode,J=this._curAttrData;let ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&B-L>0&&ie.getWidth(this._activeBuffer.x-1)===2&&ie.setCellFromCodepoint(this._activeBuffer.x-1,0,1,J);let ce=this._parser.precedingJoinState;for(let ae=L;ae<B;++ae){if(H=I[ae],H<127&&ee){const Be=ee[String.fromCharCode(H)];Be&&(H=Be.charCodeAt(0))}const _e=this._unicodeService.charProperties(H,ce);P=A.UnicodeService.extractWidth(_e);const Ee=A.UnicodeService.extractShouldJoin(_e),Te=Ee?A.UnicodeService.extractWidth(ce):0;if(ce=_e,ne&&this._onA11yChar.fire((0,w.stringFromCodePoint)(H)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+P-Te>Q){if(W){const Be=ie;let se=this._activeBuffer.x-Te;for(this._activeBuffer.x=Te,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Te>0&&ie instanceof _.BufferLine&&ie.copyCellsFrom(Be,se,0,Te,!1);se<Q;)Be.setCellFromCodepoint(se++,0,1,J)}else if(this._activeBuffer.x=Q-1,P===2)continue}if(Ee&&this._activeBuffer.x){const Be=ie.getWidth(this._activeBuffer.x-1)?1:2;ie.addCodepointToCell(this._activeBuffer.x-Be,H,P);for(let se=P-Te;--se>=0;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,J)}else if(q&&(ie.insertCells(this._activeBuffer.x,P-Te,this._activeBuffer.getNullCell(J)),ie.getWidth(Q-1)===2&&ie.setCellFromCodepoint(Q-1,b.NULL_CELL_CODE,b.NULL_CELL_WIDTH,J)),ie.setCellFromCodepoint(this._activeBuffer.x++,H,P,J),P>0)for(;--P;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,J)}this._parser.precedingJoinState=ce,this._activeBuffer.x<Q&&B-L>0&&ie.getWidth(this._activeBuffer.x)===0&&!ie.hasContent(this._activeBuffer.x)&&ie.setCellFromCodepoint(this._activeBuffer.x,0,1,J),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(I,L){return I.final!=="t"||I.prefix||I.intermediates?this._parser.registerCsiHandler(I,L):this._parser.registerCsiHandler(I,(B=>!U(B.params[0],this._optionsService.rawOptions.windowOptions)||L(B)))}registerDcsHandler(I,L){return this._parser.registerDcsHandler(I,new T.DcsHandler(L))}registerEscHandler(I,L){return this._parser.registerEscHandler(I,L)}registerOscHandler(I,L){return this._parser.registerOscHandler(I,new M.OscHandler(L))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var I;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&I.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);L.hasWidth(this._activeBuffer.x)&&!L.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const I=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-I),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(I=this._bufferService.cols-1){this._activeBuffer.x=Math.min(I,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(I,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=I,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=I,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(I,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+I,this._activeBuffer.y+L)}cursorUp(I){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,I.params[0]||1)):this._moveCursor(0,-(I.params[0]||1)),!0}cursorDown(I){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,I.params[0]||1)):this._moveCursor(0,I.params[0]||1),!0}cursorForward(I){return this._moveCursor(I.params[0]||1,0),!0}cursorBackward(I){return this._moveCursor(-(I.params[0]||1),0),!0}cursorNextLine(I){return this.cursorDown(I),this._activeBuffer.x=0,!0}cursorPrecedingLine(I){return this.cursorUp(I),this._activeBuffer.x=0,!0}cursorCharAbsolute(I){return this._setCursor((I.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(I){return this._setCursor(I.length>=2?(I.params[1]||1)-1:0,(I.params[0]||1)-1),!0}charPosAbsolute(I){return this._setCursor((I.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(I){return this._moveCursor(I.params[0]||1,0),!0}linePosAbsolute(I){return this._setCursor(this._activeBuffer.x,(I.params[0]||1)-1),!0}vPositionRelative(I){return this._moveCursor(0,I.params[0]||1),!0}hVPosition(I){return this.cursorPosition(I),!0}tabClear(I){const L=I.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(I){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=I.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(I){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=I.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(I){const L=I.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(I,L,B,H=!1,P=!1){const ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);ee.replaceCells(L,B,this._activeBuffer.getNullCell(this._eraseAttrData()),P),H&&(ee.isWrapped=!1)}_resetBufferLine(I,L=!1){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+I);B&&(B.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+I),B.isWrapped=!1)}eraseInDisplay(I,L=!1){let B;switch(this._restrictCursor(this._bufferService.cols),I.params[0]){case 0:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);B<this._bufferService.rows;B++)this._resetBufferLine(B,L);this._dirtyRowTracker.markDirty(B);break;case 1:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B,0,this._activeBuffer.x+1,!0,L),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(B+1).isWrapped=!1);B--;)this._resetBufferLine(B,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(B=this._bufferService.rows,this._dirtyRowTracker.markDirty(B-1);B--;)this._resetBufferLine(B,L);this._dirtyRowTracker.markDirty(0);break;case 3:const H=this._activeBuffer.lines.length-this._bufferService.rows;H>0&&(this._activeBuffer.lines.trimStart(H),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-H,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-H,0),this._onScroll.fire(0))}return!0}eraseInLine(I,L=!1){switch(this._restrictCursor(this._bufferService.cols),I.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,L);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,L)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(I){this._restrictCursor();let L=I.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=this._activeBuffer.ybase+this._activeBuffer.y,H=this._bufferService.rows-1-this._activeBuffer.scrollBottom,P=this._bufferService.rows-1+this._activeBuffer.ybase-H+1;for(;L--;)this._activeBuffer.lines.splice(P-1,1),this._activeBuffer.lines.splice(B,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(I){this._restrictCursor();let L=I.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=this._activeBuffer.ybase+this._activeBuffer.y;let H;for(H=this._bufferService.rows-1-this._activeBuffer.scrollBottom,H=this._bufferService.rows-1+this._activeBuffer.ybase-H;L--;)this._activeBuffer.lines.splice(B,1),this._activeBuffer.lines.splice(H,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(I){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.insertCells(this._activeBuffer.x,I.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(I){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.deleteCells(this._activeBuffer.x,I.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(I){let L=I.params[0]||1;for(;L--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(I){let L=I.params[0]||1;for(;L--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(_.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=I.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);H.deleteCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=I.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);H.insertCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=I.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);H.insertCells(this._activeBuffer.x,L,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(I){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=I.params[0]||1;for(let B=this._activeBuffer.scrollTop;B<=this._activeBuffer.scrollBottom;++B){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);H.deleteCells(this._activeBuffer.x,L,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(I){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(I.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(I){const L=this._parser.precedingJoinState;if(!L)return!0;const B=I.params[0]||1,H=A.UnicodeService.extractWidth(L),P=this._activeBuffer.x-H,ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(P),ne=new Uint32Array(ee.length*B);let Q=0;for(let q=0;q<ee.length;){const J=ee.codePointAt(q)||0;ne[Q++]=J,q+=J>65535?2:1}let W=Q;for(let q=1;q<B;++q)ne.copyWithin(W,0,Q),W+=Q;return this.print(ne,0,W),!0}sendDeviceAttributesPrimary(I){return I.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(I){return I.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(I.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(I){return(this._optionsService.rawOptions.termName+"").indexOf(I)===0}setMode(I){for(let L=0;L<I.length;L++)switch(I.params[L]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(I){for(let L=0;L<I.length;L++)switch(I.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,y.DEFAULT_CHARSET),this._charsetService.setgCharset(1,y.DEFAULT_CHARSET),this._charsetService.setgCharset(2,y.DEFAULT_CHARSET),this._charsetService.setgCharset(3,y.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(I){for(let L=0;L<I.length;L++)switch(I.params[L]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(I){for(let L=0;L<I.length;L++)switch(I.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),I.params[L]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(I,L){const B=this._coreService.decPrivateModes,{activeProtocol:H,activeEncoding:P}=this._coreMouseService,ee=this._coreService,{buffers:ne,cols:Q}=this._bufferService,{active:W,alt:q}=ne,J=this._optionsService.rawOptions,ie=Ee=>Ee?1:2,ce=I.params[0];return ae=ce,_e=L?ce===2?4:ce===4?ie(ee.modes.insertMode):ce===12?3:ce===20?ie(J.convertEol):0:ce===1?ie(B.applicationCursorKeys):ce===3?J.windowOptions.setWinLines?Q===80?2:Q===132?1:0:0:ce===6?ie(B.origin):ce===7?ie(B.wraparound):ce===8?3:ce===9?ie(H==="X10"):ce===12?ie(J.cursorBlink):ce===25?ie(!ee.isCursorHidden):ce===45?ie(B.reverseWraparound):ce===66?ie(B.applicationKeypad):ce===67?4:ce===1e3?ie(H==="VT200"):ce===1002?ie(H==="DRAG"):ce===1003?ie(H==="ANY"):ce===1004?ie(B.sendFocus):ce===1005?4:ce===1006?ie(P==="SGR"):ce===1015?4:ce===1016?ie(P==="SGR_PIXELS"):ce===1048?1:ce===47||ce===1047||ce===1049?ie(W===q):ce===2004?ie(B.bracketedPasteMode):0,ee.triggerDataEvent(`${h.C0.ESC}[${L?"":"?"}${ae};${_e}$y`),!0;var ae,_e}_updateAttrColor(I,L,B,H,P){return L===2?(I|=50331648,I&=-16777216,I|=E.AttributeData.fromColorRGB([B,H,P])):L===5&&(I&=-50331904,I|=33554432|255&B),I}_extractColor(I,L,B){const H=[0,0,-1,0,0,0];let P=0,ee=0;do{if(H[ee+P]=I.params[L+ee],I.hasSubParams(L+ee)){const ne=I.getSubParams(L+ee);let Q=0;do H[1]===5&&(P=1),H[ee+Q+1+P]=ne[Q];while(++Q<ne.length&&Q+ee+1+P<H.length);break}if(H[1]===5&&ee+P>=2||H[1]===2&&ee+P>=5)break;H[1]&&(P=1)}while(++ee+L<I.length&&ee+P<H.length);for(let ne=2;ne<H.length;++ne)H[ne]===-1&&(H[ne]=0);switch(H[0]){case 38:B.fg=this._updateAttrColor(B.fg,H[1],H[3],H[4],H[5]);break;case 48:B.bg=this._updateAttrColor(B.bg,H[1],H[3],H[4],H[5]);break;case 58:B.extended=B.extended.clone(),B.extended.underlineColor=this._updateAttrColor(B.extended.underlineColor,H[1],H[3],H[4],H[5])}return ee}_processUnderline(I,L){L.extended=L.extended.clone(),(!~I||I>5)&&(I=1),L.extended.underlineStyle=I,L.fg|=268435456,I===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(I){I.fg=_.DEFAULT_ATTR_DATA.fg,I.bg=_.DEFAULT_ATTR_DATA.bg,I.extended=I.extended.clone(),I.extended.underlineStyle=0,I.extended.underlineColor&=-67108864,I.updateExtended()}charAttributes(I){if(I.length===1&&I.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=I.length;let B;const H=this._curAttrData;for(let P=0;P<L;P++)B=I.params[P],B>=30&&B<=37?(H.fg&=-50331904,H.fg|=16777216|B-30):B>=40&&B<=47?(H.bg&=-50331904,H.bg|=16777216|B-40):B>=90&&B<=97?(H.fg&=-50331904,H.fg|=16777224|B-90):B>=100&&B<=107?(H.bg&=-50331904,H.bg|=16777224|B-100):B===0?this._processSGR0(H):B===1?H.fg|=134217728:B===3?H.bg|=67108864:B===4?(H.fg|=268435456,this._processUnderline(I.hasSubParams(P)?I.getSubParams(P)[0]:1,H)):B===5?H.fg|=536870912:B===7?H.fg|=67108864:B===8?H.fg|=1073741824:B===9?H.fg|=2147483648:B===2?H.bg|=134217728:B===21?this._processUnderline(2,H):B===22?(H.fg&=-134217729,H.bg&=-134217729):B===23?H.bg&=-67108865:B===24?(H.fg&=-268435457,this._processUnderline(0,H)):B===25?H.fg&=-536870913:B===27?H.fg&=-67108865:B===28?H.fg&=-1073741825:B===29?H.fg&=2147483647:B===39?(H.fg&=-67108864,H.fg|=16777215&_.DEFAULT_ATTR_DATA.fg):B===49?(H.bg&=-67108864,H.bg|=16777215&_.DEFAULT_ATTR_DATA.bg):B===38||B===48||B===58?P+=this._extractColor(I,P,H):B===53?H.bg|=1073741824:B===55?H.bg&=-1073741825:B===59?(H.extended=H.extended.clone(),H.extended.underlineColor=-1,H.updateExtended()):B===100?(H.fg&=-67108864,H.fg|=16777215&_.DEFAULT_ATTR_DATA.fg,H.bg&=-67108864,H.bg|=16777215&_.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",B);return!0}deviceStatus(I){switch(I.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${L};${B}R`)}return!0}deviceStatusPrivate(I){if(I.params[0]===6){const L=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${L};${B}R`)}return!0}softReset(I){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=_.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(I){const L=I.params[0]||1;switch(L){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const B=L%2==1;return this._optionsService.options.cursorBlink=B,!0}setScrollRegion(I){const L=I.params[0]||1;let B;return(I.length<2||(B=I.params[1])>this._bufferService.rows||B===0)&&(B=this._bufferService.rows),B>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=B-1,this._setCursor(0,0)),!0}windowOptions(I){if(!U(I.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=I.length>1?I.params[1]:0;switch(I.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire($.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire($.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${h.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(I){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(I){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(I){return this._windowTitle=I,this._onTitleChange.fire(I),!0}setIconName(I){return this._iconName=I,!0}setOrReportIndexedColor(I){const L=[],B=I.split(";");for(;B.length>1;){const H=B.shift(),P=B.shift();if(/^\d+$/.exec(H)){const ee=parseInt(H);if(X(ee))if(P==="?")L.push({type:0,index:ee});else{const ne=(0,j.parseColor)(P);ne&&L.push({type:1,index:ee,color:ne})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(I){const L=I.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(I,L){this._getCurrentLinkId()&&this._finishHyperlink();const B=I.split(":");let H;const P=B.findIndex((ee=>ee.startsWith("id=")));return P!==-1&&(H=B[P].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:H,uri:L}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(I,L){const B=I.split(";");for(let H=0;H<B.length&&!(L>=this._specialColors.length);++H,++L)if(B[H]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const P=(0,j.parseColor)(B[H]);P&&this._onColor.fire([{type:1,index:this._specialColors[L],color:P}])}return!0}setOrReportFgColor(I){return this._setOrReportSpecialColor(I,0)}setOrReportBgColor(I){return this._setOrReportSpecialColor(I,1)}setOrReportCursorColor(I){return this._setOrReportSpecialColor(I,2)}restoreIndexedColor(I){if(!I)return this._onColor.fire([{type:2}]),!0;const L=[],B=I.split(";");for(let H=0;H<B.length;++H)if(/^\d+$/.exec(B[H])){const P=parseInt(B[H]);X(P)&&L.push({type:2,index:P})}return L.length&&this._onColor.fire(L),!0}restoreFgColor(I){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(I){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(I){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,y.DEFAULT_CHARSET),!0}selectCharset(I){return I.length!==2?(this.selectDefaultCharset(),!0):(I[0]==="/"||this._charsetService.setgCharset(O[I[0]],y.CHARSETS[I[1]]||y.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const I=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,I,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=_.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=_.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(I){return this._charsetService.setgLevel(I),!0}screenAlignmentPattern(){const I=new x.CellData;I.content=4194373,I.fg=this._curAttrData.fg,I.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L<this._bufferService.rows;++L){const B=this._activeBuffer.ybase+this._activeBuffer.y+L,H=this._activeBuffer.lines.get(B);H&&(H.fill(I),H.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(I,L){const B=this._bufferService.buffer,H=this._optionsService.rawOptions;return(P=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${P}${h.C0.ESC}\\`),!0))(I==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:I==='"p'?'P1$r61;1"p':I==="r"?`P1$r${B.scrollTop+1};${B.scrollBottom+1}r`:I==="m"?"P1$r0m":I===" q"?`P1$r${{block:2,underline:4,bar:6}[H.cursorStyle]-(H.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(I,L){this._dirtyRowTracker.markRangeDirty(I,L)}}a.InputHandler=K;let V=class{constructor(Z){this._bufferService=Z,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(Z){Z<this.start?this.start=Z:Z>this.end&&(this.end=Z)}markRangeDirty(Z,I){Z>I&&(G=Z,Z=I,I=G),Z<this.start&&(this.start=Z),I>this.end&&(this.end=I)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function X(Z){return 0<=Z&&Z<256}V=f([p(0,N.IBufferService)],V)},844:(d,a)=>{function u(f){for(const p of f)p.dispose();f.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const p=this._disposables.indexOf(f);p!==-1&&this._disposables.splice(p,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var p;this._isDisposed||f===this._value||((p=this._value)==null||p.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},a.toDisposable=function(f){return{dispose:f}},a.disposeArray=u,a.getDisposeArrayDisposable=function(f){return{dispose:()=>u(f)}}},1505:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(p,h,y){this._data[p]||(this._data[p]={}),this._data[p][h]=y}get(p,h){return this._data[p]?this._data[p][h]:void 0}clear(){this._data={}}}a.TwoKeyMap=u,a.FourKeyMap=class{constructor(){this._data=new u}set(f,p,h,y,S){this._data.get(f,p)||this._data.set(f,p,new u),this._data.get(f,p).set(h,y,S)}get(f,p,h,y){var S;return(S=this._data.get(f,p))==null?void 0:S.get(h,y)}clear(){this._data.clear()}}},6114:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const u=a.isNode?"node":navigator.userAgent,f=a.isNode?"node":navigator.platform;a.isFirefox=u.includes("Firefox"),a.isLegacyEdge=u.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(u),a.getSafariVersion=function(){if(!a.isSafari)return 0;const p=u.match(/Version\/(\d+)/);return p===null||p.length<2?0:parseInt(p[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),a.isIpad=f==="iPad",a.isIphone=f==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),a.isLinux=f.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(u)},6106:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let u=0;a.SortedList=class{constructor(f){this._getKey=f,this._array=[]}clear(){this._array.length=0}insert(f){this._array.length!==0?(u=this._search(this._getKey(f)),this._array.splice(u,0,f)):this._array.push(f)}delete(f){if(this._array.length===0)return!1;const p=this._getKey(f);if(p===void 0||(u=this._search(p),u===-1)||this._getKey(this._array[u])!==p)return!1;do if(this._array[u]===f)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===p);return!1}*getKeyIterator(f){if(this._array.length!==0&&(u=this._search(f),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===f))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===f)}forEachByKey(f,p){if(this._array.length!==0&&(u=this._search(f),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===f))do p(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===f)}values(){return[...this._array].values()}_search(f){let p=0,h=this._array.length-1;for(;h>=p;){let y=p+h>>1;const S=this._getKey(this._array[y]);if(S>f)h=y-1;else{if(!(S<f)){for(;y>0&&this._getKey(this._array[y-1])===f;)y--;return y}p=y+1}}return p}}},7226:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const f=u(6114);class p{constructor(){this._tasks=[],this._i=0}enqueue(S){this._tasks.push(S),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(S){this._idleCallback=void 0;let C=0,w=0,_=S.timeRemaining(),v=0;for(;this._i<this._tasks.length;){if(C=Date.now(),this._tasks[this._i]()||this._i++,C=Math.max(1,Date.now()-C),w=Math.max(C,w),v=S.timeRemaining(),1.5*w>v)return _-C<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(_-C))}ms`),void this._start();_=v}this.clear()}}class h extends p{_requestCallback(S){return setTimeout((()=>S(this._createDeadline(16))))}_cancelCallback(S){clearTimeout(S)}_createDeadline(S){const C=Date.now()+S;return{timeRemaining:()=>Math.max(0,C-Date.now())}}}a.PriorityTaskQueue=h,a.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends p{_requestCallback(y){return requestIdleCallback(y)}_cancelCallback(y){cancelIdleCallback(y)}}:h,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(y){this._queue.clear(),this._queue.enqueue(y)}flush(){this._queue.flush()}}},9282:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const f=u(643);a.updateWindowsModeWrappedState=function(p){const h=p.buffer.lines.get(p.buffer.ybase+p.buffer.y-1),y=h==null?void 0:h.get(p.cols-1),S=p.buffer.lines.get(p.buffer.ybase+p.buffer.y);S&&y&&(S.isWrapped=y[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&y[f.CHAR_DATA_CODE_INDEX]!==f.WHITESPACE_CELL_CODE)}},3734:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new u;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}a.AttributeData=u;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}get underlineVariantOffset(){const h=(3758096384&this._ext)>>29;return h<0?4294967288^h:h}set underlineVariantOffset(h){this._ext&=536870911,this._ext|=h<<29&3758096384}constructor(h=0,y=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=y}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=f},9092:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const f=u(6349),p=u(7226),h=u(3734),y=u(8437),S=u(4634),C=u(511),w=u(643),_=u(4863),v=u(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(b,x,E){this._hasScrollback=b,this._optionsService=x,this._bufferService=E,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=y.DEFAULT_ATTR_DATA.clone(),this.savedCharset=v.DEFAULT_CHARSET,this.markers=[],this._nullCell=C.CellData.fromCharData([0,w.NULL_CELL_CHAR,w.NULL_CELL_WIDTH,w.NULL_CELL_CODE]),this._whitespaceCell=C.CellData.fromCharData([0,w.WHITESPACE_CELL_CHAR,w.WHITESPACE_CELL_WIDTH,w.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new p.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(b){return b?(this._nullCell.fg=b.fg,this._nullCell.bg=b.bg,this._nullCell.extended=b.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell}getWhitespaceCell(b){return b?(this._whitespaceCell.fg=b.fg,this._whitespaceCell.bg=b.bg,this._whitespaceCell.extended=b.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell}getBlankLine(b,x){return new y.BufferLine(this._bufferService.cols,this.getNullCell(b),x)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const b=this.ybase+this.y-this.ydisp;return b>=0&&b<this._rows}_getCorrectBufferLength(b){if(!this._hasScrollback)return b;const x=b+this._optionsService.rawOptions.scrollback;return x>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:x}fillViewportRows(b){if(this.lines.length===0){b===void 0&&(b=y.DEFAULT_ATTR_DATA);let x=this._rows;for(;x--;)this.lines.push(this.getBlankLine(b))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(b,x){const E=this.getNullCell(y.DEFAULT_ATTR_DATA);let N=0;const A=this._getCorrectBufferLength(x);if(A>this.lines.maxLength&&(this.lines.maxLength=A),this.lines.length>0){if(this._cols<b)for(let T=0;T<this.lines.length;T++)N+=+this.lines.get(T).resize(b,E);let M=0;if(this._rows<x)for(let T=this._rows;T<x;T++)this.lines.length<x+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new y.BufferLine(b,E)):this.ybase>0&&this.lines.length<=this.ybase+this.y+M+1?(this.ybase--,M++,this.ydisp>0&&this.ydisp--):this.lines.push(new y.BufferLine(b,E)));else for(let T=this._rows;T>x;T--)this.lines.length>x+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(A<this.lines.maxLength){const T=this.lines.length-A;T>0&&(this.lines.trimStart(T),this.ybase=Math.max(this.ybase-T,0),this.ydisp=Math.max(this.ydisp-T,0),this.savedY=Math.max(this.savedY-T,0)),this.lines.maxLength=A}this.x=Math.min(this.x,b-1),this.y=Math.min(this.y,x-1),M&&(this.y+=M),this.savedX=Math.min(this.savedX,b-1),this.scrollTop=0}if(this.scrollBottom=x-1,this._isReflowEnabled&&(this._reflow(b,x),this._cols>b))for(let M=0;M<this.lines.length;M++)N+=+this.lines.get(M).resize(b,E);this._cols=b,this._rows=x,this._memoryCleanupQueue.clear(),N>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let b=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,b=!1);let x=0;for(;this._memoryCleanupPosition<this.lines.length;)if(x+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),x>100)return!0;return b}get _isReflowEnabled(){const b=this._optionsService.rawOptions.windowsPty;return b&&b.buildNumber?this._hasScrollback&&b.backend==="conpty"&&b.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(b,x){this._cols!==b&&(b>this._cols?this._reflowLarger(b,x):this._reflowSmaller(b,x))}_reflowLarger(b,x){const E=(0,S.reflowLargerGetLinesToRemove)(this.lines,this._cols,b,this.ybase+this.y,this.getNullCell(y.DEFAULT_ATTR_DATA));if(E.length>0){const N=(0,S.reflowLargerCreateNewLayout)(this.lines,E);(0,S.reflowLargerApplyNewLayout)(this.lines,N.layout),this._reflowLargerAdjustViewport(b,x,N.countRemoved)}}_reflowLargerAdjustViewport(b,x,E){const N=this.getNullCell(y.DEFAULT_ATTR_DATA);let A=E;for(;A-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<x&&this.lines.push(new y.BufferLine(b,N))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-E,0)}_reflowSmaller(b,x){const E=this.getNullCell(y.DEFAULT_ATTR_DATA),N=[];let A=0;for(let M=this.lines.length-1;M>=0;M--){let T=this.lines.get(M);if(!T||!T.isWrapped&&T.getTrimmedLength()<=b)continue;const j=[T];for(;T.isWrapped&&M>0;)T=this.lines.get(--M),j.unshift(T);const O=this.ybase+this.y;if(O>=M&&O<M+j.length)continue;const F=j[j.length-1].getTrimmedLength(),U=(0,S.reflowSmallerGetNewLineLengths)(j,this._cols,b),$=U.length-j.length;let G;G=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+$):Math.max(0,this.lines.length-this.lines.maxLength+$);const K=[];for(let B=0;B<$;B++){const H=this.getBlankLine(y.DEFAULT_ATTR_DATA,!0);K.push(H)}K.length>0&&(N.push({start:M+j.length+A,newLines:K}),A+=K.length),j.push(...K);let V=U.length-1,X=U[V];X===0&&(V--,X=U[V]);let Z=j.length-$-1,I=F;for(;Z>=0;){const B=Math.min(I,X);if(j[V]===void 0)break;if(j[V].copyCellsFrom(j[Z],I-B,X-B,B,!0),X-=B,X===0&&(V--,X=U[V]),I-=B,I===0){Z--;const H=Math.max(Z,0);I=(0,S.getWrappedLineTrimmedLength)(j,H,this._cols)}}for(let B=0;B<j.length;B++)U[B]<b&&j[B].setCell(U[B],E);let L=$-G;for(;L-- >0;)this.ybase===0?this.y<x-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+A)-x&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+$,this.ybase+x-1)}if(N.length>0){const M=[],T=[];for(let V=0;V<this.lines.length;V++)T.push(this.lines.get(V));const j=this.lines.length;let O=j-1,F=0,U=N[F];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+A);let $=0;for(let V=Math.min(this.lines.maxLength-1,j+A-1);V>=0;V--)if(U&&U.start>O+$){for(let X=U.newLines.length-1;X>=0;X--)this.lines.set(V--,U.newLines[X]);V++,M.push({index:O+1,amount:U.newLines.length}),$+=U.newLines.length,U=N[++F]}else this.lines.set(V,T[O--]);let G=0;for(let V=M.length-1;V>=0;V--)M[V].index+=G,this.lines.onInsertEmitter.fire(M[V]),G+=M[V].amount;const K=Math.max(0,j+A-this.lines.maxLength);K>0&&this.lines.onTrimEmitter.fire(K)}}translateBufferLineToString(b,x,E=0,N){const A=this.lines.get(b);return A?A.translateToString(x,E,N):""}getWrappedRangeForLine(b){let x=b,E=b;for(;x>0&&this.lines.get(x).isWrapped;)x--;for(;E+1<this.lines.length&&this.lines.get(E+1).isWrapped;)E++;return{first:x,last:E}}setupTabStops(b){for(b!=null?this.tabs[b]||(b=this.prevStop(b)):(this.tabs={},b=0);b<this._cols;b+=this._optionsService.rawOptions.tabStopWidth)this.tabs[b]=!0}prevStop(b){for(b==null&&(b=this.x);!this.tabs[--b]&&b>0;);return b>=this._cols?this._cols-1:b<0?0:b}nextStop(b){for(b==null&&(b=this.x);!this.tabs[++b]&&b<this._cols;);return b>=this._cols?this._cols-1:b<0?0:b}clearMarkers(b){this._isClearing=!0;for(let x=0;x<this.markers.length;x++)this.markers[x].line===b&&(this.markers[x].dispose(),this.markers.splice(x--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let b=0;b<this.markers.length;b++)this.markers[b].dispose(),this.markers.splice(b--,1);this._isClearing=!1}addMarker(b){const x=new _.Marker(b);return this.markers.push(x),x.register(this.lines.onTrim((E=>{x.line-=E,x.line<0&&x.dispose()}))),x.register(this.lines.onInsert((E=>{x.line>=E.index&&(x.line+=E.amount)}))),x.register(this.lines.onDelete((E=>{x.line>=E.index&&x.line<E.index+E.amount&&x.dispose(),x.line>E.index&&(x.line-=E.amount)}))),x.register(x.onDispose((()=>this._removeMarker(x)))),x}_removeMarker(b){this._isClearing||this.markers.splice(this.markers.indexOf(b),1)}}},8437:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const f=u(3734),p=u(511),h=u(643),y=u(482);a.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);let S=0;class C{constructor(_,v,b=!1){this.isWrapped=b,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*_);const x=v||p.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let E=0;E<_;++E)this.setCell(E,x);this.length=_}get(_){const v=this._data[3*_+0],b=2097151&v;return[this._data[3*_+1],2097152&v?this._combined[_]:b?(0,y.stringFromCodePoint)(b):"",v>>22,2097152&v?this._combined[_].charCodeAt(this._combined[_].length-1):b]}set(_,v){this._data[3*_+1]=v[h.CHAR_DATA_ATTR_INDEX],v[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[_]=v[1],this._data[3*_+0]=2097152|_|v[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*_+0]=v[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|v[h.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(_){return this._data[3*_+0]>>22}hasWidth(_){return 12582912&this._data[3*_+0]}getFg(_){return this._data[3*_+1]}getBg(_){return this._data[3*_+2]}hasContent(_){return 4194303&this._data[3*_+0]}getCodePoint(_){const v=this._data[3*_+0];return 2097152&v?this._combined[_].charCodeAt(this._combined[_].length-1):2097151&v}isCombined(_){return 2097152&this._data[3*_+0]}getString(_){const v=this._data[3*_+0];return 2097152&v?this._combined[_]:2097151&v?(0,y.stringFromCodePoint)(2097151&v):""}isProtected(_){return 536870912&this._data[3*_+2]}loadCell(_,v){return S=3*_,v.content=this._data[S+0],v.fg=this._data[S+1],v.bg=this._data[S+2],2097152&v.content&&(v.combinedData=this._combined[_]),268435456&v.bg&&(v.extended=this._extendedAttrs[_]),v}setCell(_,v){2097152&v.content&&(this._combined[_]=v.combinedData),268435456&v.bg&&(this._extendedAttrs[_]=v.extended),this._data[3*_+0]=v.content,this._data[3*_+1]=v.fg,this._data[3*_+2]=v.bg}setCellFromCodepoint(_,v,b,x){268435456&x.bg&&(this._extendedAttrs[_]=x.extended),this._data[3*_+0]=v|b<<22,this._data[3*_+1]=x.fg,this._data[3*_+2]=x.bg}addCodepointToCell(_,v,b){let x=this._data[3*_+0];2097152&x?this._combined[_]+=(0,y.stringFromCodePoint)(v):2097151&x?(this._combined[_]=(0,y.stringFromCodePoint)(2097151&x)+(0,y.stringFromCodePoint)(v),x&=-2097152,x|=2097152):x=v|4194304,b&&(x&=-12582913,x|=b<<22),this._data[3*_+0]=x}insertCells(_,v,b){if((_%=this.length)&&this.getWidth(_-1)===2&&this.setCellFromCodepoint(_-1,0,1,b),v<this.length-_){const x=new p.CellData;for(let E=this.length-_-v-1;E>=0;--E)this.setCell(_+v+E,this.loadCell(_+E,x));for(let E=0;E<v;++E)this.setCell(_+E,b)}else for(let x=_;x<this.length;++x)this.setCell(x,b);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,b)}deleteCells(_,v,b){if(_%=this.length,v<this.length-_){const x=new p.CellData;for(let E=0;E<this.length-_-v;++E)this.setCell(_+E,this.loadCell(_+v+E,x));for(let E=this.length-v;E<this.length;++E)this.setCell(E,b)}else for(let x=_;x<this.length;++x)this.setCell(x,b);_&&this.getWidth(_-1)===2&&this.setCellFromCodepoint(_-1,0,1,b),this.getWidth(_)!==0||this.hasContent(_)||this.setCellFromCodepoint(_,0,1,b)}replaceCells(_,v,b,x=!1){if(x)for(_&&this.getWidth(_-1)===2&&!this.isProtected(_-1)&&this.setCellFromCodepoint(_-1,0,1,b),v<this.length&&this.getWidth(v-1)===2&&!this.isProtected(v)&&this.setCellFromCodepoint(v,0,1,b);_<v&&_<this.length;)this.isProtected(_)||this.setCell(_,b),_++;else for(_&&this.getWidth(_-1)===2&&this.setCellFromCodepoint(_-1,0,1,b),v<this.length&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v,0,1,b);_<v&&_<this.length;)this.setCell(_++,b)}resize(_,v){if(_===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const b=3*_;if(_>this.length){if(this._data.buffer.byteLength>=4*b)this._data=new Uint32Array(this._data.buffer,0,b);else{const x=new Uint32Array(b);x.set(this._data),this._data=x}for(let x=this.length;x<_;++x)this.setCell(x,v)}else{this._data=this._data.subarray(0,b);const x=Object.keys(this._combined);for(let N=0;N<x.length;N++){const A=parseInt(x[N],10);A>=_&&delete this._combined[A]}const E=Object.keys(this._extendedAttrs);for(let N=0;N<E.length;N++){const A=parseInt(E[N],10);A>=_&&delete this._extendedAttrs[A]}}return this.length=_,4*b*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const _=new Uint32Array(this._data.length);return _.set(this._data),this._data=_,1}return 0}fill(_,v=!1){if(v)for(let b=0;b<this.length;++b)this.isProtected(b)||this.setCell(b,_);else{this._combined={},this._extendedAttrs={};for(let b=0;b<this.length;++b)this.setCell(b,_)}}copyFrom(_){this.length!==_.length?this._data=new Uint32Array(_._data):this._data.set(_._data),this.length=_.length,this._combined={};for(const v in _._combined)this._combined[v]=_._combined[v];this._extendedAttrs={};for(const v in _._extendedAttrs)this._extendedAttrs[v]=_._extendedAttrs[v];this.isWrapped=_.isWrapped}clone(){const _=new C(0);_._data=new Uint32Array(this._data),_.length=this.length;for(const v in this._combined)_._combined[v]=this._combined[v];for(const v in this._extendedAttrs)_._extendedAttrs[v]=this._extendedAttrs[v];return _.isWrapped=this.isWrapped,_}getTrimmedLength(){for(let _=this.length-1;_>=0;--_)if(4194303&this._data[3*_+0])return _+(this._data[3*_+0]>>22);return 0}getNoBgTrimmedLength(){for(let _=this.length-1;_>=0;--_)if(4194303&this._data[3*_+0]||50331648&this._data[3*_+2])return _+(this._data[3*_+0]>>22);return 0}copyCellsFrom(_,v,b,x,E){const N=_._data;if(E)for(let M=x-1;M>=0;M--){for(let T=0;T<3;T++)this._data[3*(b+M)+T]=N[3*(v+M)+T];268435456&N[3*(v+M)+2]&&(this._extendedAttrs[b+M]=_._extendedAttrs[v+M])}else for(let M=0;M<x;M++){for(let T=0;T<3;T++)this._data[3*(b+M)+T]=N[3*(v+M)+T];268435456&N[3*(v+M)+2]&&(this._extendedAttrs[b+M]=_._extendedAttrs[v+M])}const A=Object.keys(_._combined);for(let M=0;M<A.length;M++){const T=parseInt(A[M],10);T>=v&&(this._combined[T-v+b]=_._combined[T])}}translateToString(_,v,b,x){v=v!=null?v:0,b=b!=null?b:this.length,_&&(b=Math.min(b,this.getTrimmedLength())),x&&(x.length=0);let E="";for(;v<b;){const N=this._data[3*v+0],A=2097151&N,M=2097152&N?this._combined[v]:A?(0,y.stringFromCodePoint)(A):h.WHITESPACE_CELL_CHAR;if(E+=M,x)for(let T=0;T<M.length;++T)x.push(v);v+=N>>22||1}return x&&x.push(v),E}}a.BufferLine=C},4841:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(u,f){if(u.start.y>u.end.y)throw new Error(`Buffer range end (${u.end.x}, ${u.end.y}) cannot be before start (${u.start.x}, ${u.start.y})`);return f*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(d,a)=>{function u(f,p,h){if(p===f.length-1)return f[p].getTrimmedLength();const y=!f[p].hasContent(h-1)&&f[p].getWidth(h-1)===1,S=f[p+1].getWidth(0)===2;return y&&S?h-1:h}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(f,p,h,y,S){const C=[];for(let w=0;w<f.length-1;w++){let _=w,v=f.get(++_);if(!v.isWrapped)continue;const b=[f.get(w)];for(;_<f.length&&v.isWrapped;)b.push(v),v=f.get(++_);if(y>=w&&y<_){w+=b.length-1;continue}let x=0,E=u(b,x,p),N=1,A=0;for(;N<b.length;){const T=u(b,N,p),j=T-A,O=h-E,F=Math.min(j,O);b[x].copyCellsFrom(b[N],A,E,F,!1),E+=F,E===h&&(x++,E=0),A+=F,A===T&&(N++,A=0),E===0&&x!==0&&b[x-1].getWidth(h-1)===2&&(b[x].copyCellsFrom(b[x-1],h-1,E++,1,!1),b[x-1].setCell(h-1,S))}b[x].replaceCells(E,h,S);let M=0;for(let T=b.length-1;T>0&&(T>x||b[T].getTrimmedLength()===0);T--)M++;M>0&&(C.push(w+b.length-M),C.push(M)),w+=b.length-1}return C},a.reflowLargerCreateNewLayout=function(f,p){const h=[];let y=0,S=p[y],C=0;for(let w=0;w<f.length;w++)if(S===w){const _=p[++y];f.onDeleteEmitter.fire({index:w-C,amount:_}),w+=_-1,C+=_,S=p[++y]}else h.push(w);return{layout:h,countRemoved:C}},a.reflowLargerApplyNewLayout=function(f,p){const h=[];for(let y=0;y<p.length;y++)h.push(f.get(p[y]));for(let y=0;y<h.length;y++)f.set(y,h[y]);f.length=p.length},a.reflowSmallerGetNewLineLengths=function(f,p,h){const y=[],S=f.map(((v,b)=>u(f,b,p))).reduce(((v,b)=>v+b));let C=0,w=0,_=0;for(;_<S;){if(S-_<h){y.push(S-_);break}C+=h;const v=u(f,w,p);C>v&&(C-=v,w++);const b=f[w].getWidth(C-1)===2;b&&C--;const x=b?h-1:h;y.push(x),_+=x}return y},a.getWrappedLineTrimmedLength=u},5295:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const f=u(8460),p=u(844),h=u(9092);class y extends p.Disposable{constructor(C,w){super(),this._optionsService=C,this._bufferService=w,this._onBufferActivate=this.register(new f.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new h.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new h.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(C){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(C),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(C,w){this._normal.resize(C,w),this._alt.resize(C,w),this.setupTabStops(C)}setupTabStops(C){this._normal.setupTabStops(C),this._alt.setupTabStops(C)}}a.BufferSet=y},511:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const f=u(482),p=u(643),h=u(3734);class y extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(C){const w=new y;return w.setFromCharData(C),w}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(C){this.fg=C[p.CHAR_DATA_ATTR_INDEX],this.bg=0;let w=!1;if(C[p.CHAR_DATA_CHAR_INDEX].length>2)w=!0;else if(C[p.CHAR_DATA_CHAR_INDEX].length===2){const _=C[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=_&&_<=56319){const v=C[p.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=v&&v<=57343?this.content=1024*(_-55296)+v-56320+65536|C[p.CHAR_DATA_WIDTH_INDEX]<<22:w=!0}else w=!0}else this.content=C[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|C[p.CHAR_DATA_WIDTH_INDEX]<<22;w&&(this.combinedData=C[p.CHAR_DATA_CHAR_INDEX],this.content=2097152|C[p.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=y},643:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const f=u(8460),p=u(844);class h{get id(){return this._id}constructor(S){this.line=S,this.isDisposed=!1,this._disposables=[],this._id=h._nextId++,this._onDispose=this.register(new f.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,p.disposeArray)(this._disposables),this._disposables.length=0)}register(S){return this._disposables.push(S),S}}a.Marker=h,h._nextId=1},7116:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(d,a)=>{var u,f,p;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,(function(h){h.NUL="\0",h.SOH="",h.STX="",h.ETX="",h.EOT="",h.ENQ="",h.ACK="",h.BEL="\x07",h.BS="\b",h.HT=" ",h.LF=`
493
+ `,h.VT="\v",h.FF="\f",h.CR="\r",h.SO="",h.SI="",h.DLE="",h.DC1="",h.DC2="",h.DC3="",h.DC4="",h.NAK="",h.SYN="",h.ETB="",h.CAN="",h.EM="",h.SUB="",h.ESC="\x1B",h.FS="",h.GS="",h.RS="",h.US="",h.SP=" ",h.DEL=""})(u||(a.C0=u={})),(function(h){h.PAD="€",h.HOP="",h.BPH="‚",h.NBH="ƒ",h.IND="„",h.NEL="…",h.SSA="†",h.ESA="‡",h.HTS="ˆ",h.HTJ="‰",h.VTS="Š",h.PLD="‹",h.PLU="Œ",h.RI="",h.SS2="Ž",h.SS3="",h.DCS="",h.PU1="‘",h.PU2="’",h.STS="“",h.CCH="”",h.MW="•",h.SPA="–",h.EPA="—",h.SOS="˜",h.SGCI="™",h.SCI="š",h.CSI="›",h.ST="œ",h.OSC="",h.PM="ž",h.APC="Ÿ"})(f||(a.C1=f={})),(function(h){h.ST=`${u.ESC}\\`})(p||(a.C1_ESCAPED=p={}))},7399:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const f=u(2584),p={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(h,y,S,C){const w={type:0,cancel:!1,key:void 0},_=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?w.key=y?f.C0.ESC+"OA":f.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?w.key=y?f.C0.ESC+"OD":f.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?w.key=y?f.C0.ESC+"OC":f.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(w.key=y?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:w.key=h.ctrlKey?"\b":f.C0.DEL,h.altKey&&(w.key=f.C0.ESC+w.key);break;case 9:if(h.shiftKey){w.key=f.C0.ESC+"[Z";break}w.key=f.C0.HT,w.cancel=!0;break;case 13:w.key=h.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,w.cancel=!0;break;case 27:w.key=f.C0.ESC,h.altKey&&(w.key=f.C0.ESC+f.C0.ESC),w.cancel=!0;break;case 37:if(h.metaKey)break;_?(w.key=f.C0.ESC+"[1;"+(_+1)+"D",w.key===f.C0.ESC+"[1;3D"&&(w.key=f.C0.ESC+(S?"b":"[1;5D"))):w.key=y?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(h.metaKey)break;_?(w.key=f.C0.ESC+"[1;"+(_+1)+"C",w.key===f.C0.ESC+"[1;3C"&&(w.key=f.C0.ESC+(S?"f":"[1;5C"))):w.key=y?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(h.metaKey)break;_?(w.key=f.C0.ESC+"[1;"+(_+1)+"A",S||w.key!==f.C0.ESC+"[1;3A"||(w.key=f.C0.ESC+"[1;5A")):w.key=y?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(h.metaKey)break;_?(w.key=f.C0.ESC+"[1;"+(_+1)+"B",S||w.key!==f.C0.ESC+"[1;3B"||(w.key=f.C0.ESC+"[1;5B")):w.key=y?f.C0.ESC+"OB":f.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(w.key=f.C0.ESC+"[2~");break;case 46:w.key=_?f.C0.ESC+"[3;"+(_+1)+"~":f.C0.ESC+"[3~";break;case 36:w.key=_?f.C0.ESC+"[1;"+(_+1)+"H":y?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:w.key=_?f.C0.ESC+"[1;"+(_+1)+"F":y?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:h.shiftKey?w.type=2:h.ctrlKey?w.key=f.C0.ESC+"[5;"+(_+1)+"~":w.key=f.C0.ESC+"[5~";break;case 34:h.shiftKey?w.type=3:h.ctrlKey?w.key=f.C0.ESC+"[6;"+(_+1)+"~":w.key=f.C0.ESC+"[6~";break;case 112:w.key=_?f.C0.ESC+"[1;"+(_+1)+"P":f.C0.ESC+"OP";break;case 113:w.key=_?f.C0.ESC+"[1;"+(_+1)+"Q":f.C0.ESC+"OQ";break;case 114:w.key=_?f.C0.ESC+"[1;"+(_+1)+"R":f.C0.ESC+"OR";break;case 115:w.key=_?f.C0.ESC+"[1;"+(_+1)+"S":f.C0.ESC+"OS";break;case 116:w.key=_?f.C0.ESC+"[15;"+(_+1)+"~":f.C0.ESC+"[15~";break;case 117:w.key=_?f.C0.ESC+"[17;"+(_+1)+"~":f.C0.ESC+"[17~";break;case 118:w.key=_?f.C0.ESC+"[18;"+(_+1)+"~":f.C0.ESC+"[18~";break;case 119:w.key=_?f.C0.ESC+"[19;"+(_+1)+"~":f.C0.ESC+"[19~";break;case 120:w.key=_?f.C0.ESC+"[20;"+(_+1)+"~":f.C0.ESC+"[20~";break;case 121:w.key=_?f.C0.ESC+"[21;"+(_+1)+"~":f.C0.ESC+"[21~";break;case 122:w.key=_?f.C0.ESC+"[23;"+(_+1)+"~":f.C0.ESC+"[23~";break;case 123:w.key=_?f.C0.ESC+"[24;"+(_+1)+"~":f.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(S&&!C||!h.altKey||h.metaKey)!S||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?w.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(w.key=f.C0.US),h.key==="@"&&(w.key=f.C0.NUL)):h.keyCode===65&&(w.type=1);else{const v=p[h.keyCode],b=v==null?void 0:v[h.shiftKey?1:0];if(b)w.key=f.C0.ESC+b;else if(h.keyCode>=65&&h.keyCode<=90){const x=h.ctrlKey?h.keyCode-64:h.keyCode+32;let E=String.fromCharCode(x);h.shiftKey&&(E=E.toUpperCase()),w.key=f.C0.ESC+E}else if(h.keyCode===32)w.key=f.C0.ESC+(h.ctrlKey?f.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let x=h.code.slice(3,4);h.shiftKey||(x=x.toLowerCase()),w.key=f.C0.ESC+x,w.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?w.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?w.key=f.C0.NUL:h.keyCode>=51&&h.keyCode<=55?w.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?w.key=f.C0.DEL:h.keyCode===219?w.key=f.C0.ESC:h.keyCode===220?w.key=f.C0.FS:h.keyCode===221&&(w.key=f.C0.GS)}return w}},482:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},a.utf32ToString=function(u,f=0,p=u.length){let h="";for(let y=f;y<p;++y){let S=u[y];S>65535?(S-=65536,h+=String.fromCharCode(55296+(S>>10))+String.fromCharCode(S%1024+56320)):h+=String.fromCharCode(S)}return h},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,f){const p=u.length;if(!p)return 0;let h=0,y=0;if(this._interim){const S=u.charCodeAt(y++);56320<=S&&S<=57343?f[h++]=1024*(this._interim-55296)+S-56320+65536:(f[h++]=this._interim,f[h++]=S),this._interim=0}for(let S=y;S<p;++S){const C=u.charCodeAt(S);if(55296<=C&&C<=56319){if(++S>=p)return this._interim=C,h;const w=u.charCodeAt(S);56320<=w&&w<=57343?f[h++]=1024*(C-55296)+w-56320+65536:(f[h++]=C,f[h++]=w)}else C!==65279&&(f[h++]=C)}return h}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,f){const p=u.length;if(!p)return 0;let h,y,S,C,w=0,_=0,v=0;if(this.interim[0]){let E=!1,N=this.interim[0];N&=(224&N)==192?31:(240&N)==224?15:7;let A,M=0;for(;(A=63&this.interim[++M])&&M<4;)N<<=6,N|=A;const T=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,j=T-M;for(;v<j;){if(v>=p)return 0;if(A=u[v++],(192&A)!=128){v--,E=!0;break}this.interim[M++]=A,N<<=6,N|=63&A}E||(T===2?N<128?v--:f[w++]=N:T===3?N<2048||N>=55296&&N<=57343||N===65279||(f[w++]=N):N<65536||N>1114111||(f[w++]=N)),this.interim.fill(0)}const b=p-4;let x=v;for(;x<p;){for(;!(!(x<b)||128&(h=u[x])||128&(y=u[x+1])||128&(S=u[x+2])||128&(C=u[x+3]));)f[w++]=h,f[w++]=y,f[w++]=S,f[w++]=C,x+=4;if(h=u[x++],h<128)f[w++]=h;else if((224&h)==192){if(x>=p)return this.interim[0]=h,w;if(y=u[x++],(192&y)!=128){x--;continue}if(_=(31&h)<<6|63&y,_<128){x--;continue}f[w++]=_}else if((240&h)==224){if(x>=p)return this.interim[0]=h,w;if(y=u[x++],(192&y)!=128){x--;continue}if(x>=p)return this.interim[0]=h,this.interim[1]=y,w;if(S=u[x++],(192&S)!=128){x--;continue}if(_=(15&h)<<12|(63&y)<<6|63&S,_<2048||_>=55296&&_<=57343||_===65279)continue;f[w++]=_}else if((248&h)==240){if(x>=p)return this.interim[0]=h,w;if(y=u[x++],(192&y)!=128){x--;continue}if(x>=p)return this.interim[0]=h,this.interim[1]=y,w;if(S=u[x++],(192&S)!=128){x--;continue}if(x>=p)return this.interim[0]=h,this.interim[1]=y,this.interim[2]=S,w;if(C=u[x++],(192&C)!=128){x--;continue}if(_=(7&h)<<18|(63&y)<<12|(63&S)<<6|63&C,_<65536||_>1114111)continue;f[w++]=_}}return w}}},225:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const f=u(1480),p=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],h=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let y;a.UnicodeV6=class{constructor(){if(this.version="6",!y){y=new Uint8Array(65536),y.fill(1),y[0]=0,y.fill(0,1,32),y.fill(0,127,160),y.fill(2,4352,4448),y[9001]=2,y[9002]=2,y.fill(2,11904,42192),y[12351]=1,y.fill(2,44032,55204),y.fill(2,63744,64256),y.fill(2,65040,65050),y.fill(2,65072,65136),y.fill(2,65280,65377),y.fill(2,65504,65511);for(let S=0;S<p.length;++S)y.fill(0,p[S][0],p[S][1]+1)}}wcwidth(S){return S<32?0:S<127?1:S<65536?y[S]:(function(C,w){let _,v=0,b=w.length-1;if(C<w[0][0]||C>w[b][1])return!1;for(;b>=v;)if(_=v+b>>1,C>w[_][1])v=_+1;else{if(!(C<w[_][0]))return!0;b=_-1}return!1})(S,h)?0:S>=131072&&S<=196605||S>=196608&&S<=262141?2:1}charProperties(S,C){let w=this.wcwidth(S),_=w===0&&C!==0;if(_){const v=f.UnicodeService.extractWidth(C);v===0?_=!1:v>w&&(w=v)}return f.UnicodeService.createPropertyValue(0,w,_)}}},5981:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const f=u(8460),p=u(844);class h extends p.Disposable{constructor(S){super(),this._action=S,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new f.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(S,C){if(C!==void 0&&this._syncCalls>C)return void(this._syncCalls=0);if(this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let w;for(this._isSyncWriting=!0;w=this._writeBuffer.shift();){this._action(w);const _=this._callbacks.shift();_&&_()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(S,C){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(C),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(C)}_innerWrite(S=0,C=!0){const w=S||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const _=this._writeBuffer[this._bufferOffset],v=this._action(_,C);if(v){const x=E=>Date.now()-w>=12?setTimeout((()=>this._innerWrite(0,E))):this._innerWrite(w,E);return void v.catch((E=>(queueMicrotask((()=>{throw E})),Promise.resolve(!1)))).then(x)}const b=this._callbacks[this._bufferOffset];if(b&&b(),this._bufferOffset++,this._pendingData-=_.length,Date.now()-w>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}a.WriteBuffer=h},5941:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const u=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,f=/^[\da-f]+$/;function p(h,y){const S=h.toString(16),C=S.length<2?"0"+S:S;switch(y){case 4:return S[0];case 8:return C;case 12:return(C+C).slice(0,3);default:return C+C}}a.parseColor=function(h){if(!h)return;let y=h.toLowerCase();if(y.indexOf("rgb:")===0){y=y.slice(4);const S=u.exec(y);if(S){const C=S[1]?15:S[4]?255:S[7]?4095:65535;return[Math.round(parseInt(S[1]||S[4]||S[7]||S[10],16)/C*255),Math.round(parseInt(S[2]||S[5]||S[8]||S[11],16)/C*255),Math.round(parseInt(S[3]||S[6]||S[9]||S[12],16)/C*255)]}}else if(y.indexOf("#")===0&&(y=y.slice(1),f.exec(y)&&[3,6,9,12].includes(y.length))){const S=y.length/3,C=[0,0,0];for(let w=0;w<3;++w){const _=parseInt(y.slice(S*w,S*w+S),16);C[w]=S===1?_<<4:S===2?_:S===3?_>>4:_>>8}return C}},a.toRgbString=function(h,y=16){const[S,C,w]=h;return`rgb:${p(S,y)}/${p(C,y)}/${p(w,y)}`}},5770:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const f=u(482),p=u(8742),h=u(5770),y=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=y,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=y}registerHandler(C,w){this._handlers[C]===void 0&&(this._handlers[C]=[]);const _=this._handlers[C];return _.push(w),{dispose:()=>{const v=_.indexOf(w);v!==-1&&_.splice(v,1)}}}clearHandler(C){this._handlers[C]&&delete this._handlers[C]}setHandlerFallback(C){this._handlerFb=C}reset(){if(this._active.length)for(let C=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;C>=0;--C)this._active[C].unhook(!1);this._stack.paused=!1,this._active=y,this._ident=0}hook(C,w){if(this.reset(),this._ident=C,this._active=this._handlers[C]||y,this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].hook(w);else this._handlerFb(this._ident,"HOOK",w)}put(C,w,_){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(C,w,_);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(C,w,_))}unhook(C,w=!0){if(this._active.length){let _=!1,v=this._active.length-1,b=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,_=w,b=this._stack.fallThrough,this._stack.paused=!1),!b&&_===!1){for(;v>=0&&(_=this._active[v].unhook(C),_!==!0);v--)if(_ instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,_;v--}for(;v>=0;v--)if(_=this._active[v].unhook(!1),_ instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,_}else this._handlerFb(this._ident,"UNHOOK",C);this._active=y,this._ident=0}};const S=new p.Params;S.addParam(0),a.DcsHandler=class{constructor(C){this._handler=C,this._data="",this._params=S,this._hitLimit=!1}hook(C){this._params=C.length>1||C.params[0]?C.clone():S,this._data="",this._hitLimit=!1}put(C,w,_){this._hitLimit||(this._data+=(0,f.utf32ToString)(C,w,_),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(C){let w=!1;if(this._hitLimit)w=!1;else if(C&&(w=this._handler(this._data,this._params),w instanceof Promise))return w.then((_=>(this._params=S,this._data="",this._hitLimit=!1,_)));return this._params=S,this._data="",this._hitLimit=!1,w}}},2015:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const f=u(844),p=u(8742),h=u(6242),y=u(6351);class S{constructor(v){this.table=new Uint8Array(v)}setDefault(v,b){this.table.fill(v<<4|b)}add(v,b,x,E){this.table[b<<8|v]=x<<4|E}addMany(v,b,x,E){for(let N=0;N<v.length;N++)this.table[b<<8|v[N]]=x<<4|E}}a.TransitionTable=S;const C=160;a.VT500_TRANSITION_TABLE=(function(){const _=new S(4095),v=Array.apply(null,Array(256)).map(((M,T)=>T)),b=(M,T)=>v.slice(M,T),x=b(32,127),E=b(0,24);E.push(25),E.push.apply(E,b(28,32));const N=b(0,14);let A;for(A in _.setDefault(1,0),_.addMany(x,0,2,0),N)_.addMany([24,26,153,154],A,3,0),_.addMany(b(128,144),A,3,0),_.addMany(b(144,152),A,3,0),_.add(156,A,0,0),_.add(27,A,11,1),_.add(157,A,4,8),_.addMany([152,158,159],A,0,7),_.add(155,A,11,3),_.add(144,A,11,9);return _.addMany(E,0,3,0),_.addMany(E,1,3,1),_.add(127,1,0,1),_.addMany(E,8,0,8),_.addMany(E,3,3,3),_.add(127,3,0,3),_.addMany(E,4,3,4),_.add(127,4,0,4),_.addMany(E,6,3,6),_.addMany(E,5,3,5),_.add(127,5,0,5),_.addMany(E,2,3,2),_.add(127,2,0,2),_.add(93,1,4,8),_.addMany(x,8,5,8),_.add(127,8,5,8),_.addMany([156,27,24,26,7],8,6,0),_.addMany(b(28,32),8,0,8),_.addMany([88,94,95],1,0,7),_.addMany(x,7,0,7),_.addMany(E,7,0,7),_.add(156,7,0,0),_.add(127,7,0,7),_.add(91,1,11,3),_.addMany(b(64,127),3,7,0),_.addMany(b(48,60),3,8,4),_.addMany([60,61,62,63],3,9,4),_.addMany(b(48,60),4,8,4),_.addMany(b(64,127),4,7,0),_.addMany([60,61,62,63],4,0,6),_.addMany(b(32,64),6,0,6),_.add(127,6,0,6),_.addMany(b(64,127),6,0,0),_.addMany(b(32,48),3,9,5),_.addMany(b(32,48),5,9,5),_.addMany(b(48,64),5,0,6),_.addMany(b(64,127),5,7,0),_.addMany(b(32,48),4,9,5),_.addMany(b(32,48),1,9,2),_.addMany(b(32,48),2,9,2),_.addMany(b(48,127),2,10,0),_.addMany(b(48,80),1,10,0),_.addMany(b(81,88),1,10,0),_.addMany([89,90,92],1,10,0),_.addMany(b(96,127),1,10,0),_.add(80,1,11,9),_.addMany(E,9,0,9),_.add(127,9,0,9),_.addMany(b(28,32),9,0,9),_.addMany(b(32,48),9,9,12),_.addMany(b(48,60),9,8,10),_.addMany([60,61,62,63],9,9,10),_.addMany(E,11,0,11),_.addMany(b(32,128),11,0,11),_.addMany(b(28,32),11,0,11),_.addMany(E,10,0,10),_.add(127,10,0,10),_.addMany(b(28,32),10,0,10),_.addMany(b(48,60),10,8,10),_.addMany([60,61,62,63],10,0,11),_.addMany(b(32,48),10,9,12),_.addMany(E,12,0,12),_.add(127,12,0,12),_.addMany(b(28,32),12,0,12),_.addMany(b(32,48),12,9,12),_.addMany(b(48,64),12,0,11),_.addMany(b(64,127),12,12,13),_.addMany(b(64,127),10,12,13),_.addMany(b(64,127),9,12,13),_.addMany(E,13,13,13),_.addMany(x,13,13,13),_.add(127,13,0,13),_.addMany([27,156,24,26],13,14,0),_.add(C,0,2,0),_.add(C,8,5,8),_.add(C,6,0,6),_.add(C,11,0,11),_.add(C,13,13,13),_})();class w extends f.Disposable{constructor(v=a.VT500_TRANSITION_TABLE){super(),this._transitions=v,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new p.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(b,x,E)=>{},this._executeHandlerFb=b=>{},this._csiHandlerFb=(b,x)=>{},this._escHandlerFb=b=>{},this._errorHandlerFb=b=>b,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,f.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new h.OscParser),this._dcsParser=this.register(new y.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(v,b=[64,126]){let x=0;if(v.prefix){if(v.prefix.length>1)throw new Error("only one byte as prefix supported");if(x=v.prefix.charCodeAt(0),x&&60>x||x>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(v.intermediates){if(v.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let N=0;N<v.intermediates.length;++N){const A=v.intermediates.charCodeAt(N);if(32>A||A>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");x<<=8,x|=A}}if(v.final.length!==1)throw new Error("final must be a single byte");const E=v.final.charCodeAt(0);if(b[0]>E||E>b[1])throw new Error(`final must be in range ${b[0]} .. ${b[1]}`);return x<<=8,x|=E,x}identToString(v){const b=[];for(;v;)b.push(String.fromCharCode(255&v)),v>>=8;return b.reverse().join("")}setPrintHandler(v){this._printHandler=v}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(v,b){const x=this._identifier(v,[48,126]);this._escHandlers[x]===void 0&&(this._escHandlers[x]=[]);const E=this._escHandlers[x];return E.push(b),{dispose:()=>{const N=E.indexOf(b);N!==-1&&E.splice(N,1)}}}clearEscHandler(v){this._escHandlers[this._identifier(v,[48,126])]&&delete this._escHandlers[this._identifier(v,[48,126])]}setEscHandlerFallback(v){this._escHandlerFb=v}setExecuteHandler(v,b){this._executeHandlers[v.charCodeAt(0)]=b}clearExecuteHandler(v){this._executeHandlers[v.charCodeAt(0)]&&delete this._executeHandlers[v.charCodeAt(0)]}setExecuteHandlerFallback(v){this._executeHandlerFb=v}registerCsiHandler(v,b){const x=this._identifier(v);this._csiHandlers[x]===void 0&&(this._csiHandlers[x]=[]);const E=this._csiHandlers[x];return E.push(b),{dispose:()=>{const N=E.indexOf(b);N!==-1&&E.splice(N,1)}}}clearCsiHandler(v){this._csiHandlers[this._identifier(v)]&&delete this._csiHandlers[this._identifier(v)]}setCsiHandlerFallback(v){this._csiHandlerFb=v}registerDcsHandler(v,b){return this._dcsParser.registerHandler(this._identifier(v),b)}clearDcsHandler(v){this._dcsParser.clearHandler(this._identifier(v))}setDcsHandlerFallback(v){this._dcsParser.setHandlerFallback(v)}registerOscHandler(v,b){return this._oscParser.registerHandler(v,b)}clearOscHandler(v){this._oscParser.clearHandler(v)}setOscHandlerFallback(v){this._oscParser.setHandlerFallback(v)}setErrorHandler(v){this._errorHandler=v}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(v,b,x,E,N){this._parseStack.state=v,this._parseStack.handlers=b,this._parseStack.handlerPos=x,this._parseStack.transition=E,this._parseStack.chunkPos=N}parse(v,b,x){let E,N=0,A=0,M=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,M=this._parseStack.chunkPos+1;else{if(x===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const T=this._parseStack.handlers;let j=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(x===!1&&j>-1){for(;j>=0&&(E=T[j](this._params),E!==!0);j--)if(E instanceof Promise)return this._parseStack.handlerPos=j,E}this._parseStack.handlers=[];break;case 4:if(x===!1&&j>-1){for(;j>=0&&(E=T[j](),E!==!0);j--)if(E instanceof Promise)return this._parseStack.handlerPos=j,E}this._parseStack.handlers=[];break;case 6:if(N=v[this._parseStack.chunkPos],E=this._dcsParser.unhook(N!==24&&N!==26,x),E)return E;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(N=v[this._parseStack.chunkPos],E=this._oscParser.end(N!==24&&N!==26,x),E)return E;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,M=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let T=M;T<b;++T){switch(N=v[T],A=this._transitions.table[this.currentState<<8|(N<160?N:C)],A>>4){case 2:for(let $=T+1;;++$){if($>=b||(N=v[$])<32||N>126&&N<C){this._printHandler(v,T,$),T=$-1;break}if(++$>=b||(N=v[$])<32||N>126&&N<C){this._printHandler(v,T,$),T=$-1;break}if(++$>=b||(N=v[$])<32||N>126&&N<C){this._printHandler(v,T,$),T=$-1;break}if(++$>=b||(N=v[$])<32||N>126&&N<C){this._printHandler(v,T,$),T=$-1;break}}break;case 3:this._executeHandlers[N]?this._executeHandlers[N]():this._executeHandlerFb(N),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:T,code:N,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const j=this._csiHandlers[this._collect<<8|N];let O=j?j.length-1:-1;for(;O>=0&&(E=j[O](this._params),E!==!0);O--)if(E instanceof Promise)return this._preserveStack(3,j,O,A,T),E;O<0&&this._csiHandlerFb(this._collect<<8|N,this._params),this.precedingJoinState=0;break;case 8:do switch(N){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(N-48)}while(++T<b&&(N=v[T])>47&&N<60);T--;break;case 9:this._collect<<=8,this._collect|=N;break;case 10:const F=this._escHandlers[this._collect<<8|N];let U=F?F.length-1:-1;for(;U>=0&&(E=F[U](),E!==!0);U--)if(E instanceof Promise)return this._preserveStack(4,F,U,A,T),E;U<0&&this._escHandlerFb(this._collect<<8|N),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|N,this._params);break;case 13:for(let $=T+1;;++$)if($>=b||(N=v[$])===24||N===26||N===27||N>127&&N<C){this._dcsParser.put(v,T,$),T=$-1;break}break;case 14:if(E=this._dcsParser.unhook(N!==24&&N!==26),E)return this._preserveStack(6,[],0,A,T),E;N===27&&(A|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let $=T+1;;$++)if($>=b||(N=v[$])<32||N>127&&N<C){this._oscParser.put(v,T,$),T=$-1;break}break;case 6:if(E=this._oscParser.end(N!==24&&N!==26),E)return this._preserveStack(5,[],0,A,T),E;N===27&&(A|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&A}}}a.EscapeSequenceParser=w},6242:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const f=u(5770),p=u(482),h=[];a.OscParser=class{constructor(){this._state=0,this._active=h,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(y,S){this._handlers[y]===void 0&&(this._handlers[y]=[]);const C=this._handlers[y];return C.push(S),{dispose:()=>{const w=C.indexOf(S);w!==-1&&C.splice(w,1)}}}clearHandler(y){this._handlers[y]&&delete this._handlers[y]}setHandlerFallback(y){this._handlerFb=y}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let y=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;y>=0;--y)this._active[y].end(!1);this._stack.paused=!1,this._active=h,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||h,this._active.length)for(let y=this._active.length-1;y>=0;y--)this._active[y].start();else this._handlerFb(this._id,"START")}_put(y,S,C){if(this._active.length)for(let w=this._active.length-1;w>=0;w--)this._active[w].put(y,S,C);else this._handlerFb(this._id,"PUT",(0,p.utf32ToString)(y,S,C))}start(){this.reset(),this._state=1}put(y,S,C){if(this._state!==3){if(this._state===1)for(;S<C;){const w=y[S++];if(w===59){this._state=2,this._start();break}if(w<48||57<w)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+w-48}this._state===2&&C-S>0&&this._put(y,S,C)}}end(y,S=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let C=!1,w=this._active.length-1,_=!1;if(this._stack.paused&&(w=this._stack.loopPosition-1,C=S,_=this._stack.fallThrough,this._stack.paused=!1),!_&&C===!1){for(;w>=0&&(C=this._active[w].end(y),C!==!0);w--)if(C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=w,this._stack.fallThrough=!1,C;w--}for(;w>=0;w--)if(C=this._active[w].end(!1),C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=w,this._stack.fallThrough=!0,C}else this._handlerFb(this._id,"END",y);this._active=h,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(y){this._handler=y,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(y,S,C){this._hitLimit||(this._data+=(0,p.utf32ToString)(y,S,C),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(y){let S=!1;if(this._hitLimit)S=!1;else if(y&&(S=this._handler(this._data),S instanceof Promise))return S.then((C=>(this._data="",this._hitLimit=!1,C)));return this._data="",this._hitLimit=!1,S}}},8742:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const u=2147483647;class f{static fromArray(h){const y=new f;if(!h.length)return y;for(let S=Array.isArray(h[0])?1:0;S<h.length;++S){const C=h[S];if(Array.isArray(C))for(let w=0;w<C.length;++w)y.addSubParam(C[w]);else y.addParam(C)}return y}constructor(h=32,y=32){if(this.maxLength=h,this.maxSubParamsLength=y,y>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(y),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new f(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h}toArray(){const h=[];for(let y=0;y<this.length;++y){h.push(this.params[y]);const S=this._subParamsIdx[y]>>8,C=255&this._subParamsIdx[y];C-S>0&&h.push(Array.prototype.slice.call(this._subParams,S,C))}return h}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>u?u:h}}addSubParam(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>u?u:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const y=this._subParamsIdx[h]>>8,S=255&this._subParamsIdx[h];return S-y>0?this._subParams.subarray(y,S):null}getSubParamsAll(){const h={};for(let y=0;y<this.length;++y){const S=this._subParamsIdx[y]>>8,C=255&this._subParamsIdx[y];C-S>0&&(h[y]=this._subParams.slice(S,C))}return h}addDigit(h){let y;if(this._rejectDigits||!(y=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const S=this._digitIsSub?this._subParams:this.params,C=S[y-1];S[y-1]=~C?Math.min(10*C+h,u):h}}a.Params=f},5741:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,f){const p={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(p),f.dispose=()=>this._wrappedAddonDispose(p),f.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let f=-1;for(let p=0;p<this._addons.length;p++)if(this._addons[p]===u){f=p;break}if(f===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(f,1)}}},8771:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const f=u(3785),p=u(511);a.BufferApiView=class{constructor(h,y){this._buffer=h,this.type=y}init(h){return this._buffer=h,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(h){const y=this._buffer.lines.get(h);if(y)return new f.BufferLineApiView(y)}getNullCell(){return new p.CellData}}},3785:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const f=u(511);a.BufferLineApiView=class{constructor(p){this._line=p}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(p,h){if(!(p<0||p>=this._line.length))return h?(this._line.loadCell(p,h),h):this._line.loadCell(p,new f.CellData)}translateToString(p,h,y){return this._line.translateToString(p,h,y)}}},8285:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const f=u(8771),p=u(8460),h=u(844);class y extends h.Disposable{constructor(C){super(),this._core=C,this._onBufferChange=this.register(new p.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new f.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new f.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}a.BufferNamespaceApi=y},7975:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,f){return this._core.registerCsiHandler(u,(p=>f(p.toArray())))}addCsiHandler(u,f){return this.registerCsiHandler(u,f)}registerDcsHandler(u,f){return this._core.registerDcsHandler(u,((p,h)=>f(p,h.toArray())))}addDcsHandler(u,f){return this.registerDcsHandler(u,f)}registerEscHandler(u,f){return this._core.registerEscHandler(u,f)}addEscHandler(u,f){return this.registerEscHandler(u,f)}registerOscHandler(u,f){return this._core.registerOscHandler(u,f)}addOscHandler(u,f){return this.registerOscHandler(u,f)}}},7090:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(u){this._core=u}register(u){this._core.unicodeService.register(u)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(u){this._core.unicodeService.activeVersion=u}}},744:function(d,a,u){var f=this&&this.__decorate||function(_,v,b,x){var E,N=arguments.length,A=N<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,b):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(_,v,b,x);else for(var M=_.length-1;M>=0;M--)(E=_[M])&&(A=(N<3?E(A):N>3?E(v,b,A):E(v,b))||A);return N>3&&A&&Object.defineProperty(v,b,A),A},p=this&&this.__param||function(_,v){return function(b,x){v(b,x,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const h=u(8460),y=u(844),S=u(5295),C=u(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let w=a.BufferService=class extends y.Disposable{get buffer(){return this.buffers.active}constructor(_){super(),this.isUserScrolling=!1,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(_.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(_.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new S.BufferSet(_,this))}resize(_,v){this.cols=_,this.rows=v,this.buffers.resize(_,v),this._onResize.fire({cols:_,rows:v})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(_,v=!1){const b=this.buffer;let x;x=this._cachedBlankLine,x&&x.length===this.cols&&x.getFg(0)===_.fg&&x.getBg(0)===_.bg||(x=b.getBlankLine(_,v),this._cachedBlankLine=x),x.isWrapped=v;const E=b.ybase+b.scrollTop,N=b.ybase+b.scrollBottom;if(b.scrollTop===0){const A=b.lines.isFull;N===b.lines.length-1?A?b.lines.recycle().copyFrom(x):b.lines.push(x.clone()):b.lines.splice(N+1,0,x.clone()),A?this.isUserScrolling&&(b.ydisp=Math.max(b.ydisp-1,0)):(b.ybase++,this.isUserScrolling||b.ydisp++)}else{const A=N-E+1;b.lines.shiftElements(E+1,A-1,-1),b.lines.set(N,x.clone())}this.isUserScrolling||(b.ydisp=b.ybase),this._onScroll.fire(b.ydisp)}scrollLines(_,v,b){const x=this.buffer;if(_<0){if(x.ydisp===0)return;this.isUserScrolling=!0}else _+x.ydisp>=x.ybase&&(this.isUserScrolling=!1);const E=x.ydisp;x.ydisp=Math.max(Math.min(x.ydisp+_,x.ybase),0),E!==x.ydisp&&(v||this._onScroll.fire(x.ydisp))}};a.BufferService=w=f([p(0,C.IOptionsService)],w)},7994:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0,a.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,f){this._charsets[u]=f,this.glevel===u&&(this.charset=f)}}},1753:function(d,a,u){var f=this&&this.__decorate||function(x,E,N,A){var M,T=arguments.length,j=T<3?E:A===null?A=Object.getOwnPropertyDescriptor(E,N):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(x,E,N,A);else for(var O=x.length-1;O>=0;O--)(M=x[O])&&(j=(T<3?M(j):T>3?M(E,N,j):M(E,N))||j);return T>3&&j&&Object.defineProperty(E,N,j),j},p=this&&this.__param||function(x,E){return function(N,A){E(N,A,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const h=u(2585),y=u(8460),S=u(844),C={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:x=>x.button!==4&&x.action===1&&(x.ctrl=!1,x.alt=!1,x.shift=!1,!0)},VT200:{events:19,restrict:x=>x.action!==32},DRAG:{events:23,restrict:x=>x.action!==32||x.button!==3},ANY:{events:31,restrict:x=>!0}};function w(x,E){let N=(x.ctrl?16:0)|(x.shift?4:0)|(x.alt?8:0);return x.button===4?(N|=64,N|=x.action):(N|=3&x.button,4&x.button&&(N|=64),8&x.button&&(N|=128),x.action===32?N|=32:x.action!==0||E||(N|=3)),N}const _=String.fromCharCode,v={DEFAULT:x=>{const E=[w(x,!1)+32,x.col+32,x.row+32];return E[0]>255||E[1]>255||E[2]>255?"":`\x1B[M${_(E[0])}${_(E[1])}${_(E[2])}`},SGR:x=>{const E=x.action===0&&x.button!==4?"m":"M";return`\x1B[<${w(x,!0)};${x.col};${x.row}${E}`},SGR_PIXELS:x=>{const E=x.action===0&&x.button!==4?"m":"M";return`\x1B[<${w(x,!0)};${x.x};${x.y}${E}`}};let b=a.CoreMouseService=class extends S.Disposable{constructor(x,E){super(),this._bufferService=x,this._coreService=E,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new y.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const N of Object.keys(C))this.addProtocol(N,C[N]);for(const N of Object.keys(v))this.addEncoding(N,v[N]);this.reset()}addProtocol(x,E){this._protocols[x]=E}addEncoding(x,E){this._encodings[x]=E}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(x){if(!this._protocols[x])throw new Error(`unknown protocol "${x}"`);this._activeProtocol=x,this._onProtocolChange.fire(this._protocols[x].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(x){if(!this._encodings[x])throw new Error(`unknown encoding "${x}"`);this._activeEncoding=x}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(x){if(x.col<0||x.col>=this._bufferService.cols||x.row<0||x.row>=this._bufferService.rows||x.button===4&&x.action===32||x.button===3&&x.action!==32||x.button!==4&&(x.action===2||x.action===3)||(x.col++,x.row++,x.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,x,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(x))return!1;const E=this._encodings[this._activeEncoding](x);return E&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(E):this._coreService.triggerDataEvent(E,!0)),this._lastEvent=x,!0}explainEvents(x){return{down:!!(1&x),up:!!(2&x),drag:!!(4&x),move:!!(8&x),wheel:!!(16&x)}}_equalEvents(x,E,N){if(N){if(x.x!==E.x||x.y!==E.y)return!1}else if(x.col!==E.col||x.row!==E.row)return!1;return x.button===E.button&&x.action===E.action&&x.ctrl===E.ctrl&&x.alt===E.alt&&x.shift===E.shift}};a.CoreMouseService=b=f([p(0,h.IBufferService),p(1,h.ICoreService)],b)},6975:function(d,a,u){var f=this&&this.__decorate||function(b,x,E,N){var A,M=arguments.length,T=M<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,E):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(b,x,E,N);else for(var j=b.length-1;j>=0;j--)(A=b[j])&&(T=(M<3?A(T):M>3?A(x,E,T):A(x,E))||T);return M>3&&T&&Object.defineProperty(x,E,T),T},p=this&&this.__param||function(b,x){return function(E,N){x(E,N,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const h=u(1439),y=u(8460),S=u(844),C=u(2585),w=Object.freeze({insertMode:!1}),_=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let v=a.CoreService=class extends S.Disposable{constructor(b,x,E){super(),this._bufferService=b,this._logService=x,this._optionsService=E,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new y.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new y.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new y.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new y.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(w),this.decPrivateModes=(0,h.clone)(_)}reset(){this.modes=(0,h.clone)(w),this.decPrivateModes=(0,h.clone)(_)}triggerDataEvent(b,x=!1){if(this._optionsService.rawOptions.disableStdin)return;const E=this._bufferService.buffer;x&&this._optionsService.rawOptions.scrollOnUserInput&&E.ybase!==E.ydisp&&this._onRequestScrollToBottom.fire(),x&&this._onUserInput.fire(),this._logService.debug(`sending data "${b}"`,(()=>b.split("").map((N=>N.charCodeAt(0))))),this._onData.fire(b)}triggerBinaryEvent(b){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${b}"`,(()=>b.split("").map((x=>x.charCodeAt(0))))),this._onBinary.fire(b))}};a.CoreService=v=f([p(0,C.IBufferService),p(1,C.ILogService),p(2,C.IOptionsService)],v)},9074:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const f=u(8055),p=u(8460),h=u(844),y=u(6106);let S=0,C=0;class w extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new y.SortedList((b=>b==null?void 0:b.marker.line)),this._onDecorationRegistered=this.register(new p.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new p.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)((()=>this.reset())))}registerDecoration(b){if(b.marker.isDisposed)return;const x=new _(b);if(x){const E=x.marker.onDispose((()=>x.dispose()));x.onDispose((()=>{x&&(this._decorations.delete(x)&&this._onDecorationRemoved.fire(x),E.dispose())})),this._decorations.insert(x),this._onDecorationRegistered.fire(x)}return x}reset(){for(const b of this._decorations.values())b.dispose();this._decorations.clear()}*getDecorationsAtCell(b,x,E){var M,T,j;let N=0,A=0;for(const O of this._decorations.getKeyIterator(x))N=(M=O.options.x)!=null?M:0,A=N+((T=O.options.width)!=null?T:1),b>=N&&b<A&&(!E||((j=O.options.layer)!=null?j:"bottom")===E)&&(yield O)}forEachDecorationAtCell(b,x,E,N){this._decorations.forEachByKey(x,(A=>{var M,T,j;S=(M=A.options.x)!=null?M:0,C=S+((T=A.options.width)!=null?T:1),b>=S&&b<C&&(!E||((j=A.options.layer)!=null?j:"bottom")===E)&&N(A)}))}}a.DecorationService=w;class _ extends h.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=f.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=f.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(b){super(),this.options=b,this.onRenderEmitter=this.register(new p.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new p.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=b.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const f=u(2585),p=u(8343);class h{constructor(...S){this._entries=new Map;for(const[C,w]of S)this.set(C,w)}set(S,C){const w=this._entries.get(S);return this._entries.set(S,C),w}forEach(S){for(const[C,w]of this._entries.entries())S(C,w)}has(S){return this._entries.has(S)}get(S){return this._entries.get(S)}}a.ServiceCollection=h,a.InstantiationService=class{constructor(){this._services=new h,this._services.set(f.IInstantiationService,this)}setService(y,S){this._services.set(y,S)}getService(y){return this._services.get(y)}createInstance(y,...S){const C=(0,p.getServiceDependencies)(y).sort(((v,b)=>v.index-b.index)),w=[];for(const v of C){const b=this._services.get(v.id);if(!b)throw new Error(`[createInstance] ${y.name} depends on UNKNOWN service ${v.id}.`);w.push(b)}const _=C.length>0?C[0].index:S.length;if(S.length!==_)throw new Error(`[createInstance] First service dependency of ${y.name} at position ${_+1} conflicts with ${S.length} static arguments`);return new y(...S,...w)}}},7866:function(d,a,u){var f=this&&this.__decorate||function(_,v,b,x){var E,N=arguments.length,A=N<3?v:x===null?x=Object.getOwnPropertyDescriptor(v,b):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(_,v,b,x);else for(var M=_.length-1;M>=0;M--)(E=_[M])&&(A=(N<3?E(A):N>3?E(v,b,A):E(v,b))||A);return N>3&&A&&Object.defineProperty(v,b,A),A},p=this&&this.__param||function(_,v){return function(b,x){v(b,x,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const h=u(844),y=u(2585),S={trace:y.LogLevelEnum.TRACE,debug:y.LogLevelEnum.DEBUG,info:y.LogLevelEnum.INFO,warn:y.LogLevelEnum.WARN,error:y.LogLevelEnum.ERROR,off:y.LogLevelEnum.OFF};let C,w=a.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(_){super(),this._optionsService=_,this._logLevel=y.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),C=this}_updateLogLevel(){this._logLevel=S[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(_){for(let v=0;v<_.length;v++)typeof _[v]=="function"&&(_[v]=_[v]())}_log(_,v,b){this._evalLazyOptionalParams(b),_.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+v,...b)}trace(_,...v){var b,x;this._logLevel<=y.LogLevelEnum.TRACE&&this._log((x=(b=this._optionsService.options.logger)==null?void 0:b.trace.bind(this._optionsService.options.logger))!=null?x:console.log,_,v)}debug(_,...v){var b,x;this._logLevel<=y.LogLevelEnum.DEBUG&&this._log((x=(b=this._optionsService.options.logger)==null?void 0:b.debug.bind(this._optionsService.options.logger))!=null?x:console.log,_,v)}info(_,...v){var b,x;this._logLevel<=y.LogLevelEnum.INFO&&this._log((x=(b=this._optionsService.options.logger)==null?void 0:b.info.bind(this._optionsService.options.logger))!=null?x:console.info,_,v)}warn(_,...v){var b,x;this._logLevel<=y.LogLevelEnum.WARN&&this._log((x=(b=this._optionsService.options.logger)==null?void 0:b.warn.bind(this._optionsService.options.logger))!=null?x:console.warn,_,v)}error(_,...v){var b,x;this._logLevel<=y.LogLevelEnum.ERROR&&this._log((x=(b=this._optionsService.options.logger)==null?void 0:b.error.bind(this._optionsService.options.logger))!=null?x:console.error,_,v)}};a.LogService=w=f([p(0,y.IOptionsService)],w),a.setTraceLogger=function(_){C=_},a.traceCall=function(_,v,b){if(typeof b.value!="function")throw new Error("not supported");const x=b.value;b.value=function(...E){if(C.logLevel!==y.LogLevelEnum.TRACE)return x.apply(this,E);C.trace(`GlyphRenderer#${x.name}(${E.map((A=>JSON.stringify(A))).join(", ")})`);const N=x.apply(this,E);return C.trace(`GlyphRenderer#${x.name} return`,N),N}}},7302:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const f=u(8460),p=u(844),h=u(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:h.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const y=["normal","bold","100","200","300","400","500","600","700","800","900"];class S extends p.Disposable{constructor(w){super(),this._onOptionChange=this.register(new f.EventEmitter),this.onOptionChange=this._onOptionChange.event;const _={...a.DEFAULT_OPTIONS};for(const v in w)if(v in _)try{const b=w[v];_[v]=this._sanitizeAndValidateOption(v,b)}catch(b){console.error(b)}this.rawOptions=_,this.options={..._},this._setupOptions(),this.register((0,p.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(w,_){return this.onOptionChange((v=>{v===w&&_(this.rawOptions[w])}))}onMultipleOptionChange(w,_){return this.onOptionChange((v=>{w.indexOf(v)!==-1&&_()}))}_setupOptions(){const w=v=>{if(!(v in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);return this.rawOptions[v]},_=(v,b)=>{if(!(v in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);b=this._sanitizeAndValidateOption(v,b),this.rawOptions[v]!==b&&(this.rawOptions[v]=b,this._onOptionChange.fire(v))};for(const v in this.rawOptions){const b={get:w.bind(this,v),set:_.bind(this,v)};Object.defineProperty(this.options,v,b)}}_sanitizeAndValidateOption(w,_){switch(w){case"cursorStyle":if(_||(_=a.DEFAULT_OPTIONS[w]),!(function(v){return v==="block"||v==="underline"||v==="bar"})(_))throw new Error(`"${_}" is not a valid value for ${w}`);break;case"wordSeparator":_||(_=a.DEFAULT_OPTIONS[w]);break;case"fontWeight":case"fontWeightBold":if(typeof _=="number"&&1<=_&&_<=1e3)break;_=y.includes(_)?_:a.DEFAULT_OPTIONS[w];break;case"cursorWidth":_=Math.floor(_);case"lineHeight":case"tabStopWidth":if(_<1)throw new Error(`${w} cannot be less than 1, value: ${_}`);break;case"minimumContrastRatio":_=Math.max(1,Math.min(21,Math.round(10*_)/10));break;case"scrollback":if((_=Math.min(_,4294967295))<0)throw new Error(`${w} cannot be less than 0, value: ${_}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(_<=0)throw new Error(`${w} cannot be less than or equal to 0, value: ${_}`);break;case"rows":case"cols":if(!_&&_!==0)throw new Error(`${w} must be numeric, value: ${_}`);break;case"windowsPty":_=_!=null?_:{}}return _}}a.OptionsService=S},2660:function(d,a,u){var f=this&&this.__decorate||function(S,C,w,_){var v,b=arguments.length,x=b<3?C:_===null?_=Object.getOwnPropertyDescriptor(C,w):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(S,C,w,_);else for(var E=S.length-1;E>=0;E--)(v=S[E])&&(x=(b<3?v(x):b>3?v(C,w,x):v(C,w))||x);return b>3&&x&&Object.defineProperty(C,w,x),x},p=this&&this.__param||function(S,C){return function(w,_){C(w,_,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const h=u(2585);let y=a.OscLinkService=class{constructor(S){this._bufferService=S,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(S){const C=this._bufferService.buffer;if(S.id===void 0){const E=C.addMarker(C.ybase+C.y),N={data:S,id:this._nextId++,lines:[E]};return E.onDispose((()=>this._removeMarkerFromLink(N,E))),this._dataByLinkId.set(N.id,N),N.id}const w=S,_=this._getEntryIdKey(w),v=this._entriesWithId.get(_);if(v)return this.addLineToLink(v.id,C.ybase+C.y),v.id;const b=C.addMarker(C.ybase+C.y),x={id:this._nextId++,key:this._getEntryIdKey(w),data:w,lines:[b]};return b.onDispose((()=>this._removeMarkerFromLink(x,b))),this._entriesWithId.set(x.key,x),this._dataByLinkId.set(x.id,x),x.id}addLineToLink(S,C){const w=this._dataByLinkId.get(S);if(w&&w.lines.every((_=>_.line!==C))){const _=this._bufferService.buffer.addMarker(C);w.lines.push(_),_.onDispose((()=>this._removeMarkerFromLink(w,_)))}}getLinkData(S){var C;return(C=this._dataByLinkId.get(S))==null?void 0:C.data}_getEntryIdKey(S){return`${S.id};;${S.uri}`}_removeMarkerFromLink(S,C){const w=S.lines.indexOf(C);w!==-1&&(S.lines.splice(w,1),S.lines.length===0&&(S.data.id!==void 0&&this._entriesWithId.delete(S.key),this._dataByLinkId.delete(S.id)))}};a.OscLinkService=y=f([p(0,h.IBufferService)],y)},8343:(d,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const u="di$target",f="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(p){return p[f]||[]},a.createDecorator=function(p){if(a.serviceRegistry.has(p))return a.serviceRegistry.get(p);const h=function(y,S,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(w,_,v){_[u]===_?_[f].push({id:w,index:v}):(_[f]=[{id:w,index:v}],_[u]=_)})(h,y,C)};return h.toString=()=>p,a.serviceRegistry.set(p,h),h}},2585:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const f=u(8343);var p;a.IBufferService=(0,f.createDecorator)("BufferService"),a.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),a.ICoreService=(0,f.createDecorator)("CoreService"),a.ICharsetService=(0,f.createDecorator)("CharsetService"),a.IInstantiationService=(0,f.createDecorator)("InstantiationService"),(function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"})(p||(a.LogLevelEnum=p={})),a.ILogService=(0,f.createDecorator)("LogService"),a.IOptionsService=(0,f.createDecorator)("OptionsService"),a.IOscLinkService=(0,f.createDecorator)("OscLinkService"),a.IUnicodeService=(0,f.createDecorator)("UnicodeService"),a.IDecorationService=(0,f.createDecorator)("DecorationService")},1480:(d,a,u)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const f=u(8460),p=u(225);class h{static extractShouldJoin(S){return(1&S)!=0}static extractWidth(S){return S>>1&3}static extractCharKind(S){return S>>3}static createPropertyValue(S,C,w=!1){return(16777215&S)<<3|(3&C)<<1|(w?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new f.EventEmitter,this.onChange=this._onChange.event;const S=new p.UnicodeV6;this.register(S),this._active=S.version,this._activeProvider=S}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(S){if(!this._providers[S])throw new Error(`unknown Unicode version "${S}"`);this._active=S,this._activeProvider=this._providers[S],this._onChange.fire(S)}register(S){this._providers[S.version]=S}wcwidth(S){return this._activeProvider.wcwidth(S)}getStringCellWidth(S){let C=0,w=0;const _=S.length;for(let v=0;v<_;++v){let b=S.charCodeAt(v);if(55296<=b&&b<=56319){if(++v>=_)return C+this.wcwidth(b);const N=S.charCodeAt(v);56320<=N&&N<=57343?b=1024*(b-55296)+N-56320+65536:C+=this.wcwidth(N)}const x=this.charProperties(b,w);let E=h.extractWidth(x);h.extractShouldJoin(x)&&(E-=h.extractWidth(w)),C+=E,w=x}return C}charProperties(S,C){return this._activeProvider.charProperties(S,C)}}a.UnicodeService=h}},i={};function o(d){var a=i[d];if(a!==void 0)return a.exports;var u=i[d]={exports:{}};return n[d].call(u.exports,u,u.exports,o),u.exports}var l={};return(()=>{var d=l;Object.defineProperty(d,"__esModule",{value:!0}),d.Terminal=void 0;const a=o(9042),u=o(3236),f=o(844),p=o(5741),h=o(8285),y=o(7975),S=o(7090),C=["cols","rows"];class w extends f.Disposable{constructor(v){super(),this._core=this.register(new u.Terminal(v)),this._addonManager=this.register(new p.AddonManager),this._publicOptions={...this._core.options};const b=E=>this._core.options[E],x=(E,N)=>{this._checkReadonlyOptions(E),this._core.options[E]=N};for(const E in this._core.options){const N={get:b.bind(this,E),set:x.bind(this,E)};Object.defineProperty(this._publicOptions,E,N)}}_checkReadonlyOptions(v){if(C.includes(v))throw new Error(`Option "${v}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new y.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new S.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new h.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const v=this._core.coreService.decPrivateModes;let b="none";switch(this._core.coreMouseService.activeProtocol){case"X10":b="x10";break;case"VT200":b="vt200";break;case"DRAG":b="drag";break;case"ANY":b="any"}return{applicationCursorKeysMode:v.applicationCursorKeys,applicationKeypadMode:v.applicationKeypad,bracketedPasteMode:v.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:b,originMode:v.origin,reverseWraparoundMode:v.reverseWraparound,sendFocusMode:v.sendFocus,wraparoundMode:v.wraparound}}get options(){return this._publicOptions}set options(v){for(const b in v)this._publicOptions[b]=v[b]}blur(){this._core.blur()}focus(){this._core.focus()}input(v,b=!0){this._core.input(v,b)}resize(v,b){this._verifyIntegers(v,b),this._core.resize(v,b)}open(v){this._core.open(v)}attachCustomKeyEventHandler(v){this._core.attachCustomKeyEventHandler(v)}attachCustomWheelEventHandler(v){this._core.attachCustomWheelEventHandler(v)}registerLinkProvider(v){return this._core.registerLinkProvider(v)}registerCharacterJoiner(v){return this._checkProposedApi(),this._core.registerCharacterJoiner(v)}deregisterCharacterJoiner(v){this._checkProposedApi(),this._core.deregisterCharacterJoiner(v)}registerMarker(v=0){return this._verifyIntegers(v),this._core.registerMarker(v)}registerDecoration(v){var b,x,E;return this._checkProposedApi(),this._verifyPositiveIntegers((b=v.x)!=null?b:0,(x=v.width)!=null?x:0,(E=v.height)!=null?E:0),this._core.registerDecoration(v)}hasSelection(){return this._core.hasSelection()}select(v,b,x){this._verifyIntegers(v,b,x),this._core.select(v,b,x)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(v,b){this._verifyIntegers(v,b),this._core.selectLines(v,b)}dispose(){super.dispose()}scrollLines(v){this._verifyIntegers(v),this._core.scrollLines(v)}scrollPages(v){this._verifyIntegers(v),this._core.scrollPages(v)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(v){this._verifyIntegers(v),this._core.scrollToLine(v)}clear(){this._core.clear()}write(v,b){this._core.write(v,b)}writeln(v,b){this._core.write(v),this._core.write(`\r
494
+ `,b)}paste(v){this._core.paste(v)}refresh(v,b){this._verifyIntegers(v,b),this._core.refresh(v,b)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(v){this._addonManager.loadAddon(this,v)}static get strings(){return a}_verifyIntegers(...v){for(const b of v)if(b===1/0||isNaN(b)||b%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...v){for(const b of v)if(b&&(b===1/0||isNaN(b)||b%1!=0||b<0))throw new Error("This API only accepts positive integers")}}d.Terminal=w})(),l})()))})(Ym)),Ym.exports}var c8=l8(),Xm={exports:{}},Ab;function u8(){return Ab||(Ab=1,(function(t,e){(function(n,i){t.exports=i()})(self,(()=>(()=>{var n={};return(()=>{var i=n;Object.defineProperty(i,"__esModule",{value:!0}),i.FitAddon=void 0,i.FitAddon=class{activate(o){this._terminal=o}dispose(){}fit(){const o=this.proposeDimensions();if(!o||!this._terminal||isNaN(o.cols)||isNaN(o.rows))return;const l=this._terminal._core;this._terminal.rows===o.rows&&this._terminal.cols===o.cols||(l._renderService.clear(),this._terminal.resize(o.cols,o.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const o=this._terminal._core,l=o._renderService.dimensions;if(l.css.cell.width===0||l.css.cell.height===0)return;const d=this._terminal.options.scrollback===0?0:o.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(a.getPropertyValue("height")),f=Math.max(0,parseInt(a.getPropertyValue("width"))),p=window.getComputedStyle(this._terminal.element),h=u-(parseInt(p.getPropertyValue("padding-top"))+parseInt(p.getPropertyValue("padding-bottom"))),y=f-(parseInt(p.getPropertyValue("padding-right"))+parseInt(p.getPropertyValue("padding-left")))-d;return{cols:Math.max(2,Math.floor(y/l.css.cell.width)),rows:Math.max(1,Math.floor(h/l.css.cell.height))}}}})(),n})()))})(Xm)),Xm.exports}var d8=u8(),Zm={exports:{}},Tb;function f8(){return Tb||(Tb=1,(function(t,e){(function(n,i){t.exports=i()})(self,(()=>(()=>{var n={6:(d,a)=>{function u(p){try{const h=new URL(p),y=h.password&&h.username?`${h.protocol}//${h.username}:${h.password}@${h.host}`:h.username?`${h.protocol}//${h.username}@${h.host}`:`${h.protocol}//${h.host}`;return p.toLocaleLowerCase().startsWith(y.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(p,h,y,S={}){this._terminal=p,this._regex=h,this._handler=y,this._options=S}provideLinks(p,h){const y=f.computeLink(p,this._regex,this._terminal,this._handler);h(this._addCallbacks(y))}_addCallbacks(p){return p.map((h=>(h.leave=this._options.leave,h.hover=(y,S)=>{if(this._options.hover){const{range:C}=h;this._options.hover(y,S,C)}},h)))}};class f{static computeLink(h,y,S,C){const w=new RegExp(y.source,(y.flags||"")+"g"),[_,v]=f._getWindowedLineStrings(h-1,S),b=_.join("");let x;const E=[];for(;x=w.exec(b);){const N=x[0];if(!u(N))continue;const[A,M]=f._mapStrIdx(S,v,0,x.index),[T,j]=f._mapStrIdx(S,A,M,N.length);if(A===-1||M===-1||T===-1||j===-1)continue;const O={start:{x:M+1,y:A+1},end:{x:j,y:T+1}};E.push({range:O,text:N,activate:C})}return E}static _getWindowedLineStrings(h,y){let S,C=h,w=h,_=0,v="";const b=[];if(S=y.buffer.active.getLine(h)){const x=S.translateToString(!0);if(S.isWrapped&&x[0]!==" "){for(_=0;(S=y.buffer.active.getLine(--C))&&_<2048&&(v=S.translateToString(!0),_+=v.length,b.push(v),S.isWrapped&&v.indexOf(" ")===-1););b.reverse()}for(b.push(x),_=0;(S=y.buffer.active.getLine(++w))&&S.isWrapped&&_<2048&&(v=S.translateToString(!0),_+=v.length,b.push(v),v.indexOf(" ")===-1););}return[b,C]}static _mapStrIdx(h,y,S,C){const w=h.buffer.active,_=w.getNullCell();let v=S;for(;C;){const b=w.getLine(y);if(!b)return[-1,-1];for(let x=v;x<b.length;++x){b.getCell(x,_);const E=_.getChars();if(_.getWidth()&&(C-=E.length||1,x===b.length-1&&E==="")){const N=w.getLine(y+1);N&&N.isWrapped&&(N.getCell(0,_),_.getWidth()===2&&(C+=1))}if(C<0)return[y,x]}y++,v=0}return[y,v]}}a.LinkComputer=f}},i={};function o(d){var a=i[d];if(a!==void 0)return a.exports;var u=i[d]={exports:{}};return n[d](u,u.exports,o),u.exports}var l={};return(()=>{var d=l;Object.defineProperty(d,"__esModule",{value:!0}),d.WebLinksAddon=void 0;const a=o(6),u=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function f(p,h){const y=window.open();if(y){try{y.opener=null}catch{}y.location.href=h}else console.warn("Opening link blocked as opener could not be cleared")}d.WebLinksAddon=class{constructor(p=f,h={}){this._handler=p,this._options=h}activate(p){this._terminal=p;const h=this._options,y=h.urlRegex||u;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,y,this._handler,h))}dispose(){var p;(p=this._linkProvider)==null||p.dispose()}}})(),l})()))})(Zm)),Zm.exports}var h8=f8();const po={INPUT:1,RESIZE:2,CLOSE:3,OUTPUT:4,EXIT:5,ERROR:6,INIT_ACK:7,TITLE:8};function Qm(t,e){const n=new Uint8Array(1+e.length);return n[0]=t,n.set(e,1),n}function p8(t,e){const{serverUrl:n,apiToken:i,cwd:o}=e,l=D.useRef(null),d=D.useRef(null),a=D.useRef(null),u=D.useRef("disconnected"),f=D.useRef(!1),p=D.useRef(0),h=D.useRef(e.onStatusChange),y=D.useRef(e.onExit),S=D.useRef(e.onSessionInit),C=D.useRef(e.onTitleChange);D.useEffect(()=>{h.current=e.onStatusChange,y.current=e.onExit,S.current=e.onSessionInit,C.current=e.onTitleChange});const w=D.useRef(n),_=D.useRef(i),v=D.useRef(o),b=D.useRef(e.serverSessionId);D.useEffect(()=>{w.current=n,_.current=i,v.current=o,b.current=e.serverSessionId});const x=D.useCallback(j=>{var O;u.current=j,(O=h.current)==null||O.call(h,j)},[]),E=D.useCallback(()=>{if(f.current)return;const j=++p.current,O=a.current;O&&(O.onopen=null,O.onclose=null,O.onmessage=null,O.onerror=null,O.close(),a.current=null),x("connecting");const F=b.current,U=F?`ws://${w.current}/ws/terminal?token=${_.current}&cwd=${encodeURIComponent(v.current)}&sessionId=${F}`:`ws://${w.current}/ws/terminal?token=${_.current}&cwd=${encodeURIComponent(v.current)}`,$=new WebSocket(U);$.binaryType="arraybuffer",$.onopen=()=>{if(p.current!==j){$.close();return}if(a.current=$,l.current&&d.current)try{d.current.fit()}catch{}},$.onmessage=G=>{var Z,I,L,B,H,P,ee,ne;if(p.current!==j||!(G.data instanceof ArrayBuffer))return;const K=new Uint8Array(G.data);if(K.length<1)return;const V=K[0],X=K.slice(1);switch(V){case po.OUTPUT:{const Q=new TextDecoder().decode(X);(Z=l.current)==null||Z.write(Q);break}case po.EXIT:{const{exitCode:Q}=JSON.parse(new TextDecoder().decode(X));x("exited"),(I=l.current)==null||I.writeln(`\r
495
+ [Process exited with code ${Q}]`),(L=y.current)==null||L.call(y,Q),$.close();break}case po.ERROR:{const{message:Q}=JSON.parse(new TextDecoder().decode(X));x("disconnected"),(B=l.current)==null||B.writeln(`\r
496
+ [Error: ${Q}]`);break}case po.INIT_ACK:{const Q=JSON.parse(new TextDecoder().decode(X));(H=S.current)==null||H.call(S,Q),Q.isReconnect&&Q.status==="exited"?(x("exited"),(P=l.current)==null||P.writeln(`\r
497
+ [Process exited with code ${Q.exitCode} while disconnected]`),(ee=y.current)==null||ee.call(y,Q.exitCode)):x("connected");break}case po.TITLE:{const{title:Q}=JSON.parse(new TextDecoder().decode(X));(ne=C.current)==null||ne.call(C,Q);break}}},$.onclose=()=>{var G;p.current===j&&(a.current=null,u.current==="connecting"?(x("disconnected"),(G=l.current)==null||G.writeln(`\r
498
+ [Connection failed]`)):u.current==="connected"&&x("disconnected"))},$.onerror=()=>{}},[x]);D.useEffect(()=>{const j=t();if(!j){console.log("[useTerminal] MAIN EFFECT: no container, returning early");return}N.current=!0,f.current=!1;const O=new c8.Terminal({cursorBlink:!0,cursorStyle:"bar",fontSize:13,fontFamily:"'Menlo', 'Monaco', 'Courier New', monospace",scrollback:1e3,allowProposedApi:!0,theme:{background:"var(--background)",foreground:"var(--foreground)",cursor:"var(--foreground)",selectionBackground:"var(--accent)"}}),F=new d8.FitAddon,U=new h8.WebLinksAddon;O.loadAddon(F),O.loadAddon(U);let $=!1;const G=requestAnimationFrame(()=>{if(!($||!j.isConnected))if(O.open(j),O.cols<=1||O.rows<=1){const K=()=>{if(!$){try{if(F.fit(),O.cols>1&&O.rows>1)return}catch{}requestAnimationFrame(K)}};requestAnimationFrame(K)}else try{F.fit()}catch{}});return l.current=O,d.current=F,O.onData(K=>{const V=a.current;if(!V||V.readyState!==WebSocket.OPEN)return;const X=new TextEncoder().encode(K);V.send(Qm(po.INPUT,X))}),O.onResize(({cols:K,rows:V})=>{const X=a.current;if(!X||X.readyState!==WebSocket.OPEN)return;const Z=new TextEncoder().encode(JSON.stringify({cols:K,rows:V}));X.send(Qm(po.RESIZE,Z))}),E(),()=>{$=!0,cancelAnimationFrame(G),f.current=!0;const K=a.current;K&&(K.onopen=null,K.onclose=null,K.onmessage=null,K.onerror=null,K.close(),a.current=null),O.dispose(),l.current=null,d.current=null}},[t,E]);const N=D.useRef(!0);D.useEffect(()=>{if(N.current){N.current=!1;return}const j=a.current;j&&(j.close(),a.current=null),!f.current&&l.current&&E()},[n,i,o,E]);const A=D.useCallback(()=>{var j;try{(j=d.current)==null||j.fit()}catch{}},[]),M=D.useCallback(()=>{var j;(j=l.current)==null||j.focus()},[]),T=D.useCallback(()=>{var O;const j=a.current;if(j){try{j.send(Qm(po.CLOSE,new Uint8Array(0)))}catch{}j.close(),a.current=null}(O=l.current)==null||O.dispose(),l.current=null,d.current=null,f.current=!0},[]);return{fit:A,focus:M,destroy:T}}const m8=D.forwardRef(function({serverUrl:e,apiToken:n,cwd:i,serverSessionId:o,onStatusChange:l,onExit:d,onSessionInit:a,onTitleChange:u},f){const p=D.useRef(null),h=D.useCallback(()=>p.current,[]),{fit:y,focus:S}=p8(h,{serverUrl:e,apiToken:n,cwd:i,serverSessionId:o,onStatusChange:l,onExit:d,onSessionInit:a,onTitleChange:u});return D.useImperativeHandle(f,()=>({focus:S}),[S]),D.useEffect(()=>{const C=p.current;if(!C)return;const w=new ResizeObserver(()=>{requestAnimationFrame(()=>y())});return w.observe(C),()=>{w.disconnect()}},[y]),D.useEffect(()=>{const C=p.current;if(!C)return;let w=0;const _=10,v=setInterval(()=>{if(w++,w>_){clearInterval(v);return}C.offsetParent!==null&&(clearInterval(v),requestAnimationFrame(()=>y()))},100);return()=>{clearInterval(v)}},[y]),g.jsx("div",{ref:p,className:"w-full h-full",onFocus:S})});function g8(){const t=me.c(2),[e,n]=D.useState(v8);let i,o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{const l=window.visualViewport;if(!l)return;const d=()=>{n({height:l.height,offsetTop:l.offsetTop,scale:l.scale})};return d(),l.addEventListener("resize",d),l.addEventListener("scroll",d),()=>{l.removeEventListener("resize",d),l.removeEventListener("scroll",d)}},o=[],t[0]=i,t[1]=o):(i=t[0],o=t[1]),D.useEffect(i,o),e}function v8(){return{height:typeof window<"u"?window.innerHeight:0,offsetTop:0,scale:1}}const _8=5,y8=300,b8=200,x8=.7,S8=D.forwardRef(function({workspaceId:e,workspacePath:n,workspaceName:i,serverUrl:o,apiToken:l,isOpen:d,onClose:a},u){var P,ee,ne;const f=Wu(),p=g8(),[h,y]=D.useState(new Map),[S,C]=D.useState(new Map),[w,_]=D.useState(y8),v=D.useRef(!1),b=D.useRef(0),x=D.useRef(0),E=D.useRef(new Set),N=D.useRef(new Map),A=e?(P=h.get(e))!=null?P:[]:[],M=e?S.get(e):void 0,j=(e&&(ne=(ee=h.get(e))==null?void 0:ee.length)!=null?ne:0)<_8,O=D.useCallback(async Q=>{if(!(!o||!l||E.current.has(Q))){E.current.add(Q);try{const W=await fetch(`http://${o}/api/workspaces/${Q}/terminals`,{headers:{Authorization:`Bearer ${l}`}});if(!W.ok)return;const q=await W.json();if(!q.sessions||q.sessions.length===0)return;const J=q.sessions.map(ie=>({id:crypto.randomUUID(),serverSessionId:ie.id,workspaceId:Q,workspacePath:ie.cwd,title:ie.title,status:"disconnected"}));y(ie=>{var Te;const ce=(Te=ie.get(Q))!=null?Te:[],ae=new Set(ce.map(Be=>Be.serverSessionId).filter(Boolean)),_e=J.filter(Be=>!ae.has(Be.serverSessionId));if(_e.length===0)return ie;if(ce.length>0){for(const Be of _e)fetch(`http://${o}/api/workspaces/${Q}/terminals/${Be.serverSessionId}`,{method:"DELETE",headers:{Authorization:`Bearer ${l}`}}).catch(()=>{});return ie}const Ee=new Map(ie);return Ee.set(Q,[...ce,..._e]),Ee}),C(ie=>{const ce=new Map(ie);return ce.has(Q)||ce.set(Q,J[0].id),ce})}catch(W){console.log("[TerminalPanel] fetchExistingSessions FAILED",W)}finally{E.current.delete(Q)}}},[o,l]);D.useEffect(()=>{!e||!d||O(e)},[e,d,O]);const F=D.useCallback((Q,W)=>{y(q=>{const J=new Map(q);for(const[ie,ce]of J.entries()){const ae=ce.map(_e=>_e.id===Q?{..._e,status:W}:_e);ae.some(_e=>_e.id===Q)&&J.set(ie,ae)}return J})},[]),U=D.useCallback((Q,W)=>{y(q=>{const J=new Map(q);for(const[ie,ce]of J.entries()){const ae=ce.map(_e=>_e.id===Q?{..._e,serverSessionId:W.sessionId,title:W.title||_e.title}:_e);ae.some(_e=>_e.id===Q)&&J.set(ie,ae)}return J})},[]),$=D.useCallback((Q,W)=>{y(q=>{const J=new Map(q);for(const[ie,ce]of J.entries()){const ae=ce.map(_e=>_e.id===Q?{..._e,title:W}:_e);ae.some(_e=>_e.id===Q)&&J.set(ie,ae)}return J})},[]),G=D.useCallback(()=>{if(!e||!n||!j)return;const Q={id:crypto.randomUUID(),serverSessionId:null,workspaceId:e,workspacePath:n,title:"main",status:"connecting"};y(W=>{var ie;const q=new Map(W),J=(ie=q.get(e))!=null?ie:[];return q.set(e,[...J,Q]),q}),C(W=>{const q=new Map(W);return q.set(e,Q.id),q})},[e,n,j]),K=D.useCallback(Q=>{const W=[...h.values()].flat().find(q=>q.id===Q);W!=null&&W.serverSessionId&&o&&l&&fetch(`http://${o}/api/workspaces/${W.workspaceId}/terminals/${W.serverSessionId}`,{method:"DELETE",headers:{Authorization:`Bearer ${l}`}}).catch(()=>{}),y(q=>{const J=new Map(q);for(const[ie,ce]of J.entries()){const ae=ce.filter(_e=>_e.id!==Q);ae.length<ce.length&&J.set(ie,ae)}return J}),C(q=>{var ie,ce;const J=new Map(q);for(const[ae,_e]of J.entries())if(_e===Q){const Ee=(ce=(ie=h.get(ae))==null?void 0:ie.filter(Te=>Te.id!==Q))!=null?ce:[];Ee.length>0?J.set(ae,Ee[Ee.length-1].id):J.delete(ae)}return J})},[h,o,l]);D.useEffect(()=>{var W;if(!e||!n||!d)return;((W=h.get(e))!=null?W:[]).length===0&&G()},[d,e,n,h,G]);const V=D.useCallback(()=>{var Q;(Q=N.current.get(M!=null?M:""))==null||Q.focus()},[M]);D.useImperativeHandle(u,()=>({focus:V}),[V]),D.useEffect(()=>{if(!d||A.length===0)return;const Q=setTimeout(V,300);return()=>clearTimeout(Q)},[d,A.length,V]);const X=D.useCallback(Q=>{Q.preventDefault(),v.current=!0;const W="touches"in Q?Q.touches[0].clientY:Q.clientY;b.current=W,x.current=w;const q=ie=>{if(!v.current)return;const ce="touches"in ie?ie.touches[0].clientY:ie.clientY,ae=b.current-ce,_e=window.innerHeight*x8,Ee=Math.min(Math.max(x.current+ae,b8),_e);_(Ee)},J=()=>{v.current=!1,document.removeEventListener("mousemove",q),document.removeEventListener("mouseup",J),document.removeEventListener("touchmove",q),document.removeEventListener("touchend",J)};document.addEventListener("mousemove",q),document.addEventListener("mouseup",J),document.addEventListener("touchmove",q,{passive:!1}),document.addEventListener("touchend",J)},[w]);if(!e||!n||!o||!l)return g.jsx("div",{className:"flex items-center justify-center h-[300px] border-t border-border bg-background text-muted-foreground text-sm",children:"Select a workspace to use the terminal."});const I=`[${i||n.split("/").pop()||"ws"}]`,L=Q=>{switch(Q){case"connecting":return"bg-warning";case"connected":return"bg-success";case"disconnected":return"bg-muted-foreground";case"exited":return"bg-error"}},B=()=>g.jsxs("div",{className:"flex items-center gap-0.5 overflow-x-auto px-1 min-h-[32px]",children:[A.map(Q=>g.jsxs("div",{className:ke("group flex items-center gap-1.5 px-2 py-1 text-xs cursor-pointer rounded-sm whitespace-nowrap border border-transparent",Q.id===M?"bg-accent text-accent-foreground border-border":"text-muted-foreground hover:bg-muted"),onClick:()=>C(W=>{const q=new Map(W);return q.set(e,Q.id),q}),children:[g.jsx("span",{className:ke("w-1.5 h-1.5 rounded-full shrink-0",L(Q.status))}),g.jsxs("span",{children:[I," ",Q.title]}),g.jsx("button",{className:"opacity-0 group-hover:opacity-100 hover:text-destructive transition-opacity ml-0.5",onClick:W=>{W.stopPropagation(),K(Q.id)},children:g.jsx(bs,{className:"w-3 h-3"})})]},Q.id)),j&&g.jsx(Pe,{variant:"ghost",size:"icon-sm",className:"shrink-0",onClick:G,title:"New terminal tab",children:g.jsx(ql,{className:"w-3.5 h-3.5"})})]}),H=()=>g.jsxs("div",{className:"flex-1 min-h-0 overflow-hidden relative",children:[A.map(Q=>g.jsx("div",{className:ke("w-full h-full",Q.id!==M?"invisible absolute inset-0 pointer-events-none":"relative"),children:g.jsx(w8,{tab:Q,serverUrl:o,apiToken:l,onStatusChange:W=>F(Q.id,W),onSessionInit:W=>U(Q.id,W),onTitleChange:W=>$(Q.id,W),onTerminalRef:W=>{W?N.current.set(Q.id,W):N.current.delete(Q.id)}},Q.id)},Q.id)),A.length===0&&g.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"No terminal sessions"})]});if(f){const W=p.height<window.innerHeight*.85?`calc(${p.height}px - env(safe-area-inset-top, 0px))`:Math.min(window.innerHeight*.7,p.height);return d?g.jsx(Ch,{open:d,onOpenChange:q=>!q&&a(),children:g.jsxs(kh,{side:"top",className:"p-0 bg-background [&>button]:hidden flex flex-col",style:{height:W},children:[g.jsx(Eh,{className:"sr-only",children:g.jsx(Ah,{children:"Terminal"})}),g.jsxs("div",{className:"flex items-center justify-between p-2 border-b border-border shrink-0",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(M0,{className:"w-4 h-4"}),g.jsx("span",{className:"font-semibold text-sm",children:"Terminal"})]}),g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:a,children:g.jsx(bs,{className:"w-4 h-4"})})]}),B(),H()]})}):null}return g.jsxs("div",{className:ke(!d&&"hidden"),"data-terminal-panel":"",children:[g.jsx("div",{className:"w-full cursor-ns-resize flex items-center justify-center border-t border-border bg-background select-none shrink-0",style:{height:4},onMouseDown:X,onTouchStart:X,children:g.jsx("div",{className:"w-10 h-0.5 bg-muted-foreground/30 rounded-full"})}),g.jsxs("div",{className:"flex flex-col border-t border-border bg-background overflow-hidden shrink-0",style:{height:w},children:[g.jsxs("div",{className:"flex items-center justify-between px-2 py-1 border-b border-border shrink-0",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(M0,{className:"w-3.5 h-3.5 text-muted-foreground"}),g.jsx("span",{className:"font-medium text-xs text-muted-foreground",children:"Terminal"})]}),g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:a,children:g.jsx(bs,{className:"w-3.5 h-3.5"})})]}),B(),H()]})]})});function w8(t){const e=me.c(13),{tab:n,serverUrl:i,apiToken:o,onStatusChange:l,onSessionInit:d,onTitleChange:a,onTerminalRef:u}=t,f=D.useRef(l),p=D.useRef(d),h=D.useRef(a);let y;e[0]!==d||e[1]!==l||e[2]!==a?(y=()=>{f.current=l,p.current=d,h.current=a},e[0]=d,e[1]=l,e[2]=a,e[3]=y):y=e[3],D.useEffect(y);let S;e[4]===Symbol.for("react.memo_cache_sentinel")?(S=E=>{f.current(E)},e[4]=S):S=e[4];const C=S;let w;e[5]===Symbol.for("react.memo_cache_sentinel")?(w=E=>{p.current(E)},e[5]=w):w=e[5];const _=w;let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=E=>{h.current(E)},e[6]=v):v=e[6];const b=v;let x;return e[7]!==o||e[8]!==u||e[9]!==i||e[10]!==n.serverSessionId||e[11]!==n.workspacePath?(x=g.jsx(m8,{ref:u,serverUrl:i,apiToken:o,cwd:n.workspacePath,serverSessionId:n.serverSessionId,onStatusChange:C,onSessionInit:_,onTitleChange:b}),e[7]=o,e[8]=u,e[9]=i,e[10]=n.serverSessionId,e[11]=n.workspacePath,e[12]=x):x=e[12],x}function C8(t){return t.role==="assistant"}const k8=Gl("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});function bf(t){const e=me.c(10);let n,i,o;e[0]!==t?({className:n,variant:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);let l;e[4]!==n||e[5]!==o?(l=ke(k8({variant:o}),n),e[4]=n,e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==i||e[8]!==l?(d=g.jsx("div",{"data-slot":"alert",role:"alert",className:l,...i}),e[7]=i,e[8]=l,e[9]=d):d=e[9],d}function xf(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx("div",{"data-slot":"alert-description",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function E8(t){const e=me.c(12);let n,i,o;e[0]!==t?({className:n,value:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);let l;e[4]!==n?(l=ke("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",n),e[4]=n,e[5]=l):l=e[5];const d=`translateX(-${100-(o||0)}%)`;let a;e[6]!==d?(a=g.jsx(SN,{"data-slot":"progress-indicator",className:"size-full flex-1 bg-primary transition-all",style:{transform:d}}),e[6]=d,e[7]=a):a=e[7];let u;return e[8]!==i||e[9]!==l||e[10]!==a?(u=g.jsx(xN,{"data-slot":"progress",className:l,...i,children:a}),e[8]=i,e[9]=l,e[10]=a,e[11]=u):u=e[11],u}function df(t){return t>=1e6?(t/1e6).toFixed(1)+"M":t>=1e3?(t/1e3).toFixed(1)+"k":t.toString()}function A8(t){return t>=60?"critical":t>=40?"warning":"normal"}function T8(t){const e=me.c(52),{totalTokens:n,contextWindow:i,modelName:o,compact:l}=t,d=n===void 0?0:n,a=i===void 0?0:i,u=o===void 0?"":o,f=l===void 0?!1:l,p=d===0?0:a;let h;e[0]!==p||e[1]!==d?(h=p===0?0:Math.min(100,Math.round(d/p*100)),e[0]=p,e[1]=d,e[2]=h):h=e[2];const y=h;let S;e[3]!==y?(S=A8(y),e[3]=y,e[4]=S):S=e[4];const C=S;if(f){let G;e[5]!==d?(G=df(d),e[5]=d,e[6]=G):G=e[6];let K;e[7]!==p?(K=df(p),e[7]=p,e[8]=K):K=e[8];let V;e[9]!==G||e[10]!==K?(V=g.jsxs("span",{className:"text-xs font-mono",children:[G,"/",K]}),e[9]=G,e[10]=K,e[11]=V):V=e[11];let X;e[12]===Symbol.for("react.memo_cache_sentinel")?(X=g.jsx(Pl,{asChild:!0,children:g.jsx(R0,{className:"size-3 text-muted-foreground cursor-help"})}),e[12]=X):X=e[12];let Z;e[13]!==u?(Z=g.jsxs("p",{className:"text-xs",children:["Model: ",u]}),e[13]=u,e[14]=Z):Z=e[14];let I;e[15]!==y?(I=g.jsxs("p",{className:"text-xs",children:[y,"% of context window used"]}),e[15]=y,e[16]=I):I=e[16];let L;e[17]!==Z||e[18]!==I?(L=g.jsx(Eu,{children:g.jsxs(zl,{children:[X,g.jsxs(Fl,{side:"bottom",children:[Z,I]})]})}),e[17]=Z,e[18]=I,e[19]=L):L=e[19];let B;return e[20]!==L||e[21]!==V?(B=g.jsxs("div",{className:"flex items-center gap-1.5",children:[V,L]}),e[20]=L,e[21]=V,e[22]=B):B=e[22],B}let w;e[23]===Symbol.for("react.memo_cache_sentinel")?(w=g.jsx("span",{className:"text-xs text-muted-foreground",children:"Tokens:"}),e[23]=w):w=e[23];let _;e[24]!==d?(_=df(d),e[24]=d,e[25]=_):_=e[25];let v;e[26]!==p?(v=df(p),e[26]=p,e[27]=v):v=e[27];let b;e[28]!==_||e[29]!==v?(b=g.jsxs("div",{className:"flex items-center gap-2",children:[w,g.jsxs("span",{className:"text-xs font-mono",children:[_,"/",v]})]}),e[28]=_,e[29]=v,e[30]=b):b=e[30];const x=C==="critical"&&"[&>div]:bg-destructive",E=C==="warning"&&"[&>div]:bg-warning",N=C==="normal"&&"[&>div]:bg-primary";let A;e[31]!==x||e[32]!==E||e[33]!==N?(A=ke("h-1 w-20",x,E,N),e[31]=x,e[32]=E,e[33]=N,e[34]=A):A=e[34];let M;e[35]!==y||e[36]!==A?(M=g.jsx(E8,{value:y,className:A}),e[35]=y,e[36]=A,e[37]=M):M=e[37];let T;e[38]!==y?(T=g.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["(",y,"%)"]}),e[38]=y,e[39]=T):T=e[39];let j;e[40]!==M||e[41]!==T?(j=g.jsxs("div",{className:"flex items-center gap-2",children:[M,T]}),e[40]=M,e[41]=T,e[42]=j):j=e[42];let O;e[43]!==b||e[44]!==j?(O=g.jsxs("div",{className:"flex flex-col gap-1",children:[b,j]}),e[43]=b,e[44]=j,e[45]=O):O=e[45];let F;e[46]===Symbol.for("react.memo_cache_sentinel")?(F=g.jsx(Pl,{asChild:!0,children:g.jsx(R0,{className:"size-3.5 text-muted-foreground cursor-help"})}),e[46]=F):F=e[46];let U;e[47]!==u?(U=g.jsx(Eu,{children:g.jsxs(zl,{children:[F,g.jsx(Fl,{side:"bottom",children:g.jsxs("p",{className:"text-xs",children:["Model: ",u]})})]})}),e[47]=u,e[48]=U):U=e[48];let $;return e[49]!==O||e[50]!==U?($=g.jsxs("div",{className:"flex items-center gap-3",children:[O,U]}),e[49]=O,e[50]=U,e[51]=$):$=e[51],$}function $v(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(iD,{"data-slot":"select",...n}),e[2]=n,e[3]=i):i=e[3],i}function R8(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("scroll-my-1 p-1",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(dD,{"data-slot":"select-group",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Hl(t){const e=me.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let i;return e[2]!==n?(i=g.jsx(oD,{"data-slot":"select-value",...n}),e[2]=n,e[3]=i):i=e[3],i}function qv(t){const e=me.c(13);let n,i,o,l;e[0]!==t?({className:i,size:l,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l):(n=e[1],i=e[2],o=e[3],l=e[4]);const d=l===void 0?"default":l;let a;e[5]!==i?(a=ke("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i),e[5]=i,e[6]=a):a=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(aD,{asChild:!0,children:g.jsx($l,{className:"pointer-events-none size-4 text-muted-foreground"})}),e[7]=u):u=e[7];let f;return e[8]!==n||e[9]!==o||e[10]!==d||e[11]!==a?(f=g.jsxs(sD,{"data-slot":"select-trigger","data-size":d,className:a,...o,children:[n,u]}),e[8]=n,e[9]=o,e[10]=d,e[11]=a,e[12]=f):f=e[12],f}function Vv(t){const e=me.c(24);let n,i,o,l,d;e[0]!==t?({className:i,children:n,position:l,align:d,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=l,e[5]=d):(n=e[1],i=e[2],o=e[3],l=e[4],d=e[5]);const a=l===void 0?"item-aligned":l,u=d===void 0?"center":d,f=a==="item-aligned",p=a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==i||e[7]!==p?(h=ke("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",p,i),e[6]=i,e[7]=p,e[8]=h):h=e[8];let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=g.jsx(D8,{}),e[9]=y):y=e[9];const S=a==="popper"&&"";let C;e[10]!==S?(C=ke("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",S),e[10]=S,e[11]=C):C=e[11];let w;e[12]!==n||e[13]!==a||e[14]!==C?(w=g.jsx(uD,{"data-position":a,className:C,children:n}),e[12]=n,e[13]=a,e[14]=C,e[15]=w):w=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=g.jsx(M8,{}),e[16]=_):_=e[16];let v;return e[17]!==u||e[18]!==a||e[19]!==o||e[20]!==f||e[21]!==h||e[22]!==w?(v=g.jsx(lD,{children:g.jsxs(cD,{"data-slot":"select-content","data-align-trigger":f,className:h,position:a,align:u,...o,children:[y,w,_]})}),e[17]=u,e[18]=a,e[19]=o,e[20]=f,e[21]=h,e[22]=w,e[23]=v):v=e[23],v}function N8(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("px-1.5 py-1 text-xs text-muted-foreground",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(fD,{"data-slot":"select-label",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Th(t){const e=me.c(13);let n,i,o;e[0]!==t?({className:i,children:n,...o}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);let l;e[4]!==i?(l=ke("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",i),e[4]=i,e[5]=l):l=e[5];let d;e[6]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:g.jsx(mD,{children:g.jsx(xs,{className:"pointer-events-none"})})}),e[6]=d):d=e[6];let a;e[7]!==n?(a=g.jsx(pD,{children:n}),e[7]=n,e[8]=a):a=e[8];let u;return e[9]!==o||e[10]!==l||e[11]!==a?(u=g.jsxs(hD,{"data-slot":"select-item",className:l,...o,children:[d,a]}),e[9]=o,e[10]=l,e[11]=a,e[12]=u):u=e[12],u}function D8(t){const e=me.c(9);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",n),e[3]=n,e[4]=o):o=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=g.jsx(UE,{}),e[5]=l):l=e[5];let d;return e[6]!==i||e[7]!==o?(d=g.jsx(gD,{"data-slot":"select-scroll-up-button",className:o,...i,children:l}),e[6]=i,e[7]=o,e[8]=d):d=e[8],d}function M8(t){const e=me.c(9);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",n),e[3]=n,e[4]=o):o=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=g.jsx($l,{}),e[5]=l):l=e[5];let d;return e[6]!==i||e[7]!==o?(d=g.jsx(vD,{"data-slot":"select-scroll-down-button",className:o,...i,children:l}),e[6]=i,e[7]=o,e[8]=d):d=e[8],d}function Ti(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(eN,{"data-slot":"label",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function j8(t){switch(t){case"budget":return"$";case"standard":return"$$";case"premium":return"$$$";default:return""}}function O8(t){const e=me.c(40),{models:n,selectedModelId:i,onChangeModel:o,disabled:l,iconOnly:d,connectedProviderIds:a,connectableProviderIds:u}=t,f=d===void 0?!1:d;let p,h,y,S,C,w,_,v,b;if(e[0]!==u||e[1]!==a||e[2]!==l||e[3]!==f||e[4]!==n||e[5]!==o||e[6]!==i){const A=n.reduce(L8,{});let M;e[16]!==n||e[17]!==o?(M=F=>{const U=n.find($=>$.id===F);U&&o(F,U.providerId)},e[16]=n,e[17]=o,e[18]=M):M=e[18];const T=M;v="flex items-center gap-2",e[19]!==f?(b=!f&&g.jsx(Ti,{className:"text-xs text-muted-foreground",children:"Model:"}),e[19]=f,e[20]=b):b=e[20],h=$v,S=i||"",C=T,w=l;const j=f?"w-9 h-9 px-0 justify-center gap-0 [&>svg:last-child]:hidden [&_[data-slot=select-value]]:hidden":"w-[180px] h-8 text-sm";let O;e[21]!==f?(O=f?g.jsxs(g.Fragment,{children:[g.jsx(e4,{className:"size-4"}),g.jsx(Hl,{className:"sr-only"})]}):g.jsx(Hl,{placeholder:"Select model"}),e[21]=f,e[22]=O):O=e[22],e[23]!==j||e[24]!==O?(_=g.jsx(qv,{className:j,children:O}),e[23]=j,e[24]=O,e[25]=_):_=e[25],p=Vv,y=Object.entries(A).map(F=>{const[U,$]=F;return g.jsxs(R8,{children:[g.jsx(N8,{children:U}),$.map(G=>g.jsx(Th,{value:G.id,disabled:(u==null?void 0:u.has(G.providerId))&&!(a!=null&&a.has(G.providerId)),children:g.jsxs("span",{className:"flex items-center gap-2",children:[G.name,g.jsx("span",{className:"text-muted-foreground text-xs",children:j8(G.tier)}),(u==null?void 0:u.has(G.providerId))&&(a==null?void 0:a.has(G.providerId))&&g.jsx(Bn,{variant:"secondary",className:"text-[10px] px-1 py-0 h-4",children:"Sub"}),(u==null?void 0:u.has(G.providerId))&&!(a!=null&&a.has(G.providerId))&&g.jsx(Bn,{variant:"outline",className:"text-[10px] px-1 py-0 h-4",children:"OAuth"})]})},G.id))]},U)}),e[0]=u,e[1]=a,e[2]=l,e[3]=f,e[4]=n,e[5]=o,e[6]=i,e[7]=p,e[8]=h,e[9]=y,e[10]=S,e[11]=C,e[12]=w,e[13]=_,e[14]=v,e[15]=b}else p=e[7],h=e[8],y=e[9],S=e[10],C=e[11],w=e[12],_=e[13],v=e[14],b=e[15];let x;e[26]!==p||e[27]!==y?(x=g.jsx(p,{children:y}),e[26]=p,e[27]=y,e[28]=x):x=e[28];let E;e[29]!==h||e[30]!==S||e[31]!==C||e[32]!==w||e[33]!==_||e[34]!==x?(E=g.jsxs(h,{value:S,onValueChange:C,disabled:w,children:[_,x]}),e[29]=h,e[30]=S,e[31]=C,e[32]=w,e[33]=_,e[34]=x,e[35]=E):E=e[35];let N;return e[36]!==E||e[37]!==v||e[38]!==b?(N=g.jsxs("div",{className:v,children:[b,E]}),e[36]=E,e[37]=v,e[38]=b,e[39]=N):N=e[39],N}function L8(t,e){return t[e.providerName]||(t[e.providerName]=[]),t[e.providerName].push(e),t}const I8={low:"Low",medium:"Medium",high:"High",xhigh:"X-High",minimal:"Minimal",max:"Max"};function B8(t){return I8[t]||t.charAt(0).toUpperCase()+t.slice(1)}function z8(t){const e=me.c(40),{variants:n,selectedVariant:i,onChangeVariant:o,disabled:l,iconOnly:d}=t,a=d===void 0?!1:d;if(!n||Object.keys(n).length===0)return null;let u,f,p,h,y,S,C,w,_,v;if(e[0]!==l||e[1]!==a||e[2]!==o||e[3]!==i||e[4]!==n){const N=Object.keys(n);let A;e[15]!==o?(A=O=>{o(O==="__none__"?null:O)},e[15]=o,e[16]=A):A=e[16];const M=A;_="flex items-center gap-2",e[17]!==a?(v=!a&&g.jsx(Ti,{className:"text-xs text-muted-foreground",children:"Thinking:"}),e[17]=a,e[18]=v):v=e[18],f=$v,y=i||"__none__",S=M,C=l;const T=a?"w-9 h-9 px-0 justify-center gap-0 [&>svg:last-child]:hidden [&_[data-slot=select-value]]:hidden":"w-[120px] h-8 text-sm";let j;e[19]!==a?(j=a?g.jsxs(g.Fragment,{children:[g.jsx(LE,{className:"size-4"}),g.jsx(Hl,{className:"sr-only"})]}):g.jsx(Hl,{placeholder:"Default"}),e[19]=a,e[20]=j):j=e[20],e[21]!==T||e[22]!==j?(w=g.jsx(qv,{className:T,children:j}),e[21]=T,e[22]=j,e[23]=w):w=e[23],u=Vv,e[24]===Symbol.for("react.memo_cache_sentinel")?(p=g.jsx(Th,{value:"__none__",children:"Default"}),e[24]=p):p=e[24],h=N.map(P8),e[0]=l,e[1]=a,e[2]=o,e[3]=i,e[4]=n,e[5]=u,e[6]=f,e[7]=p,e[8]=h,e[9]=y,e[10]=S,e[11]=C,e[12]=w,e[13]=_,e[14]=v}else u=e[5],f=e[6],p=e[7],h=e[8],y=e[9],S=e[10],C=e[11],w=e[12],_=e[13],v=e[14];let b;e[25]!==u||e[26]!==p||e[27]!==h?(b=g.jsxs(u,{children:[p,h]}),e[25]=u,e[26]=p,e[27]=h,e[28]=b):b=e[28];let x;e[29]!==f||e[30]!==b||e[31]!==y||e[32]!==S||e[33]!==C||e[34]!==w?(x=g.jsxs(f,{value:y,onValueChange:S,disabled:C,children:[w,b]}),e[29]=f,e[30]=b,e[31]=y,e[32]=S,e[33]=C,e[34]=w,e[35]=x):x=e[35];let E;return e[36]!==x||e[37]!==_||e[38]!==v?(E=g.jsxs("div",{className:_,children:[v,x]}),e[36]=x,e[37]=_,e[38]=v,e[39]=E):E=e[39],E}function P8(t){return g.jsx(Th,{value:t,children:B8(t)},t)}function F8(t){const e=me.c(20),{preconfigs:n,selectedPreconfigId:i,onChangePreconfig:o,disabled:l,iconOnly:d}=t,a=d===void 0?!1:d;let u;e[0]!==a?(u=!a&&g.jsx(Ti,{className:"text-xs text-muted-foreground",children:"Config:"}),e[0]=a,e[1]=u):u=e[1];const f=i||"",p=a?"w-9 h-9 px-0 justify-center gap-0 [&>svg:last-child]:hidden [&_[data-slot=select-value]]:hidden":"w-[140px] h-8 text-sm";let h;e[2]!==a?(h=a?g.jsxs(g.Fragment,{children:[g.jsx(Fx,{className:"size-4"}),g.jsx(Hl,{className:"sr-only"})]}):g.jsx(Hl,{placeholder:"Select config"}),e[2]=a,e[3]=h):h=e[3];let y;e[4]!==p||e[5]!==h?(y=g.jsx(qv,{className:p,children:h}),e[4]=p,e[5]=h,e[6]=y):y=e[6];let S;e[7]!==n?(S=n.map(H8),e[7]=n,e[8]=S):S=e[8];let C;e[9]!==S?(C=g.jsx(Vv,{children:S}),e[9]=S,e[10]=C):C=e[10];let w;e[11]!==l||e[12]!==o||e[13]!==f||e[14]!==y||e[15]!==C?(w=g.jsxs($v,{value:f,onValueChange:o,disabled:l,children:[y,C]}),e[11]=l,e[12]=o,e[13]=f,e[14]=y,e[15]=C,e[16]=w):w=e[16];let _;return e[17]!==u||e[18]!==w?(_=g.jsxs("div",{className:"flex items-center gap-2",children:[u,w]}),e[17]=u,e[18]=w,e[19]=_):_=e[19],_}function H8(t){return g.jsxs(Th,{value:t.id,children:[t.name,t.isDefault&&g.jsx("span",{className:"ml-2 text-muted-foreground text-xs",children:"(default)"})]},t.id)}function U8(t){var st;const e=me.c(101),{session:n,preconfigs:i,models:o,usage:l,modelName:d,onChangePreconfig:a,onChangeModel:u,onChangeVariant:f,onRename:p,onNavigateBack:h,isStreaming:y,onInterrupt:S,onCompact:C,isCompacting:w,canCompact:_,connectedProviderIds:v,connectableProviderIds:b,selectedVariant:x,variants:E}=t,[N,A]=D.useState(!1),[M,T]=D.useState(n.title||""),j=D.useRef(null),O=Wu();let F,U;e[0]!==N?(F=()=>{N&&j.current&&(j.current.focus(),j.current.select())},U=[N],e[0]=N,e[1]=F,e[2]=U):(F=e[1],U=e[2]),D.useEffect(F,U);let $;e[3]!==n.title?($=()=>{T(n.title||""),A(!0)},e[3]=n.title,e[4]=$):$=e[4];const G=$;let K;e[5]!==M||e[6]!==p||e[7]!==n.id||e[8]!==n.title?(K=()=>{const Se=M.trim();Se&&Se!==n.title&&p(n.id,Se),A(!1)},e[5]=M,e[6]=p,e[7]=n.id,e[8]=n.title,e[9]=K):K=e[9];const V=K;let X;e[10]!==V||e[11]!==n.title?(X=Se=>{Se.key==="Enter"?V():Se.key==="Escape"&&(T(n.title||""),A(!1))},e[10]=V,e[11]=n.title,e[12]=X):X=e[12];const Z=X;let I;e[13]!==d||e[14]!==i||e[15]!==n.preconfigId||e[16]!==n.selectedModel?(I=n.selectedModel||((st=i.find(Se=>Se.id===n.preconfigId))==null?void 0:st.model)||d,e[13]=d,e[14]=i,e[15]=n.preconfigId,e[16]=n.selectedModel,e[17]=I):I=e[17];const L=I;let B;if(e[18]!==o||e[19]!==L){let Se;e[21]!==L?(Se=Ze=>Ze.id===L,e[21]=L,e[22]=Se):Se=e[22],B=o.find(Se),e[18]=o,e[19]=L,e[20]=B}else B=e[20];const H=B,P=H==null?void 0:H.contextWindow;let ee;e[23]!==h||e[24]!==n.parentId?(ee=n.parentId&&h&&g.jsxs(Pe,{variant:"ghost",size:"sm",onClick:h,className:"h-7",children:[g.jsx(NE,{className:"size-4","data-icon":"inline-start"}),"Back"]}),e[23]=h,e[24]=n.parentId,e[25]=ee):ee=e[25];let ne;e[26]!==M||e[27]!==Z||e[28]!==G||e[29]!==V||e[30]!==N||e[31]!==n.title?(ne=N?g.jsx("input",{ref:j,type:"text",value:M,onChange:Se=>T(Se.target.value),onBlur:V,onKeyDown:Z,className:"text-lg font-semibold bg-background border border-primary rounded px-2 py-0.5 outline-none min-w-0 flex-1",autoFocus:!0}):g.jsx("h2",{className:"text-lg font-semibold cursor-pointer px-2 py-0.5 -mx-2 rounded hover:bg-accent transition-colors",onDoubleClick:G,children:n.title||"Untitled Session"}),e[26]=M,e[27]=Z,e[28]=G,e[29]=V,e[30]=N,e[31]=n.title,e[32]=ne):ne=e[32];let Q;e[33]!==n.id?(Q=n.id.slice(0,8),e[33]=n.id,e[34]=Q):Q=e[34];let W;e[35]!==Q?(W=g.jsx(Bn,{variant:"outline",className:"font-mono text-xs",children:Q}),e[35]=Q,e[36]=W):W=e[36];let q;e[37]!==n.status?(q=n.status==="closed"&&g.jsxs(Bn,{variant:"secondary",children:[g.jsx(TE,{className:"size-3","data-icon":"inline-start"}),"Archived"]}),e[37]=n.status,e[38]=q):q=e[38];let J;e[39]!==W||e[40]!==q||e[41]!==ee||e[42]!==ne?(J=g.jsx("div",{className:"flex items-center justify-start px-4 py-2",children:g.jsxs("div",{className:"flex items-center gap-3",children:[ee,ne,W,q]})}),e[39]=W,e[40]=q,e[41]=ee,e[42]=ne,e[43]=J):J=e[43];let ie;e[44]===Symbol.for("react.memo_cache_sentinel")?(ie=g.jsx(ua,{}),e[44]=ie):ie=e[44];let ce;e[45]!==P||e[46]!==O||e[47]!==d||e[48]!==l.completionTokens||e[49]!==l.promptTokens||e[50]!==l.totalTokens?(ce=g.jsx(T8,{promptTokens:l.promptTokens,completionTokens:l.completionTokens,totalTokens:l.totalTokens,contextWindow:P,modelName:d,compact:O}),e[45]=P,e[46]=O,e[47]=d,e[48]=l.completionTokens,e[49]=l.promptTokens,e[50]=l.totalTokens,e[51]=ce):ce=e[51];let ae;e[52]===Symbol.for("react.memo_cache_sentinel")?(ae=g.jsx(ua,{orientation:"vertical",className:"hidden sm:block"}),e[52]=ae):ae=e[52];const _e=n.status==="closed"||!!n.parentId;let Ee;e[53]!==b||e[54]!==v||e[55]!==O||e[56]!==o||e[57]!==u||e[58]!==L||e[59]!==_e?(Ee=g.jsx(O8,{models:o,selectedModelId:L,onChangeModel:u,disabled:_e,iconOnly:O,connectedProviderIds:v,connectableProviderIds:b}),e[53]=b,e[54]=v,e[55]=O,e[56]=o,e[57]=u,e[58]=L,e[59]=_e,e[60]=Ee):Ee=e[60];const Te=n.status==="closed"||!!n.parentId;let Be;e[61]!==O||e[62]!==f||e[63]!==x||e[64]!==Te||e[65]!==E?(Be=g.jsx(z8,{variants:E,selectedVariant:x,onChangeVariant:f,disabled:Te,iconOnly:O}),e[61]=O,e[62]=f,e[63]=x,e[64]=Te,e[65]=E,e[66]=Be):Be=e[66];const se=n.status==="closed"||!!n.parentId;let Ye;e[67]!==O||e[68]!==a||e[69]!==i||e[70]!==n.preconfigId||e[71]!==se?(Ye=g.jsx(F8,{preconfigs:i,selectedPreconfigId:n.preconfigId,onChangePreconfig:a,disabled:se,iconOnly:O}),e[67]=O,e[68]=a,e[69]=i,e[70]=n.preconfigId,e[71]=se,e[72]=Ye):Ye=e[72];let rt;e[73]===Symbol.for("react.memo_cache_sentinel")?(rt=g.jsx(ua,{orientation:"vertical",className:"hidden sm:block"}),e[73]=rt):rt=e[73];let nt;e[74]!==_||e[75]!==w||e[76]!==O||e[77]!==y||e[78]!==C?(nt=C&&g.jsxs(g.Fragment,{children:[g.jsxs(Pe,{variant:"outline",size:O?"icon":"sm",onClick:C,disabled:y||w||!_,title:w?"Compacting...":"Compact older messages",children:[g.jsx(Bx,{className:"size-4"}),!O&&g.jsx("span",{className:"ml-1",children:w?"Compacting...":"Compact"})]}),g.jsx(ua,{orientation:"vertical",className:"hidden sm:block"})]}),e[74]=_,e[75]=w,e[76]=O,e[77]=y,e[78]=C,e[79]=nt):nt=e[79];const Ge=y?"destructive":"outline",gt=O?"icon":"sm",it=!S,Je=y?"":"opacity-60 hover:opacity-100",at=y?"Interrupt operation":"Interrupt (no active operation)";let fe;e[80]===Symbol.for("react.memo_cache_sentinel")?(fe=g.jsx(Ux,{className:"size-4"}),e[80]=fe):fe=e[80];let ge;e[81]!==O?(ge=!O&&g.jsx("span",{className:"ml-1",children:"Stop"}),e[81]=O,e[82]=ge):ge=e[82];let Ae;e[83]!==S||e[84]!==Ge||e[85]!==gt||e[86]!==it||e[87]!==Je||e[88]!==at||e[89]!==ge?(Ae=g.jsxs(Pe,{variant:Ge,size:gt,onClick:S,disabled:it,className:Je,title:at,children:[fe,ge]}),e[83]=S,e[84]=Ge,e[85]=gt,e[86]=it,e[87]=Je,e[88]=at,e[89]=ge,e[90]=Ae):Ae=e[90];let Me;e[91]!==ce||e[92]!==Ee||e[93]!==Be||e[94]!==Ye||e[95]!==nt||e[96]!==Ae?(Me=g.jsxs("div",{className:"inline-flex align-middle items-center gap-3 sm:gap-4 px-4 py-2 flex-wrap",children:[ce,ae,Ee,Be,Ye,rt,nt,Ae]}),e[91]=ce,e[92]=Ee,e[93]=Be,e[94]=Ye,e[95]=nt,e[96]=Ae,e[97]=Me):Me=e[97];let Le;return e[98]!==J||e[99]!==Me?(Le=g.jsxs("header",{className:"flex flex-col border-b border-border bg-card",children:[J,ie,Me]}),e[98]=J,e[99]=Me,e[100]=Le):Le=e[100],Le}function Rb(t){const e=me.c(26),{open:n,onOpenChange:i,title:o,description:l,confirmLabel:d,cancelLabel:a,onConfirm:u,variant:f}=t,p=d===void 0?"Confirm":d,h=a===void 0?"Cancel":a,y=f===void 0?"default":f;let S;e[0]!==u||e[1]!==i?(S=()=>{u(),i(!1)},e[0]=u,e[1]=i,e[2]=S):S=e[2];const C=S;let w;e[3]!==o?(w=g.jsx(tc,{children:o}),e[3]=o,e[4]=w):w=e[4];let _;e[5]!==l?(_=g.jsx(Vu,{children:l}),e[5]=l,e[6]=_):_=e[6];let v;e[7]!==w||e[8]!==_?(v=g.jsxs(ec,{children:[w,_]}),e[7]=w,e[8]=_,e[9]=v):v=e[9];let b;e[10]!==h?(b=g.jsx(HM,{asChild:!0,children:g.jsx(Pe,{variant:"outline",children:h})}),e[10]=h,e[11]=b):b=e[11];const x=y==="destructive"?"destructive":"default";let E;e[12]!==p||e[13]!==C||e[14]!==x?(E=g.jsx(Pe,{onClick:C,variant:x,children:p}),e[12]=p,e[13]=C,e[14]=x,e[15]=E):E=e[15];let N;e[16]!==E||e[17]!==b?(N=g.jsxs(bh,{children:[b,E]}),e[16]=E,e[17]=b,e[18]=N):N=e[18];let A;e[19]!==N||e[20]!==v?(A=g.jsxs(Jl,{showCloseButton:!1,children:[v,N]}),e[19]=N,e[20]=v,e[21]=A):A=e[21];let M;return e[22]!==i||e[23]!==n||e[24]!==A?(M=g.jsx(Ql,{open:n,onOpenChange:i,children:A}),e[22]=i,e[23]=n,e[24]=A,e[25]=M):M=e[25],M}function $8(t){const e=me.c(46),{message:n,textContent:i,children:o,isQueued:l,onRemove:d,onRevert:a,canRevert:u,onFork:f,canFork:p}=t,h=l===void 0?!1:l,y=u===void 0?!1:u,S=p===void 0?!1:p,[C,w]=D.useState(!1),[_,v]=D.useState(!1),[b,x]=D.useState(!1),E=n.role==="user";let N;e[0]!==i?(N=async()=>{const P=i||"";await navigator.clipboard.writeText(P),w(!0),setTimeout(()=>w(!1),2e3)},e[0]=i,e[1]=N):N=e[1];const A=N,M=E?"items-end":"items-start";let T;e[2]!==M?(T=ke("flex flex-col gap-1 mb-4 animate-slide-up min-w-0",M),e[2]=M,e[3]=T):T=e[3];const j=E?"mr-3":"ml-3";let O;e[4]!==j?(O=ke("flex items-center gap-1.5 text-xs uppercase tracking-wide text-muted-foreground",j),e[4]=j,e[5]=O):O=e[5];let F;e[6]!==S||e[7]!==y||e[8]!==C||e[9]!==A||e[10]!==h||e[11]!==E||e[12]!==n.role||e[13]!==f||e[14]!==a?(F=E?g.jsxs(g.Fragment,{children:[!h&&g.jsxs(g.Fragment,{children:[y&&a&&g.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>v(!0),className:"size-5 text-muted-foreground hover:text-foreground",title:"Revert to this point",children:g.jsx(l5,{className:"size-3"})}),S&&f&&g.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>x(!0),className:"size-5 text-muted-foreground hover:text-foreground",title:"Fork from this point",children:g.jsx(m4,{className:"size-3"})}),g.jsx(Pe,{variant:"ghost",size:"icon",onClick:A,className:"size-5 text-muted-foreground hover:text-foreground",children:C?g.jsx(xs,{className:"size-3"}):g.jsx(yu,{className:"size-3"})})]}),g.jsx($x,{className:"size-3"}),n.role]}):g.jsxs(g.Fragment,{children:[g.jsx(ME,{className:"size-3"}),n.role,g.jsx(Pe,{variant:"ghost",size:"icon",onClick:A,className:"size-5 text-muted-foreground hover:text-foreground",children:C?g.jsx(xs,{className:"size-3"}):g.jsx(yu,{className:"size-3"})})]}),e[6]=S,e[7]=y,e[8]=C,e[9]=A,e[10]=h,e[11]=E,e[12]=n.role,e[13]=f,e[14]=a,e[15]=F):F=e[15];let U;e[16]!==O||e[17]!==F?(U=g.jsx("div",{className:O,children:F}),e[16]=O,e[17]=F,e[18]=U):U=e[18];const $=h?"bg-muted border-2 border-dashed border-muted-foreground/30 opacity-80":E?"bg-primary text-primary-foreground rounded-br-md":"bg-card text-card-foreground border border-border rounded-bl-md";let G;e[19]!==$?(G=ke("rounded-2xl px-4 py-3 max-w-full relative group min-w-0 overflow-hidden",$),e[19]=$,e[20]=G):G=e[20];let K;e[21]!==h||e[22]!==d?(K=h&&g.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2 pb-2 border-b border-muted-foreground/20",children:[g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[g.jsx(Ix,{className:"size-3 animate-pulse"}),g.jsx("span",{children:"Pending"})]}),d&&g.jsx(Pe,{variant:"ghost",size:"icon",onClick:d,className:"size-6 text-muted-foreground hover:text-destructive hover:bg-destructive/10",title:"Remove from queue",children:g.jsx(bs,{className:"size-3"})})]}),e[21]=h,e[22]=d,e[23]=K):K=e[23];let V;e[24]!==o?(V=g.jsx("div",{className:"min-w-0",children:o}),e[24]=o,e[25]=V):V=e[25];let X;e[26]!==G||e[27]!==K||e[28]!==V?(X=g.jsxs("div",{className:G,children:[K,V]}),e[26]=G,e[27]=K,e[28]=V,e[29]=X):X=e[29];let Z;e[30]!==a?(Z=()=>{a==null||a()},e[30]=a,e[31]=Z):Z=e[31];let I;e[32]!==_||e[33]!==Z?(I=g.jsx(Rb,{open:_,onOpenChange:v,title:"Revert Conversation",description:"This will delete this message and all messages after it. Are you sure you want to continue?",confirmLabel:"Revert",cancelLabel:"Cancel",onConfirm:Z,variant:"destructive"}),e[32]=_,e[33]=Z,e[34]=I):I=e[34];let L;e[35]!==f?(L=()=>{f==null||f()},e[35]=f,e[36]=L):L=e[36];let B;e[37]!==b||e[38]!==L?(B=g.jsx(Rb,{open:b,onOpenChange:x,title:"Fork Conversation",description:"This will create a new session with messages up to and including this point. The original session will be unchanged.",confirmLabel:"Fork",cancelLabel:"Cancel",onConfirm:L}),e[37]=b,e[38]=L,e[39]=B):B=e[39];let H;return e[40]!==U||e[41]!==X||e[42]!==I||e[43]!==B||e[44]!==T?(H=g.jsxs("div",{className:T,children:[U,X,I,B]}),e[40]=U,e[41]=X,e[42]=I,e[43]=B,e[44]=T,e[45]=H):H=e[45],H}var q8=Object.create,Rh=Object.defineProperty,V8=Object.defineProperties,G8=Object.getOwnPropertyDescriptor,W8=Object.getOwnPropertyDescriptors,jC=Object.getOwnPropertyNames,Pf=Object.getOwnPropertySymbols,K8=Object.getPrototypeOf,Gv=Object.prototype.hasOwnProperty,OC=Object.prototype.propertyIsEnumerable,Nb=(t,e,n)=>e in t?Rh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ni=(t,e)=>{for(var n in e||(e={}))Gv.call(e,n)&&Nb(t,n,e[n]);if(Pf)for(var n of Pf(e))OC.call(e,n)&&Nb(t,n,e[n]);return t},Nh=(t,e)=>V8(t,W8(e)),LC=(t,e)=>{var n={};for(var i in t)Gv.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&Pf)for(var i of Pf(t))e.indexOf(i)<0&&OC.call(t,i)&&(n[i]=t[i]);return n},Y8=(t,e)=>function(){return e||(0,t[jC(t)[0]])((e={exports:{}}).exports,e),e.exports},X8=(t,e)=>{for(var n in e)Rh(t,n,{get:e[n],enumerable:!0})},Z8=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of jC(e))!Gv.call(t,o)&&o!==n&&Rh(t,o,{get:()=>e[o],enumerable:!(i=G8(e,o))||i.enumerable});return t},Q8=(t,e,n)=>(n=t!=null?q8(K8(t)):{},Z8(!t||!t.__esModule?Rh(n,"default",{value:t,enumerable:!0}):n,t)),J8=Y8({"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(t,e){var n=(function(){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,l={},d={util:{encode:function C(w){return w instanceof a?new a(w.type,C(w.content),w.alias):Array.isArray(w)?w.map(C):w.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(C){return Object.prototype.toString.call(C).slice(8,-1)},objId:function(C){return C.__id||Object.defineProperty(C,"__id",{value:++o}),C.__id},clone:function C(w,_){_=_||{};var v,b;switch(d.util.type(w)){case"Object":if(b=d.util.objId(w),_[b])return _[b];v={},_[b]=v;for(var x in w)w.hasOwnProperty(x)&&(v[x]=C(w[x],_));return v;case"Array":return b=d.util.objId(w),_[b]?_[b]:(v=[],_[b]=v,w.forEach(function(E,N){v[N]=C(E,_)}),v);default:return w}},getLanguage:function(C){for(;C;){var w=i.exec(C.className);if(w)return w[1].toLowerCase();C=C.parentElement}return"none"},setLanguage:function(C,w){C.className=C.className.replace(RegExp(i,"gi"),""),C.classList.add("language-"+w)},isActive:function(C,w,_){for(var v="no-"+w;C;){var b=C.classList;if(b.contains(w))return!0;if(b.contains(v))return!1;C=C.parentElement}return!!_}},languages:{plain:l,plaintext:l,text:l,txt:l,extend:function(C,w){var _=d.util.clone(d.languages[C]);for(var v in w)_[v]=w[v];return _},insertBefore:function(C,w,_,v){v=v||d.languages;var b=v[C],x={};for(var E in b)if(b.hasOwnProperty(E)){if(E==w)for(var N in _)_.hasOwnProperty(N)&&(x[N]=_[N]);_.hasOwnProperty(E)||(x[E]=b[E])}var A=v[C];return v[C]=x,d.languages.DFS(d.languages,function(M,T){T===A&&M!=C&&(this[M]=x)}),x},DFS:function C(w,_,v,b){b=b||{};var x=d.util.objId;for(var E in w)if(w.hasOwnProperty(E)){_.call(w,E,w[E],v||E);var N=w[E],A=d.util.type(N);A==="Object"&&!b[x(N)]?(b[x(N)]=!0,C(N,_,null,b)):A==="Array"&&!b[x(N)]&&(b[x(N)]=!0,C(N,_,E,b))}}},plugins:{},highlight:function(C,w,_){var v={code:C,grammar:w,language:_};if(d.hooks.run("before-tokenize",v),!v.grammar)throw new Error('The language "'+v.language+'" has no grammar.');return v.tokens=d.tokenize(v.code,v.grammar),d.hooks.run("after-tokenize",v),a.stringify(d.util.encode(v.tokens),v.language)},tokenize:function(C,w){var _=w.rest;if(_){for(var v in _)w[v]=_[v];delete w.rest}var b=new p;return h(b,b.head,C),f(C,b,w,b.head,0),S(b)},hooks:{all:{},add:function(C,w){var _=d.hooks.all;_[C]=_[C]||[],_[C].push(w)},run:function(C,w){var _=d.hooks.all[C];if(!(!_||!_.length))for(var v=0,b;b=_[v++];)b(w)}},Token:a};function a(C,w,_,v){this.type=C,this.content=w,this.alias=_,this.length=(v||"").length|0}a.stringify=function C(w,_){if(typeof w=="string")return w;if(Array.isArray(w)){var v="";return w.forEach(function(A){v+=C(A,_)}),v}var b={type:w.type,content:C(w.content,_),tag:"span",classes:["token",w.type],attributes:{},language:_},x=w.alias;x&&(Array.isArray(x)?Array.prototype.push.apply(b.classes,x):b.classes.push(x)),d.hooks.run("wrap",b);var E="";for(var N in b.attributes)E+=" "+N+'="'+(b.attributes[N]||"").replace(/"/g,"&quot;")+'"';return"<"+b.tag+' class="'+b.classes.join(" ")+'"'+E+">"+b.content+"</"+b.tag+">"};function u(C,w,_,v){C.lastIndex=w;var b=C.exec(_);if(b&&v&&b[1]){var x=b[1].length;b.index+=x,b[0]=b[0].slice(x)}return b}function f(C,w,_,v,b,x){for(var E in _)if(!(!_.hasOwnProperty(E)||!_[E])){var N=_[E];N=Array.isArray(N)?N:[N];for(var A=0;A<N.length;++A){if(x&&x.cause==E+","+A)return;var M=N[A],T=M.inside,j=!!M.lookbehind,O=!!M.greedy,F=M.alias;if(O&&!M.pattern.global){var U=M.pattern.toString().match(/[imsuy]*$/)[0];M.pattern=RegExp(M.pattern.source,U+"g")}for(var $=M.pattern||M,G=v.next,K=b;G!==w.tail&&!(x&&K>=x.reach);K+=G.value.length,G=G.next){var V=G.value;if(w.length>C.length)return;if(!(V instanceof a)){var X=1,Z;if(O){if(Z=u($,K,C,j),!Z||Z.index>=C.length)break;var H=Z.index,I=Z.index+Z[0].length,L=K;for(L+=G.value.length;H>=L;)G=G.next,L+=G.value.length;if(L-=G.value.length,K=L,G.value instanceof a)continue;for(var B=G;B!==w.tail&&(L<I||typeof B.value=="string");B=B.next)X++,L+=B.value.length;X--,V=C.slice(K,L),Z.index-=K}else if(Z=u($,0,V,j),!Z)continue;var H=Z.index,P=Z[0],ee=V.slice(0,H),ne=V.slice(H+P.length),Q=K+V.length;x&&Q>x.reach&&(x.reach=Q);var W=G.prev;ee&&(W=h(w,W,ee),K+=ee.length),y(w,W,X);var q=new a(E,T?d.tokenize(P,T):P,F,P);if(G=h(w,W,q),ne&&h(w,G,ne),X>1){var J={cause:E+","+A,reach:Q};f(C,w,_,G.prev,K,J),x&&J.reach>x.reach&&(x.reach=J.reach)}}}}}}function p(){var C={value:null,prev:null,next:null},w={value:null,prev:C,next:null};C.next=w,this.head=C,this.tail=w,this.length=0}function h(C,w,_){var v=w.next,b={value:_,prev:w,next:v};return w.next=b,v.prev=b,C.length++,b}function y(C,w,_){for(var v=w.next,b=0;b<_&&v!==C.tail;b++)v=v.next;w.next=v,v.prev=w,C.length-=b}function S(C){for(var w=[],_=C.head.next;_!==C.tail;)w.push(_.value),_=_.next;return w}return d})();e.exports=n,n.default=n}}),xe=Q8(J8());xe.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},xe.languages.markup.tag.inside["attr-value"].inside.entity=xe.languages.markup.entity,xe.languages.markup.doctype.inside["internal-subset"].inside=xe.languages.markup,xe.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.replace(/&amp;/,"&"))}),Object.defineProperty(xe.languages.markup.tag,"addInlined",{value:function(t,i){var n={},n=(n["language-"+i]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:xe.languages[i]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}),i=(n["language-"+i]={pattern:/[\s\S]+/,inside:xe.languages[i]},{});i[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:n},xe.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(xe.languages.markup.tag,"addAttribute",{value:function(t,e){xe.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:xe.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),xe.languages.html=xe.languages.markup,xe.languages.mathml=xe.languages.markup,xe.languages.svg=xe.languages.markup,xe.languages.xml=xe.languages.extend("markup",{}),xe.languages.ssml=xe.languages.xml,xe.languages.atom=xe.languages.xml,xe.languages.rss=xe.languages.xml,(function(t){var e={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,i="(?:[^\\\\-]|"+n.source+")",i=RegExp(i+"-"+i),o={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};t.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:i,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":e,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":e,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":o}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":o}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}})(xe),xe.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},xe.languages.javascript=xe.languages.extend("clike",{"class-name":[xe.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),xe.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,xe.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:xe.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:xe.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:xe.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:xe.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:xe.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),xe.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:xe.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),xe.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),xe.languages.markup&&(xe.languages.markup.tag.addInlined("script","javascript"),xe.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),xe.languages.js=xe.languages.javascript,xe.languages.actionscript=xe.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),xe.languages.actionscript["class-name"].alias="function",delete xe.languages.actionscript.parameter,delete xe.languages.actionscript["literal-property"],xe.languages.markup&&xe.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:xe.languages.markup}}),(function(t){var e=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};t.languages.coffeescript=t.languages.extend("javascript",{comment:e,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),t.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:e,interpolation:n}}}),t.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:t.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),t.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete t.languages.coffeescript["template-string"],t.languages.coffee=t.languages.coffeescript})(xe),(function(t){var e=t.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(e,"addSupport",{value:function(n,i){(n=typeof n=="string"?[n]:n).forEach(function(o){var l=function(h){h.inside||(h.inside={}),h.inside.rest=i},d="doc-comment";if(a=t.languages[o]){var a,u=a[d];if((u=u||(a=t.languages.insertBefore(o,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[d])instanceof RegExp&&(u=a[d]={pattern:u}),Array.isArray(u))for(var f=0,p=u.length;f<p;f++)u[f]instanceof RegExp&&(u[f]={pattern:u[f]}),l(u[f]);else l(u)}})}}),e.addSupport(["java","javascript","php"],e)})(xe),(function(t){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,e=(t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+e.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css,t.languages.markup);e&&(e.tag.addInlined("style","css"),e.tag.addAttribute("style","css"))})(xe),(function(t){var e=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,e=(t.languages.css.selector={pattern:t.languages.css.selector.pattern,lookbehind:!0,inside:e={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+e.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[e,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},t.languages.css.atrule.inside["selector-function-argument"].inside=e,t.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};t.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:e,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:e,number:n})})(xe),(function(t){var e=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,i="(?:"+n.source+"(?:[ ]+"+e.source+")?|"+e.source+"(?:[ ]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),l=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function d(a,u){u=(u||"").replace(/m/g,"")+"m";var f=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<value>>/g,function(){return a});return RegExp(f,u)}t.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return i})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<key>>/g,function(){return"(?:"+o+"|"+l+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:d(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:d(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:d(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:d(l),lookbehind:!0,greedy:!0},number:{pattern:d(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:e,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},t.languages.yml=t.languages.yaml})(xe),(function(t){var e=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(f){return f=f.replace(/<inner>/g,function(){return e}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+f+")")}var i=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return i}),l=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,d=(t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+l+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+l+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(i),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+l+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(i),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(f){["url","bold","italic","strike","code-snippet"].forEach(function(p){f!==p&&(t.languages.markdown[f].inside.content.inside[p]=t.languages.markdown[p])})}),t.hooks.add("after-tokenize",function(f){f.language!=="markdown"&&f.language!=="md"||(function p(h){if(h&&typeof h!="string")for(var y=0,S=h.length;y<S;y++){var C,w=h[y];w.type!=="code"?p(w.content):(C=w.content[1],w=w.content[3],C&&w&&C.type==="code-language"&&w.type==="code-block"&&typeof C.content=="string"&&(C=C.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),C="language-"+(C=(/[a-z][\w-]*/i.exec(C)||[""])[0].toLowerCase()),w.alias?typeof w.alias=="string"?w.alias=[w.alias,C]:w.alias.push(C):w.alias=[C]))}})(f.tokens)}),t.hooks.add("wrap",function(f){if(f.type==="code-block"){for(var p="",h=0,y=f.classes.length;h<y;h++){var S=f.classes[h],S=/language-(.+)/.exec(S);if(S){p=S[1];break}}var C,w=t.languages[p];w?f.content=t.highlight((function(_){return _=_.replace(d,""),_=_.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(v,b){var x;return(b=b.toLowerCase())[0]==="#"?(x=b[1]==="x"?parseInt(b.slice(2),16):Number(b.slice(1)),u(x)):a[b]||v})})(f.content),w,p):p&&p!=="none"&&t.plugins.autoloader&&(C="md-"+new Date().valueOf()+"-"+Math.floor(1e16*Math.random()),f.attributes.id=C,t.plugins.autoloader.loadLanguages(p,function(){var _=document.getElementById(C);_&&(_.innerHTML=t.highlight(_.textContent,t.languages[p],p))}))}}),RegExp(t.languages.markup.tag.pattern.source,"gi")),a={amp:"&",lt:"<",gt:">",quot:'"'},u=String.fromCodePoint||String.fromCharCode;t.languages.md=t.languages.markdown})(xe),xe.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:xe.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},xe.hooks.add("after-tokenize",function(t){if(t.language==="graphql")for(var e=t.tokens.filter(function(C){return typeof C!="string"&&C.type!=="comment"&&C.type!=="scalar"}),n=0;n<e.length;){var i=e[n++];if(i.type==="keyword"&&i.content==="mutation"){var o=[];if(h(["definition-mutation","punctuation"])&&p(1).content==="("){n+=2;var l=y(/^\($/,/^\)$/);if(l===-1)continue;for(;n<l;n++){var d=p(0);d.type==="variable"&&(S(d,"variable-input"),o.push(d.content))}n=l+1}if(h(["punctuation","property-query"])&&p(0).content==="{"&&(n++,S(p(0),"property-mutation"),0<o.length)){var a=y(/^\{$/,/^\}$/);if(a!==-1)for(var u=n;u<a;u++){var f=e[u];f.type==="variable"&&0<=o.indexOf(f.content)&&S(f,"variable-input")}}}}function p(C){return e[n+C]}function h(C,w){w=w||0;for(var _=0;_<C.length;_++){var v=p(_+w);if(!v||v.type!==C[_])return}return 1}function y(C,w){for(var _=1,v=n;v<e.length;v++){var b=e[v],x=b.content;if(b.type==="punctuation"&&typeof x=="string"){if(C.test(x))_++;else if(w.test(x)&&--_===0)return v}}return-1}function S(C,w){var _=C.alias;_?Array.isArray(_)||(C.alias=_=[_]):C.alias=_=[],_.push(w)}}),xe.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},(function(t){var e=t.languages.javascript["template-string"],n=e.pattern.source,i=e.inside.interpolation,o=i.inside["interpolation-punctuation"],l=i.pattern.source;function d(h,y){if(t.languages[h])return{pattern:RegExp("((?:"+y+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:h}}}}function a(h,y,S){return h={code:h,grammar:y,language:S},t.hooks.run("before-tokenize",h),h.tokens=t.tokenize(h.code,h.grammar),t.hooks.run("after-tokenize",h),h.tokens}function u(h,y,S){var _=t.tokenize(h,{interpolation:{pattern:RegExp(l),lookbehind:!0}}),C=0,w={},_=a(_.map(function(b){if(typeof b=="string")return b;for(var x,E,b=b.content;h.indexOf((E=C++,x="___"+S.toUpperCase()+"_"+E+"___"))!==-1;);return w[x]=b,x}).join(""),y,S),v=Object.keys(w);return C=0,(function b(x){for(var E=0;E<x.length;E++){if(C>=v.length)return;var N,A,M,T,j,O,F,U=x[E];typeof U=="string"||typeof U.content=="string"?(N=v[C],(F=(O=typeof U=="string"?U:U.content).indexOf(N))!==-1&&(++C,A=O.substring(0,F),j=w[N],M=void 0,(T={})["interpolation-punctuation"]=o,(T=t.tokenize(j,T)).length===3&&((M=[1,1]).push.apply(M,a(T[1],t.languages.javascript,"javascript")),T.splice.apply(T,M)),M=new t.Token("interpolation",T,i.alias,j),T=O.substring(F+N.length),j=[],A&&j.push(A),j.push(M),T&&(b(O=[T]),j.push.apply(j,O)),typeof U=="string"?(x.splice.apply(x,[E,1].concat(j)),E+=j.length-1):U.content=j)):(F=U.content,Array.isArray(F)?b(F):b([F]))}})(_),new t.Token(S,_,"language-"+S,h)}t.languages.javascript["template-string"]=[d("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),d("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),d("svg",/\bsvg/.source),d("markdown",/\b(?:markdown|md)/.source),d("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),d("sql",/\bsql/.source),e].filter(Boolean);var f={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function p(h){return typeof h=="string"?h:Array.isArray(h)?h.map(p).join(""):p(h.content)}t.hooks.add("after-tokenize",function(h){h.language in f&&(function y(S){for(var C=0,w=S.length;C<w;C++){var _,v,b,x=S[C];typeof x!="string"&&(_=x.content,Array.isArray(_)?x.type==="template-string"?(x=_[1],_.length===3&&typeof x!="string"&&x.type==="embedded-code"&&(v=p(x),x=x.alias,x=Array.isArray(x)?x[0]:x,b=t.languages[x])&&(_[1]=u(v,b,x))):y(_):typeof _!="string"&&y([_]))}})(h.tokens)})})(xe),(function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var e=t.languages.extend("typescript",{});delete e["class-name"],t.languages.typescript["class-name"].inside=e,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e}}}}),t.languages.ts=t.languages.typescript})(xe),(function(t){var e=t.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,i="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";t.languages.jsdoc=t.languages.extend("javadoclike",{parameter:{pattern:RegExp(i+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),t.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(i+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:e,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:e.string,number:e.number,boolean:e.boolean,keyword:t.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:e,alias:"language-javascript"}}}}),t.languages.javadoclike.addSupport("javascript",t.languages.jsdoc)})(xe),(function(t){t.languages.flow=t.languages.extend("javascript",{}),t.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),t.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete t.languages.flow.parameter,t.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(t.languages.flow.keyword)||(t.languages.flow.keyword=[t.languages.flow.keyword]),t.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})})(xe),xe.languages.n4js=xe.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),xe.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),xe.languages.n4jsd=xe.languages.n4js,(function(t){function e(d,a){return RegExp(d.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),a)}t.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+t.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),t.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+t.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),t.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),t.languages.insertBefore("javascript","keyword",{imports:{pattern:e(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:t.languages.javascript},exports:{pattern:e(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:t.languages.javascript}}),t.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),t.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),t.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:e(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],i=0;i<n.length;i++){var l=n[i],o=t.languages.javascript[l],l=(o=t.util.type(o)==="RegExp"?t.languages.javascript[l]={pattern:o}:o).inside||{};(o.inside=l)["maybe-class-name"]=/^[A-Z][\s\S]*/}})(xe),(function(t){var e=t.util.clone(t.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,i=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function l(u,f){return u=u.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return i}).replace(/<SPREAD>/g,function(){return o}),RegExp(u,f)}o=l(o).source,t.languages.jsx=t.languages.extend("markup",e),t.languages.jsx.tag.pattern=l(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=e.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:l(/<SPREAD>/.source),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:l(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);function d(u){for(var f=[],p=0;p<u.length;p++){var h=u[p],y=!1;typeof h!="string"&&(h.type==="tag"&&h.content[0]&&h.content[0].type==="tag"?h.content[0].content[0].content==="</"?0<f.length&&f[f.length-1].tagName===a(h.content[0].content[1])&&f.pop():h.content[h.content.length-1].content!=="/>"&&f.push({tagName:a(h.content[0].content[1]),openedBraces:0}):0<f.length&&h.type==="punctuation"&&h.content==="{"?f[f.length-1].openedBraces++:0<f.length&&0<f[f.length-1].openedBraces&&h.type==="punctuation"&&h.content==="}"?f[f.length-1].openedBraces--:y=!0),(y||typeof h=="string")&&0<f.length&&f[f.length-1].openedBraces===0&&(y=a(h),p<u.length-1&&(typeof u[p+1]=="string"||u[p+1].type==="plain-text")&&(y+=a(u[p+1]),u.splice(p+1,1)),0<p&&(typeof u[p-1]=="string"||u[p-1].type==="plain-text")&&(y=a(u[p-1])+y,u.splice(p-1,1),p--),u[p]=new t.Token("plain-text",y,null,y)),h.content&&typeof h.content!="string"&&d(h.content)}}var a=function(u){return u?typeof u=="string"?u:typeof u.content=="string"?u.content:u.content.map(a).join(""):""};t.hooks.add("after-tokenize",function(u){u.language!=="jsx"&&u.language!=="tsx"||d(u.tokens)})})(xe),(function(t){var e=t.util.clone(t.languages.typescript),e=(t.languages.tsx=t.languages.extend("jsx",e),delete t.languages.tsx.parameter,delete t.languages.tsx["literal-property"],t.languages.tsx.tag);e.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+e.pattern.source+")",e.pattern.flags),e.lookbehind=!0})(xe),xe.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},xe.languages.swift["string-literal"].forEach(function(t){t.inside.interpolation.inside=xe.languages.swift}),(function(t){t.languages.kotlin=t.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete t.languages.kotlin["class-name"];var e={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:t.languages.kotlin}};t.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:e},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:e},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete t.languages.kotlin.string,t.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),t.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),t.languages.kt=t.languages.kotlin,t.languages.kts=t.languages.kotlin})(xe),xe.languages.c=xe.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),xe.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),xe.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},xe.languages.c.string],char:xe.languages.c.char,comment:xe.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:xe.languages.c}}}}),xe.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete xe.languages.c.boolean,xe.languages.objectivec=xe.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete xe.languages.objectivec["class-name"],xe.languages.objc=xe.languages.objectivec,xe.languages.reason=xe.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),xe.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete xe.languages.reason.function,(function(t){for(var e=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)e=e.replace(/<self>/g,function(){return e});e=e.replace(/<self>/g,function(){return/[^\s\S]/.source}),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+e),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string})(xe),xe.languages.go=xe.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),xe.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete xe.languages.go["class-name"],(function(t){var e=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return e.source});t.languages.cpp=t.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return e.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:e,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),t.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),t.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t.languages.cpp}}}}),t.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),t.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:t.languages.extend("cpp",{})}}),t.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},t.languages.cpp["base-clause"])})(xe),xe.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},xe.languages.python["string-interpolation"].inside.interpolation.inside.rest=xe.languages.python,xe.languages.py=xe.languages.python,xe.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},xe.languages.webmanifest=xe.languages.json;var Au={};X8(Au,{dracula:()=>tO,duotoneDark:()=>rO,duotoneLight:()=>sO,github:()=>aO,gruvboxMaterialDark:()=>IO,gruvboxMaterialLight:()=>zO,jettwaveDark:()=>TO,jettwaveLight:()=>NO,nightOwl:()=>cO,nightOwlLight:()=>dO,oceanicNext:()=>hO,okaidia:()=>mO,oneDark:()=>MO,oneLight:()=>OO,palenight:()=>vO,shadesOfPurple:()=>yO,synthwave84:()=>xO,ultramin:()=>wO,vsDark:()=>IC,vsLight:()=>EO});var eO={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},tO=eO,nO={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},rO=nO,iO={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},sO=iO,oO={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},aO=oO,lO={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},cO=lO,uO={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},dO=uO,hr={char:"#D8DEE9",comment:"#999999",keyword:"#c5a5c5",primitive:"#5a9bcf",string:"#8dc891",variable:"#d7deea",boolean:"#ff8b50",tag:"#fc929e",function:"#79b6f2",className:"#FAC863"},fO={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:hr.keyword}},{types:["attr-value"],style:{color:hr.string}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:hr.comment}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:hr.primitive}},{types:["boolean"],style:{color:hr.boolean}},{types:["tag"],style:{color:hr.tag}},{types:["string"],style:{color:hr.string}},{types:["punctuation"],style:{color:hr.string}},{types:["selector","char","builtin","inserted"],style:{color:hr.char}},{types:["function"],style:{color:hr.function}},{types:["operator","entity","url","variable"],style:{color:hr.variable}},{types:["keyword"],style:{color:hr.keyword}},{types:["atrule","class-name"],style:{color:hr.className}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},hO=fO,pO={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},mO=pO,gO={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},vO=gO,_O={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},yO=_O,bO={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},xO=bO,SO={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},wO=SO,CO={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},IC=CO,kO={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},EO=kO,AO={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},TO=AO,RO={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},NO=RO,DO={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},MO=DO,jO={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},OO=jO,LO={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},IO=LO,BO={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},zO=BO,PO=t=>D.useCallback(e=>{var n=e,{className:i,style:o,line:l}=n,d=LC(n,["className","style","line"]);const a=Nh(Ni({},d),{className:Wf("token-line",i)});return typeof t=="object"&&"plain"in t&&(a.style=t.plain),typeof o=="object"&&(a.style=Ni(Ni({},a.style||{}),o)),a},[t]),FO=t=>{const e=D.useCallback(({types:n,empty:i})=>{if(t!=null){{if(n.length===1&&n[0]==="plain")return i!=null?{display:"inline-block"}:void 0;if(n.length===1&&i!=null)return t[n[0]]}return Object.assign(i!=null?{display:"inline-block"}:{},...n.map(o=>t[o]))}},[t]);return D.useCallback(n=>{var i=n,{token:o,className:l,style:d}=i,a=LC(i,["token","className","style"]);const u=Nh(Ni({},a),{className:Wf("token",...o.types,l),children:o.content,style:e(o)});return d!=null&&(u.style=Ni(Ni({},u.style||{}),d)),u},[e])},HO=/\r\n|\r|\n/,Db=t=>{t.length===0?t.push({types:["plain"],content:`
499
+ `,empty:!0}):t.length===1&&t[0].content===""&&(t[0].content=`
500
+ `,t[0].empty=!0)},Mb=(t,e)=>{const n=t.length;return n>0&&t[n-1]===e?t:t.concat(e)},UO=t=>{const e=[[]],n=[t],i=[0],o=[t.length];let l=0,d=0,a=[];const u=[a];for(;d>-1;){for(;(l=i[d]++)<o[d];){let f,p=e[d];const y=n[d][l];if(typeof y=="string"?(p=d>0?p:["plain"],f=y):(p=Mb(p,y.type),y.alias&&(p=Mb(p,y.alias)),f=y.content),typeof f!="string"){d++,e.push(p),n.push(f),i.push(0),o.push(f.length);continue}const S=f.split(HO),C=S.length;a.push({types:p,content:S[0]});for(let w=1;w<C;w++)Db(a),u.push(a=[]),a.push({types:p,content:S[w]})}d--,e.pop(),n.pop(),i.pop(),o.pop()}return Db(a),u},jb=UO,$O=({prism:t,code:e,grammar:n,language:i})=>D.useMemo(()=>{if(n==null)return jb([e]);const o={code:e,grammar:n,language:i,tokens:[]};return t.hooks.run("before-tokenize",o),o.tokens=t.tokenize(e,n),t.hooks.run("after-tokenize",o),jb(o.tokens)},[e,n,i,t]),qO=(t,e)=>{const{plain:n}=t,i=t.styles.reduce((o,l)=>{const{languages:d,style:a}=l;return d&&!d.includes(e)||l.types.forEach(u=>{const f=Ni(Ni({},o[u]),a);o[u]=f}),o},{});return i.root=n,i.plain=Nh(Ni({},n),{backgroundColor:void 0}),i},VO=qO,GO=({children:t,language:e,code:n,theme:i,prism:o})=>{const l=e.toLowerCase(),d=VO(i,l),a=PO(d),u=FO(d),f=o.languages[l],p=$O({prism:o,language:l,code:n,grammar:f});return t({tokens:p,className:`prism-code language-${l}`,style:d!=null?d.root:{},getLineProps:a,getTokenProps:u})},Wv=t=>D.createElement(GO,Nh(Ni({},t),{prism:t.prism||xe,theme:t.theme||IC,code:t.code,language:t.language}));/*! Bundled license information:
501
+
502
+ prismjs/prism.js:
503
+ (**
504
+ * Prism: Lightweight, robust, elegant syntax highlighting
505
+ *
506
+ * @license MIT <https://opensource.org/licenses/MIT>
507
+ * @author Lea Verou <https://lea.verou.me>
508
+ * @namespace
509
+ * @public
510
+ *)
511
+ */function WO(t){var i;const e=(i=t.split(".").pop())==null?void 0:i.toLowerCase();return{ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",json:"json",md:"markdown",css:"css",html:"html",py:"python",go:"go",rs:"rust",sh:"bash",yaml:"yaml",yml:"yaml"}[e||""]||e||"text"}function KO(t){const e=me.c(28),{type:n,content:i,lineNumber:o,newLineNumber:l,language:d}=t,a=n==="added"&&"bg-green-500/20",u=n==="removed"&&"bg-red-500/20",f=n==="context"&&"bg-muted/30";let p;e[0]!==a||e[1]!==u||e[2]!==f?(p=ke("flex font-mono text-xs",a,u,f),e[0]=a,e[1]=u,e[2]=f,e[3]=p):p=e[3];const h=p,y=n==="added"&&"text-green-400",S=n==="removed"&&"text-red-400",C=n==="context"&&"text-muted-foreground/50";let w;e[4]!==y||e[5]!==S||e[6]!==C?(w=ke("font-bold w-4 select-none",y,S,C),e[4]=y,e[5]=S,e[6]=C,e[7]=w):w=e[7];const _=w,v=o!=null?o:"";let b;e[8]!==v?(b=g.jsx("span",{className:"w-10 text-right pr-2 text-muted-foreground select-none border-r border-white/10",children:v}),e[8]=v,e[9]=b):b=e[9];const x=l!=null?l:"";let E;e[10]!==x?(E=g.jsx("span",{className:"w-10 text-right pr-2 text-muted-foreground select-none border-r border-white/10",children:x}),e[10]=x,e[11]=E):E=e[11];const N=n==="added"&&"+",A=n==="removed"&&"-",M=n==="context"&&" ";let T;e[12]!==_||e[13]!==N||e[14]!==A||e[15]!==M?(T=g.jsxs("span",{className:_,children:[N,A,M]}),e[12]=_,e[13]=N,e[14]=A,e[15]=M,e[16]=T):T=e[16];let j;e[17]!==i||e[18]!==d?(j=g.jsx(Wv,{theme:Au.oneDark,code:i,language:d,children:YO}),e[17]=i,e[18]=d,e[19]=j):j=e[19];let O;e[20]!==T||e[21]!==j?(O=g.jsxs("span",{className:"pl-2 flex-1 whitespace-pre flex",children:[T,j]}),e[20]=T,e[21]=j,e[22]=O):O=e[22];let F;return e[23]!==b||e[24]!==E||e[25]!==O||e[26]!==h?(F=g.jsxs("div",{className:h,children:[b,E,O]}),e[23]=b,e[24]=E,e[25]=O,e[26]=h,e[27]=F):F=e[27],F}function YO(t){const{tokens:e,getTokenProps:n}=t;return g.jsx(g.Fragment,{children:e.map((i,o)=>g.jsx("span",{children:i.map((l,d)=>g.jsx("span",{...n({token:l})},d))},o))})}function BC(t){const e=me.c(27),{hunks:n,path:i,language:o,additions:l,deletions:d}=t,[a,u]=D.useState(!0);let f;e[0]!==i||e[1]!==o?(f=o||WO(i),e[0]=i,e[1]=o,e[2]=f):f=e[2];const p=f;let h;e[3]!==a?(h=()=>u(!a),e[3]=a,e[4]=h):h=e[4];let y;e[5]!==a?(y=a?g.jsx($l,{className:"size-3"}):g.jsx(si,{className:"size-3"}),e[5]=a,e[6]=y):y=e[6];let S;e[7]!==h||e[8]!==y?(S=g.jsx("button",{onClick:h,className:"px-1 py-1 hover:bg-muted rounded",children:y}),e[7]=h,e[8]=y,e[9]=S):S=e[9];let C;e[10]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx(Zg,{className:"size-3"}),e[10]=C):C=e[10];let w;e[11]!==i?(w=g.jsx("span",{className:"font-mono pr-2",children:i}),e[11]=i,e[12]=w):w=e[12];let _;e[13]!==l||e[14]!==d?(_=l!==void 0&&d!==void 0&&g.jsxs("span",{className:"ml-auto mr-2 text-muted-foreground",children:["+",l," -",d]}),e[13]=l,e[14]=d,e[15]=_):_=e[15];let v;e[16]!==S||e[17]!==w||e[18]!==_?(v=g.jsxs("div",{className:"flex items-center gap-2 px-1 bg-muted/50 text-xs text-muted-foreground",children:[S,C,w,_]}),e[16]=S,e[17]=w,e[18]=_,e[19]=v):v=e[19];let b;e[20]!==a||e[21]!==n||e[22]!==p?(b=a&&g.jsx("div",{style:{backgroundColor:"#282c34"},children:n.map((E,N)=>g.jsx("div",{className:"divide-y divide-white/5",children:E.changes.map((A,M)=>g.jsx(KO,{...A,language:p},M))},N))}),e[20]=a,e[21]=n,e[22]=p,e[23]=b):b=e[23];let x;return e[24]!==v||e[25]!==b?(x=g.jsx("div",{className:"visualization-container overflow-x-auto border border-white/10 rounded-md",children:g.jsxs("div",{children:[v,b]})}),e[24]=v,e[25]=b,e[26]=x):x=e[26],x}function XO(t){var i;const e=(i=t.split(".").pop())==null?void 0:i.toLowerCase();return{ts:"typescript",tsx:"typescript",js:"javascript",jsx:"javascript",json:"json",md:"markdown",css:"css",html:"html",py:"python",go:"go",rs:"rust",sh:"bash",yaml:"yaml",yml:"yaml"}[e||""]||e||"text"}const ZO=t=>{const e=me.c(31),{content:n,path:i,language:o,created:l,highlightLines:d}=t;let a;e[0]!==d?(a=d===void 0?[]:d,e[0]=d,e[1]=a):a=e[1];const u=a,[f,p]=D.useState(!0);let h;e[2]!==o||e[3]!==i?(h=o||XO(i),e[2]=o,e[3]=i,e[4]=h):h=e[4];const y=h;let S;e[5]!==u?(S=new Set(u),e[5]=u,e[6]=S):S=e[6];const C=S;let w;e[7]!==f?(w=()=>p(!f),e[7]=f,e[8]=w):w=e[8];let _;e[9]!==f?(_=f?g.jsx($l,{className:"size-3"}):g.jsx(si,{className:"size-3"}),e[9]=f,e[10]=_):_=e[10];let v;e[11]!==w||e[12]!==_?(v=g.jsx("button",{onClick:w,className:"flex items-center gap-2 px-2 py-1 hover:bg-muted",children:_}),e[11]=w,e[12]=_,e[13]=v):v=e[13];let b;e[14]===Symbol.for("react.memo_cache_sentinel")?(b=g.jsx(Zg,{className:"size-3"}),e[14]=b):b=e[14];let x;e[15]!==i?(x=g.jsx("span",{className:"font-mono pr-2",children:i}),e[15]=i,e[16]=x):x=e[16];let E;e[17]!==l?(E=l===!1?g.jsxs("span",{className:"flex items-center gap-1 text-warning ml-auto mr-2",children:[g.jsx(mu,{className:"size-3"}),"Overwrote"]}):g.jsxs("span",{className:"flex items-center gap-1 text-success ml-auto mr-2",children:[g.jsx(xs,{className:"size-3"}),"Created"]}),e[17]=l,e[18]=E):E=e[18];let N;e[19]!==E||e[20]!==v||e[21]!==x?(N=g.jsxs("div",{className:"flex items-center gap-2 px-1 bg-muted/50 text-xs text-muted-foreground",children:[v,b,x,E]}),e[19]=E,e[20]=v,e[21]=x,e[22]=N):N=e[22];let A;e[23]!==n||e[24]!==y||e[25]!==f||e[26]!==C?(A=f&&g.jsx("div",{style:{backgroundColor:"#282c34"},children:g.jsx(Wv,{theme:Au.oneDark,code:n,language:y,children:T=>{const{tokens:j,getTokenProps:O}=T;return g.jsx(g.Fragment,{children:j.map((F,U)=>g.jsxs("div",{className:`flex font-mono text-xs ${C.has(U+1)?"bg-yellow-500/20":""}`,children:[g.jsx("span",{className:"w-10 text-right pr-2 text-muted-foreground select-none border-r border-white/10",children:U+1}),g.jsx("span",{className:"pl-2 flex-1 whitespace-pre",children:F.map(($,G)=>g.jsx("span",{...O({token:$})},G))})]},U))})}})}),e[23]=n,e[24]=y,e[25]=f,e[26]=C,e[27]=A):A=e[27];let M;return e[28]!==N||e[29]!==A?(M=g.jsx("div",{className:"visualization-container overflow-x-auto border border-white/10 rounded-md",children:g.jsxs("div",{children:[N,A]})}),e[28]=N,e[29]=A,e[30]=M):M=e[30],M};function QO(t){const e=me.c(3),{message:n}=t,i=n===void 0?"Success":n;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx(Nu,{className:"size-4"}),e[0]=o):o=e[0];let l;return e[1]!==i?(l=g.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[o,g.jsx("span",{className:"break-all",children:i})]}),e[1]=i,e[2]=l):l=e[2],l}const JO={edit:c4,plus:ql,trash:Du,search:Qg};function eL(t){const e=me.c(7),{text:n}=t,[i,o]=D.useState(!1);let l;e[0]!==n?(l=async()=>{await navigator.clipboard.writeText(n),o(!0),setTimeout(()=>o(!1),1500)},e[0]=n,e[1]=l):l=e[1];const d=l;let a;e[2]!==i?(a=i?g.jsx("span",{className:"text-success text-xs",children:"Copied!"}):g.jsx(yu,{className:"size-3"}),e[2]=i,e[3]=a):a=e[3];let u;return e[4]!==d||e[5]!==a?(u=g.jsx("button",{onClick:d,className:"text-muted-foreground hover:text-foreground transition-colors",title:"Copy path",children:a}),e[4]=d,e[5]=a,e[6]=u):u=e[6],u}function tL(t){const e=me.c(16),{title:n,groups:i,files:o,total:l}=t;let d;e[0]!==o?(d=o||[],e[0]=o,e[1]=d):d=e[1];let a;e[2]!==d?(a={label:"Files",files:d,icon:void 0},e[2]=d,e[3]=a):a=e[3];const u=a;let f;e[4]!==u||e[5]!==o||e[6]!==i?(f=i||(o?[u]:[]),e[4]=u,e[5]=o,e[6]=i,e[7]=f):f=e[7];const p=f;if(p.length===0)return null;let h;e[8]!==n||e[9]!==l?(h=n&&g.jsxs("div",{className:"text-sm font-medium text-foreground",children:[n,l!==void 0&&g.jsxs("span",{className:"ml-2 text-muted-foreground",children:["(",l," files)"]})]}),e[8]=n,e[9]=l,e[10]=h):h=e[10];let y;e[11]!==p?(y=p.map(nL),e[11]=p,e[12]=y):y=e[12];let S;return e[13]!==h||e[14]!==y?(S=g.jsxs("div",{className:"flex flex-col gap-3",children:[h,y]}),e[13]=h,e[14]=y,e[15]=S):S=e[15],S}function nL(t,e){return g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[t.icon&&g.jsx("span",{className:"flex items-center",children:(()=>{const n=JO[t.icon];return g.jsx(n,{className:"size-3"})})()}),g.jsx("span",{children:t.label}),g.jsxs("span",{className:"text-muted-foreground/50",children:["(",t.files.length,")"]})]}),g.jsx("div",{className:"flex flex-col gap-0.5 pl-5",children:t.files.map(rL)})]},e)}function rL(t,e){return g.jsxs("div",{className:"flex items-center gap-2 text-xs group",children:[g.jsx(Zg,{className:"size-3 text-muted-foreground shrink-0"}),g.jsx("span",{className:"font-mono text-foreground/80 truncate",children:t.path}),t.line!==void 0&&g.jsxs("span",{className:"text-muted-foreground shrink-0",children:[":",t.line]}),t.action&&g.jsx("span",{className:ke("text-xs px-1 rounded shrink-0",t.action==="created"&&"bg-success/20 text-success",t.action==="modified"&&"bg-warning/20 text-warning",t.action==="deleted"&&"bg-destructive/20 text-destructive"),children:t.action}),g.jsx(eL,{text:t.path})]},e)}function iL(t){const e=me.c(15),{command:n,stdout:i,stderr:o,exitCode:l}=t,d=l===0;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx("span",{className:"text-muted-foreground",children:"$ "}),e[0]=a):a=e[0];let u;e[1]!==n?(u=g.jsxs("div",{className:"font-mono text-xs text-muted-foreground truncate flex-1 mr-2",children:[a,g.jsx("span",{className:"text-foreground",children:n})]}),e[1]=n,e[2]=u):u=e[2];const f=`text-xs font-mono px-2 py-0.5 rounded ${d?"bg-muted text-muted-foreground":"bg-red-500/20 text-red-400"}`;let p;e[3]!==l||e[4]!==f?(p=g.jsxs("span",{className:f,children:["[",l,"]"]}),e[3]=l,e[4]=f,e[5]=p):p=e[5];let h;e[6]!==u||e[7]!==p?(h=g.jsxs("div",{className:"bg-muted px-3 py-2 flex items-center justify-between",children:[u,p]}),e[6]=u,e[7]=p,e[8]=h):h=e[8];let y;e[9]!==o||e[10]!==i?(y=(i||o)&&g.jsxs("div",{className:"bg-black px-3 py-2 font-mono text-xs overflow-x-auto",children:[i&&g.jsx("pre",{className:"text-gray-300 whitespace-pre-wrap",children:i}),o&&g.jsx("pre",{className:"text-red-400 whitespace-pre-wrap mt-1",children:o})]}),e[9]=o,e[10]=i,e[11]=y):y=e[11];let S;return e[12]!==h||e[13]!==y?(S=g.jsxs("div",{className:"visualization-container border border-white/10 rounded-md overflow-hidden",children:[h,y]}),e[12]=h,e[13]=y,e[14]=S):S=e[14],S}const sL={pending:{icon:XE,color:"text-muted-foreground"},in_progress:{icon:gr,color:"text-warning",animate:!0},completed:{icon:Nu,color:"text-success"},cancelled:{icon:Gf,color:"text-destructive"}},oL={high:{label:"high",className:"bg-destructive/20 text-destructive"},medium:{label:"",className:""},low:{label:"low",className:"text-muted-foreground"}};function aL(t){const e=me.c(13),{title:n,items:i}=t;if(i.length===0)return null;let o;e[0]!==i?(o=i.filter(dL),e[0]=i,e[1]=o):o=e[1];const l=o.length;i.filter(uL),i.filter(cL);let d;e[2]!==l||e[3]!==i.length||e[4]!==n?(d=(n||i.length>0)&&g.jsxs("div",{className:"text-sm font-medium text-foreground",children:[n||"Todo List",g.jsxs("span",{className:"ml-2 text-muted-foreground",children:["(",i.length,")"]}),l>0&&g.jsxs("span",{className:"ml-2 text-success text-xs",children:[l," completed"]})]}),e[2]=l,e[3]=i.length,e[4]=n,e[5]=d):d=e[5];let a;e[6]!==i?(a=i.map(lL),e[6]=i,e[7]=a):a=e[7];let u;e[8]!==a?(u=g.jsx("div",{className:"flex flex-col gap-1 w-full",children:a}),e[8]=a,e[9]=u):u=e[9];let f;return e[10]!==d||e[11]!==u?(f=g.jsxs("div",{className:"flex flex-col gap-3 w-full overflow-hidden",children:[d,u]}),e[10]=d,e[11]=u,e[12]=f):f=e[12],f}function lL(t,e){const n=sL[t.status],i=n.icon,o=oL[t.priority];return g.jsxs("div",{className:"flex items-center gap-2 text-sm min-w-0",children:[g.jsx(i,{className:ke("size-4 shrink-0",n.color,n.animate&&"animate-spin")}),g.jsx("span",{className:ke("flex-1 break-all",t.status==="completed"&&"line-through text-muted-foreground",t.status==="cancelled"&&"text-muted-foreground"),children:t.content}),o.label&&t.priority==="high"&&g.jsx("span",{className:ke("text-xs px-1.5 py-0.5 rounded shrink-0",o.className),children:o.label}),t.priority==="low"&&t.status!=="completed"&&t.status!=="cancelled"&&g.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:o.label})]},e)}function cL(t){return t.status==="pending"}function uL(t){return t.status==="in_progress"}function dL(t){return t.status==="completed"}function fL(t){const e=me.c(38),{visualization:n}=t;if(!n)return null;switch(n.type){case"diff":{let i;return e[0]!==n.additions||e[1]!==n.deletions||e[2]!==n.hunks||e[3]!==n.language||e[4]!==n.matchInfo||e[5]!==n.path?(i=g.jsx(BC,{path:n.path,hunks:n.hunks,language:n.language,additions:n.additions,deletions:n.deletions,matchInfo:n.matchInfo}),e[0]=n.additions,e[1]=n.deletions,e[2]=n.hunks,e[3]=n.language,e[4]=n.matchInfo,e[5]=n.path,e[6]=i):i=e[6],i}case"diffs":{let i;e[7]!==n.items?(i=n.items.map(hL),e[7]=n.items,e[8]=i):i=e[8];let o;return e[9]!==i?(o=g.jsx("div",{className:"space-y-3",children:i}),e[9]=i,e[10]=o):o=e[10],o}case"code":{let i;return e[11]!==n.content||e[12]!==n.created||e[13]!==n.highlightLines||e[14]!==n.language||e[15]!==n.path?(i=g.jsx(ZO,{path:n.path,content:n.content,language:n.language,created:n.created,highlightLines:n.highlightLines}),e[11]=n.content,e[12]=n.created,e[13]=n.highlightLines,e[14]=n.language,e[15]=n.path,e[16]=i):i=e[16],i}case"file-list":{let i;return e[17]!==n.files||e[18]!==n.groups||e[19]!==n.title||e[20]!==n.total?(i=g.jsx(tL,{title:n.title,groups:n.groups,files:n.files,total:n.total}),e[17]=n.files,e[18]=n.groups,e[19]=n.title,e[20]=n.total,e[21]=i):i=e[21],i}case"table":{let i;e[22]!==n.rows?(i=JSON.stringify(n.rows,null,2),e[22]=n.rows,e[23]=i):i=e[23];let o;return e[24]!==i?(o=g.jsx("pre",{className:"text-xs bg-muted/50 border rounded-md p-2 overflow-x-auto",children:i}),e[24]=i,e[25]=o):o=e[25],o}case"markdown":{let i;return e[26]!==n.content?(i=g.jsx("div",{className:"prose prose-sm dark:prose-invert",children:n.content}),e[26]=n.content,e[27]=i):i=e[27],i}case"none":{let i;return e[28]!==n.message?(i=g.jsx(QO,{message:n.message}),e[28]=n.message,e[29]=i):i=e[29],i}case"shell-output":{let i;return e[30]!==n.command||e[31]!==n.exitCode||e[32]!==n.stderr||e[33]!==n.stdout?(i=g.jsx(iL,{command:n.command,stdout:n.stdout,stderr:n.stderr,exitCode:n.exitCode}),e[30]=n.command,e[31]=n.exitCode,e[32]=n.stderr,e[33]=n.stdout,e[34]=i):i=e[34],i}case"todo-list":{let i;return e[35]!==n.items||e[36]!==n.title?(i=g.jsx(aL,{title:n.title,items:n.items}),e[35]=n.items,e[36]=n.title,e[37]=i):i=e[37],i}default:return null}}function hL(t,e){return g.jsx(BC,{path:t.path,hunks:t.hunks,language:t.language,additions:t.additions,deletions:t.deletions,matchInfo:t.matchInfo},`${t.path}-${e}`)}function pL(t){switch(t){case"pending":return g.jsx(Ix,{className:"size-3 text-warning"});case"running":return g.jsx(gr,{className:"size-3 text-warning animate-spin"});case"completed":return g.jsx(Nu,{className:"size-3 text-success"});case"error":return g.jsx(Gf,{className:"size-3 text-destructive"});case"interrupted":return g.jsx(zx,{className:"size-3 text-warning"});default:return null}}function mL(t){if(t&&typeof t=="object"&&"_visualization"in t)return t._visualization}function gL({part:t,pendingPermissions:e,onPermissionResponse:n,onNavigateToSubagent:i}){var _;const[o,l]=D.useState(!1),[d,a]=D.useState(!1),u=t.state,f=u.status,p=f==="completed"&&"output"in u?mL(u.output):void 0,h=f==="pending"?e.find(v=>v.toolCallId===t.callId):void 0,y=h?typeof((_=h.args)==null?void 0:_.command)=="string"?h.args.command:JSON.stringify(h.args,null,2):null;let S=null;if(t.name==="task"){if("childSessionId"in u&&u.childSessionId)S=u.childSessionId;else if(f==="completed"&&"output"in u){const b=(typeof u.output=="string"?u.output:"").match(/task_id:\s*([a-f0-9-]{36})/i);b&&(S=b[1])}}const C=async()=>{if("output"in u){const v=typeof u.output=="string"?u.output:JSON.stringify(u.output,null,2);await navigator.clipboard.writeText(v),a(!0),setTimeout(()=>a(!1),2e3)}},w=(()=>{try{const v=JSON.stringify(u.input);return v.length>50?v.slice(0,47)+"...":v}catch{return String(u.input)}})();return g.jsxs("div",{className:"my-1",children:[g.jsxs(So,{open:o,onOpenChange:l,children:[g.jsx(wo,{asChild:!0,children:g.jsxs("div",{className:"flex items-center gap-2 py-1 cursor-pointer hover:text-foreground transition-colors text-muted-foreground",children:[o?g.jsx($l,{className:"size-4 text-muted-foreground"}):g.jsx(si,{className:"size-4 text-muted-foreground"}),g.jsx(g5,{className:"size-3"}),g.jsx("span",{className:"text-xs truncate max-w-[120px] sm:max-w-none",children:t.name}),!o&&g.jsx("span",{className:"text-xs text-muted-foreground font-mono truncate flex-1 min-w-0 sm:max-w-[200px] hidden sm:block",children:w}),g.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[pL(f),S&&i&&g.jsxs(Pe,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0 sm:w-auto sm:px-2",onClick:v=>{v.stopPropagation(),i(S)},title:"View session",children:[g.jsx(_g,{className:"size-3"}),g.jsx("span",{className:"hidden sm:inline ml-1",children:"View"})]})]})]})}),g.jsx(Co,{children:g.jsxs("div",{className:"pl-5 pb-2 flex flex-col gap-2",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-xs uppercase text-muted-foreground mb-1",children:"Input"}),g.jsx("pre",{className:"text-xs bg-background border rounded-md p-2 overflow-x-auto whitespace-pre-wrap break-words",children:JSON.stringify(u.input,null,2)})]}),(f==="running"||f==="completed")&&S&&i&&g.jsxs(Pe,{variant:"outline",className:"w-full",size:"sm",onClick:()=>i(S),children:[g.jsx(_g,{className:"size-4","data-icon":"inline-start"}),f==="running"?"Watch Subagent":"View Session"]}),f==="completed"&&"output"in u&&g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center justify-between mb-1",children:[g.jsx("div",{className:"text-xs uppercase text-muted-foreground",children:"Output"}),g.jsx(Pe,{variant:"ghost",size:"icon",onClick:C,className:"size-6",children:d?g.jsx(xs,{className:"size-3 text-success"}):g.jsx(yu,{className:"size-3"})})]}),g.jsx("pre",{className:"text-xs bg-success/10 border border-success/20 rounded-md p-2 overflow-x-auto whitespace-pre-wrap break-words",children:typeof u.output=="string"?u.output:JSON.stringify(u.output,null,2)})]}),f==="error"&&"error"in u&&g.jsxs("div",{children:[g.jsx("div",{className:"text-xs uppercase text-muted-foreground mb-1",children:"Error"}),g.jsx("pre",{className:"text-xs bg-destructive/10 border border-destructive/20 rounded-md p-2 overflow-x-auto whitespace-pre-wrap break-words text-destructive",children:u.error})]})]})})]}),f==="pending"&&h&&g.jsxs("div",{className:"border border-warning/50 bg-warning/10 rounded-md p-3 flex flex-col gap-3 mt-2",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(bu,{className:"size-4 text-warning"}),g.jsx(Bn,{variant:"outline",className:"text-warning border-warning",children:h.permissionType}),g.jsx("span",{className:"text-sm font-mono text-muted-foreground",children:h.permissionKey})]}),h.message&&g.jsx("p",{className:"text-sm",children:h.message}),h.dangerous&&g.jsxs("div",{className:"flex items-center gap-2 text-sm text-destructive font-medium",children:[g.jsx(bu,{className:"size-4"}),"This operation is marked as dangerous"]}),y&&g.jsxs(So,{children:[g.jsx(wo,{asChild:!0,children:g.jsxs("button",{className:"flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors w-full text-left",children:[g.jsx(si,{className:"size-3"}),g.jsx("span",{className:"uppercase tracking-wide",children:"Command"})]})}),g.jsx(Co,{children:g.jsx("pre",{className:"text-xs bg-background border rounded-md p-2 mt-1 overflow-x-auto whitespace-pre-wrap break-words overflow-wrap-break",children:y})})]}),g.jsxs("div",{className:"flex justify-end gap-2 flex-wrap",children:[g.jsx(Pe,{variant:"outline",size:"sm",onClick:()=>n(t.callId,!1,!1),children:"Deny"}),g.jsx(Pe,{variant:"secondary",size:"sm",onClick:()=>n(t.callId,!0,!1),children:"Approve"}),g.jsx(Pe,{size:"sm",onClick:()=>n(t.callId,!0,!0),children:"Always Allow"})]})]}),f==="completed"&&p&&g.jsx("div",{className:"mt-2",children:g.jsx(fL,{visualization:p})})]})}function vL(t){const e=me.c(25),{prompts:n,query:i,selectedIndex:o,onSelect:l}=t;let d,a,u,f;if(e[0]!==l||e[1]!==n||e[2]!==i||e[3]!==o){f=Symbol.for("react.early_return_sentinel");e:{let _;if(e[8]!==i?(_=b=>b.name.toLowerCase().includes(i.toLowerCase()),e[8]=i,e[9]=_):_=e[9],d=n.filter(_),d.length===0){let b;e[10]!==i?(b=g.jsxs("div",{className:"p-2 text-xs text-muted-foreground",children:['No prompts matching "/',i,'"']}),e[10]=i,e[11]=b):b=e[11],f=b;break e}a="p-1";let v;e[12]!==l||e[13]!==o?(v=(b,x)=>g.jsxs("button",{onClick:()=>l(b),className:ke("flex items-center gap-2 w-full px-2 py-1.5 rounded text-sm text-left","hover:bg-muted",x===o&&"bg-primary/20 text-primary font-medium ring-1 ring-primary/50"),children:[g.jsx(R4,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsxs("div",{className:"font-mono text-xs",children:["/",b.name]}),g.jsx("div",{className:"text-xs text-muted-foreground truncate",children:b.description})]})]},b.name),e[12]=l,e[13]=o,e[14]=v):v=e[14],u=d.map(v)}e[0]=l,e[1]=n,e[2]=i,e[3]=o,e[4]=d,e[5]=a,e[6]=u,e[7]=f}else d=e[4],a=e[5],u=e[6],f=e[7];if(f!==Symbol.for("react.early_return_sentinel"))return f;const p=d.length!==1?"s":"";let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"↑↓"}),e[15]=h):h=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"↵"}),e[16]=y):y=e[16];let S;e[17]===Symbol.for("react.memo_cache_sentinel")?(S=g.jsx("kbd",{className:"ml-1 px-1 py-0.5 bg-muted rounded text-[10px]",children:"esc"}),e[17]=S):S=e[17];let C;e[18]!==d.length||e[19]!==p?(C=g.jsxs("div",{className:"mt-1 pt-1 border-t text-xs text-muted-foreground px-2",children:[d.length," prompt",p," •",h," navigate",y," select",S," close"]}),e[18]=d.length,e[19]=p,e[20]=C):C=e[20];let w;return e[21]!==a||e[22]!==u||e[23]!==C?(w=g.jsxs("div",{className:a,children:[u,C]}),e[21]=a,e[22]=u,e[23]=C,e[24]=w):w=e[24],w}function _L(t){const e=me.c(9),{debounceMs:n}=t,[i,o]=D.useState(""),[l,d]=D.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=[],e[0]=a):a=e[0];const[u,f]=D.useState(a);let p;e[1]===Symbol.for("react.memo_cache_sentinel")?(p=_=>{const v={type:"file",path:_.path,display:_.name};return f(b=>[...b,v]),d(!1),o(""),v},e[1]=p):p=e[1];const h=p,y=yL;let S;e[2]!==u?(S=_=>{const v=/@([^\s@]+)/g,b=[];let x;for(;(x=v.exec(_))!==null;){const E=x[1];u.some(N=>N.path===E)&&!b.some(N=>N.path===E)&&b.push({type:"file",path:E,display:E.split("/").pop()||E})}return b},e[2]=u,e[3]=S):S=e[3];const C=S;let w;return e[4]!==C||e[5]!==u||e[6]!==i||e[7]!==l?(w={query:i,setQuery:o,showAutocomplete:l,setShowAutocomplete:d,mentions:u,handleFileSelect:h,insertMention:y,extractMentions:C},e[4]=C,e[5]=u,e[6]=i,e[7]=l,e[8]=w):w=e[8],w}function yL(t,e,n){const i=t.lastIndexOf("@",e);if(i===-1)return{text:t,cursorPos:e};const o=t.slice(0,i)+`@${n.path}`+t.slice(e),l=i+n.path.length+1;return{text:o,cursorPos:l}}function bL(t,e){return e?t.content.includes("ARG")?t.content.replace("ARG",e):`${t.content}
512
+ ${e}`:t.content}function xL(t){const e=t.trimStart();if(!e.startsWith("/"))return null;const n=e.indexOf(" ");return n===-1?{command:e.slice(1),rest:""}:{command:e.slice(1,n),rest:e.slice(n+1).trim()}}const SL=D.forwardRef(function(e,n){const i=me.c(90),{onSendMessage:o,disabled:l,isStreaming:d,onStopStreaming:a,placeholder:u,workspaceId:f,serverUrl:p,apiToken:h,prompts:y}=e,S=u===void 0?"Type a message...":u;let C;i[0]!==y?(C=y===void 0?[]:y,i[0]=y,i[1]=C):C=i[1];const w=C,[_,v]=D.useState(""),[b,x]=D.useState(0);let E;i[2]===Symbol.for("react.memo_cache_sentinel")?(E=[],i[2]=E):E=i[2];const[N,A]=D.useState(E),[M,T]=D.useState(0),[j,O]=D.useState("none"),[F,U]=D.useState(""),$=D.useRef(null);let G,K;i[3]===Symbol.for("react.memo_cache_sentinel")?(G=()=>({focus:()=>{var Ce;return(Ce=$.current)==null?void 0:Ce.focus()}}),K=[],i[3]=G,i[4]=K):(G=i[3],K=i[4]),D.useImperativeHandle(n,G,K);const V=f||"";let X;i[5]!==V?(X={workspaceId:V},i[5]=V,i[6]=X):X=i[6];const{query:Z,setQuery:I,showAutocomplete:L,setShowAutocomplete:B,handleFileSelect:H,insertMention:P}=_L(X);let ee;i[7]===Symbol.for("react.memo_cache_sentinel")?(ee=()=>{T(0)},i[7]=ee):ee=i[7];let ne;i[8]!==N||i[9]!==F||i[10]!==w?(ne=[N,F,w],i[8]=N,i[9]=F,i[10]=w,i[11]=ne):ne=i[11],D.useEffect(ee,ne);let Q;i[12]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>{const Ce=$.current;Ce&&(Ce.style.height="auto",Ce.style.height=`${Math.min(Ce.scrollHeight,150)}px`)},i[12]=Q):Q=i[12];let W;i[13]!==_?(W=[_],i[13]=_,i[14]=W):W=i[14],D.useEffect(Q,W);let q;if(i[15]!==F||i[16]!==w){let Ce;i[18]!==F?(Ce=Ve=>Ve.name.toLowerCase().includes(F.toLowerCase()),i[18]=F,i[19]=Ce):Ce=i[19],q=w.filter(Ce),i[15]=F,i[16]=w,i[17]=q}else q=i[17];const J=q,ie=j==="prompts"&&w.length>0,ce=j==="files"&&L&&!!f;let ae;i[20]!==I||i[21]!==B?(ae=Ce=>{const Ve=Ce.target.value,lt=Ce.target.selectionStart||0;v(Ve),x(lt);const Dt=Ve.lastIndexOf("/",lt);if(Dt!==-1){const Ot=Dt>0?Ve[Dt-1]:`
513
+ `,Jt=Ve.slice(Dt+1,lt);if((Ot===`
514
+ `||Ot===" "||Ot==="")&&!Jt.includes(" ")){U(Jt),O("prompts");return}}const Xt=Ve.lastIndexOf("@",lt);if(Xt!==-1){const Ot=Ve.slice(Xt+1,lt);if(!Ot.includes(" ")){I(Ot),B(!0),O("files");return}}O("none"),B(!1)},i[20]=I,i[21]=B,i[22]=ae):ae=i[22];const _e=ae;let Ee;i[23]!==b||i[24]!==H||i[25]!==_||i[26]!==P||i[27]!==B?(Ee=Ce=>{const Ve=H(Ce),lt=P(_,b,Ve);v(lt.text),O("none"),B(!1),A([]),setTimeout(()=>{$.current&&($.current.focus(),$.current.setSelectionRange(lt.cursorPos,lt.cursorPos))},0)},i[23]=b,i[24]=H,i[25]=_,i[26]=P,i[27]=B,i[28]=Ee):Ee=i[28];const Te=Ee;let Be;i[29]!==b||i[30]!==_?(Be=Ce=>{const Ve=_.lastIndexOf("/",b),lt=_.slice(0,Ve),Dt=_.slice(Ve+1),Xt=Dt.indexOf(" "),Ot=Xt!==-1?Dt.slice(Xt):"",Jt=`${lt}/${Ce.name}${Ot}`,Et=Ve+1+Ce.name.length+0;v(Jt),O("none"),setTimeout(()=>{$.current&&($.current.focus(),$.current.setSelectionRange(Et,Et))},0)},i[29]=b,i[30]=_,i[31]=Be):Be=i[31];const se=Be;let Ye;i[32]!==l||i[33]!==_||i[34]!==o||i[35]!==w?(Ye=Ce=>{if(Ce==null||Ce.preventDefault(),!_.trim()||l)return;const Ve=xL(_);if(Ve){const lt=w.find(Dt=>Dt.name===Ve.command);if(lt){const Dt=bL(lt,Ve.rest);o(Dt),v("");return}}o(_.trim()),v("")},i[32]=l,i[33]=_,i[34]=o,i[35]=w,i[36]=Ye):Ye=i[36];const rt=Ye;let nt;i[37]!==N||i[38]!==J||i[39]!==Te||i[40]!==se||i[41]!==rt||i[42]!==M||i[43]!==B||i[44]!==ce||i[45]!==ie?(nt=Ce=>{if(!Ce.nativeEvent.isComposing){if(ie&&J.length>0)switch(Ce.key){case"ArrowDown":{Ce.preventDefault(),T(Ve=>Math.min(Ve+1,J.length-1));return}case"ArrowUp":{Ce.preventDefault(),T(wL);return}case"Enter":{if(Ce.shiftKey)return;Ce.preventDefault(),J[M]&&se(J[M]);return}case"Tab":{Ce.preventDefault(),J[M]&&se(J[M]);return}case"Escape":{Ce.preventDefault(),O("none");return}}if(ce&&N.length>0)switch(Ce.key){case"ArrowDown":{Ce.preventDefault(),T(Ve=>Math.min(Ve+1,N.length-1));return}case"ArrowUp":{Ce.preventDefault(),T(CL);return}case"Enter":{Ce.preventDefault(),N[M]&&Te(N[M]);return}case"Escape":{Ce.preventDefault(),B(!1),O("none");return}case"Tab":{Ce.preventDefault(),N[M]&&Te(N[M]);return}}Ce.key==="Enter"&&!Ce.shiftKey&&(Ce.preventDefault(),rt())}},i[37]=N,i[38]=J,i[39]=Te,i[40]=se,i[41]=rt,i[42]=M,i[43]=B,i[44]=ce,i[45]=ie,i[46]=nt):nt=i[46];const Ge=nt;let gt;i[47]===Symbol.for("react.memo_cache_sentinel")?(gt=Ce=>{A(Ce)},i[47]=gt):gt=i[47];const it=gt;if(d&&a){let Ce;i[48]===Symbol.for("react.memo_cache_sentinel")?(Ce=g.jsxs("div",{className:"animate-pulse flex items-center gap-2 text-muted-foreground",children:[g.jsx("div",{className:"size-2 rounded-full bg-primary animate-bounce"}),g.jsx("div",{className:"size-2 rounded-full bg-primary animate-bounce [animation-delay:0.1s]"}),g.jsx("div",{className:"size-2 rounded-full bg-primary animate-bounce [animation-delay:0.2s]"}),g.jsx("span",{className:"text-sm ml-2",children:"Generating..."})]}),i[48]=Ce):Ce=i[48];let Ve;i[49]===Symbol.for("react.memo_cache_sentinel")?(Ve=g.jsx(Ux,{className:"size-4","data-icon":"inline-start"}),i[49]=Ve):Ve=i[49];let lt;return i[50]!==a?(lt=g.jsx("div",{className:"p-4 border-t border-border bg-card",children:g.jsxs("div",{className:"flex items-center justify-center gap-3",children:[Ce,g.jsxs(Pe,{variant:"outline",size:"sm",onClick:a,children:[Ve,"Stop"]})]})}),i[50]=a,i[51]=lt):lt=i[51],lt}const Je=ie||ce;let at;i[52]!==B?(at=Ce=>{Ce||(O("none"),B(!1))},i[52]=B,i[53]=at):at=i[53];let fe;i[54]===Symbol.for("react.memo_cache_sentinel")?(fe=ke("min-h-[44px] max-h-[150px] resize-none pr-12","focus-visible:ring-1"),i[54]=fe):fe=i[54];let ge;i[55]!==l||i[56]!==_e||i[57]!==Ge||i[58]!==_||i[59]!==S?(ge=g.jsx(xj,{asChild:!0,children:g.jsx(gj,{ref:$,value:_,onChange:_e,onKeyDown:Ge,placeholder:S,disabled:l,className:fe,rows:1,"data-chat-input":"true"})}),i[55]=l,i[56]=_e,i[57]=Ge,i[58]=_,i[59]=S,i[60]=ge):ge=i[60];let Ae;i[61]!==h||i[62]!==Te||i[63]!==se||i[64]!==F||i[65]!==w||i[66]!==Z||i[67]!==M||i[68]!==p||i[69]!==ce||i[70]!==f?(Ae=g.jsx(wh,{className:"w-72 p-0",align:"start",side:"top",sideOffset:8,onOpenAutoFocus:kL,onCloseAutoFocus:EL,children:ce?g.jsx(i8,{workspaceId:f||"",searchQuery:Z,selectedIndex:M,onSelect:Te,onFilesChange:it,serverUrl:p,apiToken:h}):g.jsx(vL,{prompts:w,query:F,selectedIndex:M,onSelect:se})}),i[61]=h,i[62]=Te,i[63]=se,i[64]=F,i[65]=w,i[66]=Z,i[67]=M,i[68]=p,i[69]=ce,i[70]=f,i[71]=Ae):Ae=i[71];let Me;i[72]!==Je||i[73]!==at||i[74]!==ge||i[75]!==Ae?(Me=g.jsx("div",{className:"flex-1 relative",children:g.jsxs(Sh,{open:Je,onOpenChange:at,children:[ge,Ae]})}),i[72]=Je,i[73]=at,i[74]=ge,i[75]=Ae,i[76]=Me):Me=i[76];let Le;i[77]!==l||i[78]!==_?(Le=!_.trim()||l,i[77]=l,i[78]=_,i[79]=Le):Le=i[79];let st;i[80]===Symbol.for("react.memo_cache_sentinel")?(st=g.jsx(Y4,{className:"size-4"}),i[80]=st):st=i[80];let Se;i[81]!==Le?(Se=g.jsx(Pe,{type:"submit",disabled:Le,size:"default",className:"h-11",children:st}),i[81]=Le,i[82]=Se):Se=i[82];let Ze;i[83]!==Me||i[84]!==Se?(Ze=g.jsxs("div",{className:"flex gap-3 items-end",children:[Me,Se]}),i[83]=Me,i[84]=Se,i[85]=Ze):Ze=i[85];let Ie;i[86]===Symbol.for("react.memo_cache_sentinel")?(Ie=g.jsxs("div",{className:"mt-2 text-xs text-muted-foreground text-center hidden sm:flex items-center justify-center gap-1",children:[g.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-[10px]",children:"/"}),g.jsx("span",{children:"prompts"}),g.jsx("span",{className:"mx-2",children:"•"}),g.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-[10px]",children:"@"}),g.jsx("span",{children:"files"}),g.jsx("span",{className:"mx-2",children:"•"}),g.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-[10px]",children:"Enter"}),g.jsx("span",{children:"to send"}),g.jsx("span",{className:"mx-2",children:"•"}),g.jsx("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-[10px]",children:"Shift + Enter"}),g.jsx("span",{children:"for new line"})]}),i[86]=Ie):Ie=i[86];let ot;return i[87]!==rt||i[88]!==Ze?(ot=g.jsxs("form",{onSubmit:rt,className:"p-4 border-t border-border bg-card",children:[Ze,Ie]}),i[87]=rt,i[88]=Ze,i[89]=ot):ot=i[89],ot});function wL(t){return Math.max(t-1,0)}function CL(t){return Math.max(t-1,0)}function kL(t){return t.preventDefault()}function EL(t){return t.preventDefault()}function AL(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const TL=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,RL=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,NL={};function Ob(t,e){return(NL.jsx?RL:TL).test(t)}const DL=/[ \t\n\f\r]/g;function ML(t){return typeof t=="object"?t.type==="text"?Lb(t.value):!1:Lb(t)}function Lb(t){return t.replace(DL,"")===""}class Yu{constructor(e,n,i){this.normal=n,this.property=e,i&&(this.space=i)}}Yu.prototype.normal={};Yu.prototype.property={};Yu.prototype.space=void 0;function zC(t,e){const n={},i={};for(const o of t)Object.assign(n,o.property),Object.assign(i,o.normal);return new Yu(n,i,e)}function Pg(t){return t.toLowerCase()}class tr{constructor(e,n){this.attribute=n,this.property=e}}tr.prototype.attribute="";tr.prototype.booleanish=!1;tr.prototype.boolean=!1;tr.prototype.commaOrSpaceSeparated=!1;tr.prototype.commaSeparated=!1;tr.prototype.defined=!1;tr.prototype.mustUseProperty=!1;tr.prototype.number=!1;tr.prototype.overloadedBoolean=!1;tr.prototype.property="";tr.prototype.spaceSeparated=!1;tr.prototype.space=void 0;let jL=0;const mt=wa(),dn=wa(),Fg=wa(),Re=wa(),Ut=wa(),jl=wa(),pr=wa();function wa(){return 2**++jL}const Hg=Object.freeze(Object.defineProperty({__proto__:null,boolean:mt,booleanish:dn,commaOrSpaceSeparated:pr,commaSeparated:jl,number:Re,overloadedBoolean:Fg,spaceSeparated:Ut},Symbol.toStringTag,{value:"Module"})),Jm=Object.keys(Hg);class Kv extends tr{constructor(e,n,i,o){let l=-1;if(super(e,n),Ib(this,"space",o),typeof i=="number")for(;++l<Jm.length;){const d=Jm[l];Ib(this,Jm[l],(i&Hg[d])===Hg[d])}}}Kv.prototype.defined=!0;function Ib(t,e,n){n&&(t[e]=n)}function rc(t){const e={},n={};for(const[i,o]of Object.entries(t.properties)){const l=new Kv(i,t.transform(t.attributes||{},i),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(i)&&(l.mustUseProperty=!0),e[i]=l,n[Pg(i)]=i,n[Pg(l.attribute)]=i}return new Yu(e,n,t.space)}const PC=rc({properties:{ariaActiveDescendant:null,ariaAtomic:dn,ariaAutoComplete:null,ariaBusy:dn,ariaChecked:dn,ariaColCount:Re,ariaColIndex:Re,ariaColSpan:Re,ariaControls:Ut,ariaCurrent:null,ariaDescribedBy:Ut,ariaDetails:null,ariaDisabled:dn,ariaDropEffect:Ut,ariaErrorMessage:null,ariaExpanded:dn,ariaFlowTo:Ut,ariaGrabbed:dn,ariaHasPopup:null,ariaHidden:dn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ut,ariaLevel:Re,ariaLive:null,ariaModal:dn,ariaMultiLine:dn,ariaMultiSelectable:dn,ariaOrientation:null,ariaOwns:Ut,ariaPlaceholder:null,ariaPosInSet:Re,ariaPressed:dn,ariaReadOnly:dn,ariaRelevant:null,ariaRequired:dn,ariaRoleDescription:Ut,ariaRowCount:Re,ariaRowIndex:Re,ariaRowSpan:Re,ariaSelected:dn,ariaSetSize:Re,ariaSort:null,ariaValueMax:Re,ariaValueMin:Re,ariaValueNow:Re,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function FC(t,e){return e in t?t[e]:e}function HC(t,e){return FC(t,e.toLowerCase())}const OL=rc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:jl,acceptCharset:Ut,accessKey:Ut,action:null,allow:null,allowFullScreen:mt,allowPaymentRequest:mt,allowUserMedia:mt,alt:null,as:null,async:mt,autoCapitalize:null,autoComplete:Ut,autoFocus:mt,autoPlay:mt,blocking:Ut,capture:null,charSet:null,checked:mt,cite:null,className:Ut,cols:Re,colSpan:null,content:null,contentEditable:dn,controls:mt,controlsList:Ut,coords:Re|jl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:mt,defer:mt,dir:null,dirName:null,disabled:mt,download:Fg,draggable:dn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:mt,formTarget:null,headers:Ut,height:Re,hidden:Fg,high:Re,href:null,hrefLang:null,htmlFor:Ut,httpEquiv:Ut,id:null,imageSizes:null,imageSrcSet:null,inert:mt,inputMode:null,integrity:null,is:null,isMap:mt,itemId:null,itemProp:Ut,itemRef:Ut,itemScope:mt,itemType:Ut,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:mt,low:Re,manifest:null,max:null,maxLength:Re,media:null,method:null,min:null,minLength:Re,multiple:mt,muted:mt,name:null,nonce:null,noModule:mt,noValidate:mt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:mt,optimum:Re,pattern:null,ping:Ut,placeholder:null,playsInline:mt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:mt,referrerPolicy:null,rel:Ut,required:mt,reversed:mt,rows:Re,rowSpan:Re,sandbox:Ut,scope:null,scoped:mt,seamless:mt,selected:mt,shadowRootClonable:mt,shadowRootDelegatesFocus:mt,shadowRootMode:null,shape:null,size:Re,sizes:null,slot:null,span:Re,spellCheck:dn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Re,step:null,style:null,tabIndex:Re,target:null,title:null,translate:null,type:null,typeMustMatch:mt,useMap:null,value:dn,width:Re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ut,axis:null,background:null,bgColor:null,border:Re,borderColor:null,bottomMargin:Re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:mt,declare:mt,event:null,face:null,frame:null,frameBorder:null,hSpace:Re,leftMargin:Re,link:null,longDesc:null,lowSrc:null,marginHeight:Re,marginWidth:Re,noResize:mt,noHref:mt,noShade:mt,noWrap:mt,object:null,profile:null,prompt:null,rev:null,rightMargin:Re,rules:null,scheme:null,scrolling:dn,standby:null,summary:null,text:null,topMargin:Re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:mt,disableRemotePlayback:mt,prefix:null,property:null,results:Re,security:null,unselectable:null},space:"html",transform:HC}),LL=rc({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:pr,accentHeight:Re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Re,amplitude:Re,arabicForm:null,ascent:Re,attributeName:null,attributeType:null,azimuth:Re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Re,by:null,calcMode:null,capHeight:Re,className:Ut,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Re,diffuseConstant:Re,direction:null,display:null,dur:null,divisor:Re,dominantBaseline:null,download:mt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Re,enableBackground:null,end:null,event:null,exponent:Re,externalResourcesRequired:null,fill:null,fillOpacity:Re,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:jl,g2:jl,glyphName:jl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Re,horizOriginX:Re,horizOriginY:Re,id:null,ideographic:Re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Re,k:Re,k1:Re,k2:Re,k3:Re,k4:Re,kernelMatrix:pr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Re,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Re,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Re,overlineThickness:Re,paintOrder:null,panose1:null,path:null,pathLength:Re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ut,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Re,pointsAtY:Re,pointsAtZ:Re,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:pr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:pr,rev:pr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:pr,requiredFeatures:pr,requiredFonts:pr,requiredFormats:pr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Re,specularExponent:Re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Re,strikethroughThickness:Re,string:null,stroke:null,strokeDashArray:pr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Re,strokeOpacity:Re,strokeWidth:null,style:null,surfaceScale:Re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:pr,tabIndex:Re,tableValues:null,target:null,targetX:Re,targetY:Re,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:pr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Re,underlineThickness:Re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Re,values:null,vAlphabetic:Re,vMathematical:Re,vectorEffect:null,vHanging:Re,vIdeographic:Re,version:null,vertAdvY:Re,vertOriginX:Re,vertOriginY:Re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:FC}),UC=rc({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),$C=rc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:HC}),qC=rc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),IL={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},BL=/[A-Z]/g,Bb=/-[a-z]/g,zL=/^data[-\w.:]+$/i;function PL(t,e){const n=Pg(e);let i=e,o=tr;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&zL.test(e)){if(e.charAt(4)==="-"){const l=e.slice(5).replace(Bb,HL);i="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=e.slice(4);if(!Bb.test(l)){let d=l.replace(BL,FL);d.charAt(0)!=="-"&&(d="-"+d),e="data"+d}}o=Kv}return new o(i,e)}function FL(t){return"-"+t.toLowerCase()}function HL(t){return t.charAt(1).toUpperCase()}const UL=zC([PC,OL,UC,$C,qC],"html"),Yv=zC([PC,LL,UC,$C,qC],"svg");function $L(t){return t.join(" ").trim()}var Sl={},eg,zb;function qL(){if(zb)return eg;zb=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,d=/^[;\s]*/,a=/^\s+|\s+$/g,u=`
515
+ `,f="/",p="*",h="",y="comment",S="declaration";function C(_,v){if(typeof _!="string")throw new TypeError("First argument must be a string");if(!_)return[];v=v||{};var b=1,x=1;function E(G){var K=G.match(e);K&&(b+=K.length);var V=G.lastIndexOf(u);x=~V?G.length-V:x+G.length}function N(){var G={line:b,column:x};return function(K){return K.position=new A(G),j(),K}}function A(G){this.start=G,this.end={line:b,column:x},this.source=v.source}A.prototype.content=_;function M(G){var K=new Error(v.source+":"+b+":"+x+": "+G);if(K.reason=G,K.filename=v.source,K.line=b,K.column=x,K.source=_,!v.silent)throw K}function T(G){var K=G.exec(_);if(K){var V=K[0];return E(V),_=_.slice(V.length),K}}function j(){T(n)}function O(G){var K;for(G=G||[];K=F();)K!==!1&&G.push(K);return G}function F(){var G=N();if(!(f!=_.charAt(0)||p!=_.charAt(1))){for(var K=2;h!=_.charAt(K)&&(p!=_.charAt(K)||f!=_.charAt(K+1));)++K;if(K+=2,h===_.charAt(K-1))return M("End of comment missing");var V=_.slice(2,K-2);return x+=2,E(V),_=_.slice(K),x+=2,G({type:y,comment:V})}}function U(){var G=N(),K=T(i);if(K){if(F(),!T(o))return M("property missing ':'");var V=T(l),X=G({type:S,property:w(K[0].replace(t,h)),value:V?w(V[0].replace(t,h)):h});return T(d),X}}function $(){var G=[];O(G);for(var K;K=U();)K!==!1&&(G.push(K),O(G));return G}return j(),$()}function w(_){return _?_.replace(a,h):h}return eg=C,eg}var Pb;function VL(){if(Pb)return Sl;Pb=1;var t=Sl&&Sl.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Sl,"__esModule",{value:!0}),Sl.default=n;const e=t(qL());function n(i,o){let l=null;if(!i||typeof i!="string")return l;const d=(0,e.default)(i),a=typeof o=="function";return d.forEach(u=>{if(u.type!=="declaration")return;const{property:f,value:p}=u;a?o(f,p,u):p&&(l=l||{},l[f]=p)}),l}return Sl}var ou={},Fb;function GL(){if(Fb)return ou;Fb=1,Object.defineProperty(ou,"__esModule",{value:!0}),ou.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,l=function(f){return!f||n.test(f)||t.test(f)},d=function(f,p){return p.toUpperCase()},a=function(f,p){return"".concat(p,"-")},u=function(f,p){return p===void 0&&(p={}),l(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(o,a):f=f.replace(i,a),f.replace(e,d))};return ou.camelCase=u,ou}var au,Hb;function WL(){if(Hb)return au;Hb=1;var t=au&&au.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},e=t(VL()),n=GL();function i(o,l){var d={};return!o||typeof o!="string"||(0,e.default)(o,function(a,u){a&&u&&(d[(0,n.camelCase)(a,l)]=u)}),d}return i.default=i,au=i,au}var KL=WL();const YL=qf(KL),VC=GC("end"),Xv=GC("start");function GC(t){return e;function e(n){const i=n&&n.position&&n.position[t]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function XL(t){const e=Xv(t),n=VC(t);if(e&&n)return{start:e,end:n}}function gu(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Ub(t.position):"start"in t||"end"in t?Ub(t):"line"in t||"column"in t?Ug(t):""}function Ug(t){return $b(t&&t.line)+":"+$b(t&&t.column)}function Ub(t){return Ug(t&&t.start)+"-"+Ug(t&&t.end)}function $b(t){return t&&typeof t=="number"?t:1}class Pn extends Error{constructor(e,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let o="",l={},d=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof e=="string"?o=e:!l.cause&&e&&(d=!0,o=e.message,l.cause=e),!l.ruleId&&!l.source&&typeof i=="string"){const u=i.indexOf(":");u===-1?l.ruleId=i:(l.source=i.slice(0,u),l.ruleId=i.slice(u+1))}if(!l.place&&l.ancestors&&l.ancestors){const u=l.ancestors[l.ancestors.length-1];u&&(l.place=u.position)}const a=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=a?a.line:void 0,this.name=gu(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=d&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Pn.prototype.file="";Pn.prototype.name="";Pn.prototype.reason="";Pn.prototype.message="";Pn.prototype.stack="";Pn.prototype.column=void 0;Pn.prototype.line=void 0;Pn.prototype.ancestors=void 0;Pn.prototype.cause=void 0;Pn.prototype.fatal=void 0;Pn.prototype.place=void 0;Pn.prototype.ruleId=void 0;Pn.prototype.source=void 0;const Zv={}.hasOwnProperty,ZL=new Map,QL=/[A-Z]/g,JL=new Set(["table","tbody","thead","tfoot","tr"]),e7=new Set(["td","th"]),WC="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function t7(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let i;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=c7(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=l7(n,e.jsx,e.jsxs)}const o={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:i,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?Yv:UL,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},l=KC(o,t,void 0);return l&&typeof l!="string"?l:o.create(t,o.Fragment,{children:l||void 0},void 0)}function KC(t,e,n){if(e.type==="element")return n7(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return r7(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return s7(t,e,n);if(e.type==="mdxjsEsm")return i7(t,e);if(e.type==="root")return o7(t,e,n);if(e.type==="text")return a7(t,e)}function n7(t,e,n){const i=t.schema;let o=i;e.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=Yv,t.schema=o),t.ancestors.push(e);const l=XC(t,e.tagName,!1),d=u7(t,e);let a=Jv(t,e);return JL.has(e.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!ML(u):!0})),YC(t,d,l,e),Qv(d,a),t.ancestors.pop(),t.schema=i,t.create(e,l,d,n)}function r7(t,e){if(e.data&&e.data.estree&&t.evaluater){const i=e.data.estree.body[0];return i.type,t.evaluater.evaluateExpression(i.expression)}Tu(t,e.position)}function i7(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);Tu(t,e.position)}function s7(t,e,n){const i=t.schema;let o=i;e.name==="svg"&&i.space==="html"&&(o=Yv,t.schema=o),t.ancestors.push(e);const l=e.name===null?t.Fragment:XC(t,e.name,!0),d=d7(t,e),a=Jv(t,e);return YC(t,d,l,e),Qv(d,a),t.ancestors.pop(),t.schema=i,t.create(e,l,d,n)}function o7(t,e,n){const i={};return Qv(i,Jv(t,e)),t.create(e,t.Fragment,i,n)}function a7(t,e){return e.value}function YC(t,e,n,i){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=i)}function Qv(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function l7(t,e,n){return i;function i(o,l,d,a){const f=Array.isArray(d.children)?n:e;return a?f(l,d,a):f(l,d)}}function c7(t,e){return n;function n(i,o,l,d){const a=Array.isArray(l.children),u=Xv(i);return e(o,l,d,a,{columnNumber:u?u.column-1:void 0,fileName:t,lineNumber:u?u.line:void 0},void 0)}}function u7(t,e){const n={};let i,o;for(o in e.properties)if(o!=="children"&&Zv.call(e.properties,o)){const l=f7(t,o,e.properties[o]);if(l){const[d,a]=l;t.tableCellAlignToStyle&&d==="align"&&typeof a=="string"&&e7.has(e.tagName)?i=a:n[d]=a}}if(i){const l=n.style||(n.style={});l[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function d7(t,e){const n={};for(const i of e.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&t.evaluater){const l=i.data.estree.body[0];l.type;const d=l.expression;d.type;const a=d.properties[0];a.type,Object.assign(n,t.evaluater.evaluateExpression(a.argument))}else Tu(t,e.position);else{const o=i.name;let l;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&t.evaluater){const a=i.value.data.estree.body[0];a.type,l=t.evaluater.evaluateExpression(a.expression)}else Tu(t,e.position);else l=i.value===null?!0:i.value;n[o]=l}return n}function Jv(t,e){const n=[];let i=-1;const o=t.passKeys?new Map:ZL;for(;++i<e.children.length;){const l=e.children[i];let d;if(t.passKeys){const u=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(u){const f=o.get(u)||0;d=u+"-"+f,o.set(u,f+1)}}const a=KC(t,l,d);a!==void 0&&n.push(a)}return n}function f7(t,e,n){const i=PL(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?AL(n):$L(n)),i.property==="style"){let o=typeof n=="object"?n:h7(t,String(n));return t.stylePropertyNameCase==="css"&&(o=p7(o)),["style",o]}return[t.elementAttributeNameCase==="react"&&i.space?IL[i.property]||i.property:i.attribute,n]}}function h7(t,e){try{return YL(e,{reactCompat:!0})}catch(n){if(t.ignoreInvalidStyle)return{};const i=n,o=new Pn("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=t.filePath||void 0,o.url=WC+"#cannot-parse-style-attribute",o}}function XC(t,e,n){let i;if(!n)i={type:"Literal",value:e};else if(e.includes(".")){const o=e.split(".");let l=-1,d;for(;++l<o.length;){const a=Ob(o[l])?{type:"Identifier",name:o[l]}:{type:"Literal",value:o[l]};d=d?{type:"MemberExpression",object:d,property:a,computed:!!(l&&a.type==="Literal"),optional:!1}:a}i=d}else i=Ob(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(i.type==="Literal"){const o=i.value;return Zv.call(t.components,o)?t.components[o]:o}if(t.evaluater)return t.evaluater.evaluateExpression(i);Tu(t)}function Tu(t,e){const n=new Pn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=t.filePath||void 0,n.url=WC+"#cannot-handle-mdx-estrees-without-createevaluater",n}function p7(t){const e={};let n;for(n in t)Zv.call(t,n)&&(e[m7(n)]=t[n]);return e}function m7(t){let e=t.replace(QL,g7);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function g7(t){return"-"+t.toLowerCase()}const tg={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},v7={};function e1(t,e){const n=v7,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ZC(t,i,o)}function ZC(t,e,n){if(_7(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return qb(t.children,e,n)}return Array.isArray(t)?qb(t,e,n):""}function qb(t,e,n){const i=[];let o=-1;for(;++o<t.length;)i[o]=ZC(t[o],e,n);return i.join("")}function _7(t){return!!(t&&typeof t=="object")}const Vb=document.createElement("i");function t1(t){const e="&"+t+";";Vb.innerHTML=e;const n=Vb.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function _r(t,e,n,i){const o=t.length;let l=0,d;if(e<0?e=-e>o?0:o+e:e=e>o?o:e,n=n>0?n:0,i.length<1e4)d=Array.from(i),d.unshift(e,n),t.splice(...d);else for(n&&t.splice(e,n);l<i.length;)d=i.slice(l,l+1e4),d.unshift(e,0),t.splice(...d),l+=1e4,e+=1e4}function zr(t,e){return t.length>0?(_r(t,t.length,0,e),t):e}const Gb={}.hasOwnProperty;function QC(t){const e={};let n=-1;for(;++n<t.length;)y7(e,t[n]);return e}function y7(t,e){let n;for(n in e){const o=(Gb.call(t,n)?t[n]:void 0)||(t[n]={}),l=e[n];let d;if(l)for(d in l){Gb.call(o,d)||(o[d]=[]);const a=l[d];b7(o[d],Array.isArray(a)?a:a?[a]:[])}}}function b7(t,e){let n=-1;const i=[];for(;++n<e.length;)(e[n].add==="after"?t:i).push(e[n]);_r(t,0,0,i)}function JC(t,e){const n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ii(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Un=No(/[A-Za-z]/),zn=No(/[\dA-Za-z]/),x7=No(/[#-'*+\--9=?A-Z^-~]/);function Ff(t){return t!==null&&(t<32||t===127)}const $g=No(/\d/),S7=No(/[\dA-Fa-f]/),w7=No(/[!-/:-@[-`{-~]/);function Qe(t){return t!==null&&t<-2}function Ft(t){return t!==null&&(t<0||t===32)}function xt(t){return t===-2||t===-1||t===32}const Dh=No(new RegExp("\\p{P}|\\p{S}","u")),_a=No(/\s/);function No(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function ic(t){const e=[];let n=-1,i=0,o=0;for(;++n<t.length;){const l=t.charCodeAt(n);let d="";if(l===37&&zn(t.charCodeAt(n+1))&&zn(t.charCodeAt(n+2)))o=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(d=String.fromCharCode(l));else if(l>55295&&l<57344){const a=t.charCodeAt(n+1);l<56320&&a>56319&&a<57344?(d=String.fromCharCode(l,a),o=1):d="�"}else d=String.fromCharCode(l);d&&(e.push(t.slice(i,n),encodeURIComponent(d)),i=n+o+1,d=""),o&&(n+=o,o=0)}return e.join("")+t.slice(i)}function kt(t,e,n,i){const o=i?i-1:Number.POSITIVE_INFINITY;let l=0;return d;function d(u){return xt(u)?(t.enter(n),a(u)):e(u)}function a(u){return xt(u)&&l++<o?(t.consume(u),a):(t.exit(n),e(u))}}const C7={tokenize:k7};function k7(t){const e=t.attempt(this.parser.constructs.contentInitial,i,o);let n;return e;function i(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),kt(t,e,"linePrefix")}function o(a){return t.enter("paragraph"),l(a)}function l(a){const u=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,d(a)}function d(a){if(a===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(a);return}return Qe(a)?(t.consume(a),t.exit("chunkText"),l):(t.consume(a),d)}}const E7={tokenize:A7},Wb={tokenize:T7};function A7(t){const e=this,n=[];let i=0,o,l,d;return a;function a(x){if(i<n.length){const E=n[i];return e.containerState=E[1],t.attempt(E[0].continuation,u,f)(x)}return f(x)}function u(x){if(i++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,o&&b();const E=e.events.length;let N=E,A;for(;N--;)if(e.events[N][0]==="exit"&&e.events[N][1].type==="chunkFlow"){A=e.events[N][1].end;break}v(i);let M=E;for(;M<e.events.length;)e.events[M][1].end={...A},M++;return _r(e.events,N+1,0,e.events.slice(E)),e.events.length=M,f(x)}return a(x)}function f(x){if(i===n.length){if(!o)return y(x);if(o.currentConstruct&&o.currentConstruct.concrete)return C(x);e.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(Wb,p,h)(x)}function p(x){return o&&b(),v(i),y(x)}function h(x){return e.parser.lazy[e.now().line]=i!==n.length,d=e.now().offset,C(x)}function y(x){return e.containerState={},t.attempt(Wb,S,C)(x)}function S(x){return i++,n.push([e.currentConstruct,e.containerState]),y(x)}function C(x){if(x===null){o&&b(),v(0),t.consume(x);return}return o=o||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:l}),w(x)}function w(x){if(x===null){_(t.exit("chunkFlow"),!0),v(0),t.consume(x);return}return Qe(x)?(t.consume(x),_(t.exit("chunkFlow")),i=0,e.interrupt=void 0,a):(t.consume(x),w)}function _(x,E){const N=e.sliceStream(x);if(E&&N.push(null),x.previous=l,l&&(l.next=x),l=x,o.defineSkip(x.start),o.write(N),e.parser.lazy[x.start.line]){let A=o.events.length;for(;A--;)if(o.events[A][1].start.offset<d&&(!o.events[A][1].end||o.events[A][1].end.offset>d))return;const M=e.events.length;let T=M,j,O;for(;T--;)if(e.events[T][0]==="exit"&&e.events[T][1].type==="chunkFlow"){if(j){O=e.events[T][1].end;break}j=!0}for(v(i),A=M;A<e.events.length;)e.events[A][1].end={...O},A++;_r(e.events,T+1,0,e.events.slice(M)),e.events.length=A}}function v(x){let E=n.length;for(;E-- >x;){const N=n[E];e.containerState=N[1],N[0].exit.call(e,t)}n.length=x}function b(){o.write([null]),l=void 0,o=void 0,e.containerState._closeFlow=void 0}}function T7(t,e,n){return kt(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ul(t){if(t===null||Ft(t)||_a(t))return 1;if(Dh(t))return 2}function Mh(t,e,n){const i=[];let o=-1;for(;++o<t.length;){const l=t[o].resolveAll;l&&!i.includes(l)&&(e=l(e,n),i.push(l))}return e}const qg={name:"attention",resolveAll:R7,tokenize:N7};function R7(t,e){let n=-1,i,o,l,d,a,u,f,p;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(i=n;i--;)if(t[i][0]==="exit"&&t[i][1].type==="attentionSequence"&&t[i][1]._open&&e.sliceSerialize(t[i][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[i][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[i][1].end.offset-t[i][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;u=t[i][1].end.offset-t[i][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const h={...t[i][1].end},y={...t[n][1].start};Kb(h,-u),Kb(y,u),d={type:u>1?"strongSequence":"emphasisSequence",start:h,end:{...t[i][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:y},l={type:u>1?"strongText":"emphasisText",start:{...t[i][1].end},end:{...t[n][1].start}},o={type:u>1?"strong":"emphasis",start:{...d.start},end:{...a.end}},t[i][1].end={...d.start},t[n][1].start={...a.end},f=[],t[i][1].end.offset-t[i][1].start.offset&&(f=zr(f,[["enter",t[i][1],e],["exit",t[i][1],e]])),f=zr(f,[["enter",o,e],["enter",d,e],["exit",d,e],["enter",l,e]]),f=zr(f,Mh(e.parser.constructs.insideSpan.null,t.slice(i+1,n),e)),f=zr(f,[["exit",l,e],["enter",a,e],["exit",a,e],["exit",o,e]]),t[n][1].end.offset-t[n][1].start.offset?(p=2,f=zr(f,[["enter",t[n][1],e],["exit",t[n][1],e]])):p=0,_r(t,i-1,n-i+3,f),n=i+f.length-p-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function N7(t,e){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,o=Ul(i);let l;return d;function d(u){return l=u,t.enter("attentionSequence"),a(u)}function a(u){if(u===l)return t.consume(u),a;const f=t.exit("attentionSequence"),p=Ul(u),h=!p||p===2&&o||n.includes(u),y=!o||o===2&&p||n.includes(i);return f._open=!!(l===42?h:h&&(o||!y)),f._close=!!(l===42?y:y&&(p||!h)),e(u)}}function Kb(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const D7={name:"autolink",tokenize:M7};function M7(t,e,n){let i=0;return o;function o(S){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),l}function l(S){return Un(S)?(t.consume(S),d):S===64?n(S):f(S)}function d(S){return S===43||S===45||S===46||zn(S)?(i=1,a(S)):f(S)}function a(S){return S===58?(t.consume(S),i=0,u):(S===43||S===45||S===46||zn(S))&&i++<32?(t.consume(S),a):(i=0,f(S))}function u(S){return S===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),e):S===null||S===32||S===60||Ff(S)?n(S):(t.consume(S),u)}function f(S){return S===64?(t.consume(S),p):x7(S)?(t.consume(S),f):n(S)}function p(S){return zn(S)?h(S):n(S)}function h(S){return S===46?(t.consume(S),i=0,p):S===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),e):y(S)}function y(S){if((S===45||zn(S))&&i++<63){const C=S===45?y:h;return t.consume(S),C}return n(S)}}const Xu={partial:!0,tokenize:j7};function j7(t,e,n){return i;function i(l){return xt(l)?kt(t,o,"linePrefix")(l):o(l)}function o(l){return l===null||Qe(l)?e(l):n(l)}}const e3={continuation:{tokenize:L7},exit:I7,name:"blockQuote",tokenize:O7};function O7(t,e,n){const i=this;return o;function o(d){if(d===62){const a=i.containerState;return a.open||(t.enter("blockQuote",{_container:!0}),a.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(d),t.exit("blockQuoteMarker"),l}return n(d)}function l(d){return xt(d)?(t.enter("blockQuotePrefixWhitespace"),t.consume(d),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(d))}}function L7(t,e,n){const i=this;return o;function o(d){return xt(d)?kt(t,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):l(d)}function l(d){return t.attempt(e3,e,n)(d)}}function I7(t){t.exit("blockQuote")}const t3={name:"characterEscape",tokenize:B7};function B7(t,e,n){return i;function i(l){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(l),t.exit("escapeMarker"),o}function o(l){return w7(l)?(t.enter("characterEscapeValue"),t.consume(l),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(l)}}const n3={name:"characterReference",tokenize:z7};function z7(t,e,n){const i=this;let o=0,l,d;return a;function a(h){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(h),t.exit("characterReferenceMarker"),u}function u(h){return h===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(h),t.exit("characterReferenceMarkerNumeric"),f):(t.enter("characterReferenceValue"),l=31,d=zn,p(h))}function f(h){return h===88||h===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(h),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),l=6,d=S7,p):(t.enter("characterReferenceValue"),l=7,d=$g,p(h))}function p(h){if(h===59&&o){const y=t.exit("characterReferenceValue");return d===zn&&!t1(i.sliceSerialize(y))?n(h):(t.enter("characterReferenceMarker"),t.consume(h),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return d(h)&&o++<l?(t.consume(h),p):n(h)}}const Yb={partial:!0,tokenize:F7},Xb={concrete:!0,name:"codeFenced",tokenize:P7};function P7(t,e,n){const i=this,o={partial:!0,tokenize:N};let l=0,d=0,a;return u;function u(A){return f(A)}function f(A){const M=i.events[i.events.length-1];return l=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,a=A,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),p(A)}function p(A){return A===a?(d++,t.consume(A),p):d<3?n(A):(t.exit("codeFencedFenceSequence"),xt(A)?kt(t,h,"whitespace")(A):h(A))}function h(A){return A===null||Qe(A)?(t.exit("codeFencedFence"),i.interrupt?e(A):t.check(Yb,w,E)(A)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),y(A))}function y(A){return A===null||Qe(A)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),h(A)):xt(A)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),kt(t,S,"whitespace")(A)):A===96&&A===a?n(A):(t.consume(A),y)}function S(A){return A===null||Qe(A)?h(A):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),C(A))}function C(A){return A===null||Qe(A)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),h(A)):A===96&&A===a?n(A):(t.consume(A),C)}function w(A){return t.attempt(o,E,_)(A)}function _(A){return t.enter("lineEnding"),t.consume(A),t.exit("lineEnding"),v}function v(A){return l>0&&xt(A)?kt(t,b,"linePrefix",l+1)(A):b(A)}function b(A){return A===null||Qe(A)?t.check(Yb,w,E)(A):(t.enter("codeFlowValue"),x(A))}function x(A){return A===null||Qe(A)?(t.exit("codeFlowValue"),b(A)):(t.consume(A),x)}function E(A){return t.exit("codeFenced"),e(A)}function N(A,M,T){let j=0;return O;function O(K){return A.enter("lineEnding"),A.consume(K),A.exit("lineEnding"),F}function F(K){return A.enter("codeFencedFence"),xt(K)?kt(A,U,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):U(K)}function U(K){return K===a?(A.enter("codeFencedFenceSequence"),$(K)):T(K)}function $(K){return K===a?(j++,A.consume(K),$):j>=d?(A.exit("codeFencedFenceSequence"),xt(K)?kt(A,G,"whitespace")(K):G(K)):T(K)}function G(K){return K===null||Qe(K)?(A.exit("codeFencedFence"),M(K)):T(K)}}}function F7(t,e,n){const i=this;return o;function o(d){return d===null?n(d):(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),l)}function l(d){return i.parser.lazy[i.now().line]?n(d):e(d)}}const ng={name:"codeIndented",tokenize:U7},H7={partial:!0,tokenize:$7};function U7(t,e,n){const i=this;return o;function o(f){return t.enter("codeIndented"),kt(t,l,"linePrefix",5)(f)}function l(f){const p=i.events[i.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?d(f):n(f)}function d(f){return f===null?u(f):Qe(f)?t.attempt(H7,d,u)(f):(t.enter("codeFlowValue"),a(f))}function a(f){return f===null||Qe(f)?(t.exit("codeFlowValue"),d(f)):(t.consume(f),a)}function u(f){return t.exit("codeIndented"),e(f)}}function $7(t,e,n){const i=this;return o;function o(d){return i.parser.lazy[i.now().line]?n(d):Qe(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),o):kt(t,l,"linePrefix",5)(d)}function l(d){const a=i.events[i.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(d):Qe(d)?o(d):n(d)}}const q7={name:"codeText",previous:G7,resolve:V7,tokenize:W7};function V7(t){let e=t.length-4,n=3,i,o;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(i=n;++i<e;)if(t[i][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(i=n-1,e++;++i<=e;)o===void 0?i!==e&&t[i][1].type!=="lineEnding"&&(o=i):(i===e||t[i][1].type==="lineEnding")&&(t[o][1].type="codeTextData",i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),e-=i-o-2,i=o+2),o=void 0);return t}function G7(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function W7(t,e,n){let i=0,o,l;return d;function d(h){return t.enter("codeText"),t.enter("codeTextSequence"),a(h)}function a(h){return h===96?(t.consume(h),i++,a):(t.exit("codeTextSequence"),u(h))}function u(h){return h===null?n(h):h===32?(t.enter("space"),t.consume(h),t.exit("space"),u):h===96?(l=t.enter("codeTextSequence"),o=0,p(h)):Qe(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),u):(t.enter("codeTextData"),f(h))}function f(h){return h===null||h===32||h===96||Qe(h)?(t.exit("codeTextData"),u(h)):(t.consume(h),f)}function p(h){return h===96?(t.consume(h),o++,p):o===i?(t.exit("codeTextSequence"),t.exit("codeText"),e(h)):(l.type="codeTextData",f(h))}}class K7{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const i=n==null?Number.POSITIVE_INFINITY:n;return i<this.left.length?this.left.slice(e,i):e>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(e,n,i){const o=n||0;this.setCursor(Math.trunc(e));const l=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&lu(this.left,i),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),lu(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),lu(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);lu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);lu(this.left,n.reverse())}}}function lu(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function r3(t){const e={};let n=-1,i,o,l,d,a,u,f;const p=new K7(t);for(;++n<p.length;){for(;n in e;)n=e[n];if(i=p.get(n),n&&i[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(u=i[1]._tokenizer.events,l=0,l<u.length&&u[l][1].type==="lineEndingBlank"&&(l+=2),l<u.length&&u[l][1].type==="content"))for(;++l<u.length&&u[l][1].type!=="content";)u[l][1].type==="chunkText"&&(u[l][1]._isInFirstContentOfListItem=!0,l++);if(i[0]==="enter")i[1].contentType&&(Object.assign(e,Y7(p,n)),n=e[n],f=!0);else if(i[1]._container){for(l=n,o=void 0;l--;)if(d=p.get(l),d[1].type==="lineEnding"||d[1].type==="lineEndingBlank")d[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),d[1].type="lineEnding",o=l);else if(!(d[1].type==="linePrefix"||d[1].type==="listItemIndent"))break;o&&(i[1].end={...p.get(o)[1].start},a=p.slice(o,n),a.unshift(i),p.splice(o,n-o+1,a))}}return _r(t,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function Y7(t,e){const n=t.get(e)[1],i=t.get(e)[2];let o=e-1;const l=[];let d=n._tokenizer;d||(d=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(d._contentTypeTextTrailing=!0));const a=d.events,u=[],f={};let p,h,y=-1,S=n,C=0,w=0;const _=[w];for(;S;){for(;t.get(++o)[1]!==S;);l.push(o),S._tokenizer||(p=i.sliceStream(S),S.next||p.push(null),h&&d.defineSkip(S.start),S._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=!0),d.write(p),S._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=void 0)),h=S,S=S.next}for(S=n;++y<a.length;)a[y][0]==="exit"&&a[y-1][0]==="enter"&&a[y][1].type===a[y-1][1].type&&a[y][1].start.line!==a[y][1].end.line&&(w=y+1,_.push(w),S._tokenizer=void 0,S.previous=void 0,S=S.next);for(d.events=[],S?(S._tokenizer=void 0,S.previous=void 0):_.pop(),y=_.length;y--;){const v=a.slice(_[y],_[y+1]),b=l.pop();u.push([b,b+v.length-1]),t.splice(b,2,v)}for(u.reverse(),y=-1;++y<u.length;)f[C+u[y][0]]=C+u[y][1],C+=u[y][1]-u[y][0]-1;return f}const X7={resolve:Q7,tokenize:J7},Z7={partial:!0,tokenize:e9};function Q7(t){return r3(t),t}function J7(t,e){let n;return i;function i(a){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),o(a)}function o(a){return a===null?l(a):Qe(a)?t.check(Z7,d,l)(a):(t.consume(a),o)}function l(a){return t.exit("chunkContent"),t.exit("content"),e(a)}function d(a){return t.consume(a),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function e9(t,e,n){const i=this;return o;function o(d){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),kt(t,l,"linePrefix")}function l(d){if(d===null||Qe(d))return n(d);const a=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(d):t.interrupt(i.parser.constructs.flow,n,e)(d)}}function i3(t,e,n,i,o,l,d,a,u){const f=u||Number.POSITIVE_INFINITY;let p=0;return h;function h(v){return v===60?(t.enter(i),t.enter(o),t.enter(l),t.consume(v),t.exit(l),y):v===null||v===32||v===41||Ff(v)?n(v):(t.enter(i),t.enter(d),t.enter(a),t.enter("chunkString",{contentType:"string"}),w(v))}function y(v){return v===62?(t.enter(l),t.consume(v),t.exit(l),t.exit(o),t.exit(i),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),S(v))}function S(v){return v===62?(t.exit("chunkString"),t.exit(a),y(v)):v===null||v===60||Qe(v)?n(v):(t.consume(v),v===92?C:S)}function C(v){return v===60||v===62||v===92?(t.consume(v),S):S(v)}function w(v){return!p&&(v===null||v===41||Ft(v))?(t.exit("chunkString"),t.exit(a),t.exit(d),t.exit(i),e(v)):p<f&&v===40?(t.consume(v),p++,w):v===41?(t.consume(v),p--,w):v===null||v===32||v===40||Ff(v)?n(v):(t.consume(v),v===92?_:w)}function _(v){return v===40||v===41||v===92?(t.consume(v),w):w(v)}}function s3(t,e,n,i,o,l){const d=this;let a=0,u;return f;function f(S){return t.enter(i),t.enter(o),t.consume(S),t.exit(o),t.enter(l),p}function p(S){return a>999||S===null||S===91||S===93&&!u||S===94&&!a&&"_hiddenFootnoteSupport"in d.parser.constructs?n(S):S===93?(t.exit(l),t.enter(o),t.consume(S),t.exit(o),t.exit(i),e):Qe(S)?(t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),p):(t.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||S===91||S===93||Qe(S)||a++>999?(t.exit("chunkString"),p(S)):(t.consume(S),u||(u=!xt(S)),S===92?y:h)}function y(S){return S===91||S===92||S===93?(t.consume(S),a++,h):h(S)}}function o3(t,e,n,i,o,l){let d;return a;function a(y){return y===34||y===39||y===40?(t.enter(i),t.enter(o),t.consume(y),t.exit(o),d=y===40?41:y,u):n(y)}function u(y){return y===d?(t.enter(o),t.consume(y),t.exit(o),t.exit(i),e):(t.enter(l),f(y))}function f(y){return y===d?(t.exit(l),u(d)):y===null?n(y):Qe(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),kt(t,f,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===d||y===null||Qe(y)?(t.exit("chunkString"),f(y)):(t.consume(y),y===92?h:p)}function h(y){return y===d||y===92?(t.consume(y),p):p(y)}}function vu(t,e){let n;return i;function i(o){return Qe(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),n=!0,i):xt(o)?kt(t,i,n?"linePrefix":"lineSuffix")(o):e(o)}}const t9={name:"definition",tokenize:r9},n9={partial:!0,tokenize:i9};function r9(t,e,n){const i=this;let o;return l;function l(S){return t.enter("definition"),d(S)}function d(S){return s3.call(i,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(S)}function a(S){return o=ii(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),S===58?(t.enter("definitionMarker"),t.consume(S),t.exit("definitionMarker"),u):n(S)}function u(S){return Ft(S)?vu(t,f)(S):f(S)}function f(S){return i3(t,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(S)}function p(S){return t.attempt(n9,h,h)(S)}function h(S){return xt(S)?kt(t,y,"whitespace")(S):y(S)}function y(S){return S===null||Qe(S)?(t.exit("definition"),i.parser.defined.push(o),e(S)):n(S)}}function i9(t,e,n){return i;function i(a){return Ft(a)?vu(t,o)(a):n(a)}function o(a){return o3(t,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return xt(a)?kt(t,d,"whitespace")(a):d(a)}function d(a){return a===null||Qe(a)?e(a):n(a)}}const s9={name:"hardBreakEscape",tokenize:o9};function o9(t,e,n){return i;function i(l){return t.enter("hardBreakEscape"),t.consume(l),o}function o(l){return Qe(l)?(t.exit("hardBreakEscape"),e(l)):n(l)}}const a9={name:"headingAtx",resolve:l9,tokenize:c9};function l9(t,e){let n=t.length-2,i=3,o,l;return t[i][1].type==="whitespace"&&(i+=2),n-2>i&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&t[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(o={type:"atxHeadingText",start:t[i][1].start,end:t[n][1].end},l={type:"chunkText",start:t[i][1].start,end:t[n][1].end,contentType:"text"},_r(t,i,n-i+1,[["enter",o,e],["enter",l,e],["exit",l,e],["exit",o,e]])),t}function c9(t,e,n){let i=0;return o;function o(p){return t.enter("atxHeading"),l(p)}function l(p){return t.enter("atxHeadingSequence"),d(p)}function d(p){return p===35&&i++<6?(t.consume(p),d):p===null||Ft(p)?(t.exit("atxHeadingSequence"),a(p)):n(p)}function a(p){return p===35?(t.enter("atxHeadingSequence"),u(p)):p===null||Qe(p)?(t.exit("atxHeading"),e(p)):xt(p)?kt(t,a,"whitespace")(p):(t.enter("atxHeadingText"),f(p))}function u(p){return p===35?(t.consume(p),u):(t.exit("atxHeadingSequence"),a(p))}function f(p){return p===null||p===35||Ft(p)?(t.exit("atxHeadingText"),a(p)):(t.consume(p),f)}}const u9=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Zb=["pre","script","style","textarea"],d9={concrete:!0,name:"htmlFlow",resolveTo:p9,tokenize:m9},f9={partial:!0,tokenize:v9},h9={partial:!0,tokenize:g9};function p9(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function m9(t,e,n){const i=this;let o,l,d,a,u;return f;function f(P){return p(P)}function p(P){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(P),h}function h(P){return P===33?(t.consume(P),y):P===47?(t.consume(P),l=!0,w):P===63?(t.consume(P),o=3,i.interrupt?e:L):Un(P)?(t.consume(P),d=String.fromCharCode(P),_):n(P)}function y(P){return P===45?(t.consume(P),o=2,S):P===91?(t.consume(P),o=5,a=0,C):Un(P)?(t.consume(P),o=4,i.interrupt?e:L):n(P)}function S(P){return P===45?(t.consume(P),i.interrupt?e:L):n(P)}function C(P){const ee="CDATA[";return P===ee.charCodeAt(a++)?(t.consume(P),a===ee.length?i.interrupt?e:U:C):n(P)}function w(P){return Un(P)?(t.consume(P),d=String.fromCharCode(P),_):n(P)}function _(P){if(P===null||P===47||P===62||Ft(P)){const ee=P===47,ne=d.toLowerCase();return!ee&&!l&&Zb.includes(ne)?(o=1,i.interrupt?e(P):U(P)):u9.includes(d.toLowerCase())?(o=6,ee?(t.consume(P),v):i.interrupt?e(P):U(P)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(P):l?b(P):x(P))}return P===45||zn(P)?(t.consume(P),d+=String.fromCharCode(P),_):n(P)}function v(P){return P===62?(t.consume(P),i.interrupt?e:U):n(P)}function b(P){return xt(P)?(t.consume(P),b):O(P)}function x(P){return P===47?(t.consume(P),O):P===58||P===95||Un(P)?(t.consume(P),E):xt(P)?(t.consume(P),x):O(P)}function E(P){return P===45||P===46||P===58||P===95||zn(P)?(t.consume(P),E):N(P)}function N(P){return P===61?(t.consume(P),A):xt(P)?(t.consume(P),N):x(P)}function A(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(t.consume(P),u=P,M):xt(P)?(t.consume(P),A):T(P)}function M(P){return P===u?(t.consume(P),u=null,j):P===null||Qe(P)?n(P):(t.consume(P),M)}function T(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||Ft(P)?N(P):(t.consume(P),T)}function j(P){return P===47||P===62||xt(P)?x(P):n(P)}function O(P){return P===62?(t.consume(P),F):n(P)}function F(P){return P===null||Qe(P)?U(P):xt(P)?(t.consume(P),F):n(P)}function U(P){return P===45&&o===2?(t.consume(P),V):P===60&&o===1?(t.consume(P),X):P===62&&o===4?(t.consume(P),B):P===63&&o===3?(t.consume(P),L):P===93&&o===5?(t.consume(P),I):Qe(P)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check(f9,H,$)(P)):P===null||Qe(P)?(t.exit("htmlFlowData"),$(P)):(t.consume(P),U)}function $(P){return t.check(h9,G,H)(P)}function G(P){return t.enter("lineEnding"),t.consume(P),t.exit("lineEnding"),K}function K(P){return P===null||Qe(P)?$(P):(t.enter("htmlFlowData"),U(P))}function V(P){return P===45?(t.consume(P),L):U(P)}function X(P){return P===47?(t.consume(P),d="",Z):U(P)}function Z(P){if(P===62){const ee=d.toLowerCase();return Zb.includes(ee)?(t.consume(P),B):U(P)}return Un(P)&&d.length<8?(t.consume(P),d+=String.fromCharCode(P),Z):U(P)}function I(P){return P===93?(t.consume(P),L):U(P)}function L(P){return P===62?(t.consume(P),B):P===45&&o===2?(t.consume(P),L):U(P)}function B(P){return P===null||Qe(P)?(t.exit("htmlFlowData"),H(P)):(t.consume(P),B)}function H(P){return t.exit("htmlFlow"),e(P)}}function g9(t,e,n){const i=this;return o;function o(d){return Qe(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),l):n(d)}function l(d){return i.parser.lazy[i.now().line]?n(d):e(d)}}function v9(t,e,n){return i;function i(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt(Xu,e,n)}}const _9={name:"htmlText",tokenize:y9};function y9(t,e,n){const i=this;let o,l,d;return a;function a(L){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(L),u}function u(L){return L===33?(t.consume(L),f):L===47?(t.consume(L),N):L===63?(t.consume(L),x):Un(L)?(t.consume(L),T):n(L)}function f(L){return L===45?(t.consume(L),p):L===91?(t.consume(L),l=0,C):Un(L)?(t.consume(L),b):n(L)}function p(L){return L===45?(t.consume(L),S):n(L)}function h(L){return L===null?n(L):L===45?(t.consume(L),y):Qe(L)?(d=h,X(L)):(t.consume(L),h)}function y(L){return L===45?(t.consume(L),S):h(L)}function S(L){return L===62?V(L):L===45?y(L):h(L)}function C(L){const B="CDATA[";return L===B.charCodeAt(l++)?(t.consume(L),l===B.length?w:C):n(L)}function w(L){return L===null?n(L):L===93?(t.consume(L),_):Qe(L)?(d=w,X(L)):(t.consume(L),w)}function _(L){return L===93?(t.consume(L),v):w(L)}function v(L){return L===62?V(L):L===93?(t.consume(L),v):w(L)}function b(L){return L===null||L===62?V(L):Qe(L)?(d=b,X(L)):(t.consume(L),b)}function x(L){return L===null?n(L):L===63?(t.consume(L),E):Qe(L)?(d=x,X(L)):(t.consume(L),x)}function E(L){return L===62?V(L):x(L)}function N(L){return Un(L)?(t.consume(L),A):n(L)}function A(L){return L===45||zn(L)?(t.consume(L),A):M(L)}function M(L){return Qe(L)?(d=M,X(L)):xt(L)?(t.consume(L),M):V(L)}function T(L){return L===45||zn(L)?(t.consume(L),T):L===47||L===62||Ft(L)?j(L):n(L)}function j(L){return L===47?(t.consume(L),V):L===58||L===95||Un(L)?(t.consume(L),O):Qe(L)?(d=j,X(L)):xt(L)?(t.consume(L),j):V(L)}function O(L){return L===45||L===46||L===58||L===95||zn(L)?(t.consume(L),O):F(L)}function F(L){return L===61?(t.consume(L),U):Qe(L)?(d=F,X(L)):xt(L)?(t.consume(L),F):j(L)}function U(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(t.consume(L),o=L,$):Qe(L)?(d=U,X(L)):xt(L)?(t.consume(L),U):(t.consume(L),G)}function $(L){return L===o?(t.consume(L),o=void 0,K):L===null?n(L):Qe(L)?(d=$,X(L)):(t.consume(L),$)}function G(L){return L===null||L===34||L===39||L===60||L===61||L===96?n(L):L===47||L===62||Ft(L)?j(L):(t.consume(L),G)}function K(L){return L===47||L===62||Ft(L)?j(L):n(L)}function V(L){return L===62?(t.consume(L),t.exit("htmlTextData"),t.exit("htmlText"),e):n(L)}function X(L){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(L),t.exit("lineEnding"),Z}function Z(L){return xt(L)?kt(t,I,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):I(L)}function I(L){return t.enter("htmlTextData"),d(L)}}const n1={name:"labelEnd",resolveAll:w9,resolveTo:C9,tokenize:k9},b9={tokenize:E9},x9={tokenize:A9},S9={tokenize:T9};function w9(t){let e=-1;const n=[];for(;++e<t.length;){const i=t[e][1];if(n.push(t[e]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const o=i.type==="labelImage"?4:2;i.type="data",e+=o}}return t.length!==n.length&&_r(t,0,t.length,n),t}function C9(t,e){let n=t.length,i=0,o,l,d,a;for(;n--;)if(o=t[n][1],l){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;t[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(d){if(t[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(l=n,o.type!=="labelLink")){i=2;break}}else o.type==="labelEnd"&&(d=n);const u={type:t[l][1].type==="labelLink"?"link":"image",start:{...t[l][1].start},end:{...t[t.length-1][1].end}},f={type:"label",start:{...t[l][1].start},end:{...t[d][1].end}},p={type:"labelText",start:{...t[l+i+2][1].end},end:{...t[d-2][1].start}};return a=[["enter",u,e],["enter",f,e]],a=zr(a,t.slice(l+1,l+i+3)),a=zr(a,[["enter",p,e]]),a=zr(a,Mh(e.parser.constructs.insideSpan.null,t.slice(l+i+4,d-3),e)),a=zr(a,[["exit",p,e],t[d-2],t[d-1],["exit",f,e]]),a=zr(a,t.slice(d+1)),a=zr(a,[["exit",u,e]]),_r(t,l,t.length,a),t}function k9(t,e,n){const i=this;let o=i.events.length,l,d;for(;o--;)if((i.events[o][1].type==="labelImage"||i.events[o][1].type==="labelLink")&&!i.events[o][1]._balanced){l=i.events[o][1];break}return a;function a(y){return l?l._inactive?h(y):(d=i.parser.defined.includes(ii(i.sliceSerialize({start:l.end,end:i.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(y),t.exit("labelMarker"),t.exit("labelEnd"),u):n(y)}function u(y){return y===40?t.attempt(b9,p,d?p:h)(y):y===91?t.attempt(x9,p,d?f:h)(y):d?p(y):h(y)}function f(y){return t.attempt(S9,p,h)(y)}function p(y){return e(y)}function h(y){return l._balanced=!0,n(y)}}function E9(t,e,n){return i;function i(h){return t.enter("resource"),t.enter("resourceMarker"),t.consume(h),t.exit("resourceMarker"),o}function o(h){return Ft(h)?vu(t,l)(h):l(h)}function l(h){return h===41?p(h):i3(t,d,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function d(h){return Ft(h)?vu(t,u)(h):p(h)}function a(h){return n(h)}function u(h){return h===34||h===39||h===40?o3(t,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):p(h)}function f(h){return Ft(h)?vu(t,p)(h):p(h)}function p(h){return h===41?(t.enter("resourceMarker"),t.consume(h),t.exit("resourceMarker"),t.exit("resource"),e):n(h)}}function A9(t,e,n){const i=this;return o;function o(a){return s3.call(i,t,l,d,"reference","referenceMarker","referenceString")(a)}function l(a){return i.parser.defined.includes(ii(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?e(a):n(a)}function d(a){return n(a)}}function T9(t,e,n){return i;function i(l){return t.enter("reference"),t.enter("referenceMarker"),t.consume(l),t.exit("referenceMarker"),o}function o(l){return l===93?(t.enter("referenceMarker"),t.consume(l),t.exit("referenceMarker"),t.exit("reference"),e):n(l)}}const R9={name:"labelStartImage",resolveAll:n1.resolveAll,tokenize:N9};function N9(t,e,n){const i=this;return o;function o(a){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(a),t.exit("labelImageMarker"),l}function l(a){return a===91?(t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelImage"),d):n(a)}function d(a){return a===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(a):e(a)}}const D9={name:"labelStartLink",resolveAll:n1.resolveAll,tokenize:M9};function M9(t,e,n){const i=this;return o;function o(d){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelLink"),l}function l(d){return d===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(d):e(d)}}const rg={name:"lineEnding",tokenize:j9};function j9(t,e){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),kt(t,e,"linePrefix")}}const Sf={name:"thematicBreak",tokenize:O9};function O9(t,e,n){let i=0,o;return l;function l(f){return t.enter("thematicBreak"),d(f)}function d(f){return o=f,a(f)}function a(f){return f===o?(t.enter("thematicBreakSequence"),u(f)):i>=3&&(f===null||Qe(f))?(t.exit("thematicBreak"),e(f)):n(f)}function u(f){return f===o?(t.consume(f),i++,u):(t.exit("thematicBreakSequence"),xt(f)?kt(t,a,"whitespace")(f):a(f))}}const er={continuation:{tokenize:z9},exit:F9,name:"list",tokenize:B9},L9={partial:!0,tokenize:H9},I9={partial:!0,tokenize:P9};function B9(t,e,n){const i=this,o=i.events[i.events.length-1];let l=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,d=0;return a;function a(S){const C=i.containerState.type||(S===42||S===43||S===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!i.containerState.marker||S===i.containerState.marker:$g(S)){if(i.containerState.type||(i.containerState.type=C,t.enter(C,{_container:!0})),C==="listUnordered")return t.enter("listItemPrefix"),S===42||S===45?t.check(Sf,n,f)(S):f(S);if(!i.interrupt||S===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),u(S)}return n(S)}function u(S){return $g(S)&&++d<10?(t.consume(S),u):(!i.interrupt||d<2)&&(i.containerState.marker?S===i.containerState.marker:S===41||S===46)?(t.exit("listItemValue"),f(S)):n(S)}function f(S){return t.enter("listItemMarker"),t.consume(S),t.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||S,t.check(Xu,i.interrupt?n:p,t.attempt(L9,y,h))}function p(S){return i.containerState.initialBlankLine=!0,l++,y(S)}function h(S){return xt(S)?(t.enter("listItemPrefixWhitespace"),t.consume(S),t.exit("listItemPrefixWhitespace"),y):n(S)}function y(S){return i.containerState.size=l+i.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(S)}}function z9(t,e,n){const i=this;return i.containerState._closeFlow=void 0,t.check(Xu,o,l);function o(a){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,kt(t,e,"listItemIndent",i.containerState.size+1)(a)}function l(a){return i.containerState.furtherBlankLines||!xt(a)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,d(a)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,t.attempt(I9,e,d)(a))}function d(a){return i.containerState._closeFlow=!0,i.interrupt=void 0,kt(t,t.attempt(er,e,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function P9(t,e,n){const i=this;return kt(t,o,"listItemIndent",i.containerState.size+1);function o(l){const d=i.events[i.events.length-1];return d&&d[1].type==="listItemIndent"&&d[2].sliceSerialize(d[1],!0).length===i.containerState.size?e(l):n(l)}}function F9(t){t.exit(this.containerState.type)}function H9(t,e,n){const i=this;return kt(t,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(l){const d=i.events[i.events.length-1];return!xt(l)&&d&&d[1].type==="listItemPrefixWhitespace"?e(l):n(l)}}const Qb={name:"setextUnderline",resolveTo:U9,tokenize:$9};function U9(t,e){let n=t.length,i,o,l;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){i=n;break}t[n][1].type==="paragraph"&&(o=n)}else t[n][1].type==="content"&&t.splice(n,1),!l&&t[n][1].type==="definition"&&(l=n);const d={type:"setextHeading",start:{...t[i][1].start},end:{...t[t.length-1][1].end}};return t[o][1].type="setextHeadingText",l?(t.splice(o,0,["enter",d,e]),t.splice(l+1,0,["exit",t[i][1],e]),t[i][1].end={...t[l][1].end}):t[i][1]=d,t.push(["exit",d,e]),t}function $9(t,e,n){const i=this;let o;return l;function l(f){let p=i.events.length,h;for(;p--;)if(i.events[p][1].type!=="lineEnding"&&i.events[p][1].type!=="linePrefix"&&i.events[p][1].type!=="content"){h=i.events[p][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||h)?(t.enter("setextHeadingLine"),o=f,d(f)):n(f)}function d(f){return t.enter("setextHeadingLineSequence"),a(f)}function a(f){return f===o?(t.consume(f),a):(t.exit("setextHeadingLineSequence"),xt(f)?kt(t,u,"lineSuffix")(f):u(f))}function u(f){return f===null||Qe(f)?(t.exit("setextHeadingLine"),e(f)):n(f)}}const q9={tokenize:V9};function V9(t){const e=this,n=t.attempt(Xu,i,t.attempt(this.parser.constructs.flowInitial,o,kt(t,t.attempt(this.parser.constructs.flow,o,t.attempt(X7,o)),"linePrefix")));return n;function i(l){if(l===null){t.consume(l);return}return t.enter("lineEndingBlank"),t.consume(l),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function o(l){if(l===null){t.consume(l);return}return t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const G9={resolveAll:l3()},W9=a3("string"),K9=a3("text");function a3(t){return{resolveAll:l3(t==="text"?Y9:void 0),tokenize:e};function e(n){const i=this,o=this.parser.constructs[t],l=n.attempt(o,d,a);return d;function d(p){return f(p)?l(p):a(p)}function a(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),u}function u(p){return f(p)?(n.exit("data"),l(p)):(n.consume(p),u)}function f(p){if(p===null)return!0;const h=o[p];let y=-1;if(h)for(;++y<h.length;){const S=h[y];if(!S.previous||S.previous.call(i,i.previous))return!0}return!1}}}function l3(t){return e;function e(n,i){let o=-1,l;for(;++o<=n.length;)l===void 0?n[o]&&n[o][1].type==="data"&&(l=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==l+2&&(n[l][1].end=n[o-1][1].end,n.splice(l+2,o-l-2),o=l+2),l=void 0);return t?t(n,i):n}}function Y9(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const i=t[n-1][1],o=e.sliceStream(i);let l=o.length,d=-1,a=0,u;for(;l--;){const f=o[l];if(typeof f=="string"){for(d=f.length;f.charCodeAt(d-1)===32;)a++,d--;if(d)break;d=-1}else if(f===-2)u=!0,a++;else if(f!==-1){l++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(a=0),a){const f={type:n===t.length||u||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?d:i.start._bufferIndex+d,_index:i.start._index+l,line:i.end.line,column:i.end.column-a,offset:i.end.offset-a},end:{...i.end}};i.end={...f.start},i.start.offset===i.end.offset?Object.assign(i,f):(t.splice(n,0,["enter",f,e],["exit",f,e]),n+=2)}n++}return t}const X9={42:er,43:er,45:er,48:er,49:er,50:er,51:er,52:er,53:er,54:er,55:er,56:er,57:er,62:e3},Z9={91:t9},Q9={[-2]:ng,[-1]:ng,32:ng},J9={35:a9,42:Sf,45:[Qb,Sf],60:d9,61:Qb,95:Sf,96:Xb,126:Xb},eI={38:n3,92:t3},tI={[-5]:rg,[-4]:rg,[-3]:rg,33:R9,38:n3,42:qg,60:[D7,_9],91:D9,92:[s9,t3],93:n1,95:qg,96:q7},nI={null:[qg,G9]},rI={null:[42,95]},iI={null:[]},sI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:rI,contentInitial:Z9,disable:iI,document:X9,flow:J9,flowInitial:Q9,insideSpan:nI,string:eI,text:tI},Symbol.toStringTag,{value:"Module"}));function oI(t,e,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},l=[];let d=[],a=[];const u={attempt:M(N),check:M(A),consume:b,enter:x,exit:E,interrupt:M(A,{interrupt:!0})},f={code:null,containerState:{},defineSkip:w,events:[],now:C,parser:t,previous:null,sliceSerialize:y,sliceStream:S,write:h};let p=e.tokenize.call(f,u);return e.resolveAll&&l.push(e),f;function h(F){return d=zr(d,F),_(),d[d.length-1]!==null?[]:(T(e,0),f.events=Mh(l,f.events,f),f.events)}function y(F,U){return lI(S(F),U)}function S(F){return aI(d,F)}function C(){const{_bufferIndex:F,_index:U,line:$,column:G,offset:K}=i;return{_bufferIndex:F,_index:U,line:$,column:G,offset:K}}function w(F){o[F.line]=F.column,O()}function _(){let F;for(;i._index<d.length;){const U=d[i._index];if(typeof U=="string")for(F=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===F&&i._bufferIndex<U.length;)v(U.charCodeAt(i._bufferIndex));else v(U)}}function v(F){p=p(F)}function b(F){Qe(F)?(i.line++,i.column=1,i.offset+=F===-3?2:1,O()):F!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===d[i._index].length&&(i._bufferIndex=-1,i._index++)),f.previous=F}function x(F,U){const $=U||{};return $.type=F,$.start=C(),f.events.push(["enter",$,f]),a.push($),$}function E(F){const U=a.pop();return U.end=C(),f.events.push(["exit",U,f]),U}function N(F,U){T(F,U.from)}function A(F,U){U.restore()}function M(F,U){return $;function $(G,K,V){let X,Z,I,L;return Array.isArray(G)?H(G):"tokenize"in G?H([G]):B(G);function B(Q){return W;function W(q){const J=q!==null&&Q[q],ie=q!==null&&Q.null,ce=[...Array.isArray(J)?J:J?[J]:[],...Array.isArray(ie)?ie:ie?[ie]:[]];return H(ce)(q)}}function H(Q){return X=Q,Z=0,Q.length===0?V:P(Q[Z])}function P(Q){return W;function W(q){return L=j(),I=Q,Q.partial||(f.currentConstruct=Q),Q.name&&f.parser.constructs.disable.null.includes(Q.name)?ne():Q.tokenize.call(U?Object.assign(Object.create(f),U):f,u,ee,ne)(q)}}function ee(Q){return F(I,L),K}function ne(Q){return L.restore(),++Z<X.length?P(X[Z]):V}}}function T(F,U){F.resolveAll&&!l.includes(F)&&l.push(F),F.resolve&&_r(f.events,U,f.events.length-U,F.resolve(f.events.slice(U),f)),F.resolveTo&&(f.events=F.resolveTo(f.events,f))}function j(){const F=C(),U=f.previous,$=f.currentConstruct,G=f.events.length,K=Array.from(a);return{from:G,restore:V};function V(){i=F,f.previous=U,f.currentConstruct=$,f.events.length=G,a=K,O()}}function O(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function aI(t,e){const n=e.start._index,i=e.start._bufferIndex,o=e.end._index,l=e.end._bufferIndex;let d;if(n===o)d=[t[n].slice(i,l)];else{if(d=t.slice(n,o),i>-1){const a=d[0];typeof a=="string"?d[0]=a.slice(i):d.shift()}l>0&&d.push(t[o].slice(0,l))}return d}function lI(t,e){let n=-1;const i=[];let o;for(;++n<t.length;){const l=t[n];let d;if(typeof l=="string")d=l;else switch(l){case-5:{d="\r";break}case-4:{d=`
516
+ `;break}case-3:{d=`\r
517
+ `;break}case-2:{d=e?" ":" ";break}case-1:{if(!e&&o)continue;d=" ";break}default:d=String.fromCharCode(l)}o=l===-2,i.push(d)}return i.join("")}function cI(t){const i={constructs:QC([sI,...(t||{}).extensions||[]]),content:o(C7),defined:[],document:o(E7),flow:o(q9),lazy:{},string:o(W9),text:o(K9)};return i;function o(l){return d;function d(a){return oI(i,l,a)}}}function uI(t){for(;!r3(t););return t}const Jb=/[\0\t\n\r]/g;function dI(){let t=1,e="",n=!0,i;return o;function o(l,d,a){const u=[];let f,p,h,y,S;for(l=e+(typeof l=="string"?l.toString():new TextDecoder(d||void 0).decode(l)),h=0,e="",n&&(l.charCodeAt(0)===65279&&h++,n=void 0);h<l.length;){if(Jb.lastIndex=h,f=Jb.exec(l),y=f&&f.index!==void 0?f.index:l.length,S=l.charCodeAt(y),!f){e=l.slice(h);break}if(S===10&&h===y&&i)u.push(-3),i=void 0;else switch(i&&(u.push(-5),i=void 0),h<y&&(u.push(l.slice(h,y)),t+=y-h),S){case 0:{u.push(65533),t++;break}case 9:{for(p=Math.ceil(t/4)*4,u.push(-2);t++<p;)u.push(-1);break}case 10:{u.push(-4),t=1;break}default:i=!0,t=1}h=y+1}return a&&(i&&u.push(-5),e&&u.push(e),u.push(null)),u}}const fI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function hI(t){return t.replace(fI,pI)}function pI(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),l=o===120||o===88;return JC(n.slice(l?2:1),l?16:10)}return t1(n)||t}const c3={}.hasOwnProperty;function mI(t,e,n){return e&&typeof e=="object"&&(n=e,e=void 0),gI(n)(uI(cI(n).document().write(dI()(t,e,!0))))}function gI(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(rt),autolinkProtocol:j,autolinkEmail:j,atxHeading:l(Te),blockQuote:l(ie),characterEscape:j,characterReference:j,codeFenced:l(ce),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:l(ce,d),codeText:l(ae,d),codeTextData:j,data:j,codeFlowValue:j,definition:l(_e),definitionDestinationString:d,definitionLabelString:d,definitionTitleString:d,emphasis:l(Ee),hardBreakEscape:l(Be),hardBreakTrailing:l(Be),htmlFlow:l(se,d),htmlFlowData:j,htmlText:l(se,d),htmlTextData:j,image:l(Ye),label:d,link:l(rt),listItem:l(Ge),listItemValue:y,listOrdered:l(nt,h),listUnordered:l(nt),paragraph:l(gt),reference:P,referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:l(Te),strong:l(it),thematicBreak:l(at)},exit:{atxHeading:u(),atxHeadingSequence:N,autolink:u(),autolinkEmail:J,autolinkProtocol:q,blockQuote:u(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:ne,characterReferenceMarkerNumeric:ne,characterReferenceValue:Q,characterReference:W,codeFenced:u(_),codeFencedFence:w,codeFencedFenceInfo:S,codeFencedFenceMeta:C,codeFlowValue:O,codeIndented:u(v),codeText:u(K),codeTextData:O,data:O,definition:u(),definitionDestinationString:E,definitionLabelString:b,definitionTitleString:x,emphasis:u(),hardBreakEscape:u(U),hardBreakTrailing:u(U),htmlFlow:u($),htmlFlowData:O,htmlText:u(G),htmlTextData:O,image:u(X),label:I,labelText:Z,lineEnding:F,link:u(V),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ee,resourceDestinationString:L,resourceTitleString:B,resource:H,setextHeading:u(T),setextHeadingLineSequence:M,setextHeadingText:A,strong:u(),thematicBreak:u()}};u3(e,(t||{}).mdastExtensions||[]);const n={};return i;function i(fe){let ge={type:"root",children:[]};const Ae={stack:[ge],tokenStack:[],config:e,enter:a,exit:f,buffer:d,resume:p,data:n},Me=[];let Le=-1;for(;++Le<fe.length;)if(fe[Le][1].type==="listOrdered"||fe[Le][1].type==="listUnordered")if(fe[Le][0]==="enter")Me.push(Le);else{const st=Me.pop();Le=o(fe,st,Le)}for(Le=-1;++Le<fe.length;){const st=e[fe[Le][0]];c3.call(st,fe[Le][1].type)&&st[fe[Le][1].type].call(Object.assign({sliceSerialize:fe[Le][2].sliceSerialize},Ae),fe[Le][1])}if(Ae.tokenStack.length>0){const st=Ae.tokenStack[Ae.tokenStack.length-1];(st[1]||ex).call(Ae,void 0,st[0])}for(ge.position={start:mo(fe.length>0?fe[0][1].start:{line:1,column:1,offset:0}),end:mo(fe.length>0?fe[fe.length-2][1].end:{line:1,column:1,offset:0})},Le=-1;++Le<e.transforms.length;)ge=e.transforms[Le](ge)||ge;return ge}function o(fe,ge,Ae){let Me=ge-1,Le=-1,st=!1,Se,Ze,Ie,ot;for(;++Me<=Ae;){const Ce=fe[Me];switch(Ce[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ce[0]==="enter"?Le++:Le--,ot=void 0;break}case"lineEndingBlank":{Ce[0]==="enter"&&(Se&&!ot&&!Le&&!Ie&&(Ie=Me),ot=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ot=void 0}if(!Le&&Ce[0]==="enter"&&Ce[1].type==="listItemPrefix"||Le===-1&&Ce[0]==="exit"&&(Ce[1].type==="listUnordered"||Ce[1].type==="listOrdered")){if(Se){let Ve=Me;for(Ze=void 0;Ve--;){const lt=fe[Ve];if(lt[1].type==="lineEnding"||lt[1].type==="lineEndingBlank"){if(lt[0]==="exit")continue;Ze&&(fe[Ze][1].type="lineEndingBlank",st=!0),lt[1].type="lineEnding",Ze=Ve}else if(!(lt[1].type==="linePrefix"||lt[1].type==="blockQuotePrefix"||lt[1].type==="blockQuotePrefixWhitespace"||lt[1].type==="blockQuoteMarker"||lt[1].type==="listItemIndent"))break}Ie&&(!Ze||Ie<Ze)&&(Se._spread=!0),Se.end=Object.assign({},Ze?fe[Ze][1].start:Ce[1].end),fe.splice(Ze||Me,0,["exit",Se,Ce[2]]),Me++,Ae++}if(Ce[1].type==="listItemPrefix"){const Ve={type:"listItem",_spread:!1,start:Object.assign({},Ce[1].start),end:void 0};Se=Ve,fe.splice(Me,0,["enter",Ve,Ce[2]]),Me++,Ae++,Ie=void 0,ot=!0}}}return fe[ge][1]._spread=st,Ae}function l(fe,ge){return Ae;function Ae(Me){a.call(this,fe(Me),Me),ge&&ge.call(this,Me)}}function d(){this.stack.push({type:"fragment",children:[]})}function a(fe,ge,Ae){this.stack[this.stack.length-1].children.push(fe),this.stack.push(fe),this.tokenStack.push([ge,Ae||void 0]),fe.position={start:mo(ge.start),end:void 0}}function u(fe){return ge;function ge(Ae){fe&&fe.call(this,Ae),f.call(this,Ae)}}function f(fe,ge){const Ae=this.stack.pop(),Me=this.tokenStack.pop();if(Me)Me[0].type!==fe.type&&(ge?ge.call(this,fe,Me[0]):(Me[1]||ex).call(this,fe,Me[0]));else throw new Error("Cannot close `"+fe.type+"` ("+gu({start:fe.start,end:fe.end})+"): it’s not open");Ae.position.end=mo(fe.end)}function p(){return e1(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function y(fe){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(fe),10),this.data.expectingFirstListItemValue=void 0}}function S(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=fe}function C(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=fe}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.value=fe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.value=fe.replace(/(\r?\n|\r)$/g,"")}function b(fe){const ge=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=ge,Ae.identifier=ii(this.sliceSerialize(fe)).toLowerCase()}function x(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.title=fe}function E(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.url=fe}function N(fe){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Ae=this.sliceSerialize(fe).length;ge.depth=Ae}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function M(fe){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(fe).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function j(fe){const Ae=this.stack[this.stack.length-1].children;let Me=Ae[Ae.length-1];(!Me||Me.type!=="text")&&(Me=Je(),Me.position={start:mo(fe.start),end:void 0},Ae.push(Me)),this.stack.push(Me)}function O(fe){const ge=this.stack.pop();ge.value+=this.sliceSerialize(fe),ge.position.end=mo(fe.end)}function F(fe){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ae=ge.children[ge.children.length-1];Ae.position.end=mo(fe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(ge.type)&&(j.call(this,fe),O.call(this,fe))}function U(){this.data.atHardBreak=!0}function $(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.value=fe}function G(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.value=fe}function K(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.value=fe}function V(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=ge,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function X(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=ge,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function Z(fe){const ge=this.sliceSerialize(fe),Ae=this.stack[this.stack.length-2];Ae.label=hI(ge),Ae.identifier=ii(ge).toLowerCase()}function I(){const fe=this.stack[this.stack.length-1],ge=this.resume(),Ae=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ae.type==="link"){const Me=fe.children;Ae.children=Me}else Ae.alt=ge}function L(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.url=fe}function B(){const fe=this.resume(),ge=this.stack[this.stack.length-1];ge.title=fe}function H(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function ee(fe){const ge=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=ge,Ae.identifier=ii(this.sliceSerialize(fe)).toLowerCase(),this.data.referenceType="full"}function ne(fe){this.data.characterReferenceType=fe.type}function Q(fe){const ge=this.sliceSerialize(fe),Ae=this.data.characterReferenceType;let Me;Ae?(Me=JC(ge,Ae==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Me=t1(ge);const Le=this.stack[this.stack.length-1];Le.value+=Me}function W(fe){const ge=this.stack.pop();ge.position.end=mo(fe.end)}function q(fe){O.call(this,fe);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(fe)}function J(fe){O.call(this,fe);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(fe)}function ie(){return{type:"blockquote",children:[]}}function ce(){return{type:"code",lang:null,meta:null,value:""}}function ae(){return{type:"inlineCode",value:""}}function _e(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ee(){return{type:"emphasis",children:[]}}function Te(){return{type:"heading",depth:0,children:[]}}function Be(){return{type:"break"}}function se(){return{type:"html",value:""}}function Ye(){return{type:"image",title:null,url:"",alt:null}}function rt(){return{type:"link",title:null,url:"",children:[]}}function nt(fe){return{type:"list",ordered:fe.type==="listOrdered",start:null,spread:fe._spread,children:[]}}function Ge(fe){return{type:"listItem",spread:fe._spread,checked:null,children:[]}}function gt(){return{type:"paragraph",children:[]}}function it(){return{type:"strong",children:[]}}function Je(){return{type:"text",value:""}}function at(){return{type:"thematicBreak"}}}function mo(t){return{line:t.line,column:t.column,offset:t.offset}}function u3(t,e){let n=-1;for(;++n<e.length;){const i=e[n];Array.isArray(i)?u3(t,i):vI(t,i)}}function vI(t,e){let n;for(n in e)if(c3.call(e,n))switch(n){case"canContainEols":{const i=e[n];i&&t[n].push(...i);break}case"transforms":{const i=e[n];i&&t[n].push(...i);break}case"enter":case"exit":{const i=e[n];i&&Object.assign(t[n],i);break}}}function ex(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+gu({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+gu({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+gu({start:e.start,end:e.end})+") is still open")}function _I(t){const e=this;e.parser=n;function n(i){return mI(i,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function yI(t,e){const n={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,n),t.applyData(e,n)}function bI(t,e){const n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
518
+ `}]}function xI(t,e){const n=e.value?e.value+`
519
+ `:"",i={},o=e.lang?e.lang.split(/\s+/):[];o.length>0&&(i.className=["language-"+o[0]]);let l={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return e.meta&&(l.data={meta:e.meta}),t.patch(e,l),l=t.applyData(e,l),l={type:"element",tagName:"pre",properties:{},children:[l]},t.patch(e,l),l}function SI(t,e){const n={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function wI(t,e){const n={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function CI(t,e){const n=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=String(e.identifier).toUpperCase(),o=ic(i.toLowerCase()),l=t.footnoteOrder.indexOf(i);let d,a=t.footnoteCounts.get(i);a===void 0?(a=0,t.footnoteOrder.push(i),d=t.footnoteOrder.length):d=l+1,a+=1,t.footnoteCounts.set(i,a);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(d)}]};t.patch(e,u);const f={type:"element",tagName:"sup",properties:{},children:[u]};return t.patch(e,f),t.applyData(e,f)}function kI(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function EI(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function d3(t,e){const n=e.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+i}];const o=t.all(e),l=o[0];l&&l.type==="text"?l.value="["+l.value:o.unshift({type:"text",value:"["});const d=o[o.length-1];return d&&d.type==="text"?d.value+=i:o.push({type:"text",value:i}),o}function AI(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return d3(t,e);const o={src:ic(i.url||""),alt:e.alt};i.title!==null&&i.title!==void 0&&(o.title=i.title);const l={type:"element",tagName:"img",properties:o,children:[]};return t.patch(e,l),t.applyData(e,l)}function TI(t,e){const n={src:ic(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const i={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,i),t.applyData(e,i)}function RI(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,i),t.applyData(e,i)}function NI(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return d3(t,e);const o={href:ic(i.url||"")};i.title!==null&&i.title!==void 0&&(o.title=i.title);const l={type:"element",tagName:"a",properties:o,children:t.all(e)};return t.patch(e,l),t.applyData(e,l)}function DI(t,e){const n={href:ic(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const i={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function MI(t,e,n){const i=t.all(e),o=n?jI(n):f3(e),l={},d=[];if(typeof e.checked=="boolean"){const p=i[0];let h;p&&p.type==="element"&&p.tagName==="p"?h=p:(h={type:"element",tagName:"p",properties:{},children:[]},i.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let a=-1;for(;++a<i.length;){const p=i[a];(o||a!==0||p.type!=="element"||p.tagName!=="p")&&d.push({type:"text",value:`
520
+ `}),p.type==="element"&&p.tagName==="p"&&!o?d.push(...p.children):d.push(p)}const u=i[i.length-1];u&&(o||u.type!=="element"||u.tagName!=="p")&&d.push({type:"text",value:`
521
+ `});const f={type:"element",tagName:"li",properties:l,children:d};return t.patch(e,f),t.applyData(e,f)}function jI(t){let e=!1;if(t.type==="list"){e=t.spread||!1;const n=t.children;let i=-1;for(;!e&&++i<n.length;)e=f3(n[i])}return e}function f3(t){const e=t.spread;return e==null?t.children.length>1:e}function OI(t,e){const n={},i=t.all(e);let o=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++o<i.length;){const d=i[o];if(d.type==="element"&&d.tagName==="li"&&d.properties&&Array.isArray(d.properties.className)&&d.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:e.ordered?"ol":"ul",properties:n,children:t.wrap(i,!0)};return t.patch(e,l),t.applyData(e,l)}function LI(t,e){const n={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function II(t,e){const n={type:"root",children:t.wrap(t.all(e))};return t.patch(e,n),t.applyData(e,n)}function BI(t,e){const n={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function zI(t,e){const n=t.all(e),i=n.shift(),o=[];if(i){const d={type:"element",tagName:"thead",properties:{},children:t.wrap([i],!0)};t.patch(e.children[0],d),o.push(d)}if(n.length>0){const d={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},a=Xv(e.children[1]),u=VC(e.children[e.children.length-1]);a&&u&&(d.position={start:a,end:u}),o.push(d)}const l={type:"element",tagName:"table",properties:{},children:t.wrap(o,!0)};return t.patch(e,l),t.applyData(e,l)}function PI(t,e,n){const i=n?n.children:void 0,l=(i?i.indexOf(e):1)===0?"th":"td",d=n&&n.type==="table"?n.align:void 0,a=d?d.length:e.children.length;let u=-1;const f=[];for(;++u<a;){const h=e.children[u],y={},S=d?d[u]:void 0;S&&(y.align=S);let C={type:"element",tagName:l,properties:y,children:[]};h&&(C.children=t.all(h),t.patch(h,C),C=t.applyData(h,C)),f.push(C)}const p={type:"element",tagName:"tr",properties:{},children:t.wrap(f,!0)};return t.patch(e,p),t.applyData(e,p)}function FI(t,e){const n={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}const tx=9,nx=32;function HI(t){const e=String(t),n=/\r?\n|\r/g;let i=n.exec(e),o=0;const l=[];for(;i;)l.push(rx(e.slice(o,i.index),o>0,!0),i[0]),o=i.index+i[0].length,i=n.exec(e);return l.push(rx(e.slice(o),o>0,!1)),l.join("")}function rx(t,e,n){let i=0,o=t.length;if(e){let l=t.codePointAt(i);for(;l===tx||l===nx;)i++,l=t.codePointAt(i)}if(n){let l=t.codePointAt(o-1);for(;l===tx||l===nx;)o--,l=t.codePointAt(o-1)}return o>i?t.slice(i,o):""}function UI(t,e){const n={type:"text",value:HI(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function $I(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const qI={blockquote:yI,break:bI,code:xI,delete:SI,emphasis:wI,footnoteReference:CI,heading:kI,html:EI,imageReference:AI,image:TI,inlineCode:RI,linkReference:NI,link:DI,listItem:MI,list:OI,paragraph:LI,root:II,strong:BI,table:zI,tableCell:FI,tableRow:PI,text:UI,thematicBreak:$I,toml:ff,yaml:ff,definition:ff,footnoteDefinition:ff};function ff(){}const h3=-1,jh=0,_u=1,Hf=2,r1=3,i1=4,s1=5,o1=6,p3=7,m3=8,ix=typeof self=="object"?self:globalThis,VI=(t,e)=>{const n=(o,l)=>(t.set(l,o),o),i=o=>{if(t.has(o))return t.get(o);const[l,d]=e[o];switch(l){case jh:case h3:return n(d,o);case _u:{const a=n([],o);for(const u of d)a.push(i(u));return a}case Hf:{const a=n({},o);for(const[u,f]of d)a[i(u)]=i(f);return a}case r1:return n(new Date(d),o);case i1:{const{source:a,flags:u}=d;return n(new RegExp(a,u),o)}case s1:{const a=n(new Map,o);for(const[u,f]of d)a.set(i(u),i(f));return a}case o1:{const a=n(new Set,o);for(const u of d)a.add(i(u));return a}case p3:{const{name:a,message:u}=d;return n(new ix[a](u),o)}case m3:return n(BigInt(d),o);case"BigInt":return n(Object(BigInt(d)),o);case"ArrayBuffer":return n(new Uint8Array(d).buffer,d);case"DataView":{const{buffer:a}=new Uint8Array(d);return n(new DataView(a),d)}}return n(new ix[l](d),o)};return i},sx=t=>VI(new Map,t)(0),wl="",{toString:GI}={},{keys:WI}=Object,cu=t=>{const e=typeof t;if(e!=="object"||!t)return[jh,e];const n=GI.call(t).slice(8,-1);switch(n){case"Array":return[_u,wl];case"Object":return[Hf,wl];case"Date":return[r1,wl];case"RegExp":return[i1,wl];case"Map":return[s1,wl];case"Set":return[o1,wl];case"DataView":return[_u,n]}return n.includes("Array")?[_u,n]:n.includes("Error")?[p3,n]:[Hf,n]},hf=([t,e])=>t===jh&&(e==="function"||e==="symbol"),KI=(t,e,n,i)=>{const o=(d,a)=>{const u=i.push(d)-1;return n.set(a,u),u},l=d=>{if(n.has(d))return n.get(d);let[a,u]=cu(d);switch(a){case jh:{let p=d;switch(u){case"bigint":a=m3,p=d.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+u);p=null;break;case"undefined":return o([h3],d)}return o([a,p],d)}case _u:{if(u){let y=d;return u==="DataView"?y=new Uint8Array(d.buffer):u==="ArrayBuffer"&&(y=new Uint8Array(d)),o([u,[...y]],d)}const p=[],h=o([a,p],d);for(const y of d)p.push(l(y));return h}case Hf:{if(u)switch(u){case"BigInt":return o([u,d.toString()],d);case"Boolean":case"Number":case"String":return o([u,d.valueOf()],d)}if(e&&"toJSON"in d)return l(d.toJSON());const p=[],h=o([a,p],d);for(const y of WI(d))(t||!hf(cu(d[y])))&&p.push([l(y),l(d[y])]);return h}case r1:return o([a,d.toISOString()],d);case i1:{const{source:p,flags:h}=d;return o([a,{source:p,flags:h}],d)}case s1:{const p=[],h=o([a,p],d);for(const[y,S]of d)(t||!(hf(cu(y))||hf(cu(S))))&&p.push([l(y),l(S)]);return h}case o1:{const p=[],h=o([a,p],d);for(const y of d)(t||!hf(cu(y)))&&p.push(l(y));return h}}const{message:f}=d;return o([a,{name:u,message:f}],d)};return l},ox=(t,{json:e,lossy:n}={})=>{const i=[];return KI(!(e||n),!!e,new Map,i)(t),i},Uf=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?sx(ox(t,e)):structuredClone(t):(t,e)=>sx(ox(t,e));function YI(t,e){const n=[{type:"text",value:"↩"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function XI(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function ZI(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||YI,i=t.options.footnoteBackLabel||XI,o=t.options.footnoteLabel||"Footnotes",l=t.options.footnoteLabelTagName||"h2",d=t.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let u=-1;for(;++u<t.footnoteOrder.length;){const f=t.footnoteById.get(t.footnoteOrder[u]);if(!f)continue;const p=t.all(f),h=String(f.identifier).toUpperCase(),y=ic(h.toLowerCase());let S=0;const C=[],w=t.footnoteCounts.get(h);for(;w!==void 0&&++S<=w;){C.length>0&&C.push({type:"text",value:" "});let b=typeof n=="string"?n:n(u,S);typeof b=="string"&&(b={type:"text",value:b}),C.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+y+(S>1?"-"+S:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(u,S),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const _=p[p.length-1];if(_&&_.type==="element"&&_.tagName==="p"){const b=_.children[_.children.length-1];b&&b.type==="text"?b.value+=" ":_.children.push({type:"text",value:" "}),_.children.push(...C)}else p.push(...C);const v={type:"element",tagName:"li",properties:{id:e+"fn-"+y},children:t.wrap(p,!0)};t.patch(f,v),a.push(v)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Uf(d),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
522
+ `},{type:"element",tagName:"ol",properties:{},children:t.wrap(a,!0)},{type:"text",value:`
523
+ `}]}}const Oh=(function(t){if(t==null)return tB;if(typeof t=="function")return Lh(t);if(typeof t=="object")return Array.isArray(t)?QI(t):JI(t);if(typeof t=="string")return eB(t);throw new Error("Expected function, string, or object as test")});function QI(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=Oh(t[n]);return Lh(i);function i(...o){let l=-1;for(;++l<e.length;)if(e[l].apply(this,o))return!0;return!1}}function JI(t){const e=t;return Lh(n);function n(i){const o=i;let l;for(l in t)if(o[l]!==e[l])return!1;return!0}}function eB(t){return Lh(e);function e(n){return n&&n.type===t}}function Lh(t){return e;function e(n,i,o){return!!(nB(n)&&t.call(this,n,typeof i=="number"?i:void 0,o||void 0))}}function tB(){return!0}function nB(t){return t!==null&&typeof t=="object"&&"type"in t}const g3=[],rB=!0,Vg=!1,iB="skip";function v3(t,e,n,i){let o;typeof e=="function"&&typeof n!="function"?(i=n,n=e):o=e;const l=Oh(o),d=i?-1:1;a(t,void 0,[])();function a(u,f,p){const h=u&&typeof u=="object"?u:{};if(typeof h.type=="string"){const S=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(u.type+(S?"<"+S+">":""))+")"})}return y;function y(){let S=g3,C,w,_;if((!e||l(u,f,p[p.length-1]||void 0))&&(S=sB(n(u,p)),S[0]===Vg))return S;if("children"in u&&u.children){const v=u;if(v.children&&S[0]!==iB)for(w=(i?v.children.length:-1)+d,_=p.concat(v);w>-1&&w<v.children.length;){const b=v.children[w];if(C=a(b,w,_)(),C[0]===Vg)return C;w=typeof C[1]=="number"?C[1]:w+d}}return S}}}function sB(t){return Array.isArray(t)?t:typeof t=="number"?[rB,t]:t==null?g3:[t]}function a1(t,e,n,i){let o,l,d;typeof e=="function"&&typeof n!="function"?(l=void 0,d=e,o=n):(l=e,d=n,o=i),v3(t,l,a,o);function a(u,f){const p=f[f.length-1],h=p?p.children.indexOf(u):void 0;return d(u,h,p)}}const Gg={}.hasOwnProperty,oB={};function aB(t,e){const n=e||oB,i=new Map,o=new Map,l=new Map,d={...qI,...n.handlers},a={all:f,applyData:cB,definitionById:i,footnoteById:o,footnoteCounts:l,footnoteOrder:[],handlers:d,one:u,options:n,patch:lB,wrap:dB};return a1(t,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const h=p.type==="definition"?i:o,y=String(p.identifier).toUpperCase();h.has(y)||h.set(y,p)}}),a;function u(p,h){const y=p.type,S=a.handlers[y];if(Gg.call(a.handlers,y)&&S)return S(a,p,h);if(a.options.passThrough&&a.options.passThrough.includes(y)){if("children"in p){const{children:w,..._}=p,v=Uf(_);return v.children=a.all(p),v}return Uf(p)}return(a.options.unknownHandler||uB)(a,p,h)}function f(p){const h=[];if("children"in p){const y=p.children;let S=-1;for(;++S<y.length;){const C=a.one(y[S],p);if(C){if(S&&y[S-1].type==="break"&&(!Array.isArray(C)&&C.type==="text"&&(C.value=ax(C.value)),!Array.isArray(C)&&C.type==="element")){const w=C.children[0];w&&w.type==="text"&&(w.value=ax(w.value))}Array.isArray(C)?h.push(...C):h.push(C)}}}return h}}function lB(t,e){t.position&&(e.position=XL(t))}function cB(t,e){let n=e;if(t&&t.data){const i=t.data.hName,o=t.data.hChildren,l=t.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const d="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:d}}n.type==="element"&&l&&Object.assign(n.properties,Uf(l)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function uB(t,e){const n=e.data||{},i="value"in e&&!(Gg.call(n,"hProperties")||Gg.call(n,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function dB(t,e){const n=[];let i=-1;for(e&&n.push({type:"text",value:`
524
+ `});++i<t.length;)i&&n.push({type:"text",value:`
525
+ `}),n.push(t[i]);return e&&t.length>0&&n.push({type:"text",value:`
526
+ `}),n}function ax(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function lx(t,e){const n=aB(t,e),i=n.one(t,void 0),o=ZI(n),l=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return o&&l.children.push({type:"text",value:`
527
+ `},o),l}function fB(t,e){return t&&"run"in t?async function(n,i){const o=lx(n,{file:i,...e});await t.run(o,i)}:function(n,i){return lx(n,{file:i,...t||e})}}function cx(t){if(t)throw t}var ig,ux;function hB(){if(ux)return ig;ux=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(f){return typeof Array.isArray=="function"?Array.isArray(f):e.call(f)==="[object Array]"},l=function(f){if(!f||e.call(f)!=="[object Object]")return!1;var p=t.call(f,"constructor"),h=f.constructor&&f.constructor.prototype&&t.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!h)return!1;var y;for(y in f);return typeof y>"u"||t.call(f,y)},d=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},a=function(f,p){if(p==="__proto__")if(t.call(f,p)){if(i)return i(f,p).value}else return;return f[p]};return ig=function u(){var f,p,h,y,S,C,w=arguments[0],_=1,v=arguments.length,b=!1;for(typeof w=="boolean"&&(b=w,w=arguments[1]||{},_=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});_<v;++_)if(f=arguments[_],f!=null)for(p in f)h=a(w,p),y=a(f,p),w!==y&&(b&&y&&(l(y)||(S=o(y)))?(S?(S=!1,C=h&&o(h)?h:[]):C=h&&l(h)?h:{},d(w,{name:p,newValue:u(b,C,y)})):typeof y<"u"&&d(w,{name:p,newValue:y}));return w},ig}var pB=hB();const sg=qf(pB);function Wg(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function mB(){const t=[],e={run:n,use:i};return e;function n(...o){let l=-1;const d=o.pop();if(typeof d!="function")throw new TypeError("Expected function as last argument, not "+d);a(null,...o);function a(u,...f){const p=t[++l];let h=-1;if(u){d(u);return}for(;++h<o.length;)(f[h]===null||f[h]===void 0)&&(f[h]=o[h]);o=f,p?gB(p,a)(...f):d(null,...f)}}function i(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return t.push(o),e}}function gB(t,e){let n;return i;function i(...d){const a=t.length>d.length;let u;a&&d.push(o);try{u=t.apply(this,d)}catch(f){const p=f;if(a&&n)throw p;return o(p)}a||(u&&u.then&&typeof u.then=="function"?u.then(l,o):u instanceof Error?o(u):l(u))}function o(d,...a){n||(n=!0,e(d,...a))}function l(d){o(null,d)}}const ki={basename:vB,dirname:_B,extname:yB,join:bB,sep:"/"};function vB(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');Zu(t);let n=0,i=-1,o=t.length,l;if(e===void 0||e.length===0||e.length>t.length){for(;o--;)if(t.codePointAt(o)===47){if(l){n=o+1;break}}else i<0&&(l=!0,i=o+1);return i<0?"":t.slice(n,i)}if(e===t)return"";let d=-1,a=e.length-1;for(;o--;)if(t.codePointAt(o)===47){if(l){n=o+1;break}}else d<0&&(l=!0,d=o+1),a>-1&&(t.codePointAt(o)===e.codePointAt(a--)?a<0&&(i=o):(a=-1,i=d));return n===i?i=d:i<0&&(i=t.length),t.slice(n,i)}function _B(t){if(Zu(t),t.length===0)return".";let e=-1,n=t.length,i;for(;--n;)if(t.codePointAt(n)===47){if(i){e=n;break}}else i||(i=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function yB(t){Zu(t);let e=t.length,n=-1,i=0,o=-1,l=0,d;for(;e--;){const a=t.codePointAt(e);if(a===47){if(d){i=e+1;break}continue}n<0&&(d=!0,n=e+1),a===46?o<0?o=e:l!==1&&(l=1):o>-1&&(l=-1)}return o<0||n<0||l===0||l===1&&o===n-1&&o===i+1?"":t.slice(o,n)}function bB(...t){let e=-1,n;for(;++e<t.length;)Zu(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":xB(n)}function xB(t){Zu(t);const e=t.codePointAt(0)===47;let n=SB(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function SB(t,e){let n="",i=0,o=-1,l=0,d=-1,a,u;for(;++d<=t.length;){if(d<t.length)a=t.codePointAt(d);else{if(a===47)break;a=47}if(a===47){if(!(o===d-1||l===1))if(o!==d-1&&l===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",i=0):(n=n.slice(0,u),i=n.length-1-n.lastIndexOf("/")),o=d,l=0;continue}}else if(n.length>0){n="",i=0,o=d,l=0;continue}}e&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+t.slice(o+1,d):n=t.slice(o+1,d),i=d-o-1;o=d,l=0}else a===46&&l>-1?l++:l=-1}return n}function Zu(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const wB={cwd:CB};function CB(){return"/"}function Kg(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function kB(t){if(typeof t=="string")t=new URL(t);else if(!Kg(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return EB(t)}function EB(t){if(t.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const e=t.pathname;let n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){const i=e.codePointAt(n+2);if(i===70||i===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(e)}const og=["history","path","basename","stem","extname","dirname"];class _3{constructor(e){let n;e?Kg(e)?n={path:e}:typeof e=="string"||AB(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":wB.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<og.length;){const l=og[i];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let o;for(o in n)og.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?ki.basename(this.path):void 0}set basename(e){lg(e,"basename"),ag(e,"basename"),this.path=ki.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?ki.dirname(this.path):void 0}set dirname(e){dx(this.basename,"dirname"),this.path=ki.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?ki.extname(this.path):void 0}set extname(e){if(ag(e,"extname"),dx(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ki.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Kg(e)&&(e=kB(e)),lg(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?ki.basename(this.path,this.extname):void 0}set stem(e){lg(e,"stem"),ag(e,"stem"),this.path=ki.join(this.dirname||"",e+(this.extname||""))}fail(e,n,i){const o=this.message(e,n,i);throw o.fatal=!0,o}info(e,n,i){const o=this.message(e,n,i);return o.fatal=void 0,o}message(e,n,i){const o=new Pn(e,n,i);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function ag(t,e){if(t&&t.includes(ki.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+ki.sep+"`")}function lg(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function dx(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function AB(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const TB=(function(t){const i=this.constructor.prototype,o=i[t],l=function(){return o.apply(l,arguments)};return Object.setPrototypeOf(l,i),l}),RB={}.hasOwnProperty;class l1 extends TB{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=mB()}copy(){const e=new l1;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];e.use(...i)}return e.data(sg(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(dg("data",this.frozen),this.namespace[e]=n,this):RB.call(this.namespace,e)&&this.namespace[e]||void 0:e?(dg("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const o=n.call(e,...i);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=pf(e),i=this.parser||this.Parser;return cg("parse",i),i(String(n),n)}process(e,n){const i=this;return this.freeze(),cg("process",this.parser||this.Parser),ug("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(l,d){const a=pf(e),u=i.parse(a);i.run(u,a,function(p,h,y){if(p||!h||!y)return f(p);const S=h,C=i.stringify(S,y);MB(C)?y.value=C:y.result=C,f(p,y)});function f(p,h){p||!h?d(p):l?l(h):n(void 0,h)}}}processSync(e){let n=!1,i;return this.freeze(),cg("processSync",this.parser||this.Parser),ug("processSync",this.compiler||this.Compiler),this.process(e,o),hx("processSync","process",n),i;function o(l,d){n=!0,cx(l),i=d}}run(e,n,i){fx(e),this.freeze();const o=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?l(void 0,i):new Promise(l);function l(d,a){const u=pf(n);o.run(e,u,f);function f(p,h,y){const S=h||e;p?a(p):d?d(S):i(void 0,S,y)}}}runSync(e,n){let i=!1,o;return this.run(e,n,l),hx("runSync","run",i),o;function l(d,a){cx(d),o=a,i=!0}}stringify(e,n){this.freeze();const i=pf(n),o=this.compiler||this.Compiler;return ug("stringify",o),fx(e),o(e,i)}use(e,...n){const i=this.attachers,o=this.namespace;if(dg("use",this.frozen),e!=null)if(typeof e=="function")u(e,n);else if(typeof e=="object")Array.isArray(e)?a(e):d(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function l(f){if(typeof f=="function")u(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...h]=f;u(p,h)}else d(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function d(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(f.plugins),f.settings&&(o.settings=sg(!0,o.settings,f.settings))}function a(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const h=f[p];l(h)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function u(f,p){let h=-1,y=-1;for(;++h<i.length;)if(i[h][0]===f){y=h;break}if(y===-1)i.push([f,...p]);else if(p.length>0){let[S,...C]=p;const w=i[y][1];Wg(w)&&Wg(S)&&(S=sg(!0,w,S)),i[y]=[f,S,...C]}}}}const NB=new l1().freeze();function cg(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function ug(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function dg(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function fx(t){if(!Wg(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function hx(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function pf(t){return DB(t)?t:new _3(t)}function DB(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function MB(t){return typeof t=="string"||jB(t)}function jB(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const OB="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",px=[],mx={allowDangerousHtml:!0},LB=/^(https?|ircs?|mailto|xmpp)$/i,IB=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function BB(t){const e=zB(t),n=PB(t);return FB(e.runSync(e.parse(n),n),t)}function zB(t){const e=t.rehypePlugins||px,n=t.remarkPlugins||px,i=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...mx}:mx;return NB().use(_I).use(n).use(fB,i).use(e)}function PB(t){const e=t.children||"",n=new _3;return typeof e=="string"&&(n.value=e),n}function FB(t,e){const n=e.allowedElements,i=e.allowElement,o=e.components,l=e.disallowedElements,d=e.skipHtml,a=e.unwrapDisallowed,u=e.urlTransform||HB;for(const p of IB)Object.hasOwn(e,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+OB+p.id,void 0);return a1(t,f),t7(t,{Fragment:g.Fragment,components:o,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function f(p,h,y){if(p.type==="raw"&&y&&typeof h=="number")return d?y.children.splice(h,1):y.children[h]={type:"text",value:p.value},h;if(p.type==="element"){let S;for(S in tg)if(Object.hasOwn(tg,S)&&Object.hasOwn(p.properties,S)){const C=p.properties[S],w=tg[S];(w===null||w.includes(p.tagName))&&(p.properties[S]=u(String(C||""),S,p))}}if(p.type==="element"){let S=n?!n.includes(p.tagName):l?l.includes(p.tagName):!1;if(!S&&i&&typeof h=="number"&&(S=!i(p,h,y)),S&&y&&typeof h=="number")return a&&p.children?y.children.splice(h,1,...p.children):y.children.splice(h,1),h}}}function HB(t){const e=t.indexOf(":"),n=t.indexOf("?"),i=t.indexOf("#"),o=t.indexOf("/");return e===-1||o!==-1&&e>o||n!==-1&&e>n||i!==-1&&e>i||LB.test(t.slice(0,e))?t:""}function gx(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let i=0,o=n.indexOf(e);for(;o!==-1;)i++,o=n.indexOf(e,o+e.length);return i}function UB(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function $B(t,e,n){const o=Oh((n||{}).ignore||[]),l=qB(e);let d=-1;for(;++d<l.length;)v3(t,"text",a);function a(f,p){let h=-1,y;for(;++h<p.length;){const S=p[h],C=y?y.children:void 0;if(o(S,C?C.indexOf(S):void 0,y))return;y=S}if(y)return u(f,p)}function u(f,p){const h=p[p.length-1],y=l[d][0],S=l[d][1];let C=0;const _=h.children.indexOf(f);let v=!1,b=[];y.lastIndex=0;let x=y.exec(f.value);for(;x;){const E=x.index,N={index:x.index,input:x.input,stack:[...p,f]};let A=S(...x,N);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?y.lastIndex=E+1:(C!==E&&b.push({type:"text",value:f.value.slice(C,E)}),Array.isArray(A)?b.push(...A):A&&b.push(A),C=E+x[0].length,v=!0),!y.global)break;x=y.exec(f.value)}return v?(C<f.value.length&&b.push({type:"text",value:f.value.slice(C)}),h.children.splice(_,1,...b)):b=[f],_+b.length}}function qB(t){const e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!t[0]||Array.isArray(t[0])?t:[t];let i=-1;for(;++i<n.length;){const o=n[i];e.push([VB(o[0]),GB(o[1])])}return e}function VB(t){return typeof t=="string"?new RegExp(UB(t),"g"):t}function GB(t){return typeof t=="function"?t:function(){return t}}const fg="phrasing",hg=["autolink","link","image","label"];function WB(){return{transforms:[ez],enter:{literalAutolink:YB,literalAutolinkEmail:pg,literalAutolinkHttp:pg,literalAutolinkWww:pg},exit:{literalAutolink:JB,literalAutolinkEmail:QB,literalAutolinkHttp:XB,literalAutolinkWww:ZB}}}function KB(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:fg,notInConstruct:hg},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:fg,notInConstruct:hg},{character:":",before:"[ps]",after:"\\/",inConstruct:fg,notInConstruct:hg}]}}function YB(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function pg(t){this.config.enter.autolinkProtocol.call(this,t)}function XB(t){this.config.exit.autolinkProtocol.call(this,t)}function ZB(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function QB(t){this.config.exit.autolinkEmail.call(this,t)}function JB(t){this.exit(t)}function ez(t){$B(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,tz],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),nz]],{ignore:["link","linkReference"]})}function tz(t,e,n,i,o){let l="";if(!y3(o)||(/^w/i.test(e)&&(n=e+n,e="",l="http://"),!rz(n)))return!1;const d=iz(n+i);if(!d[0])return!1;const a={type:"link",title:null,url:l+e+d[0],children:[{type:"text",value:e+d[0]}]};return d[1]?[a,{type:"text",value:d[1]}]:a}function nz(t,e,n,i){return!y3(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function rz(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function iz(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],i=n.indexOf(")");const o=gx(t,"(");let l=gx(t,")");for(;i!==-1&&o>l;)t+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),l++;return[t,n]}function y3(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||_a(n)||Dh(n))&&(!e||n!==47)}b3.peek=hz;function sz(){this.buffer()}function oz(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function az(){this.buffer()}function lz(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function cz(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ii(this.sliceSerialize(t)).toLowerCase(),n.label=e}function uz(t){this.exit(t)}function dz(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ii(this.sliceSerialize(t)).toLowerCase(),n.label=e}function fz(t){this.exit(t)}function hz(){return"["}function b3(t,e,n,i){const o=n.createTracker(i);let l=o.move("[^");const d=n.enter("footnoteReference"),a=n.enter("reference");return l+=o.move(n.safe(n.associationId(t),{after:"]",before:l})),a(),d(),l+=o.move("]"),l}function pz(){return{enter:{gfmFootnoteCallString:sz,gfmFootnoteCall:oz,gfmFootnoteDefinitionLabelString:az,gfmFootnoteDefinition:lz},exit:{gfmFootnoteCallString:cz,gfmFootnoteCall:uz,gfmFootnoteDefinitionLabelString:dz,gfmFootnoteDefinition:fz}}}function mz(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:n,footnoteReference:b3},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,o,l,d){const a=l.createTracker(d);let u=a.move("[^");const f=l.enter("footnoteDefinition"),p=l.enter("label");return u+=a.move(l.safe(l.associationId(i),{before:u,after:"]"})),p(),u+=a.move("]:"),i.children&&i.children.length>0&&(a.shift(4),u+=a.move((e?`
528
+ `:" ")+l.indentLines(l.containerFlow(i,a.current()),e?x3:gz))),f(),u}}function gz(t,e,n){return e===0?t:x3(t,e,n)}function x3(t,e,n){return(n?"":" ")+t}const vz=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];S3.peek=Sz;function _z(){return{canContainEols:["delete"],enter:{strikethrough:bz},exit:{strikethrough:xz}}}function yz(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:vz}],handlers:{delete:S3}}}function bz(t){this.enter({type:"delete",children:[]},t)}function xz(t){this.exit(t)}function S3(t,e,n,i){const o=n.createTracker(i),l=n.enter("strikethrough");let d=o.move("~~");return d+=n.containerPhrasing(t,{...o.current(),before:d,after:"~"}),d+=o.move("~~"),l(),d}function Sz(){return"~"}function wz(t){return t.length}function Cz(t,e){const n=e||{},i=(n.align||[]).concat(),o=n.stringLength||wz,l=[],d=[],a=[],u=[];let f=0,p=-1;for(;++p<t.length;){const w=[],_=[];let v=-1;for(t[p].length>f&&(f=t[p].length);++v<t[p].length;){const b=kz(t[p][v]);if(n.alignDelimiters!==!1){const x=o(b);_[v]=x,(u[v]===void 0||x>u[v])&&(u[v]=x)}w.push(b)}d[p]=w,a[p]=_}let h=-1;if(typeof i=="object"&&"length"in i)for(;++h<f;)l[h]=vx(i[h]);else{const w=vx(i);for(;++h<f;)l[h]=w}h=-1;const y=[],S=[];for(;++h<f;){const w=l[h];let _="",v="";w===99?(_=":",v=":"):w===108?_=":":w===114&&(v=":");let b=n.alignDelimiters===!1?1:Math.max(1,u[h]-_.length-v.length);const x=_+"-".repeat(b)+v;n.alignDelimiters!==!1&&(b=_.length+b+v.length,b>u[h]&&(u[h]=b),S[h]=b),y[h]=x}d.splice(1,0,y),a.splice(1,0,S),p=-1;const C=[];for(;++p<d.length;){const w=d[p],_=a[p];h=-1;const v=[];for(;++h<f;){const b=w[h]||"";let x="",E="";if(n.alignDelimiters!==!1){const N=u[h]-(_[h]||0),A=l[h];A===114?x=" ".repeat(N):A===99?N%2?(x=" ".repeat(N/2+.5),E=" ".repeat(N/2-.5)):(x=" ".repeat(N/2),E=x):E=" ".repeat(N)}n.delimiterStart!==!1&&!h&&v.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&b==="")&&(n.delimiterStart!==!1||h)&&v.push(" "),n.alignDelimiters!==!1&&v.push(x),v.push(b),n.alignDelimiters!==!1&&v.push(E),n.padding!==!1&&v.push(" "),(n.delimiterEnd!==!1||h!==f-1)&&v.push("|")}C.push(n.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return C.join(`
529
+ `)}function kz(t){return t==null?"":String(t)}function vx(t){const e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function Ez(t,e,n,i){const o=n.enter("blockquote"),l=n.createTracker(i);l.move("> "),l.shift(2);const d=n.indentLines(n.containerFlow(t,l.current()),Az);return o(),d}function Az(t,e,n){return">"+(n?"":" ")+t}function Tz(t,e){return _x(t,e.inConstruct,!0)&&!_x(t,e.notInConstruct,!1)}function _x(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let i=-1;for(;++i<e.length;)if(t.includes(e[i]))return!0;return!1}function yx(t,e,n,i){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
530
+ `&&Tz(n.stack,n.unsafe[o]))return/[ \t]/.test(i.before)?"":" ";return`\\
531
+ `}function Rz(t,e){const n=String(t);let i=n.indexOf(e),o=i,l=0,d=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===o?++l>d&&(d=l):l=1,o=i+e.length,i=n.indexOf(e,o);return d}function Nz(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function Dz(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function Mz(t,e,n,i){const o=Dz(n),l=t.value||"",d=o==="`"?"GraveAccent":"Tilde";if(Nz(t,n)){const h=n.enter("codeIndented"),y=n.indentLines(l,jz);return h(),y}const a=n.createTracker(i),u=o.repeat(Math.max(Rz(l,o)+1,3)),f=n.enter("codeFenced");let p=a.move(u);if(t.lang){const h=n.enter(`codeFencedLang${d}`);p+=a.move(n.safe(t.lang,{before:p,after:" ",encode:["`"],...a.current()})),h()}if(t.lang&&t.meta){const h=n.enter(`codeFencedMeta${d}`);p+=a.move(" "),p+=a.move(n.safe(t.meta,{before:p,after:`
532
+ `,encode:["`"],...a.current()})),h()}return p+=a.move(`
533
+ `),l&&(p+=a.move(l+`
534
+ `)),p+=a.move(u),f(),p}function jz(t,e,n){return(n?"":" ")+t}function c1(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function Oz(t,e,n,i){const o=c1(n),l=o==='"'?"Quote":"Apostrophe",d=n.enter("definition");let a=n.enter("label");const u=n.createTracker(i);let f=u.move("[");return f+=u.move(n.safe(n.associationId(t),{before:f,after:"]",...u.current()})),f+=u.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(t.url,{before:f,after:">",...u.current()})),f+=u.move(">")):(a=n.enter("destinationRaw"),f+=u.move(n.safe(t.url,{before:f,after:t.title?" ":`
535
+ `,...u.current()}))),a(),t.title&&(a=n.enter(`title${l}`),f+=u.move(" "+o),f+=u.move(n.safe(t.title,{before:f,after:o,...u.current()})),f+=u.move(o),a()),d(),f}function Lz(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function Ru(t){return"&#x"+t.toString(16).toUpperCase()+";"}function $f(t,e,n){const i=Ul(t),o=Ul(e);return i===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}w3.peek=Iz;function w3(t,e,n,i){const o=Lz(n),l=n.enter("emphasis"),d=n.createTracker(i),a=d.move(o);let u=d.move(n.containerPhrasing(t,{after:o,before:a,...d.current()}));const f=u.charCodeAt(0),p=$f(i.before.charCodeAt(i.before.length-1),f,o);p.inside&&(u=Ru(f)+u.slice(1));const h=u.charCodeAt(u.length-1),y=$f(i.after.charCodeAt(0),h,o);y.inside&&(u=u.slice(0,-1)+Ru(h));const S=d.move(o);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:p.outside},a+u+S}function Iz(t,e,n){return n.options.emphasis||"*"}function Bz(t,e){let n=!1;return a1(t,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,Vg}),!!((!t.depth||t.depth<3)&&e1(t)&&(e.options.setext||n))}function zz(t,e,n,i){const o=Math.max(Math.min(6,t.depth||1),1),l=n.createTracker(i);if(Bz(t,n)){const p=n.enter("headingSetext"),h=n.enter("phrasing"),y=n.containerPhrasing(t,{...l.current(),before:`
536
+ `,after:`
537
+ `});return h(),p(),y+`
538
+ `+(o===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
539
+ `))+1))}const d="#".repeat(o),a=n.enter("headingAtx"),u=n.enter("phrasing");l.move(d+" ");let f=n.containerPhrasing(t,{before:"# ",after:`
540
+ `,...l.current()});return/^[\t ]/.test(f)&&(f=Ru(f.charCodeAt(0))+f.slice(1)),f=f?d+" "+f:d,n.options.closeAtx&&(f+=" "+d),u(),a(),f}C3.peek=Pz;function C3(t){return t.value||""}function Pz(){return"<"}k3.peek=Fz;function k3(t,e,n,i){const o=c1(n),l=o==='"'?"Quote":"Apostrophe",d=n.enter("image");let a=n.enter("label");const u=n.createTracker(i);let f=u.move("![");return f+=u.move(n.safe(t.alt,{before:f,after:"]",...u.current()})),f+=u.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(t.url,{before:f,after:">",...u.current()})),f+=u.move(">")):(a=n.enter("destinationRaw"),f+=u.move(n.safe(t.url,{before:f,after:t.title?" ":")",...u.current()}))),a(),t.title&&(a=n.enter(`title${l}`),f+=u.move(" "+o),f+=u.move(n.safe(t.title,{before:f,after:o,...u.current()})),f+=u.move(o),a()),f+=u.move(")"),d(),f}function Fz(){return"!"}E3.peek=Hz;function E3(t,e,n,i){const o=t.referenceType,l=n.enter("imageReference");let d=n.enter("label");const a=n.createTracker(i);let u=a.move("![");const f=n.safe(t.alt,{before:u,after:"]",...a.current()});u+=a.move(f+"]["),d();const p=n.stack;n.stack=[],d=n.enter("reference");const h=n.safe(n.associationId(t),{before:u,after:"]",...a.current()});return d(),n.stack=p,l(),o==="full"||!f||f!==h?u+=a.move(h+"]"):o==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function Hz(){return"!"}A3.peek=Uz;function A3(t,e,n){let i=t.value||"",o="`",l=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(i);)o+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++l<n.unsafe.length;){const d=n.unsafe[l],a=n.compilePattern(d);let u;if(d.atBreak)for(;u=a.exec(i);){let f=u.index;i.charCodeAt(f)===10&&i.charCodeAt(f-1)===13&&f--,i=i.slice(0,f)+" "+i.slice(u.index+1)}}return o+i+o}function Uz(){return"`"}function T3(t,e){const n=e1(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}R3.peek=$z;function R3(t,e,n,i){const o=c1(n),l=o==='"'?"Quote":"Apostrophe",d=n.createTracker(i);let a,u;if(T3(t,n)){const p=n.stack;n.stack=[],a=n.enter("autolink");let h=d.move("<");return h+=d.move(n.containerPhrasing(t,{before:h,after:">",...d.current()})),h+=d.move(">"),a(),n.stack=p,h}a=n.enter("link"),u=n.enter("label");let f=d.move("[");return f+=d.move(n.containerPhrasing(t,{before:f,after:"](",...d.current()})),f+=d.move("]("),u(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(u=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(t.url,{before:f,after:">",...d.current()})),f+=d.move(">")):(u=n.enter("destinationRaw"),f+=d.move(n.safe(t.url,{before:f,after:t.title?" ":")",...d.current()}))),u(),t.title&&(u=n.enter(`title${l}`),f+=d.move(" "+o),f+=d.move(n.safe(t.title,{before:f,after:o,...d.current()})),f+=d.move(o),u()),f+=d.move(")"),a(),f}function $z(t,e,n){return T3(t,n)?"<":"["}N3.peek=qz;function N3(t,e,n,i){const o=t.referenceType,l=n.enter("linkReference");let d=n.enter("label");const a=n.createTracker(i);let u=a.move("[");const f=n.containerPhrasing(t,{before:u,after:"]",...a.current()});u+=a.move(f+"]["),d();const p=n.stack;n.stack=[],d=n.enter("reference");const h=n.safe(n.associationId(t),{before:u,after:"]",...a.current()});return d(),n.stack=p,l(),o==="full"||!f||f!==h?u+=a.move(h+"]"):o==="shortcut"?u=u.slice(0,-1):u+=a.move("]"),u}function qz(){return"["}function u1(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function Vz(t){const e=u1(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Gz(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function D3(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function Wz(t,e,n,i){const o=n.enter("list"),l=n.bulletCurrent;let d=t.ordered?Gz(n):u1(n);const a=t.ordered?d==="."?")":".":Vz(n);let u=e&&n.bulletLastUsed?d===n.bulletLastUsed:!1;if(!t.ordered){const p=t.children?t.children[0]:void 0;if((d==="*"||d==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),D3(n)===d&&p){let h=-1;for(;++h<t.children.length;){const y=t.children[h];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(d=a),n.bulletCurrent=d;const f=n.containerFlow(t,i);return n.bulletLastUsed=d,n.bulletCurrent=l,o(),f}function Kz(t){const e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function Yz(t,e,n,i){const o=Kz(n);let l=n.bulletCurrent||u1(n);e&&e.type==="list"&&e.ordered&&(l=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+l);let d=l.length+1;(o==="tab"||o==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(d=Math.ceil(d/4)*4);const a=n.createTracker(i);a.move(l+" ".repeat(d-l.length)),a.shift(d);const u=n.enter("listItem"),f=n.indentLines(n.containerFlow(t,a.current()),p);return u(),f;function p(h,y,S){return y?(S?"":" ".repeat(d))+h:(S?l:l+" ".repeat(d-l.length))+h}}function Xz(t,e,n,i){const o=n.enter("paragraph"),l=n.enter("phrasing"),d=n.containerPhrasing(t,i);return l(),o(),d}const Zz=Oh(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Qz(t,e,n,i){return(t.children.some(function(d){return Zz(d)})?n.containerPhrasing:n.containerFlow).call(n,t,i)}function Jz(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}M3.peek=eP;function M3(t,e,n,i){const o=Jz(n),l=n.enter("strong"),d=n.createTracker(i),a=d.move(o+o);let u=d.move(n.containerPhrasing(t,{after:o,before:a,...d.current()}));const f=u.charCodeAt(0),p=$f(i.before.charCodeAt(i.before.length-1),f,o);p.inside&&(u=Ru(f)+u.slice(1));const h=u.charCodeAt(u.length-1),y=$f(i.after.charCodeAt(0),h,o);y.inside&&(u=u.slice(0,-1)+Ru(h));const S=d.move(o+o);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:p.outside},a+u+S}function eP(t,e,n){return n.options.strong||"*"}function tP(t,e,n,i){return n.safe(t.value,i)}function nP(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function rP(t,e,n){const i=(D3(n)+(n.options.ruleSpaces?" ":"")).repeat(nP(n));return n.options.ruleSpaces?i.slice(0,-1):i}const j3={blockquote:Ez,break:yx,code:Mz,definition:Oz,emphasis:w3,hardBreak:yx,heading:zz,html:C3,image:k3,imageReference:E3,inlineCode:A3,link:R3,linkReference:N3,list:Wz,listItem:Yz,paragraph:Xz,root:Qz,strong:M3,text:tP,thematicBreak:rP};function iP(){return{enter:{table:sP,tableData:bx,tableHeader:bx,tableRow:aP},exit:{codeText:lP,table:oP,tableData:mg,tableHeader:mg,tableRow:mg}}}function sP(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function oP(t){this.exit(t),this.data.inTable=void 0}function aP(t){this.enter({type:"tableRow",children:[]},t)}function mg(t){this.exit(t)}function bx(t){this.enter({type:"tableCell",children:[]},t)}function lP(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,cP));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function cP(t,e){return e==="|"?e:t}function uP(t){const e=t||{},n=e.tableCellPadding,i=e.tablePipeAlign,o=e.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
541
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:d,tableCell:u,tableRow:a}};function d(S,C,w,_){return f(p(S,w,_),S.align)}function a(S,C,w,_){const v=h(S,w,_),b=f([v]);return b.slice(0,b.indexOf(`
542
+ `))}function u(S,C,w,_){const v=w.enter("tableCell"),b=w.enter("phrasing"),x=w.containerPhrasing(S,{..._,before:l,after:l});return b(),v(),x}function f(S,C){return Cz(S,{align:C,alignDelimiters:i,padding:n,stringLength:o})}function p(S,C,w){const _=S.children;let v=-1;const b=[],x=C.enter("table");for(;++v<_.length;)b[v]=h(_[v],C,w);return x(),b}function h(S,C,w){const _=S.children;let v=-1;const b=[],x=C.enter("tableRow");for(;++v<_.length;)b[v]=u(_[v],S,C,w);return x(),b}function y(S,C,w){let _=j3.inlineCode(S,C,w);return w.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function dP(){return{exit:{taskListCheckValueChecked:xx,taskListCheckValueUnchecked:xx,paragraph:hP}}}function fP(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:pP}}}function xx(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function hP(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const o=e.children;let l=-1,d;for(;++l<o.length;){const a=o[l];if(a.type==="paragraph"){d=a;break}}d===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(t)}function pP(t,e,n,i){const o=t.children[0],l=typeof t.checked=="boolean"&&o&&o.type==="paragraph",d="["+(t.checked?"x":" ")+"] ",a=n.createTracker(i);l&&a.move(d);let u=j3.listItem(t,e,n,{...i,...a.current()});return l&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),u;function f(p){return p+d}}function mP(){return[WB(),pz(),_z(),iP(),dP()]}function gP(t){return{extensions:[KB(),mz(t),yz(),uP(t),fP()]}}const vP={tokenize:wP,partial:!0},O3={tokenize:CP,partial:!0},L3={tokenize:kP,partial:!0},I3={tokenize:EP,partial:!0},_P={tokenize:AP,partial:!0},B3={name:"wwwAutolink",tokenize:xP,previous:P3},z3={name:"protocolAutolink",tokenize:SP,previous:F3},As={name:"emailAutolink",tokenize:bP,previous:H3},ji={};function yP(){return{text:ji}}let ca=48;for(;ca<123;)ji[ca]=As,ca++,ca===58?ca=65:ca===91&&(ca=97);ji[43]=As;ji[45]=As;ji[46]=As;ji[95]=As;ji[72]=[As,z3];ji[104]=[As,z3];ji[87]=[As,B3];ji[119]=[As,B3];function bP(t,e,n){const i=this;let o,l;return d;function d(h){return!Yg(h)||!H3.call(i,i.previous)||d1(i.events)?n(h):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(h))}function a(h){return Yg(h)?(t.consume(h),a):h===64?(t.consume(h),u):n(h)}function u(h){return h===46?t.check(_P,p,f)(h):h===45||h===95||zn(h)?(l=!0,t.consume(h),u):p(h)}function f(h){return t.consume(h),o=!0,u}function p(h){return l&&o&&Un(i.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(h)):n(h)}}function xP(t,e,n){const i=this;return o;function o(d){return d!==87&&d!==119||!P3.call(i,i.previous)||d1(i.events)?n(d):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(vP,t.attempt(O3,t.attempt(L3,l),n),n)(d))}function l(d){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(d)}}function SP(t,e,n){const i=this;let o="",l=!1;return d;function d(h){return(h===72||h===104)&&F3.call(i,i.previous)&&!d1(i.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),o+=String.fromCodePoint(h),t.consume(h),a):n(h)}function a(h){if(Un(h)&&o.length<5)return o+=String.fromCodePoint(h),t.consume(h),a;if(h===58){const y=o.toLowerCase();if(y==="http"||y==="https")return t.consume(h),u}return n(h)}function u(h){return h===47?(t.consume(h),l?f:(l=!0,u)):n(h)}function f(h){return h===null||Ff(h)||Ft(h)||_a(h)||Dh(h)?n(h):t.attempt(O3,t.attempt(L3,p),n)(h)}function p(h){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(h)}}function wP(t,e,n){let i=0;return o;function o(d){return(d===87||d===119)&&i<3?(i++,t.consume(d),o):d===46&&i===3?(t.consume(d),l):n(d)}function l(d){return d===null?n(d):e(d)}}function CP(t,e,n){let i,o,l;return d;function d(f){return f===46||f===95?t.check(I3,u,a)(f):f===null||Ft(f)||_a(f)||f!==45&&Dh(f)?u(f):(l=!0,t.consume(f),d)}function a(f){return f===95?i=!0:(o=i,i=void 0),t.consume(f),d}function u(f){return o||i||!l?n(f):e(f)}}function kP(t,e){let n=0,i=0;return o;function o(d){return d===40?(n++,t.consume(d),o):d===41&&i<n?l(d):d===33||d===34||d===38||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===60||d===63||d===93||d===95||d===126?t.check(I3,e,l)(d):d===null||Ft(d)||_a(d)?e(d):(t.consume(d),o)}function l(d){return d===41&&i++,t.consume(d),o}}function EP(t,e,n){return i;function i(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(t.consume(a),i):a===38?(t.consume(a),l):a===93?(t.consume(a),o):a===60||a===null||Ft(a)||_a(a)?e(a):n(a)}function o(a){return a===null||a===40||a===91||Ft(a)||_a(a)?e(a):i(a)}function l(a){return Un(a)?d(a):n(a)}function d(a){return a===59?(t.consume(a),i):Un(a)?(t.consume(a),d):n(a)}}function AP(t,e,n){return i;function i(l){return t.consume(l),o}function o(l){return zn(l)?n(l):e(l)}}function P3(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Ft(t)}function F3(t){return!Un(t)}function H3(t){return!(t===47||Yg(t))}function Yg(t){return t===43||t===45||t===46||t===95||zn(t)}function d1(t){let e=t.length,n=!1;for(;e--;){const i=t[e][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const TP={tokenize:IP,partial:!0};function RP(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:jP,continuation:{tokenize:OP},exit:LP}},text:{91:{name:"gfmFootnoteCall",tokenize:MP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:NP,resolveTo:DP}}}}function NP(t,e,n){const i=this;let o=i.events.length;const l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let d;for(;o--;){const u=i.events[o][1];if(u.type==="labelImage"){d=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return a;function a(u){if(!d||!d._balanced)return n(u);const f=ii(i.sliceSerialize({start:d.end,end:i.now()}));return f.codePointAt(0)!==94||!l.includes(f.slice(1))?n(u):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(u),t.exit("gfmFootnoteCallLabelMarker"),e(u))}}function DP(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},d={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},a=[t[n+1],t[n+2],["enter",i,e],t[n+3],t[n+4],["enter",o,e],["exit",o,e],["enter",l,e],["enter",d,e],["exit",d,e],["exit",l,e],t[t.length-2],t[t.length-1],["exit",i,e]];return t.splice(n,t.length-n+1,...a),t}function MP(t,e,n){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l=0,d;return a;function a(h){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),u}function u(h){return h!==94?n(h):(t.enter("gfmFootnoteCallMarker"),t.consume(h),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",f)}function f(h){if(l>999||h===93&&!d||h===null||h===91||Ft(h))return n(h);if(h===93){t.exit("chunkString");const y=t.exit("gfmFootnoteCallString");return o.includes(ii(i.sliceSerialize(y)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(h)}return Ft(h)||(d=!0),l++,t.consume(h),h===92?p:f}function p(h){return h===91||h===92||h===93?(t.consume(h),l++,f):f(h)}}function jP(t,e,n){const i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l,d=0,a;return u;function u(C){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(C),t.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(C){return C===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(C),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",p):n(C)}function p(C){if(d>999||C===93&&!a||C===null||C===91||Ft(C))return n(C);if(C===93){t.exit("chunkString");const w=t.exit("gfmFootnoteDefinitionLabelString");return l=ii(i.sliceSerialize(w)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(C),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),y}return Ft(C)||(a=!0),d++,t.consume(C),C===92?h:p}function h(C){return C===91||C===92||C===93?(t.consume(C),d++,p):p(C)}function y(C){return C===58?(t.enter("definitionMarker"),t.consume(C),t.exit("definitionMarker"),o.includes(l)||o.push(l),kt(t,S,"gfmFootnoteDefinitionWhitespace")):n(C)}function S(C){return e(C)}}function OP(t,e,n){return t.check(Xu,e,t.attempt(TP,e,n))}function LP(t){t.exit("gfmFootnoteDefinition")}function IP(t,e,n){const i=this;return kt(t,o,"gfmFootnoteDefinitionIndent",5);function o(l){const d=i.events[i.events.length-1];return d&&d[1].type==="gfmFootnoteDefinitionIndent"&&d[2].sliceSerialize(d[1],!0).length===4?e(l):n(l)}}function BP(t){let n=(t||{}).singleTilde;const i={name:"strikethrough",tokenize:l,resolveAll:o};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function o(d,a){let u=-1;for(;++u<d.length;)if(d[u][0]==="enter"&&d[u][1].type==="strikethroughSequenceTemporary"&&d[u][1]._close){let f=u;for(;f--;)if(d[f][0]==="exit"&&d[f][1].type==="strikethroughSequenceTemporary"&&d[f][1]._open&&d[u][1].end.offset-d[u][1].start.offset===d[f][1].end.offset-d[f][1].start.offset){d[u][1].type="strikethroughSequence",d[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},d[f][1].start),end:Object.assign({},d[u][1].end)},h={type:"strikethroughText",start:Object.assign({},d[f][1].end),end:Object.assign({},d[u][1].start)},y=[["enter",p,a],["enter",d[f][1],a],["exit",d[f][1],a],["enter",h,a]],S=a.parser.constructs.insideSpan.null;S&&_r(y,y.length,0,Mh(S,d.slice(f+1,u),a)),_r(y,y.length,0,[["exit",h,a],["enter",d[u][1],a],["exit",d[u][1],a],["exit",p,a]]),_r(d,f-1,u-f+3,y),u=f+y.length-2;break}}for(u=-1;++u<d.length;)d[u][1].type==="strikethroughSequenceTemporary"&&(d[u][1].type="data");return d}function l(d,a,u){const f=this.previous,p=this.events;let h=0;return y;function y(C){return f===126&&p[p.length-1][1].type!=="characterEscape"?u(C):(d.enter("strikethroughSequenceTemporary"),S(C))}function S(C){const w=Ul(f);if(C===126)return h>1?u(C):(d.consume(C),h++,S);if(h<2&&!n)return u(C);const _=d.exit("strikethroughSequenceTemporary"),v=Ul(C);return _._open=!v||v===2&&!!w,_._close=!w||w===2&&!!v,a(C)}}}class zP{constructor(){this.map=[]}add(e,n,i){PP(this,e,n,i)}consume(e){if(this.map.sort(function(l,d){return l[0]-d[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];i.push(e.slice()),e.length=0;let o=i.pop();for(;o;){for(const l of o)e.push(l);o=i.pop()}this.map.length=0}}function PP(t,e,n,i){let o=0;if(!(n===0&&i.length===0)){for(;o<t.map.length;){if(t.map[o][0]===e){t.map[o][1]+=n,t.map[o][2].push(...i);return}o+=1}t.map.push([e,n,i])}}function FP(t,e){let n=!1;const i=[];for(;e<t.length;){const o=t[e];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&i.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const l=i.length-1;i[l]=i[l]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return i}function HP(){return{flow:{null:{name:"table",tokenize:UP,resolveAll:$P}}}}function UP(t,e,n){const i=this;let o=0,l=0,d;return a;function a(O){let F=i.events.length-1;for(;F>-1;){const G=i.events[F][1].type;if(G==="lineEnding"||G==="linePrefix")F--;else break}const U=F>-1?i.events[F][1].type:null,$=U==="tableHead"||U==="tableRow"?A:u;return $===A&&i.parser.lazy[i.now().line]?n(O):$(O)}function u(O){return t.enter("tableHead"),t.enter("tableRow"),f(O)}function f(O){return O===124||(d=!0,l+=1),p(O)}function p(O){return O===null?n(O):Qe(O)?l>1?(l=0,i.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),S):n(O):xt(O)?kt(t,p,"whitespace")(O):(l+=1,d&&(d=!1,o+=1),O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),d=!0,p):(t.enter("data"),h(O)))}function h(O){return O===null||O===124||Ft(O)?(t.exit("data"),p(O)):(t.consume(O),O===92?y:h)}function y(O){return O===92||O===124?(t.consume(O),h):h(O)}function S(O){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(O):(t.enter("tableDelimiterRow"),d=!1,xt(O)?kt(t,C,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):C(O))}function C(O){return O===45||O===58?_(O):O===124?(d=!0,t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),w):N(O)}function w(O){return xt(O)?kt(t,_,"whitespace")(O):_(O)}function _(O){return O===58?(l+=1,d=!0,t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),v):O===45?(l+=1,v(O)):O===null||Qe(O)?E(O):N(O)}function v(O){return O===45?(t.enter("tableDelimiterFiller"),b(O)):N(O)}function b(O){return O===45?(t.consume(O),b):O===58?(d=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),x):(t.exit("tableDelimiterFiller"),x(O))}function x(O){return xt(O)?kt(t,E,"whitespace")(O):E(O)}function E(O){return O===124?C(O):O===null||Qe(O)?!d||o!==l?N(O):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(O)):N(O)}function N(O){return n(O)}function A(O){return t.enter("tableRow"),M(O)}function M(O){return O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),M):O===null||Qe(O)?(t.exit("tableRow"),e(O)):xt(O)?kt(t,M,"whitespace")(O):(t.enter("data"),T(O))}function T(O){return O===null||O===124||Ft(O)?(t.exit("data"),M(O)):(t.consume(O),O===92?j:T)}function j(O){return O===92||O===124?(t.consume(O),T):T(O)}}function $P(t,e){let n=-1,i=!0,o=0,l=[0,0,0,0],d=[0,0,0,0],a=!1,u=0,f,p,h;const y=new zP;for(;++n<t.length;){const S=t[n],C=S[1];S[0]==="enter"?C.type==="tableHead"?(a=!1,u!==0&&(Sx(y,e,u,f,p),p=void 0,u=0),f={type:"table",start:Object.assign({},C.start),end:Object.assign({},C.end)},y.add(n,0,[["enter",f,e]])):C.type==="tableRow"||C.type==="tableDelimiterRow"?(i=!0,h=void 0,l=[0,0,0,0],d=[0,n+1,0,0],a&&(a=!1,p={type:"tableBody",start:Object.assign({},C.start),end:Object.assign({},C.end)},y.add(n,0,[["enter",p,e]])),o=C.type==="tableDelimiterRow"?2:p?3:1):o&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")?(i=!1,d[2]===0&&(l[1]!==0&&(d[0]=d[1],h=mf(y,e,l,o,void 0,h),l=[0,0,0,0]),d[2]=n)):C.type==="tableCellDivider"&&(i?i=!1:(l[1]!==0&&(d[0]=d[1],h=mf(y,e,l,o,void 0,h)),l=d,d=[l[1],n,0,0])):C.type==="tableHead"?(a=!0,u=n):C.type==="tableRow"||C.type==="tableDelimiterRow"?(u=n,l[1]!==0?(d[0]=d[1],h=mf(y,e,l,o,n,h)):d[1]!==0&&(h=mf(y,e,d,o,n,h)),o=0):o&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")&&(d[3]=n)}for(u!==0&&Sx(y,e,u,f,p),y.consume(e.events),n=-1;++n<e.events.length;){const S=e.events[n];S[0]==="enter"&&S[1].type==="table"&&(S[1]._align=FP(e.events,n))}return t}function mf(t,e,n,i,o,l){const d=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(l.end=Object.assign({},El(e.events,n[0])),t.add(n[0],0,[["exit",l,e]]));const u=El(e.events,n[1]);if(l={type:d,start:Object.assign({},u),end:Object.assign({},u)},t.add(n[1],0,[["enter",l,e]]),n[2]!==0){const f=El(e.events,n[2]),p=El(e.events,n[3]),h={type:a,start:Object.assign({},f),end:Object.assign({},p)};if(t.add(n[2],0,[["enter",h,e]]),i!==2){const y=e.events[n[2]],S=e.events[n[3]];if(y[1].end=Object.assign({},S[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const C=n[2]+1,w=n[3]-n[2]-1;t.add(C,w,[])}}t.add(n[3]+1,0,[["exit",h,e]])}return o!==void 0&&(l.end=Object.assign({},El(e.events,o)),t.add(o,0,[["exit",l,e]]),l=void 0),l}function Sx(t,e,n,i,o){const l=[],d=El(e.events,n);o&&(o.end=Object.assign({},d),l.push(["exit",o,e])),i.end=Object.assign({},d),l.push(["exit",i,e]),t.add(n+1,0,l)}function El(t,e){const n=t[e],i=n[0]==="enter"?"start":"end";return n[1][i]}const qP={name:"tasklistCheck",tokenize:GP};function VP(){return{text:{91:qP}}}function GP(t,e,n){const i=this;return o;function o(u){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(u):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(u),t.exit("taskListCheckMarker"),l)}function l(u){return Ft(u)?(t.enter("taskListCheckValueUnchecked"),t.consume(u),t.exit("taskListCheckValueUnchecked"),d):u===88||u===120?(t.enter("taskListCheckValueChecked"),t.consume(u),t.exit("taskListCheckValueChecked"),d):n(u)}function d(u){return u===93?(t.enter("taskListCheckMarker"),t.consume(u),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),a):n(u)}function a(u){return Qe(u)?e(u):xt(u)?t.check({tokenize:WP},e,n)(u):n(u)}}function WP(t,e,n){return kt(t,i,"whitespace");function i(o){return o===null?n(o):e(o)}}function KP(t){return QC([yP(),RP(),BP(t),HP(),VP()])}const YP={};function XP(t){const e=this,n=t||YP,i=e.data(),o=i.micromarkExtensions||(i.micromarkExtensions=[]),l=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),d=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);o.push(KP(n)),l.push(mP()),d.push(gP(n))}function ZP(t){const e=me.c(11),{children:n,className:i,inverted:o}=t,l=o===void 0?!1:o;let d;e[0]!==i?(d=ke("visualization-container markdown-render overflow-x-auto wrap-break-words break",i),e[0]=i,e[1]=d):d=e[1];let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=[XP],e[2]=a):a=e[2];let u;e[3]!==l?(u={code(h){const{className:y,children:S,...C}=h,w=/language-(\w+)/.exec(y||""),_=w?w[1]:"",v=!_,b=Array.isArray(S)?S.join(""):String(S);return!v&&_?g.jsx("div",{className:"w-full max-w-full overflow-x-auto my-2 min-w-0",children:g.jsx(Wv,{theme:l?Au.nightOwl:Au.oneDark,code:b.trim(),language:_,children:QP})}):g.jsx("code",{className:ke("px-1.5 py-0.5 rounded text-sm font-mono",l?"bg-primary-foreground/20 text-primary-foreground":"bg-muted",y),...C,children:S})},a(h){const{href:y,children:S,...C}=h;return g.jsx("a",{href:y,target:"_blank",rel:"noopener noreferrer",className:ke("underline underline-offset-2 transition-colors",l?"text-primary-foreground/80 hover:text-primary-foreground":"text-primary hover:text-primary/80"),...C,children:S})},p(h){const{children:y}=h;return g.jsx("p",{className:"last:mb-0 leading-relaxed wrap-break-words",children:y})},ul(h){const{children:y}=h;return g.jsx("ul",{className:"list-outside list-disc pl-8",children:y})},ol(h){const{children:y}=h;return g.jsx("ol",{className:"list-outside list-decimal pl-8",children:y})},li(h){const{children:y,className:S}=h,C=S==null?void 0:S.includes("nested");return g.jsx("li",{className:ke("leading-snug",C&&"ml-8"),children:y})},h1(h){const{children:y}=h;return g.jsx("h1",{className:"text-lg font-semibold mb-1.5 mt-3 first:mt-0",children:y})},h2(h){const{children:y}=h;return g.jsx("h2",{className:"text-base font-semibold mb-1.5 mt-2.5 first:mt-0",children:y})},h3(h){const{children:y}=h;return g.jsx("h3",{className:"text-sm font-semibold mb-1 mt-2 first:mt-0",children:y})},blockquote(h){const{children:y}=h;return g.jsx("blockquote",{className:ke("border-l-2 pl-3 my-1.5 italic",l?"border-primary-foreground/40 text-primary-foreground/70":"border-muted-foreground/40 text-muted-foreground"),children:y})},strong(h){const{children:y}=h;return g.jsx("strong",{className:ke("font-semibold",l&&"text-primary-foreground"),children:y})},em(h){const{children:y}=h;return g.jsx("em",{className:"italic",children:y})},hr(){return g.jsx("hr",{className:ke("my-3",l?"border-primary-foreground/30":"border-border")})},table(h){const{children:y}=h;return g.jsx("div",{className:"my-2 overflow-x-auto max-w-full",children:g.jsx("table",{className:"w-full border-collapse text-sm",children:y})})},th(h){const{children:y}=h;return g.jsx("th",{className:ke("border border-border px-2 py-1.5 text-left font-semibold",l?"bg-primary-foreground/10 text-primary-foreground":"bg-muted"),children:y})},td(h){const{children:y}=h;return g.jsx("td",{className:ke("border px-2 py-1.5",l?"border-primary-foreground/20":"border-border"),children:y})}},e[3]=l,e[4]=u):u=e[4];let f;e[5]!==n||e[6]!==u?(f=g.jsx(BB,{remarkPlugins:a,components:u,children:n}),e[5]=n,e[6]=u,e[7]=f):f=e[7];let p;return e[8]!==d||e[9]!==f?(p=g.jsx("div",{className:d,children:f}),e[8]=d,e[9]=f,e[10]=p):p=e[10],p}function QP(t){const{className:e,style:n,tokens:i,getLineProps:o,getTokenProps:l}=t;return g.jsx("pre",{className:ke("rounded-lg text-sm p-3",e),style:n,children:i.map((d,a)=>g.jsx("div",{...o({line:d}),children:d.map((u,f)=>g.jsx("span",{...l({token:u})},f))},a))})}function wx(t){return t.filter(e=>e.type==="text").map(e=>e.text).join("")}function JP(t,e){const n=e.findIndex(i=>i.message.id===t);if(n<=0)return null;for(let i=n-1;i>=0;i--){const o=e[i];if(o.message.role==="assistant"&&o.message.status!=="streaming")return o.message.id}return null}function eF(t,e){const n=t.map(d=>({message:d.message,parts:d.parts,isQueued:!1})),i=e.map(d=>({message:{id:d.id,role:"user",sessionId:d.sessionId,createdAt:d.createdAt},parts:[{id:`${d.id}-part`,messageId:d.id,createdAt:d.createdAt,type:"text",text:d.content}],isQueued:!0,queueId:d.id})),o=[...n].sort((d,a)=>d.message.createdAt-a.message.createdAt),l=[...i].sort((d,a)=>d.message.createdAt-a.message.createdAt);return[...o,...l]}function tF(){const t=me.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=g.jsxs("div",{className:"mx-4 mt-4 flex items-center gap-2 text-sm text-muted-foreground bg-muted/50 rounded-lg px-3 py-2 border border-border",children:[g.jsx(Bx,{className:"size-4 animate-pulse"}),g.jsx("span",{children:"Compacting conversation..."})]}),t[0]=e):e=t[0],e}function nF(){const t=me.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=g.jsxs("div",{className:"mx-4 mt-4 flex items-center gap-2 text-sm text-green-600 dark:text-green-400 bg-green-500/10 rounded-lg px-3 py-2 border border-green-500/20",children:[g.jsx(WE,{className:"size-4"}),g.jsx("span",{children:"Compaction complete"})]}),t[0]=e):e=t[0],e}function rF(t){const e=me.c(8),{message:n,textContent:i,onRetry:o}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=g.jsxs("div",{className:"flex items-center gap-1.5 text-xs uppercase tracking-wide text-destructive ml-3",children:[g.jsx(bu,{className:"size-3"}),"Compaction Failed"]}),e[0]=l):l=e[0];const d=i||n.error||"Compaction failed. The conversation could not be summarized.";let a;e[1]!==d?(a=g.jsx("p",{className:"text-sm text-destructive/90",children:d}),e[1]=d,e[2]=a):a=e[2];let u;e[3]!==o?(u=o&&g.jsxs(Pe,{variant:"outline",size:"sm",onClick:o,className:"mt-2 h-7 text-xs gap-1.5",children:[g.jsx(Px,{className:"size-3"}),"Retry"]}),e[3]=o,e[4]=u):u=e[4];let f;return e[5]!==a||e[6]!==u?(f=g.jsxs("div",{className:"flex flex-col gap-1 mb-4 animate-slide-up min-w-0",children:[l,g.jsxs("div",{className:"rounded-2xl px-4 py-3 max-w-full bg-destructive/10 border border-destructive/30 rounded-bl-md",children:[a,u]})]}),e[5]=a,e[6]=u,e[7]=f):f=e[7],f}function iF(t){const e=me.c(15),{part:n}=t,[i,o]=D.useState(!1),l=n.overflow?"overflow":n.auto?"auto":"manual";let d;e[0]!==i?(d=()=>o(!i),e[0]=i,e[1]=d):d=e[1];let a;e[2]!==i?(a=i?g.jsx($l,{className:"size-3"}):g.jsx(si,{className:"size-3"}),e[2]=i,e[3]=a):a=e[3];const u=l==="overflow"?"Context overflow":l==="auto"?"Auto":"Manual";let f;e[4]!==u?(f=g.jsxs("span",{className:"border-b border-dashed border-muted-foreground/40 pb-px",children:[u," compaction"]}),e[4]=u,e[5]=f):f=e[5];let p;e[6]!==d||e[7]!==a||e[8]!==f?(p=g.jsxs("button",{onClick:d,className:"flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors cursor-pointer",children:[a,f]}),e[6]=d,e[7]=a,e[8]=f,e[9]=p):p=e[9];let h;e[10]!==i?(h=i&&g.jsx("div",{className:"mt-2 text-xs text-muted-foreground italic",children:"Summary available in the assistant message below"}),e[10]=i,e[11]=h):h=e[11];let y;return e[12]!==p||e[13]!==h?(y=g.jsxs("div",{className:"flex flex-col items-center my-4",children:[p,h]}),e[12]=p,e[13]=h,e[14]=y):y=e[14],y}function sF(t){const e=me.c(13),{parts:n,pendingPermissions:i,onPermissionResponse:o,onNavigateToSubagent:l,inverted:d}=t,a=d===void 0?!1:d;let u;if(e[0]!==a||e[1]!==l||e[2]!==o||e[3]!==n||e[4]!==i){const p=[...n].sort(oF);let h;e[6]!==a||e[7]!==l||e[8]!==o||e[9]!==i?(h=y=>{switch(y.type){case"text":return g.jsx("div",{className:"min-w-0",children:g.jsx(ZP,{inverted:a,children:y.text||"..."})},y.id);case"reasoning":return g.jsx("div",{className:"visualization-container text-muted-foreground text-sm italic border-l-2 border-muted-foreground/30 pl-3 my-2 wrap-break-word",children:y.text},y.id);case"tool":return g.jsx(gL,{part:y,pendingPermissions:i,onPermissionResponse:o,onNavigateToSubagent:l},y.id);case"image":return g.jsx("img",{src:y.url,alt:"",className:"max-w-full rounded-lg mt-2"},y.id);case"file":return g.jsx("div",{className:"mt-2 p-2 bg-muted rounded text-sm",children:y.filename||"unnamed"},y.id);default:return null}},e[6]=a,e[7]=l,e[8]=o,e[9]=i,e[10]=h):h=e[10],u=p.map(h),e[0]=a,e[1]=l,e[2]=o,e[3]=n,e[4]=i,e[5]=u}else u=e[5];let f;return e[11]!==u?(f=g.jsx(g.Fragment,{children:u}),e[11]=u,e[12]=f):f=e[12],f}function oF(t,e){return t.createdAt-e.createdAt}function aF(t){const e=me.c(70),{session:n,messagesWithParts:i,queuedMessages:o,preconfigs:l,prompts:d,models:a,connectedProviderIds:u,connectableProviderIds:f,defaultModel:p,onSendMessage:h,onRemoveFromQueue:y,onChangePreconfig:S,onChangeModel:C,onChangeVariant:w,pendingPermissions:_,onPermissionResponse:v,onRename:b,usage:x,modelName:E,onNavigateToSubagent:N,onNavigateBack:A,isStreaming:M,onInterrupt:T,onRevert:j,onFork:O,onCompact:F,isCompacting:U,compactionSuccess:$,onClearCompactionSuccess:G,serverUrl:K,apiToken:V,selectedVariant:X,variants:Z,inputRef:I}=t,B=!n.parentId&&n.status==="active";let H,P;e[0]!==$||e[1]!==G?(H=()=>{if($){const Se=setTimeout(()=>{G==null||G()},3e3);return()=>clearTimeout(Se)}},P=[$,G],e[0]=$,e[1]=G,e[2]=H,e[3]=P):(H=e[2],P=e[3]),D.useEffect(H,P);const ee=D.useRef(null),[ne,Q]=D.useState(!0),W=eF(i,o);let q;e[4]===Symbol.for("react.memo_cache_sentinel")?(q=()=>{Q(!0),ee.current&&(ee.current.scrollTop=ee.current.scrollHeight)},e[4]=q):q=e[4];let J;e[5]!==n.id?(J=[n.id],e[5]=n.id,e[6]=J):J=e[6],D.useEffect(q,J);let ie;e[7]!==ne?(ie=()=>{ee.current&&ne&&(ee.current.scrollTop=ee.current.scrollHeight)},e[7]=ne,e[8]=ie):ie=e[8];let ce;e[9]!==ne||e[10]!==i?(ce=[i,ne],e[9]=ne,e[10]=i,e[11]=ce):ce=e[11],D.useEffect(ie,ce);let ae,_e;e[12]===Symbol.for("react.memo_cache_sentinel")?(ae=()=>{const Se=ee.current;if(!Se)return;const Ze=()=>{const{scrollHeight:Ie,scrollTop:ot,clientHeight:Ce}=Se,Ve=Ie-ot-Ce;Q(Ve<150)};return Se.addEventListener("scroll",Ze,{passive:!0}),()=>Se.removeEventListener("scroll",Ze)},_e=[],e[12]=ae,e[13]=_e):(ae=e[12],_e=e[13]),D.useEffect(ae,_e);let Ee;e[14]!==i||e[15]!==n.id?(Ee=Se=>Se.sessionId!==n.id?!1:!i.some(Ze=>Ze.parts.some(Ie=>Ie.type==="tool"&&Ie.callId===Se.toolCallId)),e[14]=i,e[15]=n.id,e[16]=Ee):Ee=e[16];const Te=_.filter(Ee),Be="flex flex-col flex-1 min-h-0",se=i.length>=4;let Ye;e[17]!==f||e[18]!==u||e[19]!==p||e[20]!==U||e[21]!==M||e[22]!==E||e[23]!==a||e[24]!==C||e[25]!==S||e[26]!==w||e[27]!==F||e[28]!==T||e[29]!==A||e[30]!==b||e[31]!==l||e[32]!==X||e[33]!==n||e[34]!==se||e[35]!==x||e[36]!==Z?(Ye=g.jsx(U8,{session:n,preconfigs:l,models:a,defaultModel:p,usage:x,modelName:E,onChangePreconfig:S,onChangeModel:C,onChangeVariant:w,onRename:b,onNavigateBack:A,isStreaming:M,onInterrupt:T,onCompact:F,isCompacting:U,canCompact:se,connectedProviderIds:u,connectableProviderIds:f,selectedVariant:X,variants:Z}),e[17]=f,e[18]=u,e[19]=p,e[20]=U,e[21]=M,e[22]=E,e[23]=a,e[24]=C,e[25]=S,e[26]=w,e[27]=F,e[28]=T,e[29]=A,e[30]=b,e[31]=l,e[32]=X,e[33]=n,e[34]=se,e[35]=x,e[36]=Z,e[37]=Ye):Ye=e[37];let rt;e[38]!==U?(rt=U&&g.jsx(tF,{}),e[38]=U,e[39]=rt):rt=e[39];let nt;e[40]!==$?(nt=$&&g.jsx(nF,{}),e[40]=$,e[41]=nt):nt=e[41];let Ge;e[42]!==n.status?(Ge=n.status==="closed"&&g.jsx(bf,{className:"mx-4 mt-4",children:g.jsx(xf,{children:"This session is archived. You can reopen it from the sidebar."})}),e[42]=n.status,e[43]=Ge):Ge=e[43];const gt=nc,it="flex-1 min-h-0",Je="p-4",at=W.length===0?g.jsxs("div",{className:"text-center py-16 text-muted-foreground",children:[g.jsx("p",{className:"text-lg mb-2",children:"Start a conversation"}),g.jsx("p",{className:"text-sm",children:"Send a message below to begin."})]}):W.map(Se=>{const Ze=Se.parts.find(lF);if(C8(Se.message)&&Se.message.mode==="compact_failed")return g.jsx(rF,{message:Se.message,textContent:wx(Se.parts),onRetry:B&&!U?F:void 0},Se.message.id);if(Ze)return g.jsx(iF,{part:Ze},Se.message.id);const ot=!Se.isQueued&&Se.message.role==="user",Ce=ot?JP(Se.message.id,i):null;return g.jsx($8,{message:Se.message,textContent:wx(Se.parts),isQueued:Se.isQueued,onRemove:Se.isQueued?()=>y(Se.queueId):void 0,canRevert:ot&&Ce!==null,onRevert:Ce?()=>j==null?void 0:j(n.id,Ce):void 0,canFork:ot&&Ce!==null,onFork:Ce?()=>O==null?void 0:O(n.id,Se.message.id):void 0,children:Se.parts.length===0?g.jsx("span",{className:"opacity-50",children:"..."}):g.jsx(sF,{parts:Se.parts,pendingPermissions:_,onPermissionResponse:v,onNavigateToSubagent:N,inverted:Se.message.role==="user"})},Se.message.id)}),fe=Te.length>0&&g.jsx("div",{className:"mt-4 flex flex-col gap-2",children:Te.map(Se=>{var Ie;const Ze=typeof((Ie=Se.args)==null?void 0:Ie.command)=="string"?Se.args.command:JSON.stringify(Se.args,null,2);return g.jsxs("div",{className:"p-3 bg-warning/10 border border-warning/30 rounded-lg flex flex-col gap-2",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-sm font-medium",children:Se.toolName}),g.jsx("span",{className:"text-xs text-muted-foreground",children:Se.permissionType})]}),g.jsx("p",{className:"text-sm",children:Se.message}),g.jsxs(So,{children:[g.jsx(wo,{asChild:!0,children:g.jsxs("button",{className:"flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors w-full text-left",children:[g.jsx(si,{className:"size-3"}),g.jsx("span",{className:"uppercase tracking-wide",children:"Command"})]})}),g.jsx(Co,{children:g.jsx("pre",{className:"text-xs bg-background border rounded-md p-2 mt-1 overflow-x-auto whitespace-pre-wrap break-words",children:Ze})})]}),g.jsxs("div",{className:"flex justify-end gap-2",children:[g.jsx(Pe,{variant:"outline",size:"sm",onClick:()=>v(Se.toolCallId,!1,!1),children:"Deny"}),g.jsx(Pe,{size:"sm",onClick:()=>v(Se.toolCallId,!0,!1),children:"Approve"})]})]},Se.toolCallId)})});let ge;e[44]!==at||e[45]!==fe?(ge=g.jsxs("div",{className:Je,children:[at,fe]}),e[44]=at,e[45]=fe,e[46]=ge):ge=e[46];let Ae;e[47]!==gt||e[48]!==ge?(Ae=g.jsx(gt,{className:it,ref:ee,children:ge}),e[47]=gt,e[48]=ge,e[49]=Ae):Ae=e[49];let Me;e[50]!==V||e[51]!==I||e[52]!==U||e[53]!==h||e[54]!==d||e[55]!==K||e[56]!==n.parentId||e[57]!==n.status||e[58]!==n.workspaceId?(Me=n.status==="active"&&!n.parentId&&g.jsx(SL,{ref:I,onSendMessage:h,disabled:U,workspaceId:n.workspaceId,serverUrl:K,apiToken:V,prompts:d}),e[50]=V,e[51]=I,e[52]=U,e[53]=h,e[54]=d,e[55]=K,e[56]=n.parentId,e[57]=n.status,e[58]=n.workspaceId,e[59]=Me):Me=e[59];let Le;e[60]!==n.parentId?(Le=n.parentId&&g.jsxs("div",{className:"p-4 border-t border-border bg-muted/50 text-center flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[g.jsx(A4,{className:"size-4"}),"This is a subagent session (read-only)"]}),e[60]=n.parentId,e[61]=Le):Le=e[61];let st;return e[62]!==Ye||e[63]!==rt||e[64]!==nt||e[65]!==Ge||e[66]!==Ae||e[67]!==Me||e[68]!==Le?(st=g.jsxs("div",{className:Be,children:[Ye,rt,nt,Ge,Ae,Me,Le]}),e[62]=Ye,e[63]=rt,e[64]=nt,e[65]=Ge,e[66]=Ae,e[67]=Me,e[68]=Le,e[69]=st):st=e[69],st}function lF(t){return t.type==="compaction"}function cF(t){const e=me.c(10);let n,i,o;e[0]!==t?({className:n,orientation:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);const l=o===void 0?"horizontal":o;let d;e[4]!==n?(d=ke("group/tabs flex gap-2 data-horizontal:flex-col",n),e[4]=n,e[5]=d):d=e[5];let a;return e[6]!==l||e[7]!==i||e[8]!==d?(a=g.jsx(CD,{"data-slot":"tabs","data-orientation":l,className:d,...i}),e[6]=l,e[7]=i,e[8]=d,e[9]=a):a=e[9],a}const uF=Gl("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function dF(t){const e=me.c(11);let n,i,o;e[0]!==t?({className:n,variant:o,...i}=t,e[0]=t,e[1]=n,e[2]=i,e[3]=o):(n=e[1],i=e[2],o=e[3]);const l=o===void 0?"default":o;let d;e[4]!==n||e[5]!==l?(d=ke(uF({variant:l}),n),e[4]=n,e[5]=l,e[6]=d):d=e[6];let a;return e[7]!==i||e[8]!==d||e[9]!==l?(a=g.jsx(kD,{"data-slot":"tabs-list","data-variant":l,className:d,...i}),e[7]=i,e[8]=d,e[9]=l,e[10]=a):a=e[10],a}function uu(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(ED,{"data-slot":"tabs-trigger",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function du(t){const e=me.c(8);let n,i;e[0]!==t?({className:n,...i}=t,e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);let o;e[3]!==n?(o=ke("flex-1 text-sm outline-none",n),e[3]=n,e[4]=o):o=e[4];let l;return e[5]!==i||e[6]!==o?(l=g.jsx(AD,{"data-slot":"tabs-content",className:o,...i}),e[5]=i,e[6]=o,e[7]=l):l=e[7],l}function Cx(t){return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function kx(t){const e=me.c(29),{permission:n,onRevoke:i}=t,o=!!n.revokedAt,l=o?"outline":"secondary";let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(Hx,{className:"size-3","data-icon":"inline-start"}),e[0]=d):d=e[0];let a;e[1]!==n.permissionType||e[2]!==l?(a=g.jsxs(Bn,{variant:l,children:[d,n.permissionType]}),e[1]=n.permissionType,e[2]=l,e[3]=a):a=e[3];let u;e[4]!==o?(u=o&&g.jsx(Bn,{variant:"outline",className:"text-muted-foreground",children:"Revoked"}),e[4]=o,e[5]=u):u=e[5];let f;e[6]!==a||e[7]!==u?(f=g.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[a,u]}),e[6]=a,e[7]=u,e[8]=f):f=e[8];let p;e[9]!==n.permissionKey?(p=g.jsx("p",{className:"text-sm font-mono truncate text-muted-foreground",children:n.permissionKey}),e[9]=n.permissionKey,e[10]=p):p=e[10];let h;e[11]!==n.grantedAt?(h=Cx(n.grantedAt),e[11]=n.grantedAt,e[12]=h):h=e[12];let y;e[13]!==n.revokedAt?(y=n.revokedAt&&` • Revoked ${Cx(n.revokedAt)}`,e[13]=n.revokedAt,e[14]=y):y=e[14];let S;e[15]!==h||e[16]!==y?(S=g.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Granted ",h,y]}),e[15]=h,e[16]=y,e[17]=S):S=e[17];let C;e[18]!==f||e[19]!==p||e[20]!==S?(C=g.jsxs("div",{className:"flex-1 min-w-0",children:[f,p,S]}),e[18]=f,e[19]=p,e[20]=S,e[21]=C):C=e[21];let w;e[22]!==o||e[23]!==i||e[24]!==n.id?(w=!o&&g.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>i(n.id),className:"size-8 text-destructive hover:text-destructive",children:g.jsx(Du,{className:"size-4"})}),e[22]=o,e[23]=i,e[24]=n.id,e[25]=w):w=e[25];let _;return e[26]!==C||e[27]!==w?(_=g.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border last:border-0",children:[C,w]}),e[26]=C,e[27]=w,e[28]=_):_=e[28],_}function fF(t){const e=me.c(30),{open:n,onOpenChange:i,title:o,description:l,confirmLabel:d,cancelLabel:a,variant:u,onConfirm:f,onCancel:p}=t,h=d===void 0?"Confirm":d,y=a===void 0?"Cancel":a,S=u===void 0?"default":u;let C;e[0]!==p||e[1]!==i?(C=()=>{p==null||p(),i(!1)},e[0]=p,e[1]=i,e[2]=C):C=e[2];const w=C;let _;e[3]!==f||e[4]!==i?(_=()=>{f(),i(!1)},e[3]=f,e[4]=i,e[5]=_):_=e[5];const v=_;let b;e[6]!==o?(b=g.jsx(tc,{children:o}),e[6]=o,e[7]=b):b=e[7];let x;e[8]!==l?(x=g.jsx(Vu,{children:l}),e[8]=l,e[9]=x):x=e[9];let E;e[10]!==b||e[11]!==x?(E=g.jsxs(ec,{children:[b,x]}),e[10]=b,e[11]=x,e[12]=E):E=e[12];let N;e[13]!==y||e[14]!==w?(N=g.jsx(Pe,{variant:"outline",onClick:w,children:y}),e[13]=y,e[14]=w,e[15]=N):N=e[15];const A=S==="destructive"?"destructive":"default";let M;e[16]!==h||e[17]!==v||e[18]!==A?(M=g.jsx(Pe,{variant:A,onClick:v,children:h}),e[16]=h,e[17]=v,e[18]=A,e[19]=M):M=e[19];let T;e[20]!==M||e[21]!==N?(T=g.jsxs(bh,{children:[N,M]}),e[20]=M,e[21]=N,e[22]=T):T=e[22];let j;e[23]!==T||e[24]!==E?(j=g.jsxs(Jl,{className:"sm:max-w-[425px]",children:[E,T]}),e[23]=T,e[24]=E,e[25]=j):j=e[25];let O;return e[26]!==i||e[27]!==n||e[28]!==j?(O=g.jsx(Ql,{open:n,onOpenChange:i,children:j}),e[26]=i,e[27]=n,e[28]=j,e[29]=O):O=e[29],O}function hF(t){const e=me.c(48),{provider:n,onConnect:i,onDisconnect:o}=t,[l,d]=D.useState(!1);let a,u;e[0]!==n.connected||e[1]!==n.error?(a=()=>{(n.error||n.connected)&&d(!1)},u=[n.error,n.connected],e[0]=n.connected,e[1]=n.error,e[2]=a,e[3]=u):(a=e[2],u=e[3]),D.useEffect(a,u);let f,p;e[4]!==n.authorizationUrl?(f=()=>{n.authorizationUrl&&d(!1)},p=[n.authorizationUrl],e[4]=n.authorizationUrl,e[5]=f,e[6]=p):(f=e[5],p=e[6]),D.useEffect(f,p);let h;e[7]!==i?(h=()=>{d(!0),i()},e[7]=i,e[8]=h):h=e[8];const y=h;let S;e[9]!==o?(S=()=>{o()},e[9]=o,e[10]=S):S=e[10];const C=S,w=`size-2 rounded-full ${n.connected?"bg-green-500":"bg-muted-foreground"}`;let _;e[11]!==w?(_=g.jsx("div",{className:w}),e[11]=w,e[12]=_):_=e[12];const v=n.displayName||n.provider;let b;e[13]!==v?(b=g.jsx("span",{className:"text-sm font-medium",children:v}),e[13]=v,e[14]=b):b=e[14];let x;e[15]!==b||e[16]!==_?(x=g.jsxs("div",{className:"flex items-center gap-2",children:[_,b]}),e[15]=b,e[16]=_,e[17]=x):x=e[17];let E;e[18]!==n.connected?(E=n.connected&&g.jsx("span",{className:"text-xs text-muted-foreground",children:"Connected"}),e[18]=n.connected,e[19]=E):E=e[19];let N;e[20]!==x||e[21]!==E?(N=g.jsxs("div",{className:"flex items-center justify-between",children:[x,E]}),e[20]=x,e[21]=E,e[22]=N):N=e[22];let A;e[23]!==n.error?(A=n.error&&g.jsx("p",{className:"text-xs text-destructive",children:n.error}),e[23]=n.error,e[24]=A):A=e[24];let M;e[25]!==n.connected||e[26]!==n.connectedAt?(M=n.connected&&n.connectedAt&&g.jsxs("p",{className:"text-xs text-muted-foreground",children:["Connected ",new Date(n.connectedAt).toLocaleDateString()]}),e[25]=n.connected,e[26]=n.connectedAt,e[27]=M):M=e[27];let T;e[28]!==y||e[29]!==l||e[30]!==n.authorizationUrl||e[31]!==n.connected?(T=!n.connected&&!n.authorizationUrl&&g.jsxs(Pe,{size:"sm",onClick:y,disabled:l,children:[l?g.jsx(gr,{className:"size-3 animate-spin","data-icon":"inline-start"}):null,"Connect"]}),e[28]=y,e[29]=l,e[30]=n.authorizationUrl,e[31]=n.connected,e[32]=T):T=e[32];let j;e[33]!==n.authorizationUrl||e[34]!==n.connected?(j=!n.connected&&n.authorizationUrl&&g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx("a",{href:n.authorizationUrl,target:"_blank",rel:"noopener noreferrer",className:"font-mono text-xs text-blue-500 underline break-all",children:n.authorizationUrl}),g.jsxs(Pe,{variant:"outline",size:"sm",onClick:async()=>{try{await navigator.clipboard.writeText(n.authorizationUrl)}catch{}},children:[g.jsx(yu,{className:"size-3","data-icon":"inline-start"}),"Copy URL"]})]}),e[33]=n.authorizationUrl,e[34]=n.connected,e[35]=j):j=e[35];let O;e[36]!==C||e[37]!==n.connected?(O=n.connected&&g.jsxs(Pe,{variant:"destructive",size:"sm",onClick:C,children:[g.jsx(u5,{className:"size-3","data-icon":"inline-start"}),"Disconnect"]}),e[36]=C,e[37]=n.connected,e[38]=O):O=e[38];let F;e[39]!==T||e[40]!==j||e[41]!==O?(F=g.jsxs("div",{className:"flex gap-2",children:[T,j,O]}),e[39]=T,e[40]=j,e[41]=O,e[42]=F):F=e[42];let U;return e[43]!==N||e[44]!==A||e[45]!==M||e[46]!==F?(U=g.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-border p-4",children:[N,A,M,F]}),e[43]=N,e[44]=A,e[45]=M,e[46]=F,e[47]=U):U=e[47],U}function pF(t){const e=me.c(10),{token:n,onLogout:i}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx("span",{className:"text-muted-foreground",children:"Token:"}),e[0]=o):o=e[0];let l;e[1]!==n?(l=T5(n),e[1]=n,e[2]=l):l=e[2];let d;e[3]!==l?(d=g.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[o,g.jsx("code",{className:"font-mono text-foreground bg-background px-1.5 py-0.5 rounded text-[10px]",children:l})]}),e[3]=l,e[4]=d):d=e[4];let a;e[5]!==i?(a=g.jsx(Pe,{variant:"destructive",size:"sm",onClick:i,title:"Disconnect and clear token",children:"Logout"}),e[5]=i,e[6]=a):a=e[6];let u;return e[7]!==d||e[8]!==a?(u=g.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-md bg-muted",children:[d,a]}),e[7]=d,e[8]=a,e[9]=u):u=e[9],u}const mF={neutral:{label:"Neutral",colors:["bg-zinc-400","bg-zinc-600","bg-zinc-800"]},ocean:{label:"Ocean",colors:["bg-sky-300","bg-sky-500","bg-slate-700"]},forest:{label:"Forest",colors:["bg-emerald-300","bg-emerald-500","bg-green-800"]},sunset:{label:"Sunset",colors:["bg-orange-300","bg-amber-500","bg-orange-800"]},amethyst:{label:"Amethyst",colors:["bg-violet-300","bg-violet-500","bg-purple-800"]}};function fu(t){const e=me.c(15),{scheme:n,currentScheme:i,onClick:o}=t,l=n===i,d=mF[n];let a;e[0]!==o||e[1]!==n?(a=()=>o(n),e[0]=o,e[1]=n,e[2]=a):a=e[2];const u=`
543
+ flex flex-col items-center gap-1.5 p-2 rounded-lg border transition-all
544
+ ${l?"border-primary bg-primary/5":"border-border bg-transparent hover:bg-muted/50"}
545
+ `,f=d.label;let p;e[3]!==d.colors?(p=d.colors.map(gF),e[3]=d.colors,e[4]=p):p=e[4];let h;e[5]!==p?(h=g.jsx("div",{className:"flex gap-0.5",children:p}),e[5]=p,e[6]=h):h=e[6];let y;e[7]!==n?(y=g.jsx("span",{className:"text-[10px] text-muted-foreground capitalize",children:n}),e[7]=n,e[8]=y):y=e[8];let S;return e[9]!==d.label||e[10]!==a||e[11]!==u||e[12]!==h||e[13]!==y?(S=g.jsxs("button",{type:"button",onClick:a,className:u,title:f,children:[h,y]}),e[9]=d.label,e[10]=a,e[11]=u,e[12]=h,e[13]=y,e[14]=S):S=e[14],S}function gF(t,e){return g.jsx("div",{className:`w-4 h-4 rounded-full ${t}`},e)}function vF(t){var ce;const e=me.c(184),{open:n,onOpenChange:i,permissions:o,onRefreshPermissions:l,onRevokePermission:d,onRevokeAllPermissions:a,apiToken:u,onLogout:f,providerStatuses:p,onConnectProvider:h,onDisconnectProvider:y}=t,{mode:S,scheme:C,setMode:w,setScheme:_}=yE(),[v,b]=D.useState(!1),E=((ce=navigator.userAgentData)==null?void 0:ce.platform)==="macOS"||/mac|iphone|ipad|ipod/i.test(navigator.userAgent)?"⌘":"Ctrl";let N,A,M,T,j,O,F,U,$,G,K,V,X,Z,I,L,B,H,P;if(e[0]!==u||e[1]!==S||e[2]!==h||e[3]!==y||e[4]!==f||e[5]!==i||e[6]!==l||e[7]!==d||e[8]!==n||e[9]!==o||e[10]!==p||e[11]!==C||e[12]!==w||e[13]!==_){const ae=[{keys:[E,"1"],description:"Open session list"},{keys:[E,"T"],description:"Open terminal"},{keys:[E,"O"],description:"Toggle overview mode"},{keys:[E,"N"],description:"New session"},{keys:[E,"Shift","N"],description:"New window"},{keys:["Shift","Esc"],description:"Close focused panel"},{keys:["Shift","Enter"],description:"New line in input"},{keys:["Enter"],description:"Send message"},{keys:["↑","↓","←","→"],description:"Navigate sessions"},{keys:["Esc"],description:"Focus chat input"},{keys:["Esc","Esc"],description:"Stop streaming (chat input focused)"}];let _e,Ee,Te,Be,se,Ye,rt,nt,Ge,gt,it;if(e[33]!==u||e[34]!==S||e[35]!==f||e[36]!==i||e[37]!==l||e[38]!==d||e[39]!==n||e[40]!==o||e[41]!==C||e[42]!==w||e[43]!==_){const Ae=o.filter(bF),Me=o.filter(yF);T=Ql,G=n,K=i,M=Jl,U="sm:max-w-[700px] max-h-[80vh]",e[67]===Symbol.for("react.memo_cache_sentinel")?($=g.jsxs(ec,{children:[g.jsx(tc,{children:"Settings"}),g.jsx(Vu,{children:"Manage your preferences and permissions"})]}),e[67]=$):$=e[67],A=cF,I="account",L="mt-4";let Le;e[68]===Symbol.for("react.memo_cache_sentinel")?(Le=g.jsxs(uu,{value:"account",children:[g.jsx($x,{className:"size-4 sm:size-3","data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:inline",children:"Account"})]}),e[68]=Le):Le=e[68];let st;e[69]===Symbol.for("react.memo_cache_sentinel")?(st=g.jsxs(uu,{value:"appearance",children:[g.jsx(I4,{className:"size-4 sm:size-3","data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:inline",children:"Appearance"})]}),e[69]=st):st=e[69];let Se,Ze;e[70]===Symbol.for("react.memo_cache_sentinel")?(Se=g.jsx(Hx,{className:"size-4 sm:size-3","data-icon":"inline-start"}),Ze=g.jsx("span",{className:"hidden sm:inline",children:"Permissions"}),e[70]=Se,e[71]=Ze):(Se=e[70],Ze=e[71]);const Ie=Ae.length>0&&g.jsx("span",{className:"absolute -top-0.5 -right-0.5 flex size-3.5 items-center justify-center rounded-full bg-primary text-[8px] font-bold leading-none text-primary-foreground sm:static sm:flex sm:size-auto sm:ml-1.5 sm:px-1.5 sm:py-0.5 sm:text-xs sm:font-medium sm:leading-normal",children:Ae.length});let ot;e[72]!==Ie?(ot=g.jsxs(uu,{value:"permissions",children:[Se,Ze,Ie]}),e[72]=Ie,e[73]=ot):ot=e[73];let Ce;e[74]===Symbol.for("react.memo_cache_sentinel")?(Ce=g.jsxs(uu,{value:"providers",children:[g.jsx(C4,{className:"size-4 sm:size-3","data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:inline",children:"Providers"})]}),e[74]=Ce):Ce=e[74];let Ve;e[75]===Symbol.for("react.memo_cache_sentinel")?(Ve=g.jsxs(uu,{value:"keybinds",children:[g.jsx(_4,{className:"size-4 sm:size-3","data-icon":"inline-start"}),g.jsx("span",{className:"hidden sm:inline",children:"Keybinds"})]}),e[75]=Ve):Ve=e[75],e[76]!==ot?(B=g.jsxs(dF,{className:"grid w-full grid-cols-5",children:[Le,st,ot,Ce,Ve]}),e[76]=ot,e[77]=B):B=e[77];let lt,Dt;e[78]===Symbol.for("react.memo_cache_sentinel")?(lt=g.jsx(Ti,{className:"text-sm font-medium",children:"Session"}),Dt=g.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Manage your current session"}),e[78]=lt,e[79]=Dt):(lt=e[78],Dt=e[79]),e[80]!==u||e[81]!==f?(H=g.jsx(du,{value:"account",className:"mt-4",children:g.jsx("div",{className:"flex flex-col gap-4",children:g.jsxs("div",{children:[lt,Dt,u?g.jsx(pF,{token:u,onLogout:f}):g.jsx("p",{className:"text-sm text-muted-foreground",children:"No active session"})]})})}),e[80]=u,e[81]=f,e[82]=H):H=e[82];let Xt,Ot;e[83]===Symbol.for("react.memo_cache_sentinel")?(Xt=g.jsx(Ti,{className:"text-sm font-medium",children:"Mode"}),Ot=g.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Choose light, dark, or system theme"}),e[83]=Xt,e[84]=Ot):(Xt=e[83],Ot=e[84]);const Jt=S==="light"?"default":"outline";let Et;e[85]!==w?(Et=()=>w("light"),e[85]=w,e[86]=Et):Et=e[86];let vn;e[87]===Symbol.for("react.memo_cache_sentinel")?(vn=g.jsx(r5,{className:"size-4","data-icon":"inline-start"}),e[87]=vn):vn=e[87];let Vt;e[88]!==Jt||e[89]!==Et?(Vt=g.jsxs(Pe,{variant:Jt,className:"justify-start",onClick:Et,children:[vn,"Light"]}),e[88]=Jt,e[89]=Et,e[90]=Vt):Vt=e[90];const Do=S==="dark"?"default":"outline";let en;e[91]!==w?(en=()=>w("dark"),e[91]=w,e[92]=en):en=e[92];let kn;e[93]===Symbol.for("react.memo_cache_sentinel")?(kn=g.jsx(O4,{className:"size-4","data-icon":"inline-start"}),e[93]=kn):kn=e[93];let rn;e[94]!==Do||e[95]!==en?(rn=g.jsxs(Pe,{variant:Do,className:"justify-start",onClick:en,children:[kn,"Dark"]}),e[94]=Do,e[95]=en,e[96]=rn):rn=e[96];const qn=S==="system"?"default":"outline";let nr;e[97]!==w?(nr=()=>w("system"),e[97]=w,e[98]=nr):nr=e[98];let rr;e[99]===Symbol.for("react.memo_cache_sentinel")?(rr=g.jsx(M4,{className:"size-4","data-icon":"inline-start"}),e[99]=rr):rr=e[99];let jn;e[100]!==qn||e[101]!==nr?(jn=g.jsxs(Pe,{variant:qn,className:"justify-start",onClick:nr,children:[rr,"System"]}),e[100]=qn,e[101]=nr,e[102]=jn):jn=e[102];let On;e[103]!==Vt||e[104]!==rn||e[105]!==jn?(On=g.jsxs("div",{children:[Xt,Ot,g.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[Vt,rn,jn]})]}),e[103]=Vt,e[104]=rn,e[105]=jn,e[106]=On):On=e[106];let Fn,Ur,$r;e[107]===Symbol.for("react.memo_cache_sentinel")?(Fn=g.jsx(ua,{}),Ur=g.jsx(Ti,{className:"text-sm font-medium",children:"Color Scheme"}),$r=g.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Choose your preferred color palette"}),e[107]=Fn,e[108]=Ur,e[109]=$r):(Fn=e[107],Ur=e[108],$r=e[109]);let sn;e[110]!==C||e[111]!==_?(sn=g.jsxs("div",{children:[Ur,$r,g.jsxs("div",{className:"grid grid-cols-5 gap-2",children:[g.jsx(fu,{scheme:"neutral",currentScheme:C,onClick:_}),g.jsx(fu,{scheme:"ocean",currentScheme:C,onClick:_}),g.jsx(fu,{scheme:"forest",currentScheme:C,onClick:_}),g.jsx(fu,{scheme:"sunset",currentScheme:C,onClick:_}),g.jsx(fu,{scheme:"amethyst",currentScheme:C,onClick:_})]})]}),e[110]=C,e[111]=_,e[112]=sn):sn=e[112],e[113]!==On||e[114]!==sn?(P=g.jsx(du,{value:"appearance",className:"mt-4",children:g.jsxs("div",{className:"flex flex-col gap-4",children:[On,Fn,sn]})}),e[113]=On,e[114]=sn,e[115]=P):P=e[115],Ee=du,gt="permissions",it="mt-4",rt="flex flex-col gap-4";let Ht;e[116]===Symbol.for("react.memo_cache_sentinel")?(Ht=g.jsxs("div",{children:[g.jsx(Ti,{className:"text-sm font-medium",children:"Always-allowed Operations"}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Tools you've approved to run without asking"})]}),e[116]=Ht):Ht=e[116];let Gt;e[117]===Symbol.for("react.memo_cache_sentinel")?(Gt=g.jsx(Tl,{className:"size-4"}),e[117]=Gt):Gt=e[117];let _n;e[118]!==l?(_n=g.jsx(Pe,{variant:"outline",size:"icon",onClick:l,className:"size-8",children:Gt}),e[118]=l,e[119]=_n):_n=e[119];const br=Ae.length>0&&g.jsxs(Pe,{variant:"destructive",size:"sm",onClick:()=>b(!0),children:[g.jsx(Du,{className:"size-4","data-icon":"inline-start"}),"Revoke All"]});e[120]!==_n||e[121]!==br?(nt=g.jsxs("div",{className:"flex items-center justify-between",children:[Ht,g.jsxs("div",{className:"flex gap-2",children:[_n,br]})]}),e[120]=_n,e[121]=br,e[122]=nt):nt=e[122],e[123]===Symbol.for("react.memo_cache_sentinel")?(Ge=g.jsx(ua,{}),e[123]=Ge):Ge=e[123],_e=nc,Te="h-[300px]",Be=Ae.length===0&&Me.length===0&&g.jsxs("div",{className:"text-center py-8 text-muted-foreground text-sm",children:["No permissions granted yet.",g.jsx("br",{}),'Approve tool requests with "Always allow" to add them here.']}),se=Ae.length>0&&g.jsxs("div",{className:"mb-4",children:[g.jsxs("h4",{className:"text-xs uppercase text-muted-foreground mb-2 font-medium",children:["Active (",Ae.length,")"]}),Ae.map(xr=>g.jsx(kx,{permission:xr,onRevoke:d},xr.id))]}),Ye=Me.length>0&&g.jsxs("div",{children:[g.jsxs("h4",{className:"text-xs uppercase text-muted-foreground mb-2 font-medium",children:["Revoked (",Me.length,")"]}),Me.map(xr=>g.jsx(kx,{permission:xr,onRevoke:d},xr.id))]}),e[33]=u,e[34]=S,e[35]=f,e[36]=i,e[37]=l,e[38]=d,e[39]=n,e[40]=o,e[41]=C,e[42]=w,e[43]=_,e[44]=A,e[45]=M,e[46]=T,e[47]=_e,e[48]=Ee,e[49]=U,e[50]=$,e[51]=G,e[52]=K,e[53]=Te,e[54]=Be,e[55]=se,e[56]=Ye,e[57]=rt,e[58]=nt,e[59]=Ge,e[60]=gt,e[61]=it,e[62]=I,e[63]=L,e[64]=B,e[65]=H,e[66]=P}else A=e[44],M=e[45],T=e[46],_e=e[47],Ee=e[48],U=e[49],$=e[50],G=e[51],K=e[52],Te=e[53],Be=e[54],se=e[55],Ye=e[56],rt=e[57],nt=e[58],Ge=e[59],gt=e[60],it=e[61],I=e[62],L=e[63],B=e[64],H=e[65],P=e[66];let Je;e[124]!==_e||e[125]!==Te||e[126]!==Be||e[127]!==se||e[128]!==Ye?(Je=g.jsxs(_e,{className:Te,children:[Be,se,Ye]}),e[124]=_e,e[125]=Te,e[126]=Be,e[127]=se,e[128]=Ye,e[129]=Je):Je=e[129];let at;e[130]!==rt||e[131]!==nt||e[132]!==Ge||e[133]!==Je?(at=g.jsxs("div",{className:rt,children:[nt,Ge,Je]}),e[130]=rt,e[131]=nt,e[132]=Ge,e[133]=Je,e[134]=at):at=e[134],e[135]!==Ee||e[136]!==gt||e[137]!==it||e[138]!==at?(O=g.jsx(Ee,{value:gt,className:it,children:at}),e[135]=Ee,e[136]=gt,e[137]=it,e[138]=at,e[139]=O):O=e[139];let fe;e[140]===Symbol.for("react.memo_cache_sentinel")?(fe=g.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Connect subscription-based providers to use models without API keys."}),e[140]=fe):fe=e[140];let ge;if(e[141]!==h||e[142]!==y||e[143]!==p){let Ae;e[145]!==h||e[146]!==y?(Ae=Me=>g.jsx(hF,{provider:Me,onConnect:()=>h(Me.provider),onDisconnect:()=>y(Me.provider)},Me.provider),e[145]=h,e[146]=y,e[147]=Ae):Ae=e[147],ge=p.map(Ae),e[141]=h,e[142]=y,e[143]=p,e[144]=ge}else ge=e[144];e[148]!==ge?(F=g.jsx(du,{value:"providers",className:"mt-4",children:g.jsx("div",{className:"flex flex-col gap-4",children:g.jsxs("div",{children:[fe,g.jsx("div",{className:"flex flex-col gap-3",children:ge})]})})}),e[148]=ge,e[149]=F):F=e[149],N=du,X="keybinds",Z="mt-4",j="flex flex-col gap-2",V=ae.map(_F),e[0]=u,e[1]=S,e[2]=h,e[3]=y,e[4]=f,e[5]=i,e[6]=l,e[7]=d,e[8]=n,e[9]=o,e[10]=p,e[11]=C,e[12]=w,e[13]=_,e[14]=N,e[15]=A,e[16]=M,e[17]=T,e[18]=j,e[19]=O,e[20]=F,e[21]=U,e[22]=$,e[23]=G,e[24]=K,e[25]=V,e[26]=X,e[27]=Z,e[28]=I,e[29]=L,e[30]=B,e[31]=H,e[32]=P}else N=e[14],A=e[15],M=e[16],T=e[17],j=e[18],O=e[19],F=e[20],U=e[21],$=e[22],G=e[23],K=e[24],V=e[25],X=e[26],Z=e[27],I=e[28],L=e[29],B=e[30],H=e[31],P=e[32];let ee;e[150]!==j||e[151]!==V?(ee=g.jsx("div",{className:j,children:V}),e[150]=j,e[151]=V,e[152]=ee):ee=e[152];let ne;e[153]!==N||e[154]!==ee||e[155]!==X||e[156]!==Z?(ne=g.jsx(N,{value:X,className:Z,children:ee}),e[153]=N,e[154]=ee,e[155]=X,e[156]=Z,e[157]=ne):ne=e[157];let Q;e[158]!==A||e[159]!==O||e[160]!==F||e[161]!==ne||e[162]!==I||e[163]!==L||e[164]!==B||e[165]!==H||e[166]!==P?(Q=g.jsxs(A,{defaultValue:I,className:L,children:[B,H,P,O,F,ne]}),e[158]=A,e[159]=O,e[160]=F,e[161]=ne,e[162]=I,e[163]=L,e[164]=B,e[165]=H,e[166]=P,e[167]=Q):Q=e[167];let W;e[168]!==M||e[169]!==U||e[170]!==$||e[171]!==Q?(W=g.jsxs(M,{className:U,children:[$,Q]}),e[168]=M,e[169]=U,e[170]=$,e[171]=Q,e[172]=W):W=e[172];let q;e[173]!==a?(q=()=>{a(),b(!1)},e[173]=a,e[174]=q):q=e[174];let J;e[175]!==v||e[176]!==q?(J=g.jsx(fF,{open:v,onOpenChange:b,title:"Revoke All Permissions",description:"This will revoke all always-allowed permissions for this workspace. You'll need to approve these tools again when they're used.",confirmLabel:"Revoke All",variant:"destructive",onConfirm:q}),e[175]=v,e[176]=q,e[177]=J):J=e[177];let ie;return e[178]!==T||e[179]!==G||e[180]!==K||e[181]!==W||e[182]!==J?(ie=g.jsxs(T,{open:G,onOpenChange:K,children:[W,J]}),e[178]=T,e[179]=G,e[180]=K,e[181]=W,e[182]=J,e[183]=ie):ie=e[183],ie}function _F(t,e){return g.jsxs("div",{className:"flex items-center justify-between py-1",children:[g.jsx("div",{className:"flex items-center gap-1",children:t.keys.map((n,i)=>g.jsxs("span",{children:[g.jsx("kbd",{className:"font-mono bg-muted rounded px-2 py-1 text-xs",children:n}),i<t.keys.length-1&&g.jsx("span",{className:"mx-1 text-muted-foreground",children:"+"})]},i))}),g.jsx("span",{className:"text-sm text-muted-foreground",children:t.description})]},e)}function yF(t){return t.revokedAt}function bF(t){return!t.revokedAt}function xF(t){const e=me.c(6),{status:n}=t;switch(n.status){case"connected":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsxs(Bn,{variant:"default",className:"bg-green-600",children:[g.jsx(Nu,{className:"size-3 mr-1"}),"Connected"]}),e[0]=i):i=e[0],i}case"disabled":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsxs(Bn,{variant:"secondary",children:[g.jsx(Gf,{className:"size-3 mr-1"}),"Disabled"]}),e[1]=i):i=e[1],i}case"failed":{let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsxs(Bn,{variant:"destructive",children:[g.jsx(mu,{className:"size-3 mr-1"}),"Failed"]}),e[2]=i):i=e[2],i}case"needs_auth":{let i;return e[3]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsxs(Bn,{variant:"outline",className:"border-yellow-500 text-yellow-600",children:[g.jsx(mu,{className:"size-3 mr-1"}),"Needs Auth"]}),e[3]=i):i=e[3],i}case"needs_client_registration":{let i;return e[4]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsxs(Bn,{variant:"outline",className:"border-orange-500 text-orange-600",children:[g.jsx(mu,{className:"size-3 mr-1"}),"Needs Registration"]}),e[4]=i):i=e[4],i}default:{let i;return e[5]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsx(Bn,{variant:"secondary",children:"Unknown"}),e[5]=i):i=e[5],i}}}function SF({open:t,onOpenChange:e,workspaceId:n,workspacePath:i,serverUrl:o,apiToken:l}){const{fetchWithAuth:d}=qu(),[a,u]=D.useState({}),[f,p]=D.useState(!1),[h,y]=D.useState(null),[S,C]=D.useState(null),w=D.useCallback(async()=>{if(n){p(!0),C(null);try{const E=await d(`/api/workspaces/${n}/mcp/status`,{},{serverUrl:o,token:l});if(!E.ok)throw new Error("Failed to load MCP status");const N=await E.json();u(N.status||{})}catch(E){const N=E instanceof Error?E.message:"Unknown error";C(N)}finally{p(!1)}}},[n,d,o,l]);D.useEffect(()=>{t&&n&&w()},[t,n,w]);const _=async E=>{if(n){y(E);try{if(!(await d(`/api/workspaces/${n}/mcp/connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:E})},{serverUrl:o,token:l})).ok)throw new Error("Failed to connect");await w()}catch(N){const A=N instanceof Error?N.message:"Unknown error";C(A)}finally{y(null)}}},v=async E=>{if(n){y(E);try{if(!(await d(`/api/workspaces/${n}/mcp/disconnect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:E})},{serverUrl:o,token:l})).ok)throw new Error("Failed to disconnect");await w()}catch(N){const A=N instanceof Error?N.message:"Unknown error";C(A)}finally{y(null)}}},b=async E=>{if(n){y(E);try{const N=await d(`/api/workspaces/${n}/mcp/auth`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:E})},{serverUrl:o,token:l});if(!N.ok)throw new Error("Failed to start auth");const A=await N.json();A.authorizationUrl&&window.open(A.authorizationUrl,"_blank"),await w()}catch(N){const A=N instanceof Error?N.message:"Unknown error";C(A)}finally{y(null)}}},x=Object.entries(a);return g.jsx(Ql,{open:t,onOpenChange:e,children:g.jsxs(Jl,{className:"sm:max-w-[600px] max-h-[80vh]",children:[g.jsxs(ec,{children:[g.jsxs(tc,{className:"flex items-center gap-2",children:[g.jsx(fa,{className:"size-5"}),"MCP Servers"]}),g.jsx(Vu,{children:"Manage Model Context Protocol servers for this workspace"})]}),g.jsxs("div",{className:"mt-4 space-y-4",children:[S&&g.jsxs(bf,{variant:"destructive",children:[g.jsx(mu,{className:"size-4"}),g.jsx(xf,{children:S})]}),g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Configure servers in ",g.jsx("code",{className:"text-xs bg-muted px-1 rounded",children:".jean2/mcp.json"})]}),g.jsx(Pe,{variant:"outline",size:"sm",onClick:w,disabled:f,children:g.jsx(Tl,{className:`size-4 ${f?"animate-spin":""}`})})]}),g.jsx(nc,{className:"h-[400px]",children:f&&x.length===0?g.jsx("div",{className:"flex items-center justify-center py-8",children:g.jsx(gr,{className:"size-6 animate-spin text-muted-foreground"})}):x.length===0?g.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[g.jsx(fa,{className:"size-12 mx-auto mb-3 opacity-50"}),g.jsx("p",{className:"font-medium",children:"No MCP servers configured"}),g.jsxs("p",{className:"text-sm mt-1",children:["Create ",g.jsx("code",{className:"text-xs bg-muted px-1 rounded",children:".jean2/mcp.json"})," in your workspace to add servers."]})]}):g.jsx("div",{className:"space-y-3",children:x.map(([E,{config:N,status:A}])=>{var M;return g.jsxs("div",{className:"border rounded-lg p-4",children:[g.jsxs("div",{className:"flex items-start justify-between",children:[g.jsxs("div",{className:"flex items-start gap-3",children:[g.jsx(fa,{className:"size-5 text-muted-foreground mt-0.5"}),g.jsxs("div",{children:[g.jsx("div",{className:"font-medium",children:E}),g.jsx("div",{className:"text-sm text-muted-foreground",children:(N==null?void 0:N.type)==="local"?g.jsxs("span",{children:["Local - ",((M=N.command)==null?void 0:M[0])||"command"]}):(N==null?void 0:N.type)==="remote"?g.jsxs("span",{className:"flex items-center gap-1",children:["Remote - ",N.url]}):"Unknown type"}),A.status==="failed"&&"error"in A&&g.jsx(bf,{variant:"destructive",className:"mt-2 py-2",children:g.jsx(xf,{className:"text-xs",children:A.error})}),A.status==="needs_client_registration"&&"error"in A&&g.jsx(bf,{className:"mt-2 py-2 border-orange-500",children:g.jsx(xf,{className:"text-xs",children:A.error})})]})]}),g.jsx("div",{className:"flex items-center gap-2",children:g.jsx(xF,{status:A})})]}),g.jsxs("div",{className:"flex items-center gap-2 mt-3 pt-3 border-t",children:[A.status==="connected"&&g.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>v(E),disabled:h===E,children:[h===E?g.jsx(gr,{className:"size-4 animate-spin"}):g.jsx(H4,{className:"size-4"}),g.jsx("span",{className:"ml-1",children:"Disconnect"})]}),(A.status==="disabled"||A.status==="failed")&&g.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>_(E),disabled:h===E,children:[h===E?g.jsx(gr,{className:"size-4 animate-spin"}):g.jsx($4,{className:"size-4"}),g.jsx("span",{className:"ml-1",children:"Connect"})]}),A.status==="needs_auth"&&g.jsxs(Pe,{variant:"default",size:"sm",onClick:()=>b(E),disabled:h===E,children:[h===E?g.jsx(gr,{className:"size-4 animate-spin"}):g.jsx(_g,{className:"size-4"}),g.jsx("span",{className:"ml-1",children:"Authenticate"})]})]})]},E)})})})]})]})})}function Ex(t){const e=me.c(3),{message:n}=t,i=n===void 0?"Connecting to server...":n;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx(gr,{className:"size-8 animate-spin"}),e[0]=o):o=e[0];let l;return e[1]!==i?(l=g.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 text-muted-foreground",children:[o,g.jsx("p",{className:"text-sm",children:i})]}),e[1]=i,e[2]=l):l=e[2],l}const wF=t=>{const e=me.c(26),{serverUrl:n,authError:i,retryCount:o,nextRetryIn:l,onRetry:d,onLogout:a}=t;let u,f;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(qx,{className:"size-12 text-destructive mb-4"}),f=g.jsx("h2",{className:"text-xl font-semibold text-foreground mb-2",children:"Unable to connect to server"}),e[0]=u,e[1]=f):(u=e[0],f=e[1]);const p=i||"Please check that the server is running.";let h;e[2]!==p?(h=g.jsx("p",{className:"text-sm text-muted-foreground mb-4 max-w-[400px]",children:p}),e[2]=p,e[3]=h):h=e[3];let y;e[4]!==n?(y=n&&g.jsx("p",{className:"text-xs text-muted-foreground mb-6 font-mono bg-muted px-3 py-1.5 rounded",children:n}),e[4]=n,e[5]=y):y=e[5];let S;e[6]!==l?(S=g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Retrying in ",l,"s..."]}),e[6]=l,e[7]=S):S=e[7];let C;e[8]===Symbol.for("react.memo_cache_sentinel")?(C=g.jsx(Tl,{className:"size-4 mr-2","data-icon":"inline-start"}),e[8]=C):C=e[8];let w;e[9]!==d?(w=g.jsxs(Pe,{onClick:d,variant:"default",children:[C,"Retry Now"]}),e[9]=d,e[10]=w):w=e[10];let _;e[11]!==a?(_=g.jsx(Pe,{onClick:a,variant:"ghost",children:"Change Server"}),e[11]=a,e[12]=_):_=e[12];let v;e[13]!==w||e[14]!==_?(v=g.jsxs("div",{className:"flex items-center gap-2",children:[w,_]}),e[13]=w,e[14]=_,e[15]=v):v=e[15];let b;e[16]!==o?(b=o>0&&g.jsxs("p",{className:"text-xs text-muted-foreground",children:["Retry attempt: ",o]}),e[16]=o,e[17]=b):b=e[17];let x;e[18]!==v||e[19]!==b||e[20]!==S?(x=g.jsxs("div",{className:"flex flex-col items-center gap-4",children:[S,v,b]}),e[18]=v,e[19]=b,e[20]=S,e[21]=x):x=e[21];let E;return e[22]!==x||e[23]!==h||e[24]!==y?(E=g.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] px-4 text-center",children:[u,f,h,y,x]}),e[22]=x,e[23]=h,e[24]=y,e[25]=E):E=e[25],E};function Ax(t){const e=me.c(40),{onServerAdded:n,error:i}=t,[o,l]=D.useState(""),[d,a]=D.useState(""),[u,f]=D.useState(""),[p,h]=D.useState(!1),[y,S]=D.useState(null);let C;e[0]!==o||e[1]!==n||e[2]!==u||e[3]!==d?(C=I=>{I.preventDefault();const L=o.trim(),B=d.trim(),H=u.trim();if(!L){S("Please enter a server name");return}if(!B){S("Please enter a server URL");return}if(!H){S("Please enter an API token");return}if(!Gx(H)){S("Invalid token format. Token should be 64 hex characters (0-9, a-f).");return}const P=wf(B),ee={id:crypto.randomUUID(),name:L,url:P,token:H,createdAt:new Date().toISOString()};n(ee)},e[0]=o,e[1]=n,e[2]=u,e[3]=d,e[4]=C):C=e[4];const w=C;let _;e[5]===Symbol.for("react.memo_cache_sentinel")?(_=g.jsxs("div",{className:"px-6 pt-6 pb-4 text-center border-b border-border",children:[g.jsx("h1",{className:"text-2xl font-bold text-foreground",children:"Add your first server"}),g.jsx("p",{className:"text-muted-foreground mt-1",children:"Connect to a Jean2 server to get started"})]}),e[5]=_):_=e[5];let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=g.jsx("label",{htmlFor:"serverName",className:"text-sm font-medium text-foreground",children:"Server Name"}),e[6]=v):v=e[6];let b;e[7]===Symbol.for("react.memo_cache_sentinel")?(b=I=>{l(I.target.value),S(null)},e[7]=b):b=e[7];let x;e[8]!==o?(x=g.jsxs("div",{className:"space-y-2",children:[v,g.jsx("input",{id:"serverName",type:"text",value:o,onChange:b,placeholder:"Production",className:"w-full px-3 py-2 bg-background border border-input rounded-lg text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-colors"})]}),e[8]=o,e[9]=x):x=e[9];let E;e[10]===Symbol.for("react.memo_cache_sentinel")?(E=g.jsx("label",{htmlFor:"serverUrl",className:"text-sm font-medium text-foreground",children:"Server URL"}),e[10]=E):E=e[10];let N;e[11]===Symbol.for("react.memo_cache_sentinel")?(N=I=>{a(I.target.value),S(null)},e[11]=N):N=e[11];let A;e[12]!==d?(A=g.jsxs("div",{className:"space-y-2",children:[E,g.jsx("input",{id:"serverUrl",type:"text",value:d,onChange:N,placeholder:"localhost:3000",className:"w-full px-3 py-2 bg-background border border-input rounded-lg text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-colors"})]}),e[12]=d,e[13]=A):A=e[13];let M;e[14]===Symbol.for("react.memo_cache_sentinel")?(M=g.jsx("label",{htmlFor:"token",className:"text-sm font-medium text-foreground",children:"API Token"}),e[14]=M):M=e[14];const T=p?"text":"password";let j;e[15]===Symbol.for("react.memo_cache_sentinel")?(j=I=>{f(I.target.value),S(null)},e[15]=j):j=e[15];let O;e[16]!==T||e[17]!==u?(O=g.jsx("input",{id:"token",type:T,value:u,onChange:j,placeholder:"Enter your 64-character token",className:"w-full px-3 py-2 pr-10 bg-background border border-input rounded-lg text-foreground font-mono text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent transition-colors"}),e[16]=T,e[17]=u,e[18]=O):O=e[18];let F;e[19]!==p?(F=()=>h(!p),e[19]=p,e[20]=F):F=e[20];const U=p?"Hide token":"Show token";let $;e[21]!==p?($=p?g.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"})}):g.jsxs("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}),e[21]=p,e[22]=$):$=e[22];let G;e[23]!==F||e[24]!==U||e[25]!==$?(G=g.jsx("button",{type:"button",onClick:F,className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground transition-colors","aria-label":U,children:$}),e[23]=F,e[24]=U,e[25]=$,e[26]=G):G=e[26];let K;e[27]!==O||e[28]!==G?(K=g.jsxs("div",{className:"space-y-2",children:[M,g.jsxs("div",{className:"relative",children:[O,G]})]}),e[27]=O,e[28]=G,e[29]=K):K=e[29];let V;e[30]!==i||e[31]!==y?(V=(y||i)&&g.jsx("div",{className:"px-3 py-2 bg-destructive/10 border border-destructive/20 rounded-lg text-destructive text-sm",children:y||i}),e[30]=i,e[31]=y,e[32]=V):V=e[32];let X;e[33]===Symbol.for("react.memo_cache_sentinel")?(X=g.jsx("button",{type:"submit",className:"w-full py-2.5 bg-primary text-primary-foreground font-medium rounded-lg hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 transition-colors",children:"Add Server"}),e[33]=X):X=e[33];let Z;return e[34]!==w||e[35]!==K||e[36]!==V||e[37]!==x||e[38]!==A?(Z=g.jsx("div",{className:"w-full h-full flex items-center justify-center bg-background dark:bg-gradient-to-br dark:from-muted dark:via-background dark:to-muted p-4",children:g.jsx("div",{className:"w-full max-w-md",children:g.jsxs("div",{className:"bg-card border border-border rounded-xl shadow-2xl overflow-hidden",children:[_,g.jsxs("form",{onSubmit:w,className:"p-6 space-y-4",children:[x,A,K,V,X]})]})})}),e[34]=w,e[35]=K,e[36]=V,e[37]=x,e[38]=A,e[39]=Z):Z=e[39],Z}function Tx(t){const e=me.c(17),{onServerSwitch:n,onSelectWorkspace:i}=t,[o,l]=D.useState(!1),d=D.useRef(!1),a=Wu(),{quickConnections:u,switchServer:f,removeFromQuickConnections:p,isSwitching:h}=Vl(),y=O=>{f(O.serverId)&&(d.current=!0,n==null||n(),O.workspaceId&&i&&i(O.workspaceId))};let S,C;e[0]!==h||e[1]!==o?(S=()=>{!h&&o&&d.current&&(l(!1),d.current=!1)},C=[h,o],e[0]=h,e[1]=o,e[2]=S,e[3]=C):(S=e[2],C=e[3]),D.useEffect(S,C);let w;e[4]!==p?(w=(O,F)=>{O.stopPropagation(),p(F)},e[4]=p,e[5]=w):w=e[5];const _=w,v=()=>g.jsx(Pv,{children:g.jsx(Fv,{className:"max-h-[50vh] overflow-y-auto",children:u.length>0?g.jsx(ku,{heading:"Quick Switch",children:u.map(O=>g.jsxs(Dl,{onSelect:()=>y(O),className:"justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(fa,{className:"size-4 text-muted-foreground"}),g.jsxs("span",{children:[O.serverName,O.workspaceName&&g.jsxs("span",{className:"text-muted-foreground",children:[" / ",O.workspaceName]})]})]}),g.jsx("button",{className:"opacity-0 group-hover:opacity-100 hover:opacity-100 transition-opacity p-1 rounded hover:bg-destructive/10",onClick:F=>_(F,O.id),children:g.jsx(Du,{className:"size-3 text-destructive"})})]},O.id))}):g.jsx(Hv,{className:"py-6",children:g.jsxs("div",{className:"flex flex-col items-center gap-2 text-muted-foreground",children:[g.jsx(Nm,{className:"size-8"}),g.jsx("p",{className:"text-sm font-medium",children:"No favorites yet"}),g.jsx("p",{className:"text-xs",children:"Star a workspace to add it here"})]})})})});if(a){let O;e[6]===Symbol.for("react.memo_cache_sentinel")?(O=g.jsx(Cj,{asChild:!0,children:g.jsx(Pe,{variant:"ghost",size:"icon-sm","aria-label":"Quick switch",children:g.jsx(Nm,{className:"size-4"})})}),e[6]=O):O=e[6];let F;return e[7]===Symbol.for("react.memo_cache_sentinel")?(F=g.jsx(Eh,{children:g.jsx(Ah,{children:"Quick Switch"})}),e[7]=F):F=e[7],g.jsxs(Ch,{open:o,onOpenChange:l,children:[O,g.jsxs(kh,{side:"bottom",className:"max-h-[80vh]",children:[F,g.jsx("div",{className:"mt-4",children:v()})]})]})}const b=Sh;let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=g.jsx(Uv,{asChild:!0,children:g.jsx(Pe,{variant:"ghost",size:"icon-sm","aria-label":"Quick switch",children:g.jsx(Nm,{className:"size-4"})})}),e[8]=x):x=e[8];const E=wh,N="w-[300px] p-0",A="start",M=v();let T;e[9]!==E||e[10]!==M?(T=g.jsx(E,{className:N,align:A,children:M}),e[9]=E,e[10]=M,e[11]=T):T=e[11];let j;return e[12]!==b||e[13]!==o||e[14]!==x||e[15]!==T?(j=g.jsxs(b,{open:o,onOpenChange:l,children:[x,T]}),e[12]=b,e[13]=o,e[14]=x,e[15]=T,e[16]=j):j=e[16],j}function Rx(t){const e=me.c(13),{viewMode:n,onViewModeChange:i}=t;let o;e[0]!==i||e[1]!==n?(o=()=>{i(n==="overview"?"default":"overview")},e[0]=i,e[1]=n,e[2]=o):o=e[2];const l=o,d=n==="overview";let a;e[3]!==d?(a=d?g.jsx(S4,{className:"h-4 w-4"}):g.jsx(b4,{className:"h-4 w-4"}),e[3]=d,e[4]=a):a=e[4];let u;e[5]!==a||e[6]!==l?(u=g.jsx(Pl,{asChild:!0,children:g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:l,children:a})}),e[5]=a,e[6]=l,e[7]=u):u=e[7];const f=d?"Single workspace":"Overview";let p;e[8]!==f?(p=g.jsx(Fl,{children:f}),e[8]=f,e[9]=p):p=e[9];let h;return e[10]!==u||e[11]!==p?(h=g.jsx(Eu,{children:g.jsxs(zl,{children:[u,p]})}),e[10]=u,e[11]=p,e[12]=h):h=e[12],h}function CF(t){const e=me.c(69),{open:n,onOpenChange:i,editServer:o}=t,{addServer:l,editServer:d}=Vl(),[a,u]=D.useState(""),[f,p]=D.useState(""),[h,y]=D.useState(""),[S,C]=D.useState(!1),[w,_]=D.useState(null),v=o!=null;let b;e[0]!==o?(b=()=>{o?(u(o.name),p(o.url),y(o.token)):(u(""),p(""),y("")),_(null),C(!1)},e[0]=o,e[1]=b):b=e[1];let x;e[2]!==o||e[3]!==n?(x=[o,n],e[2]=o,e[3]=n,e[4]=x):x=e[4],D.useEffect(b,x);let E;e[5]!==l||e[6]!==o||e[7]!==v||e[8]!==a||e[9]!==i||e[10]!==h||e[11]!==d||e[12]!==f?(E=Ee=>{Ee.preventDefault(),_(null);const Te=a.trim(),Be=f.trim(),se=h.trim();if(!Te){_("Name is required");return}if(!Be){_("Server URL is required");return}if(!se){_("API token is required");return}if(!Gx(se)){_("Token must be 64 hexadecimal characters");return}const Ye=wf(Be);v?d(o.id,{name:Te,url:Ye,token:se}):l(Te,Ye,se),i(!1)},e[5]=l,e[6]=o,e[7]=v,e[8]=a,e[9]=i,e[10]=h,e[11]=d,e[12]=f,e[13]=E):E=e[13];const N=E,A=v?"Edit Server":"Add Server";let M;e[14]!==A?(M=g.jsx(tc,{children:A}),e[14]=A,e[15]=M):M=e[15];const T=v?"Update server details":"Enter your server details";let j;e[16]!==T?(j=g.jsx(Vu,{children:T}),e[16]=T,e[17]=j):j=e[17];let O;e[18]!==M||e[19]!==j?(O=g.jsxs(ec,{children:[M,j]}),e[18]=M,e[19]=j,e[20]=O):O=e[20];let F;e[21]===Symbol.for("react.memo_cache_sentinel")?(F=g.jsx(Ti,{htmlFor:"server-name",children:"Name"}),e[21]=F):F=e[21];let U;e[22]===Symbol.for("react.memo_cache_sentinel")?(U=Ee=>u(Ee.target.value),e[22]=U):U=e[22];let $;e[23]!==a?($=g.jsxs("div",{className:"grid gap-2",children:[F,g.jsx(yf,{id:"server-name",value:a,onChange:U,placeholder:"My Server"})]}),e[23]=a,e[24]=$):$=e[24];let G;e[25]===Symbol.for("react.memo_cache_sentinel")?(G=g.jsx(Ti,{htmlFor:"server-url",children:"Server URL"}),e[25]=G):G=e[25];let K;e[26]===Symbol.for("react.memo_cache_sentinel")?(K=Ee=>p(Ee.target.value),e[26]=K):K=e[26];let V;e[27]!==f?(V=g.jsxs("div",{className:"grid gap-2",children:[G,g.jsx(yf,{id:"server-url",value:f,onChange:K,placeholder:"localhost:3000"})]}),e[27]=f,e[28]=V):V=e[28];let X;e[29]===Symbol.for("react.memo_cache_sentinel")?(X=g.jsx(Ti,{htmlFor:"server-token",children:"API Token"}),e[29]=X):X=e[29];const Z=S?"text":"password";let I;e[30]===Symbol.for("react.memo_cache_sentinel")?(I=Ee=>y(Ee.target.value),e[30]=I):I=e[30];let L;e[31]!==Z||e[32]!==h?(L=g.jsx(yf,{id:"server-token",type:Z,value:h,onChange:I,placeholder:"64-character hex string",className:"pr-10"}),e[31]=Z,e[32]=h,e[33]=L):L=e[33];let B;e[34]!==S?(B=()=>C(!S),e[34]=S,e[35]=B):B=e[35];let H;e[36]!==S?(H=S?g.jsx(s4,{className:"size-4 text-muted-foreground"}):g.jsx(a4,{className:"size-4 text-muted-foreground"}),e[36]=S,e[37]=H):H=e[37];let P;e[38]!==B||e[39]!==H?(P=g.jsx("button",{type:"button",onClick:B,className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 hover:bg-transparent",children:H}),e[38]=B,e[39]=H,e[40]=P):P=e[40];let ee;e[41]!==L||e[42]!==P?(ee=g.jsxs("div",{className:"grid gap-2",children:[X,g.jsxs("div",{className:"relative",children:[L,P]})]}),e[41]=L,e[42]=P,e[43]=ee):ee=e[43];let ne;e[44]!==w?(ne=w&&g.jsx("p",{className:"text-sm text-destructive",children:w}),e[44]=w,e[45]=ne):ne=e[45];let Q;e[46]!==$||e[47]!==V||e[48]!==ee||e[49]!==ne?(Q=g.jsxs("div",{className:"grid gap-4 py-4",children:[$,V,ee,ne]}),e[46]=$,e[47]=V,e[48]=ee,e[49]=ne,e[50]=Q):Q=e[50];let W;e[51]!==i?(W=g.jsx(Pe,{type:"button",variant:"outline",onClick:()=>i(!1),children:"Cancel"}),e[51]=i,e[52]=W):W=e[52];const q=v?"Save":"Add";let J;e[53]!==q?(J=g.jsx(Pe,{type:"submit",children:q}),e[53]=q,e[54]=J):J=e[54];let ie;e[55]!==W||e[56]!==J?(ie=g.jsxs(bh,{children:[W,J]}),e[55]=W,e[56]=J,e[57]=ie):ie=e[57];let ce;e[58]!==N||e[59]!==Q||e[60]!==ie?(ce=g.jsxs("form",{onSubmit:N,children:[Q,ie]}),e[58]=N,e[59]=Q,e[60]=ie,e[61]=ce):ce=e[61];let ae;e[62]!==ce||e[63]!==O?(ae=g.jsxs(Jl,{className:"sm:max-w-[425px]",children:[O,ce]}),e[62]=ce,e[63]=O,e[64]=ae):ae=e[64];let _e;return e[65]!==i||e[66]!==n||e[67]!==ae?(_e=g.jsx(Ql,{open:n,onOpenChange:i,children:ae}),e[65]=i,e[66]=n,e[67]=ae,e[68]=_e):_e=e[68],_e}const kF=400,EF=typeof window<"u"&&("__TAURI_INTERNALS__"in window||"__TAURI__"in window);function AF(){const t=['[data-slot="dialog-overlay"][data-state="open"]','[data-slot="dialog-content"][data-state="open"]','[role="dialog"][data-state="open"]'];for(const n of t)if(document.querySelector(n))return!0;const e=document.querySelectorAll('[role="dialog"]');for(const n of e)if(n instanceof HTMLElement&&TF(n))return!0;return!1}function TF(t){if(!t.isConnected)return!1;const e=window.getComputedStyle(t);return e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity)>0&&t.getBoundingClientRect().width>0&&t.getBoundingClientRect().height>0}function RF(){var e,n;const t=document.activeElement;return t?!!((e=t.hasAttribute)!=null&&e.call(t,"data-chat-input")||(n=t.closest)!=null&&n.call(t,'[data-chat-input="true"]')):!1}function NF(t){const e=me.c(5),n=D.useRef(t);let i;e[0]!==t?(i=()=>{n.current=t},e[0]=t,e[1]=i):i=e[1],D.useLayoutEffect(i);let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o={lastEscTime:0,armed:!1},e[2]=o):o=e[2];const l=D.useRef(o);let d,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{const u=f=>{if(f.isComposing||f.repeat||f.key==="Escape"&&AF())return;const{onCloseFocusedPanel:p,onFocusChatInput:h,onStopStreaming:y,onOpenSidebar:S,onOpenTerminal:C,onNewWindow:w,onNewSession:_,onToggleViewMode:v}=n.current;if(f.shiftKey&&f.key==="Escape"){f.preventDefault(),p();return}if(f.key==="Escape"&&!f.metaKey&&!f.ctrlKey){const N=RF(),A=Date.now(),{lastEscTime:M,armed:T}=l.current,j=A-M;if(N&&T&&j<kF){f.preventDefault(),l.current={lastEscTime:0,armed:!1},y();return}if(N){l.current={lastEscTime:A,armed:!0};return}f.preventDefault(),h();return}const b=f.target,x=b.tagName==="INPUT"||b.tagName==="TEXTAREA"||b.isContentEditable,E=f.metaKey||f.ctrlKey;if(!(x&&!E)){if(!EF){if(E&&f.code==="Digit1"){f.preventDefault(),S();return}if(E&&f.code==="KeyT"){f.preventDefault(),C();return}}if(E&&f.shiftKey&&f.code==="KeyN"){f.preventDefault(),w();return}if(E&&f.code==="KeyN"){f.preventDefault(),_();return}if(E&&f.code==="KeyO"){f.preventDefault(),v();return}}};return window.addEventListener("keydown",u,!0),()=>window.removeEventListener("keydown",u,!0)},a=[],e[3]=d,e[4]=a):(d=e[3],a=e[4]),D.useEffect(d,a)}const DF=(t,e)=>t&&e?`ws://${e}/ws?token=${t}`:null,gg=t=>t?`http://${t}/api`:null;function MF(t){const e=me.c(24),{onNewSession:n,onNewWindow:i,onToggleViewMode:o,onCloseTerminal:l,focusChatInput:d,setTerminalOpen:a,sidebarRef:u,terminalPanelRef:f,onStopStreaming:p}=t,{setOpen:h}=Ku();let y;e[0]!==h||e[1]!==u?(y=()=>{h(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{var O;(O=u.current)==null||O.focusSessionPanel()})})},e[0]=h,e[1]=u,e[2]=y):y=e[2];const S=y;let C;e[3]!==a||e[4]!==f?(C=()=>{a(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{var O;(O=f.current)==null||O.focus()})})},e[3]=a,e[4]=f,e[5]=C):C=e[5];const w=C,_=D.useRef(S);let v;e[6]!==S?(v=()=>{_.current=S},e[6]=S,e[7]=v):v=e[7],D.useLayoutEffect(v);const b=D.useRef(w);let x;e[8]!==w?(x=()=>{b.current=w},e[8]=w,e[9]=x):x=e[9],D.useLayoutEffect(x);let E,N;e[10]===Symbol.for("react.memo_cache_sentinel")?(E=()=>_.current(),N=()=>b.current(),e[10]=E,e[11]=N):(E=e[10],N=e[11]);let A;e[12]!==l||e[13]!==h?(A=()=>{const O=document.activeElement;O!=null&&O.closest("[data-terminal-panel]")?l():O!=null&&O.closest('[data-sidebar="sidebar"]')&&h(!1)},e[12]=l,e[13]=h,e[14]=A):A=e[14];let M;e[15]!==d||e[16]!==n||e[17]!==i||e[18]!==p||e[19]!==o||e[20]!==A?(M={onOpenSidebar:E,onOpenTerminal:N,onNewSession:n,onNewWindow:i,onToggleViewMode:o,onCloseFocusedPanel:A,onFocusChatInput:d,onStopStreaming:p},e[15]=d,e[16]=n,e[17]=i,e[18]=p,e[19]=o,e[20]=A,e[21]=M):M=e[21],NF(M);let T,j;return e[22]===Symbol.for("react.memo_cache_sentinel")?(j=()=>{if(!(typeof window<"u"&&("__TAURI_INTERNALS__"in window||"__TAURI__"in window)))return;let F=!1;const U=[];return(async()=>{try{const G=await O0("jean2://accelerator/open-sidebar",()=>{_.current()});if(F){G();return}U.push(G)}catch(G){console.error("Failed to register open-sidebar accelerator listener:",G)}try{const G=await O0("jean2://accelerator/open-terminal",()=>{b.current()});if(F){G();return}U.push(G)}catch(G){console.error("Failed to register open-terminal accelerator listener:",G)}})(),()=>{F=!0,U.forEach(jF)}},T=[],e[22]=T,e[23]=j):(T=e[22],j=e[23]),D.useEffect(j,T),null}function jF(t){return t()}function OF(){var Wo,vc,_c,Va,Ga,yc,bc,xc,Ju,ed;const t=me.c(381),{servers:e,activeServer:n,addServer:i,removeServer:o,isSwitching:l,clearSwitchingState:d,quickConnections:a}=Vl();let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=[],t[0]=u):u=t[0];const[f,p]=D.useState(u);let h;t[1]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[1]=h):h=t[1];const[y,S]=D.useState(h);let C;t[2]===Symbol.for("react.memo_cache_sentinel")?(C=[],t[2]=C):C=t[2];const[w,_]=D.useState(C),[v,b]=D.useState(null);let x;t[3]===Symbol.for("react.memo_cache_sentinel")?(x={},t[3]=x):x=t[3];const[E,N]=D.useState(x);let A;t[4]===Symbol.for("react.memo_cache_sentinel")?(A={},t[4]=A):A=t[4];const[M,T]=D.useState(A),[j,O]=D.useState(null),F=D.useRef(null),U=D.useRef(null),$=D.useRef(null),G=D.useRef(null),K=D.useRef(null),[V,X]=D.useState(!1),[Z,I]=D.useState(null);let L;t[5]===Symbol.for("react.memo_cache_sentinel")?(L={promptTokens:0,completionTokens:0,totalTokens:0},t[5]=L):L=t[5];const[B,H]=D.useState(L),[P,ee]=D.useState("gpt-4o"),[ne,Q]=D.useState(null);let W;t[6]===Symbol.for("react.memo_cache_sentinel")?(W=[],t[6]=W):W=t[6];const[q,J]=D.useState(W),[ie,ce]=D.useState("gpt-4o");let ae,_e;t[7]!==P||t[8]!==q||t[9]!==ne?(ae=()=>{var De;const te=(De=q.find(ct=>ct.id===P))==null?void 0:De.variants;ne&&te&&!te[ne]&&Q(null)},_e=[P,ne,q],t[7]=P,t[8]=q,t[9]=ne,t[10]=ae,t[11]=_e):(ae=t[10],_e=t[11]),D.useEffect(ae,_e);let Ee;t[12]===Symbol.for("react.memo_cache_sentinel")?(Ee=[],t[12]=Ee):Ee=t[12];const[Te,Be]=D.useState(Ee),[se,Ye]=D.useState(null),[rt,nt]=D.useState(!1),[Ge,gt]=D.useState(!1),[it,Je]=D.useState(!1),[at,fe]=D.useState(!1),[ge,Ae]=D.useState(fH);let Me;t[13]===Symbol.for("react.memo_cache_sentinel")?(Me=[],t[13]=Me):Me=t[13];const[Le,st]=D.useState(Me);let Se;t[14]===Symbol.for("react.memo_cache_sentinel")?(Se=[],t[14]=Se):Se=t[14];const[Ze,Ie]=D.useState(Se);let ot;t[15]===Symbol.for("react.memo_cache_sentinel")?(ot={},t[15]=ot):ot=t[15];const[Ce,Ve]=D.useState(ot);let lt;t[16]===Symbol.for("react.memo_cache_sentinel")?(lt=[],t[16]=lt):lt=t[16];const[Dt,Xt]=D.useState(lt),[Ot,Jt]=D.useState(null),[Et,vn]=D.useState(!1),[Vt,Do]=D.useState(null),[en,kn]=D.useState(!1),[rn,qn]=D.useState(0),[nr,rr]=D.useState(0),[jn,On]=D.useState(0),Fn=(Wo=v==null?void 0:v.compacting)!=null?Wo:!1,[Ur,$r]=D.useState(!1);let sn;t[17]===Symbol.for("react.memo_cache_sentinel")?(sn=new Set,t[17]=sn):sn=t[17];const[Ht,Gt]=D.useState(sn);let _n,br;t[18]!==ge?(_n=()=>{localStorage.setItem("jean2_sidebar_view",ge)},br=[ge],t[18]=ge,t[19]=_n,t[20]=br):(_n=t[19],br=t[20]),D.useEffect(_n,br);const xr=D.useRef(null),Ca=D.useRef(null),[,ka]=D.useState(!1),Ke=(vc=n==null?void 0:n.token)!=null?vc:null,We=(_c=n==null?void 0:n.url)!=null?_c:null;let qr,Vr;t[21]!==j?(qr=()=>{F.current=j},Vr=[j],t[21]=j,t[22]=qr,t[23]=Vr):(qr=t[22],Vr=t[23]),D.useEffect(qr,Vr);let ci;t[24]!==(v==null?void 0:v.id)?(ci=()=>{var te;U.current=(te=v==null?void 0:v.id)!=null?te:null},t[24]=v==null?void 0:v.id,t[25]=ci):ci=t[25];let Gr;t[26]!==v?(Gr=[v],t[26]=v,t[27]=Gr):Gr=t[27],D.useEffect(ci,Gr);const Yt=D.useRef(null),Mo=D.useRef(!1);let jo;t[28]!==i?(jo=te=>{i(te.name,te.url,te.token)},t[28]=i,t[29]=jo):jo=t[29];const Sr=jo;let Wr;t[30]!==n||t[31]!==o?(Wr=()=>{n&&o(n.id),F.current&&F.current.close(),O(null),X(!1),kn(!1),qn(0),rr(0)},t[30]=n,t[31]=o,t[32]=Wr):Wr=t[32];const yn=Wr;let Oo;t[33]===Symbol.for("react.memo_cache_sentinel")?(Oo=()=>{qn(dH),kn(!1),rr(0)},t[33]=Oo):Oo=t[33];const Qu=Oo;let Ea;t[34]===Symbol.for("react.memo_cache_sentinel")?(Ea=()=>{F.current&&F.current.close(),O(null),X(!1),kn(!1),qn(0),rr(0),p([]),S([]),b(null),N({}),T({}),I(null),H({promptTokens:0,completionTokens:0,totalTokens:0}),ee("gpt-4o"),J([]),Be([]),Ye(null),st([]),Ie([]),Ve({}),On(uH)},t[34]=Ea):Ea=t[34];const Ts=Ea;let Oi;t[35]!==Ke||t[36]!==yn?(Oi=async(te,De)=>{const ct=De===void 0?{}:De;if(!Ke)throw new Error("No API token available");const et=new Headers(ct.headers||{});et.set("Authorization",`Bearer ${Ke}`);const we=await fetch(te,{...ct,signal:ct.signal,headers:et});if(we.status===401)throw Jt("Authentication failed. Your token may have been regenerated."),yn(),new Error("Unauthorized");return we},t[35]=Ke,t[36]=yn,t[37]=Oi):Oi=t[37];const zt=Oi;let En;t[38]!==E||t[39]!==M?(En=te=>{const De=E[te]||[],ct=M[te]||{};return De.map(et=>({message:et,parts:(ct[et.id]||[]).sort(cH)}))},t[38]=E,t[39]=M,t[40]=En):En=t[40];const Aa=En;let Ta;t[41]!==Ke||t[42]!==yn||t[43]!==We?(Ta=()=>{if(!Ke||!We)return;const te=DF(Ke,We);if(!te)return;const De=new WebSocket(te);return De.onopen=()=>{X(!0),Jt(null),qn(0),kn(!1),Ie([]),U.current&&De.send(JSON.stringify({type:"session.resume",sessionId:U.current})),De.send(JSON.stringify({type:"permissions.sync"}))},De.onclose=ct=>{X(!1),(ct.code===1008||ct.code===401)&&(Jt("Authentication failed. Please check your token."),yn())},De.onerror=lH,De.onmessage=ct=>{var we;const et=JSON.parse(ct.data);(we=Yt.current)==null||we.call(Yt,et)},O(De),()=>De.close()},t[41]=Ke,t[42]=yn,t[43]=We,t[44]=Ta):Ta=t[44];let Rs;t[45]!==Ke||t[46]!==yn||t[47]!==jn||t[48]!==We?(Rs=[Ke,We,yn,jn],t[45]=Ke,t[46]=yn,t[47]=jn,t[48]=We,t[49]=Rs):Rs=t[49],D.useEffect(Ta,Rs);let Lo,Li;t[50]!==Ke||t[51]!==V||t[52]!==en||t[53]!==We?(Lo=()=>{if(Ke&&We&&!V&&!en){const te=setTimeout(()=>{V||kn(!0)},1e4);return()=>clearTimeout(te)}},Li=[Ke,We,V,en],t[50]=Ke,t[51]=V,t[52]=en,t[53]=We,t[54]=Lo,t[55]=Li):(Lo=t[54],Li=t[55]),D.useEffect(Lo,Li);let Ra,An;t[56]!==Ke||t[57]!==V||t[58]!==en||t[59]!==rn||t[60]!==We?(Ra=()=>{if(en&&!V&&Ke&&We){const te=Math.min(1e3*Math.pow(2,rn),3e4);let De=Math.floor(te/1e3);rr(De);const ct=setInterval(()=>{De=De-1,rr(Math.max(0,De))},1e3),et=setTimeout(()=>{qn(aH),On(oH)},te);return()=>{clearInterval(ct),clearTimeout(et)}}},An=[en,V,Ke,We,rn],t[56]=Ke,t[57]=V,t[58]=en,t[59]=rn,t[60]=We,t[61]=Ra,t[62]=An):(Ra=t[61],An=t[62]),D.useEffect(Ra,An);let Ns,Io;t[63]!==Ke||t[64]!==We?(Ns=()=>{const te=()=>{if(document.visibilityState!=="visible")return;const De=F.current;!De||!Ke||!We||(De.readyState===WebSocket.OPEN?(De.onclose=null,De.close(),X(!1),qn(0),kn(!1),On(sH)):(De.readyState===WebSocket.CLOSED||De.readyState===WebSocket.CLOSING)&&(X(!1),qn(0),kn(!1),On(iH)))};return document.addEventListener("visibilitychange",te),()=>document.removeEventListener("visibilitychange",te)},Io=[Ke,We],t[63]=Ke,t[64]=We,t[65]=Ns,t[66]=Io):(Ns=t[65],Io=t[66]),D.useEffect(Ns,Io);let Ds,Kr;t[67]!==Ke||t[68]!==We?(Ds=()=>{const te=()=>{if(!Ke||!We)return;const De=F.current;De&&De.readyState===WebSocket.OPEN||(X(!1),qn(0),kn(!1),On(rH))};return window.addEventListener("online",te),()=>window.removeEventListener("online",te)},Kr=[Ke,We],t[67]=Ke,t[68]=We,t[69]=Ds,t[70]=Kr):(Ds=t[69],Kr=t[70]),D.useEffect(Ds,Kr);let Bo;t[71]!==Ke||t[72]!==d||t[73]!==zt||t[74]!==We?(Bo=()=>{var ct;if(!Ke||!We)return;(ct=xr.current)==null||ct.abort(),xr.current=new AbortController;const te=xr.current.signal,De=gg(We);if(De)return ka(!0),Promise.all([zt(`${De}/sessions`,{signal:te}).then(nH),zt(`${De}/preconfigs`,{signal:te}).then(tH),zt(`${De}/prompts`,{signal:te}).then(eH),zt(`${De}/models`,{signal:te}).then(JF),zt(`${De}/workspaces`,{signal:te}).then(QF),zt(`${De}/providers`,{signal:te}).then(ZF)]).then(et=>{const[we,Ne,dt,Nt,fn,hn]=et;p(we.sessions||[]),S(Ne.preconfigs||[]),_(dt.prompts||[]),J(Nt.models||[]),ce(Nt.defaultModel||"gpt-4o"),Xt(hn.providers||[]);const Wn=fn.workspaces||[];if(Be(Wn),Ca.current){const Ln=Wn.find(ei=>ei.id===Ca.current);Ln&&Ye(Ln),Ca.current=null}else{const Ln=localStorage.getItem("activeWorkspaceId"),ei=Wn.find(Wi=>Wi.id===Ln);Ye(ei||Wn[0])}d(),ka(!1)}).catch(et=>{var we;if(et.name==="AbortError"){console.log("Fetch aborted due to server switch");return}console.error("Failed to load server data:",et),ka(!1),(we=et.message)!=null&&we.includes("Unauthorized")||Jt("Failed to connect to server")}),()=>{var et;(et=xr.current)==null||et.abort()}},t[71]=Ke,t[72]=d,t[73]=zt,t[74]=We,t[75]=Bo):Bo=t[75];let zo;t[76]!==Ke||t[77]!==d||t[78]!==zt||t[79]!==jn||t[80]!==We?(zo=[Ke,We,zt,d,jn],t[76]=Ke,t[77]=d,t[78]=zt,t[79]=jn,t[80]=We,t[81]=zo):zo=t[81],D.useEffect(Bo,zo);let Yr,Na;t[82]!==se?(Yr=()=>{se&&localStorage.setItem("activeWorkspaceId",se.id)},Na=[se],t[82]=se,t[83]=Yr,t[84]=Na):(Yr=t[83],Na=t[84]),D.useEffect(Yr,Na);let Po;t[85]!==zt||t[86]!==We?(Po=async(te,De,ct)=>{const et=gg(We);if(!et)return;const Ne=await(await zt(`${et}/workspaces`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:te,path:De,isVirtual:ct})})).json();return Be(dt=>[...dt,Ne.workspace]),Ne.workspace},t[85]=zt,t[86]=We,t[87]=Po):Po=t[87];const Ii=Po;let Ms;t[88]===Symbol.for("react.memo_cache_sentinel")?(Ms=te=>{Ye(te),b(null)},t[88]=Ms):Ms=t[88];const Ih=Ms;let Da;t[89]===Symbol.for("react.memo_cache_sentinel")?(Da=te=>{Ca.current=te},t[89]=Da):Da=t[89];const Fo=Da;let Vn;t[90]!==(se==null?void 0:se.id)||t[91]!==zt||t[92]!==We||t[93]!==Te[0]?(Vn=async te=>{const De=gg(We);De&&(await zt(`${De}/workspaces/${te}`,{method:"DELETE"}),Be(ct=>ct.filter(et=>et.id!==te)),(se==null?void 0:se.id)===te&&Ye(Te[0]||null))},t[90]=se==null?void 0:se.id,t[91]=zt,t[92]=We,t[93]=Te[0],t[94]=Vn):Vn=t[94];const Bi=Vn;let js;t[95]!==Ii||t[96]!==Te.length?(js=async()=>{const te=`Workspace ${Te.length+1}`,De=`~/.jean2/workspaces/${crypto.randomUUID()}`;await Ii(te,De,!0)},t[95]=Ii,t[96]=Te.length,t[97]=js):js=t[97];const wr=js;let Xr;t[98]!==Ii?(Xr=async te=>{const De=te.split("/").pop()||te.split("\\").pop()||"Workspace";await Ii(De,te,!1)},t[98]=Ii,t[99]=Xr):Xr=t[99];const Os=Xr;let Ls;t[100]!==(v==null?void 0:v.id)||t[101]!==ie||t[102]!==Ht||t[103]!==q||t[104]!==Z?(Ls=te=>{var De,ct,et;e:switch(te.type){case"session.created":{p(we=>[te.session,...we]),Mo.current&&(b(te.session),N(we=>({...we,[te.session.id]:[]})),T(we=>({...we,[te.session.id]:{}})),H({promptTokens:0,completionTokens:0,totalTokens:0}),ee(te.session.selectedModel||ie),Q((De=te.session.selectedVariant)!=null?De:null),Mo.current=!1);break e}case"session.resumed":{b(te.session),Gt(dt=>{const Nt=new Set(dt);return Nt.delete(te.session.id),Nt}),te.isRunning?I(te.session.id):I(dt=>dt===te.session.id?null:dt),te.messages&&(N(dt=>({...dt,[te.session.id]:te.messages.map(XF)})),T(dt=>{const Nt={...dt};Nt[te.session.id]={};for(const fn of te.messages)Nt[te.session.id][fn.message.id]=fn.parts;return Nt})),H((ct=te.usage)!=null?ct:{promptTokens:0,completionTokens:0,totalTokens:0}),ee(te.session.selectedModel||ie),Q(te.session.selectedVariant||null);const we=te.session.selectedModel||ie,Ne=(et=q.find(dt=>dt.id===we))==null?void 0:et.variants;te.session.selectedVariant&&Ne&&!Ne[te.session.selectedVariant]&&Q(null);break e}case"message.created":{N(we=>({...we,[te.message.sessionId]:[...we[te.message.sessionId]||[],te.message]})),T(we=>({...we,[te.message.sessionId]:{...we[te.message.sessionId],[te.message.id]:[]}})),"status"in te.message&&te.message.status==="streaming"&&(I(te.message.sessionId),Gt(we=>{const Ne=new Set(we);return Ne.delete(te.message.sessionId),Ne}));break e}case"message.updated":{N(we=>({...we,[te.message.sessionId]:(we[te.message.sessionId]||[]).map(Ne=>Ne.id===te.message.id?te.message:Ne)})),"status"in te.message&&te.message.status!=="streaming"&&I(we=>we===te.message.sessionId?null:we);break e}case"part.created":{T(we=>{const Ne=we[te.sessionId]||{},dt=Ne[te.part.messageId]||[];return{...we,[te.sessionId]:{...Ne,[te.part.messageId]:[...dt,te.part]}}});break e}case"part.updated":{T(we=>{const Ne=we[te.sessionId]||{},dt=Ne[te.part.messageId]||[];return{...we,[te.sessionId]:{...Ne,[te.part.messageId]:dt.map(Nt=>Nt.id===te.part.id?te.part:Nt)}}});break e}case"part.append":{Ht.has(te.sessionId)||I(te.sessionId),T(we=>{const Ne=we[te.sessionId]||{};for(const dt of Object.keys(Ne)){const Nt=Ne[dt],fn=Nt.findIndex(hn=>hn.id===te.partId);if(fn!==-1){const hn=Nt[fn];if(hn.type==="text"||hn.type==="reasoning"){const Wn=[...Nt];return Wn[fn]={...hn,text:hn.text+te.delta},{...we,[te.sessionId]:{...Ne,[dt]:Wn}}}}}return we});break e}case"chat.usage":{if(te.sessionId!==(v==null?void 0:v.id))return;H({promptTokens:te.usage.promptTokens,completionTokens:te.usage.completionTokens,totalTokens:te.usage.totalTokens}),ee(te.model);break e}case"error":{console.error("Server error:",te.code,te.message);break e}case"session.closed":{p(we=>we.map(Ne=>Ne.id===te.sessionId?{...Ne,status:"closed"}:Ne)),N(we=>{const Ne={...we};return delete Ne[te.sessionId],Ne}),T(we=>{const Ne={...we};return delete Ne[te.sessionId],Ne}),(v==null?void 0:v.id)===te.sessionId&&b(null);break e}case"session.reopened":{p(we=>we.map(Ne=>Ne.id===te.session.id?te.session:Ne)),(v==null?void 0:v.id)===te.session.id&&b(te.session);break e}case"session.deleted":{p(we=>we.filter(Ne=>Ne.id!==te.sessionId)),N(we=>{const Ne={...we};return delete Ne[te.sessionId],Ne}),T(we=>{const Ne={...we};return delete Ne[te.sessionId],Ne}),Gt(we=>{const Ne=new Set(we);return Ne.delete(te.sessionId),Ne}),(v==null?void 0:v.id)===te.sessionId&&b(null);break e}case"session.updated":{p(we=>we.map(Ne=>Ne.id===te.session.id?te.session:Ne)),(v==null?void 0:v.id)===te.session.id&&(b(te.session),te.session.selectedVariant!==void 0&&Q(te.session.selectedVariant));break e}case"session.renamed":{p(we=>we.map(Ne=>Ne.id===te.session.id?te.session:Ne)),(v==null?void 0:v.id)===te.session.id&&b(te.session);break e}case"permission.list":{st(te.permissions);break e}case"permissions.sync":{Ie(we=>{const Ne=new Set(we.map(YF)),dt=te.approvals.filter(Nt=>!Ne.has(Nt.toolCallId)).map(KF);return[...we,...dt]});break e}case"permission.revoked":{st(we=>we.map(Ne=>Ne.id===te.permissionId?{...Ne,revokedAt:new Date().toISOString()}:Ne));break e}case"permission.all_revoked":{st(WF);break e}case"permission.request":{const we={toolCallId:te.toolCallId,sessionId:te.sessionId,toolName:te.toolName,args:te.args,permissionType:te.permissionType,permissionKey:te.permissionKey,message:te.message,details:te.details,dangerous:te.dangerous,childSessionId:te.childSessionId,subagentName:te.subagentName};Ie(Ne=>[...Ne,we]);break e}case"permission.granted":{Ie(we=>we.filter(Ne=>Ne.toolCallId!==te.toolCallId));break e}case"session.interrupted":{Gt(we=>new Set(we).add(te.sessionId)),Z===te.sessionId&&I(null),te.result.cascadedTo.length>0&&console.log(`Session ${te.sessionId} interrupted. Cascaded to:`,te.result.cascadedTo);break e}case"queue.list":{Ve(we=>({...we,[te.sessionId]:te.messages}));break e}case"queue.added":{Ve(we=>({...we,[te.sessionId]:[...we[te.sessionId]||[],te.message]}));break e}case"queue.removed":{Ve(we=>({...we,[te.sessionId]:(we[te.sessionId]||[]).filter(Ne=>Ne.id!==te.queueId)}));break e}case"queue.sending":{Ve(we=>({...we,[te.sessionId]:(we[te.sessionId]||[]).filter(Ne=>Ne.id!==te.queueId)}));break e}case"session.reverted":{console.log(`Session reverted to message ${te.revertedTo.messageId}, removed ${te.removed.messageIds.length} messages`);break e}case"compaction.complete":{te.sessionId===(v==null?void 0:v.id)&&$r(!0);break e}case"session.forked":{const{forkedSession:we,messages:Ne}=te;p(dt=>[we,...dt]),N(dt=>({...dt,[we.id]:Ne.map(GF)})),T(dt=>{const Nt={...dt};Nt[we.id]={};for(const fn of Ne)Nt[we.id][fn.message.id]=fn.parts;return Nt}),b(we),H({promptTokens:0,completionTokens:0,totalTokens:0});break e}case"session.state":{N(we=>({...we,[te.sessionId]:te.messages.map(VF)})),T(we=>{const Ne={...we};Ne[te.sessionId]={};for(const dt of te.messages)Ne[te.sessionId][dt.message.id]=dt.parts;return Ne}),Z===te.sessionId&&I(null);break e}case"provider.status":{Xt(we=>we.find(dt=>dt.provider===te.provider)?we.map(dt=>dt.provider===te.provider?{...dt,connected:te.connected,authorizationUrl:te.authorizationUrl,error:te.error}:dt):[...we,{provider:te.provider,connected:te.connected,authorizationUrl:te.authorizationUrl,error:te.error}]);break e}case"provider.connected":Xt(we=>we.map(Ne=>Ne.provider===te.provider?{...Ne,connected:te.connected,connectedAt:te.connectedAt,accountId:te.accountId}:Ne))}},t[100]=v==null?void 0:v.id,t[101]=ie,t[102]=Ht,t[103]=q,t[104]=Z,t[105]=Ls):Ls=t[105];const Ho=Ls;let ui,Gn;t[106]!==Ho?(ui=()=>{Yt.current=Ho},Gn=[Ho],t[106]=Ho,t[107]=ui,t[108]=Gn):(ui=t[107],Gn=t[108]),D.useEffect(ui,Gn);let Is;t[109]!==j?(Is=(te,De)=>{j&&j.readyState===WebSocket.OPEN&&j.send(JSON.stringify({type:te,...De}))},t[109]=j,t[110]=Is):Is=t[110];const Oe=Is;let ir;t[111]!==(se==null?void 0:se.id)||t[112]!==Oe?(ir=(te,De)=>{Mo.current=!0,Oe("session.create",{preconfigId:te,title:De,workspaceId:se==null?void 0:se.id})},t[111]=se==null?void 0:se.id,t[112]=Oe,t[113]=ir):ir=t[113];const Cr=ir;let zi;t[114]!==(se==null?void 0:se.id)||t[115]!==Oe||t[116]!==f||t[117]!==Te?(zi=te=>{Ie(ct=>ct.filter(et=>et.sessionId!==te)),I(null),$r(!1);const De=f.find(ct=>ct.id===te);if(De!=null&&De.workspaceId&&De.workspaceId!==(se==null?void 0:se.id)){const ct=Te.find(et=>et.id===De.workspaceId);ct&&Ye(ct)}Oe("session.resume",{sessionId:te})},t[114]=se==null?void 0:se.id,t[115]=Oe,t[116]=f,t[117]=Te,t[118]=zi):zi=t[118];const kr=zi;let Pi;t[119]!==Oe?(Pi=te=>{Oe("session.close",{sessionId:te})},t[119]=Oe,t[120]=Pi):Pi=t[120];const di=Pi;let Uo;t[121]!==Oe?(Uo=(te,De)=>{Oe("session.revert",{sessionId:te,messageId:De})},t[121]=Oe,t[122]=Uo):Uo=t[122];const bn=Uo;let Er;t[123]!==Oe?(Er=(te,De)=>{Oe("session.fork",{sessionId:te,messageId:De})},t[123]=Oe,t[124]=Er):Er=t[124];const Bs=Er;let fi;t[125]!==Oe?(fi=te=>{Oe("session.compact",{sessionId:te})},t[125]=Oe,t[126]=fi):fi=t[126];const sc=fi;let zs;t[127]!==Oe?(zs=te=>{Oe("session.reopen",{sessionId:te})},t[127]=Oe,t[128]=zs):zs=t[128];const Fi=zs;let hi;t[129]!==Oe?(hi=te=>{Oe("session.delete",{sessionId:te})},t[129]=Oe,t[130]=hi):hi=t[130];const pi=hi;let $o;t[131]!==v||t[132]!==Oe?($o=te=>{v&&Oe("session.update",{sessionId:v.id,preconfigId:te})},t[131]=v,t[132]=Oe,t[133]=$o):$o=t[133];const oc=$o;let Ma;t[134]!==v||t[135]!==Oe?(Ma=(te,De)=>{ee(te),Q(null),v&&Oe("session.update_model",{sessionId:v.id,modelId:te,providerId:De})},t[134]=v,t[135]=Oe,t[136]=Ma):Ma=t[136];const ac=Ma;let Ps;t[137]!==P||t[138]!==v||t[139]!==Oe?(Ps=te=>{v&&(Oe("session.update_model",{sessionId:v.id,modelId:v.selectedModel||P,providerId:v.selectedProvider||"openai",variant:te}),Q(te))},t[137]=P,t[138]=v,t[139]=Oe,t[140]=Ps):Ps=t[140];const lc=Ps;let ja;t[141]!==Oe?(ja=(te,De)=>{Oe("session.rename",{sessionId:te,title:De})},t[141]=Oe,t[142]=ja):ja=t[142];const cc=ja;let Oa;t[143]!==v||t[144]!==kr?(Oa=()=>{v!=null&&v.parentId&&kr(v.parentId)},t[143]=v,t[144]=kr,t[145]=Oa):Oa=t[145];const uc=Oa;let qo;t[146]!==Oe?(qo=(te,De)=>{Oe("queue.add",{sessionId:te,content:De})},t[146]=Oe,t[147]=qo):qo=t[147];const dc=qo;let La;t[148]!==Oe?(La=te=>{Oe("queue.remove",{queueId:te})},t[148]=Oe,t[149]=La):La=t[149];const fc=La;let Ia;t[150]!==dc||t[151]!==v||t[152]!==Fn||t[153]!==Oe||t[154]!==Z?(Ia=te=>{!v||Fn||(v.runningAt||Z===v.id?dc(v.id,te):Oe("chat.message",{sessionId:v.id,content:te}))},t[150]=dc,t[151]=v,t[152]=Fn,t[153]=Oe,t[154]=Z,t[155]=Ia):Ia=t[155];const Vo=Ia;let Ba;t[156]!==Oe?(Ba=(te,De,ct)=>{Ie(et=>et.filter(we=>we.toolCallId!==te)),Oe("permission.response",{toolCallId:te,allowed:De,alwaysAllow:ct})},t[156]=Oe,t[157]=Ba):Ba=t[157];const hc=Ba;let za;t[158]!==v||t[159]!==Oe?(za=()=>{v&&Oe("session.interrupt",{sessionId:v.id})},t[158]=v,t[159]=Oe,t[160]=za):za=t[160];const Hi=za;let Pa;t[161]!==se||t[162]!==Oe?(Pa=()=>{se&&Oe("permission.list",{workspaceId:se.id})},t[161]=se,t[162]=Oe,t[163]=Pa):Pa=t[163];const pc=Pa;let Fa;t[164]!==Oe?(Fa=te=>{Oe("provider.connect",{provider:te})},t[164]=Oe,t[165]=Fa):Fa=t[165];const mc=Fa;let Ha;t[166]!==Oe?(Ha=te=>{Oe("provider.disconnect",{provider:te})},t[166]=Oe,t[167]=Ha):Ha=t[167];const gc=Ha;let Ua;if(t[168]!==(se==null?void 0:se.id)||t[169]!==f){let te;t[171]!==(se==null?void 0:se.id)?(te=De=>De.workspaceId===(se==null?void 0:se.id),t[171]=se==null?void 0:se.id,t[172]=te):te=t[172],Ua=f.filter(te),t[168]=se==null?void 0:se.id,t[169]=f,t[170]=Ua}else Ua=t[170];const Go=Ua;let $a;if(t[173]!==(n==null?void 0:n.id)||t[174]!==a){let te;t[176]!==(n==null?void 0:n.id)?(te=De=>De.serverId===(n==null?void 0:n.id)&&De.workspaceId,t[176]=n==null?void 0:n.id,t[177]=te):te=t[177],$a=a.filter(te).map(qF),t[173]=n==null?void 0:n.id,t[174]=a,t[175]=$a}else $a=t[175];const Ui=$a;let Ar,ut,$i,Zr,Qr,Jr,qi,sr,mi,gi;if(t[178]!==n||t[179]!==se||t[180]!==Ke||t[181]!==Ot||t[182]!==di||t[183]!==sc||t[184]!==Ur||t[185]!==V||t[186]!==en||t[187]!==Cr||t[188]!==P||t[189]!==v||t[190]!==ie||t[191]!==Bi||t[192]!==Ui||t[193]!==Bs||t[194]!==Aa||t[195]!==Os||t[196]!==wr||t[197]!==Sr||t[198]!==Hi||t[199]!==yn||t[200]!==uc||t[201]!==hc||t[202]!==cc||t[203]!==Fn||t[204]!==l||t[205]!==q||t[206]!==nr||t[207]!==Ze||t[208]!==pi||t[209]!==y||t[210]!==w||t[211]!==Dt||t[212]!==Ce||t[213]!==fc||t[214]!==Fi||t[215]!==kr||t[216]!==rn||t[217]!==bn||t[218]!==ne||t[219]!==Vo||t[220]!==Oe||t[221]!==We||t[222]!==e.length||t[223]!==B||t[224]!==f||t[225]!==Ge||t[226]!==it||t[227]!==ge||t[228]!==Z||t[229]!==ac||t[230]!==oc||t[231]!==lc||t[232]!==Go||t[233]!==Te){const te=v?Aa(v.id):[];let De;t[244]!==y?(De=y.filter($F),t[244]=y,t[245]=De):De=t[245];const ct=De;let et;t[246]!==((Va=ct[0])==null?void 0:Va.id)||t[247]!==Oe||t[248]!==Te?(et=Wt=>{var ts;Ye(Te.find(wc=>wc.id===Wt)||null),Mo.current=!0;const on=(ts=ct[0])==null?void 0:ts.id;Oe("session.create",{preconfigId:on,workspaceId:Wt})},t[246]=(Ga=ct[0])==null?void 0:Ga.id,t[247]=Oe,t[248]=Te,t[249]=et):et=t[249];const we=et;let Ne;t[250]===Symbol.for("react.memo_cache_sentinel")?(Ne=Wt=>{Ae(Wt),requestAnimationFrame(()=>{requestAnimationFrame(()=>{var on;(on=K.current)==null||on.focusSessionPanel()})})},t[250]=Ne):Ne=t[250];const dt=Ne;let Nt,fn;t[251]===Symbol.for("react.memo_cache_sentinel")?(Nt=()=>Je(!1),fn=()=>{var Wt;return(Wt=$.current)==null?void 0:Wt.focus()},t[251]=Nt,t[252]=fn):(Nt=t[251],fn=t[252]);let hn;t[253]!==se||t[254]!==Cr||t[255]!==((yc=ct[0])==null?void 0:yc.id)?(hn=()=>{var Wt;se&&Cr((Wt=ct[0])==null?void 0:Wt.id)},t[253]=se,t[254]=Cr,t[255]=(bc=ct[0])==null?void 0:bc.id,t[256]=hn):hn=t[256];let Wn;t[257]===Symbol.for("react.memo_cache_sentinel")?(Wn=()=>dt(FF),t[257]=Wn):Wn=t[257];let Ln;t[258]!==Hi||t[259]!==hn?(Ln={onCloseTerminal:Nt,focusChatInput:fn,onNewSession:hn,onNewWindow:HF,onToggleViewMode:Wn,setTerminalOpen:Je,sidebarRef:K,terminalPanelRef:G,onStopStreaming:Hi},t[258]=Hi,t[259]=hn,t[260]=Ln):Ln=t[260];const ei=Ln,Wi=!(v!=null&&v.parentId);ut=!!n;const Sc=()=>{var Wt;return e.length===0?g.jsx(Ax,{onServerAdded:Sr,error:Ot||void 0}):ut?l?g.jsx("div",{className:"flex flex-col w-full h-full items-center justify-center bg-background gap-4",children:g.jsx(Ex,{message:`Connecting to ${(n==null?void 0:n.name)||"server"}...`})}):!V&&f.length===0?en?g.jsx("div",{className:"flex w-full h-full items-center justify-center bg-background",children:g.jsx(wF,{serverUrl:We,authError:Ot,retryCount:rn,nextRetryIn:nr,onRetry:Qu,onLogout:yn})}):g.jsxs("div",{className:"flex flex-col w-full h-full items-center justify-center bg-background gap-4",children:[g.jsx(Ex,{}),g.jsx(Pe,{variant:"ghost",size:"sm",onClick:yn,className:"text-muted-foreground",children:"Change Server"})]}):g.jsx(g.Fragment,{children:v?g.jsx(aF,{inputRef:$,session:v,messagesWithParts:te,queuedMessages:Ce[v.id]||[],preconfigs:Wi?ct:y,prompts:w,models:q,connectedProviderIds:new Set(Dt.filter(PF).map(zF)),connectableProviderIds:new Set(Dt.filter(BF).map(IF)),defaultModel:ie,onSendMessage:Vo,onRemoveFromQueue:fc,onChangePreconfig:oc,onChangeModel:ac,onChangeVariant:lc,selectedVariant:ne,variants:(Wt=q.find(on=>on.id===P))==null?void 0:Wt.variants,pendingPermissions:Ze,onPermissionResponse:hc,onRename:cc,usage:B,modelName:P,onNavigateToSubagent:kr,onNavigateBack:uc,isStreaming:Z===v.id||!!v.runningAt,onInterrupt:Hi,onRevert:bn,onFork:Bs,onCompact:te.filter(LF).length>=4?()=>sc(v.id):void 0,isCompacting:Fn,compactionSuccess:Ur,onClearCompactionSuccess:()=>$r(!1),serverUrl:We!=null?We:void 0,apiToken:Ke!=null?Ke:void 0}):g.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center text-center text-muted-foreground px-6",children:[g.jsx("h2",{className:"mb-2",children:"Select or create a session"}),g.jsx("p",{children:"Choose a session from the sidebar or create a new one to start chatting."})]})}):g.jsx(Ax,{onServerAdded:Sr,error:Ot||void 0})};Ar=jj,sr=!0,t[261]!==ei?(mi=g.jsx(MF,{...ei}),t[261]=ei,t[262]=mi):mi=t[262],t[263]!==se||t[264]!==di||t[265]!==V||t[266]!==Cr||t[267]!==we||t[268]!==v||t[269]!==Bi||t[270]!==Ui||t[271]!==Os||t[272]!==wr||t[273]!==ut||t[274]!==Ze||t[275]!==pi||t[276]!==((xc=ct[0])==null?void 0:xc.id)||t[277]!==Fi||t[278]!==kr||t[279]!==f||t[280]!==ge||t[281]!==Z||t[282]!==Go||t[283]!==Te?(gi=ut&&g.jsx(Jj,{ref:K,allSessions:f,viewMode:ge,favoritedWorkspaceIds:Ui,sessions:Go,currentSession:v,currentSessionId:(Ju=v==null?void 0:v.id)!=null?Ju:null,streamingSessionId:Z,connected:V,workspaces:Te,activeWorkspace:se,onCreateSession:()=>{var Wt;return Cr((Wt=ct[0])==null?void 0:Wt.id)},onResumeSession:kr,onCloseSession:di,onReopenSession:Fi,onDeleteSession:pi,onSelectWorkspace:Ih,onCreateVirtualWorkspace:wr,onCreatePhysicalWorkspace:Os,onDeleteWorkspace:Bi,onOpenSettings:()=>nt(!0),onOpenMCP:()=>fe(!0),onOpenAddServer:()=>vn(!0),onServerSwitch:Ts,onEscape:()=>{var Wt;v&&((Wt=$.current)==null||Wt.focus())},onCreateSessionInWorkspace:we,pendingPermissions:Ze}),t[263]=se,t[264]=di,t[265]=V,t[266]=Cr,t[267]=we,t[268]=v,t[269]=Bi,t[270]=Ui,t[271]=Os,t[272]=wr,t[273]=ut,t[274]=Ze,t[275]=pi,t[276]=(ed=ct[0])==null?void 0:ed.id,t[277]=Fi,t[278]=kr,t[279]=f,t[280]=ge,t[281]=Z,t[282]=Go,t[283]=Te,t[284]=gi):gi=t[284],$i="flex-1 flex flex-col overflow-hidden",t[285]===Symbol.for("react.memo_cache_sentinel")?(Zr={paddingTop:"env(safe-area-inset-top, 0)",paddingBottom:"env(safe-area-inset-bottom, 0)"},t[285]=Zr):Zr=t[285];let Ki;t[286]!==ut?(Ki=ut&&g.jsx(Sb,{}),t[286]=ut,t[287]=Ki):Ki=t[287];let Rr;t[288]===Symbol.for("react.memo_cache_sentinel")?(Rr=g.jsx("span",{className:"font-semibold",children:"Jean2"}),t[288]=Rr):Rr=t[288];let or;t[289]!==Ki?(or=g.jsxs("div",{className:"flex items-center gap-2",children:[Ki,Rr]}),t[289]=Ki,t[290]=or):or=t[290];let _i;t[291]!==ut?(_i=ut&&g.jsx(Tx,{onServerSwitch:Ts,onSelectWorkspace:Fo}),t[291]=ut,t[292]=_i):_i=t[292];let Yi;t[293]!==ut||t[294]!==ge?(Yi=ut&&g.jsx(Rx,{viewMode:ge,onViewModeChange:dt}),t[293]=ut,t[294]=ge,t[295]=Yi):Yi=t[295];let Kn;t[296]!==se||t[297]!==ut||t[298]!==Ge?(Kn=ut&&se&&g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:()=>gt(!Ge),title:Ge?"Hide Files":"Show Files",children:g.jsx(yg,{className:"w-4 h-4"})}),t[296]=se,t[297]=ut,t[298]=Ge,t[299]=Kn):Kn=t[299];let Xi;t[300]!==se||t[301]!==ut||t[302]!==it?(Xi=ut&&se&&g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:()=>Je(!it),title:it?"Hide Terminal":"Show Terminal",children:g.jsx(N0,{className:"w-4 h-4"})}),t[300]=se,t[301]=ut,t[302]=it,t[303]=Xi):Xi=t[303];let Zi;t[304]!==_i||t[305]!==Yi||t[306]!==Kn||t[307]!==Xi?(Zi=g.jsxs("div",{className:"flex items-center gap-1",children:[_i,Yi,Kn,Xi]}),t[304]=_i,t[305]=Yi,t[306]=Kn,t[307]=Xi,t[308]=Zi):Zi=t[308],t[309]!==or||t[310]!==Zi?(Qr=g.jsxs("header",{className:"md:hidden flex items-center justify-between p-3 border-b border-border bg-background sticky top-0 z-10",children:[or,Zi]}),t[309]=or,t[310]=Zi,t[311]=Qr):Qr=t[311];let Qi;t[312]!==ut?(Qi=ut&&g.jsx(Sb,{}),t[312]=ut,t[313]=Qi):Qi=t[313];let Wa;t[314]===Symbol.for("react.memo_cache_sentinel")?(Wa=g.jsx("span",{className:"font-semibold",children:"Jean2"}),t[314]=Wa):Wa=t[314];let Hs;t[315]!==Qi?(Hs=g.jsxs("div",{className:"flex items-center gap-2",children:[Qi,Wa]}),t[315]=Qi,t[316]=Hs):Hs=t[316];let Us;t[317]!==ut?(Us=ut&&g.jsx(Tx,{onServerSwitch:Ts,onSelectWorkspace:Fo}),t[317]=ut,t[318]=Us):Us=t[318];let Ji;t[319]!==ut||t[320]!==ge?(Ji=ut&&g.jsx(Rx,{viewMode:ge,onViewModeChange:dt}),t[319]=ut,t[320]=ge,t[321]=Ji):Ji=t[321];let es;t[322]!==se||t[323]!==ut||t[324]!==Ge?(es=ut&&se&&g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:()=>gt(!Ge),title:Ge?"Hide Files":"Show Files",children:g.jsx(yg,{className:"w-4 h-4"})}),t[322]=se,t[323]=ut,t[324]=Ge,t[325]=es):es=t[325];let yi;t[326]!==se||t[327]!==ut||t[328]!==it?(yi=ut&&se&&g.jsx(Pe,{variant:"ghost",size:"icon-sm",onClick:()=>Je(!it),title:it?"Hide Terminal":"Show Terminal",children:g.jsx(N0,{className:"w-4 h-4"})}),t[326]=se,t[327]=ut,t[328]=it,t[329]=yi):yi=t[329];let xn;t[330]!==Us||t[331]!==Ji||t[332]!==es||t[333]!==yi?(xn=g.jsxs("div",{className:"flex items-center gap-2",children:[Us,Ji,es,yi]}),t[330]=Us,t[331]=Ji,t[332]=es,t[333]=yi,t[334]=xn):xn=t[334],t[335]!==Hs||t[336]!==xn?(Jr=g.jsxs("header",{className:"hidden md:flex items-center justify-between p-3 border-b border-border",children:[Hs,xn]}),t[335]=Hs,t[336]=xn,t[337]=Jr):Jr=t[337],qi=Sc(),t[178]=n,t[179]=se,t[180]=Ke,t[181]=Ot,t[182]=di,t[183]=sc,t[184]=Ur,t[185]=V,t[186]=en,t[187]=Cr,t[188]=P,t[189]=v,t[190]=ie,t[191]=Bi,t[192]=Ui,t[193]=Bs,t[194]=Aa,t[195]=Os,t[196]=wr,t[197]=Sr,t[198]=Hi,t[199]=yn,t[200]=uc,t[201]=hc,t[202]=cc,t[203]=Fn,t[204]=l,t[205]=q,t[206]=nr,t[207]=Ze,t[208]=pi,t[209]=y,t[210]=w,t[211]=Dt,t[212]=Ce,t[213]=fc,t[214]=Fi,t[215]=kr,t[216]=rn,t[217]=bn,t[218]=ne,t[219]=Vo,t[220]=Oe,t[221]=We,t[222]=e.length,t[223]=B,t[224]=f,t[225]=Ge,t[226]=it,t[227]=ge,t[228]=Z,t[229]=ac,t[230]=oc,t[231]=lc,t[232]=Go,t[233]=Te,t[234]=Ar,t[235]=ut,t[236]=$i,t[237]=Zr,t[238]=Qr,t[239]=Jr,t[240]=qi,t[241]=sr,t[242]=mi,t[243]=gi}else Ar=t[234],ut=t[235],$i=t[236],Zr=t[237],Qr=t[238],Jr=t[239],qi=t[240],sr=t[241],mi=t[242],gi=t[243];let Fs;t[338]!==(se==null?void 0:se.id)||t[339]!==(se==null?void 0:se.name)||t[340]!==(se==null?void 0:se.path)||t[341]!==Ke||t[342]!==ut||t[343]!==We||t[344]!==it?(Fs=ut&&g.jsx(S8,{ref:G,workspaceId:se==null?void 0:se.id,workspacePath:se==null?void 0:se.path,workspaceName:se==null?void 0:se.name,serverUrl:We!=null?We:void 0,apiToken:Ke!=null?Ke:void 0,isOpen:it,onClose:()=>Je(!1)}),t[338]=se==null?void 0:se.id,t[339]=se==null?void 0:se.name,t[340]=se==null?void 0:se.path,t[341]=Ke,t[342]=ut,t[343]=We,t[344]=it,t[345]=Fs):Fs=t[345];let Vi;t[346]!==$i||t[347]!==Zr||t[348]!==Qr||t[349]!==Jr||t[350]!==qi||t[351]!==Fs?(Vi=g.jsxs("main",{className:$i,style:Zr,children:[Qr,Jr,qi,Fs]}),t[346]=$i,t[347]=Zr,t[348]=Qr,t[349]=Jr,t[350]=qi,t[351]=Fs,t[352]=Vi):Vi=t[352];let Gi;t[353]!==(se==null?void 0:se.id)||t[354]!==(se==null?void 0:se.path)||t[355]!==Ke||t[356]!==mc||t[357]!==gc||t[358]!==yn||t[359]!==ut||t[360]!==Le||t[361]!==Dt||t[362]!==pc||t[363]!==Oe||t[364]!==We||t[365]!==Ge||t[366]!==at||t[367]!==rt?(Gi=ut&&g.jsxs(g.Fragment,{children:[g.jsx(a8,{workspaceId:se==null?void 0:se.id,serverUrl:We!=null?We:void 0,apiToken:Ke!=null?Ke:void 0,isOpen:Ge,onClose:()=>gt(!1)}),g.jsx(vF,{open:rt,onOpenChange:nt,permissions:Le,onRefreshPermissions:pc,onRevokePermission:te=>{Oe("permission.revoke",{permissionId:te})},onRevokeAllPermissions:()=>{Oe("permission.revoke_all",{workspaceId:se==null?void 0:se.id})},apiToken:Ke,onLogout:yn,providerStatuses:Dt,onConnectProvider:mc,onDisconnectProvider:gc}),g.jsx(SF,{open:at,onOpenChange:fe,workspaceId:se==null?void 0:se.id,workspacePath:se==null?void 0:se.path,serverUrl:We!=null?We:void 0,apiToken:Ke!=null?Ke:void 0})]}),t[353]=se==null?void 0:se.id,t[354]=se==null?void 0:se.path,t[355]=Ke,t[356]=mc,t[357]=gc,t[358]=yn,t[359]=ut,t[360]=Le,t[361]=Dt,t[362]=pc,t[363]=Oe,t[364]=We,t[365]=Ge,t[366]=at,t[367]=rt,t[368]=Gi):Gi=t[368];let vi;t[369]===Symbol.for("react.memo_cache_sentinel")?(vi=te=>{vn(te),te||Do(null)},t[369]=vi):vi=t[369];let Tr;t[370]!==Vt||t[371]!==Et?(Tr=g.jsx(CF,{open:Et,onOpenChange:vi,editServer:Vt}),t[370]=Vt,t[371]=Et,t[372]=Tr):Tr=t[372];let qa;return t[373]!==Ar||t[374]!==sr||t[375]!==mi||t[376]!==gi||t[377]!==Vi||t[378]!==Gi||t[379]!==Tr?(qa=g.jsxs(Ar,{defaultOpen:sr,children:[mi,gi,Vi,Gi,Tr]}),t[373]=Ar,t[374]=sr,t[375]=mi,t[376]=gi,t[377]=Vi,t[378]=Gi,t[379]=Tr,t[380]=qa):qa=t[380],qa}function LF(t){return t.message.role!=="system"}function IF(t){return t.provider}function BF(t){return t.connectable}function zF(t){return t.provider}function PF(t){return t.connected}function FF(t){return t==="overview"?"default":"overview"}function HF(){Jg("create_new_window").catch(UF)}function UF(){}function $F(t){return t.mode!=="subagent"}function qF(t){return t.workspaceId}function VF(t){return t.message}function GF(t){return t.message}function WF(t){const e=new Date().toISOString();return t.map(n=>({...n,revokedAt:e}))}function KF(t){return{toolCallId:t.toolCallId,sessionId:t.sessionId,toolName:t.toolName,args:t.args,permissionType:t.permissionType,permissionKey:t.permissionKey,message:t.message,details:t.details,dangerous:t.dangerous,childSessionId:t.childSessionId,subagentName:t.subagentName}}function YF(t){return t.toolCallId}function XF(t){return t.message}function ZF(t){return t.json()}function QF(t){return t.json()}function JF(t){return t.json()}function eH(t){return t.json()}function tH(t){return t.json()}function nH(t){return t.json()}function rH(t){return t+1}function iH(t){return t+1}function sH(t){return t+1}function oH(t){return t+1}function aH(t){return t+1}function lH(t){console.error("WebSocket error:",t)}function cH(t,e){return t.createdAt-e.createdAt}function uH(t){return t+1}function dH(t){return t+1}function fH(){return localStorage.getItem("jean2_sidebar_view")||"default"}function hH(){const t=me.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=g.jsx(R5,{children:g.jsx(OF,{})}),t[0]=e):e=t[0],e}pE.createRoot(document.getElementById("root")).render(g.jsx(D.StrictMode,{children:g.jsx(_E,{defaultMode:"system",defaultScheme:"neutral",children:g.jsx(hH,{})})}));