tinker-electron-debug 0.1.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,167 @@
1
+ var k0=Object.defineProperty;var N0=(e,t,i)=>t in e?k0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i;var Fi=(e,t,i)=>N0(e,typeof t!="symbol"?t+"":t,i);function H0(e,t){for(var i=0;i<t.length;i++){const r=t[i];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const a=Object.getOwnPropertyDescriptor(r,s);a&&Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function i(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=i(s);fetch(s.href,a)}})();function rh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $_={exports:{}},sl={};/**
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 z0=Symbol.for("react.transitional.element"),P0=Symbol.for("react.fragment");function q_(e,t,i){var r=null;if(i!==void 0&&(r=""+i),t.key!==void 0&&(r=""+t.key),"key"in t){i={};for(var s in t)s!=="key"&&(i[s]=t[s])}else i=t;return t=i.ref,{$$typeof:z0,type:e,key:r,ref:t!==void 0?t:null,props:i}}sl.Fragment=P0;sl.jsx=q_;sl.jsxs=q_;$_.exports=sl;var G=$_.exports,W_={exports:{}},nl={},V_={exports:{}},G_={};/**
10
+ * @license React
11
+ * scheduler.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
+ */(function(e){function t(N,P){var z=N.length;N.push(P);e:for(;0<z;){var L=z-1>>>1,M=N[L];if(0<s(M,P))N[L]=P,N[z]=M,z=L;else break e}}function i(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var P=N[0],z=N.pop();if(z!==P){N[0]=z;e:for(var L=0,M=N.length,k=M>>>1;L<k;){var H=2*(L+1)-1,$=N[H],V=H+1,Z=N[V];if(0>s($,z))V<M&&0>s(Z,$)?(N[L]=Z,N[V]=z,L=V):(N[L]=$,N[H]=z,L=H);else if(V<M&&0>s(Z,z))N[L]=Z,N[V]=z,L=V;else break e}}return P}function s(N,P){var z=N.sortIndex-P.sortIndex;return z!==0?z:N.id-P.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var c=Date,n=c.now();e.unstable_now=function(){return c.now()-n}}var o=[],d=[],v=1,f=null,g=3,S=!1,C=!1,p=!1,h=!1,_=typeof setTimeout=="function"?setTimeout:null,l=typeof clearTimeout=="function"?clearTimeout:null,u=typeof setImmediate<"u"?setImmediate:null;function m(N){for(var P=i(d);P!==null;){if(P.callback===null)r(d);else if(P.startTime<=N)r(d),P.sortIndex=P.expirationTime,t(o,P);else break;P=i(d)}}function w(N){if(p=!1,m(N),!C)if(i(o)!==null)C=!0,y||(y=!0,R());else{var P=i(d);P!==null&&U(w,P.startTime-N)}}var y=!1,E=-1,b=5,x=-1;function A(){return h?!0:!(e.unstable_now()-x<b)}function O(){if(h=!1,y){var N=e.unstable_now();x=N;var P=!0;try{e:{C=!1,p&&(p=!1,l(E),E=-1),S=!0;var z=g;try{t:{for(m(N),f=i(o);f!==null&&!(f.expirationTime>N&&A());){var L=f.callback;if(typeof L=="function"){f.callback=null,g=f.priorityLevel;var M=L(f.expirationTime<=N);if(N=e.unstable_now(),typeof M=="function"){f.callback=M,m(N),P=!0;break t}f===i(o)&&r(o),m(N)}else r(o);f=i(o)}if(f!==null)P=!0;else{var k=i(d);k!==null&&U(w,k.startTime-N),P=!1}}break e}finally{f=null,g=z,S=!1}P=void 0}}finally{P?R():y=!1}}}var R;if(typeof u=="function")R=function(){u(O)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,B=D.port2;D.port1.onmessage=O,R=function(){B.postMessage(null)}}else R=function(){_(O,0)};function U(N,P){E=_(function(){N(e.unstable_now())},P)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(N){N.callback=null},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(N){switch(g){case 1:case 2:case 3:var P=3;break;default:P=g}var z=g;g=P;try{return N()}finally{g=z}},e.unstable_requestPaint=function(){h=!0},e.unstable_runWithPriority=function(N,P){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var z=g;g=N;try{return P()}finally{g=z}},e.unstable_scheduleCallback=function(N,P,z){var L=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?L+z:L):z=L,N){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=z+M,N={id:v++,callback:P,priorityLevel:N,startTime:z,expirationTime:M,sortIndex:-1},z>L?(N.sortIndex=z,t(d,N),i(o)===null&&N===i(d)&&(p?(l(E),E=-1):p=!0,U(w,z-L))):(N.sortIndex=M,t(o,N),C||S||(C=!0,y||(y=!0,R()))),N},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(N){var P=g;return function(){var z=g;g=P;try{return N.apply(this,arguments)}finally{g=z}}}})(G_);V_.exports=G_;var U0=V_.exports,K_={exports:{}},ne={};/**
18
+ * @license React
19
+ * react.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 sh=Symbol.for("react.transitional.element"),j0=Symbol.for("react.portal"),I0=Symbol.for("react.fragment"),F0=Symbol.for("react.strict_mode"),$0=Symbol.for("react.profiler"),q0=Symbol.for("react.consumer"),W0=Symbol.for("react.context"),V0=Symbol.for("react.forward_ref"),G0=Symbol.for("react.suspense"),K0=Symbol.for("react.memo"),Y_=Symbol.for("react.lazy"),Y0=Symbol.for("react.activity"),bf=Symbol.iterator;function X0(e){return e===null||typeof e!="object"?null:(e=bf&&e[bf]||e["@@iterator"],typeof e=="function"?e:null)}var X_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Z_=Object.assign,Q_={};function Ks(e,t,i){this.props=e,this.context=t,this.refs=Q_,this.updater=i||X_}Ks.prototype.isReactComponent={};Ks.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Ks.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function J_(){}J_.prototype=Ks.prototype;function nh(e,t,i){this.props=e,this.context=t,this.refs=Q_,this.updater=i||X_}var ah=nh.prototype=new J_;ah.constructor=nh;Z_(ah,Ks.prototype);ah.isPureReactComponent=!0;var Cf=Array.isArray;function jc(){}var Be={H:null,A:null,T:null,S:null},ev=Object.prototype.hasOwnProperty;function oh(e,t,i){var r=i.ref;return{$$typeof:sh,type:e,key:t,ref:r!==void 0?r:null,props:i}}function Z0(e,t){return oh(e.type,t,e.props)}function lh(e){return typeof e=="object"&&e!==null&&e.$$typeof===sh}function Q0(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(i){return t[i]})}var wf=/\/+/g;function Ul(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Q0(""+e.key):t.toString(36)}function J0(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(jc,jc):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function os(e,t,i,r,s){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var c=!1;if(e===null)c=!0;else switch(a){case"bigint":case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case sh:case j0:c=!0;break;case Y_:return c=e._init,os(c(e._payload),t,i,r,s)}}if(c)return s=s(e),c=r===""?"."+Ul(e,0):r,Cf(s)?(i="",c!=null&&(i=c.replace(wf,"$&/")+"/"),os(s,t,i,"",function(d){return d})):s!=null&&(lh(s)&&(s=Z0(s,i+(s.key==null||e&&e.key===s.key?"":(""+s.key).replace(wf,"$&/")+"/")+c)),t.push(s)),1;c=0;var n=r===""?".":r+":";if(Cf(e))for(var o=0;o<e.length;o++)r=e[o],a=n+Ul(r,o),c+=os(r,t,i,a,s);else if(o=X0(e),typeof o=="function")for(e=o.call(e),o=0;!(r=e.next()).done;)r=r.value,a=n+Ul(r,o++),c+=os(r,t,i,a,s);else if(a==="object"){if(typeof e.then=="function")return os(J0(e),t,i,r,s);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return c}function wa(e,t,i){if(e==null)return e;var r=[],s=0;return os(e,r,"","",function(a){return t.call(i,a,s++)}),r}function eS(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(i){(e._status===0||e._status===-1)&&(e._status=1,e._result=i)},function(i){(e._status===0||e._status===-1)&&(e._status=2,e._result=i)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ef=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},tS={map:wa,forEach:function(e,t,i){wa(e,function(){t.apply(this,arguments)},i)},count:function(e){var t=0;return wa(e,function(){t++}),t},toArray:function(e){return wa(e,function(t){return t})||[]},only:function(e){if(!lh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ne.Activity=Y0;ne.Children=tS;ne.Component=Ks;ne.Fragment=I0;ne.Profiler=$0;ne.PureComponent=nh;ne.StrictMode=F0;ne.Suspense=G0;ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Be;ne.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Be.H.useMemoCache(e)}};ne.cache=function(e){return function(){return e.apply(null,arguments)}};ne.cacheSignal=function(){return null};ne.cloneElement=function(e,t,i){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=Z_({},e.props),s=e.key;if(t!=null)for(a in t.key!==void 0&&(s=""+t.key),t)!ev.call(t,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=i;else if(1<a){for(var c=Array(a),n=0;n<a;n++)c[n]=arguments[n+2];r.children=c}return oh(e.type,s,r)};ne.createContext=function(e){return e={$$typeof:W0,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:q0,_context:e},e};ne.createElement=function(e,t,i){var r,s={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=""+t.key),t)ev.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(s[r]=t[r]);var c=arguments.length-2;if(c===1)s.children=i;else if(1<c){for(var n=Array(c),o=0;o<c;o++)n[o]=arguments[o+2];s.children=n}if(e&&e.defaultProps)for(r in c=e.defaultProps,c)s[r]===void 0&&(s[r]=c[r]);return oh(e,a,s)};ne.createRef=function(){return{current:null}};ne.forwardRef=function(e){return{$$typeof:V0,render:e}};ne.isValidElement=lh;ne.lazy=function(e){return{$$typeof:Y_,_payload:{_status:-1,_result:e},_init:eS}};ne.memo=function(e,t){return{$$typeof:K0,type:e,compare:t===void 0?null:t}};ne.startTransition=function(e){var t=Be.T,i={};Be.T=i;try{var r=e(),s=Be.S;s!==null&&s(i,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(jc,Ef)}catch(a){Ef(a)}finally{t!==null&&i.types!==null&&(t.types=i.types),Be.T=t}};ne.unstable_useCacheRefresh=function(){return Be.H.useCacheRefresh()};ne.use=function(e){return Be.H.use(e)};ne.useActionState=function(e,t,i){return Be.H.useActionState(e,t,i)};ne.useCallback=function(e,t){return Be.H.useCallback(e,t)};ne.useContext=function(e){return Be.H.useContext(e)};ne.useDebugValue=function(){};ne.useDeferredValue=function(e,t){return Be.H.useDeferredValue(e,t)};ne.useEffect=function(e,t){return Be.H.useEffect(e,t)};ne.useEffectEvent=function(e){return Be.H.useEffectEvent(e)};ne.useId=function(){return Be.H.useId()};ne.useImperativeHandle=function(e,t,i){return Be.H.useImperativeHandle(e,t,i)};ne.useInsertionEffect=function(e,t){return Be.H.useInsertionEffect(e,t)};ne.useLayoutEffect=function(e,t){return Be.H.useLayoutEffect(e,t)};ne.useMemo=function(e,t){return Be.H.useMemo(e,t)};ne.useOptimistic=function(e,t){return Be.H.useOptimistic(e,t)};ne.useReducer=function(e,t,i){return Be.H.useReducer(e,t,i)};ne.useRef=function(e){return Be.H.useRef(e)};ne.useState=function(e){return Be.H.useState(e)};ne.useSyncExternalStore=function(e,t,i){return Be.H.useSyncExternalStore(e,t,i)};ne.useTransition=function(){return Be.H.useTransition()};ne.version="19.2.4";K_.exports=ne;var I=K_.exports;const Ic=rh(I),tv=H0({__proto__:null,default:Ic},[I]);var iv={exports:{}},lt={};/**
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 iS=I;function rv(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function $i(){}var ot={d:{f:$i,r:function(){throw Error(rv(522))},D:$i,C:$i,L:$i,m:$i,X:$i,S:$i,M:$i},p:0,findDOMNode:null},rS=Symbol.for("react.portal");function sS(e,t,i){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:rS,key:r==null?null:""+r,children:e,containerInfo:t,implementation:i}}var Sn=iS.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function al(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}lt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ot;lt.createPortal=function(e,t){var i=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(rv(299));return sS(e,t,null,i)};lt.flushSync=function(e){var t=Sn.T,i=ot.p;try{if(Sn.T=null,ot.p=2,e)return e()}finally{Sn.T=t,ot.p=i,ot.d.f()}};lt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,ot.d.C(e,t))};lt.prefetchDNS=function(e){typeof e=="string"&&ot.d.D(e)};lt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var i=t.as,r=al(i,t.crossOrigin),s=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;i==="style"?ot.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:s,fetchPriority:a}):i==="script"&&ot.d.X(e,{crossOrigin:r,integrity:s,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};lt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var i=al(t.as,t.crossOrigin);ot.d.M(e,{crossOrigin:i,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&ot.d.M(e)};lt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var i=t.as,r=al(i,t.crossOrigin);ot.d.L(e,i,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};lt.preloadModule=function(e,t){if(typeof e=="string")if(t){var i=al(t.as,t.crossOrigin);ot.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:i,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else ot.d.m(e)};lt.requestFormReset=function(e){ot.d.r(e)};lt.unstable_batchedUpdates=function(e,t){return e(t)};lt.useFormState=function(e,t,i){return Sn.H.useFormState(e,t,i)};lt.useFormStatus=function(){return Sn.H.useHostTransitionStatus()};lt.version="19.2.4";function sv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(sv)}catch(e){console.error(e)}}sv(),iv.exports=lt;var ol=iv.exports;const nS=rh(ol);/**
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 Ye=U0,nv=I,aS=ol;function q(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function av(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ia(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function ov(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function lv(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function xf(e){if(ia(e)!==e)throw Error(q(188))}function oS(e){var t=e.alternate;if(!t){if(t=ia(e),t===null)throw Error(q(188));return t!==e?null:e}for(var i=e,r=t;;){var s=i.return;if(s===null)break;var a=s.alternate;if(a===null){if(r=s.return,r!==null){i=r;continue}break}if(s.child===a.child){for(a=s.child;a;){if(a===i)return xf(s),e;if(a===r)return xf(s),t;a=a.sibling}throw Error(q(188))}if(i.return!==r.return)i=s,r=a;else{for(var c=!1,n=s.child;n;){if(n===i){c=!0,i=s,r=a;break}if(n===r){c=!0,r=s,i=a;break}n=n.sibling}if(!c){for(n=a.child;n;){if(n===i){c=!0,i=a,r=s;break}if(n===r){c=!0,r=a,i=s;break}n=n.sibling}if(!c)throw Error(q(189))}}if(i.alternate!==r)throw Error(q(190))}if(i.tag!==3)throw Error(q(188));return i.stateNode.current===i?e:t}function cv(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=cv(e),t!==null)return t;e=e.sibling}return null}var ke=Object.assign,lS=Symbol.for("react.element"),Ea=Symbol.for("react.transitional.element"),_n=Symbol.for("react.portal"),us=Symbol.for("react.fragment"),uv=Symbol.for("react.strict_mode"),Fc=Symbol.for("react.profiler"),hv=Symbol.for("react.consumer"),xi=Symbol.for("react.context"),ch=Symbol.for("react.forward_ref"),$c=Symbol.for("react.suspense"),qc=Symbol.for("react.suspense_list"),uh=Symbol.for("react.memo"),Wi=Symbol.for("react.lazy"),Wc=Symbol.for("react.activity"),cS=Symbol.for("react.memo_cache_sentinel"),Af=Symbol.iterator;function an(e){return e===null||typeof e!="object"?null:(e=Af&&e[Af]||e["@@iterator"],typeof e=="function"?e:null)}var uS=Symbol.for("react.client.reference");function Vc(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===uS?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case us:return"Fragment";case Fc:return"Profiler";case uv:return"StrictMode";case $c:return"Suspense";case qc:return"SuspenseList";case Wc:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _n:return"Portal";case xi:return e.displayName||"Context";case hv:return(e._context.displayName||"Context")+".Consumer";case ch:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case uh:return t=e.displayName||null,t!==null?t:Vc(e.type)||"Memo";case Wi:t=e._payload,e=e._init;try{return Vc(e(t))}catch{}}return null}var vn=Array.isArray,re=nv.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ye=aS.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ar={pending:!1,data:null,method:null,action:null},Gc=[],hs=-1;function di(e){return{current:e}}function Qe(e){0>hs||(e.current=Gc[hs],Gc[hs]=null,hs--)}function Oe(e,t){hs++,Gc[hs]=e.current,e.current=t}var ci=di(null),zn=di(null),rr=di(null),go=di(null);function po(e,t){switch(Oe(rr,t),Oe(zn,e),Oe(ci,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Td(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Td(t),e=Mp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Qe(ci),Oe(ci,e)}function Bs(){Qe(ci),Qe(zn),Qe(rr)}function Kc(e){e.memoizedState!==null&&Oe(go,e);var t=ci.current,i=Mp(t,e.type);t!==i&&(Oe(zn,e),Oe(ci,i))}function mo(e){zn.current===e&&(Qe(ci),Qe(zn)),go.current===e&&(Qe(go),Kn._currentValue=Ar)}var jl,Lf;function Cr(e){if(jl===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);jl=t&&t[1]||"",Lf=-1<i.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+jl+e+Lf}var Il=!1;function Fl(e,t){if(!e||Il)return"";Il=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(S){var g=S}Reflect.construct(e,[],f)}else{try{f.call()}catch(S){g=S}e.call(f.prototype)}}else{try{throw Error()}catch(S){g=S}(f=e())&&typeof f.catch=="function"&&f.catch(function(){})}}catch(S){if(S&&g&&typeof S.stack=="string")return[S.stack,g.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=r.DetermineComponentFrameRoot(),c=a[0],n=a[1];if(c&&n){var o=c.split(`
44
+ `),d=n.split(`
45
+ `);for(s=r=0;r<o.length&&!o[r].includes("DetermineComponentFrameRoot");)r++;for(;s<d.length&&!d[s].includes("DetermineComponentFrameRoot");)s++;if(r===o.length||s===d.length)for(r=o.length-1,s=d.length-1;1<=r&&0<=s&&o[r]!==d[s];)s--;for(;1<=r&&0<=s;r--,s--)if(o[r]!==d[s]){if(r!==1||s!==1)do if(r--,s--,0>s||o[r]!==d[s]){var v=`
46
+ `+o[r].replace(" at new "," at ");return e.displayName&&v.includes("<anonymous>")&&(v=v.replace("<anonymous>",e.displayName)),v}while(1<=r&&0<=s);break}}}finally{Il=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Cr(i):""}function hS(e,t){switch(e.tag){case 26:case 27:case 5:return Cr(e.type);case 16:return Cr("Lazy");case 13:return e.child!==t&&t!==null?Cr("Suspense Fallback"):Cr("Suspense");case 19:return Cr("SuspenseList");case 0:case 15:return Fl(e.type,!1);case 11:return Fl(e.type.render,!1);case 1:return Fl(e.type,!0);case 31:return Cr("Activity");default:return""}}function Of(e){try{var t="",i=null;do t+=hS(e,i),i=e,e=e.return;while(e);return t}catch(r){return`
47
+ Error generating stack: `+r.message+`
48
+ `+r.stack}}var Yc=Object.prototype.hasOwnProperty,hh=Ye.unstable_scheduleCallback,$l=Ye.unstable_cancelCallback,fS=Ye.unstable_shouldYield,dS=Ye.unstable_requestPaint,Et=Ye.unstable_now,_S=Ye.unstable_getCurrentPriorityLevel,fv=Ye.unstable_ImmediatePriority,dv=Ye.unstable_UserBlockingPriority,So=Ye.unstable_NormalPriority,vS=Ye.unstable_LowPriority,_v=Ye.unstable_IdlePriority,gS=Ye.log,pS=Ye.unstable_setDisableYieldValue,ra=null,xt=null;function Zi(e){if(typeof gS=="function"&&pS(e),xt&&typeof xt.setStrictMode=="function")try{xt.setStrictMode(ra,e)}catch{}}var At=Math.clz32?Math.clz32:yS,mS=Math.log,SS=Math.LN2;function yS(e){return e>>>=0,e===0?32:31-(mS(e)/SS|0)|0}var xa=256,Aa=262144,La=4194304;function wr(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ll(e,t,i){var r=e.pendingLanes;if(r===0)return 0;var s=0,a=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var n=r&134217727;return n!==0?(r=n&~a,r!==0?s=wr(r):(c&=n,c!==0?s=wr(c):i||(i=n&~e,i!==0&&(s=wr(i))))):(n=r&~a,n!==0?s=wr(n):c!==0?s=wr(c):i||(i=r&~e,i!==0&&(s=wr(i)))),s===0?0:t!==0&&t!==s&&!(t&a)&&(a=s&-s,i=t&-t,a>=i||a===32&&(i&4194048)!==0)?t:s}function sa(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function bS(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 vv(){var e=La;return La<<=1,!(La&62914560)&&(La=4194304),e}function ql(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function na(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function CS(e,t,i,r,s,a){var c=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var n=e.entanglements,o=e.expirationTimes,d=e.hiddenUpdates;for(i=c&~i;0<i;){var v=31-At(i),f=1<<v;n[v]=0,o[v]=-1;var g=d[v];if(g!==null)for(d[v]=null,v=0;v<g.length;v++){var S=g[v];S!==null&&(S.lane&=-536870913)}i&=~f}r!==0&&gv(e,r,0),a!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=a&~(c&~t))}function gv(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-At(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|i&261930}function pv(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var r=31-At(i),s=1<<r;s&t|e[r]&t&&(e[r]|=t),i&=~s}}function mv(e,t){var i=t&-t;return i=i&42?1:fh(i),i&(e.suspendedLanes|t)?0:i}function fh(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function dh(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Sv(){var e=ye.p;return e!==0?e:(e=window.event,e===void 0?32:Fp(e.type))}function Rf(e,t){var i=ye.p;try{return ye.p=e,t()}finally{ye.p=i}}var pr=Math.random().toString(36).slice(2),et="__reactFiber$"+pr,vt="__reactProps$"+pr,Ys="__reactContainer$"+pr,Xc="__reactEvents$"+pr,wS="__reactListeners$"+pr,ES="__reactHandles$"+pr,Df="__reactResources$"+pr,aa="__reactMarker$"+pr;function _h(e){delete e[et],delete e[vt],delete e[Xc],delete e[wS],delete e[ES]}function fs(e){var t=e[et];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Ys]||i[et]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=zd(e);e!==null;){if(i=e[et])return i;e=zd(e)}return t}e=i,i=e.parentNode}return null}function Xs(e){if(e=e[et]||e[Ys]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function gn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(q(33))}function xs(e){var t=e[Df];return t||(t=e[Df]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ze(e){e[aa]=!0}var yv=new Set,bv={};function $r(e,t){ks(e,t),ks(e+"Capture",t)}function ks(e,t){for(bv[e]=t,e=0;e<t.length;e++)yv.add(t[e])}var xS=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]*$"),Mf={},Tf={};function AS(e){return Yc.call(Tf,e)?!0:Yc.call(Mf,e)?!1:xS.test(e)?Tf[e]=!0:(Mf[e]=!0,!1)}function Ya(e,t,i){if(AS(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function Oa(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function gi(e,t,i,r){if(r===null)e.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+r)}}function Bt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Cv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function LS(e,t,i){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(c){i=""+c,a.call(this,c)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(c){i=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zc(e){if(!e._valueTracker){var t=Cv(e)?"checked":"value";e._valueTracker=LS(e,t,""+e[t])}}function wv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),r="";return e&&(r=Cv(e)?e.checked?"true":"false":e.value),e=r,e!==i?(t.setValue(e),!0):!1}function yo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var OS=/[\n"\\]/g;function Ht(e){return e.replace(OS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Qc(e,t,i,r,s,a,c,n){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.type=c:e.removeAttribute("type"),t!=null?c==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Bt(t)):e.value!==""+Bt(t)&&(e.value=""+Bt(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?Jc(e,c,Bt(t)):i!=null?Jc(e,c,Bt(i)):r!=null&&e.removeAttribute("value"),s==null&&a!=null&&(e.defaultChecked=!!a),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"?e.name=""+Bt(n):e.removeAttribute("name")}function Ev(e,t,i,r,s,a,c,n){if(a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.type=a),t!=null||i!=null){if(!(a!=="submit"&&a!=="reset"||t!=null)){Zc(e);return}i=i!=null?""+Bt(i):"",t=t!=null?""+Bt(t):i,n||t===e.value||(e.value=t),e.defaultValue=t}r=r??s,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=n?e.checked:!!r,e.defaultChecked=!!r,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),Zc(e)}function Jc(e,t,i){t==="number"&&yo(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function As(e,t,i,r){if(e=e.options,t){t={};for(var s=0;s<i.length;s++)t["$"+i[s]]=!0;for(i=0;i<e.length;i++)s=t.hasOwnProperty("$"+e[i].value),e[i].selected!==s&&(e[i].selected=s),s&&r&&(e[i].defaultSelected=!0)}else{for(i=""+Bt(i),t=null,s=0;s<e.length;s++){if(e[s].value===i){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function xv(e,t,i){if(t!=null&&(t=""+Bt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Bt(i):""}function Av(e,t,i,r){if(t==null){if(r!=null){if(i!=null)throw Error(q(92));if(vn(r)){if(1<r.length)throw Error(q(93));r=r[0]}i=r}i==null&&(i=""),t=i}i=Bt(t),e.defaultValue=i,r=e.textContent,r===i&&r!==""&&r!==null&&(e.value=r),Zc(e)}function Ns(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var RS=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 Bf(e,t,i){var r=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,i):typeof i!="number"||i===0||RS.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Lv(e,t,i){if(t!=null&&typeof t!="object")throw Error(q(62));if(e=e.style,i!=null){for(var r in i)!i.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var s in t)r=t[s],t.hasOwnProperty(s)&&i[s]!==r&&Bf(e,s,r)}else for(var a in t)t.hasOwnProperty(a)&&Bf(e,a,t[a])}function vh(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var DS=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"]]),MS=/^[\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 Xa(e){return MS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ai(){}var eu=null;function gh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ds=null,Ls=null;function kf(e){var t=Xs(e);if(t&&(e=t.stateNode)){var i=e[vt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Qc(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Ht(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var r=i[t];if(r!==e&&r.form===e.form){var s=r[vt]||null;if(!s)throw Error(q(90));Qc(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<i.length;t++)r=i[t],r.form===e.form&&wv(r)}break e;case"textarea":xv(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&As(e,!!i.multiple,t,!1)}}}var Wl=!1;function Ov(e,t,i){if(Wl)return e(t,i);Wl=!0;try{var r=e(t);return r}finally{if(Wl=!1,(ds!==null||Ls!==null)&&(yl(),ds&&(t=ds,e=Ls,Ls=ds=null,kf(t),e)))for(t=0;t<e.length;t++)kf(e[t])}}function Pn(e,t){var i=e.stateNode;if(i===null)return null;var r=i[vt]||null;if(r===null)return null;i=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(q(231,t,typeof i));return i}var Bi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tu=!1;if(Bi)try{var on={};Object.defineProperty(on,"passive",{get:function(){tu=!0}}),window.addEventListener("test",on,on),window.removeEventListener("test",on,on)}catch{tu=!1}var Qi=null,ph=null,Za=null;function Rv(){if(Za)return Za;var e,t=ph,i=t.length,r,s="value"in Qi?Qi.value:Qi.textContent,a=s.length;for(e=0;e<i&&t[e]===s[e];e++);var c=i-e;for(r=1;r<=c&&t[i-r]===s[a-r];r++);return Za=s.slice(e,1<r?1-r:void 0)}function Qa(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ra(){return!0}function Nf(){return!1}function gt(e){function t(i,r,s,a,c){this._reactName=i,this._targetInst=s,this.type=r,this.nativeEvent=a,this.target=c,this.currentTarget=null;for(var n in e)e.hasOwnProperty(n)&&(i=e[n],this[n]=i?i(a):a[n]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Ra:Nf,this.isPropagationStopped=Nf,this}return ke(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Ra)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Ra)},persist:function(){},isPersistent:Ra}),t}var qr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cl=gt(qr),oa=ke({},qr,{view:0,detail:0}),TS=gt(oa),Vl,Gl,ln,ul=ke({},oa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mh,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&e.type==="mousemove"?(Vl=e.screenX-ln.screenX,Gl=e.screenY-ln.screenY):Gl=Vl=0,ln=e),Vl)},movementY:function(e){return"movementY"in e?e.movementY:Gl}}),Hf=gt(ul),BS=ke({},ul,{dataTransfer:0}),kS=gt(BS),NS=ke({},oa,{relatedTarget:0}),Kl=gt(NS),HS=ke({},qr,{animationName:0,elapsedTime:0,pseudoElement:0}),zS=gt(HS),PS=ke({},qr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),US=gt(PS),jS=ke({},qr,{data:0}),zf=gt(jS),IS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},FS={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"},$S={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$S[e])?!!t[e]:!1}function mh(){return qS}var WS=ke({},oa,{key:function(e){if(e.key){var t=IS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Qa(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?FS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mh,charCode:function(e){return e.type==="keypress"?Qa(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Qa(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),VS=gt(WS),GS=ke({},ul,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pf=gt(GS),KS=ke({},oa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mh}),YS=gt(KS),XS=ke({},qr,{propertyName:0,elapsedTime:0,pseudoElement:0}),ZS=gt(XS),QS=ke({},ul,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),JS=gt(QS),ey=ke({},qr,{newState:0,oldState:0}),ty=gt(ey),iy=[9,13,27,32],Sh=Bi&&"CompositionEvent"in window,yn=null;Bi&&"documentMode"in document&&(yn=document.documentMode);var ry=Bi&&"TextEvent"in window&&!yn,Dv=Bi&&(!Sh||yn&&8<yn&&11>=yn),Uf=" ",jf=!1;function Mv(e,t){switch(e){case"keyup":return iy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _s=!1;function sy(e,t){switch(e){case"compositionend":return Tv(t);case"keypress":return t.which!==32?null:(jf=!0,Uf);case"textInput":return e=t.data,e===Uf&&jf?null:e;default:return null}}function ny(e,t){if(_s)return e==="compositionend"||!Sh&&Mv(e,t)?(e=Rv(),Za=ph=Qi=null,_s=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dv&&t.locale!=="ko"?null:t.data;default:return null}}var ay={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 If(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ay[e.type]:t==="textarea"}function Bv(e,t,i,r){ds?Ls?Ls.push(r):Ls=[r]:ds=r,t=Po(t,"onChange"),0<t.length&&(i=new cl("onChange","change",null,i,r),e.push({event:i,listeners:t}))}var bn=null,Un=null;function oy(e){Op(e,0)}function hl(e){var t=gn(e);if(wv(t))return e}function Ff(e,t){if(e==="change")return t}var kv=!1;if(Bi){var Yl;if(Bi){var Xl="oninput"in document;if(!Xl){var $f=document.createElement("div");$f.setAttribute("oninput","return;"),Xl=typeof $f.oninput=="function"}Yl=Xl}else Yl=!1;kv=Yl&&(!document.documentMode||9<document.documentMode)}function qf(){bn&&(bn.detachEvent("onpropertychange",Nv),Un=bn=null)}function Nv(e){if(e.propertyName==="value"&&hl(Un)){var t=[];Bv(t,Un,e,gh(e)),Ov(oy,t)}}function ly(e,t,i){e==="focusin"?(qf(),bn=t,Un=i,bn.attachEvent("onpropertychange",Nv)):e==="focusout"&&qf()}function cy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return hl(Un)}function uy(e,t){if(e==="click")return hl(t)}function hy(e,t){if(e==="input"||e==="change")return hl(t)}function fy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ot=typeof Object.is=="function"?Object.is:fy;function jn(e,t){if(Ot(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(r=0;r<i.length;r++){var s=i[r];if(!Yc.call(t,s)||!Ot(e[s],t[s]))return!1}return!0}function Wf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Vf(e,t){var i=Wf(e);e=0;for(var r;i;){if(i.nodeType===3){if(r=e+i.textContent.length,e<=t&&r>=t)return{node:i,offset:t-e};e=r}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Wf(i)}}function Hv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zv(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=yo(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=yo(e.document)}return t}function yh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var dy=Bi&&"documentMode"in document&&11>=document.documentMode,vs=null,iu=null,Cn=null,ru=!1;function Gf(e,t,i){var r=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;ru||vs==null||vs!==yo(r)||(r=vs,"selectionStart"in r&&yh(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Cn&&jn(Cn,r)||(Cn=r,r=Po(iu,"onSelect"),0<r.length&&(t=new cl("onSelect","select",null,t,i),e.push({event:t,listeners:r}),t.target=vs)))}function br(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var gs={animationend:br("Animation","AnimationEnd"),animationiteration:br("Animation","AnimationIteration"),animationstart:br("Animation","AnimationStart"),transitionrun:br("Transition","TransitionRun"),transitionstart:br("Transition","TransitionStart"),transitioncancel:br("Transition","TransitionCancel"),transitionend:br("Transition","TransitionEnd")},Zl={},Pv={};Bi&&(Pv=document.createElement("div").style,"AnimationEvent"in window||(delete gs.animationend.animation,delete gs.animationiteration.animation,delete gs.animationstart.animation),"TransitionEvent"in window||delete gs.transitionend.transition);function Wr(e){if(Zl[e])return Zl[e];if(!gs[e])return e;var t=gs[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Pv)return Zl[e]=t[i];return e}var Uv=Wr("animationend"),jv=Wr("animationiteration"),Iv=Wr("animationstart"),_y=Wr("transitionrun"),vy=Wr("transitionstart"),gy=Wr("transitioncancel"),Fv=Wr("transitionend"),$v=new Map,su="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(" ");su.push("scrollEnd");function Qt(e,t){$v.set(e,t),$r(t,[e])}var bo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Tt=[],ps=0,bh=0;function fl(){for(var e=ps,t=bh=ps=0;t<e;){var i=Tt[t];Tt[t++]=null;var r=Tt[t];Tt[t++]=null;var s=Tt[t];Tt[t++]=null;var a=Tt[t];if(Tt[t++]=null,r!==null&&s!==null){var c=r.pending;c===null?s.next=s:(s.next=c.next,c.next=s),r.pending=s}a!==0&&qv(i,s,a)}}function dl(e,t,i,r){Tt[ps++]=e,Tt[ps++]=t,Tt[ps++]=i,Tt[ps++]=r,bh|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Ch(e,t,i,r){return dl(e,t,i,r),Co(e)}function Vr(e,t){return dl(e,null,null,t),Co(e)}function qv(e,t,i){e.lanes|=i;var r=e.alternate;r!==null&&(r.lanes|=i);for(var s=!1,a=e.return;a!==null;)a.childLanes|=i,r=a.alternate,r!==null&&(r.childLanes|=i),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(s=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,s&&t!==null&&(s=31-At(i),e=a.hiddenUpdates,r=e[s],r===null?e[s]=[t]:r.push(t),t.lane=i|536870912),a):null}function Co(e){if(50<Mn)throw Mn=0,xu=null,Error(q(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ms={};function py(e,t,i,r){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yt(e,t,i,r){return new py(e,t,i,r)}function wh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Oi(e,t){var i=e.alternate;return i===null?(i=yt(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Wv(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ja(e,t,i,r,s,a){var c=0;if(r=e,typeof e=="function")wh(e)&&(c=1);else if(typeof e=="string")c=Cb(e,i,ci.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Wc:return e=yt(31,i,t,s),e.elementType=Wc,e.lanes=a,e;case us:return Lr(i.children,s,a,t);case uv:c=8,s|=24;break;case Fc:return e=yt(12,i,t,s|2),e.elementType=Fc,e.lanes=a,e;case $c:return e=yt(13,i,t,s),e.elementType=$c,e.lanes=a,e;case qc:return e=yt(19,i,t,s),e.elementType=qc,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xi:c=10;break e;case hv:c=9;break e;case ch:c=11;break e;case uh:c=14;break e;case Wi:c=16,r=null;break e}c=29,i=Error(q(130,e===null?"null":typeof e,"")),r=null}return t=yt(c,i,t,s),t.elementType=e,t.type=r,t.lanes=a,t}function Lr(e,t,i,r){return e=yt(7,e,r,t),e.lanes=i,e}function Ql(e,t,i){return e=yt(6,e,null,t),e.lanes=i,e}function Vv(e){var t=yt(18,null,null,0);return t.stateNode=e,t}function Jl(e,t,i){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Kf=new WeakMap;function zt(e,t){if(typeof e=="object"&&e!==null){var i=Kf.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Of(t)},Kf.set(e,t),t)}return{value:e,source:t,stack:Of(t)}}var Ss=[],ys=0,wo=null,In=0,kt=[],Nt=0,dr=null,si=1,ni="";function bi(e,t){Ss[ys++]=In,Ss[ys++]=wo,wo=e,In=t}function Gv(e,t,i){kt[Nt++]=si,kt[Nt++]=ni,kt[Nt++]=dr,dr=e;var r=si;e=ni;var s=32-At(r)-1;r&=~(1<<s),i+=1;var a=32-At(t)+s;if(30<a){var c=s-s%5;a=(r&(1<<c)-1).toString(32),r>>=c,s-=c,si=1<<32-At(t)+s|i<<s|r,ni=a+e}else si=1<<a|i<<s|r,ni=e}function Eh(e){e.return!==null&&(bi(e,1),Gv(e,1,0))}function xh(e){for(;e===wo;)wo=Ss[--ys],Ss[ys]=null,In=Ss[--ys],Ss[ys]=null;for(;e===dr;)dr=kt[--Nt],kt[Nt]=null,ni=kt[--Nt],kt[Nt]=null,si=kt[--Nt],kt[Nt]=null}function Kv(e,t){kt[Nt++]=si,kt[Nt++]=ni,kt[Nt++]=dr,si=t.id,ni=t.overflow,dr=e}var tt=null,Te=null,_e=!1,sr=null,Pt=!1,nu=Error(q(519));function _r(e){var t=Error(q(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Fn(zt(t,e)),nu}function Yf(e){var t=e.stateNode,i=e.type,r=e.memoizedProps;switch(t[et]=e,t[vt]=r,i){case"dialog":ce("cancel",t),ce("close",t);break;case"iframe":case"object":case"embed":ce("load",t);break;case"video":case"audio":for(i=0;i<Vn.length;i++)ce(Vn[i],t);break;case"source":ce("error",t);break;case"img":case"image":case"link":ce("error",t),ce("load",t);break;case"details":ce("toggle",t);break;case"input":ce("invalid",t),Ev(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":ce("invalid",t);break;case"textarea":ce("invalid",t),Av(t,r.value,r.defaultValue,r.children)}i=r.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||r.suppressHydrationWarning===!0||Dp(t.textContent,i)?(r.popover!=null&&(ce("beforetoggle",t),ce("toggle",t)),r.onScroll!=null&&ce("scroll",t),r.onScrollEnd!=null&&ce("scrollend",t),r.onClick!=null&&(t.onclick=Ai),t=!0):t=!1,t||_r(e,!0)}function Xf(e){for(tt=e.return;tt;)switch(tt.tag){case 5:case 31:case 13:Pt=!1;return;case 27:case 3:Pt=!0;return;default:tt=tt.return}}function es(e){if(e!==tt)return!1;if(!_e)return Xf(e),_e=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Du(e.type,e.memoizedProps)),i=!i),i&&Te&&_r(e),Xf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));Te=Hd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));Te=Hd(e)}else t===27?(t=Te,mr(e.type)?(e=ku,ku=null,Te=e):Te=t):Te=tt?qt(e.stateNode.nextSibling):null;return!0}function Tr(){Te=tt=null,_e=!1}function ec(){var e=sr;return e!==null&&(dt===null?dt=e:dt.push.apply(dt,e),sr=null),e}function Fn(e){sr===null?sr=[e]:sr.push(e)}var au=di(null),Gr=null,Li=null;function Gi(e,t,i){Oe(au,t._currentValue),t._currentValue=i}function Ri(e){e._currentValue=au.current,Qe(au)}function ou(e,t,i){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===i)break;e=e.return}}function lu(e,t,i,r){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){var c=s.child;a=a.firstContext;e:for(;a!==null;){var n=a;a=s;for(var o=0;o<t.length;o++)if(n.context===t[o]){a.lanes|=i,n=a.alternate,n!==null&&(n.lanes|=i),ou(a.return,i,e),r||(c=null);break e}a=n.next}}else if(s.tag===18){if(c=s.return,c===null)throw Error(q(341));c.lanes|=i,a=c.alternate,a!==null&&(a.lanes|=i),ou(c,i,e),c=null}else c=s.child;if(c!==null)c.return=s;else for(c=s;c!==null;){if(c===e){c=null;break}if(s=c.sibling,s!==null){s.return=c.return,c=s;break}c=c.return}s=c}}function Zs(e,t,i,r){e=null;for(var s=t,a=!1;s!==null;){if(!a){if(s.flags&524288)a=!0;else if(s.flags&262144)break}if(s.tag===10){var c=s.alternate;if(c===null)throw Error(q(387));if(c=c.memoizedProps,c!==null){var n=s.type;Ot(s.pendingProps.value,c.value)||(e!==null?e.push(n):e=[n])}}else if(s===go.current){if(c=s.alternate,c===null)throw Error(q(387));c.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Kn):e=[Kn])}s=s.return}e!==null&&lu(t,e,i,r),t.flags|=262144}function Eo(e){for(e=e.firstContext;e!==null;){if(!Ot(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Br(e){Gr=e,Li=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function rt(e){return Yv(Gr,e)}function Da(e,t){return Gr===null&&Br(e),Yv(e,t)}function Yv(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Li===null){if(e===null)throw Error(q(308));Li=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Li=Li.next=t;return i}var my=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},Sy=Ye.unstable_scheduleCallback,yy=Ye.unstable_NormalPriority,Ve={$$typeof:xi,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ah(){return{controller:new my,data:new Map,refCount:0}}function la(e){e.refCount--,e.refCount===0&&Sy(yy,function(){e.controller.abort()})}var wn=null,cu=0,Hs=0,Os=null;function by(e,t){if(wn===null){var i=wn=[];cu=0,Hs=Zh(),Os={status:"pending",value:void 0,then:function(r){i.push(r)}}}return cu++,t.then(Zf,Zf),t}function Zf(){if(--cu===0&&wn!==null){Os!==null&&(Os.status="fulfilled");var e=wn;wn=null,Hs=0,Os=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Cy(e,t){var i=[],r={status:"pending",value:null,reason:null,then:function(s){i.push(s)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var s=0;s<i.length;s++)(0,i[s])(t)},function(s){for(r.status="rejected",r.reason=s,s=0;s<i.length;s++)(0,i[s])(void 0)}),r}var Qf=re.S;re.S=function(e,t){cp=Et(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&by(e,t),Qf!==null&&Qf(e,t)};var Or=di(null);function Lh(){var e=Or.current;return e!==null?e:Ae.pooledCache}function eo(e,t){t===null?Oe(Or,Or.current):Oe(Or,t.pool)}function Xv(){var e=Lh();return e===null?null:{parent:Ve._currentValue,pool:e}}var Qs=Error(q(460)),Oh=Error(q(474)),_l=Error(q(542)),xo={then:function(){}};function Jf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Zv(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Ai,Ai),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,td(e),e;default:if(typeof t.status=="string")t.then(Ai,Ai);else{if(e=Ae,e!==null&&100<e.shellSuspendCounter)throw Error(q(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=r}},function(r){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,td(e),e}throw Rr=t,Qs}}function Er(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Rr=i,Qs):i}}var Rr=null;function ed(){if(Rr===null)throw Error(q(459));var e=Rr;return Rr=null,e}function td(e){if(e===Qs||e===_l)throw Error(q(483))}var Rs=null,$n=0;function Ma(e){var t=$n;return $n+=1,Rs===null&&(Rs=[]),Zv(Rs,e,t)}function cn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ta(e,t){throw t.$$typeof===lS?Error(q(525)):(e=Object.prototype.toString.call(t),Error(q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Qv(e){function t(_,l){if(e){var u=_.deletions;u===null?(_.deletions=[l],_.flags|=16):u.push(l)}}function i(_,l){if(!e)return null;for(;l!==null;)t(_,l),l=l.sibling;return null}function r(_){for(var l=new Map;_!==null;)_.key!==null?l.set(_.key,_):l.set(_.index,_),_=_.sibling;return l}function s(_,l){return _=Oi(_,l),_.index=0,_.sibling=null,_}function a(_,l,u){return _.index=u,e?(u=_.alternate,u!==null?(u=u.index,u<l?(_.flags|=67108866,l):u):(_.flags|=67108866,l)):(_.flags|=1048576,l)}function c(_){return e&&_.alternate===null&&(_.flags|=67108866),_}function n(_,l,u,m){return l===null||l.tag!==6?(l=Ql(u,_.mode,m),l.return=_,l):(l=s(l,u),l.return=_,l)}function o(_,l,u,m){var w=u.type;return w===us?v(_,l,u.props.children,m,u.key):l!==null&&(l.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Wi&&Er(w)===l.type)?(l=s(l,u.props),cn(l,u),l.return=_,l):(l=Ja(u.type,u.key,u.props,null,_.mode,m),cn(l,u),l.return=_,l)}function d(_,l,u,m){return l===null||l.tag!==4||l.stateNode.containerInfo!==u.containerInfo||l.stateNode.implementation!==u.implementation?(l=Jl(u,_.mode,m),l.return=_,l):(l=s(l,u.children||[]),l.return=_,l)}function v(_,l,u,m,w){return l===null||l.tag!==7?(l=Lr(u,_.mode,m,w),l.return=_,l):(l=s(l,u),l.return=_,l)}function f(_,l,u){if(typeof l=="string"&&l!==""||typeof l=="number"||typeof l=="bigint")return l=Ql(""+l,_.mode,u),l.return=_,l;if(typeof l=="object"&&l!==null){switch(l.$$typeof){case Ea:return u=Ja(l.type,l.key,l.props,null,_.mode,u),cn(u,l),u.return=_,u;case _n:return l=Jl(l,_.mode,u),l.return=_,l;case Wi:return l=Er(l),f(_,l,u)}if(vn(l)||an(l))return l=Lr(l,_.mode,u,null),l.return=_,l;if(typeof l.then=="function")return f(_,Ma(l),u);if(l.$$typeof===xi)return f(_,Da(_,l),u);Ta(_,l)}return null}function g(_,l,u,m){var w=l!==null?l.key:null;if(typeof u=="string"&&u!==""||typeof u=="number"||typeof u=="bigint")return w!==null?null:n(_,l,""+u,m);if(typeof u=="object"&&u!==null){switch(u.$$typeof){case Ea:return u.key===w?o(_,l,u,m):null;case _n:return u.key===w?d(_,l,u,m):null;case Wi:return u=Er(u),g(_,l,u,m)}if(vn(u)||an(u))return w!==null?null:v(_,l,u,m,null);if(typeof u.then=="function")return g(_,l,Ma(u),m);if(u.$$typeof===xi)return g(_,l,Da(_,u),m);Ta(_,u)}return null}function S(_,l,u,m,w){if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return _=_.get(u)||null,n(l,_,""+m,w);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Ea:return _=_.get(m.key===null?u:m.key)||null,o(l,_,m,w);case _n:return _=_.get(m.key===null?u:m.key)||null,d(l,_,m,w);case Wi:return m=Er(m),S(_,l,u,m,w)}if(vn(m)||an(m))return _=_.get(u)||null,v(l,_,m,w,null);if(typeof m.then=="function")return S(_,l,u,Ma(m),w);if(m.$$typeof===xi)return S(_,l,u,Da(l,m),w);Ta(l,m)}return null}function C(_,l,u,m){for(var w=null,y=null,E=l,b=l=0,x=null;E!==null&&b<u.length;b++){E.index>b?(x=E,E=null):x=E.sibling;var A=g(_,E,u[b],m);if(A===null){E===null&&(E=x);break}e&&E&&A.alternate===null&&t(_,E),l=a(A,l,b),y===null?w=A:y.sibling=A,y=A,E=x}if(b===u.length)return i(_,E),_e&&bi(_,b),w;if(E===null){for(;b<u.length;b++)E=f(_,u[b],m),E!==null&&(l=a(E,l,b),y===null?w=E:y.sibling=E,y=E);return _e&&bi(_,b),w}for(E=r(E);b<u.length;b++)x=S(E,_,b,u[b],m),x!==null&&(e&&x.alternate!==null&&E.delete(x.key===null?b:x.key),l=a(x,l,b),y===null?w=x:y.sibling=x,y=x);return e&&E.forEach(function(O){return t(_,O)}),_e&&bi(_,b),w}function p(_,l,u,m){if(u==null)throw Error(q(151));for(var w=null,y=null,E=l,b=l=0,x=null,A=u.next();E!==null&&!A.done;b++,A=u.next()){E.index>b?(x=E,E=null):x=E.sibling;var O=g(_,E,A.value,m);if(O===null){E===null&&(E=x);break}e&&E&&O.alternate===null&&t(_,E),l=a(O,l,b),y===null?w=O:y.sibling=O,y=O,E=x}if(A.done)return i(_,E),_e&&bi(_,b),w;if(E===null){for(;!A.done;b++,A=u.next())A=f(_,A.value,m),A!==null&&(l=a(A,l,b),y===null?w=A:y.sibling=A,y=A);return _e&&bi(_,b),w}for(E=r(E);!A.done;b++,A=u.next())A=S(E,_,b,A.value,m),A!==null&&(e&&A.alternate!==null&&E.delete(A.key===null?b:A.key),l=a(A,l,b),y===null?w=A:y.sibling=A,y=A);return e&&E.forEach(function(R){return t(_,R)}),_e&&bi(_,b),w}function h(_,l,u,m){if(typeof u=="object"&&u!==null&&u.type===us&&u.key===null&&(u=u.props.children),typeof u=="object"&&u!==null){switch(u.$$typeof){case Ea:e:{for(var w=u.key;l!==null;){if(l.key===w){if(w=u.type,w===us){if(l.tag===7){i(_,l.sibling),m=s(l,u.props.children),m.return=_,_=m;break e}}else if(l.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Wi&&Er(w)===l.type){i(_,l.sibling),m=s(l,u.props),cn(m,u),m.return=_,_=m;break e}i(_,l);break}else t(_,l);l=l.sibling}u.type===us?(m=Lr(u.props.children,_.mode,m,u.key),m.return=_,_=m):(m=Ja(u.type,u.key,u.props,null,_.mode,m),cn(m,u),m.return=_,_=m)}return c(_);case _n:e:{for(w=u.key;l!==null;){if(l.key===w)if(l.tag===4&&l.stateNode.containerInfo===u.containerInfo&&l.stateNode.implementation===u.implementation){i(_,l.sibling),m=s(l,u.children||[]),m.return=_,_=m;break e}else{i(_,l);break}else t(_,l);l=l.sibling}m=Jl(u,_.mode,m),m.return=_,_=m}return c(_);case Wi:return u=Er(u),h(_,l,u,m)}if(vn(u))return C(_,l,u,m);if(an(u)){if(w=an(u),typeof w!="function")throw Error(q(150));return u=w.call(u),p(_,l,u,m)}if(typeof u.then=="function")return h(_,l,Ma(u),m);if(u.$$typeof===xi)return h(_,l,Da(_,u),m);Ta(_,u)}return typeof u=="string"&&u!==""||typeof u=="number"||typeof u=="bigint"?(u=""+u,l!==null&&l.tag===6?(i(_,l.sibling),m=s(l,u),m.return=_,_=m):(i(_,l),m=Ql(u,_.mode,m),m.return=_,_=m),c(_)):i(_,l)}return function(_,l,u,m){try{$n=0;var w=h(_,l,u,m);return Rs=null,w}catch(E){if(E===Qs||E===_l)throw E;var y=yt(29,E,null,_.mode);return y.lanes=m,y.return=_,y}finally{}}}var kr=Qv(!0),Jv=Qv(!1),Vi=!1;function Rh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function uu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function nr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ar(e,t,i){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Se&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,t=Co(e),qv(e,null,i),t}return dl(e,r,t,i),Co(e)}function En(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,i|=r,t.lanes=i,pv(e,i)}}function tc(e,t){var i=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,i===r)){var s=null,a=null;if(i=i.firstBaseUpdate,i!==null){do{var c={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};a===null?s=a=c:a=a.next=c,i=i.next}while(i!==null);a===null?s=a=t:a=a.next=t}else s=a=t;i={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var hu=!1;function xn(){if(hu){var e=Os;if(e!==null)throw e}}function An(e,t,i,r){hu=!1;var s=e.updateQueue;Vi=!1;var a=s.firstBaseUpdate,c=s.lastBaseUpdate,n=s.shared.pending;if(n!==null){s.shared.pending=null;var o=n,d=o.next;o.next=null,c===null?a=d:c.next=d,c=o;var v=e.alternate;v!==null&&(v=v.updateQueue,n=v.lastBaseUpdate,n!==c&&(n===null?v.firstBaseUpdate=d:n.next=d,v.lastBaseUpdate=o))}if(a!==null){var f=s.baseState;c=0,v=d=o=null,n=a;do{var g=n.lane&-536870913,S=g!==n.lane;if(S?(de&g)===g:(r&g)===g){g!==0&&g===Hs&&(hu=!0),v!==null&&(v=v.next={lane:0,tag:n.tag,payload:n.payload,callback:null,next:null});e:{var C=e,p=n;g=t;var h=i;switch(p.tag){case 1:if(C=p.payload,typeof C=="function"){f=C.call(h,f,g);break e}f=C;break e;case 3:C.flags=C.flags&-65537|128;case 0:if(C=p.payload,g=typeof C=="function"?C.call(h,f,g):C,g==null)break e;f=ke({},f,g);break e;case 2:Vi=!0}}g=n.callback,g!==null&&(e.flags|=64,S&&(e.flags|=8192),S=s.callbacks,S===null?s.callbacks=[g]:S.push(g))}else S={lane:g,tag:n.tag,payload:n.payload,callback:n.callback,next:null},v===null?(d=v=S,o=f):v=v.next=S,c|=g;if(n=n.next,n===null){if(n=s.shared.pending,n===null)break;S=n,n=S.next,S.next=null,s.lastBaseUpdate=S,s.shared.pending=null}}while(!0);v===null&&(o=f),s.baseState=o,s.firstBaseUpdate=d,s.lastBaseUpdate=v,a===null&&(s.shared.lanes=0),gr|=c,e.lanes=c,e.memoizedState=f}}function eg(e,t){if(typeof e!="function")throw Error(q(191,e));e.call(t)}function tg(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)eg(i[e],t)}var zs=di(null),Ao=di(0);function id(e,t){e=zi,Oe(Ao,e),Oe(zs,t),zi=e|t.baseLanes}function fu(){Oe(Ao,zi),Oe(zs,zs.current)}function Dh(){zi=Ao.current,Qe(zs),Qe(Ao)}var Rt=di(null),$t=null;function Ki(e){var t=e.alternate;Oe(je,je.current&1),Oe(Rt,e),$t===null&&(t===null||zs.current!==null||t.memoizedState!==null)&&($t=e)}function du(e){Oe(je,je.current),Oe(Rt,e),$t===null&&($t=e)}function ig(e){e.tag===22?(Oe(je,je.current),Oe(Rt,e),$t===null&&($t=e)):Yi()}function Yi(){Oe(je,je.current),Oe(Rt,Rt.current)}function mt(e){Qe(Rt),$t===e&&($t=null),Qe(je)}var je=di(0);function Lo(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Tu(i)||Bu(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ki=0,ae=null,Ee=null,qe=null,Oo=!1,Ds=!1,Nr=!1,Ro=0,qn=0,Ms=null,wy=0;function Pe(){throw Error(q(321))}function Mh(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Ot(e[i],t[i]))return!1;return!0}function Th(e,t,i,r,s,a){return ki=a,ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,re.H=e===null||e.memoizedState===null?Bg:$h,Nr=!1,a=i(r,s),Nr=!1,Ds&&(a=sg(t,i,r,s)),rg(e),a}function rg(e){re.H=Wn;var t=Ee!==null&&Ee.next!==null;if(ki=0,qe=Ee=ae=null,Oo=!1,qn=0,Ms=null,t)throw Error(q(300));e===null||Ge||(e=e.dependencies,e!==null&&Eo(e)&&(Ge=!0))}function sg(e,t,i,r){ae=e;var s=0;do{if(Ds&&(Ms=null),qn=0,Ds=!1,25<=s)throw Error(q(301));if(s+=1,qe=Ee=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}re.H=kg,a=t(i,r)}while(Ds);return a}function Ey(){var e=re.H,t=e.useState()[0];return t=typeof t.then=="function"?ca(t):t,e=e.useState()[0],(Ee!==null?Ee.memoizedState:null)!==e&&(ae.flags|=1024),t}function Bh(){var e=Ro!==0;return Ro=0,e}function kh(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Nh(e){if(Oo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Oo=!1}ki=0,qe=Ee=ae=null,Ds=!1,qn=Ro=0,Ms=null}function at(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qe===null?ae.memoizedState=qe=e:qe=qe.next=e,qe}function Ie(){if(Ee===null){var e=ae.alternate;e=e!==null?e.memoizedState:null}else e=Ee.next;var t=qe===null?ae.memoizedState:qe.next;if(t!==null)qe=t,Ee=e;else{if(e===null)throw ae.alternate===null?Error(q(467)):Error(q(310));Ee=e,e={memoizedState:Ee.memoizedState,baseState:Ee.baseState,baseQueue:Ee.baseQueue,queue:Ee.queue,next:null},qe===null?ae.memoizedState=qe=e:qe=qe.next=e}return qe}function vl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ca(e){var t=qn;return qn+=1,Ms===null&&(Ms=[]),e=Zv(Ms,e,t),t=ae,(qe===null?t.memoizedState:qe.next)===null&&(t=t.alternate,re.H=t===null||t.memoizedState===null?Bg:$h),e}function gl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ca(e);if(e.$$typeof===xi)return rt(e)}throw Error(q(438,String(e)))}function Hh(e){var t=null,i=ae.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var r=ae.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=vl(),ae.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),r=0;r<e;r++)i[r]=cS;return t.index++,i}function Ni(e,t){return typeof t=="function"?t(e):t}function to(e){var t=Ie();return zh(t,Ee,e)}function zh(e,t,i){var r=e.queue;if(r===null)throw Error(q(311));r.lastRenderedReducer=i;var s=e.baseQueue,a=r.pending;if(a!==null){if(s!==null){var c=s.next;s.next=a.next,a.next=c}t.baseQueue=s=a,r.pending=null}if(a=e.baseState,s===null)e.memoizedState=a;else{t=s.next;var n=c=null,o=null,d=t,v=!1;do{var f=d.lane&-536870913;if(f!==d.lane?(de&f)===f:(ki&f)===f){var g=d.revertLane;if(g===0)o!==null&&(o=o.next={lane:0,revertLane:0,gesture:null,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),f===Hs&&(v=!0);else if((ki&g)===g){d=d.next,g===Hs&&(v=!0);continue}else f={lane:0,revertLane:d.revertLane,gesture:null,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null},o===null?(n=o=f,c=a):o=o.next=f,ae.lanes|=g,gr|=g;f=d.action,Nr&&i(a,f),a=d.hasEagerState?d.eagerState:i(a,f)}else g={lane:f,revertLane:d.revertLane,gesture:d.gesture,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null},o===null?(n=o=g,c=a):o=o.next=g,ae.lanes|=f,gr|=f;d=d.next}while(d!==null&&d!==t);if(o===null?c=a:o.next=n,!Ot(a,e.memoizedState)&&(Ge=!0,v&&(i=Os,i!==null)))throw i;e.memoizedState=a,e.baseState=c,e.baseQueue=o,r.lastRenderedState=a}return s===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ic(e){var t=Ie(),i=t.queue;if(i===null)throw Error(q(311));i.lastRenderedReducer=e;var r=i.dispatch,s=i.pending,a=t.memoizedState;if(s!==null){i.pending=null;var c=s=s.next;do a=e(a,c.action),c=c.next;while(c!==s);Ot(a,t.memoizedState)||(Ge=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),i.lastRenderedState=a}return[a,r]}function ng(e,t,i){var r=ae,s=Ie(),a=_e;if(a){if(i===void 0)throw Error(q(407));i=i()}else i=t();var c=!Ot((Ee||s).memoizedState,i);if(c&&(s.memoizedState=i,Ge=!0),s=s.queue,Ph(lg.bind(null,r,s,e),[e]),s.getSnapshot!==t||c||qe!==null&&qe.memoizedState.tag&1){if(r.flags|=2048,Ps(9,{destroy:void 0},og.bind(null,r,s,i,t),null),Ae===null)throw Error(q(349));a||ki&127||ag(r,t,i)}return i}function ag(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=ae.updateQueue,t===null?(t=vl(),ae.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function og(e,t,i,r){t.value=i,t.getSnapshot=r,cg(t)&&ug(e)}function lg(e,t,i){return i(function(){cg(t)&&ug(e)})}function cg(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Ot(e,i)}catch{return!0}}function ug(e){var t=Vr(e,2);t!==null&&_t(t,e,2)}function _u(e){var t=at();if(typeof e=="function"){var i=e;if(e=i(),Nr){Zi(!0);try{i()}finally{Zi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ni,lastRenderedState:e},t}function hg(e,t,i,r){return e.baseState=i,zh(e,Ee,typeof r=="function"?r:Ni)}function xy(e,t,i,r,s){if(ml(e))throw Error(q(485));if(e=t.action,e!==null){var a={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(c){a.listeners.push(c)}};re.T!==null?i(!0):a.isTransition=!1,r(a),i=t.pending,i===null?(a.next=t.pending=a,fg(t,a)):(a.next=i.next,t.pending=i.next=a)}}function fg(e,t){var i=t.action,r=t.payload,s=e.state;if(t.isTransition){var a=re.T,c={};re.T=c;try{var n=i(s,r),o=re.S;o!==null&&o(c,n),rd(e,t,n)}catch(d){vu(e,t,d)}finally{a!==null&&c.types!==null&&(a.types=c.types),re.T=a}}else try{a=i(s,r),rd(e,t,a)}catch(d){vu(e,t,d)}}function rd(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(r){sd(e,t,r)},function(r){return vu(e,t,r)}):sd(e,t,i)}function sd(e,t,i){t.status="fulfilled",t.value=i,dg(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,fg(e,i)))}function vu(e,t,i){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=i,dg(t),t=t.next;while(t!==r)}e.action=null}function dg(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function _g(e,t){return t}function nd(e,t){if(_e){var i=Ae.formState;if(i!==null){e:{var r=ae;if(_e){if(Te){t:{for(var s=Te,a=Pt;s.nodeType!==8;){if(!a){s=null;break t}if(s=qt(s.nextSibling),s===null){s=null;break t}}a=s.data,s=a==="F!"||a==="F"?s:null}if(s){Te=qt(s.nextSibling),r=s.data==="F!";break e}}_r(r)}r=!1}r&&(t=i[0])}}return i=at(),i.memoizedState=i.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_g,lastRenderedState:t},i.queue=r,i=Dg.bind(null,ae,r),r.dispatch=i,r=_u(!1),a=Fh.bind(null,ae,!1,r.queue),r=at(),s={state:t,dispatch:null,action:e,pending:null},r.queue=s,i=xy.bind(null,ae,s,a,i),s.dispatch=i,r.memoizedState=e,[t,i,!1]}function ad(e){var t=Ie();return vg(t,Ee,e)}function vg(e,t,i){if(t=zh(e,t,_g)[0],e=to(Ni)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=ca(t)}catch(c){throw c===Qs?_l:c}else r=t;t=Ie();var s=t.queue,a=s.dispatch;return i!==t.memoizedState&&(ae.flags|=2048,Ps(9,{destroy:void 0},Ay.bind(null,s,i),null)),[r,a,e]}function Ay(e,t){e.action=t}function od(e){var t=Ie(),i=Ee;if(i!==null)return vg(t,i,e);Ie(),t=t.memoizedState,i=Ie();var r=i.queue.dispatch;return i.memoizedState=e,[t,r,!1]}function Ps(e,t,i,r){return e={tag:e,create:i,deps:r,inst:t,next:null},t=ae.updateQueue,t===null&&(t=vl(),ae.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(r=i.next,i.next=e,e.next=r,t.lastEffect=e),e}function gg(){return Ie().memoizedState}function io(e,t,i,r){var s=at();ae.flags|=e,s.memoizedState=Ps(1|t,{destroy:void 0},i,r===void 0?null:r)}function pl(e,t,i,r){var s=Ie();r=r===void 0?null:r;var a=s.memoizedState.inst;Ee!==null&&r!==null&&Mh(r,Ee.memoizedState.deps)?s.memoizedState=Ps(t,a,i,r):(ae.flags|=e,s.memoizedState=Ps(1|t,a,i,r))}function ld(e,t){io(8390656,8,e,t)}function Ph(e,t){pl(2048,8,e,t)}function Ly(e){ae.flags|=4;var t=ae.updateQueue;if(t===null)t=vl(),ae.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function pg(e){var t=Ie().memoizedState;return Ly({ref:t,nextImpl:e}),function(){if(Se&2)throw Error(q(440));return t.impl.apply(void 0,arguments)}}function mg(e,t){return pl(4,2,e,t)}function Sg(e,t){return pl(4,4,e,t)}function yg(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function bg(e,t,i){i=i!=null?i.concat([e]):null,pl(4,4,yg.bind(null,t,e),i)}function Uh(){}function Cg(e,t){var i=Ie();t=t===void 0?null:t;var r=i.memoizedState;return t!==null&&Mh(t,r[1])?r[0]:(i.memoizedState=[e,t],e)}function wg(e,t){var i=Ie();t=t===void 0?null:t;var r=i.memoizedState;if(t!==null&&Mh(t,r[1]))return r[0];if(r=e(),Nr){Zi(!0);try{e()}finally{Zi(!1)}}return i.memoizedState=[r,t],r}function jh(e,t,i){return i===void 0||ki&1073741824&&!(de&261930)?e.memoizedState=t:(e.memoizedState=i,e=hp(),ae.lanes|=e,gr|=e,i)}function Eg(e,t,i,r){return Ot(i,t)?i:zs.current!==null?(e=jh(e,i,r),Ot(e,t)||(Ge=!0),e):!(ki&42)||ki&1073741824&&!(de&261930)?(Ge=!0,e.memoizedState=i):(e=hp(),ae.lanes|=e,gr|=e,t)}function xg(e,t,i,r,s){var a=ye.p;ye.p=a!==0&&8>a?a:8;var c=re.T,n={};re.T=n,Fh(e,!1,t,i);try{var o=s(),d=re.S;if(d!==null&&d(n,o),o!==null&&typeof o=="object"&&typeof o.then=="function"){var v=Cy(o,r);Ln(e,t,v,Lt(e))}else Ln(e,t,r,Lt(e))}catch(f){Ln(e,t,{then:function(){},status:"rejected",reason:f},Lt())}finally{ye.p=a,c!==null&&n.types!==null&&(c.types=n.types),re.T=c}}function Oy(){}function gu(e,t,i,r){if(e.tag!==5)throw Error(q(476));var s=Ag(e).queue;xg(e,s,t,Ar,i===null?Oy:function(){return Lg(e),i(r)})}function Ag(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ar,baseState:Ar,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ni,lastRenderedState:Ar},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ni,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Lg(e){var t=Ag(e);t.next===null&&(t=e.alternate.memoizedState),Ln(e,t.next.queue,{},Lt())}function Ih(){return rt(Kn)}function Og(){return Ie().memoizedState}function Rg(){return Ie().memoizedState}function Ry(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Lt();e=nr(i);var r=ar(t,e,i);r!==null&&(_t(r,t,i),En(r,t,i)),t={cache:Ah()},e.payload=t;return}t=t.return}}function Dy(e,t,i){var r=Lt();i={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},ml(e)?Mg(t,i):(i=Ch(e,t,i,r),i!==null&&(_t(i,e,r),Tg(i,t,r)))}function Dg(e,t,i){var r=Lt();Ln(e,t,i,r)}function Ln(e,t,i,r){var s={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(ml(e))Mg(t,s);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var c=t.lastRenderedState,n=a(c,i);if(s.hasEagerState=!0,s.eagerState=n,Ot(n,c))return dl(e,t,s,0),Ae===null&&fl(),!1}catch{}finally{}if(i=Ch(e,t,s,r),i!==null)return _t(i,e,r),Tg(i,t,r),!0}return!1}function Fh(e,t,i,r){if(r={lane:2,revertLane:Zh(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ml(e)){if(t)throw Error(q(479))}else t=Ch(e,i,r,2),t!==null&&_t(t,e,2)}function ml(e){var t=e.alternate;return e===ae||t!==null&&t===ae}function Mg(e,t){Ds=Oo=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Tg(e,t,i){if(i&4194048){var r=t.lanes;r&=e.pendingLanes,i|=r,t.lanes=i,pv(e,i)}}var Wn={readContext:rt,use:gl,useCallback:Pe,useContext:Pe,useEffect:Pe,useImperativeHandle:Pe,useLayoutEffect:Pe,useInsertionEffect:Pe,useMemo:Pe,useReducer:Pe,useRef:Pe,useState:Pe,useDebugValue:Pe,useDeferredValue:Pe,useTransition:Pe,useSyncExternalStore:Pe,useId:Pe,useHostTransitionStatus:Pe,useFormState:Pe,useActionState:Pe,useOptimistic:Pe,useMemoCache:Pe,useCacheRefresh:Pe};Wn.useEffectEvent=Pe;var Bg={readContext:rt,use:gl,useCallback:function(e,t){return at().memoizedState=[e,t===void 0?null:t],e},useContext:rt,useEffect:ld,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,io(4194308,4,yg.bind(null,t,e),i)},useLayoutEffect:function(e,t){return io(4194308,4,e,t)},useInsertionEffect:function(e,t){io(4,2,e,t)},useMemo:function(e,t){var i=at();t=t===void 0?null:t;var r=e();if(Nr){Zi(!0);try{e()}finally{Zi(!1)}}return i.memoizedState=[r,t],r},useReducer:function(e,t,i){var r=at();if(i!==void 0){var s=i(t);if(Nr){Zi(!0);try{i(t)}finally{Zi(!1)}}}else s=t;return r.memoizedState=r.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},r.queue=e,e=e.dispatch=Dy.bind(null,ae,e),[r.memoizedState,e]},useRef:function(e){var t=at();return e={current:e},t.memoizedState=e},useState:function(e){e=_u(e);var t=e.queue,i=Dg.bind(null,ae,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Uh,useDeferredValue:function(e,t){var i=at();return jh(i,e,t)},useTransition:function(){var e=_u(!1);return e=xg.bind(null,ae,e.queue,!0,!1),at().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var r=ae,s=at();if(_e){if(i===void 0)throw Error(q(407));i=i()}else{if(i=t(),Ae===null)throw Error(q(349));de&127||ag(r,t,i)}s.memoizedState=i;var a={value:i,getSnapshot:t};return s.queue=a,ld(lg.bind(null,r,a,e),[e]),r.flags|=2048,Ps(9,{destroy:void 0},og.bind(null,r,a,i,t),null),i},useId:function(){var e=at(),t=Ae.identifierPrefix;if(_e){var i=ni,r=si;i=(r&~(1<<32-At(r)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Ro++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=wy++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ih,useFormState:nd,useActionState:nd,useOptimistic:function(e){var t=at();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Fh.bind(null,ae,!0,i),i.dispatch=t,[e,t]},useMemoCache:Hh,useCacheRefresh:function(){return at().memoizedState=Ry.bind(null,ae)},useEffectEvent:function(e){var t=at(),i={impl:e};return t.memoizedState=i,function(){if(Se&2)throw Error(q(440));return i.impl.apply(void 0,arguments)}}},$h={readContext:rt,use:gl,useCallback:Cg,useContext:rt,useEffect:Ph,useImperativeHandle:bg,useInsertionEffect:mg,useLayoutEffect:Sg,useMemo:wg,useReducer:to,useRef:gg,useState:function(){return to(Ni)},useDebugValue:Uh,useDeferredValue:function(e,t){var i=Ie();return Eg(i,Ee.memoizedState,e,t)},useTransition:function(){var e=to(Ni)[0],t=Ie().memoizedState;return[typeof e=="boolean"?e:ca(e),t]},useSyncExternalStore:ng,useId:Og,useHostTransitionStatus:Ih,useFormState:ad,useActionState:ad,useOptimistic:function(e,t){var i=Ie();return hg(i,Ee,e,t)},useMemoCache:Hh,useCacheRefresh:Rg};$h.useEffectEvent=pg;var kg={readContext:rt,use:gl,useCallback:Cg,useContext:rt,useEffect:Ph,useImperativeHandle:bg,useInsertionEffect:mg,useLayoutEffect:Sg,useMemo:wg,useReducer:ic,useRef:gg,useState:function(){return ic(Ni)},useDebugValue:Uh,useDeferredValue:function(e,t){var i=Ie();return Ee===null?jh(i,e,t):Eg(i,Ee.memoizedState,e,t)},useTransition:function(){var e=ic(Ni)[0],t=Ie().memoizedState;return[typeof e=="boolean"?e:ca(e),t]},useSyncExternalStore:ng,useId:Og,useHostTransitionStatus:Ih,useFormState:od,useActionState:od,useOptimistic:function(e,t){var i=Ie();return Ee!==null?hg(i,Ee,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Hh,useCacheRefresh:Rg};kg.useEffectEvent=pg;function rc(e,t,i,r){t=e.memoizedState,i=i(r,t),i=i==null?t:ke({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var pu={enqueueSetState:function(e,t,i){e=e._reactInternals;var r=Lt(),s=nr(r);s.payload=t,i!=null&&(s.callback=i),t=ar(e,s,r),t!==null&&(_t(t,e,r),En(t,e,r))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var r=Lt(),s=nr(r);s.tag=1,s.payload=t,i!=null&&(s.callback=i),t=ar(e,s,r),t!==null&&(_t(t,e,r),En(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Lt(),r=nr(i);r.tag=2,t!=null&&(r.callback=t),t=ar(e,r,i),t!==null&&(_t(t,e,i),En(t,e,i))}};function cd(e,t,i,r,s,a,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,c):t.prototype&&t.prototype.isPureReactComponent?!jn(i,r)||!jn(s,a):!0}function ud(e,t,i,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,r),t.state!==e&&pu.enqueueReplaceState(t,t.state,null)}function Hr(e,t){var i=t;if("ref"in t){i={};for(var r in t)r!=="ref"&&(i[r]=t[r])}if(e=e.defaultProps){i===t&&(i=ke({},i));for(var s in e)i[s]===void 0&&(i[s]=e[s])}return i}function Ng(e){bo(e)}function Hg(e){console.error(e)}function zg(e){bo(e)}function Do(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function hd(e,t,i){try{var r=e.onCaughtError;r(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function mu(e,t,i){return i=nr(i),i.tag=3,i.payload={element:null},i.callback=function(){Do(e,t)},i}function Pg(e){return e=nr(e),e.tag=3,e}function Ug(e,t,i,r){var s=i.type.getDerivedStateFromError;if(typeof s=="function"){var a=r.value;e.payload=function(){return s(a)},e.callback=function(){hd(t,i,r)}}var c=i.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){hd(t,i,r),typeof s!="function"&&(or===null?or=new Set([this]):or.add(this));var n=r.stack;this.componentDidCatch(r.value,{componentStack:n!==null?n:""})})}function My(e,t,i,r,s){if(i.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=i.alternate,t!==null&&Zs(t,i,s,!0),i=Rt.current,i!==null){switch(i.tag){case 31:case 13:return $t===null?No():i.alternate===null&&Ue===0&&(Ue=3),i.flags&=-257,i.flags|=65536,i.lanes=s,r===xo?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([r]):t.add(r),_c(e,r,s)),!1;case 22:return i.flags|=65536,r===xo?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([r]):i.add(r)),_c(e,r,s)),!1}throw Error(q(435,i.tag))}return _c(e,r,s),No(),!1}if(_e)return t=Rt.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=s,r!==nu&&(e=Error(q(422),{cause:r}),Fn(zt(e,i)))):(r!==nu&&(t=Error(q(423),{cause:r}),Fn(zt(t,i))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,r=zt(r,i),s=mu(e.stateNode,r,s),tc(e,s),Ue!==4&&(Ue=2)),!1;var a=Error(q(520),{cause:r});if(a=zt(a,i),Dn===null?Dn=[a]:Dn.push(a),Ue!==4&&(Ue=2),t===null)return!0;r=zt(r,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=s&-s,i.lanes|=e,e=mu(i.stateNode,r,e),tc(i,e),!1;case 1:if(t=i.type,a=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||a!==null&&typeof a.componentDidCatch=="function"&&(or===null||!or.has(a))))return i.flags|=65536,s&=-s,i.lanes|=s,s=Pg(s),Ug(s,e,i,r),tc(i,s),!1}i=i.return}while(i!==null);return!1}var qh=Error(q(461)),Ge=!1;function Je(e,t,i,r){t.child=e===null?Jv(t,null,i,r):kr(t,e.child,i,r)}function fd(e,t,i,r,s){i=i.render;var a=t.ref;if("ref"in r){var c={};for(var n in r)n!=="ref"&&(c[n]=r[n])}else c=r;return Br(t),r=Th(e,t,i,c,a,s),n=Bh(),e!==null&&!Ge?(kh(e,t,s),Hi(e,t,s)):(_e&&n&&Eh(t),t.flags|=1,Je(e,t,r,s),t.child)}function dd(e,t,i,r,s){if(e===null){var a=i.type;return typeof a=="function"&&!wh(a)&&a.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=a,jg(e,t,a,r,s)):(e=Ja(i.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Wh(e,s)){var c=a.memoizedProps;if(i=i.compare,i=i!==null?i:jn,i(c,r)&&e.ref===t.ref)return Hi(e,t,s)}return t.flags|=1,e=Oi(a,r),e.ref=t.ref,e.return=t,t.child=e}function jg(e,t,i,r,s){if(e!==null){var a=e.memoizedProps;if(jn(a,r)&&e.ref===t.ref)if(Ge=!1,t.pendingProps=r=a,Wh(e,s))e.flags&131072&&(Ge=!0);else return t.lanes=e.lanes,Hi(e,t,s)}return Su(e,t,i,r,s)}function Ig(e,t,i,r){var s=r.children,a=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if(t.flags&128){if(a=a!==null?a.baseLanes|i:i,e!==null){for(r=t.child=e.child,s=0;r!==null;)s=s|r.lanes|r.childLanes,r=r.sibling;r=s&~a}else r=0,t.child=null;return _d(e,t,a,i,r)}if(i&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&eo(t,a!==null?a.cachePool:null),a!==null?id(t,a):fu(),ig(t);else return r=t.lanes=536870912,_d(e,t,a!==null?a.baseLanes|i:i,i,r)}else a!==null?(eo(t,a.cachePool),id(t,a),Yi(),t.memoizedState=null):(e!==null&&eo(t,null),fu(),Yi());return Je(e,t,s,i),t.child}function pn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function _d(e,t,i,r,s){var a=Lh();return a=a===null?null:{parent:Ve._currentValue,pool:a},t.memoizedState={baseLanes:i,cachePool:a},e!==null&&eo(t,null),fu(),ig(t),e!==null&&Zs(e,t,r,!0),t.childLanes=s,null}function ro(e,t){return t=Mo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function vd(e,t,i){return kr(t,e.child,null,i),e=ro(t,t.pendingProps),e.flags|=2,mt(t),t.memoizedState=null,e}function Ty(e,t,i){var r=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(_e){if(r.mode==="hidden")return e=ro(t,r),t.lanes=536870912,pn(null,e);if(du(t),(e=Te)?(e=Bp(e,Pt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:dr!==null?{id:si,overflow:ni}:null,retryLane:536870912,hydrationErrors:null},i=Vv(e),i.return=t,t.child=i,tt=t,Te=null)):e=null,e===null)throw _r(t);return t.lanes=536870912,null}return ro(t,r)}var a=e.memoizedState;if(a!==null){var c=a.dehydrated;if(du(t),s)if(t.flags&256)t.flags&=-257,t=vd(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(q(558));else if(Ge||Zs(e,t,i,!1),s=(i&e.childLanes)!==0,Ge||s){if(r=Ae,r!==null&&(c=mv(r,i),c!==0&&c!==a.retryLane))throw a.retryLane=c,Vr(e,c),_t(r,e,c),qh;No(),t=vd(e,t,i)}else e=a.treeContext,Te=qt(c.nextSibling),tt=t,_e=!0,sr=null,Pt=!1,e!==null&&Kv(t,e),t=ro(t,r),t.flags|=4096;return t}return e=Oi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function so(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(q(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Su(e,t,i,r,s){return Br(t),i=Th(e,t,i,r,void 0,s),r=Bh(),e!==null&&!Ge?(kh(e,t,s),Hi(e,t,s)):(_e&&r&&Eh(t),t.flags|=1,Je(e,t,i,s),t.child)}function gd(e,t,i,r,s,a){return Br(t),t.updateQueue=null,i=sg(t,r,i,s),rg(e),r=Bh(),e!==null&&!Ge?(kh(e,t,a),Hi(e,t,a)):(_e&&r&&Eh(t),t.flags|=1,Je(e,t,i,a),t.child)}function pd(e,t,i,r,s){if(Br(t),t.stateNode===null){var a=ms,c=i.contextType;typeof c=="object"&&c!==null&&(a=rt(c)),a=new i(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=pu,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Rh(t),c=i.contextType,a.context=typeof c=="object"&&c!==null?rt(c):ms,a.state=t.memoizedState,c=i.getDerivedStateFromProps,typeof c=="function"&&(rc(t,i,c,r),a.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(c=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),c!==a.state&&pu.enqueueReplaceState(a,a.state,null),An(t,r,a,s),xn(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var n=t.memoizedProps,o=Hr(i,n);a.props=o;var d=a.context,v=i.contextType;c=ms,typeof v=="object"&&v!==null&&(c=rt(v));var f=i.getDerivedStateFromProps;v=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function",n=t.pendingProps!==n,v||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(n||d!==c)&&ud(t,a,r,c),Vi=!1;var g=t.memoizedState;a.state=g,An(t,r,a,s),xn(),d=t.memoizedState,n||g!==d||Vi?(typeof f=="function"&&(rc(t,i,f,r),d=t.memoizedState),(o=Vi||cd(t,i,o,r,g,d,c))?(v||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=d),a.props=r,a.state=d,a.context=c,r=o):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,uu(e,t),c=t.memoizedProps,v=Hr(i,c),a.props=v,f=t.pendingProps,g=a.context,d=i.contextType,o=ms,typeof d=="object"&&d!==null&&(o=rt(d)),n=i.getDerivedStateFromProps,(d=typeof n=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(c!==f||g!==o)&&ud(t,a,r,o),Vi=!1,g=t.memoizedState,a.state=g,An(t,r,a,s),xn();var S=t.memoizedState;c!==f||g!==S||Vi||e!==null&&e.dependencies!==null&&Eo(e.dependencies)?(typeof n=="function"&&(rc(t,i,n,r),S=t.memoizedState),(v=Vi||cd(t,i,v,r,g,S,o)||e!==null&&e.dependencies!==null&&Eo(e.dependencies))?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,S,o),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,S,o)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||c===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=S),a.props=r,a.state=S,a.context=o,r=v):(typeof a.componentDidUpdate!="function"||c===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,so(e,t),r=(t.flags&128)!==0,a||r?(a=t.stateNode,i=r&&typeof i.getDerivedStateFromError!="function"?null:a.render(),t.flags|=1,e!==null&&r?(t.child=kr(t,e.child,null,s),t.child=kr(t,null,i,s)):Je(e,t,i,s),t.memoizedState=a.state,e=t.child):e=Hi(e,t,s),e}function md(e,t,i,r){return Tr(),t.flags|=256,Je(e,t,i,r),t.child}var sc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function nc(e){return{baseLanes:e,cachePool:Xv()}}function ac(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=wt),e}function Fg(e,t,i){var r=t.pendingProps,s=!1,a=(t.flags&128)!==0,c;if((c=a)||(c=e!==null&&e.memoizedState===null?!1:(je.current&2)!==0),c&&(s=!0,t.flags&=-129),c=(t.flags&32)!==0,t.flags&=-33,e===null){if(_e){if(s?Ki(t):Yi(),(e=Te)?(e=Bp(e,Pt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:dr!==null?{id:si,overflow:ni}:null,retryLane:536870912,hydrationErrors:null},i=Vv(e),i.return=t,t.child=i,tt=t,Te=null)):e=null,e===null)throw _r(t);return Bu(e)?t.lanes=32:t.lanes=536870912,null}var n=r.children;return r=r.fallback,s?(Yi(),s=t.mode,n=Mo({mode:"hidden",children:n},s),r=Lr(r,s,i,null),n.return=t,r.return=t,n.sibling=r,t.child=n,r=t.child,r.memoizedState=nc(i),r.childLanes=ac(e,c,i),t.memoizedState=sc,pn(null,r)):(Ki(t),yu(t,n))}var o=e.memoizedState;if(o!==null&&(n=o.dehydrated,n!==null)){if(a)t.flags&256?(Ki(t),t.flags&=-257,t=oc(e,t,i)):t.memoizedState!==null?(Yi(),t.child=e.child,t.flags|=128,t=null):(Yi(),n=r.fallback,s=t.mode,r=Mo({mode:"visible",children:r.children},s),n=Lr(n,s,i,null),n.flags|=2,r.return=t,n.return=t,r.sibling=n,t.child=r,kr(t,e.child,null,i),r=t.child,r.memoizedState=nc(i),r.childLanes=ac(e,c,i),t.memoizedState=sc,t=pn(null,r));else if(Ki(t),Bu(n)){if(c=n.nextSibling&&n.nextSibling.dataset,c)var d=c.dgst;c=d,r=Error(q(419)),r.stack="",r.digest=c,Fn({value:r,source:null,stack:null}),t=oc(e,t,i)}else if(Ge||Zs(e,t,i,!1),c=(i&e.childLanes)!==0,Ge||c){if(c=Ae,c!==null&&(r=mv(c,i),r!==0&&r!==o.retryLane))throw o.retryLane=r,Vr(e,r),_t(c,e,r),qh;Tu(n)||No(),t=oc(e,t,i)}else Tu(n)?(t.flags|=192,t.child=e.child,t=null):(e=o.treeContext,Te=qt(n.nextSibling),tt=t,_e=!0,sr=null,Pt=!1,e!==null&&Kv(t,e),t=yu(t,r.children),t.flags|=4096);return t}return s?(Yi(),n=r.fallback,s=t.mode,o=e.child,d=o.sibling,r=Oi(o,{mode:"hidden",children:r.children}),r.subtreeFlags=o.subtreeFlags&65011712,d!==null?n=Oi(d,n):(n=Lr(n,s,i,null),n.flags|=2),n.return=t,r.return=t,r.sibling=n,t.child=r,pn(null,r),r=t.child,n=e.child.memoizedState,n===null?n=nc(i):(s=n.cachePool,s!==null?(o=Ve._currentValue,s=s.parent!==o?{parent:o,pool:o}:s):s=Xv(),n={baseLanes:n.baseLanes|i,cachePool:s}),r.memoizedState=n,r.childLanes=ac(e,c,i),t.memoizedState=sc,pn(e.child,r)):(Ki(t),i=e.child,e=i.sibling,i=Oi(i,{mode:"visible",children:r.children}),i.return=t,i.sibling=null,e!==null&&(c=t.deletions,c===null?(t.deletions=[e],t.flags|=16):c.push(e)),t.child=i,t.memoizedState=null,i)}function yu(e,t){return t=Mo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Mo(e,t){return e=yt(22,e,null,t),e.lanes=0,e}function oc(e,t,i){return kr(t,e.child,null,i),e=yu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Sd(e,t,i){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ou(e.return,t,i)}function lc(e,t,i,r,s,a){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:i,tailMode:s,treeForkCount:a}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=r,c.tail=i,c.tailMode=s,c.treeForkCount=a)}function $g(e,t,i){var r=t.pendingProps,s=r.revealOrder,a=r.tail;r=r.children;var c=je.current,n=(c&2)!==0;if(n?(c=c&1|2,t.flags|=128):c&=1,Oe(je,c),Je(e,t,r,i),r=_e?In:0,!n&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sd(e,i,t);else if(e.tag===19)Sd(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(s){case"forwards":for(i=t.child,s=null;i!==null;)e=i.alternate,e!==null&&Lo(e)===null&&(s=i),i=i.sibling;i=s,i===null?(s=t.child,t.child=null):(s=i.sibling,i.sibling=null),lc(t,!1,s,i,a,r);break;case"backwards":case"unstable_legacy-backwards":for(i=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Lo(e)===null){t.child=s;break}e=s.sibling,s.sibling=i,i=s,s=e}lc(t,!0,i,null,a,r);break;case"together":lc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Hi(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),gr|=t.lanes,!(i&t.childLanes))if(e!==null){if(Zs(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(q(153));if(t.child!==null){for(e=t.child,i=Oi(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Oi(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Wh(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Eo(e)))}function By(e,t,i){switch(t.tag){case 3:po(t,t.stateNode.containerInfo),Gi(t,Ve,e.memoizedState.cache),Tr();break;case 27:case 5:Kc(t);break;case 4:po(t,t.stateNode.containerInfo);break;case 10:Gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,du(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Ki(t),t.flags|=128,null):i&t.child.childLanes?Fg(e,t,i):(Ki(t),e=Hi(e,t,i),e!==null?e.sibling:null);Ki(t);break;case 19:var s=(e.flags&128)!==0;if(r=(i&t.childLanes)!==0,r||(Zs(e,t,i,!1),r=(i&t.childLanes)!==0),s){if(r)return $g(e,t,i);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Oe(je,je.current),r)break;return null;case 22:return t.lanes=0,Ig(e,t,i,t.pendingProps);case 24:Gi(t,Ve,e.memoizedState.cache)}return Hi(e,t,i)}function qg(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ge=!0;else{if(!Wh(e,i)&&!(t.flags&128))return Ge=!1,By(e,t,i);Ge=!!(e.flags&131072)}else Ge=!1,_e&&t.flags&1048576&&Gv(t,In,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Er(t.elementType),t.type=e,typeof e=="function")wh(e)?(r=Hr(e,r),t.tag=1,t=pd(null,t,e,r,i)):(t.tag=0,t=Su(null,t,e,r,i));else{if(e!=null){var s=e.$$typeof;if(s===ch){t.tag=11,t=fd(null,t,e,r,i);break e}else if(s===uh){t.tag=14,t=dd(null,t,e,r,i);break e}}throw t=Vc(e)||e,Error(q(306,t,""))}}return t;case 0:return Su(e,t,t.type,t.pendingProps,i);case 1:return r=t.type,s=Hr(r,t.pendingProps),pd(e,t,r,s,i);case 3:e:{if(po(t,t.stateNode.containerInfo),e===null)throw Error(q(387));r=t.pendingProps;var a=t.memoizedState;s=a.element,uu(e,t),An(t,r,null,i);var c=t.memoizedState;if(r=c.cache,Gi(t,Ve,r),r!==a.cache&&lu(t,[Ve],i,!0),xn(),r=c.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:c.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=md(e,t,r,i);break e}else if(r!==s){s=zt(Error(q(424)),t),Fn(s),t=md(e,t,r,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Te=qt(e.firstChild),tt=t,_e=!0,sr=null,Pt=!0,i=Jv(t,null,r,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Tr(),r===s){t=Hi(e,t,i);break e}Je(e,t,r,i)}t=t.child}return t;case 26:return so(e,t),e===null?(i=Ud(t.type,null,t.pendingProps,null))?t.memoizedState=i:_e||(i=t.type,e=t.pendingProps,r=Uo(rr.current).createElement(i),r[et]=t,r[vt]=e,st(r,i,e),Ze(r),t.stateNode=r):t.memoizedState=Ud(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Kc(t),e===null&&_e&&(r=t.stateNode=kp(t.type,t.pendingProps,rr.current),tt=t,Pt=!0,s=Te,mr(t.type)?(ku=s,Te=qt(r.firstChild)):Te=s),Je(e,t,t.pendingProps.children,i),so(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&_e&&((s=r=Te)&&(r=cb(r,t.type,t.pendingProps,Pt),r!==null?(t.stateNode=r,tt=t,Te=qt(r.firstChild),Pt=!1,s=!0):s=!1),s||_r(t)),Kc(t),s=t.type,a=t.pendingProps,c=e!==null?e.memoizedProps:null,r=a.children,Du(s,a)?r=null:c!==null&&Du(s,c)&&(t.flags|=32),t.memoizedState!==null&&(s=Th(e,t,Ey,null,null,i),Kn._currentValue=s),so(e,t),Je(e,t,r,i),t.child;case 6:return e===null&&_e&&((e=i=Te)&&(i=ub(i,t.pendingProps,Pt),i!==null?(t.stateNode=i,tt=t,Te=null,e=!0):e=!1),e||_r(t)),null;case 13:return Fg(e,t,i);case 4:return po(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=kr(t,null,r,i):Je(e,t,r,i),t.child;case 11:return fd(e,t,t.type,t.pendingProps,i);case 7:return Je(e,t,t.pendingProps,i),t.child;case 8:return Je(e,t,t.pendingProps.children,i),t.child;case 12:return Je(e,t,t.pendingProps.children,i),t.child;case 10:return r=t.pendingProps,Gi(t,t.type,r.value),Je(e,t,r.children,i),t.child;case 9:return s=t.type._context,r=t.pendingProps.children,Br(t),s=rt(s),r=r(s),t.flags|=1,Je(e,t,r,i),t.child;case 14:return dd(e,t,t.type,t.pendingProps,i);case 15:return jg(e,t,t.type,t.pendingProps,i);case 19:return $g(e,t,i);case 31:return Ty(e,t,i);case 22:return Ig(e,t,i,t.pendingProps);case 24:return Br(t),r=rt(Ve),e===null?(s=Lh(),s===null&&(s=Ae,a=Ah(),s.pooledCache=a,a.refCount++,a!==null&&(s.pooledCacheLanes|=i),s=a),t.memoizedState={parent:r,cache:s},Rh(t),Gi(t,Ve,s)):(e.lanes&i&&(uu(e,t),An(t,null,null,i),xn()),s=e.memoizedState,a=t.memoizedState,s.parent!==r?(s={parent:r,cache:r},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),Gi(t,Ve,r)):(r=a.cache,Gi(t,Ve,r),r!==s.cache&&lu(t,[Ve],i,!0))),Je(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(q(156,t.tag))}function pi(e){e.flags|=4}function cc(e,t,i,r,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(_p())e.flags|=8192;else throw Rr=xo,Oh}else e.flags&=-16777217}function yd(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!zp(t))if(_p())e.flags|=8192;else throw Rr=xo,Oh}function Ba(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?vv():536870912,e.lanes|=t,Us|=t)}function un(e,t){if(!_e)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var r=null;i!==null;)i.alternate!==null&&(r=i),i=i.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Me(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,r=0;if(t)for(var s=e.child;s!==null;)i|=s.lanes|s.childLanes,r|=s.subtreeFlags&65011712,r|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)i|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=i,t}function ky(e,t,i){var r=t.pendingProps;switch(xh(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Me(t),null;case 1:return Me(t),null;case 3:return i=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ri(Ve),Bs(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(es(t)?pi(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ec())),Me(t),null;case 26:var s=t.type,a=t.memoizedState;return e===null?(pi(t),a!==null?(Me(t),yd(t,a)):(Me(t),cc(t,s,null,r,i))):a?a!==e.memoizedState?(pi(t),Me(t),yd(t,a)):(Me(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&pi(t),Me(t),cc(t,s,e,r,i)),null;case 27:if(mo(t),i=rr.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pi(t);else{if(!r){if(t.stateNode===null)throw Error(q(166));return Me(t),null}e=ci.current,es(t)?Yf(t):(e=kp(s,r,i),t.stateNode=e,pi(t))}return Me(t),null;case 5:if(mo(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&pi(t);else{if(!r){if(t.stateNode===null)throw Error(q(166));return Me(t),null}if(a=ci.current,es(t))Yf(t);else{var c=Uo(rr.current);switch(a){case 1:a=c.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:a=c.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":a=c.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":a=c.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":a=c.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof r.is=="string"?c.createElement("select",{is:r.is}):c.createElement("select"),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is=="string"?c.createElement(s,{is:r.is}):c.createElement(s)}}a[et]=t,a[vt]=r;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)a.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=a;e:switch(st(a,s,r),s){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&pi(t)}}return Me(t),cc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&pi(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(q(166));if(e=rr.current,es(t)){if(e=t.stateNode,i=t.memoizedProps,r=null,s=tt,s!==null)switch(s.tag){case 27:case 5:r=s.memoizedProps}e[et]=t,e=!!(e.nodeValue===i||r!==null&&r.suppressHydrationWarning===!0||Dp(e.nodeValue,i)),e||_r(t,!0)}else e=Uo(e).createTextNode(r),e[et]=t,t.stateNode=e}return Me(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(r=es(t),i!==null){if(e===null){if(!r)throw Error(q(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(557));e[et]=t}else Tr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Me(t),e=!1}else i=ec(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(mt(t),t):(mt(t),null);if(t.flags&128)throw Error(q(558))}return Me(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=es(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(q(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(q(317));s[et]=t}else Tr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Me(t),s=!1}else s=ec(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(mt(t),t):(mt(t),null)}return mt(t),t.flags&128?(t.lanes=i,t):(i=r!==null,e=e!==null&&e.memoizedState!==null,i&&(r=t.child,s=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(s=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==s&&(r.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Ba(t,t.updateQueue),Me(t),null);case 4:return Bs(),e===null&&Qh(t.stateNode.containerInfo),Me(t),null;case 10:return Ri(t.type),Me(t),null;case 19:if(Qe(je),r=t.memoizedState,r===null)return Me(t),null;if(s=(t.flags&128)!==0,a=r.rendering,a===null)if(s)un(r,!1);else{if(Ue!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Lo(e),a!==null){for(t.flags|=128,un(r,!1),e=a.updateQueue,t.updateQueue=e,Ba(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Wv(i,e),i=i.sibling;return Oe(je,je.current&1|2),_e&&bi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Et()>Bo&&(t.flags|=128,s=!0,un(r,!1),t.lanes=4194304)}else{if(!s)if(e=Lo(a),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Ba(t,e),un(r,!0),r.tail===null&&r.tailMode==="hidden"&&!a.alternate&&!_e)return Me(t),null}else 2*Et()-r.renderingStartTime>Bo&&i!==536870912&&(t.flags|=128,s=!0,un(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e!==null?e.sibling=a:t.child=a,r.last=a)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Et(),e.sibling=null,i=je.current,Oe(je,s?i&1|2:i&1),_e&&bi(t,r.treeForkCount),e):(Me(t),null);case 22:case 23:return mt(t),Dh(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?i&536870912&&!(t.flags&128)&&(Me(t),t.subtreeFlags&6&&(t.flags|=8192)):Me(t),i=t.updateQueue,i!==null&&Ba(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==i&&(t.flags|=2048),e!==null&&Qe(Or),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Ri(Ve),Me(t),null;case 25:return null;case 30:return null}throw Error(q(156,t.tag))}function Ny(e,t){switch(xh(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ri(Ve),Bs(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return mo(t),null;case 31:if(t.memoizedState!==null){if(mt(t),t.alternate===null)throw Error(q(340));Tr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(mt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(q(340));Tr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qe(je),null;case 4:return Bs(),null;case 10:return Ri(t.type),null;case 22:case 23:return mt(t),Dh(),e!==null&&Qe(Or),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ri(Ve),null;case 25:return null;default:return null}}function Wg(e,t){switch(xh(t),t.tag){case 3:Ri(Ve),Bs();break;case 26:case 27:case 5:mo(t);break;case 4:Bs();break;case 31:t.memoizedState!==null&&mt(t);break;case 13:mt(t);break;case 19:Qe(je);break;case 10:Ri(t.type);break;case 22:case 23:mt(t),Dh(),e!==null&&Qe(Or);break;case 24:Ri(Ve)}}function ua(e,t){try{var i=t.updateQueue,r=i!==null?i.lastEffect:null;if(r!==null){var s=r.next;i=s;do{if((i.tag&e)===e){r=void 0;var a=i.create,c=i.inst;r=a(),c.destroy=r}i=i.next}while(i!==s)}}catch(n){Ce(t,t.return,n)}}function vr(e,t,i){try{var r=t.updateQueue,s=r!==null?r.lastEffect:null;if(s!==null){var a=s.next;r=a;do{if((r.tag&e)===e){var c=r.inst,n=c.destroy;if(n!==void 0){c.destroy=void 0,s=t;var o=i,d=n;try{d()}catch(v){Ce(s,o,v)}}}r=r.next}while(r!==a)}}catch(v){Ce(t,t.return,v)}}function Vg(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{tg(t,i)}catch(r){Ce(e,e.return,r)}}}function Gg(e,t,i){i.props=Hr(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(r){Ce(e,t,r)}}function On(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof i=="function"?e.refCleanup=i(r):i.current=r}}catch(s){Ce(e,t,s)}}function ai(e,t){var i=e.ref,r=e.refCleanup;if(i!==null)if(typeof r=="function")try{r()}catch(s){Ce(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(s){Ce(e,t,s)}else i.current=null}function Kg(e){var t=e.type,i=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&r.focus();break e;case"img":i.src?r.src=i.src:i.srcSet&&(r.srcset=i.srcSet)}}catch(s){Ce(e,e.return,s)}}function uc(e,t,i){try{var r=e.stateNode;rb(r,e.type,i,t),r[vt]=t}catch(s){Ce(e,e.return,s)}}function Yg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&mr(e.type)||e.tag===4}function hc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Yg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&mr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function bu(e,t,i){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Ai));else if(r!==4&&(r===27&&mr(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(bu(e,t,i),e=e.sibling;e!==null;)bu(e,t,i),e=e.sibling}function To(e,t,i){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(r!==4&&(r===27&&mr(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(To(e,t,i),e=e.sibling;e!==null;)To(e,t,i),e=e.sibling}function Xg(e){var t=e.stateNode,i=e.memoizedProps;try{for(var r=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);st(t,r,i),t[et]=e,t[vt]=i}catch(a){Ce(e,e.return,a)}}var Ci=!1,We=!1,fc=!1,bd=typeof WeakSet=="function"?WeakSet:Set,Xe=null;function Hy(e,t){if(e=e.containerInfo,Ou=$o,e=zv(e),yh(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var r=i.getSelection&&i.getSelection();if(r&&r.rangeCount!==0){i=r.anchorNode;var s=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{i.nodeType,a.nodeType}catch{i=null;break e}var c=0,n=-1,o=-1,d=0,v=0,f=e,g=null;t:for(;;){for(var S;f!==i||s!==0&&f.nodeType!==3||(n=c+s),f!==a||r!==0&&f.nodeType!==3||(o=c+r),f.nodeType===3&&(c+=f.nodeValue.length),(S=f.firstChild)!==null;)g=f,f=S;for(;;){if(f===e)break t;if(g===i&&++d===s&&(n=c),g===a&&++v===r&&(o=c),(S=f.nextSibling)!==null)break;f=g,g=f.parentNode}f=S}i=n===-1||o===-1?null:{start:n,end:o}}else i=null}i=i||{start:0,end:0}}else i=null;for(Ru={focusedElem:e,selectionRange:i},$o=!1,Xe=t;Xe!==null;)if(t=Xe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Xe=e;else for(;Xe!==null;){switch(t=Xe,a=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)s=e[i],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&a!==null){e=void 0,i=t,s=a.memoizedProps,a=a.memoizedState,r=i.stateNode;try{var C=Hr(i.type,s);e=r.getSnapshotBeforeUpdate(C,a),r.__reactInternalSnapshotBeforeUpdate=e}catch(p){Ce(i,i.return,p)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Mu(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Mu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(q(163))}if(e=t.sibling,e!==null){e.return=t.return,Xe=e;break}Xe=t.return}}function Zg(e,t,i){var r=i.flags;switch(i.tag){case 0:case 11:case 15:Si(e,i),r&4&&ua(5,i);break;case 1:if(Si(e,i),r&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(c){Ce(i,i.return,c)}else{var s=Hr(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(c){Ce(i,i.return,c)}}r&64&&Vg(i),r&512&&On(i,i.return);break;case 3:if(Si(e,i),r&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{tg(e,t)}catch(c){Ce(i,i.return,c)}}break;case 27:t===null&&r&4&&Xg(i);case 26:case 5:Si(e,i),t===null&&r&4&&Kg(i),r&512&&On(i,i.return);break;case 12:Si(e,i);break;case 31:Si(e,i),r&4&&ep(e,i);break;case 13:Si(e,i),r&4&&tp(e,i),r&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Wy.bind(null,i),hb(e,i))));break;case 22:if(r=i.memoizedState!==null||Ci,!r){t=t!==null&&t.memoizedState!==null||We,s=Ci;var a=We;Ci=r,(We=t)&&!a?yi(e,i,(i.subtreeFlags&8772)!==0):Si(e,i),Ci=s,We=a}break;case 30:break;default:Si(e,i)}}function Qg(e){var t=e.alternate;t!==null&&(e.alternate=null,Qg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&_h(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ne=null,ft=!1;function mi(e,t,i){for(i=i.child;i!==null;)Jg(e,t,i),i=i.sibling}function Jg(e,t,i){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(ra,i)}catch{}switch(i.tag){case 26:We||ai(i,t),mi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:We||ai(i,t);var r=Ne,s=ft;mr(i.type)&&(Ne=i.stateNode,ft=!1),mi(e,t,i),Tn(i.stateNode),Ne=r,ft=s;break;case 5:We||ai(i,t);case 6:if(r=Ne,s=ft,Ne=null,mi(e,t,i),Ne=r,ft=s,Ne!==null)if(ft)try{(Ne.nodeType===9?Ne.body:Ne.nodeName==="HTML"?Ne.ownerDocument.body:Ne).removeChild(i.stateNode)}catch(a){Ce(i,t,a)}else try{Ne.removeChild(i.stateNode)}catch(a){Ce(i,t,a)}break;case 18:Ne!==null&&(ft?(e=Ne,kd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),$s(e)):kd(Ne,i.stateNode));break;case 4:r=Ne,s=ft,Ne=i.stateNode.containerInfo,ft=!0,mi(e,t,i),Ne=r,ft=s;break;case 0:case 11:case 14:case 15:vr(2,i,t),We||vr(4,i,t),mi(e,t,i);break;case 1:We||(ai(i,t),r=i.stateNode,typeof r.componentWillUnmount=="function"&&Gg(i,t,r)),mi(e,t,i);break;case 21:mi(e,t,i);break;case 22:We=(r=We)||i.memoizedState!==null,mi(e,t,i),We=r;break;default:mi(e,t,i)}}function ep(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{$s(e)}catch(i){Ce(t,t.return,i)}}}function tp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{$s(e)}catch(i){Ce(t,t.return,i)}}function zy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new bd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new bd),t;default:throw Error(q(435,e.tag))}}function ka(e,t){var i=zy(e);t.forEach(function(r){if(!i.has(r)){i.add(r);var s=Vy.bind(null,e,r);r.then(s,s)}})}function ut(e,t){var i=t.deletions;if(i!==null)for(var r=0;r<i.length;r++){var s=i[r],a=e,c=t,n=c;e:for(;n!==null;){switch(n.tag){case 27:if(mr(n.type)){Ne=n.stateNode,ft=!1;break e}break;case 5:Ne=n.stateNode,ft=!1;break e;case 3:case 4:Ne=n.stateNode.containerInfo,ft=!0;break e}n=n.return}if(Ne===null)throw Error(q(160));Jg(a,c,s),Ne=null,ft=!1,a=s.alternate,a!==null&&(a.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ip(t,e),t=t.sibling}var Gt=null;function ip(e,t){var i=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ut(t,e),ht(e),r&4&&(vr(3,e,e.return),ua(3,e),vr(5,e,e.return));break;case 1:ut(t,e),ht(e),r&512&&(We||i===null||ai(i,i.return)),r&64&&Ci&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?r:i.concat(r))));break;case 26:var s=Gt;if(ut(t,e),ht(e),r&512&&(We||i===null||ai(i,i.return)),r&4){var a=i!==null?i.memoizedState:null;if(r=e.memoizedState,i===null)if(r===null)if(e.stateNode===null){e:{r=e.type,i=e.memoizedProps,s=s.ownerDocument||s;t:switch(r){case"title":a=s.getElementsByTagName("title")[0],(!a||a[aa]||a[et]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=s.createElement(r),s.head.insertBefore(a,s.querySelector("head > title"))),st(a,r,i),a[et]=e,Ze(a),r=a;break e;case"link":var c=Id("link","href",s).get(r+(i.href||""));if(c){for(var n=0;n<c.length;n++)if(a=c[n],a.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&a.getAttribute("rel")===(i.rel==null?null:i.rel)&&a.getAttribute("title")===(i.title==null?null:i.title)&&a.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){c.splice(n,1);break t}}a=s.createElement(r),st(a,r,i),s.head.appendChild(a);break;case"meta":if(c=Id("meta","content",s).get(r+(i.content||""))){for(n=0;n<c.length;n++)if(a=c[n],a.getAttribute("content")===(i.content==null?null:""+i.content)&&a.getAttribute("name")===(i.name==null?null:i.name)&&a.getAttribute("property")===(i.property==null?null:i.property)&&a.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&a.getAttribute("charset")===(i.charSet==null?null:i.charSet)){c.splice(n,1);break t}}a=s.createElement(r),st(a,r,i),s.head.appendChild(a);break;default:throw Error(q(468,r))}a[et]=e,Ze(a),r=a}e.stateNode=r}else Fd(s,e.type,e.stateNode);else e.stateNode=jd(s,r,e.memoizedProps);else a!==r?(a===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):a.count--,r===null?Fd(s,e.type,e.stateNode):jd(s,r,e.memoizedProps)):r===null&&e.stateNode!==null&&uc(e,e.memoizedProps,i.memoizedProps)}break;case 27:ut(t,e),ht(e),r&512&&(We||i===null||ai(i,i.return)),i!==null&&r&4&&uc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(ut(t,e),ht(e),r&512&&(We||i===null||ai(i,i.return)),e.flags&32){s=e.stateNode;try{Ns(s,"")}catch(C){Ce(e,e.return,C)}}r&4&&e.stateNode!=null&&(s=e.memoizedProps,uc(e,s,i!==null?i.memoizedProps:s)),r&1024&&(fc=!0);break;case 6:if(ut(t,e),ht(e),r&4){if(e.stateNode===null)throw Error(q(162));r=e.memoizedProps,i=e.stateNode;try{i.nodeValue=r}catch(C){Ce(e,e.return,C)}}break;case 3:if(oo=null,s=Gt,Gt=jo(t.containerInfo),ut(t,e),Gt=s,ht(e),r&4&&i!==null&&i.memoizedState.isDehydrated)try{$s(t.containerInfo)}catch(C){Ce(e,e.return,C)}fc&&(fc=!1,rp(e));break;case 4:r=Gt,Gt=jo(e.stateNode.containerInfo),ut(t,e),ht(e),Gt=r;break;case 12:ut(t,e),ht(e);break;case 31:ut(t,e),ht(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ka(e,r)));break;case 13:ut(t,e),ht(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Sl=Et()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ka(e,r)));break;case 22:s=e.memoizedState!==null;var o=i!==null&&i.memoizedState!==null,d=Ci,v=We;if(Ci=d||s,We=v||o,ut(t,e),We=v,Ci=d,ht(e),r&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(i===null||o||Ci||We||xr(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){o=i=t;try{if(a=o.stateNode,s)c=a.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none";else{n=o.stateNode;var f=o.memoizedProps.style,g=f!=null&&f.hasOwnProperty("display")?f.display:null;n.style.display=g==null||typeof g=="boolean"?"":(""+g).trim()}}catch(C){Ce(o,o.return,C)}}}else if(t.tag===6){if(i===null){o=t;try{o.stateNode.nodeValue=s?"":o.memoizedProps}catch(C){Ce(o,o.return,C)}}}else if(t.tag===18){if(i===null){o=t;try{var S=o.stateNode;s?Nd(S,!0):Nd(o.stateNode,!1)}catch(C){Ce(o,o.return,C)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(i=r.retryQueue,i!==null&&(r.retryQueue=null,ka(e,i))));break;case 19:ut(t,e),ht(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ka(e,r)));break;case 30:break;case 21:break;default:ut(t,e),ht(e)}}function ht(e){var t=e.flags;if(t&2){try{for(var i,r=e.return;r!==null;){if(Yg(r)){i=r;break}r=r.return}if(i==null)throw Error(q(160));switch(i.tag){case 27:var s=i.stateNode,a=hc(e);To(e,a,s);break;case 5:var c=i.stateNode;i.flags&32&&(Ns(c,""),i.flags&=-33);var n=hc(e);To(e,n,c);break;case 3:case 4:var o=i.stateNode.containerInfo,d=hc(e);bu(e,d,o);break;default:throw Error(q(161))}}catch(v){Ce(e,e.return,v)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function rp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;rp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Si(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Zg(e,t.alternate,t),t=t.sibling}function xr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:vr(4,t,t.return),xr(t);break;case 1:ai(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Gg(t,t.return,i),xr(t);break;case 27:Tn(t.stateNode);case 26:case 5:ai(t,t.return),xr(t);break;case 22:t.memoizedState===null&&xr(t);break;case 30:xr(t);break;default:xr(t)}e=e.sibling}}function yi(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,s=e,a=t,c=a.flags;switch(a.tag){case 0:case 11:case 15:yi(s,a,i),ua(4,a);break;case 1:if(yi(s,a,i),r=a,s=r.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(d){Ce(r,r.return,d)}if(r=a,s=r.updateQueue,s!==null){var n=r.stateNode;try{var o=s.shared.hiddenCallbacks;if(o!==null)for(s.shared.hiddenCallbacks=null,s=0;s<o.length;s++)eg(o[s],n)}catch(d){Ce(r,r.return,d)}}i&&c&64&&Vg(a),On(a,a.return);break;case 27:Xg(a);case 26:case 5:yi(s,a,i),i&&r===null&&c&4&&Kg(a),On(a,a.return);break;case 12:yi(s,a,i);break;case 31:yi(s,a,i),i&&c&4&&ep(s,a);break;case 13:yi(s,a,i),i&&c&4&&tp(s,a);break;case 22:a.memoizedState===null&&yi(s,a,i),On(a,a.return);break;case 30:break;default:yi(s,a,i)}t=t.sibling}}function Vh(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&la(i))}function Gh(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&la(e))}function Vt(e,t,i,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)sp(e,t,i,r),t=t.sibling}function sp(e,t,i,r){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Vt(e,t,i,r),s&2048&&ua(9,t);break;case 1:Vt(e,t,i,r);break;case 3:Vt(e,t,i,r),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&la(e)));break;case 12:if(s&2048){Vt(e,t,i,r),e=t.stateNode;try{var a=t.memoizedProps,c=a.id,n=a.onPostCommit;typeof n=="function"&&n(c,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(o){Ce(t,t.return,o)}}else Vt(e,t,i,r);break;case 31:Vt(e,t,i,r);break;case 13:Vt(e,t,i,r);break;case 23:break;case 22:a=t.stateNode,c=t.alternate,t.memoizedState!==null?a._visibility&2?Vt(e,t,i,r):Rn(e,t):a._visibility&2?Vt(e,t,i,r):(a._visibility|=2,ls(e,t,i,r,(t.subtreeFlags&10256)!==0||!1)),s&2048&&Vh(c,t);break;case 24:Vt(e,t,i,r),s&2048&&Gh(t.alternate,t);break;default:Vt(e,t,i,r)}}function ls(e,t,i,r,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var a=e,c=t,n=i,o=r,d=c.flags;switch(c.tag){case 0:case 11:case 15:ls(a,c,n,o,s),ua(8,c);break;case 23:break;case 22:var v=c.stateNode;c.memoizedState!==null?v._visibility&2?ls(a,c,n,o,s):Rn(a,c):(v._visibility|=2,ls(a,c,n,o,s)),s&&d&2048&&Vh(c.alternate,c);break;case 24:ls(a,c,n,o,s),s&&d&2048&&Gh(c.alternate,c);break;default:ls(a,c,n,o,s)}t=t.sibling}}function Rn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,r=t,s=r.flags;switch(r.tag){case 22:Rn(i,r),s&2048&&Vh(r.alternate,r);break;case 24:Rn(i,r),s&2048&&Gh(r.alternate,r);break;default:Rn(i,r)}t=t.sibling}}var mn=8192;function ts(e,t,i){if(e.subtreeFlags&mn)for(e=e.child;e!==null;)np(e,t,i),e=e.sibling}function np(e,t,i){switch(e.tag){case 26:ts(e,t,i),e.flags&mn&&e.memoizedState!==null&&wb(i,Gt,e.memoizedState,e.memoizedProps);break;case 5:ts(e,t,i);break;case 3:case 4:var r=Gt;Gt=jo(e.stateNode.containerInfo),ts(e,t,i),Gt=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=mn,mn=16777216,ts(e,t,i),mn=r):ts(e,t,i));break;default:ts(e,t,i)}}function ap(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function hn(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var i=0;i<t.length;i++){var r=t[i];Xe=r,lp(r,e)}ap(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)op(e),e=e.sibling}function op(e){switch(e.tag){case 0:case 11:case 15:hn(e),e.flags&2048&&vr(9,e,e.return);break;case 3:hn(e);break;case 12:hn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,no(e)):hn(e);break;default:hn(e)}}function no(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var i=0;i<t.length;i++){var r=t[i];Xe=r,lp(r,e)}ap(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:vr(8,t,t.return),no(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,no(t));break;default:no(t)}e=e.sibling}}function lp(e,t){for(;Xe!==null;){var i=Xe;switch(i.tag){case 0:case 11:case 15:vr(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var r=i.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:la(i.memoizedState.cache)}if(r=i.child,r!==null)r.return=i,Xe=r;else e:for(i=e;Xe!==null;){r=Xe;var s=r.sibling,a=r.return;if(Qg(r),r===i){Xe=null;break e}if(s!==null){s.return=a,Xe=s;break e}Xe=a}}}var Py={getCacheForType:function(e){var t=rt(Ve),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return rt(Ve).controller.signal}},Uy=typeof WeakMap=="function"?WeakMap:Map,Se=0,Ae=null,ue=null,de=0,be=0,pt=null,Ji=!1,Js=!1,Kh=!1,zi=0,Ue=0,gr=0,Dr=0,Yh=0,wt=0,Us=0,Dn=null,dt=null,Cu=!1,Sl=0,cp=0,Bo=1/0,ko=null,or=null,Ke=0,lr=null,js=null,Di=0,wu=0,Eu=null,up=null,Mn=0,xu=null;function Lt(){return Se&2&&de!==0?de&-de:re.T!==null?Zh():Sv()}function hp(){if(wt===0)if(!(de&536870912)||_e){var e=Aa;Aa<<=1,!(Aa&3932160)&&(Aa=262144),wt=e}else wt=536870912;return e=Rt.current,e!==null&&(e.flags|=32),wt}function _t(e,t,i){(e===Ae&&(be===2||be===9)||e.cancelPendingCommit!==null)&&(Is(e,0),er(e,de,wt,!1)),na(e,i),(!(Se&2)||e!==Ae)&&(e===Ae&&(!(Se&2)&&(Dr|=i),Ue===4&&er(e,de,wt,!1)),_i(e))}function fp(e,t,i){if(Se&6)throw Error(q(327));var r=!i&&(t&127)===0&&(t&e.expiredLanes)===0||sa(e,t),s=r?Fy(e,t):dc(e,t,!0),a=r;do{if(s===0){Js&&!r&&er(e,t,0,!1);break}else{if(i=e.current.alternate,a&&!jy(i)){s=dc(e,t,!1),a=!1;continue}if(s===2){if(a=t,e.errorRecoveryDisabledLanes&a)var c=0;else c=e.pendingLanes&-536870913,c=c!==0?c:c&536870912?536870912:0;if(c!==0){t=c;e:{var n=e;s=Dn;var o=n.current.memoizedState.isDehydrated;if(o&&(Is(n,c).flags|=256),c=dc(n,c,!1),c!==2){if(Kh&&!o){n.errorRecoveryDisabledLanes|=a,Dr|=a,s=4;break e}a=dt,dt=s,a!==null&&(dt===null?dt=a:dt.push.apply(dt,a))}s=c}if(a=!1,s!==2)continue}}if(s===1){Is(e,0),er(e,t,0,!0);break}e:{switch(r=e,a=s,a){case 0:case 1:throw Error(q(345));case 4:if((t&4194048)!==t)break;case 6:er(r,t,wt,!Ji);break e;case 2:dt=null;break;case 3:case 5:break;default:throw Error(q(329))}if((t&62914560)===t&&(s=Sl+300-Et(),10<s)){if(er(r,t,wt,!Ji),ll(r,0,!0)!==0)break e;Di=t,r.timeoutHandle=Tp(Cd.bind(null,r,i,dt,ko,Cu,t,wt,Dr,Us,Ji,a,"Throttled",-0,0),s);break e}Cd(r,i,dt,ko,Cu,t,wt,Dr,Us,Ji,a,null,-0,0)}}break}while(!0);_i(e)}function Cd(e,t,i,r,s,a,c,n,o,d,v,f,g,S){if(e.timeoutHandle=-1,f=t.subtreeFlags,f&8192||(f&16785408)===16785408){f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ai},np(t,a,f);var C=(a&62914560)===a?Sl-Et():(a&4194048)===a?cp-Et():0;if(C=Eb(f,C),C!==null){Di=a,e.cancelPendingCommit=C(Ed.bind(null,e,t,a,i,r,s,c,n,o,v,f,null,g,S)),er(e,a,c,!d);return}}Ed(e,t,a,i,r,s,c,n,o)}function jy(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var r=0;r<i.length;r++){var s=i[r],a=s.getSnapshot;s=s.value;try{if(!Ot(a(),s))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function er(e,t,i,r){t&=~Yh,t&=~Dr,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var s=t;0<s;){var a=31-At(s),c=1<<a;r[a]=-1,s&=~c}i!==0&&gv(e,i,t)}function yl(){return Se&6?!0:(ha(0),!1)}function Xh(){if(ue!==null){if(be===0)var e=ue.return;else e=ue,Li=Gr=null,Nh(e),Rs=null,$n=0,e=ue;for(;e!==null;)Wg(e.alternate,e),e=e.return;ue=null}}function Is(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,ab(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Di=0,Xh(),Ae=e,ue=i=Oi(e.current,null),de=t,be=0,pt=null,Ji=!1,Js=sa(e,t),Kh=!1,Us=wt=Yh=Dr=gr=Ue=0,dt=Dn=null,Cu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var s=31-At(r),a=1<<s;t|=e[s],r&=~a}return zi=t,fl(),i}function dp(e,t){ae=null,re.H=Wn,t===Qs||t===_l?(t=ed(),be=3):t===Oh?(t=ed(),be=4):be=t===qh?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,pt=t,ue===null&&(Ue=1,Do(e,zt(t,e.current)))}function _p(){var e=Rt.current;return e===null?!0:(de&4194048)===de?$t===null:(de&62914560)===de||de&536870912?e===$t:!1}function vp(){var e=re.H;return re.H=Wn,e===null?Wn:e}function gp(){var e=re.A;return re.A=Py,e}function No(){Ue=4,Ji||(de&4194048)!==de&&Rt.current!==null||(Js=!0),!(gr&134217727)&&!(Dr&134217727)||Ae===null||er(Ae,de,wt,!1)}function dc(e,t,i){var r=Se;Se|=2;var s=vp(),a=gp();(Ae!==e||de!==t)&&(ko=null,Is(e,t)),t=!1;var c=Ue;e:do try{if(be!==0&&ue!==null){var n=ue,o=pt;switch(be){case 8:Xh(),c=6;break e;case 3:case 2:case 9:case 6:Rt.current===null&&(t=!0);var d=be;if(be=0,pt=null,bs(e,n,o,d),i&&Js){c=0;break e}break;default:d=be,be=0,pt=null,bs(e,n,o,d)}}Iy(),c=Ue;break}catch(v){dp(e,v)}while(!0);return t&&e.shellSuspendCounter++,Li=Gr=null,Se=r,re.H=s,re.A=a,ue===null&&(Ae=null,de=0,fl()),c}function Iy(){for(;ue!==null;)pp(ue)}function Fy(e,t){var i=Se;Se|=2;var r=vp(),s=gp();Ae!==e||de!==t?(ko=null,Bo=Et()+500,Is(e,t)):Js=sa(e,t);e:do try{if(be!==0&&ue!==null){t=ue;var a=pt;t:switch(be){case 1:be=0,pt=null,bs(e,t,a,1);break;case 2:case 9:if(Jf(a)){be=0,pt=null,wd(t);break}t=function(){be!==2&&be!==9||Ae!==e||(be=7),_i(e)},a.then(t,t);break e;case 3:be=7;break e;case 4:be=5;break e;case 7:Jf(a)?(be=0,pt=null,wd(t)):(be=0,pt=null,bs(e,t,a,7));break;case 5:var c=null;switch(ue.tag){case 26:c=ue.memoizedState;case 5:case 27:var n=ue;if(c?zp(c):n.stateNode.complete){be=0,pt=null;var o=n.sibling;if(o!==null)ue=o;else{var d=n.return;d!==null?(ue=d,bl(d)):ue=null}break t}}be=0,pt=null,bs(e,t,a,5);break;case 6:be=0,pt=null,bs(e,t,a,6);break;case 8:Xh(),Ue=6;break e;default:throw Error(q(462))}}$y();break}catch(v){dp(e,v)}while(!0);return Li=Gr=null,re.H=r,re.A=s,Se=i,ue!==null?0:(Ae=null,de=0,fl(),Ue)}function $y(){for(;ue!==null&&!fS();)pp(ue)}function pp(e){var t=qg(e.alternate,e,zi);e.memoizedProps=e.pendingProps,t===null?bl(e):ue=t}function wd(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=gd(i,t,t.pendingProps,t.type,void 0,de);break;case 11:t=gd(i,t,t.pendingProps,t.type.render,t.ref,de);break;case 5:Nh(t);default:Wg(i,t),t=ue=Wv(t,zi),t=qg(i,t,zi)}e.memoizedProps=e.pendingProps,t===null?bl(e):ue=t}function bs(e,t,i,r){Li=Gr=null,Nh(t),Rs=null,$n=0;var s=t.return;try{if(My(e,s,t,i,de)){Ue=1,Do(e,zt(i,e.current)),ue=null;return}}catch(a){if(s!==null)throw ue=s,a;Ue=1,Do(e,zt(i,e.current)),ue=null;return}t.flags&32768?(_e||r===1?e=!0:Js||de&536870912?e=!1:(Ji=e=!0,(r===2||r===9||r===3||r===6)&&(r=Rt.current,r!==null&&r.tag===13&&(r.flags|=16384))),mp(t,e)):bl(t)}function bl(e){var t=e;do{if(t.flags&32768){mp(t,Ji);return}e=t.return;var i=ky(t.alternate,t,zi);if(i!==null){ue=i;return}if(t=t.sibling,t!==null){ue=t;return}ue=t=e}while(t!==null);Ue===0&&(Ue=5)}function mp(e,t){do{var i=Ny(e.alternate,e);if(i!==null){i.flags&=32767,ue=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){ue=e;return}ue=e=i}while(e!==null);Ue=6,ue=null}function Ed(e,t,i,r,s,a,c,n,o){e.cancelPendingCommit=null;do Cl();while(Ke!==0);if(Se&6)throw Error(q(327));if(t!==null){if(t===e.current)throw Error(q(177));if(a=t.lanes|t.childLanes,a|=bh,CS(e,i,a,c,n,o),e===Ae&&(ue=Ae=null,de=0),js=t,lr=e,Di=i,wu=a,Eu=s,up=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Gy(So,function(){return wp(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,t.subtreeFlags&13878||r){r=re.T,re.T=null,s=ye.p,ye.p=2,c=Se,Se|=4;try{Hy(e,t,i)}finally{Se=c,ye.p=s,re.T=r}}Ke=1,Sp(),yp(),bp()}}function Sp(){if(Ke===1){Ke=0;var e=lr,t=js,i=(t.flags&13878)!==0;if(t.subtreeFlags&13878||i){i=re.T,re.T=null;var r=ye.p;ye.p=2;var s=Se;Se|=4;try{ip(t,e);var a=Ru,c=zv(e.containerInfo),n=a.focusedElem,o=a.selectionRange;if(c!==n&&n&&n.ownerDocument&&Hv(n.ownerDocument.documentElement,n)){if(o!==null&&yh(n)){var d=o.start,v=o.end;if(v===void 0&&(v=d),"selectionStart"in n)n.selectionStart=d,n.selectionEnd=Math.min(v,n.value.length);else{var f=n.ownerDocument||document,g=f&&f.defaultView||window;if(g.getSelection){var S=g.getSelection(),C=n.textContent.length,p=Math.min(o.start,C),h=o.end===void 0?p:Math.min(o.end,C);!S.extend&&p>h&&(c=h,h=p,p=c);var _=Vf(n,p),l=Vf(n,h);if(_&&l&&(S.rangeCount!==1||S.anchorNode!==_.node||S.anchorOffset!==_.offset||S.focusNode!==l.node||S.focusOffset!==l.offset)){var u=f.createRange();u.setStart(_.node,_.offset),S.removeAllRanges(),p>h?(S.addRange(u),S.extend(l.node,l.offset)):(u.setEnd(l.node,l.offset),S.addRange(u))}}}}for(f=[],S=n;S=S.parentNode;)S.nodeType===1&&f.push({element:S,left:S.scrollLeft,top:S.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<f.length;n++){var m=f[n];m.element.scrollLeft=m.left,m.element.scrollTop=m.top}}$o=!!Ou,Ru=Ou=null}finally{Se=s,ye.p=r,re.T=i}}e.current=t,Ke=2}}function yp(){if(Ke===2){Ke=0;var e=lr,t=js,i=(t.flags&8772)!==0;if(t.subtreeFlags&8772||i){i=re.T,re.T=null;var r=ye.p;ye.p=2;var s=Se;Se|=4;try{Zg(e,t.alternate,t)}finally{Se=s,ye.p=r,re.T=i}}Ke=3}}function bp(){if(Ke===4||Ke===3){Ke=0,dS();var e=lr,t=js,i=Di,r=up;t.subtreeFlags&10256||t.flags&10256?Ke=5:(Ke=0,js=lr=null,Cp(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(or=null),dh(i),t=t.stateNode,xt&&typeof xt.onCommitFiberRoot=="function")try{xt.onCommitFiberRoot(ra,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=re.T,s=ye.p,ye.p=2,re.T=null;try{for(var a=e.onRecoverableError,c=0;c<r.length;c++){var n=r[c];a(n.value,{componentStack:n.stack})}}finally{re.T=t,ye.p=s}}Di&3&&Cl(),_i(e),s=e.pendingLanes,i&261930&&s&42?e===xu?Mn++:(Mn=0,xu=e):Mn=0,ha(0)}}function Cp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,la(t)))}function Cl(){return Sp(),yp(),bp(),wp()}function wp(){if(Ke!==5)return!1;var e=lr,t=wu;wu=0;var i=dh(Di),r=re.T,s=ye.p;try{ye.p=32>i?32:i,re.T=null,i=Eu,Eu=null;var a=lr,c=Di;if(Ke=0,js=lr=null,Di=0,Se&6)throw Error(q(331));var n=Se;if(Se|=4,op(a.current),sp(a,a.current,c,i),Se=n,ha(0,!1),xt&&typeof xt.onPostCommitFiberRoot=="function")try{xt.onPostCommitFiberRoot(ra,a)}catch{}return!0}finally{ye.p=s,re.T=r,Cp(e,t)}}function xd(e,t,i){t=zt(i,t),t=mu(e.stateNode,t,2),e=ar(e,t,2),e!==null&&(na(e,2),_i(e))}function Ce(e,t,i){if(e.tag===3)xd(e,e,i);else for(;t!==null;){if(t.tag===3){xd(t,e,i);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(or===null||!or.has(r))){e=zt(i,e),i=Pg(2),r=ar(t,i,2),r!==null&&(Ug(i,r,t,e),na(r,2),_i(r));break}}t=t.return}}function _c(e,t,i){var r=e.pingCache;if(r===null){r=e.pingCache=new Uy;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(i)||(Kh=!0,s.add(i),e=qy.bind(null,e,t,i),t.then(e,e))}function qy(e,t,i){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ae===e&&(de&i)===i&&(Ue===4||Ue===3&&(de&62914560)===de&&300>Et()-Sl?!(Se&2)&&Is(e,0):Yh|=i,Us===de&&(Us=0)),_i(e)}function Ep(e,t){t===0&&(t=vv()),e=Vr(e,t),e!==null&&(na(e,t),_i(e))}function Wy(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Ep(e,i)}function Vy(e,t){var i=0;switch(e.tag){case 31:case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(i=s.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(q(314))}r!==null&&r.delete(t),Ep(e,i)}function Gy(e,t){return hh(e,t)}var Ho=null,cs=null,Au=!1,zo=!1,vc=!1,tr=0;function _i(e){e!==cs&&e.next===null&&(cs===null?Ho=cs=e:cs=cs.next=e),zo=!0,Au||(Au=!0,Yy())}function ha(e,t){if(!vc&&zo){vc=!0;do for(var i=!1,r=Ho;r!==null;){if(e!==0){var s=r.pendingLanes;if(s===0)var a=0;else{var c=r.suspendedLanes,n=r.pingedLanes;a=(1<<31-At(42|e)+1)-1,a&=s&~(c&~n),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(i=!0,Ad(r,a))}else a=de,a=ll(r,r===Ae?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||sa(r,a)||(i=!0,Ad(r,a));r=r.next}while(i);vc=!1}}function Ky(){xp()}function xp(){zo=Au=!1;var e=0;tr!==0&&nb()&&(e=tr);for(var t=Et(),i=null,r=Ho;r!==null;){var s=r.next,a=Ap(r,t);a===0?(r.next=null,i===null?Ho=s:i.next=s,s===null&&(cs=i)):(i=r,(e!==0||a&3)&&(zo=!0)),r=s}Ke!==0&&Ke!==5||ha(e),tr!==0&&(tr=0)}function Ap(e,t){for(var i=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var c=31-At(a),n=1<<c,o=s[c];o===-1?(!(n&i)||n&r)&&(s[c]=bS(n,t)):o<=t&&(e.expiredLanes|=n),a&=~n}if(t=Ae,i=de,i=ll(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,i===0||e===t&&(be===2||be===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&$l(r),e.callbackNode=null,e.callbackPriority=0;if(!(i&3)||sa(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(r!==null&&$l(r),dh(i)){case 2:case 8:i=dv;break;case 32:i=So;break;case 268435456:i=_v;break;default:i=So}return r=Lp.bind(null,e),i=hh(i,r),e.callbackPriority=t,e.callbackNode=i,t}return r!==null&&r!==null&&$l(r),e.callbackPriority=2,e.callbackNode=null,2}function Lp(e,t){if(Ke!==0&&Ke!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Cl()&&e.callbackNode!==i)return null;var r=de;return r=ll(e,e===Ae?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(fp(e,r,t),Ap(e,Et()),e.callbackNode!=null&&e.callbackNode===i?Lp.bind(null,e):null)}function Ad(e,t){if(Cl())return null;fp(e,t,!0)}function Yy(){ob(function(){Se&6?hh(fv,Ky):xp()})}function Zh(){if(tr===0){var e=Hs;e===0&&(e=xa,xa<<=1,!(xa&261888)&&(xa=256)),tr=e}return tr}function Ld(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Xa(""+e)}function Od(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function Xy(e,t,i,r,s){if(t==="submit"&&i&&i.stateNode===s){var a=Ld((s[vt]||null).action),c=r.submitter;c&&(t=(t=c[vt]||null)?Ld(t.formAction):c.getAttribute("formAction"),t!==null&&(a=t,c=null));var n=new cl("action","action",null,r,s);e.push({event:n,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(tr!==0){var o=c?Od(s,c):new FormData(s);gu(i,{pending:!0,data:o,method:s.method,action:a},null,o)}}else typeof a=="function"&&(n.preventDefault(),o=c?Od(s,c):new FormData(s),gu(i,{pending:!0,data:o,method:s.method,action:a},a,o))},currentTarget:s}]})}}for(var gc=0;gc<su.length;gc++){var pc=su[gc],Zy=pc.toLowerCase(),Qy=pc[0].toUpperCase()+pc.slice(1);Qt(Zy,"on"+Qy)}Qt(Uv,"onAnimationEnd");Qt(jv,"onAnimationIteration");Qt(Iv,"onAnimationStart");Qt("dblclick","onDoubleClick");Qt("focusin","onFocus");Qt("focusout","onBlur");Qt(_y,"onTransitionRun");Qt(vy,"onTransitionStart");Qt(gy,"onTransitionCancel");Qt(Fv,"onTransitionEnd");ks("onMouseEnter",["mouseout","mouseover"]);ks("onMouseLeave",["mouseout","mouseover"]);ks("onPointerEnter",["pointerout","pointerover"]);ks("onPointerLeave",["pointerout","pointerover"]);$r("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));$r("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));$r("onBeforeInput",["compositionend","keypress","textInput","paste"]);$r("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));$r("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));$r("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vn="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(" "),Jy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vn));function Op(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var r=e[i],s=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var c=r.length-1;0<=c;c--){var n=r[c],o=n.instance,d=n.currentTarget;if(n=n.listener,o!==a&&s.isPropagationStopped())break e;a=n,s.currentTarget=d;try{a(s)}catch(v){bo(v)}s.currentTarget=null,a=o}else for(c=0;c<r.length;c++){if(n=r[c],o=n.instance,d=n.currentTarget,n=n.listener,o!==a&&s.isPropagationStopped())break e;a=n,s.currentTarget=d;try{a(s)}catch(v){bo(v)}s.currentTarget=null,a=o}}}}function ce(e,t){var i=t[Xc];i===void 0&&(i=t[Xc]=new Set);var r=e+"__bubble";i.has(r)||(Rp(t,e,2,!1),i.add(r))}function mc(e,t,i){var r=0;t&&(r|=4),Rp(i,e,r,t)}var Na="_reactListening"+Math.random().toString(36).slice(2);function Qh(e){if(!e[Na]){e[Na]=!0,yv.forEach(function(i){i!=="selectionchange"&&(Jy.has(i)||mc(i,!1,e),mc(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Na]||(t[Na]=!0,mc("selectionchange",!1,t))}}function Rp(e,t,i,r){switch(Fp(t)){case 2:var s=Lb;break;case 8:s=Ob;break;default:s=rf}i=s.bind(null,t,i,e),s=void 0,!tu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,i,{capture:!0,passive:s}):e.addEventListener(t,i,!0):s!==void 0?e.addEventListener(t,i,{passive:s}):e.addEventListener(t,i,!1)}function Sc(e,t,i,r,s){var a=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var c=r.tag;if(c===3||c===4){var n=r.stateNode.containerInfo;if(n===s)break;if(c===4)for(c=r.return;c!==null;){var o=c.tag;if((o===3||o===4)&&c.stateNode.containerInfo===s)return;c=c.return}for(;n!==null;){if(c=fs(n),c===null)return;if(o=c.tag,o===5||o===6||o===26||o===27){r=a=c;continue e}n=n.parentNode}}r=r.return}Ov(function(){var d=a,v=gh(i),f=[];e:{var g=$v.get(e);if(g!==void 0){var S=cl,C=e;switch(e){case"keypress":if(Qa(i)===0)break e;case"keydown":case"keyup":S=VS;break;case"focusin":C="focus",S=Kl;break;case"focusout":C="blur",S=Kl;break;case"beforeblur":case"afterblur":S=Kl;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":S=Hf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":S=kS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":S=YS;break;case Uv:case jv:case Iv:S=zS;break;case Fv:S=ZS;break;case"scroll":case"scrollend":S=TS;break;case"wheel":S=JS;break;case"copy":case"cut":case"paste":S=US;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":S=Pf;break;case"toggle":case"beforetoggle":S=ty}var p=(t&4)!==0,h=!p&&(e==="scroll"||e==="scrollend"),_=p?g!==null?g+"Capture":null:g;p=[];for(var l=d,u;l!==null;){var m=l;if(u=m.stateNode,m=m.tag,m!==5&&m!==26&&m!==27||u===null||_===null||(m=Pn(l,_),m!=null&&p.push(Gn(l,m,u))),h)break;l=l.return}0<p.length&&(g=new S(g,C,null,i,v),f.push({event:g,listeners:p}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",S=e==="mouseout"||e==="pointerout",g&&i!==eu&&(C=i.relatedTarget||i.fromElement)&&(fs(C)||C[Ys]))break e;if((S||g)&&(g=v.window===v?v:(g=v.ownerDocument)?g.defaultView||g.parentWindow:window,S?(C=i.relatedTarget||i.toElement,S=d,C=C?fs(C):null,C!==null&&(h=ia(C),p=C.tag,C!==h||p!==5&&p!==27&&p!==6)&&(C=null)):(S=null,C=d),S!==C)){if(p=Hf,m="onMouseLeave",_="onMouseEnter",l="mouse",(e==="pointerout"||e==="pointerover")&&(p=Pf,m="onPointerLeave",_="onPointerEnter",l="pointer"),h=S==null?g:gn(S),u=C==null?g:gn(C),g=new p(m,l+"leave",S,i,v),g.target=h,g.relatedTarget=u,m=null,fs(v)===d&&(p=new p(_,l+"enter",C,i,v),p.target=u,p.relatedTarget=h,m=p),h=m,S&&C)t:{for(p=eb,_=S,l=C,u=0,m=_;m;m=p(m))u++;m=0;for(var w=l;w;w=p(w))m++;for(;0<u-m;)_=p(_),u--;for(;0<m-u;)l=p(l),m--;for(;u--;){if(_===l||l!==null&&_===l.alternate){p=_;break t}_=p(_),l=p(l)}p=null}else p=null;S!==null&&Rd(f,g,S,p,!1),C!==null&&h!==null&&Rd(f,h,C,p,!0)}}e:{if(g=d?gn(d):window,S=g.nodeName&&g.nodeName.toLowerCase(),S==="select"||S==="input"&&g.type==="file")var y=Ff;else if(If(g))if(kv)y=hy;else{y=cy;var E=ly}else S=g.nodeName,!S||S.toLowerCase()!=="input"||g.type!=="checkbox"&&g.type!=="radio"?d&&vh(d.elementType)&&(y=Ff):y=uy;if(y&&(y=y(e,d))){Bv(f,y,i,v);break e}E&&E(e,g,d),e==="focusout"&&d&&g.type==="number"&&d.memoizedProps.value!=null&&Jc(g,"number",g.value)}switch(E=d?gn(d):window,e){case"focusin":(If(E)||E.contentEditable==="true")&&(vs=E,iu=d,Cn=null);break;case"focusout":Cn=iu=vs=null;break;case"mousedown":ru=!0;break;case"contextmenu":case"mouseup":case"dragend":ru=!1,Gf(f,i,v);break;case"selectionchange":if(dy)break;case"keydown":case"keyup":Gf(f,i,v)}var b;if(Sh)e:{switch(e){case"compositionstart":var x="onCompositionStart";break e;case"compositionend":x="onCompositionEnd";break e;case"compositionupdate":x="onCompositionUpdate";break e}x=void 0}else _s?Mv(e,i)&&(x="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(x="onCompositionStart");x&&(Dv&&i.locale!=="ko"&&(_s||x!=="onCompositionStart"?x==="onCompositionEnd"&&_s&&(b=Rv()):(Qi=v,ph="value"in Qi?Qi.value:Qi.textContent,_s=!0)),E=Po(d,x),0<E.length&&(x=new zf(x,e,null,i,v),f.push({event:x,listeners:E}),b?x.data=b:(b=Tv(i),b!==null&&(x.data=b)))),(b=ry?sy(e,i):ny(e,i))&&(x=Po(d,"onBeforeInput"),0<x.length&&(E=new zf("onBeforeInput","beforeinput",null,i,v),f.push({event:E,listeners:x}),E.data=b)),Xy(f,e,d,i,v)}Op(f,t)})}function Gn(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Po(e,t){for(var i=t+"Capture",r=[];e!==null;){var s=e,a=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||a===null||(s=Pn(e,i),s!=null&&r.unshift(Gn(e,s,a)),s=Pn(e,t),s!=null&&r.push(Gn(e,s,a))),e.tag===3)return r;e=e.return}return[]}function eb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Rd(e,t,i,r,s){for(var a=t._reactName,c=[];i!==null&&i!==r;){var n=i,o=n.alternate,d=n.stateNode;if(n=n.tag,o!==null&&o===r)break;n!==5&&n!==26&&n!==27||d===null||(o=d,s?(d=Pn(i,a),d!=null&&c.unshift(Gn(i,d,o))):s||(d=Pn(i,a),d!=null&&c.push(Gn(i,d,o)))),i=i.return}c.length!==0&&e.push({event:t,listeners:c})}var tb=/\r\n?/g,ib=/\u0000|\uFFFD/g;function Dd(e){return(typeof e=="string"?e:""+e).replace(tb,`
49
+ `).replace(ib,"")}function Dp(e,t){return t=Dd(t),Dd(e)===t}function we(e,t,i,r,s,a){switch(i){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Ns(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Ns(e,""+r);break;case"className":Oa(e,"class",r);break;case"tabIndex":Oa(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Oa(e,i,r);break;case"style":Lv(e,r,a);break;case"data":if(t!=="object"){Oa(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=Xa(""+r),e.setAttribute(i,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(i,"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 a=="function"&&(i==="formAction"?(t!=="input"&&we(e,t,"name",s.name,s,null),we(e,t,"formEncType",s.formEncType,s,null),we(e,t,"formMethod",s.formMethod,s,null),we(e,t,"formTarget",s.formTarget,s,null)):(we(e,t,"encType",s.encType,s,null),we(e,t,"method",s.method,s,null),we(e,t,"target",s.target,s,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=Xa(""+r),e.setAttribute(i,r);break;case"onClick":r!=null&&(e.onclick=Ai);break;case"onScroll":r!=null&&ce("scroll",e);break;case"onScrollEnd":r!=null&&ce("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(q(61));if(i=r.__html,i!=null){if(s.children!=null)throw Error(q(60));e.innerHTML=i}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}i=Xa(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,""+r):e.removeAttribute(i);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":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":r===!0?e.setAttribute(i,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,r):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(i,r):e.removeAttribute(i);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(i):e.setAttribute(i,r);break;case"popover":ce("beforetoggle",e),ce("toggle",e),Ya(e,"popover",r);break;case"xlinkActuate":gi(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":gi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":gi(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":gi(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":gi(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":gi(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":gi(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":gi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":gi(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Ya(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=DS.get(i)||i,Ya(e,i,r))}}function Lu(e,t,i,r,s,a){switch(i){case"style":Lv(e,r,a);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(q(61));if(i=r.__html,i!=null){if(s.children!=null)throw Error(q(60));e.innerHTML=i}}break;case"children":typeof r=="string"?Ns(e,r):(typeof r=="number"||typeof r=="bigint")&&Ns(e,""+r);break;case"onScroll":r!=null&&ce("scroll",e);break;case"onScrollEnd":r!=null&&ce("scrollend",e);break;case"onClick":r!=null&&(e.onclick=Ai);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bv.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(s=i.endsWith("Capture"),t=i.slice(2,s?i.length-7:void 0),a=e[vt]||null,a=a!=null?a[i]:null,typeof a=="function"&&e.removeEventListener(t,a,s),typeof r=="function")){typeof a!="function"&&a!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,r,s);break e}i in e?e[i]=r:r===!0?e.setAttribute(i,""):Ya(e,i,r)}}}function st(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ce("error",e),ce("load",e);var r=!1,s=!1,a;for(a in i)if(i.hasOwnProperty(a)){var c=i[a];if(c!=null)switch(a){case"src":r=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(q(137,t));default:we(e,t,a,c,i,null)}}s&&we(e,t,"srcSet",i.srcSet,i,null),r&&we(e,t,"src",i.src,i,null);return;case"input":ce("invalid",e);var n=a=c=s=null,o=null,d=null;for(r in i)if(i.hasOwnProperty(r)){var v=i[r];if(v!=null)switch(r){case"name":s=v;break;case"type":c=v;break;case"checked":o=v;break;case"defaultChecked":d=v;break;case"value":a=v;break;case"defaultValue":n=v;break;case"children":case"dangerouslySetInnerHTML":if(v!=null)throw Error(q(137,t));break;default:we(e,t,r,v,i,null)}}Ev(e,a,n,o,d,c,s,!1);return;case"select":ce("invalid",e),r=c=a=null;for(s in i)if(i.hasOwnProperty(s)&&(n=i[s],n!=null))switch(s){case"value":a=n;break;case"defaultValue":c=n;break;case"multiple":r=n;default:we(e,t,s,n,i,null)}t=a,i=c,e.multiple=!!r,t!=null?As(e,!!r,t,!1):i!=null&&As(e,!!r,i,!0);return;case"textarea":ce("invalid",e),a=s=r=null;for(c in i)if(i.hasOwnProperty(c)&&(n=i[c],n!=null))switch(c){case"value":r=n;break;case"defaultValue":s=n;break;case"children":a=n;break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(q(91));break;default:we(e,t,c,n,i,null)}Av(e,r,s,a);return;case"option":for(o in i)if(i.hasOwnProperty(o)&&(r=i[o],r!=null))switch(o){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:we(e,t,o,r,i,null)}return;case"dialog":ce("beforetoggle",e),ce("toggle",e),ce("cancel",e),ce("close",e);break;case"iframe":case"object":ce("load",e);break;case"video":case"audio":for(r=0;r<Vn.length;r++)ce(Vn[r],e);break;case"image":ce("error",e),ce("load",e);break;case"details":ce("toggle",e);break;case"embed":case"source":case"link":ce("error",e),ce("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(d in i)if(i.hasOwnProperty(d)&&(r=i[d],r!=null))switch(d){case"children":case"dangerouslySetInnerHTML":throw Error(q(137,t));default:we(e,t,d,r,i,null)}return;default:if(vh(t)){for(v in i)i.hasOwnProperty(v)&&(r=i[v],r!==void 0&&Lu(e,t,v,r,i,void 0));return}}for(n in i)i.hasOwnProperty(n)&&(r=i[n],r!=null&&we(e,t,n,r,i,null))}function rb(e,t,i,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,a=null,c=null,n=null,o=null,d=null,v=null;for(S in i){var f=i[S];if(i.hasOwnProperty(S)&&f!=null)switch(S){case"checked":break;case"value":break;case"defaultValue":o=f;default:r.hasOwnProperty(S)||we(e,t,S,null,r,f)}}for(var g in r){var S=r[g];if(f=i[g],r.hasOwnProperty(g)&&(S!=null||f!=null))switch(g){case"type":a=S;break;case"name":s=S;break;case"checked":d=S;break;case"defaultChecked":v=S;break;case"value":c=S;break;case"defaultValue":n=S;break;case"children":case"dangerouslySetInnerHTML":if(S!=null)throw Error(q(137,t));break;default:S!==f&&we(e,t,g,S,r,f)}}Qc(e,c,n,o,d,v,a,s);return;case"select":S=c=n=g=null;for(a in i)if(o=i[a],i.hasOwnProperty(a)&&o!=null)switch(a){case"value":break;case"multiple":S=o;default:r.hasOwnProperty(a)||we(e,t,a,null,r,o)}for(s in r)if(a=r[s],o=i[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case"value":g=a;break;case"defaultValue":n=a;break;case"multiple":c=a;default:a!==o&&we(e,t,s,a,r,o)}t=n,i=c,r=S,g!=null?As(e,!!i,g,!1):!!r!=!!i&&(t!=null?As(e,!!i,t,!0):As(e,!!i,i?[]:"",!1));return;case"textarea":S=g=null;for(n in i)if(s=i[n],i.hasOwnProperty(n)&&s!=null&&!r.hasOwnProperty(n))switch(n){case"value":break;case"children":break;default:we(e,t,n,null,r,s)}for(c in r)if(s=r[c],a=i[c],r.hasOwnProperty(c)&&(s!=null||a!=null))switch(c){case"value":g=s;break;case"defaultValue":S=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(q(91));break;default:s!==a&&we(e,t,c,s,r,a)}xv(e,g,S);return;case"option":for(var C in i)if(g=i[C],i.hasOwnProperty(C)&&g!=null&&!r.hasOwnProperty(C))switch(C){case"selected":e.selected=!1;break;default:we(e,t,C,null,r,g)}for(o in r)if(g=r[o],S=i[o],r.hasOwnProperty(o)&&g!==S&&(g!=null||S!=null))switch(o){case"selected":e.selected=g&&typeof g!="function"&&typeof g!="symbol";break;default:we(e,t,o,g,r,S)}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 p in i)g=i[p],i.hasOwnProperty(p)&&g!=null&&!r.hasOwnProperty(p)&&we(e,t,p,null,r,g);for(d in r)if(g=r[d],S=i[d],r.hasOwnProperty(d)&&g!==S&&(g!=null||S!=null))switch(d){case"children":case"dangerouslySetInnerHTML":if(g!=null)throw Error(q(137,t));break;default:we(e,t,d,g,r,S)}return;default:if(vh(t)){for(var h in i)g=i[h],i.hasOwnProperty(h)&&g!==void 0&&!r.hasOwnProperty(h)&&Lu(e,t,h,void 0,r,g);for(v in r)g=r[v],S=i[v],!r.hasOwnProperty(v)||g===S||g===void 0&&S===void 0||Lu(e,t,v,g,r,S);return}}for(var _ in i)g=i[_],i.hasOwnProperty(_)&&g!=null&&!r.hasOwnProperty(_)&&we(e,t,_,null,r,g);for(f in r)g=r[f],S=i[f],!r.hasOwnProperty(f)||g===S||g==null&&S==null||we(e,t,f,g,r,S)}function Md(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),r=0;r<i.length;r++){var s=i[r],a=s.transferSize,c=s.initiatorType,n=s.duration;if(a&&n&&Md(c)){for(c=0,n=s.responseEnd,r+=1;r<i.length;r++){var o=i[r],d=o.startTime;if(d>n)break;var v=o.transferSize,f=o.initiatorType;v&&Md(f)&&(o=o.responseEnd,c+=v*(o<n?1:(n-d)/(o-d)))}if(--r,t+=8*(a+c)/(s.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Ou=null,Ru=null;function Uo(e){return e.nodeType===9?e:e.ownerDocument}function Td(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Mp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Du(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var yc=null;function nb(){var e=window.event;return e&&e.type==="popstate"?e===yc?!1:(yc=e,!0):(yc=null,!1)}var Tp=typeof setTimeout=="function"?setTimeout:void 0,ab=typeof clearTimeout=="function"?clearTimeout:void 0,Bd=typeof Promise=="function"?Promise:void 0,ob=typeof queueMicrotask=="function"?queueMicrotask:typeof Bd<"u"?function(e){return Bd.resolve(null).then(e).catch(lb)}:Tp;function lb(e){setTimeout(function(){throw e})}function mr(e){return e==="head"}function kd(e,t){var i=t,r=0;do{var s=i.nextSibling;if(e.removeChild(i),s&&s.nodeType===8)if(i=s.data,i==="/$"||i==="/&"){if(r===0){e.removeChild(s),$s(t);return}r--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")r++;else if(i==="html")Tn(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Tn(i);for(var a=i.firstChild;a;){var c=a.nextSibling,n=a.nodeName;a[aa]||n==="SCRIPT"||n==="STYLE"||n==="LINK"&&a.rel.toLowerCase()==="stylesheet"||i.removeChild(a),a=c}}else i==="body"&&Tn(e.ownerDocument.body);i=s}while(i);$s(t)}function Nd(e,t){var i=e;e=0;do{var r=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),r&&r.nodeType===8)if(i=r.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=r}while(i)}function Mu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Mu(i),_h(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function cb(e,t,i,r){for(;e.nodeType===1;){var s=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[aa])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(a=e.getAttribute("rel"),a==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(a!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(a=e.getAttribute("src"),(a!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=qt(e.nextSibling),e===null)break}return null}function ub(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=qt(e.nextSibling),e===null))return null;return e}function Bp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=qt(e.nextSibling),e===null))return null;return e}function Tu(e){return e.data==="$?"||e.data==="$~"}function Bu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function hb(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var r=function(){t(),i.removeEventListener("DOMContentLoaded",r)};i.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function qt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var ku=null;function Hd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return qt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function zd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function kp(e,t,i){switch(t=Uo(i),e){case"html":if(e=t.documentElement,!e)throw Error(q(452));return e;case"head":if(e=t.head,!e)throw Error(q(453));return e;case"body":if(e=t.body,!e)throw Error(q(454));return e;default:throw Error(q(451))}}function Tn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);_h(e)}var Wt=new Map,Pd=new Set;function jo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ji=ye.d;ye.d={f:fb,r:db,D:_b,C:vb,L:gb,m:pb,X:Sb,S:mb,M:yb};function fb(){var e=ji.f(),t=yl();return e||t}function db(e){var t=Xs(e);t!==null&&t.tag===5&&t.type==="form"?Lg(t):ji.r(e)}var en=typeof document>"u"?null:document;function Np(e,t,i){var r=en;if(r&&typeof t=="string"&&t){var s=Ht(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof i=="string"&&(s+='[crossorigin="'+i+'"]'),Pd.has(s)||(Pd.add(s),e={rel:e,crossOrigin:i,href:t},r.querySelector(s)===null&&(t=r.createElement("link"),st(t,"link",e),Ze(t),r.head.appendChild(t)))}}function _b(e){ji.D(e),Np("dns-prefetch",e,null)}function vb(e,t){ji.C(e,t),Np("preconnect",e,t)}function gb(e,t,i){ji.L(e,t,i);var r=en;if(r&&e&&t){var s='link[rel="preload"][as="'+Ht(t)+'"]';t==="image"&&i&&i.imageSrcSet?(s+='[imagesrcset="'+Ht(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(s+='[imagesizes="'+Ht(i.imageSizes)+'"]')):s+='[href="'+Ht(e)+'"]';var a=s;switch(t){case"style":a=Fs(e);break;case"script":a=tn(e)}Wt.has(a)||(e=ke({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Wt.set(a,e),r.querySelector(s)!==null||t==="style"&&r.querySelector(fa(a))||t==="script"&&r.querySelector(da(a))||(t=r.createElement("link"),st(t,"link",e),Ze(t),r.head.appendChild(t)))}}function pb(e,t){ji.m(e,t);var i=en;if(i&&e){var r=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Ht(r)+'"][href="'+Ht(e)+'"]',a=s;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=tn(e)}if(!Wt.has(a)&&(e=ke({rel:"modulepreload",href:e},t),Wt.set(a,e),i.querySelector(s)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(da(a)))return}r=i.createElement("link"),st(r,"link",e),Ze(r),i.head.appendChild(r)}}}function mb(e,t,i){ji.S(e,t,i);var r=en;if(r&&e){var s=xs(r).hoistableStyles,a=Fs(e);t=t||"default";var c=s.get(a);if(!c){var n={loading:0,preload:null};if(c=r.querySelector(fa(a)))n.loading=5;else{e=ke({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Wt.get(a))&&Jh(e,i);var o=c=r.createElement("link");Ze(o),st(o,"link",e),o._p=new Promise(function(d,v){o.onload=d,o.onerror=v}),o.addEventListener("load",function(){n.loading|=1}),o.addEventListener("error",function(){n.loading|=2}),n.loading|=4,ao(c,t,r)}c={type:"stylesheet",instance:c,count:1,state:n},s.set(a,c)}}}function Sb(e,t){ji.X(e,t);var i=en;if(i&&e){var r=xs(i).hoistableScripts,s=tn(e),a=r.get(s);a||(a=i.querySelector(da(s)),a||(e=ke({src:e,async:!0},t),(t=Wt.get(s))&&ef(e,t),a=i.createElement("script"),Ze(a),st(a,"link",e),i.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(s,a))}}function yb(e,t){ji.M(e,t);var i=en;if(i&&e){var r=xs(i).hoistableScripts,s=tn(e),a=r.get(s);a||(a=i.querySelector(da(s)),a||(e=ke({src:e,async:!0,type:"module"},t),(t=Wt.get(s))&&ef(e,t),a=i.createElement("script"),Ze(a),st(a,"link",e),i.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(s,a))}}function Ud(e,t,i,r){var s=(s=rr.current)?jo(s):null;if(!s)throw Error(q(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Fs(i.href),i=xs(s).hoistableStyles,r=i.get(t),r||(r={type:"style",instance:null,count:0,state:null},i.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Fs(i.href);var a=xs(s).hoistableStyles,c=a.get(e);if(c||(s=s.ownerDocument||s,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,c),(a=s.querySelector(fa(e)))&&!a._p&&(c.instance=a,c.state.loading=5),Wt.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Wt.set(e,i),a||bb(s,e,i,c.state))),t&&r===null)throw Error(q(528,""));return c}if(t&&r!==null)throw Error(q(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=tn(i),i=xs(s).hoistableScripts,r=i.get(t),r||(r={type:"script",instance:null,count:0,state:null},i.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(q(444,e))}}function Fs(e){return'href="'+Ht(e)+'"'}function fa(e){return'link[rel="stylesheet"]['+e+"]"}function Hp(e){return ke({},e,{"data-precedence":e.precedence,precedence:null})}function bb(e,t,i,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),st(t,"link",i),Ze(t),e.head.appendChild(t))}function tn(e){return'[src="'+Ht(e)+'"]'}function da(e){return"script[async]"+e}function jd(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Ht(i.href)+'"]');if(r)return t.instance=r,Ze(r),r;var s=ke({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Ze(r),st(r,"style",s),ao(r,i.precedence,e),t.instance=r;case"stylesheet":s=Fs(i.href);var a=e.querySelector(fa(s));if(a)return t.state.loading|=4,t.instance=a,Ze(a),a;r=Hp(i),(s=Wt.get(s))&&Jh(r,s),a=(e.ownerDocument||e).createElement("link"),Ze(a);var c=a;return c._p=new Promise(function(n,o){c.onload=n,c.onerror=o}),st(a,"link",r),t.state.loading|=4,ao(a,i.precedence,e),t.instance=a;case"script":return a=tn(i.src),(s=e.querySelector(da(a)))?(t.instance=s,Ze(s),s):(r=i,(s=Wt.get(a))&&(r=ke({},i),ef(r,s)),e=e.ownerDocument||e,s=e.createElement("script"),Ze(s),st(s,"link",r),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(q(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,ao(r,i.precedence,e));return t.instance}function ao(e,t,i){for(var r=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=r.length?r[r.length-1]:null,a=s,c=0;c<r.length;c++){var n=r[c];if(n.dataset.precedence===t)a=n;else if(a!==s)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Jh(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ef(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var oo=null;function Id(e,t,i){if(oo===null){var r=new Map,s=oo=new Map;s.set(i,r)}else s=oo,r=s.get(i),r||(r=new Map,s.set(i,r));if(r.has(e))return r;for(r.set(e,null),i=i.getElementsByTagName(e),s=0;s<i.length;s++){var a=i[s];if(!(a[aa]||a[et]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var c=a.getAttribute(t)||"";c=e+c;var n=r.get(c);n?n.push(a):r.set(c,[a])}}return r}function Fd(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function Cb(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function zp(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function wb(e,t,i,r){if(i.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&!(i.state.loading&4)){if(i.instance===null){var s=Fs(r.href),a=t.querySelector(fa(s));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Io.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=a,Ze(a);return}a=t.ownerDocument||t,r=Hp(r),(s=Wt.get(s))&&Jh(r,s),a=a.createElement("link"),Ze(a);var c=a;c._p=new Promise(function(n,o){c.onload=n,c.onerror=o}),st(a,"link",r),i.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&!(i.state.loading&3)&&(e.count++,i=Io.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var bc=0;function Eb(e,t){return e.stylesheets&&e.count===0&&lo(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var r=setTimeout(function(){if(e.stylesheets&&lo(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&bc===0&&(bc=62500*sb());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lo(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>bc?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(s)}}:null}function Io(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Fo=null;function lo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Fo=new Map,t.forEach(xb,e),Fo=null,Io.call(e))}function xb(e,t){if(!(t.state.loading&4)){var i=Fo.get(e);if(i)var r=i.get(null);else{i=new Map,Fo.set(e,i);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<s.length;a++){var c=s[a];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(i.set(c.dataset.precedence,c),r=c)}r&&i.set(null,r)}s=t.instance,c=s.getAttribute("data-precedence"),a=i.get(c)||r,a===r&&i.set(null,s),i.set(c,s),this.count++,r=Io.bind(this),s.addEventListener("load",r),s.addEventListener("error",r),a?a.parentNode.insertBefore(s,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var Kn={$$typeof:xi,Provider:null,Consumer:null,_currentValue:Ar,_currentValue2:Ar,_threadCount:0};function Ab(e,t,i,r,s,a,c,n,o){this.tag=1,this.containerInfo=e,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=ql(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ql(0),this.hiddenUpdates=ql(null),this.identifierPrefix=r,this.onUncaughtError=s,this.onCaughtError=a,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=o,this.incompleteTransitions=new Map}function Pp(e,t,i,r,s,a,c,n,o,d,v,f){return e=new Ab(e,t,i,c,o,d,v,f,n),t=1,a===!0&&(t|=24),a=yt(3,null,null,t),e.current=a,a.stateNode=e,t=Ah(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:i,cache:t},Rh(a),e}function Up(e){return e?(e=ms,e):ms}function jp(e,t,i,r,s,a){s=Up(s),r.context===null?r.context=s:r.pendingContext=s,r=nr(t),r.payload={element:i},a=a===void 0?null:a,a!==null&&(r.callback=a),i=ar(e,r,t),i!==null&&(_t(i,e,t),En(i,e,t))}function $d(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function tf(e,t){$d(e,t),(e=e.alternate)&&$d(e,t)}function Ip(e){if(e.tag===13||e.tag===31){var t=Vr(e,67108864);t!==null&&_t(t,e,67108864),tf(e,67108864)}}function qd(e){if(e.tag===13||e.tag===31){var t=Lt();t=fh(t);var i=Vr(e,t);i!==null&&_t(i,e,t),tf(e,t)}}var $o=!0;function Lb(e,t,i,r){var s=re.T;re.T=null;var a=ye.p;try{ye.p=2,rf(e,t,i,r)}finally{ye.p=a,re.T=s}}function Ob(e,t,i,r){var s=re.T;re.T=null;var a=ye.p;try{ye.p=8,rf(e,t,i,r)}finally{ye.p=a,re.T=s}}function rf(e,t,i,r){if($o){var s=Nu(r);if(s===null)Sc(e,t,r,qo,i),Wd(e,r);else if(Db(s,e,t,i,r))r.stopPropagation();else if(Wd(e,r),t&4&&-1<Rb.indexOf(e)){for(;s!==null;){var a=Xs(s);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var c=wr(a.pendingLanes);if(c!==0){var n=a;for(n.pendingLanes|=2,n.entangledLanes|=2;c;){var o=1<<31-At(c);n.entanglements[1]|=o,c&=~o}_i(a),!(Se&6)&&(Bo=Et()+500,ha(0))}}break;case 31:case 13:n=Vr(a,2),n!==null&&_t(n,a,2),yl(),tf(a,2)}if(a=Nu(r),a===null&&Sc(e,t,r,qo,i),a===s)break;s=a}s!==null&&r.stopPropagation()}else Sc(e,t,r,null,i)}}function Nu(e){return e=gh(e),sf(e)}var qo=null;function sf(e){if(qo=null,e=fs(e),e!==null){var t=ia(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=ov(t),e!==null)return e;e=null}else if(i===31){if(e=lv(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return qo=e,null}function Fp(e){switch(e){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(_S()){case fv:return 2;case dv:return 8;case So:case vS:return 32;case _v:return 268435456;default:return 32}default:return 32}}var Hu=!1,cr=null,ur=null,hr=null,Yn=new Map,Xn=new Map,Xi=[],Rb="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 Wd(e,t){switch(e){case"focusin":case"focusout":cr=null;break;case"dragenter":case"dragleave":ur=null;break;case"mouseover":case"mouseout":hr=null;break;case"pointerover":case"pointerout":Yn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xn.delete(t.pointerId)}}function fn(e,t,i,r,s,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:i,eventSystemFlags:r,nativeEvent:a,targetContainers:[s]},t!==null&&(t=Xs(t),t!==null&&Ip(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Db(e,t,i,r,s){switch(t){case"focusin":return cr=fn(cr,e,t,i,r,s),!0;case"dragenter":return ur=fn(ur,e,t,i,r,s),!0;case"mouseover":return hr=fn(hr,e,t,i,r,s),!0;case"pointerover":var a=s.pointerId;return Yn.set(a,fn(Yn.get(a)||null,e,t,i,r,s)),!0;case"gotpointercapture":return a=s.pointerId,Xn.set(a,fn(Xn.get(a)||null,e,t,i,r,s)),!0}return!1}function $p(e){var t=fs(e.target);if(t!==null){var i=ia(t);if(i!==null){if(t=i.tag,t===13){if(t=ov(i),t!==null){e.blockedOn=t,Rf(e.priority,function(){qd(i)});return}}else if(t===31){if(t=lv(i),t!==null){e.blockedOn=t,Rf(e.priority,function(){qd(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function co(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Nu(e.nativeEvent);if(i===null){i=e.nativeEvent;var r=new i.constructor(i.type,i);eu=r,i.target.dispatchEvent(r),eu=null}else return t=Xs(i),t!==null&&Ip(t),e.blockedOn=i,!1;t.shift()}return!0}function Vd(e,t,i){co(e)&&i.delete(t)}function Mb(){Hu=!1,cr!==null&&co(cr)&&(cr=null),ur!==null&&co(ur)&&(ur=null),hr!==null&&co(hr)&&(hr=null),Yn.forEach(Vd),Xn.forEach(Vd)}function Ha(e,t){e.blockedOn===t&&(e.blockedOn=null,Hu||(Hu=!0,Ye.unstable_scheduleCallback(Ye.unstable_NormalPriority,Mb)))}var za=null;function Gd(e){za!==e&&(za=e,Ye.unstable_scheduleCallback(Ye.unstable_NormalPriority,function(){za===e&&(za=null);for(var t=0;t<e.length;t+=3){var i=e[t],r=e[t+1],s=e[t+2];if(typeof r!="function"){if(sf(r||i)===null)continue;break}var a=Xs(i);a!==null&&(e.splice(t,3),t-=3,gu(a,{pending:!0,data:s,method:i.method,action:r},r,s))}}))}function $s(e){function t(o){return Ha(o,e)}cr!==null&&Ha(cr,e),ur!==null&&Ha(ur,e),hr!==null&&Ha(hr,e),Yn.forEach(t),Xn.forEach(t);for(var i=0;i<Xi.length;i++){var r=Xi[i];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Xi.length&&(i=Xi[0],i.blockedOn===null);)$p(i),i.blockedOn===null&&Xi.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(r=0;r<i.length;r+=3){var s=i[r],a=i[r+1],c=s[vt]||null;if(typeof a=="function")c||Gd(i);else if(c){var n=null;if(a&&a.hasAttribute("formAction")){if(s=a,c=a[vt]||null)n=c.formAction;else if(sf(s)!==null)continue}else n=c.action;typeof n=="function"?i[r+1]=n:(i.splice(r,3),r-=3),Gd(i)}}}function qp(){function e(a){a.canIntercept&&a.info==="react-transition"&&a.intercept({handler:function(){return new Promise(function(c){return s=c})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),r||setTimeout(i,20)}function i(){if(!r&&!navigation.transition){var a=navigation.currentEntry;a&&a.url!=null&&navigation.navigate(a.url,{state:a.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function nf(e){this._internalRoot=e}wl.prototype.render=nf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(q(409));var i=t.current,r=Lt();jp(i,r,e,t,null,null)};wl.prototype.unmount=nf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;jp(e.current,2,null,e,null,null),yl(),t[Ys]=null}};function wl(e){this._internalRoot=e}wl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Sv();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Xi.length&&t!==0&&t<Xi[i].priority;i++);Xi.splice(i,0,e),i===0&&$p(e)}};var Kd=nv.version;if(Kd!=="19.2.4")throw Error(q(527,Kd,"19.2.4"));ye.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(q(188)):(e=Object.keys(e).join(","),Error(q(268,e)));return e=oS(t),e=e!==null?cv(e):null,e=e===null?null:e.stateNode,e};var Tb={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:re,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pa.isDisabled&&Pa.supportsFiber)try{ra=Pa.inject(Tb),xt=Pa}catch{}}nl.createRoot=function(e,t){if(!av(e))throw Error(q(299));var i=!1,r="",s=Ng,a=Hg,c=zg;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=Pp(e,1,!1,null,null,i,r,null,s,a,c,qp),e[Ys]=t.current,Qh(e),new nf(t)};nl.hydrateRoot=function(e,t,i){if(!av(e))throw Error(q(299));var r=!1,s="",a=Ng,c=Hg,n=zg,o=null;return i!=null&&(i.unstable_strictMode===!0&&(r=!0),i.identifierPrefix!==void 0&&(s=i.identifierPrefix),i.onUncaughtError!==void 0&&(a=i.onUncaughtError),i.onCaughtError!==void 0&&(c=i.onCaughtError),i.onRecoverableError!==void 0&&(n=i.onRecoverableError),i.formState!==void 0&&(o=i.formState)),t=Pp(e,1,!0,t,i??null,r,s,o,a,c,n,qp),t.context=Up(null),i=t.current,r=Lt(),r=fh(r),s=nr(r),s.callback=null,ar(i,s,r),i=r,t.current.lanes=i,na(t,i),_i(t),e[Ys]=t.current,Qh(e),new wl(t)};nl.version="19.2.4";function Wp(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Wp)}catch(e){console.error(e)}}Wp(),W_.exports=nl;var Bb=W_.exports;function ge(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];throw new Error(typeof e=="number"?"[MobX] minified error nr: "+e+(i.length?" "+i.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var kb={};function El(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:kb}var Vp=Object.assign,Wo=Object.getOwnPropertyDescriptor,ui=Object.defineProperty,xl=Object.prototype,zu=[];Object.freeze(zu);var Gp={};Object.freeze(Gp);var Nb=typeof Proxy<"u",Hb=Object.toString();function Kp(){Nb||ge("Proxy not available")}function Yp(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var Cs=function(){};function Xt(e){return typeof e=="function"}function zr(e){var t=typeof e;switch(t){case"string":case"symbol":case"number":return!0}return!1}function Al(e){return e!==null&&typeof e=="object"}function Pi(e){if(!Al(e))return!1;var t=Object.getPrototypeOf(e);if(t==null)return!0;var i=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return typeof i=="function"&&i.toString()===Hb}function Xp(e){var t=e==null?void 0:e.constructor;return t?t.name==="GeneratorFunction"||t.displayName==="GeneratorFunction":!1}function _a(e,t,i){ui(e,t,{enumerable:!1,writable:!0,configurable:!0,value:i})}function Zp(e,t,i){ui(e,t,{enumerable:!1,writable:!1,configurable:!0,value:i})}function Kr(e,t){var i="isMobX"+e;return t.prototype[i]=!0,function(r){return Al(r)&&r[i]===!0}}function rn(e){return e!=null&&Object.prototype.toString.call(e)==="[object Map]"}function zb(e){var t=Object.getPrototypeOf(e),i=Object.getPrototypeOf(t),r=Object.getPrototypeOf(i);return r===null}function wi(e){return e!=null&&Object.prototype.toString.call(e)==="[object Set]"}var Qp=typeof Object.getOwnPropertySymbols<"u";function Pb(e){var t=Object.keys(e);if(!Qp)return t;var i=Object.getOwnPropertySymbols(e);return i.length?[].concat(t,i.filter(function(r){return xl.propertyIsEnumerable.call(e,r)})):t}var qs=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Qp?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function Jp(e){return e===null?null:typeof e=="object"?""+e:e}function Mi(e,t){return xl.hasOwnProperty.call(e,t)}var Ub=Object.getOwnPropertyDescriptors||function(t){var i={};return qs(t).forEach(function(r){i[r]=Wo(t,r)}),i};function bt(e,t){return!!(e&t)}function Ct(e,t,i){return i?e|=t:e&=~t,e}function Yd(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,r=Array(t);i<t;i++)r[i]=e[i];return r}function jb(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Fb(r.key),r)}}function sn(e,t,i){return t&&jb(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ws(e,t){var i=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=$b(e))||t){i&&(e=i);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
50
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pr(){return Pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)({}).hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},Pr.apply(null,arguments)}function em(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Pu(e,t)}function Pu(e,t){return Pu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},Pu(e,t)}function Ib(e,t){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var r=i.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Fb(e){var t=Ib(e,"string");return typeof t=="symbol"?t:t+""}function $b(e,t){if(e){if(typeof e=="string")return Yd(e,t);var i={}.toString.call(e).slice(8,-1);return i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set"?Array.from(e):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Yd(e,t):void 0}}var oi=Symbol("mobx-stored-annotations");function hi(e){function t(i,r){if(ga(r))return e.decorate_20223_(i,r);va(i,r,e)}return Object.assign(t,e)}function va(e,t,i){Mi(e,oi)||_a(e,oi,Pr({},e[oi])),Xb(i)||(e[oi][t]=i)}function qb(e){return Mi(e,oi)||_a(e,oi,Pr({},e[oi])),e[oi]}function ga(e){return typeof e=="object"&&typeof e.kind=="string"}var ie=Symbol("mobx administration"),Sr=function(){function e(i){i===void 0&&(i="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=me.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=i}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(r){return r()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(r){return r()})},t.reportObserved=function(){return pm(this)},t.reportChanged=function(){It(),mm(this),Ft()},t.toString=function(){return this.name_},sn(e,[{key:"isBeingObserved",get:function(){return bt(this.flags_,e.isBeingObservedMask_)},set:function(r){this.flags_=Ct(this.flags_,e.isBeingObservedMask_,r)}},{key:"isPendingUnobservation",get:function(){return bt(this.flags_,e.isPendingUnobservationMask_)},set:function(r){this.flags_=Ct(this.flags_,e.isPendingUnobservationMask_,r)}},{key:"diffValue",get:function(){return bt(this.flags_,e.diffValueMask_)?1:0},set:function(r){this.flags_=Ct(this.flags_,e.diffValueMask_,r===1)}}])}();Sr.isBeingObservedMask_=1;Sr.isPendingUnobservationMask_=2;Sr.diffValueMask_=4;var af=Kr("Atom",Sr);function tm(e,t,i){t===void 0&&(t=Cs),i===void 0&&(i=Cs);var r=new Sr(e);return t!==Cs&&Q1(r,t),i!==Cs&&Em(r,i),r}function Wb(e,t){return zm(e,t)}function Vb(e,t){return Object.is?Object.is(e,t):e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Vo={structural:Wb,default:Vb};function Ur(e,t,i){return Rm(e)?e:Array.isArray(e)?it.array(e,{name:i}):Pi(e)?it.object(e,void 0,{name:i}):rn(e)?it.map(e,{name:i}):wi(e)?it.set(e,{name:i}):typeof e=="function"&&!Ws(e)&&!Qn(e)?Xp(e)?Vs(e):Zn(i,e):e}function Gb(e,t,i){if(e==null||Tl(e)||Ml(e)||Xr(e)||ii(e))return e;if(Array.isArray(e))return it.array(e,{name:i,deep:!1});if(Pi(e))return it.object(e,void 0,{name:i,deep:!1});if(rn(e))return it.map(e,{name:i,deep:!1});if(wi(e))return it.set(e,{name:i,deep:!1})}function Ll(e){return e}function Kb(e,t){return zm(e,t)?t:e}var Yb="override";function Xb(e){return e.annotationType_===Yb}function pa(e,t){return{annotationType_:e,options_:t,make_:Zb,extend_:Qb,decorate_20223_:Jb}}function Zb(e,t,i,r){var s;if((s=this.options_)!=null&&s.bound)return this.extend_(e,t,i,!1)===null?0:1;if(r===e.target_)return this.extend_(e,t,i,!1)===null?0:2;if(Ws(i.value))return 1;var a=im(e,this,t,i,!1);return ui(r,t,a),2}function Qb(e,t,i,r){var s=im(e,this,t,i);return e.defineProperty_(t,s,r)}function Jb(e,t){var i=t.kind,r=t.name,s=t.addInitializer,a=this,c=function(d){var v,f,g,S;return jr((v=(f=a.options_)==null?void 0:f.name)!=null?v:r.toString(),d,(g=(S=a.options_)==null?void 0:S.autoAction)!=null?g:!1)};if(i=="field")return function(o){var d,v=o;return Ws(v)||(v=c(v)),(d=a.options_)!=null&&d.bound&&(v=v.bind(this),v.isMobxAction=!0),v};if(i=="method"){var n;return Ws(e)||(e=c(e)),(n=this.options_)!=null&&n.bound&&s(function(){var o=this,d=o[r].bind(o);d.isMobxAction=!0,o[r]=d}),e}ge("Cannot apply '"+a.annotationType_+"' to '"+String(r)+"' (kind: "+i+"):"+(`
51
+ '`+a.annotationType_+"' can only be used on properties with a function value."))}function e1(e,t,i,r){t.annotationType_,r.value}function im(e,t,i,r,s){var a,c,n,o,d,v,f;s===void 0&&(s=K.safeDescriptors),e1(e,t,i,r);var g=r.value;if((a=t.options_)!=null&&a.bound){var S;g=g.bind((S=e.proxy_)!=null?S:e.target_)}return{value:jr((c=(n=t.options_)==null?void 0:n.name)!=null?c:i.toString(),g,(o=(d=t.options_)==null?void 0:d.autoAction)!=null?o:!1,(v=t.options_)!=null&&v.bound?(f=e.proxy_)!=null?f:e.target_:void 0),configurable:s?e.isPlainObject_:!0,enumerable:!1,writable:!s}}function rm(e,t){return{annotationType_:e,options_:t,make_:t1,extend_:i1,decorate_20223_:r1}}function t1(e,t,i,r){var s;if(r===e.target_)return this.extend_(e,t,i,!1)===null?0:2;if((s=this.options_)!=null&&s.bound&&(!Mi(e.target_,t)||!Qn(e.target_[t]))&&this.extend_(e,t,i,!1)===null)return 0;if(Qn(i.value))return 1;var a=sm(e,this,t,i,!1,!1);return ui(r,t,a),2}function i1(e,t,i,r){var s,a=sm(e,this,t,i,(s=this.options_)==null?void 0:s.bound);return e.defineProperty_(t,a,r)}function r1(e,t){var i,r=t.name,s=t.addInitializer;return Qn(e)||(e=Vs(e)),(i=this.options_)!=null&&i.bound&&s(function(){var a=this,c=a[r].bind(a);c.isMobXFlow=!0,a[r]=c}),e}function s1(e,t,i,r){t.annotationType_,r.value}function sm(e,t,i,r,s,a){a===void 0&&(a=K.safeDescriptors),s1(e,t,i,r);var c=r.value;if(Qn(c)||(c=Vs(c)),s){var n;c=c.bind((n=e.proxy_)!=null?n:e.target_),c.isMobXFlow=!0}return{value:c,configurable:a?e.isPlainObject_:!0,enumerable:!1,writable:!a}}function of(e,t){return{annotationType_:e,options_:t,make_:n1,extend_:a1,decorate_20223_:o1}}function n1(e,t,i){return this.extend_(e,t,i,!1)===null?0:1}function a1(e,t,i,r){return l1(e,this,t,i),e.defineComputedProperty_(t,Pr({},this.options_,{get:i.get,set:i.set}),r)}function o1(e,t){var i=this,r=t.name,s=t.addInitializer;return s(function(){var a=Zr(this)[ie],c=Pr({},i.options_,{get:e,context:this});c.name||(c.name="ObservableObject."+r.toString()),a.values_.set(r,new Zt(c))}),function(){return this[ie].getObservablePropValue_(r)}}function l1(e,t,i,r){t.annotationType_,r.get}function Ol(e,t){return{annotationType_:e,options_:t,make_:c1,extend_:u1,decorate_20223_:h1}}function c1(e,t,i){return this.extend_(e,t,i,!1)===null?0:1}function u1(e,t,i,r){var s,a;return f1(e,this),e.defineObservableProperty_(t,i.value,(s=(a=this.options_)==null?void 0:a.enhancer)!=null?s:Ur,r)}function h1(e,t){var i=this,r=t.kind,s=t.name,a=new WeakSet;function c(n,o){var d,v,f=Zr(n)[ie],g=new Mr(o,(d=(v=i.options_)==null?void 0:v.enhancer)!=null?d:Ur,"ObservableObject."+s.toString(),!1);f.values_.set(s,g),a.add(n)}if(r=="accessor")return{get:function(){return a.has(this)||c(this,e.get.call(this)),this[ie].getObservablePropValue_(s)},set:function(o){return a.has(this)||c(this,o),this[ie].setObservablePropValue_(s,o)},init:function(o){return a.has(this)||c(this,o),o}}}function f1(e,t,i,r){t.annotationType_}var d1="true",_1=nm();function nm(e){return{annotationType_:d1,options_:e,make_:v1,extend_:g1,decorate_20223_:p1}}function v1(e,t,i,r){var s,a;if(i.get)return Rl.make_(e,t,i,r);if(i.set){var c=Ws(i.set)?i.set:jr(t.toString(),i.set);return r===e.target_?e.defineProperty_(t,{configurable:K.safeDescriptors?e.isPlainObject_:!0,set:c})===null?0:2:(ui(r,t,{configurable:!0,set:c}),2)}if(r!==e.target_&&typeof i.value=="function"){var n;if(Xp(i.value)){var o,d=(o=this.options_)!=null&&o.autoBind?Vs.bound:Vs;return d.make_(e,t,i,r)}var v=(n=this.options_)!=null&&n.autoBind?Zn.bound:Zn;return v.make_(e,t,i,r)}var f=((s=this.options_)==null?void 0:s.deep)===!1?it.ref:it;if(typeof i.value=="function"&&(a=this.options_)!=null&&a.autoBind){var g;i.value=i.value.bind((g=e.proxy_)!=null?g:e.target_)}return f.make_(e,t,i,r)}function g1(e,t,i,r){var s,a;if(i.get)return Rl.extend_(e,t,i,r);if(i.set)return e.defineProperty_(t,{configurable:K.safeDescriptors?e.isPlainObject_:!0,set:jr(t.toString(),i.set)},r);if(typeof i.value=="function"&&(s=this.options_)!=null&&s.autoBind){var c;i.value=i.value.bind((c=e.proxy_)!=null?c:e.target_)}var n=((a=this.options_)==null?void 0:a.deep)===!1?it.ref:it;return n.extend_(e,t,i,r)}function p1(e,t){ge("'"+this.annotationType_+"' cannot be used as a decorator")}var m1="observable",S1="observable.ref",y1="observable.shallow",b1="observable.struct",am={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(am);function Ua(e){return e||am}var Uu=Ol(m1),C1=Ol(S1,{enhancer:Ll}),w1=Ol(y1,{enhancer:Gb}),E1=Ol(b1,{enhancer:Kb}),om=hi(Uu);function ja(e){return e.deep===!0?Ur:e.deep===!1?Ll:A1(e.defaultDecorator)}function x1(e){var t;return e?(t=e.defaultDecorator)!=null?t:nm(e):void 0}function A1(e){var t,i;return e&&(t=(i=e.options_)==null?void 0:i.enhancer)!=null?t:Ur}function lm(e,t,i){if(ga(t))return Uu.decorate_20223_(e,t);if(zr(t)){va(e,t,Uu);return}return Rm(e)?e:Pi(e)?it.object(e,t,i):Array.isArray(e)?it.array(e,t):rn(e)?it.map(e,t):wi(e)?it.set(e,t):typeof e=="object"&&e!==null?e:it.box(e,t)}Vp(lm,om);var L1={box:function(t,i){var r=Ua(i);return new Mr(t,ja(r),r.name,!0,r.equals)},array:function(t,i){var r=Ua(i);return(K.useProxies===!1||r.proxy===!1?wC:dC)(t,ja(r),r.name)},map:function(t,i){var r=Ua(i);return new Mm(t,ja(r),r.name)},set:function(t,i){var r=Ua(i);return new Tm(t,ja(r),r.name)},object:function(t,i,r){return yr(function(){return Am(K.useProxies===!1||(r==null?void 0:r.proxy)===!1?Zr({},r):lC({},r),t,i)})},ref:hi(C1),shallow:hi(w1),deep:om,struct:hi(E1)},it=Vp(lm,L1),cm="computed",O1="computed.struct",ju=of(cm),R1=of(O1,{equals:Vo.structural}),Rl=function(t,i){if(ga(i))return ju.decorate_20223_(t,i);if(zr(i))return va(t,i,ju);if(Pi(t))return hi(of(cm,t));var r=Pi(i)?i:{};return r.get=t,r.name||(r.name=t.name||""),new Zt(r)};Object.assign(Rl,ju);Rl.struct=hi(R1);var Xd,Zd,Go=0,D1=1,M1=(Xd=(Zd=Wo(function(){},"name"))==null?void 0:Zd.configurable)!=null?Xd:!1,Qd={value:"action",configurable:!0,writable:!1,enumerable:!1};function jr(e,t,i,r){i===void 0&&(i=!1);function s(){return um(e,i,t,r||this,arguments)}return s.isMobxAction=!0,s.toString=function(){return t.toString()},M1&&(Qd.value=e,ui(s,"name",Qd)),s}function um(e,t,i,r,s){var a=T1(e,t);try{return i.apply(r,s)}catch(c){throw a.error_=c,c}finally{B1(a)}}function T1(e,t,i,r){var s=!1,a=0,c=K.trackingDerivation,n=!t||!c;It();var o=K.allowStateChanges;n&&(Yr(),o=lf(!0));var d=uf(!0),v={runAsAction_:n,prevDerivation_:c,prevAllowStateChanges_:o,prevAllowStateReads_:d,notifySpy_:s,startTime_:a,actionId_:D1++,parentActionId_:Go};return Go=v.actionId_,v}function B1(e){Go!==e.actionId_&&ge(30),Go=e.parentActionId_,e.error_!==void 0&&(K.suppressReactionErrors=!0),cf(e.prevAllowStateChanges_),Bn(e.prevAllowStateReads_),Ft(),e.runAsAction_&&Ti(e.prevDerivation_),K.suppressReactionErrors=!1}function lf(e){var t=K.allowStateChanges;return K.allowStateChanges=e,t}function cf(e){K.allowStateChanges=e}var Mr=function(e){function t(r,s,a,c,n){var o;return a===void 0&&(a="ObservableValue"),n===void 0&&(n=Vo.default),o=e.call(this,a)||this,o.enhancer=void 0,o.name_=void 0,o.equals=void 0,o.hasUnreportedChange_=!1,o.interceptors_=void 0,o.changeListeners_=void 0,o.value_=void 0,o.dehancer=void 0,o.enhancer=s,o.name_=a,o.equals=n,o.value_=s(r,void 0,a),o}em(t,e);var i=t.prototype;return i.dehanceValue=function(s){return this.dehancer!==void 0?this.dehancer(s):s},i.set=function(s){this.value_,s=this.prepareNewValue_(s),s!==K.UNCHANGED&&this.setNewValue_(s)},i.prepareNewValue_=function(s){if(Ut(this)){var a=jt(this,{object:this,type:fi,newValue:s});if(!a)return K.UNCHANGED;s=a.newValue}return s=this.enhancer(s,this.value_,this.name_),this.equals(this.value_,s)?K.UNCHANGED:s},i.setNewValue_=function(s){var a=this.value_;this.value_=s,this.reportChanged(),Kt(this)&&Yt(this,{type:fi,object:this,newValue:s,oldValue:a})},i.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},i.intercept_=function(s){return ma(this,s)},i.observe_=function(s,a){return a&&s({observableKind:"value",debugObjectName:this.name_,object:this,type:fi,newValue:this.value_,oldValue:void 0}),Sa(this,s)},i.raw=function(){return this.value_},i.toJSON=function(){return this.get()},i.toString=function(){return this.name_+"["+this.value_+"]"},i.valueOf=function(){return Jp(this.get())},i[Symbol.toPrimitive]=function(){return this.valueOf()},t}(Sr),Zt=function(){function e(i){this.dependenciesState_=me.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=me.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Yo(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Ko.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,i.get||ge(31),this.derivation=i.get,this.name_=i.name||"ComputedValue",i.set&&(this.setter_=jr("ComputedValue-setter",i.set)),this.equals_=i.equals||(i.compareStructural||i.struct?Vo.structural:Vo.default),this.scope_=i.context,this.requiresReaction_=i.requiresReaction,this.keepAlive_=!!i.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){P1(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(r){return r()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(r){return r()})},t.get=function(){if(this.isComputing&&ge(32,this.name_,this.derivation),K.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)Iu(this)&&(this.warnAboutUntrackedRead_(),It(),this.value_=this.computeValue_(!1),Ft());else if(pm(this),Iu(this)){var r=K.trackingContext;this.keepAlive_&&!r&&(K.trackingContext=this),this.trackAndCompute()&&z1(this),K.trackingContext=r}var s=this.value_;if(uo(s))throw s.cause;return s},t.set=function(r){if(this.setter_){this.isRunningSetter&&ge(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,r)}finally{this.isRunningSetter=!1}}else ge(34,this.name_)},t.trackAndCompute=function(){var r=this.value_,s=this.dependenciesState_===me.NOT_TRACKING_,a=this.computeValue_(!0),c=s||uo(r)||uo(a)||!this.equals_(r,a);return c&&(this.value_=a),c},t.computeValue_=function(r){this.isComputing=!0;var s=lf(!1),a;if(r)a=hm(this,this.derivation,this.scope_);else if(K.disableErrorBoundaries===!0)a=this.derivation.call(this.scope_);else try{a=this.derivation.call(this.scope_)}catch(c){a=new Yo(c)}return cf(s),this.isComputing=!1,a},t.suspend_=function(){this.keepAlive_||(Fu(this),this.value_=void 0)},t.observe_=function(r,s){var a=this,c=!0,n=void 0;return G1(function(){var o=a.get();if(!c||s){var d=Yr();r({observableKind:"computed",debugObjectName:a.name_,type:fi,object:a,newValue:o,oldValue:n}),Ti(d)}c=!1,n=o})},t.warnAboutUntrackedRead_=function(){},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return Jp(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},sn(e,[{key:"isComputing",get:function(){return bt(this.flags_,e.isComputingMask_)},set:function(r){this.flags_=Ct(this.flags_,e.isComputingMask_,r)}},{key:"isRunningSetter",get:function(){return bt(this.flags_,e.isRunningSetterMask_)},set:function(r){this.flags_=Ct(this.flags_,e.isRunningSetterMask_,r)}},{key:"isBeingObserved",get:function(){return bt(this.flags_,e.isBeingObservedMask_)},set:function(r){this.flags_=Ct(this.flags_,e.isBeingObservedMask_,r)}},{key:"isPendingUnobservation",get:function(){return bt(this.flags_,e.isPendingUnobservationMask_)},set:function(r){this.flags_=Ct(this.flags_,e.isPendingUnobservationMask_,r)}},{key:"diffValue",get:function(){return bt(this.flags_,e.diffValueMask_)?1:0},set:function(r){this.flags_=Ct(this.flags_,e.diffValueMask_,r===1)}}])}();Zt.isComputingMask_=1;Zt.isRunningSetterMask_=2;Zt.isBeingObservedMask_=4;Zt.isPendingUnobservationMask_=8;Zt.diffValueMask_=16;var Dl=Kr("ComputedValue",Zt),me;(function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"})(me||(me={}));var Ko;(function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"})(Ko||(Ko={}));var Yo=function(t){this.cause=void 0,this.cause=t};function uo(e){return e instanceof Yo}function Iu(e){switch(e.dependenciesState_){case me.UP_TO_DATE_:return!1;case me.NOT_TRACKING_:case me.STALE_:return!0;case me.POSSIBLY_STALE_:{for(var t=uf(!0),i=Yr(),r=e.observing_,s=r.length,a=0;a<s;a++){var c=r[a];if(Dl(c)){if(K.disableErrorBoundaries)c.get();else try{c.get()}catch{return Ti(i),Bn(t),!0}if(e.dependenciesState_===me.STALE_)return Ti(i),Bn(t),!0}}return dm(e),Ti(i),Bn(t),!1}}}function hm(e,t,i){var r=uf(!0);dm(e),e.newObserving_=new Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++K.runId;var s=K.trackingDerivation;K.trackingDerivation=e,K.inBatch++;var a;if(K.disableErrorBoundaries===!0)a=t.call(i);else try{a=t.call(i)}catch(c){a=new Yo(c)}return K.inBatch--,K.trackingDerivation=s,k1(e),Bn(r),a}function k1(e){for(var t=e.observing_,i=e.observing_=e.newObserving_,r=me.UP_TO_DATE_,s=0,a=e.unboundDepsCount_,c=0;c<a;c++){var n=i[c];n.diffValue===0&&(n.diffValue=1,s!==c&&(i[s]=n),s++),n.dependenciesState_>r&&(r=n.dependenciesState_)}for(i.length=s,e.newObserving_=null,a=t.length;a--;){var o=t[a];o.diffValue===0&&vm(o,e),o.diffValue=0}for(;s--;){var d=i[s];d.diffValue===1&&(d.diffValue=0,H1(d,e))}r!==me.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}function Fu(e){var t=e.observing_;e.observing_=[];for(var i=t.length;i--;)vm(t[i],e);e.dependenciesState_=me.NOT_TRACKING_}function fm(e){var t=Yr();try{return e()}finally{Ti(t)}}function Yr(){var e=K.trackingDerivation;return K.trackingDerivation=null,e}function Ti(e){K.trackingDerivation=e}function uf(e){var t=K.allowStateReads;return K.allowStateReads=e,t}function Bn(e){K.allowStateReads=e}function dm(e){if(e.dependenciesState_!==me.UP_TO_DATE_){e.dependenciesState_=me.UP_TO_DATE_;for(var t=e.observing_,i=t.length;i--;)t[i].lowestObserverState_=me.UP_TO_DATE_}}var ho=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},fo=!0,_m=!1,K=function(){var e=El();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(fo=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new ho().version&&(fo=!1),fo?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new ho):(setTimeout(function(){_m||ge(35)},1),new ho)}();function N1(){if((K.pendingReactions.length||K.inBatch||K.isRunningReactions)&&ge(36),_m=!0,fo){var e=El();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),K=new ho}}function H1(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function vm(e,t){e.observers_.delete(t),e.observers_.size===0&&gm(e)}function gm(e){e.isPendingUnobservation===!1&&(e.isPendingUnobservation=!0,K.pendingUnobservations.push(e))}function It(){K.inBatch++}function Ft(){if(--K.inBatch===0){Sm();for(var e=K.pendingUnobservations,t=0;t<e.length;t++){var i=e[t];i.isPendingUnobservation=!1,i.observers_.size===0&&(i.isBeingObserved&&(i.isBeingObserved=!1,i.onBUO()),i instanceof Zt&&i.suspend_())}K.pendingUnobservations=[]}}function pm(e){var t=K.trackingDerivation;return t!==null?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&K.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(e.observers_.size===0&&K.inBatch>0&&gm(e),!1)}function mm(e){e.lowestObserverState_!==me.STALE_&&(e.lowestObserverState_=me.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===me.UP_TO_DATE_&&t.onBecomeStale_(),t.dependenciesState_=me.STALE_}))}function z1(e){e.lowestObserverState_!==me.STALE_&&(e.lowestObserverState_=me.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===me.POSSIBLY_STALE_?t.dependenciesState_=me.STALE_:t.dependenciesState_===me.UP_TO_DATE_&&(e.lowestObserverState_=me.UP_TO_DATE_)}))}function P1(e){e.lowestObserverState_===me.UP_TO_DATE_&&(e.lowestObserverState_=me.POSSIBLY_STALE_,e.observers_.forEach(function(t){t.dependenciesState_===me.UP_TO_DATE_&&(t.dependenciesState_=me.POSSIBLY_STALE_,t.onBecomeStale_())}))}var Ui=function(){function e(i,r,s,a){i===void 0&&(i="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=me.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=Ko.NONE,this.name_=i,this.onInvalidate_=r,this.errorHandler_=s,this.requiresObservable_=a}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled||(this.isScheduled=!0,K.pendingReactions.push(this),Sm())},t.runReaction_=function(){if(!this.isDisposed){It(),this.isScheduled=!1;var r=K.trackingContext;if(K.trackingContext=this,Iu(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(s){this.reportExceptionInDerivation_(s)}}K.trackingContext=r,Ft()}},t.track=function(r){if(!this.isDisposed){It(),this.isRunning=!0;var s=K.trackingContext;K.trackingContext=this;var a=hm(this,r,void 0);K.trackingContext=s,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Fu(this),uo(a)&&this.reportExceptionInDerivation_(a.cause),Ft()}},t.reportExceptionInDerivation_=function(r){var s=this;if(this.errorHandler_){this.errorHandler_(r,this);return}if(K.disableErrorBoundaries)throw r;var a="[mobx] uncaught error in '"+this+"'";K.suppressReactionErrors||console.error(a,r),K.globalReactionErrorHandlers.forEach(function(c){return c(r,s)})},t.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(It(),Fu(this),Ft()))},t.getDisposer_=function(r){var s=this,a=function c(){s.dispose(),r==null||r.removeEventListener==null||r.removeEventListener("abort",c)};return r==null||r.addEventListener==null||r.addEventListener("abort",a),a[ie]=this,"dispose"in Symbol&&typeof Symbol.dispose=="symbol"&&(a[Symbol.dispose]=a),a},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(r){},sn(e,[{key:"isDisposed",get:function(){return bt(this.flags_,e.isDisposedMask_)},set:function(r){this.flags_=Ct(this.flags_,e.isDisposedMask_,r)}},{key:"isScheduled",get:function(){return bt(this.flags_,e.isScheduledMask_)},set:function(r){this.flags_=Ct(this.flags_,e.isScheduledMask_,r)}},{key:"isTrackPending",get:function(){return bt(this.flags_,e.isTrackPendingMask_)},set:function(r){this.flags_=Ct(this.flags_,e.isTrackPendingMask_,r)}},{key:"isRunning",get:function(){return bt(this.flags_,e.isRunningMask_)},set:function(r){this.flags_=Ct(this.flags_,e.isRunningMask_,r)}},{key:"diffValue",get:function(){return bt(this.flags_,e.diffValueMask_)?1:0},set:function(r){this.flags_=Ct(this.flags_,e.diffValueMask_,r===1)}}])}();Ui.isDisposedMask_=1;Ui.isScheduledMask_=2;Ui.isTrackPendingMask_=4;Ui.isRunningMask_=8;Ui.diffValueMask_=16;var U1=100,$u=function(t){return t()};function Sm(){K.inBatch>0||K.isRunningReactions||$u(j1)}function j1(){K.isRunningReactions=!0;for(var e=K.pendingReactions,t=0;e.length>0;){++t===U1&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var i=e.splice(0),r=0,s=i.length;r<s;r++)i[r].runReaction_()}K.isRunningReactions=!1}var Xo=Kr("Reaction",Ui);function I1(e){var t=$u;$u=function(r){return e(function(){return t(r)})}}function kn(){return!1}function F1(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var ym="action",$1="action.bound",bm="autoAction",q1="autoAction.bound",Cm="<unnamed action>",qu=pa(ym),W1=pa($1,{bound:!0}),Wu=pa(bm,{autoAction:!0}),V1=pa(q1,{autoAction:!0,bound:!0});function wm(e){var t=function(r,s){if(Xt(r))return jr(r.name||Cm,r,e);if(Xt(s))return jr(r,s,e);if(ga(s))return(e?Wu:qu).decorate_20223_(r,s);if(zr(s))return va(r,s,e?Wu:qu);if(zr(r))return hi(pa(e?bm:ym,{name:r,autoAction:e}))};return t}var Es=wm(!1);Object.assign(Es,qu);var Zn=wm(!0);Object.assign(Zn,Wu);Es.bound=hi(W1);Zn.bound=hi(V1);function Ia(e){return um(e.name||Cm,!1,e,this,void 0)}function Ws(e){return Xt(e)&&e.isMobxAction===!0}function G1(e,t){var i,r,s,a;t===void 0&&(t=Gp);var c=(i=(r=t)==null?void 0:r.name)!=null?i:"Autorun",n=!t.scheduler&&!t.delay,o;if(n)o=new Ui(c,function(){this.track(f)},t.onError,t.requiresObservable);else{var d=Y1(t),v=!1;o=new Ui(c,function(){v||(v=!0,d(function(){v=!1,o.isDisposed||o.track(f)}))},t.onError,t.requiresObservable)}function f(){e(o)}return(s=t)!=null&&(s=s.signal)!=null&&s.aborted||o.schedule_(),o.getDisposer_((a=t)==null?void 0:a.signal)}var K1=function(t){return t()};function Y1(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:K1}var X1="onBO",Z1="onBUO";function Q1(e,t,i){return xm(X1,e,t,i)}function Em(e,t,i){return xm(Z1,e,t,i)}function xm(e,t,i,r){var s=Jo(t),a=Xt(r)?r:i,c=e+"L";return s[c]?s[c].add(a):s[c]=new Set([a]),function(){var n=s[c];n&&(n.delete(a),n.size===0&&delete s[c])}}var J1="never",Fa="always",eC="observed";function tC(e){e.isolateGlobalState===!0&&N1();var t=e.useProxies,i=e.enforceActions;if(t!==void 0&&(K.useProxies=t===Fa?!0:t===J1?!1:typeof Proxy<"u"),t==="ifavailable"&&(K.verifyProxies=!0),i!==void 0){var r=i===Fa?Fa:i===eC;K.enforceActions=r,K.allowStateChanges=!(r===!0||r===Fa)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(s){s in e&&(K[s]=!!e[s])}),K.allowStateReads=!K.observableRequiresReaction,e.reactionScheduler&&I1(e.reactionScheduler)}function Am(e,t,i,r){var s=Ub(t);return yr(function(){var a=Zr(e,r)[ie];qs(s).forEach(function(c){a.extend_(c,s[c],i&&c in i?i[c]:!0)})}),e}function iC(e,t){return Lm(Jo(e,t))}function Lm(e){var t={name:e.name_};return e.observing_&&e.observing_.length>0&&(t.dependencies=rC(e.observing_).map(Lm)),t}function rC(e){return Array.from(new Set(e))}var sC=0;function Om(){this.message="FLOW_CANCELLED"}Om.prototype=Object.create(Error.prototype);var Cc=rm("flow"),nC=rm("flow.bound",{bound:!0}),Vs=Object.assign(function(t,i){if(ga(i))return Cc.decorate_20223_(t,i);if(zr(i))return va(t,i,Cc);var r=t,s=r.name||"<unnamed flow>",a=function(){var n=this,o=arguments,d=++sC,v=Es(s+" - runid: "+d+" - init",r).apply(n,o),f,g=void 0,S=new Promise(function(C,p){var h=0;f=p;function _(m){g=void 0;var w;try{w=Es(s+" - runid: "+d+" - yield "+h++,v.next).call(v,m)}catch(y){return p(y)}u(w)}function l(m){g=void 0;var w;try{w=Es(s+" - runid: "+d+" - yield "+h++,v.throw).call(v,m)}catch(y){return p(y)}u(w)}function u(m){if(Xt(m==null?void 0:m.then)){m.then(u,p);return}return m.done?C(m.value):(g=Promise.resolve(m.value),g.then(_,l))}_(void 0)});return S.cancel=Es(s+" - runid: "+d+" - cancel",function(){try{g&&Jd(g);var C=v.return(void 0),p=Promise.resolve(C.value);p.then(Cs,Cs),Jd(p),f(new Om)}catch(h){f(h)}}),S};return a.isMobXFlow=!0,a},Cc);Vs.bound=hi(nC);function Jd(e){Xt(e.cancel)&&e.cancel()}function Qn(e){return(e==null?void 0:e.isMobXFlow)===!0}function aC(e,t){return e?Tl(e)||!!e[ie]||af(e)||Xo(e)||Dl(e):!1}function Rm(e){return aC(e)}function Ei(e,t){t===void 0&&(t=void 0),It();try{return e.apply(t)}finally{Ft()}}function is(e){return e[ie]}var oC={has:function(t,i){return is(t).has_(i)},get:function(t,i){return is(t).get_(i)},set:function(t,i,r){var s;return zr(i)?(s=is(t).set_(i,r,!0))!=null?s:!0:!1},deleteProperty:function(t,i){var r;return zr(i)?(r=is(t).delete_(i,!0))!=null?r:!0:!1},defineProperty:function(t,i,r){var s;return(s=is(t).defineProperty_(i,r))!=null?s:!0},ownKeys:function(t){return is(t).ownKeys_()},preventExtensions:function(t){ge(13)}};function lC(e,t){var i,r;return Kp(),e=Zr(e,t),(r=(i=e[ie]).proxy_)!=null?r:i.proxy_=new Proxy(e,oC)}function Ut(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function ma(e,t){var i=e.interceptors_||(e.interceptors_=[]);return i.push(t),Yp(function(){var r=i.indexOf(t);r!==-1&&i.splice(r,1)})}function jt(e,t){var i=Yr();try{for(var r=[].concat(e.interceptors_||[]),s=0,a=r.length;s<a&&(t=r[s](t),t&&!t.type&&ge(14),!!t);s++);return t}finally{Ti(i)}}function Kt(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function Sa(e,t){var i=e.changeListeners_||(e.changeListeners_=[]);return i.push(t),Yp(function(){var r=i.indexOf(t);r!==-1&&i.splice(r,1)})}function Yt(e,t){var i=Yr(),r=e.changeListeners_;if(r){r=r.slice();for(var s=0,a=r.length;s<a;s++)r[s](t);Ti(i)}}function cC(e,t,i){return yr(function(){var r,s=Zr(e,i)[ie];(r=t)!=null||(t=qb(e)),qs(t).forEach(function(a){return s.make_(a,t[a])})}),e}var wc=Symbol("mobx-keys");function uC(e,t,i){return Pi(e)?Am(e,e,t,i):(yr(function(){var r=Zr(e,i)[ie];if(!e[wc]){var s=Object.getPrototypeOf(e),a=new Set([].concat(qs(e),qs(s)));a.delete("constructor"),a.delete(ie),_a(s,wc,a)}e[wc].forEach(function(c){return r.make_(c,t&&c in t?t[c]:!0)})}),e)}var e_="splice",fi="update",hC=1e4,fC={get:function(t,i){var r=t[ie];return i===ie?r:i==="length"?r.getArrayLength_():typeof i=="string"&&!isNaN(i)?r.get_(parseInt(i)):Mi(Zo,i)?Zo[i]:t[i]},set:function(t,i,r){var s=t[ie];return i==="length"&&s.setArrayLength_(r),typeof i=="symbol"||isNaN(i)?t[i]=r:s.set_(parseInt(i),r),!0},preventExtensions:function(){ge(15)}},hf=function(){function e(i,r,s,a){i===void 0&&(i="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=s,this.legacyMode_=a,this.atom_=new Sr(i),this.enhancer_=function(c,n){return r(c,n,"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(r){return this.dehancer!==void 0?this.dehancer(r):r},t.dehanceValues_=function(r){return this.dehancer!==void 0&&r.length>0?r.map(this.dehancer):r},t.intercept_=function(r){return ma(this,r)},t.observe_=function(r,s){return s===void 0&&(s=!1),s&&r({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Sa(this,r)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(r){(typeof r!="number"||isNaN(r)||r<0)&&ge("Out of range: "+r);var s=this.values_.length;if(r!==s)if(r>s){for(var a=new Array(r-s),c=0;c<r-s;c++)a[c]=void 0;this.spliceWithArray_(s,0,a)}else this.spliceWithArray_(r,s-r)},t.updateArrayLength_=function(r,s){r!==this.lastKnownLength_&&ge(16),this.lastKnownLength_+=s,this.legacyMode_&&s>0&&Hm(r+s+1)},t.spliceWithArray_=function(r,s,a){var c=this;this.atom_;var n=this.values_.length;if(r===void 0?r=0:r>n?r=n:r<0&&(r=Math.max(0,n+r)),arguments.length===1?s=n-r:s==null?s=0:s=Math.max(0,Math.min(s,n-r)),a===void 0&&(a=zu),Ut(this)){var o=jt(this,{object:this.proxy_,type:e_,index:r,removedCount:s,added:a});if(!o)return zu;s=o.removedCount,a=o.added}if(a=a.length===0?a:a.map(function(f){return c.enhancer_(f,void 0)}),this.legacyMode_){var d=a.length-s;this.updateArrayLength_(n,d)}var v=this.spliceItemsIntoValues_(r,s,a);return(s!==0||a.length!==0)&&this.notifyArraySplice_(r,a,v),this.dehanceValues_(v)},t.spliceItemsIntoValues_=function(r,s,a){if(a.length<hC){var c;return(c=this.values_).splice.apply(c,[r,s].concat(a))}else{var n=this.values_.slice(r,r+s),o=this.values_.slice(r+s);this.values_.length+=a.length-s;for(var d=0;d<a.length;d++)this.values_[r+d]=a[d];for(var v=0;v<o.length;v++)this.values_[r+a.length+v]=o[v];return n}},t.notifyArrayChildUpdate_=function(r,s,a){var c=!this.owned_&&kn(),n=Kt(this),o=n||c?{observableKind:"array",object:this.proxy_,type:fi,debugObjectName:this.atom_.name_,index:r,newValue:s,oldValue:a}:null;this.atom_.reportChanged(),n&&Yt(this,o)},t.notifyArraySplice_=function(r,s,a){var c=!this.owned_&&kn(),n=Kt(this),o=n||c?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:e_,index:r,removed:a,added:s,removedCount:a.length,addedCount:s.length}:null;this.atom_.reportChanged(),n&&Yt(this,o)},t.get_=function(r){if(this.legacyMode_&&r>=this.values_.length){console.warn("[mobx] Out of bounds read: "+r);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[r])},t.set_=function(r,s){var a=this.values_;if(this.legacyMode_&&r>a.length&&ge(17,r,a.length),r<a.length){this.atom_;var c=a[r];if(Ut(this)){var n=jt(this,{type:fi,object:this.proxy_,index:r,newValue:s});if(!n)return;s=n.newValue}s=this.enhancer_(s,c);var o=s!==c;o&&(a[r]=s,this.notifyArrayChildUpdate_(r,s,c))}else{for(var d=new Array(r+1-a.length),v=0;v<d.length-1;v++)d[v]=void 0;d[d.length-1]=s,this.spliceWithArray_(a.length,0,d)}},e}();function dC(e,t,i,r){return i===void 0&&(i="ObservableArray"),r===void 0&&(r=!1),Kp(),yr(function(){var s=new hf(i,t,r,!1);Zp(s.values_,ie,s);var a=new Proxy(s.values_,fC);return s.proxy_=a,e&&e.length&&s.spliceWithArray_(0,0,e),a})}var Zo={clear:function(){return this.splice(0)},replace:function(t){var i=this[ie];return i.spliceWithArray_(0,i.values_.length,t)},toJSON:function(){return this.slice()},splice:function(t,i){for(var r=arguments.length,s=new Array(r>2?r-2:0),a=2;a<r;a++)s[a-2]=arguments[a];var c=this[ie];switch(arguments.length){case 0:return[];case 1:return c.spliceWithArray_(t);case 2:return c.spliceWithArray_(t,i)}return c.spliceWithArray_(t,i,s)},spliceWithArray:function(t,i,r){return this[ie].spliceWithArray_(t,i,r)},push:function(){for(var t=this[ie],i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];return t.spliceWithArray_(t.values_.length,0,r),t.values_.length},pop:function(){return this.splice(Math.max(this[ie].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=this[ie],i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];return t.spliceWithArray_(0,0,r),t.values_.length},reverse:function(){return K.trackingDerivation&&ge(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){K.trackingDerivation&&ge(37,"sort");var t=this.slice();return t.sort.apply(t,arguments),this.replace(t),this},remove:function(t){var i=this[ie],r=i.dehanceValues_(i.values_).indexOf(t);return r>-1?(this.splice(r,1),!0):!1}};Re("at",Dt);Re("concat",Dt);Re("flat",Dt);Re("includes",Dt);Re("indexOf",Dt);Re("join",Dt);Re("lastIndexOf",Dt);Re("slice",Dt);Re("toString",Dt);Re("toLocaleString",Dt);Re("toSorted",Dt);Re("toSpliced",Dt);Re("with",Dt);Re("every",Jt);Re("filter",Jt);Re("find",Jt);Re("findIndex",Jt);Re("findLast",Jt);Re("findLastIndex",Jt);Re("flatMap",Jt);Re("forEach",Jt);Re("map",Jt);Re("some",Jt);Re("toReversed",Jt);Re("reduce",Dm);Re("reduceRight",Dm);function Re(e,t){typeof Array.prototype[e]=="function"&&(Zo[e]=t(e))}function Dt(e){return function(){var t=this[ie];t.atom_.reportObserved();var i=t.dehanceValues_(t.values_);return i[e].apply(i,arguments)}}function Jt(e){return function(t,i){var r=this,s=this[ie];s.atom_.reportObserved();var a=s.dehanceValues_(s.values_);return a[e](function(c,n){return t.call(i,c,n,r)})}}function Dm(e){return function(){var t=this,i=this[ie];i.atom_.reportObserved();var r=i.dehanceValues_(i.values_),s=arguments[0];return arguments[0]=function(a,c,n){return s(a,c,n,t)},r[e].apply(r,arguments)}}var _C=Kr("ObservableArrayAdministration",hf);function Ml(e){return Al(e)&&_C(e[ie])}var vC={},ir="add",Qo="delete",Mm=function(){function e(i,r,s){var a=this;r===void 0&&(r=Ur),s===void 0&&(s="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[ie]=vC,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=r,this.name_=s,Xt(Map)||ge(18),yr(function(){a.keysAtom_=tm("ObservableMap.keys()"),a.data_=new Map,a.hasMap_=new Map,i&&a.merge(i)})}var t=e.prototype;return t.has_=function(r){return this.data_.has(r)},t.has=function(r){var s=this;if(!K.trackingDerivation)return this.has_(r);var a=this.hasMap_.get(r);if(!a){var c=a=new Mr(this.has_(r),Ll,"ObservableMap.key?",!1);this.hasMap_.set(r,c),Em(c,function(){return s.hasMap_.delete(r)})}return a.get()},t.set=function(r,s){var a=this.has_(r);if(Ut(this)){var c=jt(this,{type:a?fi:ir,object:this,newValue:s,name:r});if(!c)return this;s=c.newValue}return a?this.updateValue_(r,s):this.addValue_(r,s),this},t.delete=function(r){var s=this;if(this.keysAtom_,Ut(this)){var a=jt(this,{type:Qo,object:this,name:r});if(!a)return!1}if(this.has_(r)){var c=kn(),n=Kt(this),o=n||c?{observableKind:"map",debugObjectName:this.name_,type:Qo,object:this,oldValue:this.data_.get(r).value_,name:r}:null;return Ei(function(){var d;s.keysAtom_.reportChanged(),(d=s.hasMap_.get(r))==null||d.setNewValue_(!1);var v=s.data_.get(r);v.setNewValue_(void 0),s.data_.delete(r)}),n&&Yt(this,o),!0}return!1},t.updateValue_=function(r,s){var a=this.data_.get(r);if(s=a.prepareNewValue_(s),s!==K.UNCHANGED){var c=kn(),n=Kt(this),o=n||c?{observableKind:"map",debugObjectName:this.name_,type:fi,object:this,oldValue:a.value_,name:r,newValue:s}:null;a.setNewValue_(s),n&&Yt(this,o)}},t.addValue_=function(r,s){var a=this;this.keysAtom_,Ei(function(){var d,v=new Mr(s,a.enhancer_,"ObservableMap.key",!1);a.data_.set(r,v),s=v.value_,(d=a.hasMap_.get(r))==null||d.setNewValue_(!0),a.keysAtom_.reportChanged()});var c=kn(),n=Kt(this),o=n||c?{observableKind:"map",debugObjectName:this.name_,type:ir,object:this,name:r,newValue:s}:null;n&&Yt(this,o)},t.get=function(r){return this.has(r)?this.dehanceValue_(this.data_.get(r).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(r){return this.dehancer!==void 0?this.dehancer(r):r},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var r=this,s=this.keys();return t_({next:function(){var c=s.next(),n=c.done,o=c.value;return{done:n,value:n?void 0:r.get(o)}}})},t.entries=function(){var r=this,s=this.keys();return t_({next:function(){var c=s.next(),n=c.done,o=c.value;return{done:n,value:n?void 0:[o,r.get(o)]}}})},t[Symbol.iterator]=function(){return this.entries()},t.forEach=function(r,s){for(var a=ws(this),c;!(c=a()).done;){var n=c.value,o=n[0],d=n[1];r.call(s,d,o,this)}},t.merge=function(r){var s=this;return Xr(r)&&(r=new Map(r)),Ei(function(){Pi(r)?Pb(r).forEach(function(a){return s.set(a,r[a])}):Array.isArray(r)?r.forEach(function(a){var c=a[0],n=a[1];return s.set(c,n)}):rn(r)?(zb(r)||ge(19,r),r.forEach(function(a,c){return s.set(c,a)})):r!=null&&ge(20,r)}),this},t.clear=function(){var r=this;Ei(function(){fm(function(){for(var s=ws(r.keys()),a;!(a=s()).done;){var c=a.value;r.delete(c)}})})},t.replace=function(r){var s=this;return Ei(function(){for(var a=gC(r),c=new Map,n=!1,o=ws(s.data_.keys()),d;!(d=o()).done;){var v=d.value;if(!a.has(v)){var f=s.delete(v);if(f)n=!0;else{var g=s.data_.get(v);c.set(v,g)}}}for(var S=ws(a.entries()),C;!(C=S()).done;){var p=C.value,h=p[0],_=p[1],l=s.data_.has(h);if(s.set(h,_),s.data_.has(h)){var u=s.data_.get(h);c.set(h,u),l||(n=!0)}}if(!n)if(s.data_.size!==c.size)s.keysAtom_.reportChanged();else for(var m=s.data_.keys(),w=c.keys(),y=m.next(),E=w.next();!y.done;){if(y.value!==E.value){s.keysAtom_.reportChanged();break}y=m.next(),E=w.next()}s.data_=c}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(r,s){return Sa(this,r)},t.intercept_=function(r){return ma(this,r)},sn(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),Xr=Kr("ObservableMap",Mm);function t_(e){return e[Symbol.toStringTag]="MapIterator",df(e)}function gC(e){if(rn(e)||Xr(e))return e;if(Array.isArray(e))return new Map(e);if(Pi(e)){var t=new Map;for(var i in e)t.set(i,e[i]);return t}else return ge(21,e)}var pC={},Tm=function(){function e(i,r,s){var a=this;r===void 0&&(r=Ur),s===void 0&&(s="ObservableSet"),this.name_=void 0,this[ie]=pC,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=s,Xt(Set)||ge(22),this.enhancer_=function(c,n){return r(c,n,s)},yr(function(){a.atom_=tm(a.name_),i&&a.replace(i)})}var t=e.prototype;return t.dehanceValue_=function(r){return this.dehancer!==void 0?this.dehancer(r):r},t.clear=function(){var r=this;Ei(function(){fm(function(){for(var s=ws(r.data_.values()),a;!(a=s()).done;){var c=a.value;r.delete(c)}})})},t.forEach=function(r,s){for(var a=ws(this),c;!(c=a()).done;){var n=c.value;r.call(s,n,n,this)}},t.add=function(r){var s=this;if(this.atom_,Ut(this)){var a=jt(this,{type:ir,object:this,newValue:r});if(!a)return this;r=a.newValue}if(!this.has(r)){Ei(function(){s.data_.add(s.enhancer_(r,void 0)),s.atom_.reportChanged()});var c=!1,n=Kt(this),o=n||c?{observableKind:"set",debugObjectName:this.name_,type:ir,object:this,newValue:r}:null;n&&Yt(this,o)}return this},t.delete=function(r){var s=this;if(Ut(this)){var a=jt(this,{type:Qo,object:this,oldValue:r});if(!a)return!1}if(this.has(r)){var c=!1,n=Kt(this),o=n||c?{observableKind:"set",debugObjectName:this.name_,type:Qo,object:this,oldValue:r}:null;return Ei(function(){s.atom_.reportChanged(),s.data_.delete(r)}),n&&Yt(this,o),!0}return!1},t.has=function(r){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(r))},t.entries=function(){var r=this.values();return i_({next:function(){var a=r.next(),c=a.value,n=a.done;return n?{value:void 0,done:n}:{value:[c,c],done:n}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var r=this,s=this.data_.values();return i_({next:function(){var c=s.next(),n=c.value,o=c.done;return o?{value:void 0,done:o}:{value:r.dehanceValue_(n),done:o}}})},t.intersection=function(r){if(wi(r)&&!ii(r))return r.intersection(this);var s=new Set(this);return s.intersection(r)},t.union=function(r){if(wi(r)&&!ii(r))return r.union(this);var s=new Set(this);return s.union(r)},t.difference=function(r){return new Set(this).difference(r)},t.symmetricDifference=function(r){if(wi(r)&&!ii(r))return r.symmetricDifference(this);var s=new Set(this);return s.symmetricDifference(r)},t.isSubsetOf=function(r){return new Set(this).isSubsetOf(r)},t.isSupersetOf=function(r){return new Set(this).isSupersetOf(r)},t.isDisjointFrom=function(r){if(wi(r)&&!ii(r))return r.isDisjointFrom(this);var s=new Set(this);return s.isDisjointFrom(r)},t.replace=function(r){var s=this;return ii(r)&&(r=new Set(r)),Ei(function(){Array.isArray(r)?(s.clear(),r.forEach(function(a){return s.add(a)})):wi(r)?(s.clear(),r.forEach(function(a){return s.add(a)})):r!=null&&ge("Cannot initialize set from "+r)}),this},t.observe_=function(r,s){return Sa(this,r)},t.intercept_=function(r){return ma(this,r)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[Symbol.iterator]=function(){return this.values()},sn(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),ii=Kr("ObservableSet",Tm);function i_(e){return e[Symbol.toStringTag]="SetIterator",df(e)}var r_=Object.create(null),s_="remove",Bm=function(){function e(i,r,s,a){r===void 0&&(r=new Map),a===void 0&&(a=_1),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=i,this.values_=r,this.name_=s,this.defaultAnnotation_=a,this.keysAtom_=new Sr("ObservableObject.keys"),this.isPlainObject_=Pi(this.target_)}var t=e.prototype;return t.getObservablePropValue_=function(r){return this.values_.get(r).get()},t.setObservablePropValue_=function(r,s){var a=this.values_.get(r);if(a instanceof Zt)return a.set(s),!0;if(Ut(this)){var c=jt(this,{type:fi,object:this.proxy_||this.target_,name:r,newValue:s});if(!c)return null;s=c.newValue}if(s=a.prepareNewValue_(s),s!==K.UNCHANGED){var n=Kt(this),o=!1,d=n||o?{type:fi,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:a.value_,name:r,newValue:s}:null;a.setNewValue_(s),n&&Yt(this,d)}return!0},t.get_=function(r){return K.trackingDerivation&&!Mi(this.target_,r)&&this.has_(r),this.target_[r]},t.set_=function(r,s,a){return a===void 0&&(a=!1),Mi(this.target_,r)?this.values_.has(r)?this.setObservablePropValue_(r,s):a?Reflect.set(this.target_,r,s):(this.target_[r]=s,!0):this.extend_(r,{value:s,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,a)},t.has_=function(r){if(!K.trackingDerivation)return r in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var s=this.pendingKeys_.get(r);return s||(s=new Mr(r in this.target_,Ll,"ObservableObject.key?",!1),this.pendingKeys_.set(r,s)),s.get()},t.make_=function(r,s){if(s===!0&&(s=this.defaultAnnotation_),s!==!1){if(!(r in this.target_)){var a;if((a=this.target_[oi])!=null&&a[r])return;ge(1,s.annotationType_,this.name_+"."+r.toString())}for(var c=this.target_;c&&c!==xl;){var n=Wo(c,r);if(n){var o=s.make_(this,r,n,c);if(o===0)return;if(o===1)break}c=Object.getPrototypeOf(c)}a_(this,s,r)}},t.extend_=function(r,s,a,c){if(c===void 0&&(c=!1),a===!0&&(a=this.defaultAnnotation_),a===!1)return this.defineProperty_(r,s,c);var n=a.extend_(this,r,s,c);return n&&a_(this,a,r),n},t.defineProperty_=function(r,s,a){a===void 0&&(a=!1),this.keysAtom_;try{It();var c=this.delete_(r);if(!c)return c;if(Ut(this)){var n=jt(this,{object:this.proxy_||this.target_,name:r,type:ir,newValue:s.value});if(!n)return null;var o=n.newValue;s.value!==o&&(s=Pr({},s,{value:o}))}if(a){if(!Reflect.defineProperty(this.target_,r,s))return!1}else ui(this.target_,r,s);this.notifyPropertyAddition_(r,s.value)}finally{Ft()}return!0},t.defineObservableProperty_=function(r,s,a,c){c===void 0&&(c=!1),this.keysAtom_;try{It();var n=this.delete_(r);if(!n)return n;if(Ut(this)){var o=jt(this,{object:this.proxy_||this.target_,name:r,type:ir,newValue:s});if(!o)return null;s=o.newValue}var d=n_(r),v={configurable:K.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:d.get,set:d.set};if(c){if(!Reflect.defineProperty(this.target_,r,v))return!1}else ui(this.target_,r,v);var f=new Mr(s,a,"ObservableObject.key",!1);this.values_.set(r,f),this.notifyPropertyAddition_(r,f.value_)}finally{Ft()}return!0},t.defineComputedProperty_=function(r,s,a){a===void 0&&(a=!1),this.keysAtom_;try{It();var c=this.delete_(r);if(!c)return c;if(Ut(this)){var n=jt(this,{object:this.proxy_||this.target_,name:r,type:ir,newValue:void 0});if(!n)return null}s.name||(s.name="ObservableObject.key"),s.context=this.proxy_||this.target_;var o=n_(r),d={configurable:K.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:o.get,set:o.set};if(a){if(!Reflect.defineProperty(this.target_,r,d))return!1}else ui(this.target_,r,d);this.values_.set(r,new Zt(s)),this.notifyPropertyAddition_(r,void 0)}finally{Ft()}return!0},t.delete_=function(r,s){if(s===void 0&&(s=!1),this.keysAtom_,!Mi(this.target_,r))return!0;if(Ut(this)){var a=jt(this,{object:this.proxy_||this.target_,name:r,type:s_});if(!a)return null}try{var c;It();var n=Kt(this),o=!1,d=this.values_.get(r),v=void 0;if(!d&&(n||o)){var f;v=(f=Wo(this.target_,r))==null?void 0:f.value}if(s){if(!Reflect.deleteProperty(this.target_,r))return!1}else delete this.target_[r];if(d&&(this.values_.delete(r),d instanceof Mr&&(v=d.value_),mm(d)),this.keysAtom_.reportChanged(),(c=this.pendingKeys_)==null||(c=c.get(r))==null||c.set(r in this.target_),n||o){var g={type:s_,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:v,name:r};n&&Yt(this,g)}}finally{Ft()}return!0},t.observe_=function(r,s){return Sa(this,r)},t.intercept_=function(r){return ma(this,r)},t.notifyPropertyAddition_=function(r,s){var a,c=Kt(this),n=!1;if(c||n){var o=c||n?{type:ir,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:r,newValue:s}:null;c&&Yt(this,o)}(a=this.pendingKeys_)==null||(a=a.get(r))==null||a.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),qs(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Zr(e,t){var i;if(Mi(e,ie))return e;var r=(i=t==null?void 0:t.name)!=null?i:"ObservableObject",s=new Bm(e,new Map,String(r),x1(t));return _a(e,ie,s),e}var mC=Kr("ObservableObjectAdministration",Bm);function n_(e){return r_[e]||(r_[e]={get:function(){return this[ie].getObservablePropValue_(e)},set:function(i){return this[ie].setObservablePropValue_(e,i)}})}function Tl(e){return Al(e)?mC(e[ie]):!1}function a_(e,t,i){var r;(r=e.target_[oi])==null||delete r[i]}var SC=Nm(0),yC=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),Ec=0,km=function(){};function bC(e,t){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,t):e.prototype.__proto__!==void 0?e.prototype.__proto__=t:e.prototype=t}bC(km,Array.prototype);var ff=function(e){function t(r,s,a,c){var n;return a===void 0&&(a="ObservableArray"),c===void 0&&(c=!1),n=e.call(this)||this,yr(function(){var o=new hf(a,s,c,!0);o.proxy_=n,Zp(n,ie,o),r&&r.length&&n.spliceWithArray(0,0,r),yC&&Object.defineProperty(n,"0",SC)}),n}em(t,e);var i=t.prototype;return i.concat=function(){this[ie].atom_.reportObserved();for(var s=arguments.length,a=new Array(s),c=0;c<s;c++)a[c]=arguments[c];return Array.prototype.concat.apply(this.slice(),a.map(function(n){return Ml(n)?n.slice():n}))},i[Symbol.iterator]=function(){var r=this,s=0;return df({next:function(){return s<r.length?{value:r[s++],done:!1}:{done:!0,value:void 0}}})},sn(t,[{key:"length",get:function(){return this[ie].getArrayLength_()},set:function(s){this[ie].setArrayLength_(s)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(km);Object.entries(Zo).forEach(function(e){var t=e[0],i=e[1];t!=="concat"&&_a(ff.prototype,t,i)});function Nm(e){return{enumerable:!1,configurable:!0,get:function(){return this[ie].get_(e)},set:function(i){this[ie].set_(e,i)}}}function CC(e){ui(ff.prototype,""+e,Nm(e))}function Hm(e){if(e>Ec){for(var t=Ec;t<e+100;t++)CC(t);Ec=e}}Hm(1e3);function wC(e,t,i){return new ff(e,t,i)}function Jo(e,t){if(typeof e=="object"&&e!==null){if(Ml(e))return t!==void 0&&ge(23),e[ie].atom_;if(ii(e))return e.atom_;if(Xr(e)){if(t===void 0)return e.keysAtom_;var i=e.data_.get(t)||e.hasMap_.get(t);return i||ge(25,t,Vu(e)),i}if(Tl(e)){if(!t)return ge(26);var r=e[ie].values_.get(t);return r||ge(27,t,Vu(e)),r}if(af(e)||Dl(e)||Xo(e))return e}else if(Xt(e)&&Xo(e[ie]))return e[ie];ge(28)}function EC(e,t){if(e||ge(29),af(e)||Dl(e)||Xo(e)||Xr(e)||ii(e))return e;if(e[ie])return e[ie];ge(24,e)}function Vu(e,t){var i;if(t!==void 0)i=Jo(e,t);else{if(Ws(e))return e.name;Tl(e)||Xr(e)||ii(e)?i=EC(e):i=Jo(e)}return i.name_}function yr(e){var t=Yr(),i=lf(!0);It();try{return e()}finally{Ft(),cf(i),Ti(t)}}var o_=xl.toString;function zm(e,t,i){return i===void 0&&(i=-1),Gu(e,t,i)}function Gu(e,t,i,r,s){if(e===t)return e!==0||1/e===1/t;if(e==null||t==null)return!1;if(e!==e)return t!==t;var a=typeof e;if(a!=="function"&&a!=="object"&&typeof t!="object")return!1;var c=o_.call(e);if(c!==o_.call(t))return!1;switch(c){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:+e==0?1/+e===1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":i>=0&&i++;break}e=l_(e),t=l_(t);var n=c==="[object Array]";if(!n){if(typeof e!="object"||typeof t!="object")return!1;var o=e.constructor,d=t.constructor;if(o!==d&&!(Xt(o)&&o instanceof o&&Xt(d)&&d instanceof d)&&"constructor"in e&&"constructor"in t)return!1}if(i===0)return!1;i<0&&(i=-1),r=r||[],s=s||[];for(var v=r.length;v--;)if(r[v]===e)return s[v]===t;if(r.push(e),s.push(t),n){if(v=e.length,v!==t.length)return!1;for(;v--;)if(!Gu(e[v],t[v],i-1,r,s))return!1}else{var f=Object.keys(e),g=f.length;if(Object.keys(t).length!==g)return!1;for(var S=0;S<g;S++){var C=f[S];if(!(Mi(t,C)&&Gu(e[C],t[C],i-1,r,s)))return!1}}return r.pop(),s.pop(),!0}function l_(e){return Ml(e)?e.slice():rn(e)||Xr(e)||wi(e)||ii(e)?Array.from(e.entries()):e}var c_,xC=((c_=El().Iterator)==null?void 0:c_.prototype)||{};function df(e){return e[Symbol.iterator]=AC,Object.assign(Object.create(xC),e)}function AC(){return this}["Symbol","Map","Set"].forEach(function(e){var t=El();typeof t[e]>"u"&&ge("MobX requires global '"+e+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:F1,extras:{getDebugName:Vu},$mobx:ie});if(!I.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!cC)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function LC(e){e()}function OC(e){e||(e=LC),tC({reactionScheduler:e})}function RC(e){return iC(e)}var DC=1e4,MC=1e4,TC=function(){function e(t){var i=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(r){r===void 0&&(r=DC),clearTimeout(i.sweepTimeout),i.sweepTimeout=void 0;var s=Date.now();i.registrations.forEach(function(a,c){s-a.registeredAt>=r&&(i.finalize(a.value),i.registrations.delete(c))}),i.registrations.size>0&&i.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){i.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(t,i,r){this.registrations.set(r,{value:i,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.registrations.delete(t)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,MC))}}),e}(),BC=typeof FinalizationRegistry<"u"?FinalizationRegistry:TC,Ku=new BC(function(e){var t;(t=e.reaction)===null||t===void 0||t.dispose(),e.reaction=null}),Pm={exports:{}},Um={};/**
52
+ * @license React
53
+ * use-sync-external-store-shim.production.js
54
+ *
55
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
56
+ *
57
+ * This source code is licensed under the MIT license found in the
58
+ * LICENSE file in the root directory of this source tree.
59
+ */var Gs=I;function kC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var NC=typeof Object.is=="function"?Object.is:kC,HC=Gs.useState,zC=Gs.useEffect,PC=Gs.useLayoutEffect,UC=Gs.useDebugValue;function jC(e,t){var i=t(),r=HC({inst:{value:i,getSnapshot:t}}),s=r[0].inst,a=r[1];return PC(function(){s.value=i,s.getSnapshot=t,xc(s)&&a({inst:s})},[e,i,t]),zC(function(){return xc(s)&&a({inst:s}),e(function(){xc(s)&&a({inst:s})})},[e]),UC(i),i}function xc(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!NC(e,i)}catch{return!0}}function IC(e,t){return t()}var FC=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?IC:jC;Um.useSyncExternalStore=Gs.useSyncExternalStore!==void 0?Gs.useSyncExternalStore:FC;Pm.exports=Um;var jm=Pm.exports;function u_(e){e.reaction=new Ui("observer".concat(e.name),function(){var t;e.stateVersion=Symbol(),(t=e.onStoreChange)===null||t===void 0||t.call(e)})}function $C(e,t){t===void 0&&(t="observed");var i=Ic.useRef(null);if(!i.current){var r={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(n){return Ku.unregister(r),r.onStoreChange=n,r.reaction||(u_(r),r.stateVersion=Symbol()),function(){var o;r.onStoreChange=null,(o=r.reaction)===null||o===void 0||o.dispose(),r.reaction=null}},getSnapshot:function(){return r.stateVersion}};i.current=r}var s=i.current;s.reaction||(u_(s),Ku.register(i,s,s)),Ic.useDebugValue(s.reaction,RC),jm.useSyncExternalStore(s.subscribe,s.getSnapshot,s.getSnapshot);var a,c;if(s.reaction.track(function(){try{a=e()}catch(n){c=n}}),c)throw c;return a}var Ac,Lc,Im=typeof Symbol=="function"&&Symbol.for,qC=(Lc=(Ac=Object.getOwnPropertyDescriptor(function(){},"name"))===null||Ac===void 0?void 0:Ac.configurable)!==null&&Lc!==void 0?Lc:!1,h_=Im?Symbol.for("react.forward_ref"):typeof I.forwardRef=="function"&&I.forwardRef(function(e){return null}).$$typeof,f_=Im?Symbol.for("react.memo"):typeof I.memo=="function"&&I.memo(function(e){return null}).$$typeof;function Bl(e,t){var i;if(f_&&e.$$typeof===f_)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var r=(i=void 0)!==null&&i!==void 0?i:!1,s=e,a=e.displayName||e.name;if(h_&&e.$$typeof===h_&&(r=!0,s=e.render,typeof s!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var c=function(n,o){return $C(function(){return s(n,o)},a)};return c.displayName=e.displayName,qC&&Object.defineProperty(c,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(c.contextTypes=e.contextTypes),r&&(c=I.forwardRef(c)),c=I.memo(c),VC(e,c),c}var WC={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function VC(e,t){Object.keys(e).forEach(function(i){WC[i]||Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))})}var Oc;OC(ol.unstable_batchedUpdates);Oc=Ku.finalizeAllImmediately;const se=e=>typeof e=="string",dn=()=>{let e,t;const i=new Promise((r,s)=>{e=r,t=s});return i.resolve=e,i.reject=t,i},d_=e=>e==null?"":""+e,GC=(e,t,i)=>{e.forEach(r=>{t[r]&&(i[r]=t[r])})},KC=/###/g,__=e=>e&&e.indexOf("###")>-1?e.replace(KC,"."):e,v_=e=>!e||se(e),Nn=(e,t,i)=>{const r=se(t)?t.split("."):t;let s=0;for(;s<r.length-1;){if(v_(e))return{};const a=__(r[s]);!e[a]&&i&&(e[a]=new i),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={},++s}return v_(e)?{}:{obj:e,k:__(r[s])}},g_=(e,t,i)=>{const{obj:r,k:s}=Nn(e,t,Object);if(r!==void 0||t.length===1){r[s]=i;return}let a=t[t.length-1],c=t.slice(0,t.length-1),n=Nn(e,c,Object);for(;n.obj===void 0&&c.length;)a=`${c[c.length-1]}.${a}`,c=c.slice(0,c.length-1),n=Nn(e,c,Object),n!=null&&n.obj&&typeof n.obj[`${n.k}.${a}`]<"u"&&(n.obj=void 0);n.obj[`${n.k}.${a}`]=i},YC=(e,t,i,r)=>{const{obj:s,k:a}=Nn(e,t,Object);s[a]=s[a]||[],s[a].push(i)},el=(e,t)=>{const{obj:i,k:r}=Nn(e,t);if(i&&Object.prototype.hasOwnProperty.call(i,r))return i[r]},XC=(e,t,i)=>{const r=el(e,i);return r!==void 0?r:el(t,i)},Fm=(e,t,i)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?se(e[r])||e[r]instanceof String||se(t[r])||t[r]instanceof String?i&&(e[r]=t[r]):Fm(e[r],t[r],i):e[r]=t[r]);return e},rs=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var ZC={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const QC=e=>se(e)?e.replace(/[&<>"'\/]/g,t=>ZC[t]):e;class JC{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const i=this.regExpMap.get(t);if(i!==void 0)return i;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const e5=[" ",",","?","!",";"],t5=new JC(20),i5=(e,t,i)=>{t=t||"",i=i||"";const r=e5.filter(c=>t.indexOf(c)<0&&i.indexOf(c)<0);if(r.length===0)return!0;const s=t5.getRegExp(`(${r.map(c=>c==="?"?"\\?":c).join("|")})`);let a=!s.test(e);if(!a){const c=e.indexOf(i);c>0&&!s.test(e.substring(0,c))&&(a=!0)}return a},Yu=(e,t,i=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(i);let s=e;for(let a=0;a<r.length;){if(!s||typeof s!="object")return;let c,n="";for(let o=a;o<r.length;++o)if(o!==a&&(n+=i),n+=r[o],c=s[n],c!==void 0){if(["string","number","boolean"].indexOf(typeof c)>-1&&o<r.length-1)continue;a+=o-a+1;break}s=c}return s},Jn=e=>e==null?void 0:e.replace("_","-"),r5={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var i,r;(r=(i=console==null?void 0:console[e])==null?void 0:i.apply)==null||r.call(i,console,t)}};class tl{constructor(t,i={}){this.init(t,i)}init(t,i={}){this.prefix=i.prefix||"i18next:",this.logger=t||r5,this.options=i,this.debug=i.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,i,r,s){return s&&!this.debug?null:(se(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[i](t))}create(t){return new tl(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new tl(this.logger,t)}}var li=new tl;class kl{constructor(){this.observers={}}on(t,i){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(i)||0;this.observers[r].set(i,s+1)}),this}off(t,i){if(this.observers[t]){if(!i){delete this.observers[t];return}this.observers[t].delete(i)}}emit(t,...i){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([s,a])=>{for(let c=0;c<a;c++)s(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,a])=>{for(let c=0;c<a;c++)s.apply(s,[t,...i])})}}class p_ extends kl{constructor(t,i={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const i=this.options.ns.indexOf(t);i>-1&&this.options.ns.splice(i,1)}getResource(t,i,r,s={}){var d,v;const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let n;t.indexOf(".")>-1?n=t.split("."):(n=[t,i],r&&(Array.isArray(r)?n.push(...r):se(r)&&a?n.push(...r.split(a)):n.push(r)));const o=el(this.data,n);return!o&&!i&&!r&&t.indexOf(".")>-1&&(t=n[0],i=n[1],r=n.slice(2).join(".")),o||!c||!se(r)?o:Yu((v=(d=this.data)==null?void 0:d[t])==null?void 0:v[i],r,a)}addResource(t,i,r,s,a={silent:!1}){const c=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let n=[t,i];r&&(n=n.concat(c?r.split(c):r)),t.indexOf(".")>-1&&(n=t.split("."),s=i,i=n[1]),this.addNamespaces(i),g_(this.data,n,s),a.silent||this.emit("added",t,i,r,s)}addResources(t,i,r,s={silent:!1}){for(const a in r)(se(r[a])||Array.isArray(r[a]))&&this.addResource(t,i,a,r[a],{silent:!0});s.silent||this.emit("added",t,i,r)}addResourceBundle(t,i,r,s,a,c={silent:!1,skipCopy:!1}){let n=[t,i];t.indexOf(".")>-1&&(n=t.split("."),s=r,r=i,i=n[1]),this.addNamespaces(i);let o=el(this.data,n)||{};c.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?Fm(o,r,a):o={...o,...r},g_(this.data,n,o),c.silent||this.emit("added",t,i,r)}removeResourceBundle(t,i){this.hasResourceBundle(t,i)&&delete this.data[t][i],this.removeNamespaces(i),this.emit("removed",t,i)}hasResourceBundle(t,i){return this.getResource(t,i)!==void 0}getResourceBundle(t,i){return i||(i=this.options.defaultNS),this.getResource(t,i)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const i=this.getDataByLanguage(t);return!!(i&&Object.keys(i)||[]).find(s=>i[s]&&Object.keys(i[s]).length>0)}toJSON(){return this.data}}var $m={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,i,r,s){return e.forEach(a=>{var c;t=((c=this.processors[a])==null?void 0:c.process(t,i,r,s))??t}),t}};const qm=Symbol("i18next/PATH_KEY");function s5(){const e=[],t=Object.create(null);let i;return t.get=(r,s)=>{var a;return(a=i==null?void 0:i.revoke)==null||a.call(i),s===qm?e:(e.push(s),i=Proxy.revocable(r,t),i.proxy)},Proxy.revocable(Object.create(null),t).proxy}function Xu(e,t){const{[qm]:i}=e(s5());return i.join((t==null?void 0:t.keySeparator)??".")}const m_={},Rc=e=>!se(e)&&typeof e!="boolean"&&typeof e!="number";class il extends kl{constructor(t,i={}){super(),GC(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=li.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,i={interpolation:{}}){const r={...i};if(t==null)return!1;const s=this.resolve(t,r);if((s==null?void 0:s.res)===void 0)return!1;const a=Rc(s.res);return!(r.returnObjects===!1&&a)}extractFromKey(t,i){let r=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=i.ns||this.options.defaultNS||[];const c=r&&t.indexOf(r)>-1,n=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!i5(t,r,s);if(c&&!n){const o=t.match(this.interpolator.nestingRegexp);if(o&&o.length>0)return{key:t,namespaces:se(a)?[a]:a};const d=t.split(r);(r!==s||r===s&&this.options.ns.indexOf(d[0])>-1)&&(a=d.shift()),t=d.join(s)}return{key:t,namespaces:se(a)?[a]:a}}translate(t,i,r){let s=typeof i=="object"?{...i}:i;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),t==null)return"";typeof t=="function"&&(t=Xu(t,{...this.options,...s})),Array.isArray(t)||(t=[String(t)]);const a=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:n,namespaces:o}=this.extractFromKey(t[t.length-1],s),d=o[o.length-1];let v=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;v===void 0&&(v=":");const f=s.lng||this.language,g=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((f==null?void 0:f.toLowerCase())==="cimode")return g?a?{res:`${d}${v}${n}`,usedKey:n,exactUsedKey:n,usedLng:f,usedNS:d,usedParams:this.getUsedParamsDetails(s)}:`${d}${v}${n}`:a?{res:n,usedKey:n,exactUsedKey:n,usedLng:f,usedNS:d,usedParams:this.getUsedParamsDetails(s)}:n;const S=this.resolve(t,s);let C=S==null?void 0:S.res;const p=(S==null?void 0:S.usedKey)||n,h=(S==null?void 0:S.exactUsedKey)||n,_=["[object Number]","[object Function]","[object RegExp]"],l=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,u=!this.i18nFormat||this.i18nFormat.handleAsObject,m=s.count!==void 0&&!se(s.count),w=il.hasDefaultValue(s),y=m?this.pluralResolver.getSuffix(f,s.count,s):"",E=s.ordinal&&m?this.pluralResolver.getSuffix(f,s.count,{ordinal:!1}):"",b=m&&!s.ordinal&&s.count===0,x=b&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${y}`]||s[`defaultValue${E}`]||s.defaultValue;let A=C;u&&!C&&w&&(A=x);const O=Rc(A),R=Object.prototype.toString.apply(A);if(u&&A&&O&&_.indexOf(R)<0&&!(se(l)&&Array.isArray(A))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const D=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,A,{...s,ns:o}):`key '${n} (${this.language})' returned an object instead of string.`;return a?(S.res=D,S.usedParams=this.getUsedParamsDetails(s),S):D}if(c){const D=Array.isArray(A),B=D?[]:{},U=D?h:p;for(const N in A)if(Object.prototype.hasOwnProperty.call(A,N)){const P=`${U}${c}${N}`;w&&!C?B[N]=this.translate(P,{...s,defaultValue:Rc(x)?x[N]:void 0,joinArrays:!1,ns:o}):B[N]=this.translate(P,{...s,joinArrays:!1,ns:o}),B[N]===P&&(B[N]=A[N])}C=B}}else if(u&&se(l)&&Array.isArray(C))C=C.join(l),C&&(C=this.extendTranslation(C,t,s,r));else{let D=!1,B=!1;!this.isValidLookup(C)&&w&&(D=!0,C=x),this.isValidLookup(C)||(B=!0,C=n);const N=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&B?void 0:C,P=w&&x!==C&&this.options.updateMissing;if(B||D||P){if(this.logger.log(P?"updateKey":"missingKey",f,d,n,P?x:C),c){const k=this.resolve(n,{...s,keySeparator:!1});k&&k.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let z=[];const L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&L&&L[0])for(let k=0;k<L.length;k++)z.push(L[k]);else this.options.saveMissingTo==="all"?z=this.languageUtils.toResolveHierarchy(s.lng||this.language):z.push(s.lng||this.language);const M=(k,H,$)=>{var Z;const V=w&&$!==C?$:N;this.options.missingKeyHandler?this.options.missingKeyHandler(k,d,H,V,P,s):(Z=this.backendConnector)!=null&&Z.saveMissing&&this.backendConnector.saveMissing(k,d,H,V,P,s),this.emit("missingKey",k,d,H,C)};this.options.saveMissing&&(this.options.saveMissingPlurals&&m?z.forEach(k=>{const H=this.pluralResolver.getSuffixes(k,s);b&&s[`defaultValue${this.options.pluralSeparator}zero`]&&H.indexOf(`${this.options.pluralSeparator}zero`)<0&&H.push(`${this.options.pluralSeparator}zero`),H.forEach($=>{M([k],n+$,s[`defaultValue${$}`]||x)})}):M(z,n,x))}C=this.extendTranslation(C,t,s,S,r),B&&C===n&&this.options.appendNamespaceToMissingKey&&(C=`${d}${v}${n}`),(B||D)&&this.options.parseMissingKeyHandler&&(C=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${d}${v}${n}`:n,D?C:void 0,s))}return a?(S.res=C,S.usedParams=this.getUsedParamsDetails(s),S):C}extendTranslation(t,i,r,s,a){var o,d;if((o=this.i18nFormat)!=null&&o.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const v=se(t)&&(((d=r==null?void 0:r.interpolation)==null?void 0:d.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(v){const S=t.match(this.interpolator.nestingRegexp);f=S&&S.length}let g=r.replace&&!se(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(g={...this.options.interpolation.defaultVariables,...g}),t=this.interpolator.interpolate(t,g,r.lng||this.language||s.usedLng,r),v){const S=t.match(this.interpolator.nestingRegexp),C=S&&S.length;f<C&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,(...S)=>(a==null?void 0:a[0])===S[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${S[0]} in key: ${i[0]}`),null):this.translate(...S,i),r)),r.interpolation&&this.interpolator.reset()}const c=r.postProcess||this.options.postProcess,n=se(c)?[c]:c;return t!=null&&(n!=null&&n.length)&&r.applyPostProcessor!==!1&&(t=$m.handle(n,t,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t,i={}){let r,s,a,c,n;return se(t)&&(t=[t]),t.forEach(o=>{if(this.isValidLookup(r))return;const d=this.extractFromKey(o,i),v=d.key;s=v;let f=d.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const g=i.count!==void 0&&!se(i.count),S=g&&!i.ordinal&&i.count===0,C=i.context!==void 0&&(se(i.context)||typeof i.context=="number")&&i.context!=="",p=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);f.forEach(h=>{var _,l;this.isValidLookup(r)||(n=h,!m_[`${p[0]}-${h}`]&&((_=this.utils)!=null&&_.hasLoadedNamespace)&&!((l=this.utils)!=null&&l.hasLoadedNamespace(n))&&(m_[`${p[0]}-${h}`]=!0,this.logger.warn(`key "${s}" for languages "${p.join(", ")}" won't get resolved as namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(u=>{var y;if(this.isValidLookup(r))return;c=u;const m=[v];if((y=this.i18nFormat)!=null&&y.addLookupKeys)this.i18nFormat.addLookupKeys(m,v,u,h,i);else{let E;g&&(E=this.pluralResolver.getSuffix(u,i.count,i));const b=`${this.options.pluralSeparator}zero`,x=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(g&&(i.ordinal&&E.indexOf(x)===0&&m.push(v+E.replace(x,this.options.pluralSeparator)),m.push(v+E),S&&m.push(v+b)),C){const A=`${v}${this.options.contextSeparator||"_"}${i.context}`;m.push(A),g&&(i.ordinal&&E.indexOf(x)===0&&m.push(A+E.replace(x,this.options.pluralSeparator)),m.push(A+E),S&&m.push(A+b))}}let w;for(;w=m.pop();)this.isValidLookup(r)||(a=w,r=this.getResource(u,h,w,i))}))})}),{res:r,usedKey:s,exactUsedKey:a,usedLng:c,usedNS:n}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,i,r,s={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(t,i,r,s):this.resourceStore.getResource(t,i,r,s)}getUsedParamsDetails(t={}){const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!se(t.replace);let s=r?t.replace:t;if(r&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const a of i)delete s[a]}return s}static hasDefaultValue(t){const i="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&i===r.substring(0,i.length)&&t[r]!==void 0)return!0;return!1}}class S_{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=li.create("languageUtils")}getScriptPartFromCode(t){if(t=Jn(t),!t||t.indexOf("-")<0)return null;const i=t.split("-");return i.length===2||(i.pop(),i[i.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(i.join("-"))}getLanguagePartFromCode(t){if(t=Jn(t),!t||t.indexOf("-")<0)return t;const i=t.split("-");return this.formatLanguageCode(i[0])}formatLanguageCode(t){if(se(t)&&t.indexOf("-")>-1){let i;try{i=Intl.getCanonicalLocales(t)[0]}catch{}return i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let i;return t.forEach(r=>{if(i)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(i=s)}),!i&&this.options.supportedLngs&&t.forEach(r=>{if(i)return;const s=this.getScriptPartFromCode(r);if(this.isSupportedCode(s))return i=s;const a=this.getLanguagePartFromCode(r);if(this.isSupportedCode(a))return i=a;i=this.options.supportedLngs.find(c=>{if(c===a)return c;if(!(c.indexOf("-")<0&&a.indexOf("-")<0)&&(c.indexOf("-")>0&&a.indexOf("-")<0&&c.substring(0,c.indexOf("-"))===a||c.indexOf(a)===0&&a.length>1))return c})}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}getFallbackCodes(t,i){if(!t)return[];if(typeof t=="function"&&(t=t(i)),se(t)&&(t=[t]),Array.isArray(t))return t;if(!i)return t.default||[];let r=t[i];return r||(r=t[this.getScriptPartFromCode(i)]),r||(r=t[this.formatLanguageCode(i)]),r||(r=t[this.getLanguagePartFromCode(i)]),r||(r=t.default),r||[]}toResolveHierarchy(t,i){const r=this.getFallbackCodes((i===!1?[]:i)||this.options.fallbackLng||[],t),s=[],a=c=>{c&&(this.isSupportedCode(c)?s.push(c):this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`))};return se(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):se(t)&&a(this.formatLanguageCode(t)),r.forEach(c=>{s.indexOf(c)<0&&a(this.formatLanguageCode(c))}),s}}const y_={zero:0,one:1,two:2,few:3,many:4,other:5},b_={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class n5{constructor(t,i={}){this.languageUtils=t,this.options=i,this.logger=li.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,i={}){const r=Jn(t==="dev"?"en":t),s=i.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:s});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let c;try{c=new Intl.PluralRules(r,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),b_;if(!t.match(/-|_/))return b_;const o=this.languageUtils.getLanguagePartFromCode(t);c=this.getRule(o,i)}return this.pluralRulesCache[a]=c,c}needsPlural(t,i={}){let r=this.getRule(t,i);return r||(r=this.getRule("dev",i)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,i,r={}){return this.getSuffixes(t,r).map(s=>`${i}${s}`)}getSuffixes(t,i={}){let r=this.getRule(t,i);return r||(r=this.getRule("dev",i)),r?r.resolvedOptions().pluralCategories.sort((s,a)=>y_[s]-y_[a]).map(s=>`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(t,i,r={}){const s=this.getRule(t,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(i)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",i,r))}}const C_=(e,t,i,r=".",s=!0)=>{let a=XC(e,t,i);return!a&&s&&se(i)&&(a=Yu(e,i,r),a===void 0&&(a=Yu(t,i,r))),a},Dc=e=>e.replace(/\$/g,"$$$$");class w_{constructor(t={}){var i;this.logger=li.create("interpolator"),this.options=t,this.format=((i=t==null?void 0:t.interpolation)==null?void 0:i.format)||(r=>r),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:i,escapeValue:r,useRawValueToEscape:s,prefix:a,prefixEscaped:c,suffix:n,suffixEscaped:o,formatSeparator:d,unescapeSuffix:v,unescapePrefix:f,nestingPrefix:g,nestingPrefixEscaped:S,nestingSuffix:C,nestingSuffixEscaped:p,nestingOptionsSeparator:h,maxReplaces:_,alwaysFormat:l}=t.interpolation;this.escape=i!==void 0?i:QC,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=a?rs(a):c||"{{",this.suffix=n?rs(n):o||"}}",this.formatSeparator=d||",",this.unescapePrefix=v?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":v||"",this.nestingPrefix=g?rs(g):S||rs("$t("),this.nestingSuffix=C?rs(C):p||rs(")"),this.nestingOptionsSeparator=h||",",this.maxReplaces=_||1e3,this.alwaysFormat=l!==void 0?l:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(i,r)=>(i==null?void 0:i.source)===r?(i.lastIndex=0,i):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,i,r,s){var S;let a,c,n;const o=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},d=C=>{if(C.indexOf(this.formatSeparator)<0){const l=C_(i,o,C,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(l,void 0,r,{...s,...i,interpolationkey:C}):l}const p=C.split(this.formatSeparator),h=p.shift().trim(),_=p.join(this.formatSeparator).trim();return this.format(C_(i,o,h,this.options.keySeparator,this.options.ignoreJSONStructure),_,r,{...s,...i,interpolationkey:h})};this.resetRegExp();const v=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((S=s==null?void 0:s.interpolation)==null?void 0:S.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:C=>Dc(C)},{regex:this.regexp,safeValue:C=>this.escapeValue?Dc(this.escape(C)):Dc(C)}].forEach(C=>{for(n=0;a=C.regex.exec(t);){const p=a[1].trim();if(c=d(p),c===void 0)if(typeof v=="function"){const _=v(t,a,s);c=se(_)?_:""}else if(s&&Object.prototype.hasOwnProperty.call(s,p))c="";else if(f){c=a[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${t}`),c="";else!se(c)&&!this.useRawValueToEscape&&(c=d_(c));const h=C.safeValue(c);if(t=t.replace(a[0],h),f?(C.regex.lastIndex+=c.length,C.regex.lastIndex-=a[0].length):C.regex.lastIndex=0,n++,n>=this.maxReplaces)break}}),t}nest(t,i,r={}){let s,a,c;const n=(o,d)=>{const v=this.nestingOptionsSeparator;if(o.indexOf(v)<0)return o;const f=o.split(new RegExp(`${v}[ ]*{`));let g=`{${f[1]}`;o=f[0],g=this.interpolate(g,c);const S=g.match(/'/g),C=g.match(/"/g);(((S==null?void 0:S.length)??0)%2===0&&!C||C.length%2!==0)&&(g=g.replace(/'/g,'"'));try{c=JSON.parse(g),d&&(c={...d,...c})}catch(p){return this.logger.warn(`failed parsing options string in nesting for key ${o}`,p),`${o}${v}${g}`}return c.defaultValue&&c.defaultValue.indexOf(this.prefix)>-1&&delete c.defaultValue,o};for(;s=this.nestingRegexp.exec(t);){let o=[];c={...r},c=c.replace&&!se(c.replace)?c.replace:c,c.applyPostProcessor=!1,delete c.defaultValue;const d=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(d!==-1&&(o=s[1].slice(d).split(this.formatSeparator).map(v=>v.trim()).filter(Boolean),s[1]=s[1].slice(0,d)),a=i(n.call(this,s[1].trim(),c),c),a&&s[0]===t&&!se(a))return a;se(a)||(a=d_(a)),a||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),a=""),o.length&&(a=o.reduce((v,f)=>this.format(v,f,r.lng,{...r,interpolationkey:s[1].trim()}),a.trim())),t=t.replace(s[0],a),this.regexp.lastIndex=0}return t}}const a5=e=>{let t=e.toLowerCase().trim();const i={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);t==="currency"&&s.indexOf(":")<0?i.currency||(i.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?i.range||(i.range=s.trim()):s.split(";").forEach(c=>{if(c){const[n,...o]=c.split(":"),d=o.join(":").trim().replace(/^'+|'+$/g,""),v=n.trim();i[v]||(i[v]=d),d==="false"&&(i[v]=!1),d==="true"&&(i[v]=!0),isNaN(d)||(i[v]=parseInt(d,10))}})}return{formatName:t,formatOptions:i}},E_=e=>{const t={};return(i,r,s)=>{let a=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(a={...a,[s.interpolationkey]:void 0});const c=r+JSON.stringify(a);let n=t[c];return n||(n=e(Jn(r),s),t[c]=n),n(i)}},o5=e=>(t,i,r)=>e(Jn(i),r)(t);class l5{constructor(t={}){this.logger=li.create("formatter"),this.options=t,this.init(t)}init(t,i={interpolation:{}}){this.formatSeparator=i.interpolation.formatSeparator||",";const r=i.cacheInBuiltFormats?E_:o5;this.formats={number:r((s,a)=>{const c=new Intl.NumberFormat(s,{...a});return n=>c.format(n)}),currency:r((s,a)=>{const c=new Intl.NumberFormat(s,{...a,style:"currency"});return n=>c.format(n)}),datetime:r((s,a)=>{const c=new Intl.DateTimeFormat(s,{...a});return n=>c.format(n)}),relativetime:r((s,a)=>{const c=new Intl.RelativeTimeFormat(s,{...a});return n=>c.format(n,a.range||"day")}),list:r((s,a)=>{const c=new Intl.ListFormat(s,{...a});return n=>c.format(n)})}}add(t,i){this.formats[t.toLowerCase().trim()]=i}addCached(t,i){this.formats[t.toLowerCase().trim()]=E_(i)}format(t,i,r,s={}){const a=i.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(n=>n.indexOf(")")>-1)){const n=a.findIndex(o=>o.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,n)].join(this.formatSeparator)}return a.reduce((n,o)=>{var f;const{formatName:d,formatOptions:v}=a5(o);if(this.formats[d]){let g=n;try{const S=((f=s==null?void 0:s.formatParams)==null?void 0:f[s.interpolationkey])||{},C=S.locale||S.lng||s.locale||s.lng||r;g=this.formats[d](n,C,{...v,...s,...S})}catch(S){this.logger.warn(S)}return g}else this.logger.warn(`there was no format function for ${d}`);return n},t)}}const c5=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class u5 extends kl{constructor(t,i,r,s={}){var a,c;super(),this.backend=t,this.store=i,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=li.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(c=(a=this.backend)==null?void 0:a.init)==null||c.call(a,r,s.backend,s)}queueLoad(t,i,r,s){const a={},c={},n={},o={};return t.forEach(d=>{let v=!0;i.forEach(f=>{const g=`${d}|${f}`;!r.reload&&this.store.hasResourceBundle(d,f)?this.state[g]=2:this.state[g]<0||(this.state[g]===1?c[g]===void 0&&(c[g]=!0):(this.state[g]=1,v=!1,c[g]===void 0&&(c[g]=!0),a[g]===void 0&&(a[g]=!0),o[f]===void 0&&(o[f]=!0)))}),v||(n[d]=!0)}),(Object.keys(a).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(a),pending:Object.keys(c),toLoadLanguages:Object.keys(n),toLoadNamespaces:Object.keys(o)}}loaded(t,i,r){const s=t.split("|"),a=s[0],c=s[1];i&&this.emit("failedLoading",a,c,i),!i&&r&&this.store.addResourceBundle(a,c,r,void 0,void 0,{skipCopy:!0}),this.state[t]=i?-1:2,i&&r&&(this.state[t]=0);const n={};this.queue.forEach(o=>{YC(o.loaded,[a],c),c5(o,t),i&&o.errors.push(i),o.pendingCount===0&&!o.done&&(Object.keys(o.loaded).forEach(d=>{n[d]||(n[d]={});const v=o.loaded[d];v.length&&v.forEach(f=>{n[d][f]===void 0&&(n[d][f]=!0)})}),o.done=!0,o.errors.length?o.callback(o.errors):o.callback())}),this.emit("loaded",n),this.queue=this.queue.filter(o=>!o.done)}read(t,i,r,s=0,a=this.retryTimeout,c){if(!t.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:i,fcName:r,tried:s,wait:a,callback:c});return}this.readingCalls++;const n=(d,v)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(d&&v&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,t,i,r,s+1,a*2,c)},a);return}c(d,v)},o=this.backend[r].bind(this.backend);if(o.length===2){try{const d=o(t,i);d&&typeof d.then=="function"?d.then(v=>n(null,v)).catch(n):n(null,d)}catch(d){n(d)}return}return o(t,i,n)}prepareLoading(t,i,r={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();se(t)&&(t=this.languageUtils.toResolveHierarchy(t)),se(i)&&(i=[i]);const a=this.queueLoad(t,i,r,s);if(!a.toLoad.length)return a.pending.length||s(),null;a.toLoad.forEach(c=>{this.loadOne(c)})}load(t,i,r){this.prepareLoading(t,i,{},r)}reload(t,i,r){this.prepareLoading(t,i,{reload:!0},r)}loadOne(t,i=""){const r=t.split("|"),s=r[0],a=r[1];this.read(s,a,"read",void 0,void 0,(c,n)=>{c&&this.logger.warn(`${i}loading namespace ${a} for language ${s} failed`,c),!c&&n&&this.logger.log(`${i}loaded namespace ${a} for language ${s}`,n),this.loaded(t,c,n)})}saveMissing(t,i,r,s,a,c={},n=()=>{}){var o,d,v,f,g;if((d=(o=this.services)==null?void 0:o.utils)!=null&&d.hasLoadedNamespace&&!((f=(v=this.services)==null?void 0:v.utils)!=null&&f.hasLoadedNamespace(i))){this.logger.warn(`did not save key "${r}" as the namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((g=this.backend)!=null&&g.create){const S={...c,isUpdate:a},C=this.backend.create.bind(this.backend);if(C.length<6)try{let p;C.length===5?p=C(t,i,r,s,S):p=C(t,i,r,s),p&&typeof p.then=="function"?p.then(h=>n(null,h)).catch(n):n(null,p)}catch(p){n(p)}else C(t,i,r,s,n,S)}!t||!t[0]||this.store.addResource(t[0],i,r,s)}}}const Mc=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),se(e[1])&&(t.defaultValue=e[1]),se(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const i=e[3]||e[2];Object.keys(i).forEach(r=>{t[r]=i[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),x_=e=>{var t,i;return se(e.ns)&&(e.ns=[e.ns]),se(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),se(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((i=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:i.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},$a=()=>{},h5=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(i=>{typeof e[i]=="function"&&(e[i]=e[i].bind(e))})},f5=e=>{var t,i,r,s,a,c,n,o,d;return!!(((r=(i=(t=e==null?void 0:e.modules)==null?void 0:t.backend)==null?void 0:i.name)==null?void 0:r.indexOf("Locize"))>0||((n=(c=(a=(s=e==null?void 0:e.modules)==null?void 0:s.backend)==null?void 0:a.constructor)==null?void 0:c.name)==null?void 0:n.indexOf("Locize"))>0||(d=(o=e==null?void 0:e.options)==null?void 0:o.backend)!=null&&d.backends&&e.options.backend.backends.some(v=>{var f,g,S;return((f=v==null?void 0:v.name)==null?void 0:f.indexOf("Locize"))>0||((S=(g=v==null?void 0:v.constructor)==null?void 0:g.name)==null?void 0:S.indexOf("Locize"))>0}))};class Hn extends kl{constructor(t={},i){if(super(),this.options=x_(t),this.services={},this.logger=li,this.modules={external:[]},h5(this),i&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,i),this;setTimeout(()=>{this.init(t,i)},0)}}init(t={},i){this.isInitializing=!0,typeof t=="function"&&(i=t,t={}),t.defaultNS==null&&t.ns&&(se(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=Mc();this.options={...r,...this.options,...x_(t)},this.options.interpolation={...r.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!f5(this)&&typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is maintained with support from locize.com — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙");const s=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?li.init(s(this.modules.logger),this.options):li.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:d=l5;const v=new S_(this.options);this.store=new p_(this.options.resources,this.options);const f=this.services;f.logger=li,f.resourceStore=this.store,f.languageUtils=v,f.pluralResolver=new n5(v,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),d&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(f.formatter=s(d),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new w_(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new u5(s(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(S,...C)=>{this.emit(S,...C)}),this.modules.languageDetector&&(f.languageDetector=s(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=s(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new il(this.services,this.options),this.translator.on("*",(S,...C)=>{this.emit(S,...C)}),this.modules.external.forEach(S=>{S.init&&S.init(this)})}if(this.format=this.options.interpolation.format,i||(i=$a),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=(...v)=>this.store[d](...v)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=(...v)=>(this.store[d](...v),this)});const n=dn(),o=()=>{const d=(v,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),n.resolve(f),i(v,f)};if(this.languages&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initAsync?o():setTimeout(o,0),n}loadResources(t,i=$a){var a,c;let r=i;const s=se(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const n=[],o=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(f=>{f!=="cimode"&&n.indexOf(f)<0&&n.push(f)})};s?o(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(v=>o(v)),(c=(a=this.options.preload)==null?void 0:a.forEach)==null||c.call(a,d=>o(d)),this.services.backendConnector.load(n,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(d)})}else r(null)}reloadResources(t,i,r){const s=dn();return typeof t=="function"&&(r=t,t=void 0),typeof i=="function"&&(r=i,i=void 0),t||(t=this.languages),i||(i=this.options.ns),r||(r=$a),this.services.backendConnector.reload(t,i,a=>{s.resolve(),r(a)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&$m.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let i=0;i<this.languages.length;i++){const r=this.languages[i];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,i){this.isLanguageChangingTo=t;const r=dn();this.emit("languageChanging",t);const s=n=>{this.language=n,this.languages=this.services.languageUtils.toResolveHierarchy(n),this.resolvedLanguage=void 0,this.setResolvedLanguage(n)},a=(n,o)=>{o?this.isLanguageChangingTo===t&&(s(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,r.resolve((...d)=>this.t(...d)),i&&i(n,(...d)=>this.t(...d))},c=n=>{var v,f;!t&&!n&&this.services.languageDetector&&(n=[]);const o=se(n)?n:n&&n[0],d=this.store.hasLanguageSomeTranslations(o)?o:this.services.languageUtils.getBestMatchFromCodes(se(n)?[n]:n);d&&(this.language||s(d),this.translator.language||this.translator.changeLanguage(d),(f=(v=this.services.languageDetector)==null?void 0:v.cacheUserLanguage)==null||f.call(v,d)),this.loadResources(d,g=>{a(g,d)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(t),r}getFixedT(t,i,r){const s=(a,c,...n)=>{let o;typeof c!="object"?o=this.options.overloadTranslationOptionHandler([a,c].concat(n)):o={...c},o.lng=o.lng||s.lng,o.lngs=o.lngs||s.lngs,o.ns=o.ns||s.ns,o.keyPrefix!==""&&(o.keyPrefix=o.keyPrefix||r||s.keyPrefix);const d=this.options.keySeparator||".";let v;return o.keyPrefix&&Array.isArray(a)?v=a.map(f=>(typeof f=="function"&&(f=Xu(f,{...this.options,...c})),`${o.keyPrefix}${d}${f}`)):(typeof a=="function"&&(a=Xu(a,{...this.options,...c})),v=o.keyPrefix?`${o.keyPrefix}${d}${a}`:a),this.t(v,o)};return se(t)?s.lng=t:s.lngs=t,s.ns=i,s.keyPrefix=r,s}t(...t){var i;return(i=this.translator)==null?void 0:i.translate(...t)}exists(...t){var i;return(i=this.translator)==null?void 0:i.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,i={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=i.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const c=(n,o)=>{const d=this.services.backendConnector.state[`${n}|${o}`];return d===-1||d===0||d===2};if(i.precheck){const n=i.precheck(this,c);if(n!==void 0)return n}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(r,t)&&(!s||c(a,t)))}loadNamespaces(t,i){const r=dn();return this.options.ns?(se(t)&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),i&&i(s)}),r):(i&&i(),Promise.resolve())}loadLanguages(t,i){const r=dn();se(t)&&(t=[t]);const s=this.options.preload||[],a=t.filter(c=>s.indexOf(c)<0&&this.services.languageUtils.isSupportedCode(c));return a.length?(this.options.preload=s.concat(a),this.loadResources(c=>{r.resolve(),i&&i(c)}),r):(i&&i(),Promise.resolve())}dir(t){var s,a;if(t||(t=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const c=new Intl.Locale(t);if(c&&c.getTextInfo){const n=c.getTextInfo();if(n&&n.direction)return n.direction}}catch{}const i=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((a=this.services)==null?void 0:a.languageUtils)||new S_(Mc());return t.toLowerCase().indexOf("-latn")>1?"ltr":i.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},i){const r=new Hn(t,i);return r.createInstance=Hn.createInstance,r}cloneInstance(t={},i=$a){const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},a=new Hn(s);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(n=>{a[n]=this[n]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r){const n=Object.keys(this.store.data).reduce((o,d)=>(o[d]={...this.store.data[d]},o[d]=Object.keys(o[d]).reduce((v,f)=>(v[f]={...o[d][f]},v),o[d]),o),{});a.store=new p_(n,s),a.services.resourceStore=a.store}if(t.interpolation){const o={...Mc().interpolation,...this.options.interpolation,...t.interpolation},d={...s,interpolation:o};a.services.interpolator=new w_(d)}return a.translator=new il(a.services,s),a.translator.on("*",(n,...o)=>{a.emit(n,...o)}),a.init(s,i),a.translator.options=s,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const nt=Hn.createInstance();nt.createInstance;nt.dir;nt.init;nt.loadResources;nt.reloadResources;nt.use;nt.changeLanguage;nt.getFixedT;nt.t;nt.exists;nt.setDefaultNamespace;nt.hasLoadedNamespace;nt.loadNamespaces;nt.loadLanguages;const d5=(e,t,i,r)=>{var a,c,n,o;const s=[i,{code:t,...r||{}}];if((c=(a=e==null?void 0:e.services)==null?void 0:a.logger)!=null&&c.forward)return e.services.logger.forward(s,"warn","react-i18next::",!0);Ir(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(o=(n=e==null?void 0:e.services)==null?void 0:n.logger)!=null&&o.warn?e.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},A_={},Wm=(e,t,i,r)=>{Ir(i)&&A_[i]||(Ir(i)&&(A_[i]=new Date),d5(e,t,i,r))},Vm=(e,t)=>()=>{if(e.isInitialized)t();else{const i=()=>{setTimeout(()=>{e.off("initialized",i)},0),t()};e.on("initialized",i)}},Zu=(e,t,i)=>{e.loadNamespaces(t,Vm(e,i))},L_=(e,t,i,r)=>{if(Ir(i)&&(i=[i]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Zu(e,i,r);i.forEach(s=>{e.options.ns.indexOf(s)<0&&e.options.ns.push(s)}),e.loadLanguages(t,Vm(e,r))},_5=(e,t,i={})=>!t.languages||!t.languages.length?(Wm(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:i.lng,precheck:(r,s)=>{if(i.bindI18n&&i.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!s(r.isLanguageChangingTo,e))return!1}}),Ir=e=>typeof e=="string",v5=e=>typeof e=="object"&&e!==null,g5=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,p5={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},m5=e=>p5[e],S5=e=>e.replace(g5,m5);let Qu={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:S5,transDefaultProps:void 0};const y5=(e={})=>{Qu={...Qu,...e}},b5=()=>Qu;let Gm;const C5=e=>{Gm=e},w5=()=>Gm,E5={type:"3rdParty",init(e){y5(e.options.react),C5(e)}},x5=I.createContext();class A5{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(i=>{this.usedNamespaces[i]||(this.usedNamespaces[i]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const L5=(e,t)=>Ir(t)?t:v5(t)&&Ir(t.defaultValue)?t.defaultValue:Array.isArray(e)?e[e.length-1]:e,O5={t:L5,ready:!1},R5=()=>()=>{},_f=(e,t={})=>{var x,A,O;const{i18n:i}=t,{i18n:r,defaultNS:s}=I.useContext(x5)||{},a=i||r||w5();a&&!a.reportNamespaces&&(a.reportNamespaces=new A5),a||Wm(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const c=I.useMemo(()=>{var R;return{...b5(),...(R=a==null?void 0:a.options)==null?void 0:R.react,...t}},[a,t]),{useSuspense:n,keyPrefix:o}=c,d=s||((x=a==null?void 0:a.options)==null?void 0:x.defaultNS),v=Ir(d)?[d]:d||["translation"],f=I.useMemo(()=>v,v);(O=(A=a==null?void 0:a.reportNamespaces)==null?void 0:A.addUsedNamespaces)==null||O.call(A,f);const g=I.useRef(0),S=I.useCallback(R=>{if(!a)return R5;const{bindI18n:D,bindI18nStore:B}=c,U=()=>{g.current+=1,R()};return D&&a.on(D,U),B&&a.store.on(B,U),()=>{D&&D.split(" ").forEach(N=>a.off(N,U)),B&&B.split(" ").forEach(N=>a.store.off(N,U))}},[a,c]),C=I.useRef(),p=I.useCallback(()=>{if(!a)return O5;const R=!!(a.isInitialized||a.initializedStoreOnce)&&f.every(z=>_5(z,a,c)),D=t.lng||a.language,B=g.current,U=C.current;if(U&&U.ready===R&&U.lng===D&&U.keyPrefix===o&&U.revision===B)return U;const P={t:a.getFixedT(D,c.nsMode==="fallback"?f:f[0],o),ready:R,lng:D,keyPrefix:o,revision:B};return C.current=P,P},[a,f,o,c,t.lng]),[h,_]=I.useState(0),{t:l,ready:u}=jm.useSyncExternalStore(S,p,p);I.useEffect(()=>{if(a&&!u&&!n){const R=()=>_(D=>D+1);t.lng?L_(a,t.lng,f,R):Zu(a,f,R)}},[a,t.lng,f,u,n,h]);const m=a||{},w=I.useRef(null),y=I.useRef(),E=R=>{const D=Object.getOwnPropertyDescriptors(R);D.__original&&delete D.__original;const B=Object.create(Object.getPrototypeOf(R),D);if(!Object.prototype.hasOwnProperty.call(B,"__original"))try{Object.defineProperty(B,"__original",{value:R,writable:!1,enumerable:!1,configurable:!1})}catch{}return B},b=I.useMemo(()=>{const R=m,D=R==null?void 0:R.language;let B=R;R&&(w.current&&w.current.__original===R?y.current!==D?(B=E(R),w.current=B,y.current=D):B=w.current:(B=E(R),w.current=B,y.current=D));const U=[l,B,u];return U.t=l,U.i18n=B,U.ready=u,U},[l,m,u,m.resolvedLanguage,m.language,m.languages]);if(a&&n&&!u)throw new Promise(R=>{const D=()=>R();t.lng?L_(a,t.lng,f,D):Zu(a,f,D)});return b};var Ju={exports:{}},eh={exports:{}};(function(e,t){t=function(r){return r.replace(i,"/")};var i=/[\\/]+/g;e.exports=t})(eh,eh.exports);var D5=eh.exports;(function(e,t){var i=D5;t=function(r){return r=i(r),r[0]!=="/"&&(r="/".concat(r)),encodeURI("file://".concat(r)).replace(/[?#]/g,encodeURIComponent)},e.exports=t})(Ju,Ju.exports);var M5=Ju.exports;const Km=rh(M5);class T5{constructor(){Fi(this,"apps",[]);Fi(this,"loading",!1);Fi(this,"sessions",new Map);Fi(this,"activeSessionId",null);Fi(this,"dialogApp",null);Fi(this,"isDark",!1);Fi(this,"pollTimers",new Map);uC(this),this.initTheme()}async initTheme(){const t=await tinker.getTheme();this.isDark=t==="dark",tinker.on("changeTheme",async()=>{const i=await tinker.getTheme();this.isDark=i==="dark"})}async loadApps(){this.loading=!0;try{const t=await tinker.getApps();this.apps=t.filter(i=>electronDebug.isElectronApp(i.path))}finally{this.loading=!1}}openDialog(t){this.dialogApp=t}closeDialog(){this.dialogApp=null}async launchApp(t){const i=`${Date.now()}`,{nodePort:r,windowPort:s}=await electronDebug.launchApp(i,t.path,a=>{Ia(()=>{const c=this.sessions.get(i);c&&(c.log+=a)})},()=>{Ia(()=>{this.sessions.delete(i),this.stopPolling(i),this.activeSessionId===i&&this.selectFirstSession()})});Ia(()=>{this.sessions.set(i,{sessionId:i,appName:t.name,nodePort:r,windowPort:s,log:"",pages:[]}),this.activeSessionId=i}),this.startPolling(i,r,s)}startPolling(t,i,r){const s=async()=>{const[c,n]=await Promise.all([electronDebug.getPages(i),electronDebug.getPages(r)]);Ia(()=>{const o=this.sessions.get(t);if(o){const d=[...c,...n].filter(f=>!f.url.startsWith("devtools://"));(d.length!==o.pages.length||d.some((f,g)=>f.id!==o.pages[g].id))&&(o.pages=d)}})},a=setInterval(s,2e3);this.pollTimers.set(t,a),s()}stopPolling(t){const i=this.pollTimers.get(t);i&&(clearInterval(i),this.pollTimers.delete(t))}setActiveSession(t){this.activeSessionId=t}stopSession(t){electronDebug.stopApp(t),this.sessions.delete(t),this.stopPolling(t),this.activeSessionId===t&&this.selectFirstSession()}stopAllSessions(){for(const t of this.sessions.keys())electronDebug.stopApp(t),this.stopPolling(t);this.sessions.clear(),this.activeSessionId=null}selectFirstSession(){this.activeSessionId=[...this.sessions.keys()][0]??null}get activeSession(){return this.activeSessionId?this.sessions.get(this.activeSessionId)??null:null}}const St=new T5,O_={light:{background:"#fafaf9",foreground:"#1c1917"},dark:{background:"#0c0a09",foreground:"#d6d3d1"}},He={background:{app:"bg-stone-50 dark:bg-stone-900",toolbar:"bg-white dark:bg-stone-800",term:"bg-white dark:bg-stone-950"},text:{primary:"text-stone-900 dark:text-stone-100",secondary:"text-stone-500 dark:text-stone-400",muted:"text-stone-400 dark:text-stone-600"},pageType:{node:"bg-lime-100 text-lime-700 dark:bg-lime-950 dark:text-lime-400",page:"bg-sky-100 text-sky-700 dark:bg-sky-950 dark:text-sky-400",other:"bg-stone-100 text-stone-500 dark:bg-stone-800 dark:text-stone-400"},border:{divider:"border-stone-200 dark:border-stone-800",statusIndicator:"border-white dark:border-stone-900"},button:{inspect:"text-cyan-600 dark:text-cyan-400 bg-cyan-50 dark:bg-cyan-950/60 border border-cyan-200 dark:border-cyan-800 hover:bg-cyan-500 dark:hover:bg-cyan-500 hover:text-white dark:hover:text-white hover:border-transparent"}};function fr(e,t,{checkForDefaultPrevented:i=!0}={}){return function(s){if(e==null||e(s),i===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function R_(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ym(...e){return t=>{let i=!1;const r=e.map(s=>{const a=R_(s,t);return!i&&typeof a=="function"&&(i=!0),a});if(i)return()=>{for(let s=0;s<r.length;s++){const a=r[s];typeof a=="function"?a():R_(e[s],null)}}}}function Qr(...e){return I.useCallback(Ym(...e),e)}function B5(e,t){const i=I.createContext(t),r=a=>{const{children:c,...n}=a,o=I.useMemo(()=>n,Object.values(n));return G.jsx(i.Provider,{value:o,children:c})};r.displayName=e+"Provider";function s(a){const c=I.useContext(i);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,s]}function k5(e,t=[]){let i=[];function r(a,c){const n=I.createContext(c),o=i.length;i=[...i,c];const d=f=>{var _;const{scope:g,children:S,...C}=f,p=((_=g==null?void 0:g[e])==null?void 0:_[o])||n,h=I.useMemo(()=>C,Object.values(C));return G.jsx(p.Provider,{value:h,children:S})};d.displayName=a+"Provider";function v(f,g){var p;const S=((p=g==null?void 0:g[e])==null?void 0:p[o])||n,C=I.useContext(S);if(C)return C;if(c!==void 0)return c;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[d,v]}const s=()=>{const a=i.map(c=>I.createContext(c));return function(n){const o=(n==null?void 0:n[e])||a;return I.useMemo(()=>({[`__scope${e}`]:{...n,[e]:o}}),[n,o])}};return s.scopeName=e,[r,N5(s,...t)]}function N5(...e){const t=e[0];if(e.length===1)return t;const i=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(a){const c=r.reduce((n,{useScope:o,scopeName:d})=>{const f=o(a)[`__scope${d}`];return{...n,...f}},{});return I.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return i.scopeName=t.scopeName,i}var ea=globalThis!=null&&globalThis.document?I.useLayoutEffect:()=>{},H5=tv[" useId ".trim().toString()]||(()=>{}),z5=0;function Tc(e){const[t,i]=I.useState(H5());return ea(()=>{i(r=>r??String(z5++))},[e]),e||(t?`radix-${t}`:"")}var P5=tv[" useInsertionEffect ".trim().toString()]||ea;function U5({prop:e,defaultProp:t,onChange:i=()=>{},caller:r}){const[s,a,c]=j5({defaultProp:t,onChange:i}),n=e!==void 0,o=n?e:s;{const v=I.useRef(e!==void 0);I.useEffect(()=>{const f=v.current;f!==n&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${n?"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.`),v.current=n},[n,r])}const d=I.useCallback(v=>{var f;if(n){const g=I5(v)?v(e):v;g!==e&&((f=c.current)==null||f.call(c,g))}else a(v)},[n,e,a,c]);return[o,d]}function j5({defaultProp:e,onChange:t}){const[i,r]=I.useState(e),s=I.useRef(i),a=I.useRef(t);return P5(()=>{a.current=t},[t]),I.useEffect(()=>{var c;s.current!==i&&((c=a.current)==null||c.call(a,i),s.current=i)},[i,s]),[i,r,a]}function I5(e){return typeof e=="function"}function Xm(e){const t=F5(e),i=I.forwardRef((r,s)=>{const{children:a,...c}=r,n=I.Children.toArray(a),o=n.find(q5);if(o){const d=o.props.children,v=n.map(f=>f===o?I.Children.count(d)>1?I.Children.only(null):I.isValidElement(d)?d.props.children:null:f);return G.jsx(t,{...c,ref:s,children:I.isValidElement(d)?I.cloneElement(d,void 0,v):null})}return G.jsx(t,{...c,ref:s,children:a})});return i.displayName=`${e}.Slot`,i}function F5(e){const t=I.forwardRef((i,r)=>{const{children:s,...a}=i;if(I.isValidElement(s)){const c=V5(s),n=W5(a,s.props);return s.type!==I.Fragment&&(n.ref=r?Ym(r,c):c),I.cloneElement(s,n)}return I.Children.count(s)>1?I.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $5=Symbol("radix.slottable");function q5(e){return I.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$5}function W5(e,t){const i={...t};for(const r in t){const s=e[r],a=t[r];/^on[A-Z]/.test(r)?s&&a?i[r]=(...n)=>{const o=a(...n);return s(...n),o}:s&&(i[r]=s):r==="style"?i[r]={...s,...a}:r==="className"&&(i[r]=[s,a].filter(Boolean).join(" "))}return{...e,...i}}function V5(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,i=t&&"isReactWarning"in t&&t.isReactWarning;return i?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,i=t&&"isReactWarning"in t&&t.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}var G5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ii=G5.reduce((e,t)=>{const i=Xm(`Primitive.${t}`),r=I.forwardRef((s,a)=>{const{asChild:c,...n}=s,o=c?i:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),G.jsx(o,{...n,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function K5(e,t){e&&ol.flushSync(()=>e.dispatchEvent(t))}function ta(e){const t=I.useRef(e);return I.useEffect(()=>{t.current=e}),I.useMemo(()=>(...i)=>{var r;return(r=t.current)==null?void 0:r.call(t,...i)},[])}function Y5(e,t=globalThis==null?void 0:globalThis.document){const i=ta(e);I.useEffect(()=>{const r=s=>{s.key==="Escape"&&i(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[i,t])}var X5="DismissableLayer",th="dismissableLayer.update",Z5="dismissableLayer.pointerDownOutside",Q5="dismissableLayer.focusOutside",D_,Zm=I.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qm=I.forwardRef((e,t)=>{const{disableOutsidePointerEvents:i=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:c,onDismiss:n,...o}=e,d=I.useContext(Zm),[v,f]=I.useState(null),g=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=I.useState({}),C=Qr(t,E=>f(E)),p=Array.from(d.layers),[h]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),_=p.indexOf(h),l=v?p.indexOf(v):-1,u=d.layersWithOutsidePointerEventsDisabled.size>0,m=l>=_,w=tw(E=>{const b=E.target,x=[...d.branches].some(A=>A.contains(b));!m||x||(s==null||s(E),c==null||c(E),E.defaultPrevented||n==null||n())},g),y=iw(E=>{const b=E.target;[...d.branches].some(A=>A.contains(b))||(a==null||a(E),c==null||c(E),E.defaultPrevented||n==null||n())},g);return Y5(E=>{l===d.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&n&&(E.preventDefault(),n()))},g),I.useEffect(()=>{if(v)return i&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(D_=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(v)),d.layers.add(v),M_(),()=>{i&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=D_)}},[v,g,i,d]),I.useEffect(()=>()=>{v&&(d.layers.delete(v),d.layersWithOutsidePointerEventsDisabled.delete(v),M_())},[v,d]),I.useEffect(()=>{const E=()=>S({});return document.addEventListener(th,E),()=>document.removeEventListener(th,E)},[]),G.jsx(Ii.div,{...o,ref:C,style:{pointerEvents:u?m?"auto":"none":void 0,...e.style},onFocusCapture:fr(e.onFocusCapture,y.onFocusCapture),onBlurCapture:fr(e.onBlurCapture,y.onBlurCapture),onPointerDownCapture:fr(e.onPointerDownCapture,w.onPointerDownCapture)})});Qm.displayName=X5;var J5="DismissableLayerBranch",ew=I.forwardRef((e,t)=>{const i=I.useContext(Zm),r=I.useRef(null),s=Qr(t,r);return I.useEffect(()=>{const a=r.current;if(a)return i.branches.add(a),()=>{i.branches.delete(a)}},[i.branches]),G.jsx(Ii.div,{...e,ref:s})});ew.displayName=J5;function tw(e,t=globalThis==null?void 0:globalThis.document){const i=ta(e),r=I.useRef(!1),s=I.useRef(()=>{});return I.useEffect(()=>{const a=n=>{if(n.target&&!r.current){let o=function(){Jm(Z5,i,d,{discrete:!0})};const d={originalEvent:n};n.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=o,t.addEventListener("click",s.current,{once:!0})):o()}else t.removeEventListener("click",s.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",a),t.removeEventListener("click",s.current)}},[t,i]),{onPointerDownCapture:()=>r.current=!0}}function iw(e,t=globalThis==null?void 0:globalThis.document){const i=ta(e),r=I.useRef(!1);return I.useEffect(()=>{const s=a=>{a.target&&!r.current&&Jm(Q5,i,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,i]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function M_(){const e=new CustomEvent(th);document.dispatchEvent(e)}function Jm(e,t,i,{discrete:r}){const s=i.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:i});t&&s.addEventListener(e,t,{once:!0}),r?K5(s,a):s.dispatchEvent(a)}var Bc="focusScope.autoFocusOnMount",kc="focusScope.autoFocusOnUnmount",T_={bubbles:!1,cancelable:!0},rw="FocusScope",e0=I.forwardRef((e,t)=>{const{loop:i=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...c}=e,[n,o]=I.useState(null),d=ta(s),v=ta(a),f=I.useRef(null),g=Qr(t,p=>o(p)),S=I.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;I.useEffect(()=>{if(r){let p=function(u){if(S.paused||!n)return;const m=u.target;n.contains(m)?f.current=m:qi(f.current,{select:!0})},h=function(u){if(S.paused||!n)return;const m=u.relatedTarget;m!==null&&(n.contains(m)||qi(f.current,{select:!0}))},_=function(u){if(document.activeElement===document.body)for(const w of u)w.removedNodes.length>0&&qi(n)};document.addEventListener("focusin",p),document.addEventListener("focusout",h);const l=new MutationObserver(_);return n&&l.observe(n,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",h),l.disconnect()}}},[r,n,S.paused]),I.useEffect(()=>{if(n){k_.add(S);const p=document.activeElement;if(!n.contains(p)){const _=new CustomEvent(Bc,T_);n.addEventListener(Bc,d),n.dispatchEvent(_),_.defaultPrevented||(sw(cw(t0(n)),{select:!0}),document.activeElement===p&&qi(n))}return()=>{n.removeEventListener(Bc,d),setTimeout(()=>{const _=new CustomEvent(kc,T_);n.addEventListener(kc,v),n.dispatchEvent(_),_.defaultPrevented||qi(p??document.body,{select:!0}),n.removeEventListener(kc,v),k_.remove(S)},0)}}},[n,d,v,S]);const C=I.useCallback(p=>{if(!i&&!r||S.paused)return;const h=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,_=document.activeElement;if(h&&_){const l=p.currentTarget,[u,m]=nw(l);u&&m?!p.shiftKey&&_===m?(p.preventDefault(),i&&qi(u,{select:!0})):p.shiftKey&&_===u&&(p.preventDefault(),i&&qi(m,{select:!0})):_===l&&p.preventDefault()}},[i,r,S.paused]);return G.jsx(Ii.div,{tabIndex:-1,...c,ref:g,onKeyDown:C})});e0.displayName=rw;function sw(e,{select:t=!1}={}){const i=document.activeElement;for(const r of e)if(qi(r,{select:t}),document.activeElement!==i)return}function nw(e){const t=t0(e),i=B_(t,e),r=B_(t.reverse(),e);return[i,r]}function t0(e){const t=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;i.nextNode();)t.push(i.currentNode);return t}function B_(e,t){for(const i of e)if(!aw(i,{upTo:t}))return i}function aw(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ow(e){return e instanceof HTMLInputElement&&"select"in e}function qi(e,{select:t=!1}={}){if(e&&e.focus){const i=document.activeElement;e.focus({preventScroll:!0}),e!==i&&ow(e)&&t&&e.select()}}var k_=lw();function lw(){let e=[];return{add(t){const i=e[0];t!==i&&(i==null||i.pause()),e=N_(e,t),e.unshift(t)},remove(t){var i;e=N_(e,t),(i=e[0])==null||i.resume()}}}function N_(e,t){const i=[...e],r=i.indexOf(t);return r!==-1&&i.splice(r,1),i}function cw(e){return e.filter(t=>t.tagName!=="A")}var uw="Portal",i0=I.forwardRef((e,t)=>{var n;const{container:i,...r}=e,[s,a]=I.useState(!1);ea(()=>a(!0),[]);const c=i||s&&((n=globalThis==null?void 0:globalThis.document)==null?void 0:n.body);return c?nS.createPortal(G.jsx(Ii.div,{...r,ref:t}),c):null});i0.displayName=uw;function hw(e,t){return I.useReducer((i,r)=>t[i][r]??i,e)}var Nl=e=>{const{present:t,children:i}=e,r=fw(t),s=typeof i=="function"?i({present:r.isPresent}):I.Children.only(i),a=Qr(r.ref,dw(s));return typeof i=="function"||r.isPresent?I.cloneElement(s,{ref:a}):null};Nl.displayName="Presence";function fw(e){const[t,i]=I.useState(),r=I.useRef(null),s=I.useRef(e),a=I.useRef("none"),c=e?"mounted":"unmounted",[n,o]=hw(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return I.useEffect(()=>{const d=qa(r.current);a.current=n==="mounted"?d:"none"},[n]),ea(()=>{const d=r.current,v=s.current;if(v!==e){const g=a.current,S=qa(d);e?o("MOUNT"):S==="none"||(d==null?void 0:d.display)==="none"?o("UNMOUNT"):o(v&&g!==S?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,o]),ea(()=>{if(t){let d;const v=t.ownerDocument.defaultView??window,f=S=>{const p=qa(r.current).includes(CSS.escape(S.animationName));if(S.target===t&&p&&(o("ANIMATION_END"),!s.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",d=v.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},g=S=>{S.target===t&&(a.current=qa(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{v.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else o("ANIMATION_END")},[t,o]),{isPresent:["mounted","unmountSuspended"].includes(n),ref:I.useCallback(d=>{r.current=d?getComputedStyle(d):null,i(d)},[])}}function qa(e){return(e==null?void 0:e.animationName)||"none"}function dw(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,i=t&&"isReactWarning"in t&&t.isReactWarning;return i?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,i=t&&"isReactWarning"in t&&t.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}var Nc=0;function _w(){I.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??H_()),document.body.insertAdjacentElement("beforeend",e[1]??H_()),Nc++,()=>{Nc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Nc--}},[])}function H_(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ri=function(){return ri=Object.assign||function(t){for(var i,r=1,s=arguments.length;r<s;r++){i=arguments[r];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t},ri.apply(this,arguments)};function r0(e,t){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(i[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(i[r[s]]=e[r[s]]);return i}function vw(e,t,i){if(i||arguments.length===2)for(var r=0,s=t.length,a;r<s;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var _o="right-scroll-bar-position",vo="width-before-scroll-bar",gw="with-scroll-bars-hidden",pw="--removed-body-scroll-bar-size";function Hc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function mw(e,t){var i=I.useState(function(){return{value:e,callback:t,facade:{get current(){return i.value},set current(r){var s=i.value;s!==r&&(i.value=r,i.callback(r,s))}}}})[0];return i.callback=t,i.facade}var Sw=typeof window<"u"?I.useLayoutEffect:I.useEffect,z_=new WeakMap;function yw(e,t){var i=mw(null,function(r){return e.forEach(function(s){return Hc(s,r)})});return Sw(function(){var r=z_.get(i);if(r){var s=new Set(r),a=new Set(e),c=i.current;s.forEach(function(n){a.has(n)||Hc(n,null)}),a.forEach(function(n){s.has(n)||Hc(n,c)})}z_.set(i,e)},[e]),i}function bw(e){return e}function Cw(e,t){t===void 0&&(t=bw);var i=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return i.length?i[i.length-1]:e},useMedium:function(a){var c=t(a,r);return i.push(c),function(){i=i.filter(function(n){return n!==c})}},assignSyncMedium:function(a){for(r=!0;i.length;){var c=i;i=[],c.forEach(a)}i={push:function(n){return a(n)},filter:function(){return i}}},assignMedium:function(a){r=!0;var c=[];if(i.length){var n=i;i=[],n.forEach(a),c=i}var o=function(){var v=c;c=[],v.forEach(a)},d=function(){return Promise.resolve().then(o)};d(),i={push:function(v){c.push(v),d()},filter:function(v){return c=c.filter(v),i}}}};return s}function ww(e){e===void 0&&(e={});var t=Cw(null);return t.options=ri({async:!0,ssr:!1},e),t}var s0=function(e){var t=e.sideCar,i=r0(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return I.createElement(r,ri({},i))};s0.isSideCarExport=!0;function Ew(e,t){return e.useMedium(t),s0}var n0=ww(),zc=function(){},Hl=I.forwardRef(function(e,t){var i=I.useRef(null),r=I.useState({onScrollCapture:zc,onWheelCapture:zc,onTouchMoveCapture:zc}),s=r[0],a=r[1],c=e.forwardProps,n=e.children,o=e.className,d=e.removeScrollBar,v=e.enabled,f=e.shards,g=e.sideCar,S=e.noRelative,C=e.noIsolation,p=e.inert,h=e.allowPinchZoom,_=e.as,l=_===void 0?"div":_,u=e.gapMode,m=r0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=g,y=yw([i,t]),E=ri(ri({},m),s);return I.createElement(I.Fragment,null,v&&I.createElement(w,{sideCar:n0,removeScrollBar:d,shards:f,noRelative:S,noIsolation:C,inert:p,setCallbacks:a,allowPinchZoom:!!h,lockRef:i,gapMode:u}),c?I.cloneElement(I.Children.only(n),ri(ri({},E),{ref:y})):I.createElement(l,ri({},E,{className:o,ref:y}),n))});Hl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Hl.classNames={fullWidth:vo,zeroRight:_o};var xw=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Aw(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=xw();return t&&e.setAttribute("nonce",t),e}function Lw(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ow(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Rw=function(){var e=0,t=null;return{add:function(i){e==0&&(t=Aw())&&(Lw(t,i),Ow(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Dw=function(){var e=Rw();return function(t,i){I.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&i])}},a0=function(){var e=Dw(),t=function(i){var r=i.styles,s=i.dynamic;return e(r,s),null};return t},Mw={left:0,top:0,right:0,gap:0},Pc=function(e){return parseInt(e||"",10)||0},Tw=function(e){var t=window.getComputedStyle(document.body),i=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Pc(i),Pc(r),Pc(s)]},Bw=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Mw;var t=Tw(e),i=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-i+t[2]-t[0])}},kw=a0(),Ts="data-scroll-locked",Nw=function(e,t,i,r){var s=e.left,a=e.top,c=e.right,n=e.gap;return i===void 0&&(i="margin"),`
60
+ .`.concat(gw,` {
61
+ overflow: hidden `).concat(r,`;
62
+ padding-right: `).concat(n,"px ").concat(r,`;
63
+ }
64
+ body[`).concat(Ts,`] {
65
+ overflow: hidden `).concat(r,`;
66
+ overscroll-behavior: contain;
67
+ `).concat([t&&"position: relative ".concat(r,";"),i==="margin"&&`
68
+ padding-left: `.concat(s,`px;
69
+ padding-top: `).concat(a,`px;
70
+ padding-right: `).concat(c,`px;
71
+ margin-left:0;
72
+ margin-top:0;
73
+ margin-right: `).concat(n,"px ").concat(r,`;
74
+ `),i==="padding"&&"padding-right: ".concat(n,"px ").concat(r,";")].filter(Boolean).join(""),`
75
+ }
76
+
77
+ .`).concat(_o,` {
78
+ right: `).concat(n,"px ").concat(r,`;
79
+ }
80
+
81
+ .`).concat(vo,` {
82
+ margin-right: `).concat(n,"px ").concat(r,`;
83
+ }
84
+
85
+ .`).concat(_o," .").concat(_o,` {
86
+ right: 0 `).concat(r,`;
87
+ }
88
+
89
+ .`).concat(vo," .").concat(vo,` {
90
+ margin-right: 0 `).concat(r,`;
91
+ }
92
+
93
+ body[`).concat(Ts,`] {
94
+ `).concat(pw,": ").concat(n,`px;
95
+ }
96
+ `)},P_=function(){var e=parseInt(document.body.getAttribute(Ts)||"0",10);return isFinite(e)?e:0},Hw=function(){I.useEffect(function(){return document.body.setAttribute(Ts,(P_()+1).toString()),function(){var e=P_()-1;e<=0?document.body.removeAttribute(Ts):document.body.setAttribute(Ts,e.toString())}},[])},zw=function(e){var t=e.noRelative,i=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;Hw();var a=I.useMemo(function(){return Bw(s)},[s]);return I.createElement(kw,{styles:Nw(a,!t,s,i?"":"!important")})},ih=!1;if(typeof window<"u")try{var Wa=Object.defineProperty({},"passive",{get:function(){return ih=!0,!0}});window.addEventListener("test",Wa,Wa),window.removeEventListener("test",Wa,Wa)}catch{ih=!1}var ss=ih?{passive:!1}:!1,Pw=function(e){return e.tagName==="TEXTAREA"},o0=function(e,t){if(!(e instanceof Element))return!1;var i=window.getComputedStyle(e);return i[t]!=="hidden"&&!(i.overflowY===i.overflowX&&!Pw(e)&&i[t]==="visible")},Uw=function(e){return o0(e,"overflowY")},jw=function(e){return o0(e,"overflowX")},U_=function(e,t){var i=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=l0(e,r);if(s){var a=c0(e,r),c=a[1],n=a[2];if(c>n)return!0}r=r.parentNode}while(r&&r!==i.body);return!1},Iw=function(e){var t=e.scrollTop,i=e.scrollHeight,r=e.clientHeight;return[t,i,r]},Fw=function(e){var t=e.scrollLeft,i=e.scrollWidth,r=e.clientWidth;return[t,i,r]},l0=function(e,t){return e==="v"?Uw(t):jw(t)},c0=function(e,t){return e==="v"?Iw(t):Fw(t)},$w=function(e,t){return e==="h"&&t==="rtl"?-1:1},qw=function(e,t,i,r,s){var a=$w(e,window.getComputedStyle(t).direction),c=a*r,n=i.target,o=t.contains(n),d=!1,v=c>0,f=0,g=0;do{if(!n)break;var S=c0(e,n),C=S[0],p=S[1],h=S[2],_=p-h-a*C;(C||_)&&l0(e,n)&&(f+=_,g+=C);var l=n.parentNode;n=l&&l.nodeType===Node.DOCUMENT_FRAGMENT_NODE?l.host:l}while(!o&&n!==document.body||o&&(t.contains(n)||t===n));return(v&&Math.abs(f)<1||!v&&Math.abs(g)<1)&&(d=!0),d},Va=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},j_=function(e){return[e.deltaX,e.deltaY]},I_=function(e){return e&&"current"in e?e.current:e},Ww=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Vw=function(e){return`
97
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
98
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
99
+ `)},Gw=0,ns=[];function Kw(e){var t=I.useRef([]),i=I.useRef([0,0]),r=I.useRef(),s=I.useState(Gw++)[0],a=I.useState(a0)[0],c=I.useRef(e);I.useEffect(function(){c.current=e},[e]),I.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var p=vw([e.lockRef.current],(e.shards||[]).map(I_),!0).filter(Boolean);return p.forEach(function(h){return h.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),p.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var n=I.useCallback(function(p,h){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!c.current.allowPinchZoom;var _=Va(p),l=i.current,u="deltaX"in p?p.deltaX:l[0]-_[0],m="deltaY"in p?p.deltaY:l[1]-_[1],w,y=p.target,E=Math.abs(u)>Math.abs(m)?"h":"v";if("touches"in p&&E==="h"&&y.type==="range")return!1;var b=window.getSelection(),x=b&&b.anchorNode,A=x?x===y||x.contains(y):!1;if(A)return!1;var O=U_(E,y);if(!O)return!0;if(O?w=E:(w=E==="v"?"h":"v",O=U_(E,y)),!O)return!1;if(!r.current&&"changedTouches"in p&&(u||m)&&(r.current=w),!w)return!0;var R=r.current||w;return qw(R,h,p,R==="h"?u:m)},[]),o=I.useCallback(function(p){var h=p;if(!(!ns.length||ns[ns.length-1]!==a)){var _="deltaY"in h?j_(h):Va(h),l=t.current.filter(function(w){return w.name===h.type&&(w.target===h.target||h.target===w.shadowParent)&&Ww(w.delta,_)})[0];if(l&&l.should){h.cancelable&&h.preventDefault();return}if(!l){var u=(c.current.shards||[]).map(I_).filter(Boolean).filter(function(w){return w.contains(h.target)}),m=u.length>0?n(h,u[0]):!c.current.noIsolation;m&&h.cancelable&&h.preventDefault()}}},[]),d=I.useCallback(function(p,h,_,l){var u={name:p,delta:h,target:_,should:l,shadowParent:Yw(_)};t.current.push(u),setTimeout(function(){t.current=t.current.filter(function(m){return m!==u})},1)},[]),v=I.useCallback(function(p){i.current=Va(p),r.current=void 0},[]),f=I.useCallback(function(p){d(p.type,j_(p),p.target,n(p,e.lockRef.current))},[]),g=I.useCallback(function(p){d(p.type,Va(p),p.target,n(p,e.lockRef.current))},[]);I.useEffect(function(){return ns.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:g}),document.addEventListener("wheel",o,ss),document.addEventListener("touchmove",o,ss),document.addEventListener("touchstart",v,ss),function(){ns=ns.filter(function(p){return p!==a}),document.removeEventListener("wheel",o,ss),document.removeEventListener("touchmove",o,ss),document.removeEventListener("touchstart",v,ss)}},[]);var S=e.removeScrollBar,C=e.inert;return I.createElement(I.Fragment,null,C?I.createElement(a,{styles:Vw(s)}):null,S?I.createElement(zw,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Yw(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Xw=Ew(n0,Kw);var u0=I.forwardRef(function(e,t){return I.createElement(Hl,ri({},e,{ref:t,sideCar:Xw}))});u0.classNames=Hl.classNames;var Zw=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},as=new WeakMap,Ga=new WeakMap,Ka={},Uc=0,h0=function(e){return e&&(e.host||h0(e.parentNode))},Qw=function(e,t){return t.map(function(i){if(e.contains(i))return i;var r=h0(i);return r&&e.contains(r)?r:(console.error("aria-hidden",i,"in not contained inside",e,". Doing nothing"),null)}).filter(function(i){return!!i})},Jw=function(e,t,i,r){var s=Qw(t,Array.isArray(e)?e:[e]);Ka[i]||(Ka[i]=new WeakMap);var a=Ka[i],c=[],n=new Set,o=new Set(s),d=function(f){!f||n.has(f)||(n.add(f),d(f.parentNode))};s.forEach(d);var v=function(f){!f||o.has(f)||Array.prototype.forEach.call(f.children,function(g){if(n.has(g))v(g);else try{var S=g.getAttribute(r),C=S!==null&&S!=="false",p=(as.get(g)||0)+1,h=(a.get(g)||0)+1;as.set(g,p),a.set(g,h),c.push(g),p===1&&C&&Ga.set(g,!0),h===1&&g.setAttribute(i,"true"),C||g.setAttribute(r,"true")}catch(_){console.error("aria-hidden: cannot operate on ",g,_)}})};return v(t),n.clear(),Uc++,function(){c.forEach(function(f){var g=as.get(f)-1,S=a.get(f)-1;as.set(f,g),a.set(f,S),g||(Ga.has(f)||f.removeAttribute(r),Ga.delete(f)),S||f.removeAttribute(i)}),Uc--,Uc||(as=new WeakMap,as=new WeakMap,Ga=new WeakMap,Ka={})}},e2=function(e,t,i){i===void 0&&(i="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=Zw(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),Jw(r,s,i,"aria-hidden")):function(){return null}},zl="Dialog",[f0]=k5(zl),[t2,ei]=f0(zl),d0=e=>{const{__scopeDialog:t,children:i,open:r,defaultOpen:s,onOpenChange:a,modal:c=!0}=e,n=I.useRef(null),o=I.useRef(null),[d,v]=U5({prop:r,defaultProp:s??!1,onChange:a,caller:zl});return G.jsx(t2,{scope:t,triggerRef:n,contentRef:o,contentId:Tc(),titleId:Tc(),descriptionId:Tc(),open:d,onOpenChange:v,onOpenToggle:I.useCallback(()=>v(f=>!f),[v]),modal:c,children:i})};d0.displayName=zl;var _0="DialogTrigger",i2=I.forwardRef((e,t)=>{const{__scopeDialog:i,...r}=e,s=ei(_0,i),a=Qr(t,s.triggerRef);return G.jsx(Ii.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":pf(s.open),...r,ref:a,onClick:fr(e.onClick,s.onOpenToggle)})});i2.displayName=_0;var vf="DialogPortal",[r2,v0]=f0(vf,{forceMount:void 0}),g0=e=>{const{__scopeDialog:t,forceMount:i,children:r,container:s}=e,a=ei(vf,t);return G.jsx(r2,{scope:t,forceMount:i,children:I.Children.map(r,c=>G.jsx(Nl,{present:i||a.open,children:G.jsx(i0,{asChild:!0,container:s,children:c})}))})};g0.displayName=vf;var rl="DialogOverlay",p0=I.forwardRef((e,t)=>{const i=v0(rl,e.__scopeDialog),{forceMount:r=i.forceMount,...s}=e,a=ei(rl,e.__scopeDialog);return a.modal?G.jsx(Nl,{present:r||a.open,children:G.jsx(n2,{...s,ref:t})}):null});p0.displayName=rl;var s2=Xm("DialogOverlay.RemoveScroll"),n2=I.forwardRef((e,t)=>{const{__scopeDialog:i,...r}=e,s=ei(rl,i);return G.jsx(u0,{as:s2,allowPinchZoom:!0,shards:[s.contentRef],children:G.jsx(Ii.div,{"data-state":pf(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Fr="DialogContent",m0=I.forwardRef((e,t)=>{const i=v0(Fr,e.__scopeDialog),{forceMount:r=i.forceMount,...s}=e,a=ei(Fr,e.__scopeDialog);return G.jsx(Nl,{present:r||a.open,children:a.modal?G.jsx(a2,{...s,ref:t}):G.jsx(o2,{...s,ref:t})})});m0.displayName=Fr;var a2=I.forwardRef((e,t)=>{const i=ei(Fr,e.__scopeDialog),r=I.useRef(null),s=Qr(t,i.contentRef,r);return I.useEffect(()=>{const a=r.current;if(a)return e2(a)},[]),G.jsx(S0,{...e,ref:s,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:fr(e.onCloseAutoFocus,a=>{var c;a.preventDefault(),(c=i.triggerRef.current)==null||c.focus()}),onPointerDownOutside:fr(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,n=c.button===0&&c.ctrlKey===!0;(c.button===2||n)&&a.preventDefault()}),onFocusOutside:fr(e.onFocusOutside,a=>a.preventDefault())})}),o2=I.forwardRef((e,t)=>{const i=ei(Fr,e.__scopeDialog),r=I.useRef(!1),s=I.useRef(!1);return G.jsx(S0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var c,n;(c=e.onCloseAutoFocus)==null||c.call(e,a),a.defaultPrevented||(r.current||(n=i.triggerRef.current)==null||n.focus(),a.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:a=>{var o,d;(o=e.onInteractOutside)==null||o.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=a.target;((d=i.triggerRef.current)==null?void 0:d.contains(c))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})}),S0=I.forwardRef((e,t)=>{const{__scopeDialog:i,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,...c}=e,n=ei(Fr,i),o=I.useRef(null),d=Qr(t,o);return _w(),G.jsxs(G.Fragment,{children:[G.jsx(e0,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:a,children:G.jsx(Qm,{role:"dialog",id:n.contentId,"aria-describedby":n.descriptionId,"aria-labelledby":n.titleId,"data-state":pf(n.open),...c,ref:d,onDismiss:()=>n.onOpenChange(!1)})}),G.jsxs(G.Fragment,{children:[G.jsx(c2,{titleId:n.titleId}),G.jsx(h2,{contentRef:o,descriptionId:n.descriptionId})]})]})}),gf="DialogTitle",y0=I.forwardRef((e,t)=>{const{__scopeDialog:i,...r}=e,s=ei(gf,i);return G.jsx(Ii.h2,{id:s.titleId,...r,ref:t})});y0.displayName=gf;var b0="DialogDescription",l2=I.forwardRef((e,t)=>{const{__scopeDialog:i,...r}=e,s=ei(b0,i);return G.jsx(Ii.p,{id:s.descriptionId,...r,ref:t})});l2.displayName=b0;var C0="DialogClose",w0=I.forwardRef((e,t)=>{const{__scopeDialog:i,...r}=e,s=ei(C0,i);return G.jsx(Ii.button,{type:"button",...r,ref:t,onClick:fr(e.onClick,()=>s.onOpenChange(!1))})});w0.displayName=C0;function pf(e){return e?"open":"closed"}var E0="DialogTitleWarning",[X2,x0]=B5(E0,{contentName:Fr,titleName:gf,docsSlug:"dialog"}),c2=({titleId:e})=>{const t=x0(E0),i=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
100
+
101
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
102
+
103
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return I.useEffect(()=>{e&&(document.getElementById(e)||console.error(i))},[i,e]),null},u2="DialogDescriptionWarning",h2=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${x0(u2).contentName}}.`;return I.useEffect(()=>{var a;const s=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},f2=d0,d2=g0,_2=p0,v2=m0,g2=y0,p2=w0;/**
104
+ * @license lucide-react v0.564.0 - ISC
105
+ *
106
+ * This source code is licensed under the ISC license.
107
+ * See the LICENSE file in the root directory of this source tree.
108
+ */const A0=(...e)=>e.filter((t,i,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===i).join(" ").trim();/**
109
+ * @license lucide-react v0.564.0 - ISC
110
+ *
111
+ * This source code is licensed under the ISC license.
112
+ * See the LICENSE file in the root directory of this source tree.
113
+ */const m2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
114
+ * @license lucide-react v0.564.0 - ISC
115
+ *
116
+ * This source code is licensed under the ISC license.
117
+ * See the LICENSE file in the root directory of this source tree.
118
+ */const S2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,i,r)=>r?r.toUpperCase():i.toLowerCase());/**
119
+ * @license lucide-react v0.564.0 - ISC
120
+ *
121
+ * This source code is licensed under the ISC license.
122
+ * See the LICENSE file in the root directory of this source tree.
123
+ */const F_=e=>{const t=S2(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
124
+ * @license lucide-react v0.564.0 - ISC
125
+ *
126
+ * This source code is licensed under the ISC license.
127
+ * See the LICENSE file in the root directory of this source tree.
128
+ */var y2={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"};/**
129
+ * @license lucide-react v0.564.0 - ISC
130
+ *
131
+ * This source code is licensed under the ISC license.
132
+ * See the LICENSE file in the root directory of this source tree.
133
+ */const b2=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
134
+ * @license lucide-react v0.564.0 - ISC
135
+ *
136
+ * This source code is licensed under the ISC license.
137
+ * See the LICENSE file in the root directory of this source tree.
138
+ */const C2=I.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:i=2,absoluteStrokeWidth:r,className:s="",children:a,iconNode:c,...n},o)=>I.createElement("svg",{ref:o,...y2,width:t,height:t,stroke:e,strokeWidth:r?Number(i)*24/Number(t):i,className:A0("lucide",s),...!a&&!b2(n)&&{"aria-hidden":"true"},...n},[...c.map(([d,v])=>I.createElement(d,v)),...Array.isArray(a)?a:[a]]));/**
139
+ * @license lucide-react v0.564.0 - ISC
140
+ *
141
+ * This source code is licensed under the ISC license.
142
+ * See the LICENSE file in the root directory of this source tree.
143
+ */const w2=(e,t)=>{const i=I.forwardRef(({className:r,...s},a)=>I.createElement(C2,{ref:a,iconNode:t,className:A0(`lucide-${m2(F_(e))}`,`lucide-${e}`,r),...s}));return i.displayName=F_(e),i};/**
144
+ * @license lucide-react v0.564.0 - ISC
145
+ *
146
+ * This source code is licensed under the ISC license.
147
+ * See the LICENSE file in the root directory of this source tree.
148
+ */const E2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],x2=w2("x",E2);var L0={exports:{}};(function(e,t){(function(i,r){e.exports=r()})(globalThis,()=>(()=>{var i={4567:function(c,n,o){var d=this&&this.__decorate||function(l,u,m,w){var y,E=arguments.length,b=E<3?u:w===null?w=Object.getOwnPropertyDescriptor(u,m):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,u,m,w);else for(var x=l.length-1;x>=0;x--)(y=l[x])&&(b=(E<3?y(b):E>3?y(u,m,b):y(u,m))||b);return E>3&&b&&Object.defineProperty(u,m,b),b},v=this&&this.__param||function(l,u){return function(m,w){u(m,w,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.AccessibilityManager=void 0;const f=o(9042),g=o(9924),S=o(844),C=o(4725),p=o(2585),h=o(3656);let _=n.AccessibilityManager=class extends S.Disposable{constructor(l,u,m,w){super(),this._terminal=l,this._coreBrowserService=m,this._renderService=w,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 y=0;y<this._terminal.rows;y++)this._rowElements[y]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[y]);if(this._topBoundaryFocusListener=y=>this._handleBoundaryFocus(y,0),this._bottomBoundaryFocusListener=y=>this._handleBoundaryFocus(y,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 g.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(y=>this._handleResize(y.rows))),this.register(this._terminal.onRender(y=>this._refreshRows(y.start,y.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(y=>this._handleChar(y))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
149
+ `))),this.register(this._terminal.onA11yTab(y=>this._handleTab(y))),this.register(this._terminal.onKey(y=>this._handleKey(y.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,h.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(l){for(let u=0;u<l;u++)this._handleChar(" ")}_handleChar(l){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==l&&(this._charsToAnnounce+=l):this._charsToAnnounce+=l,l===`
150
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(l){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(l)||this._charsToConsume.push(l)}_refreshRows(l,u){this._liveRegionDebouncer.refresh(l,u,this._terminal.rows)}_renderRows(l,u){const m=this._terminal.buffer,w=m.lines.length.toString();for(let y=l;y<=u;y++){const E=m.lines.get(m.ydisp+y),b=[],x=(E==null?void 0:E.translateToString(!0,void 0,void 0,b))||"",A=(m.ydisp+y+1).toString(),O=this._rowElements[y];O&&(x.length===0?(O.innerText=" ",this._rowColumns.set(O,[0,1])):(O.textContent=x,this._rowColumns.set(O,b)),O.setAttribute("aria-posinset",A),O.setAttribute("aria-setsize",w))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(l,u){const m=l.target,w=this._rowElements[u===0?1:this._rowElements.length-2];if(m.getAttribute("aria-posinset")===(u===0?"1":`${this._terminal.buffer.lines.length}`)||l.relatedTarget!==w)return;let y,E;if(u===0?(y=m,E=this._rowElements.pop(),this._rowContainer.removeChild(E)):(y=this._rowElements.shift(),E=m,this._rowContainer.removeChild(y)),y.removeEventListener("focus",this._topBoundaryFocusListener),E.removeEventListener("focus",this._bottomBoundaryFocusListener),u===0){const b=this._createAccessibilityTreeNode();this._rowElements.unshift(b),this._rowContainer.insertAdjacentElement("afterbegin",b)}else{const b=this._createAccessibilityTreeNode();this._rowElements.push(b),this._rowContainer.appendChild(b)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(u===0?-1:1),this._rowElements[u===0?1:this._rowElements.length-2].focus(),l.preventDefault(),l.stopImmediatePropagation()}_handleSelectionChange(){var x;if(this._rowElements.length===0)return;const l=document.getSelection();if(!l)return;if(l.isCollapsed)return void(this._rowContainer.contains(l.anchorNode)&&this._terminal.clearSelection());if(!l.anchorNode||!l.focusNode)return void console.error("anchorNode and/or focusNode are null");let u={node:l.anchorNode,offset:l.anchorOffset},m={node:l.focusNode,offset:l.focusOffset};if((u.node.compareDocumentPosition(m.node)&Node.DOCUMENT_POSITION_PRECEDING||u.node===m.node&&u.offset>m.offset)&&([u,m]=[m,u]),u.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(u={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(u.node))return;const w=this._rowElements.slice(-1)[0];if(m.node.compareDocumentPosition(w)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(m={node:w,offset:((x=w.textContent)==null?void 0:x.length)??0}),!this._rowContainer.contains(m.node))return;const y=({node:A,offset:O})=>{const R=A instanceof Text?A.parentNode:A;let D=parseInt(R==null?void 0:R.getAttribute("aria-posinset"),10)-1;if(isNaN(D))return console.warn("row is invalid. Race condition?"),null;const B=this._rowColumns.get(R);if(!B)return console.warn("columns is null. Race condition?"),null;let U=O<B.length?B[O]:B.slice(-1)[0]+1;return U>=this._terminal.cols&&(++D,U=0),{row:D,column:U}},E=y(u),b=y(m);if(E&&b){if(E.row>b.row||E.row===b.row&&E.column>=b.column)throw new Error("invalid range");this._terminal.select(E.column,E.row,(b.row-E.row)*this._terminal.cols-E.column+b.column)}}_handleResize(l){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let u=this._rowContainer.children.length;u<this._terminal.rows;u++)this._rowElements[u]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[u]);for(;this._rowElements.length>l;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const l=this._coreBrowserService.mainDocument.createElement("div");return l.setAttribute("role","listitem"),l.tabIndex=-1,this._refreshRowDimensions(l),l}_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 l=0;l<this._terminal.rows;l++)this._refreshRowDimensions(this._rowElements[l])}}_refreshRowDimensions(l){l.style.height=`${this._renderService.dimensions.css.cell.height}px`}};n.AccessibilityManager=_=d([v(1,p.IInstantiationService),v(2,C.ICoreBrowserService),v(3,C.IRenderService)],_)},3614:(c,n)=>{function o(g){return g.replace(/\r?\n/g,"\r")}function d(g,S){return S?"\x1B[200~"+g+"\x1B[201~":g}function v(g,S,C,p){g=d(g=o(g),C.decPrivateModes.bracketedPasteMode&&p.rawOptions.ignoreBracketedPasteMode!==!0),C.triggerDataEvent(g,!0),S.value=""}function f(g,S,C){const p=C.getBoundingClientRect(),h=g.clientX-p.left-10,_=g.clientY-p.top-10;S.style.width="20px",S.style.height="20px",S.style.left=`${h}px`,S.style.top=`${_}px`,S.style.zIndex="1000",S.focus()}Object.defineProperty(n,"__esModule",{value:!0}),n.rightClickHandler=n.moveTextAreaUnderMouseCursor=n.paste=n.handlePasteEvent=n.copyHandler=n.bracketTextForPaste=n.prepareTextForTerminal=void 0,n.prepareTextForTerminal=o,n.bracketTextForPaste=d,n.copyHandler=function(g,S){g.clipboardData&&g.clipboardData.setData("text/plain",S.selectionText),g.preventDefault()},n.handlePasteEvent=function(g,S,C,p){g.stopPropagation(),g.clipboardData&&v(g.clipboardData.getData("text/plain"),S,C,p)},n.paste=v,n.moveTextAreaUnderMouseCursor=f,n.rightClickHandler=function(g,S,C,p,h){f(g,S,C),h&&p.rightClickSelect(g),S.value=p.selectionText,S.select()}},7239:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorContrastCache=void 0;const d=o(1505);n.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(v,f,g){this._css.set(v,f,g)}getCss(v,f){return this._css.get(v,f)}setColor(v,f,g){this._color.set(v,f,g)}getColor(v,f){return this._color.get(v,f)}clear(){this._color.clear(),this._css.clear()}}},3656:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(o,d,v,f){o.addEventListener(d,v,f);let g=!1;return{dispose:()=>{g||(g=!0,o.removeEventListener(d,v,f))}}}},3551:function(c,n,o){var d=this&&this.__decorate||function(_,l,u,m){var w,y=arguments.length,E=y<3?l:m===null?m=Object.getOwnPropertyDescriptor(l,u):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(_,l,u,m);else for(var b=_.length-1;b>=0;b--)(w=_[b])&&(E=(y<3?w(E):y>3?w(l,u,E):w(l,u))||E);return y>3&&E&&Object.defineProperty(l,u,E),E},v=this&&this.__param||function(_,l){return function(u,m){l(u,m,_)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Linkifier=void 0;const f=o(3656),g=o(8460),S=o(844),C=o(2585),p=o(4725);let h=n.Linkifier=class extends S.Disposable{get currentLink(){return this._currentLink}constructor(_,l,u,m,w){super(),this._element=_,this._mouseService=l,this._renderService=u,this._bufferService=m,this._linkProviderService=w,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new g.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new g.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,S.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,S.toDisposable)(()=>{var y;this._lastMouseEvent=void 0,(y=this._activeProviderReplies)==null||y.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,f.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,f.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(_){this._lastMouseEvent=_;const l=this._positionFromMouseEvent(_,this._element,this._mouseService);if(!l)return;this._isMouseOut=!1;const u=_.composedPath();for(let m=0;m<u.length;m++){const w=u[m];if(w.classList.contains("xterm"))break;if(w.classList.contains("xterm-hover"))return}this._lastBufferCell&&l.x===this._lastBufferCell.x&&l.y===this._lastBufferCell.y||(this._handleHover(l),this._lastBufferCell=l)}_handleHover(_){if(this._activeLine!==_.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(_,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,_)||(this._clearCurrentLink(),this._askForLink(_,!0))}_askForLink(_,l){var m,w;this._activeProviderReplies&&l||((m=this._activeProviderReplies)==null||m.forEach(y=>{y==null||y.forEach(E=>{E.link.dispose&&E.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=_.y);let u=!1;for(const[y,E]of this._linkProviderService.linkProviders.entries())l?(w=this._activeProviderReplies)!=null&&w.get(y)&&(u=this._checkLinkProviderResult(y,_,u)):E.provideLinks(_.y,b=>{var A,O;if(this._isMouseOut)return;const x=b==null?void 0:b.map(R=>({link:R}));(A=this._activeProviderReplies)==null||A.set(y,x),u=this._checkLinkProviderResult(y,_,u),((O=this._activeProviderReplies)==null?void 0:O.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(_.y,this._activeProviderReplies)})}_removeIntersectingLinks(_,l){const u=new Set;for(let m=0;m<l.size;m++){const w=l.get(m);if(w)for(let y=0;y<w.length;y++){const E=w[y],b=E.link.range.start.y<_?0:E.link.range.start.x,x=E.link.range.end.y>_?this._bufferService.cols:E.link.range.end.x;for(let A=b;A<=x;A++){if(u.has(A)){w.splice(y--,1);break}u.add(A)}}}}_checkLinkProviderResult(_,l,u){var y;if(!this._activeProviderReplies)return u;const m=this._activeProviderReplies.get(_);let w=!1;for(let E=0;E<_;E++)this._activeProviderReplies.has(E)&&!this._activeProviderReplies.get(E)||(w=!0);if(!w&&m){const E=m.find(b=>this._linkAtPosition(b.link,l));E&&(u=!0,this._handleNewLink(E))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!u)for(let E=0;E<this._activeProviderReplies.size;E++){const b=(y=this._activeProviderReplies.get(E))==null?void 0:y.find(x=>this._linkAtPosition(x.link,l));if(b){u=!0,this._handleNewLink(b);break}}return u}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(_){if(!this._currentLink)return;const l=this._positionFromMouseEvent(_,this._element,this._mouseService);l&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,l)&&this._currentLink.link.activate(_,this._currentLink.link.text)}_clearCurrentLink(_,l){this._currentLink&&this._lastMouseEvent&&(!_||!l||this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=l)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,S.disposeArray)(this._linkCacheDisposables))}_handleNewLink(_){if(!this._lastMouseEvent)return;const l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._linkAtPosition(_.link,l)&&(this._currentLink=_,this._currentLink.state={decorations:{underline:_.link.decorations===void 0||_.link.decorations.underline,pointerCursor:_.link.decorations===void 0||_.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,_.link,this._lastMouseEvent),_.link.decorations={},Object.defineProperties(_.link.decorations,{pointerCursor:{get:()=>{var u,m;return(m=(u=this._currentLink)==null?void 0:u.state)==null?void 0:m.decorations.pointerCursor},set:u=>{var m;(m=this._currentLink)!=null&&m.state&&this._currentLink.state.decorations.pointerCursor!==u&&(this._currentLink.state.decorations.pointerCursor=u,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",u))}},underline:{get:()=>{var u,m;return(m=(u=this._currentLink)==null?void 0:u.state)==null?void 0:m.decorations.underline},set:u=>{var m,w,y;(m=this._currentLink)!=null&&m.state&&((y=(w=this._currentLink)==null?void 0:w.state)==null?void 0:y.decorations.underline)!==u&&(this._currentLink.state.decorations.underline=u,this._currentLink.state.isHovered&&this._fireUnderlineEvent(_.link,u))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(u=>{if(!this._currentLink)return;const m=u.start===0?0:u.start+1+this._bufferService.buffer.ydisp,w=this._bufferService.buffer.ydisp+1+u.end;if(this._currentLink.link.range.start.y>=m&&this._currentLink.link.range.end.y<=w&&(this._clearCurrentLink(m,w),this._lastMouseEvent)){const y=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);y&&this._askForLink(y,!1)}})))}_linkHover(_,l,u){var m;(m=this._currentLink)!=null&&m.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(l,!0),this._currentLink.state.decorations.pointerCursor&&_.classList.add("xterm-cursor-pointer")),l.hover&&l.hover(u,l.text)}_fireUnderlineEvent(_,l){const u=_.range,m=this._bufferService.buffer.ydisp,w=this._createLinkUnderlineEvent(u.start.x-1,u.start.y-m-1,u.end.x,u.end.y-m-1,void 0);(l?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(w)}_linkLeave(_,l,u){var m;(m=this._currentLink)!=null&&m.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(l,!1),this._currentLink.state.decorations.pointerCursor&&_.classList.remove("xterm-cursor-pointer")),l.leave&&l.leave(u,l.text)}_linkAtPosition(_,l){const u=_.range.start.y*this._bufferService.cols+_.range.start.x,m=_.range.end.y*this._bufferService.cols+_.range.end.x,w=l.y*this._bufferService.cols+l.x;return u<=w&&w<=m}_positionFromMouseEvent(_,l,u){const m=u.getCoords(_,l,this._bufferService.cols,this._bufferService.rows);if(m)return{x:m[0],y:m[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(_,l,u,m,w){return{x1:_,y1:l,x2:u,y2:m,cols:this._bufferService.cols,fg:w}}};n.Linkifier=h=d([v(1,p.IMouseService),v(2,p.IRenderService),v(3,C.IBufferService),v(4,p.ILinkProviderService)],h)},9042:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tooMuchOutput=n.promptLabel=void 0,n.promptLabel="Terminal input",n.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(c,n,o){var d=this&&this.__decorate||function(p,h,_,l){var u,m=arguments.length,w=m<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,_):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(p,h,_,l);else for(var y=p.length-1;y>=0;y--)(u=p[y])&&(w=(m<3?u(w):m>3?u(h,_,w):u(h,_))||w);return m>3&&w&&Object.defineProperty(h,_,w),w},v=this&&this.__param||function(p,h){return function(_,l){h(_,l,p)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkProvider=void 0;const f=o(511),g=o(2585);let S=n.OscLinkProvider=class{constructor(p,h,_){this._bufferService=p,this._optionsService=h,this._oscLinkService=_}provideLinks(p,h){var x;const _=this._bufferService.buffer.lines.get(p-1);if(!_)return void h(void 0);const l=[],u=this._optionsService.rawOptions.linkHandler,m=new f.CellData,w=_.getTrimmedLength();let y=-1,E=-1,b=!1;for(let A=0;A<w;A++)if(E!==-1||_.hasContent(A)){if(_.loadCell(A,m),m.hasExtendedAttrs()&&m.extended.urlId){if(E===-1){E=A,y=m.extended.urlId;continue}b=m.extended.urlId!==y}else E!==-1&&(b=!0);if(b||E!==-1&&A===w-1){const O=(x=this._oscLinkService.getLinkData(y))==null?void 0:x.uri;if(O){const R={start:{x:E+1,y:p},end:{x:A+(b||A!==w-1?0:1),y:p}};let D=!1;if(!(u!=null&&u.allowNonHttpProtocols))try{const B=new URL(O);["http:","https:"].includes(B.protocol)||(D=!0)}catch{D=!0}D||l.push({text:O,range:R,activate:(B,U)=>u?u.activate(B,U,R):C(0,U),hover:(B,U)=>{var N;return(N=u==null?void 0:u.hover)==null?void 0:N.call(u,B,U,R)},leave:(B,U)=>{var N;return(N=u==null?void 0:u.leave)==null?void 0:N.call(u,B,U,R)}})}b=!1,m.hasExtendedAttrs()&&m.extended.urlId?(E=A,y=m.extended.urlId):(E=-1,y=-1)}}h(l)}};function C(p,h){if(confirm(`Do you want to navigate to ${h}?
151
+
152
+ WARNING: This link could potentially be dangerous`)){const _=window.open();if(_){try{_.opener=null}catch{}_.location.href=h}else console.warn("Opening link blocked as opener could not be cleared")}}n.OscLinkProvider=S=d([v(0,g.IBufferService),v(1,g.IOptionsService),v(2,g.IOscLinkService)],S)},6193:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderDebouncer=void 0,n.RenderDebouncer=class{constructor(o,d){this._renderCallback=o,this._coreBrowserService=d,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(o){return this._refreshCallbacks.push(o),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(o,d,v){this._rowCount=v,o=o!==void 0?o:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,o):o,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,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 o=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(o,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const o of this._refreshCallbacks)o(0);this._refreshCallbacks=[]}}},3236:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Terminal=void 0;const d=o(3614),v=o(3656),f=o(3551),g=o(9042),S=o(3730),C=o(1680),p=o(3107),h=o(5744),_=o(2950),l=o(1296),u=o(428),m=o(4269),w=o(5114),y=o(8934),E=o(3230),b=o(9312),x=o(4725),A=o(6731),O=o(8055),R=o(8969),D=o(8460),B=o(844),U=o(6114),N=o(8437),P=o(2584),z=o(7399),L=o(5941),M=o(9074),k=o(2585),H=o(5435),$=o(4567),V=o(779);class Z extends R.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(j={}){super(j),this.browser=U,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new B.MutableDisposable),this._onCursorMove=this.register(new D.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new D.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new D.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new D.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new D.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new D.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new D.EventEmitter),this._onBlur=this.register(new D.EventEmitter),this._onA11yCharEmitter=this.register(new D.EventEmitter),this._onA11yTabEmitter=this.register(new D.EventEmitter),this._onWillOpen=this.register(new D.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(M.DecorationService),this._instantiationService.setService(k.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(V.LinkProviderService),this._instantiationService.setService(x.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(S.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((T,W)=>this.refresh(T,W))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(T=>this._reportWindowsOptions(T))),this.register(this._inputHandler.onColor(T=>this._handleColorEvent(T))),this.register((0,D.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,D.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,D.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,D.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(T=>this._afterResize(T.cols,T.rows))),this.register((0,B.toDisposable)(()=>{var T,W;this._customKeyEventHandler=void 0,(W=(T=this.element)==null?void 0:T.parentNode)==null||W.removeChild(this.element)}))}_handleColorEvent(j){if(this._themeService)for(const T of j){let W,F="";switch(T.index){case 256:W="foreground",F="10";break;case 257:W="background",F="11";break;case 258:W="cursor",F="12";break;default:W="ansi",F="4;"+T.index}switch(T.type){case 0:const X=O.color.toColorRGB(W==="ansi"?this._themeService.colors.ansi[T.index]:this._themeService.colors[W]);this.coreService.triggerDataEvent(`${P.C0.ESC}]${F};${(0,L.toRgbString)(X)}${P.C1_ESCAPED.ST}`);break;case 1:if(W==="ansi")this._themeService.modifyColors(Y=>Y.ansi[T.index]=O.channels.toColor(...T.color));else{const Y=W;this._themeService.modifyColors(oe=>oe[Y]=O.channels.toColor(...T.color))}break;case 2:this._themeService.restoreColor(T.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(j){j?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance($.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(j){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(P.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var j;return(j=this.textarea)==null?void 0:j.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(P.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 j=this.buffer.ybase+this.buffer.y,T=this.buffer.lines.get(j);if(!T)return;const W=Math.min(this.buffer.x,this.cols-1),F=this._renderService.dimensions.css.cell.height,X=T.getWidth(W),Y=this._renderService.dimensions.css.cell.width*X,oe=this.buffer.y*this._renderService.dimensions.css.cell.height,te=W*this._renderService.dimensions.css.cell.width;this.textarea.style.left=te+"px",this.textarea.style.top=oe+"px",this.textarea.style.width=Y+"px",this.textarea.style.height=F+"px",this.textarea.style.lineHeight=F+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,v.addDisposableDomListener)(this.element,"copy",T=>{this.hasSelection()&&(0,d.copyHandler)(T,this._selectionService)}));const j=T=>(0,d.handlePasteEvent)(T,this.textarea,this.coreService,this.optionsService);this.register((0,v.addDisposableDomListener)(this.textarea,"paste",j)),this.register((0,v.addDisposableDomListener)(this.element,"paste",j)),U.isFirefox?this.register((0,v.addDisposableDomListener)(this.element,"mousedown",T=>{T.button===2&&(0,d.rightClickHandler)(T,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,v.addDisposableDomListener)(this.element,"contextmenu",T=>{(0,d.rightClickHandler)(T,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),U.isLinux&&this.register((0,v.addDisposableDomListener)(this.element,"auxclick",T=>{T.button===1&&(0,d.moveTextAreaUnderMouseCursor)(T,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,v.addDisposableDomListener)(this.textarea,"keyup",j=>this._keyUp(j),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keydown",j=>this._keyDown(j),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keypress",j=>this._keyPress(j),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionupdate",j=>this._compositionHelper.compositionupdate(j))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,v.addDisposableDomListener)(this.textarea,"input",j=>this._inputEvent(j),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(j){var W;if(!j)throw new Error("Terminal requires a parent element.");if(j.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((W=this.element)==null?void 0:W.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=j.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"),j.appendChild(this.element);const T=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),T.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,v.addDisposableDomListener)(this.screenElement,"mousemove",F=>this.updateCursorStyle(F))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),T.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",g.promptLabel),U.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(w.CoreBrowserService,this.textarea,j.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(x.ICoreBrowserService,this._coreBrowserService),this.register((0,v.addDisposableDomListener)(this.textarea,"focus",F=>this._handleTextAreaFocus(F))),this.register((0,v.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(u.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(x.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(A.ThemeService),this._instantiationService.setService(x.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(m.CharacterJoinerService),this._instantiationService.setService(x.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(E.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(x.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(F=>this._onRender.fire(F))),this.onResize(F=>this._renderService.resize(F.cols,F.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(_.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(y.MouseService),this._instantiationService.setService(x.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild(T);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(F=>this.scrollLines(F.amount,F.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(b.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(x.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(F=>this.scrollLines(F.amount,F.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(F=>this._renderService.handleSelectionChanged(F.start,F.end,F.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(F=>{this.textarea.value=F,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(F=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,v.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(p.BufferDecorationRenderer,this.screenElement)),this.register((0,v.addDisposableDomListener)(this.element,"mousedown",F=>this._selectionService.handleMouseDown(F))),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($.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",F=>this._handleScreenReaderModeOptionChange(F))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(h.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",F=>{!this._overviewRulerRenderer&&F&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(h.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(l.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const j=this,T=this.element;function W(Y){const oe=j._mouseService.getMouseReportCoords(Y,j.screenElement);if(!oe)return!1;let te,xe;switch(Y.overrideType||Y.type){case"mousemove":xe=32,Y.buttons===void 0?(te=3,Y.button!==void 0&&(te=Y.button<3?Y.button:3)):te=1&Y.buttons?0:4&Y.buttons?1:2&Y.buttons?2:3;break;case"mouseup":xe=0,te=Y.button<3?Y.button:3;break;case"mousedown":xe=1,te=Y.button<3?Y.button:3;break;case"wheel":if(j._customWheelEventHandler&&j._customWheelEventHandler(Y)===!1||j.viewport.getLinesScrolled(Y)===0)return!1;xe=Y.deltaY<0?0:1,te=4;break;default:return!1}return!(xe===void 0||te===void 0||te>4)&&j.coreMouseService.triggerMouseEvent({col:oe.col,row:oe.row,x:oe.x,y:oe.y,button:te,action:xe,ctrl:Y.ctrlKey,alt:Y.altKey,shift:Y.shiftKey})}const F={mouseup:null,wheel:null,mousedrag:null,mousemove:null},X={mouseup:Y=>(W(Y),Y.buttons||(this._document.removeEventListener("mouseup",F.mouseup),F.mousedrag&&this._document.removeEventListener("mousemove",F.mousedrag)),this.cancel(Y)),wheel:Y=>(W(Y),this.cancel(Y,!0)),mousedrag:Y=>{Y.buttons&&W(Y)},mousemove:Y=>{Y.buttons||W(Y)}};this.register(this.coreMouseService.onProtocolChange(Y=>{Y?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(Y)),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&Y?F.mousemove||(T.addEventListener("mousemove",X.mousemove),F.mousemove=X.mousemove):(T.removeEventListener("mousemove",F.mousemove),F.mousemove=null),16&Y?F.wheel||(T.addEventListener("wheel",X.wheel,{passive:!1}),F.wheel=X.wheel):(T.removeEventListener("wheel",F.wheel),F.wheel=null),2&Y?F.mouseup||(F.mouseup=X.mouseup):(this._document.removeEventListener("mouseup",F.mouseup),F.mouseup=null),4&Y?F.mousedrag||(F.mousedrag=X.mousedrag):(this._document.removeEventListener("mousemove",F.mousedrag),F.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,v.addDisposableDomListener)(T,"mousedown",Y=>{if(Y.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(Y))return W(Y),F.mouseup&&this._document.addEventListener("mouseup",F.mouseup),F.mousedrag&&this._document.addEventListener("mousemove",F.mousedrag),this.cancel(Y)})),this.register((0,v.addDisposableDomListener)(T,"wheel",Y=>{if(!F.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(Y)===!1)return!1;if(!this.buffer.hasScrollback){const oe=this.viewport.getLinesScrolled(Y);if(oe===0)return;const te=P.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(Y.deltaY<0?"A":"B");let xe="";for(let Fe=0;Fe<Math.abs(oe);Fe++)xe+=te;return this.coreService.triggerDataEvent(xe,!0),this.cancel(Y,!0)}return this.viewport.handleWheel(Y)?this.cancel(Y):void 0}},{passive:!1})),this.register((0,v.addDisposableDomListener)(T,"touchstart",Y=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(Y),this.cancel(Y)},{passive:!0})),this.register((0,v.addDisposableDomListener)(T,"touchmove",Y=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(Y)?void 0:this.cancel(Y)},{passive:!1}))}refresh(j,T){var W;(W=this._renderService)==null||W.refreshRows(j,T)}updateCursorStyle(j){var T;(T=this._selectionService)!=null&&T.shouldColumnSelect(j)?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(j,T,W=0){var F;W===1?(super.scrollLines(j,T,W),this.refresh(0,this.rows-1)):(F=this.viewport)==null||F.scrollLines(j)}paste(j){(0,d.paste)(j,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(j){this._customKeyEventHandler=j}attachCustomWheelEventHandler(j){this._customWheelEventHandler=j}registerLinkProvider(j){return this._linkProviderService.registerLinkProvider(j)}registerCharacterJoiner(j){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const T=this._characterJoinerService.register(j);return this.refresh(0,this.rows-1),T}deregisterCharacterJoiner(j){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(j)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(j){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+j)}registerDecoration(j){return this._decorationService.registerDecoration(j)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(j,T,W){this._selectionService.setSelection(j,T,W)}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 j;(j=this._selectionService)==null||j.clearSelection()}selectAll(){var j;(j=this._selectionService)==null||j.selectAll()}selectLines(j,T){var W;(W=this._selectionService)==null||W.selectLines(j,T)}_keyDown(j){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(j)===!1)return!1;const T=this.browser.isMac&&this.options.macOptionIsMeta&&j.altKey;if(!T&&!this._compositionHelper.keydown(j))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;T||j.key!=="Dead"&&j.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const W=(0,z.evaluateKeyboardEvent)(j,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(j),W.type===3||W.type===2){const F=this.rows-1;return this.scrollLines(W.type===2?-F:F),this.cancel(j,!0)}return W.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,j)||(W.cancel&&this.cancel(j,!0),!W.key||!!(j.key&&!j.ctrlKey&&!j.altKey&&!j.metaKey&&j.key.length===1&&j.key.charCodeAt(0)>=65&&j.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(W.key!==P.C0.ETX&&W.key!==P.C0.CR||(this.textarea.value=""),this._onKey.fire({key:W.key,domEvent:j}),this._showCursor(),this.coreService.triggerDataEvent(W.key,!0),!this.optionsService.rawOptions.screenReaderMode||j.altKey||j.ctrlKey?this.cancel(j,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(j,T){const W=j.isMac&&!this.options.macOptionIsMeta&&T.altKey&&!T.ctrlKey&&!T.metaKey||j.isWindows&&T.altKey&&T.ctrlKey&&!T.metaKey||j.isWindows&&T.getModifierState("AltGraph");return T.type==="keypress"?W:W&&(!T.keyCode||T.keyCode>47)}_keyUp(j){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(j)===!1||(function(T){return T.keyCode===16||T.keyCode===17||T.keyCode===18}(j)||this.focus(),this.updateCursorStyle(j),this._keyPressHandled=!1)}_keyPress(j){let T;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(j)===!1)return!1;if(this.cancel(j),j.charCode)T=j.charCode;else if(j.which===null||j.which===void 0)T=j.keyCode;else{if(j.which===0||j.charCode===0)return!1;T=j.which}return!(!T||(j.altKey||j.ctrlKey||j.metaKey)&&!this._isThirdLevelShift(this.browser,j)||(T=String.fromCharCode(T),this._onKey.fire({key:T,domEvent:j}),this._showCursor(),this.coreService.triggerDataEvent(T,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(j){if(j.data&&j.inputType==="insertText"&&(!j.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const T=j.data;return this.coreService.triggerDataEvent(T,!0),this.cancel(j),!0}return!1}resize(j,T){j!==this.cols||T!==this.rows?super.resize(j,T):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(j,T){var W,F;(W=this._charSizeService)==null||W.measure(),(F=this.viewport)==null||F.syncScrollArea(!0)}clear(){var j;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 T=1;T<this.rows;T++)this.buffer.lines.push(this.buffer.getBlankLine(N.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(j=this.viewport)==null||j.reset(),this.refresh(0,this.rows-1)}}reset(){var T,W;this.options.rows=this.rows,this.options.cols=this.cols;const j=this._customKeyEventHandler;this._setup(),super.reset(),(T=this._selectionService)==null||T.reset(),this._decorationService.reset(),(W=this.viewport)==null||W.reset(),this._customKeyEventHandler=j,this.refresh(0,this.rows-1)}clearTextureAtlas(){var j;(j=this._renderService)==null||j.clearTextureAtlas()}_reportFocus(){var j;(j=this.element)!=null&&j.classList.contains("focus")?this.coreService.triggerDataEvent(P.C0.ESC+"[I"):this.coreService.triggerDataEvent(P.C0.ESC+"[O")}_reportWindowsOptions(j){if(this._renderService)switch(j){case H.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const T=this._renderService.dimensions.css.canvas.width.toFixed(0),W=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${P.C0.ESC}[4;${W};${T}t`);break;case H.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const F=this._renderService.dimensions.css.cell.width.toFixed(0),X=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${P.C0.ESC}[6;${X};${F}t`)}}cancel(j,T){if(this.options.cancelEvents||T)return j.preventDefault(),j.stopPropagation(),!1}}n.Terminal=Z},9924:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TimeBasedDebouncer=void 0,n.TimeBasedDebouncer=class{constructor(o,d=1e3){this._renderCallback=o,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(o,d,v){this._rowCount=v,o=o!==void 0?o:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,o):o,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;const f=Date.now();if(f-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=f,this._innerRefresh();else if(!this._additionalRefreshRequested){const g=f-this._lastRefreshMs,S=this._debounceThresholdMS-g;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 o=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(o,d)}}},1680:function(c,n,o){var d=this&&this.__decorate||function(_,l,u,m){var w,y=arguments.length,E=y<3?l:m===null?m=Object.getOwnPropertyDescriptor(l,u):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(_,l,u,m);else for(var b=_.length-1;b>=0;b--)(w=_[b])&&(E=(y<3?w(E):y>3?w(l,u,E):w(l,u))||E);return y>3&&E&&Object.defineProperty(l,u,E),E},v=this&&this.__param||function(_,l){return function(u,m){l(u,m,_)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Viewport=void 0;const f=o(3656),g=o(4725),S=o(8460),C=o(844),p=o(2585);let h=n.Viewport=class extends C.Disposable{constructor(_,l,u,m,w,y,E,b){super(),this._viewportElement=_,this._scrollArea=l,this._bufferService=u,this._optionsService=m,this._charSizeService=w,this._renderService=y,this._coreBrowserService=E,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,f.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(x=>this._activeBuffer=x.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(x=>this._renderDimensions=x)),this._handleThemeChange(b.colors),this.register(b.onChangeColors(x=>this._handleThemeChange(x))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(_){this._viewportElement.style.backgroundColor=_.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(_){if(_)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 l=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==l&&(this._lastRecordedBufferHeight=l,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const _=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==_&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=_),this._refreshAnimationFrame=null}syncScrollArea(_=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(_);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(_)}_handleScroll(_){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 l=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:l,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const _=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(_*(this._smoothScrollState.target-this._smoothScrollState.origin)),_<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(_,l){const u=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(l<0&&this._viewportElement.scrollTop!==0||l>0&&u<this._lastRecordedBufferHeight)||(_.cancelable&&_.preventDefault(),!1)}handleWheel(_){const l=this._getPixelsScrolled(_);return l!==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+l:this._smoothScrollState.target+=l,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=l,this._bubbleScroll(_,l))}scrollLines(_){if(_!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const l=_*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+l,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:_,suppressScrollEvent:!1})}_getPixelsScrolled(_){if(_.deltaY===0||_.shiftKey)return 0;let l=this._applyScrollModifier(_.deltaY,_);return _.deltaMode===WheelEvent.DOM_DELTA_LINE?l*=this._currentRowHeight:_.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(l*=this._currentRowHeight*this._bufferService.rows),l}getBufferElements(_,l){var b;let u,m="";const w=[],y=l??this._bufferService.buffer.lines.length,E=this._bufferService.buffer.lines;for(let x=_;x<y;x++){const A=E.get(x);if(!A)continue;const O=(b=E.get(x+1))==null?void 0:b.isWrapped;if(m+=A.translateToString(!O),!O||x===E.length-1){const R=document.createElement("div");R.textContent=m,w.push(R),m.length>0&&(u=R),m=""}}return{bufferElements:w,cursorElement:u}}getLinesScrolled(_){if(_.deltaY===0||_.shiftKey)return 0;let l=this._applyScrollModifier(_.deltaY,_);return _.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(l/=this._currentRowHeight+0,this._wheelPartialScroll+=l,l=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):_.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(l*=this._bufferService.rows),l}_applyScrollModifier(_,l){const u=this._optionsService.rawOptions.fastScrollModifier;return u==="alt"&&l.altKey||u==="ctrl"&&l.ctrlKey||u==="shift"&&l.shiftKey?_*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:_*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(_){this._lastTouchY=_.touches[0].pageY}handleTouchMove(_){const l=this._lastTouchY-_.touches[0].pageY;return this._lastTouchY=_.touches[0].pageY,l!==0&&(this._viewportElement.scrollTop+=l,this._bubbleScroll(_,l))}};n.Viewport=h=d([v(2,p.IBufferService),v(3,p.IOptionsService),v(4,g.ICharSizeService),v(5,g.IRenderService),v(6,g.ICoreBrowserService),v(7,g.IThemeService)],h)},3107:function(c,n,o){var d=this&&this.__decorate||function(p,h,_,l){var u,m=arguments.length,w=m<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,_):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(p,h,_,l);else for(var y=p.length-1;y>=0;y--)(u=p[y])&&(w=(m<3?u(w):m>3?u(h,_,w):u(h,_))||w);return m>3&&w&&Object.defineProperty(h,_,w),w},v=this&&this.__param||function(p,h){return function(_,l){h(_,l,p)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferDecorationRenderer=void 0;const f=o(4725),g=o(844),S=o(2585);let C=n.BufferDecorationRenderer=class extends g.Disposable{constructor(p,h,_,l,u){super(),this._screenElement=p,this._bufferService=h,this._coreBrowserService=_,this._decorationService=l,this._renderService=u,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(m=>this._removeDecoration(m))),this.register((0,g.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 p of this._decorationService.decorations)this._renderDecoration(p);this._dimensionsChanged=!1}_renderDecoration(p){this._refreshStyle(p),this._dimensionsChanged&&this._refreshXPosition(p)}_createElement(p){var l;const h=this._coreBrowserService.mainDocument.createElement("div");h.classList.add("xterm-decoration"),h.classList.toggle("xterm-decoration-top-layer",((l=p==null?void 0:p.options)==null?void 0:l.layer)==="top"),h.style.width=`${Math.round((p.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,h.style.height=(p.options.height||1)*this._renderService.dimensions.css.cell.height+"px",h.style.top=(p.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",h.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const _=p.options.x??0;return _&&_>this._bufferService.cols&&(h.style.display="none"),this._refreshXPosition(p,h),h}_refreshStyle(p){const h=p.marker.line-this._bufferService.buffers.active.ydisp;if(h<0||h>=this._bufferService.rows)p.element&&(p.element.style.display="none",p.onRenderEmitter.fire(p.element));else{let _=this._decorationElements.get(p);_||(_=this._createElement(p),p.element=_,this._decorationElements.set(p,_),this._container.appendChild(_),p.onDispose(()=>{this._decorationElements.delete(p),_.remove()})),_.style.top=h*this._renderService.dimensions.css.cell.height+"px",_.style.display=this._altBufferIsActive?"none":"block",p.onRenderEmitter.fire(_)}}_refreshXPosition(p,h=p.element){if(!h)return;const _=p.options.x??0;(p.options.anchor||"left")==="right"?h.style.right=_?_*this._renderService.dimensions.css.cell.width+"px":"":h.style.left=_?_*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(p){var h;(h=this._decorationElements.get(p))==null||h.remove(),this._decorationElements.delete(p),p.dispose()}};n.BufferDecorationRenderer=C=d([v(1,S.IBufferService),v(2,f.ICoreBrowserService),v(3,S.IDecorationService),v(4,f.IRenderService)],C)},5871:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorZoneStore=void 0,n.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(o){if(o.options.overviewRulerOptions){for(const d of this._zones)if(d.color===o.options.overviewRulerOptions.color&&d.position===o.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,o.marker.line))return;if(this._lineAdjacentToZone(d,o.marker.line,o.options.overviewRulerOptions.position))return void this._addLineToZone(d,o.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=o.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=o.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=o.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=o.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:o.options.overviewRulerOptions.color,position:o.options.overviewRulerOptions.position,startBufferLine:o.marker.line,endBufferLine:o.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(o){this._linePadding=o}_lineIntersectsZone(o,d){return d>=o.startBufferLine&&d<=o.endBufferLine}_lineAdjacentToZone(o,d,v){return d>=o.startBufferLine-this._linePadding[v||"full"]&&d<=o.endBufferLine+this._linePadding[v||"full"]}_addLineToZone(o,d){o.startBufferLine=Math.min(o.startBufferLine,d),o.endBufferLine=Math.max(o.endBufferLine,d)}}},5744:function(c,n,o){var d=this&&this.__decorate||function(u,m,w,y){var E,b=arguments.length,x=b<3?m:y===null?y=Object.getOwnPropertyDescriptor(m,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(u,m,w,y);else for(var A=u.length-1;A>=0;A--)(E=u[A])&&(x=(b<3?E(x):b>3?E(m,w,x):E(m,w))||x);return b>3&&x&&Object.defineProperty(m,w,x),x},v=this&&this.__param||function(u,m){return function(w,y){m(w,y,u)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OverviewRulerRenderer=void 0;const f=o(5871),g=o(4725),S=o(844),C=o(2585),p={full:0,left:0,center:0,right:0},h={full:0,left:0,center:0,right:0},_={full:0,left:0,center:0,right:0};let l=n.OverviewRulerRenderer=class extends S.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(u,m,w,y,E,b,x){var O;super(),this._viewportElement=u,this._screenElement=m,this._bufferService=w,this._decorationService=y,this._renderService=E,this._optionsService=b,this._coreBrowserService=x,this._colorZoneStore=new f.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(),(O=this._viewportElement.parentElement)==null||O.insertBefore(this._canvas,this._viewportElement);const A=this._canvas.getContext("2d");if(!A)throw new Error("Ctx cannot be null");this._ctx=A,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,S.toDisposable)(()=>{var R;(R=this._canvas)==null||R.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 u=Math.floor(this._canvas.width/3),m=Math.ceil(this._canvas.width/3);h.full=this._canvas.width,h.left=u,h.center=m,h.right=u,this._refreshDrawHeightConstants(),_.full=0,_.left=0,_.center=h.left,_.right=h.left+h.center}_refreshDrawHeightConstants(){p.full=Math.round(2*this._coreBrowserService.dpr);const u=this._canvas.height/this._bufferService.buffer.lines.length,m=Math.round(Math.max(Math.min(u,12),6)*this._coreBrowserService.dpr);p.left=m,p.center=m,p.right=m}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*p.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*p.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*p.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*p.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 m of this._decorationService.decorations)this._colorZoneStore.addDecoration(m);this._ctx.lineWidth=1;const u=this._colorZoneStore.zones;for(const m of u)m.position!=="full"&&this._renderColorZone(m);for(const m of u)m.position==="full"&&this._renderColorZone(m);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(u){this._ctx.fillStyle=u.color,this._ctx.fillRect(_[u.position||"full"],Math.round((this._canvas.height-1)*(u.startBufferLine/this._bufferService.buffers.active.lines.length)-p[u.position||"full"]/2),h[u.position||"full"],Math.round((this._canvas.height-1)*((u.endBufferLine-u.startBufferLine)/this._bufferService.buffers.active.lines.length)+p[u.position||"full"]))}_queueRefresh(u,m){this._shouldUpdateDimensions=u||this._shouldUpdateDimensions,this._shouldUpdateAnchor=m||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};n.OverviewRulerRenderer=l=d([v(2,C.IBufferService),v(3,C.IDecorationService),v(4,g.IRenderService),v(5,C.IOptionsService),v(6,g.ICoreBrowserService)],l)},2950:function(c,n,o){var d=this&&this.__decorate||function(p,h,_,l){var u,m=arguments.length,w=m<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,_):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(p,h,_,l);else for(var y=p.length-1;y>=0;y--)(u=p[y])&&(w=(m<3?u(w):m>3?u(h,_,w):u(h,_))||w);return m>3&&w&&Object.defineProperty(h,_,w),w},v=this&&this.__param||function(p,h){return function(_,l){h(_,l,p)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CompositionHelper=void 0;const f=o(4725),g=o(2585),S=o(2584);let C=n.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(p,h,_,l,u,m){this._textarea=p,this._compositionView=h,this._bufferService=_,this._optionsService=l,this._coreService=u,this._renderService=m,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(p){this._compositionView.textContent=p.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(p){if(this._isComposing||this._isSendingComposition){if(p.keyCode===229||p.keyCode===16||p.keyCode===17||p.keyCode===18)return!1;this._finalizeComposition(!1)}return p.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(p){if(this._compositionView.classList.remove("active"),this._isComposing=!1,p){const h={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let _;this._isSendingComposition=!1,h.start+=this._dataAlreadySent.length,_=this._isComposing?this._textarea.value.substring(h.start,h.end):this._textarea.value.substring(h.start),_.length>0&&this._coreService.triggerDataEvent(_,!0)}},0)}else{this._isSendingComposition=!1;const h=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(h,!0)}}_handleAnyTextareaChanges(){const p=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const h=this._textarea.value,_=h.replace(p,"");this._dataAlreadySent=_,h.length>p.length?this._coreService.triggerDataEvent(_,!0):h.length<p.length?this._coreService.triggerDataEvent(`${S.C0.DEL}`,!0):h.length===p.length&&h!==p&&this._coreService.triggerDataEvent(h,!0)}},0)}updateCompositionElements(p){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const h=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),_=this._renderService.dimensions.css.cell.height,l=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,u=h*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=u+"px",this._compositionView.style.top=l+"px",this._compositionView.style.height=_+"px",this._compositionView.style.lineHeight=_+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const m=this._compositionView.getBoundingClientRect();this._textarea.style.left=u+"px",this._textarea.style.top=l+"px",this._textarea.style.width=Math.max(m.width,1)+"px",this._textarea.style.height=Math.max(m.height,1)+"px",this._textarea.style.lineHeight=m.height+"px"}p||setTimeout(()=>this.updateCompositionElements(!0),0)}}};n.CompositionHelper=C=d([v(2,g.IBufferService),v(3,g.IOptionsService),v(4,g.ICoreService),v(5,f.IRenderService)],C)},9806:(c,n)=>{function o(d,v,f){const g=f.getBoundingClientRect(),S=d.getComputedStyle(f),C=parseInt(S.getPropertyValue("padding-left")),p=parseInt(S.getPropertyValue("padding-top"));return[v.clientX-g.left-C,v.clientY-g.top-p]}Object.defineProperty(n,"__esModule",{value:!0}),n.getCoords=n.getCoordsRelativeToElement=void 0,n.getCoordsRelativeToElement=o,n.getCoords=function(d,v,f,g,S,C,p,h,_){if(!C)return;const l=o(d,v,f);return l?(l[0]=Math.ceil((l[0]+(_?p/2:0))/p),l[1]=Math.ceil(l[1]/h),l[0]=Math.min(Math.max(l[0],1),g+(_?1:0)),l[1]=Math.min(Math.max(l[1],1),S),l):void 0}},9504:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.moveToCellSequence=void 0;const d=o(2584);function v(h,_,l,u){const m=h-f(h,l),w=_-f(_,l),y=Math.abs(m-w)-function(E,b,x){let A=0;const O=E-f(E,x),R=b-f(b,x);for(let D=0;D<Math.abs(O-R);D++){const B=g(E,b)==="A"?-1:1,U=x.buffer.lines.get(O+B*D);U!=null&&U.isWrapped&&A++}return A}(h,_,l);return p(y,C(g(h,_),u))}function f(h,_){let l=0,u=_.buffer.lines.get(h),m=u==null?void 0:u.isWrapped;for(;m&&h>=0&&h<_.rows;)l++,u=_.buffer.lines.get(--h),m=u==null?void 0:u.isWrapped;return l}function g(h,_){return h>_?"A":"B"}function S(h,_,l,u,m,w){let y=h,E=_,b="";for(;y!==l||E!==u;)y+=m?1:-1,m&&y>w.cols-1?(b+=w.buffer.translateBufferLineToString(E,!1,h,y),y=0,h=0,E++):!m&&y<0&&(b+=w.buffer.translateBufferLineToString(E,!1,0,h+1),y=w.cols-1,h=y,E--);return b+w.buffer.translateBufferLineToString(E,!1,h,y)}function C(h,_){const l=_?"O":"[";return d.C0.ESC+l+h}function p(h,_){h=Math.floor(h);let l="";for(let u=0;u<h;u++)l+=_;return l}n.moveToCellSequence=function(h,_,l,u){const m=l.buffer.x,w=l.buffer.y;if(!l.buffer.hasScrollback)return function(b,x,A,O,R,D){return v(x,O,R,D).length===0?"":p(S(b,x,b,x-f(x,R),!1,R).length,C("D",D))}(m,w,0,_,l,u)+v(w,_,l,u)+function(b,x,A,O,R,D){let B;B=v(x,O,R,D).length>0?O-f(O,R):x;const U=O,N=function(P,z,L,M,k,H){let $;return $=v(L,M,k,H).length>0?M-f(M,k):z,P<L&&$<=M||P>=L&&$<M?"C":"D"}(b,x,A,O,R,D);return p(S(b,B,A,U,N==="C",R).length,C(N,D))}(m,w,h,_,l,u);let y;if(w===_)return y=m>h?"D":"C",p(Math.abs(m-h),C(y,u));y=w>_?"D":"C";const E=Math.abs(w-_);return p(function(b,x){return x.cols-b}(w>_?h:m,l)+(E-1)*l.cols+1+((w>_?m:h)-1),C(y,u))}},1296:function(c,n,o){var d=this&&this.__decorate||function(D,B,U,N){var P,z=arguments.length,L=z<3?B:N===null?N=Object.getOwnPropertyDescriptor(B,U):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(D,B,U,N);else for(var M=D.length-1;M>=0;M--)(P=D[M])&&(L=(z<3?P(L):z>3?P(B,U,L):P(B,U))||L);return z>3&&L&&Object.defineProperty(B,U,L),L},v=this&&this.__param||function(D,B){return function(U,N){B(U,N,D)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRenderer=void 0;const f=o(3787),g=o(2550),S=o(2223),C=o(6171),p=o(6052),h=o(4725),_=o(8055),l=o(8460),u=o(844),m=o(2585),w="xterm-dom-renderer-owner-",y="xterm-rows",E="xterm-fg-",b="xterm-bg-",x="xterm-focus",A="xterm-selection";let O=1,R=n.DomRenderer=class extends u.Disposable{constructor(D,B,U,N,P,z,L,M,k,H,$,V,Z){super(),this._terminal=D,this._document=B,this._element=U,this._screenElement=N,this._viewportElement=P,this._helperContainer=z,this._linkifier2=L,this._charSizeService=k,this._optionsService=H,this._bufferService=$,this._coreBrowserService=V,this._themeService=Z,this._terminalClass=O++,this._rowElements=[],this._selectionRenderModel=(0,p.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new l.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(y),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(A),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(J=>this._injectCss(J))),this._injectCss(this._themeService.colors),this._rowFactory=M.createInstance(f.DomRendererRowFactory,document),this._element.classList.add(w+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(J=>this._handleLinkHover(J))),this.register(this._linkifier2.onHideLinkUnderline(J=>this._handleLinkLeave(J))),this.register((0,u.toDisposable)(()=>{this._element.classList.remove(w+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new g.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 D=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*D,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*D),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/D),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/D),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 U of this._rowElements)U.style.width=`${this.dimensions.css.canvas.width}px`,U.style.height=`${this.dimensions.css.cell.height}px`,U.style.lineHeight=`${this.dimensions.css.cell.height}px`,U.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const B=`${this._terminalSelector} .${y} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=B,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(D){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let B=`${this._terminalSelector} .${y} { color: ${D.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;B+=`${this._terminalSelector} .${y} .xterm-dim { color: ${_.color.multiplyOpacity(D.foreground,.5).css};}`,B+=`${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 U=`blink_underline_${this._terminalClass}`,N=`blink_bar_${this._terminalClass}`,P=`blink_block_${this._terminalClass}`;B+=`@keyframes ${U} { 50% { border-bottom-style: hidden; }}`,B+=`@keyframes ${N} { 50% { box-shadow: none; }}`,B+=`@keyframes ${P} { 0% { background-color: ${D.cursor.css}; color: ${D.cursorAccent.css}; } 50% { background-color: inherit; color: ${D.cursor.css}; }}`,B+=`${this._terminalSelector} .${y}.${x} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${U} 1s step-end infinite;}${this._terminalSelector} .${y}.${x} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${N} 1s step-end infinite;}${this._terminalSelector} .${y}.${x} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${P} 1s step-end infinite;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-block { background-color: ${D.cursor.css}; color: ${D.cursorAccent.css};}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${D.cursor.css} !important; color: ${D.cursorAccent.css} !important;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${D.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${D.cursor.css} inset;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${D.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,B+=`${this._terminalSelector} .${A} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${A} div { position: absolute; background-color: ${D.selectionBackgroundOpaque.css};}${this._terminalSelector} .${A} div { position: absolute; background-color: ${D.selectionInactiveBackgroundOpaque.css};}`;for(const[z,L]of D.ansi.entries())B+=`${this._terminalSelector} .${E}${z} { color: ${L.css}; }${this._terminalSelector} .${E}${z}.xterm-dim { color: ${_.color.multiplyOpacity(L,.5).css}; }${this._terminalSelector} .${b}${z} { background-color: ${L.css}; }`;B+=`${this._terminalSelector} .${E}${S.INVERTED_DEFAULT_COLOR} { color: ${_.color.opaque(D.background).css}; }${this._terminalSelector} .${E}${S.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${_.color.multiplyOpacity(_.color.opaque(D.background),.5).css}; }${this._terminalSelector} .${b}${S.INVERTED_DEFAULT_COLOR} { background-color: ${D.foreground.css}; }`,this._themeStyleElement.textContent=B}_setDefaultSpacing(){const D=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${D}px`,this._rowFactory.defaultSpacing=D}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(D,B){for(let U=this._rowElements.length;U<=B;U++){const N=this._document.createElement("div");this._rowContainer.appendChild(N),this._rowElements.push(N)}for(;this._rowElements.length>B;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(D,B){this._refreshRowElements(D,B),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(x),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(x),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(D,B,U){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(D,B,U),this.renderRows(0,this._bufferService.rows-1),!D||!B)return;this._selectionRenderModel.update(this._terminal,D,B,U);const N=this._selectionRenderModel.viewportStartRow,P=this._selectionRenderModel.viewportEndRow,z=this._selectionRenderModel.viewportCappedStartRow,L=this._selectionRenderModel.viewportCappedEndRow;if(z>=this._bufferService.rows||L<0)return;const M=this._document.createDocumentFragment();if(U){const k=D[0]>B[0];M.appendChild(this._createSelectionElement(z,k?B[0]:D[0],k?D[0]:B[0],L-z+1))}else{const k=N===z?D[0]:0,H=z===P?B[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(z,k,H));const $=L-z-1;if(M.appendChild(this._createSelectionElement(z+1,0,this._bufferService.cols,$)),z!==L){const V=P===L?B[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(L,0,V))}}this._selectionContainer.appendChild(M)}_createSelectionElement(D,B,U,N=1){const P=this._document.createElement("div"),z=B*this.dimensions.css.cell.width;let L=this.dimensions.css.cell.width*(U-B);return z+L>this.dimensions.css.canvas.width&&(L=this.dimensions.css.canvas.width-z),P.style.height=N*this.dimensions.css.cell.height+"px",P.style.top=D*this.dimensions.css.cell.height+"px",P.style.left=`${z}px`,P.style.width=`${L}px`,P}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 D of this._rowElements)D.replaceChildren()}renderRows(D,B){const U=this._bufferService.buffer,N=U.ybase+U.y,P=Math.min(U.x,this._bufferService.cols-1),z=this._optionsService.rawOptions.cursorBlink,L=this._optionsService.rawOptions.cursorStyle,M=this._optionsService.rawOptions.cursorInactiveStyle;for(let k=D;k<=B;k++){const H=k+U.ydisp,$=this._rowElements[k],V=U.lines.get(H);if(!$||!V)break;$.replaceChildren(...this._rowFactory.createRow(V,H,H===N,L,M,P,z,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${w}${this._terminalClass}`}_handleLinkHover(D){this._setCellUnderline(D.x1,D.x2,D.y1,D.y2,D.cols,!0)}_handleLinkLeave(D){this._setCellUnderline(D.x1,D.x2,D.y1,D.y2,D.cols,!1)}_setCellUnderline(D,B,U,N,P,z){U<0&&(D=0),N<0&&(B=0);const L=this._bufferService.rows-1;U=Math.max(Math.min(U,L),0),N=Math.max(Math.min(N,L),0),P=Math.min(P,this._bufferService.cols);const M=this._bufferService.buffer,k=M.ybase+M.y,H=Math.min(M.x,P-1),$=this._optionsService.rawOptions.cursorBlink,V=this._optionsService.rawOptions.cursorStyle,Z=this._optionsService.rawOptions.cursorInactiveStyle;for(let J=U;J<=N;++J){const j=J+M.ydisp,T=this._rowElements[J],W=M.lines.get(j);if(!T||!W)break;T.replaceChildren(...this._rowFactory.createRow(W,j,j===k,V,Z,H,$,this.dimensions.css.cell.width,this._widthCache,z?J===U?D:0:-1,z?(J===N?B:P)-1:-1))}}};n.DomRenderer=R=d([v(7,m.IInstantiationService),v(8,h.ICharSizeService),v(9,m.IOptionsService),v(10,m.IBufferService),v(11,h.ICoreBrowserService),v(12,h.IThemeService)],R)},3787:function(c,n,o){var d=this&&this.__decorate||function(y,E,b,x){var A,O=arguments.length,R=O<3?E:x===null?x=Object.getOwnPropertyDescriptor(E,b):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(y,E,b,x);else for(var D=y.length-1;D>=0;D--)(A=y[D])&&(R=(O<3?A(R):O>3?A(E,b,R):A(E,b))||R);return O>3&&R&&Object.defineProperty(E,b,R),R},v=this&&this.__param||function(y,E){return function(b,x){E(b,x,y)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRendererRowFactory=void 0;const f=o(2223),g=o(643),S=o(511),C=o(2585),p=o(8055),h=o(4725),_=o(4269),l=o(6171),u=o(3734);let m=n.DomRendererRowFactory=class{constructor(y,E,b,x,A,O,R){this._document=y,this._characterJoinerService=E,this._optionsService=b,this._coreBrowserService=x,this._coreService=A,this._decorationService=O,this._themeService=R,this._workCell=new S.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(y,E,b){this._selectionStart=y,this._selectionEnd=E,this._columnSelectMode=b}createRow(y,E,b,x,A,O,R,D,B,U,N){const P=[],z=this._characterJoinerService.getJoinedCharacters(E),L=this._themeService.colors;let M,k=y.getNoBgTrimmedLength();b&&k<O+1&&(k=O+1);let H=0,$="",V=0,Z=0,J=0,j=!1,T=0,W=!1,F=0;const X=[],Y=U!==-1&&N!==-1;for(let oe=0;oe<k;oe++){y.loadCell(oe,this._workCell);let te=this._workCell.getWidth();if(te===0)continue;let xe=!1,Fe=oe,ee=this._workCell;if(z.length>0&&oe===z[0][0]){xe=!0;const le=z.shift();ee=new _.JoinedCellData(this._workCell,y.translateToString(!0,le[0],le[1]),le[1]-le[0]),Fe=le[1]-1,te=ee.getWidth()}const ti=this._isCellInSelection(oe,E),Jr=b&&oe===O,pe=Y&&oe>=U&&oe<=N;let he=!1;this._decorationService.forEachDecorationAtCell(oe,E,void 0,le=>{he=!0});let fe=ee.getChars()||g.WHITESPACE_CELL_CHAR;if(fe===" "&&(ee.isUnderline()||ee.isOverline())&&(fe=" "),F=te*D-B.get(fe,ee.isBold(),ee.isItalic()),M){if(H&&(ti&&W||!ti&&!W&&ee.bg===V)&&(ti&&W&&L.selectionForeground||ee.fg===Z)&&ee.extended.ext===J&&pe===j&&F===T&&!Jr&&!xe&&!he){ee.isInvisible()?$+=g.WHITESPACE_CELL_CHAR:$+=fe,H++;continue}H&&(M.textContent=$),M=this._document.createElement("span"),H=0,$=""}else M=this._document.createElement("span");if(V=ee.bg,Z=ee.fg,J=ee.extended.ext,j=pe,T=F,W=ti,xe&&O>=oe&&O<=Fe&&(O=oe),!this._coreService.isCursorHidden&&Jr&&this._coreService.isCursorInitialized){if(X.push("xterm-cursor"),this._coreBrowserService.isFocused)R&&X.push("xterm-cursor-blink"),X.push(x==="bar"?"xterm-cursor-bar":x==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(A)switch(A){case"outline":X.push("xterm-cursor-outline");break;case"block":X.push("xterm-cursor-block");break;case"bar":X.push("xterm-cursor-bar");break;case"underline":X.push("xterm-cursor-underline")}}if(ee.isBold()&&X.push("xterm-bold"),ee.isItalic()&&X.push("xterm-italic"),ee.isDim()&&X.push("xterm-dim"),$=ee.isInvisible()?g.WHITESPACE_CELL_CHAR:ee.getChars()||g.WHITESPACE_CELL_CHAR,ee.isUnderline()&&(X.push(`xterm-underline-${ee.extended.underlineStyle}`),$===" "&&($=" "),!ee.isUnderlineColorDefault()))if(ee.isUnderlineColorRGB())M.style.textDecorationColor=`rgb(${u.AttributeData.toColorRGB(ee.getUnderlineColor()).join(",")})`;else{let le=ee.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&ee.isBold()&&le<8&&(le+=8),M.style.textDecorationColor=L.ansi[le].css}ee.isOverline()&&(X.push("xterm-overline"),$===" "&&($=" ")),ee.isStrikethrough()&&X.push("xterm-strikethrough"),pe&&(M.style.textDecoration="underline");let Q=ee.getFgColor(),ve=ee.getFgColorMode(),ze=ee.getBgColor(),De=ee.getBgColorMode();const vi=!!ee.isInverse();if(vi){const le=Q;Q=ze,ze=le;const nn=ve;ve=De,De=nn}let ct,Mt,$e,Le=!1;switch(this._decorationService.forEachDecorationAtCell(oe,E,void 0,le=>{le.options.layer!=="top"&&Le||(le.backgroundColorRGB&&(De=50331648,ze=le.backgroundColorRGB.rgba>>8&16777215,ct=le.backgroundColorRGB),le.foregroundColorRGB&&(ve=50331648,Q=le.foregroundColorRGB.rgba>>8&16777215,Mt=le.foregroundColorRGB),Le=le.options.layer==="top")}),!Le&&ti&&(ct=this._coreBrowserService.isFocused?L.selectionBackgroundOpaque:L.selectionInactiveBackgroundOpaque,ze=ct.rgba>>8&16777215,De=50331648,Le=!0,L.selectionForeground&&(ve=50331648,Q=L.selectionForeground.rgba>>8&16777215,Mt=L.selectionForeground)),Le&&X.push("xterm-decoration-top"),De){case 16777216:case 33554432:$e=L.ansi[ze],X.push(`xterm-bg-${ze}`);break;case 50331648:$e=p.channels.toColor(ze>>16,ze>>8&255,255&ze),this._addStyle(M,`background-color:#${w((ze>>>0).toString(16),"0",6)}`);break;default:vi?($e=L.foreground,X.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):$e=L.background}switch(ct||ee.isDim()&&(ct=p.color.multiplyOpacity($e,.5)),ve){case 16777216:case 33554432:ee.isBold()&&Q<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Q+=8),this._applyMinimumContrast(M,$e,L.ansi[Q],ee,ct,void 0)||X.push(`xterm-fg-${Q}`);break;case 50331648:const le=p.channels.toColor(Q>>16&255,Q>>8&255,255&Q);this._applyMinimumContrast(M,$e,le,ee,ct,Mt)||this._addStyle(M,`color:#${w(Q.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(M,$e,L.foreground,ee,ct,Mt)||vi&&X.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}X.length&&(M.className=X.join(" "),X.length=0),Jr||xe||he?M.textContent=$:H++,F!==this.defaultSpacing&&(M.style.letterSpacing=`${F}px`),P.push(M),oe=Fe}return M&&H&&(M.textContent=$),P}_applyMinimumContrast(y,E,b,x,A,O){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,l.treatGlyphAsBackgroundColor)(x.getCode()))return!1;const R=this._getContrastCache(x);let D;if(A||O||(D=R.getColor(E.rgba,b.rgba)),D===void 0){const B=this._optionsService.rawOptions.minimumContrastRatio/(x.isDim()?2:1);D=p.color.ensureContrastRatio(A||E,O||b,B),R.setColor((A||E).rgba,(O||b).rgba,D??null)}return!!D&&(this._addStyle(y,`color:${D.css}`),!0)}_getContrastCache(y){return y.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(y,E){y.setAttribute("style",`${y.getAttribute("style")||""}${E};`)}_isCellInSelection(y,E){const b=this._selectionStart,x=this._selectionEnd;return!(!b||!x)&&(this._columnSelectMode?b[0]<=x[0]?y>=b[0]&&E>=b[1]&&y<x[0]&&E<=x[1]:y<b[0]&&E>=b[1]&&y>=x[0]&&E<=x[1]:E>b[1]&&E<x[1]||b[1]===x[1]&&E===b[1]&&y>=b[0]&&y<x[0]||b[1]<x[1]&&E===x[1]&&y<x[0]||b[1]<x[1]&&E===b[1]&&y>=b[0])}};function w(y,E,b){for(;y.length<b;)y=E+y;return y}n.DomRendererRowFactory=m=d([v(1,h.ICharacterJoinerService),v(2,C.IOptionsService),v(3,h.ICoreBrowserService),v(4,C.ICoreService),v(5,C.IDecorationService),v(6,h.IThemeService)],m)},2550:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WidthCache=void 0,n.WidthCache=class{constructor(o,d){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=o.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 v=o.createElement("span");v.classList.add("xterm-char-measure-element");const f=o.createElement("span");f.classList.add("xterm-char-measure-element"),f.style.fontWeight="bold";const g=o.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontStyle="italic";const S=o.createElement("span");S.classList.add("xterm-char-measure-element"),S.style.fontWeight="bold",S.style.fontStyle="italic",this._measureElements=[v,f,g,S],this._container.appendChild(v),this._container.appendChild(f),this._container.appendChild(g),this._container.appendChild(S),d.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(o,d,v,f){o===this._font&&d===this._fontSize&&v===this._weight&&f===this._weightBold||(this._font=o,this._fontSize=d,this._weight=v,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${v}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${v}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(o,d,v){let f=0;if(!d&&!v&&o.length===1&&(f=o.charCodeAt(0))<256){if(this._flat[f]!==-9999)return this._flat[f];const C=this._measure(o,0);return C>0&&(this._flat[f]=C),C}let g=o;d&&(g+="B"),v&&(g+="I");let S=this._holey.get(g);if(S===void 0){let C=0;d&&(C|=1),v&&(C|=2),S=this._measure(o,C),S>0&&this._holey.set(g,S)}return S}_measure(o,d){const v=this._measureElements[d];return v.textContent=o.repeat(32),v.offsetWidth/32}}},2223:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const d=o(6114);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(c,n)=>{function o(v){return 57508<=v&&v<=57558}function d(v){return v>=128512&&v<=128591||v>=127744&&v<=128511||v>=128640&&v<=128767||v>=9728&&v<=9983||v>=9984&&v<=10175||v>=65024&&v<=65039||v>=129280&&v<=129535||v>=127462&&v<=127487}Object.defineProperty(n,"__esModule",{value:!0}),n.computeNextVariantOffset=n.createRenderDimensions=n.treatGlyphAsBackgroundColor=n.allowRescaling=n.isEmoji=n.isRestrictedPowerlineGlyph=n.isPowerlineGlyph=n.throwIfFalsy=void 0,n.throwIfFalsy=function(v){if(!v)throw new Error("value must not be falsy");return v},n.isPowerlineGlyph=o,n.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},n.isEmoji=d,n.allowRescaling=function(v,f,g,S){return f===1&&g>Math.ceil(1.5*S)&&v!==void 0&&v>255&&!d(v)&&!o(v)&&!function(C){return 57344<=C&&C<=63743}(v)},n.treatGlyphAsBackgroundColor=function(v){return o(v)||function(f){return 9472<=f&&f<=9631}(v)},n.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}}}},n.computeNextVariantOffset=function(v,f,g=0){return(v-(2*Math.round(f)-g))%(2*Math.round(f))}},6052:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class o{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(v,f,g,S=!1){if(this.selectionStart=f,this.selectionEnd=g,!f||!g||f[0]===g[0]&&f[1]===g[1])return void this.clear();const C=v.buffers.active.ydisp,p=f[1]-C,h=g[1]-C,_=Math.max(p,0),l=Math.min(h,v.rows-1);_>=v.rows||l<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=S,this.viewportStartRow=p,this.viewportEndRow=h,this.viewportCappedStartRow=_,this.viewportCappedEndRow=l,this.startCol=f[0],this.endCol=g[0])}isCellSelected(v,f,g){return!!this.hasSelection&&(g-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?f>=this.startCol&&g>=this.viewportCappedStartRow&&f<this.endCol&&g<=this.viewportCappedEndRow:f<this.startCol&&g>=this.viewportCappedStartRow&&f>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&f>=this.startCol&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportStartRow&&f>=this.startCol)}}n.createSelectionRenderModel=function(){return new o}},456:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionModel=void 0,n.SelectionModel=class{constructor(o){this._bufferService=o,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 o=this.selectionStart[0]+this.selectionStartLength;return o>this._bufferService.cols?o%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(o/this._bufferService.cols)-1]:[o%this._bufferService.cols,this.selectionStart[1]+Math.floor(o/this._bufferService.cols)]:[o,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const o=this.selectionStart[0]+this.selectionStartLength;return o>this._bufferService.cols?[o%this._bufferService.cols,this.selectionStart[1]+Math.floor(o/this._bufferService.cols)]:[Math.max(o,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const o=this.selectionStart,d=this.selectionEnd;return!(!o||!d)&&(o[1]>d[1]||o[1]===d[1]&&o[0]>d[0])}handleTrim(o){return this.selectionStart&&(this.selectionStart[1]-=o),this.selectionEnd&&(this.selectionEnd[1]-=o),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(c,n,o){var d=this&&this.__decorate||function(l,u,m,w){var y,E=arguments.length,b=E<3?u:w===null?w=Object.getOwnPropertyDescriptor(u,m):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,u,m,w);else for(var x=l.length-1;x>=0;x--)(y=l[x])&&(b=(E<3?y(b):E>3?y(u,m,b):y(u,m))||b);return E>3&&b&&Object.defineProperty(u,m,b),b},v=this&&this.__param||function(l,u){return function(m,w){u(m,w,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharSizeService=void 0;const f=o(2585),g=o(8460),S=o(844);let C=n.CharSizeService=class extends S.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(l,u,m){super(),this._optionsService=m,this.width=0,this.height=0,this._onCharSizeChange=this.register(new g.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new _(this._optionsService))}catch{this._measureStrategy=this.register(new h(l,u,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){const l=this._measureStrategy.measure();l.width===this.width&&l.height===this.height||(this.width=l.width,this.height=l.height,this._onCharSizeChange.fire())}};n.CharSizeService=C=d([v(2,f.IOptionsService)],C);class p extends S.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(u,m){u!==void 0&&u>0&&m!==void 0&&m>0&&(this._result.width=u,this._result.height=m)}}class h extends p{constructor(u,m,w){super(),this._document=u,this._parentElement=m,this._optionsService=w,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 _ extends p{constructor(u){super(),this._optionsService=u,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const m=this._ctx.measureText("W");if(!("width"in m&&"fontBoundingBoxAscent"in m&&"fontBoundingBoxDescent"in m))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const u=this._ctx.measureText("W");return this._validateAndSet(u.width,u.fontBoundingBoxAscent+u.fontBoundingBoxDescent),this._result}}},4269:function(c,n,o){var d=this&&this.__decorate||function(_,l,u,m){var w,y=arguments.length,E=y<3?l:m===null?m=Object.getOwnPropertyDescriptor(l,u):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(_,l,u,m);else for(var b=_.length-1;b>=0;b--)(w=_[b])&&(E=(y<3?w(E):y>3?w(l,u,E):w(l,u))||E);return y>3&&E&&Object.defineProperty(l,u,E),E},v=this&&this.__param||function(_,l){return function(u,m){l(u,m,_)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const f=o(3734),g=o(643),S=o(511),C=o(2585);class p extends f.AttributeData{constructor(l,u,m){super(),this.content=0,this.combinedData="",this.fg=l.fg,this.bg=l.bg,this.combinedData=u,this._width=m}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(l){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.JoinedCellData=p;let h=n.CharacterJoinerService=class O0{constructor(l){this._bufferService=l,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new S.CellData}register(l){const u={id:this._nextCharacterJoinerId++,handler:l};return this._characterJoiners.push(u),u.id}deregister(l){for(let u=0;u<this._characterJoiners.length;u++)if(this._characterJoiners[u].id===l)return this._characterJoiners.splice(u,1),!0;return!1}getJoinedCharacters(l){if(this._characterJoiners.length===0)return[];const u=this._bufferService.buffer.lines.get(l);if(!u||u.length===0)return[];const m=[],w=u.translateToString(!0);let y=0,E=0,b=0,x=u.getFg(0),A=u.getBg(0);for(let O=0;O<u.getTrimmedLength();O++)if(u.loadCell(O,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==x||this._workCell.bg!==A){if(O-y>1){const R=this._getJoinedRanges(w,b,E,u,y);for(let D=0;D<R.length;D++)m.push(R[D])}y=O,b=E,x=this._workCell.fg,A=this._workCell.bg}E+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-y>1){const O=this._getJoinedRanges(w,b,E,u,y);for(let R=0;R<O.length;R++)m.push(O[R])}return m}_getJoinedRanges(l,u,m,w,y){const E=l.substring(u,m);let b=[];try{b=this._characterJoiners[0].handler(E)}catch(x){console.error(x)}for(let x=1;x<this._characterJoiners.length;x++)try{const A=this._characterJoiners[x].handler(E);for(let O=0;O<A.length;O++)O0._mergeRanges(b,A[O])}catch(A){console.error(A)}return this._stringRangesToCellRanges(b,w,y),b}_stringRangesToCellRanges(l,u,m){let w=0,y=!1,E=0,b=l[w];if(b){for(let x=m;x<this._bufferService.cols;x++){const A=u.getWidth(x),O=u.getString(x).length||g.WHITESPACE_CELL_CHAR.length;if(A!==0){if(!y&&b[0]<=E&&(b[0]=x,y=!0),b[1]<=E){if(b[1]=x,b=l[++w],!b)break;b[0]<=E?(b[0]=x,y=!0):y=!1}E+=O}}b&&(b[1]=this._bufferService.cols)}}static _mergeRanges(l,u){let m=!1;for(let w=0;w<l.length;w++){const y=l[w];if(m){if(u[1]<=y[0])return l[w-1][1]=u[1],l;if(u[1]<=y[1])return l[w-1][1]=Math.max(u[1],y[1]),l.splice(w,1),l;l.splice(w,1),w--}else{if(u[1]<=y[0])return l.splice(w,0,u),l;if(u[1]<=y[1])return y[0]=Math.min(u[0],y[0]),l;u[0]<y[1]&&(y[0]=Math.min(u[0],y[0]),m=!0)}}return m?l[l.length-1][1]=u[1]:l.push(u),l}};n.CharacterJoinerService=h=d([v(0,C.IBufferService)],h)},5114:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreBrowserService=void 0;const d=o(844),v=o(8460),f=o(3656);class g extends d.Disposable{constructor(p,h,_){super(),this._textarea=p,this._window=h,this.mainDocument=_,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new S(this._window),this._onDprChange=this.register(new v.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new v.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(l=>this._screenDprMonitor.setWindow(l))),this.register((0,v.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(p){this._window!==p&&(this._window=p,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}}n.CoreBrowserService=g;class S extends d.Disposable{constructor(p){super(),this._parentWindow=p,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new v.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,d.toDisposable)(()=>this.clearListener()))}setWindow(p){this._parentWindow=p,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,f.addDisposableDomListener)(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var p;this._outerListener&&((p=this._resolutionMediaMatchList)==null||p.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:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkProviderService=void 0;const d=o(844);class v extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(g){return this.linkProviders.push(g),{dispose:()=>{const S=this.linkProviders.indexOf(g);S!==-1&&this.linkProviders.splice(S,1)}}}}n.LinkProviderService=v},8934:function(c,n,o){var d=this&&this.__decorate||function(C,p,h,_){var l,u=arguments.length,m=u<3?p:_===null?_=Object.getOwnPropertyDescriptor(p,h):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(C,p,h,_);else for(var w=C.length-1;w>=0;w--)(l=C[w])&&(m=(u<3?l(m):u>3?l(p,h,m):l(p,h))||m);return u>3&&m&&Object.defineProperty(p,h,m),m},v=this&&this.__param||function(C,p){return function(h,_){p(h,_,C)}};Object.defineProperty(n,"__esModule",{value:!0}),n.MouseService=void 0;const f=o(4725),g=o(9806);let S=n.MouseService=class{constructor(C,p){this._renderService=C,this._charSizeService=p}getCoords(C,p,h,_,l){return(0,g.getCoords)(window,C,p,h,_,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,l)}getMouseReportCoords(C,p){const h=(0,g.getCoordsRelativeToElement)(window,C,p);if(this._charSizeService.hasValidSize)return h[0]=Math.min(Math.max(h[0],0),this._renderService.dimensions.css.canvas.width-1),h[1]=Math.min(Math.max(h[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(h[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(h[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(h[0]),y:Math.floor(h[1])}}};n.MouseService=S=d([v(0,f.IRenderService),v(1,f.ICharSizeService)],S)},3230:function(c,n,o){var d=this&&this.__decorate||function(l,u,m,w){var y,E=arguments.length,b=E<3?u:w===null?w=Object.getOwnPropertyDescriptor(u,m):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,u,m,w);else for(var x=l.length-1;x>=0;x--)(y=l[x])&&(b=(E<3?y(b):E>3?y(u,m,b):y(u,m))||b);return E>3&&b&&Object.defineProperty(u,m,b),b},v=this&&this.__param||function(l,u){return function(m,w){u(m,w,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.RenderService=void 0;const f=o(6193),g=o(4725),S=o(8460),C=o(844),p=o(7226),h=o(2585);let _=n.RenderService=class extends C.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(l,u,m,w,y,E,b,x){super(),this._rowCount=l,this._charSizeService=w,this._renderer=this.register(new C.MutableDisposable),this._pausedResizeTask=new p.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 f.RenderDebouncer((A,O)=>this._renderRows(A,O),b),this.register(this._renderDebouncer),this.register(b.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(E.onResize(()=>this._fullRefresh())),this.register(E.buffers.onBufferActivate(()=>{var A;return(A=this._renderer.value)==null?void 0:A.clear()})),this.register(m.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(y.onDecorationRegistered(()=>this._fullRefresh())),this.register(y.onDecorationRemoved(()=>this._fullRefresh())),this.register(m.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(E.cols,E.rows),this._fullRefresh()})),this.register(m.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(E.buffer.y,E.buffer.y,!0))),this.register(x.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(b.window,u),this.register(b.onWindowChange(A=>this._registerIntersectionObserver(A,u)))}_registerIntersectionObserver(l,u){if("IntersectionObserver"in l){const m=new l.IntersectionObserver(w=>this._handleIntersectionChange(w[w.length-1]),{threshold:0});m.observe(u),this._observerDisposable.value=(0,C.toDisposable)(()=>m.disconnect())}}_handleIntersectionChange(l){this._isPaused=l.isIntersecting===void 0?l.intersectionRatio===0:!l.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(l,u,m=!1){this._isPaused?this._needsFullRefresh=!0:(m||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(l,u,this._rowCount))}_renderRows(l,u){this._renderer.value&&(l=Math.min(l,this._rowCount-1),u=Math.min(u,this._rowCount-1),this._renderer.value.renderRows(l,u),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:l,end:u}),this._onRender.fire({start:l,end:u}),this._isNextRenderRedrawOnly=!0)}resize(l,u){this._rowCount=u,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(l){this._renderer.value=l,this._renderer.value&&(this._renderer.value.onRequestRedraw(u=>this.refreshRows(u.start,u.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(l){return this._renderDebouncer.addRefreshCallback(l)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var l,u;this._renderer.value&&((u=(l=this._renderer.value).clearTextureAtlas)==null||u.call(l),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(l,u){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var m;return(m=this._renderer.value)==null?void 0:m.handleResize(l,u)}):this._renderer.value.handleResize(l,u),this._fullRefresh())}handleCharSizeChanged(){var l;(l=this._renderer.value)==null||l.handleCharSizeChanged()}handleBlur(){var l;(l=this._renderer.value)==null||l.handleBlur()}handleFocus(){var l;(l=this._renderer.value)==null||l.handleFocus()}handleSelectionChanged(l,u,m){var w;this._selectionState.start=l,this._selectionState.end=u,this._selectionState.columnSelectMode=m,(w=this._renderer.value)==null||w.handleSelectionChanged(l,u,m)}handleCursorMove(){var l;(l=this._renderer.value)==null||l.handleCursorMove()}clear(){var l;(l=this._renderer.value)==null||l.clear()}};n.RenderService=_=d([v(2,h.IOptionsService),v(3,g.ICharSizeService),v(4,h.IDecorationService),v(5,h.IBufferService),v(6,g.ICoreBrowserService),v(7,g.IThemeService)],_)},9312:function(c,n,o){var d=this&&this.__decorate||function(b,x,A,O){var R,D=arguments.length,B=D<3?x:O===null?O=Object.getOwnPropertyDescriptor(x,A):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(b,x,A,O);else for(var U=b.length-1;U>=0;U--)(R=b[U])&&(B=(D<3?R(B):D>3?R(x,A,B):R(x,A))||B);return D>3&&B&&Object.defineProperty(x,A,B),B},v=this&&this.__param||function(b,x){return function(A,O){x(A,O,b)}};Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionService=void 0;const f=o(9806),g=o(9504),S=o(456),C=o(4725),p=o(8460),h=o(844),_=o(6114),l=o(4841),u=o(511),m=o(2585),w=" ",y=new RegExp(w,"g");let E=n.SelectionService=class extends h.Disposable{constructor(b,x,A,O,R,D,B,U,N){super(),this._element=b,this._screenElement=x,this._linkifier=A,this._bufferService=O,this._coreService=R,this._mouseService=D,this._optionsService=B,this._renderService=U,this._coreBrowserService=N,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new u.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new p.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new p.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new p.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new p.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=P=>this._handleMouseMove(P),this._mouseUpListener=P=>this._handleMouseUp(P),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(P=>this._handleTrim(P)),this.register(this._bufferService.buffers.onBufferActivate(P=>this._handleBufferActivate(P))),this.enable(),this._model=new S.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,h.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 b=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;return!(!b||!x||b[0]===x[0]&&b[1]===x[1])}get selectionText(){const b=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;if(!b||!x)return"";const A=this._bufferService.buffer,O=[];if(this._activeSelectionMode===3){if(b[0]===x[0])return"";const R=b[0]<x[0]?b[0]:x[0],D=b[0]<x[0]?x[0]:b[0];for(let B=b[1];B<=x[1];B++){const U=A.translateBufferLineToString(B,!0,R,D);O.push(U)}}else{const R=b[1]===x[1]?x[0]:void 0;O.push(A.translateBufferLineToString(b[1],!0,b[0],R));for(let D=b[1]+1;D<=x[1]-1;D++){const B=A.lines.get(D),U=A.translateBufferLineToString(D,!0);B!=null&&B.isWrapped?O[O.length-1]+=U:O.push(U)}if(b[1]!==x[1]){const D=A.lines.get(x[1]),B=A.translateBufferLineToString(x[1],!0,0,x[0]);D&&D.isWrapped?O[O.length-1]+=B:O.push(B)}}return O.map(R=>R.replace(y," ")).join(_.isWindows?`\r
153
+ `:`
154
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(b){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),_.isLinux&&b&&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(b){const x=this._getMouseBufferCoords(b),A=this._model.finalSelectionStart,O=this._model.finalSelectionEnd;return!!(A&&O&&x)&&this._areCoordsInSelection(x,A,O)}isCellInSelection(b,x){const A=this._model.finalSelectionStart,O=this._model.finalSelectionEnd;return!(!A||!O)&&this._areCoordsInSelection([b,x],A,O)}_areCoordsInSelection(b,x,A){return b[1]>x[1]&&b[1]<A[1]||x[1]===A[1]&&b[1]===x[1]&&b[0]>=x[0]&&b[0]<A[0]||x[1]<A[1]&&b[1]===A[1]&&b[0]<A[0]||x[1]<A[1]&&b[1]===x[1]&&b[0]>=x[0]}_selectWordAtCursor(b,x){var R,D;const A=(D=(R=this._linkifier.currentLink)==null?void 0:R.link)==null?void 0:D.range;if(A)return this._model.selectionStart=[A.start.x-1,A.start.y-1],this._model.selectionStartLength=(0,l.getRangeLength)(A,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const O=this._getMouseBufferCoords(b);return!!O&&(this._selectWordAt(O,x),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(b,x){this._model.clearSelection(),b=Math.max(b,0),x=Math.min(x,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,b],this._model.selectionEnd=[this._bufferService.cols,x],this.refresh(),this._onSelectionChange.fire()}_handleTrim(b){this._model.handleTrim(b)&&this.refresh()}_getMouseBufferCoords(b){const x=this._mouseService.getCoords(b,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(x)return x[0]--,x[1]--,x[1]+=this._bufferService.buffer.ydisp,x}_getMouseEventScrollAmount(b){let x=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,b,this._screenElement)[1];const A=this._renderService.dimensions.css.canvas.height;return x>=0&&x<=A?0:(x>A&&(x-=A),x=Math.min(Math.max(x,-50),50),x/=50,x/Math.abs(x)+Math.round(14*x))}shouldForceSelection(b){return _.isMac?b.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:b.shiftKey}handleMouseDown(b){if(this._mouseDownTimeStamp=b.timeStamp,(b.button!==2||!this.hasSelection)&&b.button===0){if(!this._enabled){if(!this.shouldForceSelection(b))return;b.stopPropagation()}b.preventDefault(),this._dragScrollAmount=0,this._enabled&&b.shiftKey?this._handleIncrementalClick(b):b.detail===1?this._handleSingleClick(b):b.detail===2?this._handleDoubleClick(b):b.detail===3&&this._handleTripleClick(b),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(b){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(b))}_handleSingleClick(b){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(b)?3:0,this._model.selectionStart=this._getMouseBufferCoords(b),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const x=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);x&&x.length!==this._model.selectionStart[0]&&x.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(b){this._selectWordAtCursor(b,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(b){const x=this._getMouseBufferCoords(b);x&&(this._activeSelectionMode=2,this._selectLineAt(x[1]))}shouldColumnSelect(b){return b.altKey&&!(_.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(b){if(b.stopImmediatePropagation(),!this._model.selectionStart)return;const x=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(b),!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(b),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const A=this._bufferService.buffer;if(this._model.selectionEnd[1]<A.lines.length){const O=A.lines.get(this._model.selectionEnd[1]);O&&O.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}x&&x[0]===this._model.selectionEnd[0]&&x[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 b=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(b.ydisp+this._bufferService.rows,b.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=b.ydisp),this.refresh()}}_handleMouseUp(b){const x=b.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&x<500&&b.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const A=this._mouseService.getCoords(b,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(A&&A[0]!==void 0&&A[1]!==void 0){const O=(0,g.moveToCellSequence)(A[0]-1,A[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(O,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const b=this._model.finalSelectionStart,x=this._model.finalSelectionEnd,A=!(!b||!x||b[0]===x[0]&&b[1]===x[1]);A?b&&x&&(this._oldSelectionStart&&this._oldSelectionEnd&&b[0]===this._oldSelectionStart[0]&&b[1]===this._oldSelectionStart[1]&&x[0]===this._oldSelectionEnd[0]&&x[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(b,x,A)):this._oldHasSelection&&this._fireOnSelectionChange(b,x,A)}_fireOnSelectionChange(b,x,A){this._oldSelectionStart=b,this._oldSelectionEnd=x,this._oldHasSelection=A,this._onSelectionChange.fire()}_handleBufferActivate(b){this.clearSelection(),this._trimListener.dispose(),this._trimListener=b.activeBuffer.lines.onTrim(x=>this._handleTrim(x))}_convertViewportColToCharacterIndex(b,x){let A=x;for(let O=0;x>=O;O++){const R=b.loadCell(O,this._workCell).getChars().length;this._workCell.getWidth()===0?A--:R>1&&x!==O&&(A+=R-1)}return A}setSelection(b,x,A){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[b,x],this._model.selectionStartLength=A,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(b){this._isClickInSelection(b)||(this._selectWordAtCursor(b,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(b,x,A=!0,O=!0){if(b[0]>=this._bufferService.cols)return;const R=this._bufferService.buffer,D=R.lines.get(b[1]);if(!D)return;const B=R.translateBufferLineToString(b[1],!1);let U=this._convertViewportColToCharacterIndex(D,b[0]),N=U;const P=b[0]-U;let z=0,L=0,M=0,k=0;if(B.charAt(U)===" "){for(;U>0&&B.charAt(U-1)===" ";)U--;for(;N<B.length&&B.charAt(N+1)===" ";)N++}else{let V=b[0],Z=b[0];D.getWidth(V)===0&&(z++,V--),D.getWidth(Z)===2&&(L++,Z++);const J=D.getString(Z).length;for(J>1&&(k+=J-1,N+=J-1);V>0&&U>0&&!this._isCharWordSeparator(D.loadCell(V-1,this._workCell));){D.loadCell(V-1,this._workCell);const j=this._workCell.getChars().length;this._workCell.getWidth()===0?(z++,V--):j>1&&(M+=j-1,U-=j-1),U--,V--}for(;Z<D.length&&N+1<B.length&&!this._isCharWordSeparator(D.loadCell(Z+1,this._workCell));){D.loadCell(Z+1,this._workCell);const j=this._workCell.getChars().length;this._workCell.getWidth()===2?(L++,Z++):j>1&&(k+=j-1,N+=j-1),N++,Z++}}N++;let H=U+P-z+M,$=Math.min(this._bufferService.cols,N-U+z+L-M-k);if(x||B.slice(U,N).trim()!==""){if(A&&H===0&&D.getCodePoint(0)!==32){const V=R.lines.get(b[1]-1);if(V&&D.isWrapped&&V.getCodePoint(this._bufferService.cols-1)!==32){const Z=this._getWordAt([this._bufferService.cols-1,b[1]-1],!1,!0,!1);if(Z){const J=this._bufferService.cols-Z.start;H-=J,$+=J}}}if(O&&H+$===this._bufferService.cols&&D.getCodePoint(this._bufferService.cols-1)!==32){const V=R.lines.get(b[1]+1);if(V!=null&&V.isWrapped&&V.getCodePoint(0)!==32){const Z=this._getWordAt([0,b[1]+1],!1,!1,!0);Z&&($+=Z.length)}}return{start:H,length:$}}}_selectWordAt(b,x){const A=this._getWordAt(b,x);if(A){for(;A.start<0;)A.start+=this._bufferService.cols,b[1]--;this._model.selectionStart=[A.start,b[1]],this._model.selectionStartLength=A.length}}_selectToWordAt(b){const x=this._getWordAt(b,!0);if(x){let A=b[1];for(;x.start<0;)x.start+=this._bufferService.cols,A--;if(!this._model.areSelectionValuesReversed())for(;x.start+x.length>this._bufferService.cols;)x.length-=this._bufferService.cols,A++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?x.start:x.start+x.length,A]}}_isCharWordSeparator(b){return b.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(b.getChars())>=0}_selectLineAt(b){const x=this._bufferService.buffer.getWrappedRangeForLine(b),A={start:{x:0,y:x.first},end:{x:this._bufferService.cols-1,y:x.last}};this._model.selectionStart=[0,x.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,l.getRangeLength)(A,this._bufferService.cols)}};n.SelectionService=E=d([v(3,m.IBufferService),v(4,m.ICoreService),v(5,C.IMouseService),v(6,m.IOptionsService),v(7,C.IRenderService),v(8,C.ICoreBrowserService)],E)},4725:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ILinkProviderService=n.IThemeService=n.ICharacterJoinerService=n.ISelectionService=n.IRenderService=n.IMouseService=n.ICoreBrowserService=n.ICharSizeService=void 0;const d=o(8343);n.ICharSizeService=(0,d.createDecorator)("CharSizeService"),n.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),n.IMouseService=(0,d.createDecorator)("MouseService"),n.IRenderService=(0,d.createDecorator)("RenderService"),n.ISelectionService=(0,d.createDecorator)("SelectionService"),n.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),n.IThemeService=(0,d.createDecorator)("ThemeService"),n.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(c,n,o){var d=this&&this.__decorate||function(E,b,x,A){var O,R=arguments.length,D=R<3?b:A===null?A=Object.getOwnPropertyDescriptor(b,x):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(E,b,x,A);else for(var B=E.length-1;B>=0;B--)(O=E[B])&&(D=(R<3?O(D):R>3?O(b,x,D):O(b,x))||D);return R>3&&D&&Object.defineProperty(b,x,D),D},v=this&&this.__param||function(E,b){return function(x,A){b(x,A,E)}};Object.defineProperty(n,"__esModule",{value:!0}),n.ThemeService=n.DEFAULT_ANSI_COLORS=void 0;const f=o(7239),g=o(8055),S=o(8460),C=o(844),p=o(2585),h=g.css.toColor("#ffffff"),_=g.css.toColor("#000000"),l=g.css.toColor("#ffffff"),u=g.css.toColor("#000000"),m={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};n.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const E=[g.css.toColor("#2e3436"),g.css.toColor("#cc0000"),g.css.toColor("#4e9a06"),g.css.toColor("#c4a000"),g.css.toColor("#3465a4"),g.css.toColor("#75507b"),g.css.toColor("#06989a"),g.css.toColor("#d3d7cf"),g.css.toColor("#555753"),g.css.toColor("#ef2929"),g.css.toColor("#8ae234"),g.css.toColor("#fce94f"),g.css.toColor("#729fcf"),g.css.toColor("#ad7fa8"),g.css.toColor("#34e2e2"),g.css.toColor("#eeeeec")],b=[0,95,135,175,215,255];for(let x=0;x<216;x++){const A=b[x/36%6|0],O=b[x/6%6|0],R=b[x%6];E.push({css:g.channels.toCss(A,O,R),rgba:g.channels.toRgba(A,O,R)})}for(let x=0;x<24;x++){const A=8+10*x;E.push({css:g.channels.toCss(A,A,A),rgba:g.channels.toRgba(A,A,A)})}return E})());let w=n.ThemeService=class extends C.Disposable{get colors(){return this._colors}constructor(E){super(),this._optionsService=E,this._contrastCache=new f.ColorContrastCache,this._halfContrastCache=new f.ColorContrastCache,this._onChangeColors=this.register(new S.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:h,background:_,cursor:l,cursorAccent:u,selectionForeground:void 0,selectionBackgroundTransparent:m,selectionBackgroundOpaque:g.color.blend(_,m),selectionInactiveBackgroundTransparent:m,selectionInactiveBackgroundOpaque:g.color.blend(_,m),ansi:n.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(E={}){const b=this._colors;if(b.foreground=y(E.foreground,h),b.background=y(E.background,_),b.cursor=y(E.cursor,l),b.cursorAccent=y(E.cursorAccent,u),b.selectionBackgroundTransparent=y(E.selectionBackground,m),b.selectionBackgroundOpaque=g.color.blend(b.background,b.selectionBackgroundTransparent),b.selectionInactiveBackgroundTransparent=y(E.selectionInactiveBackground,b.selectionBackgroundTransparent),b.selectionInactiveBackgroundOpaque=g.color.blend(b.background,b.selectionInactiveBackgroundTransparent),b.selectionForeground=E.selectionForeground?y(E.selectionForeground,g.NULL_COLOR):void 0,b.selectionForeground===g.NULL_COLOR&&(b.selectionForeground=void 0),g.color.isOpaque(b.selectionBackgroundTransparent)&&(b.selectionBackgroundTransparent=g.color.opacity(b.selectionBackgroundTransparent,.3)),g.color.isOpaque(b.selectionInactiveBackgroundTransparent)&&(b.selectionInactiveBackgroundTransparent=g.color.opacity(b.selectionInactiveBackgroundTransparent,.3)),b.ansi=n.DEFAULT_ANSI_COLORS.slice(),b.ansi[0]=y(E.black,n.DEFAULT_ANSI_COLORS[0]),b.ansi[1]=y(E.red,n.DEFAULT_ANSI_COLORS[1]),b.ansi[2]=y(E.green,n.DEFAULT_ANSI_COLORS[2]),b.ansi[3]=y(E.yellow,n.DEFAULT_ANSI_COLORS[3]),b.ansi[4]=y(E.blue,n.DEFAULT_ANSI_COLORS[4]),b.ansi[5]=y(E.magenta,n.DEFAULT_ANSI_COLORS[5]),b.ansi[6]=y(E.cyan,n.DEFAULT_ANSI_COLORS[6]),b.ansi[7]=y(E.white,n.DEFAULT_ANSI_COLORS[7]),b.ansi[8]=y(E.brightBlack,n.DEFAULT_ANSI_COLORS[8]),b.ansi[9]=y(E.brightRed,n.DEFAULT_ANSI_COLORS[9]),b.ansi[10]=y(E.brightGreen,n.DEFAULT_ANSI_COLORS[10]),b.ansi[11]=y(E.brightYellow,n.DEFAULT_ANSI_COLORS[11]),b.ansi[12]=y(E.brightBlue,n.DEFAULT_ANSI_COLORS[12]),b.ansi[13]=y(E.brightMagenta,n.DEFAULT_ANSI_COLORS[13]),b.ansi[14]=y(E.brightCyan,n.DEFAULT_ANSI_COLORS[14]),b.ansi[15]=y(E.brightWhite,n.DEFAULT_ANSI_COLORS[15]),E.extendedAnsi){const x=Math.min(b.ansi.length-16,E.extendedAnsi.length);for(let A=0;A<x;A++)b.ansi[A+16]=y(E.extendedAnsi[A],n.DEFAULT_ANSI_COLORS[A+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(E){this._restoreColor(E),this._onChangeColors.fire(this.colors)}_restoreColor(E){if(E!==void 0)switch(E){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[E]=this._restoreColors.ansi[E]}else for(let b=0;b<this._restoreColors.ansi.length;++b)this._colors.ansi[b]=this._restoreColors.ansi[b]}modifyColors(E){E(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 y(E,b){if(E!==void 0)try{return g.css.toColor(E)}catch{}return b}n.ThemeService=w=d([v(0,p.IOptionsService)],w)},6349:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CircularList=void 0;const d=o(8460),v=o(844);class f extends v.Disposable{constructor(S){super(),this._maxLength=S,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.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 p=0;p<Math.min(S,this.length);p++)C[p]=this._array[this._getCyclicIndex(p)];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,...p){if(C){for(let h=S;h<this._length-C;h++)this._array[this._getCyclicIndex(h)]=this._array[this._getCyclicIndex(h+C)];this._length-=C,this.onDeleteEmitter.fire({index:S,amount:C})}for(let h=this._length-1;h>=S;h--)this._array[this._getCyclicIndex(h+p.length)]=this._array[this._getCyclicIndex(h)];for(let h=0;h<p.length;h++)this._array[this._getCyclicIndex(S+h)]=p[h];if(p.length&&this.onInsertEmitter.fire({index:S,amount:p.length}),this._length+p.length>this._maxLength){const h=this._length+p.length-this._maxLength;this._startIndex+=h,this._length=this._maxLength,this.onTrimEmitter.fire(h)}else this._length+=p.length}trimStart(S){S>this._length&&(S=this._length),this._startIndex+=S,this._length-=S,this.onTrimEmitter.fire(S)}shiftElements(S,C,p){if(!(C<=0)){if(S<0||S>=this._length)throw new Error("start argument out of range");if(S+p<0)throw new Error("Cannot shift elements in list beyond index 0");if(p>0){for(let _=C-1;_>=0;_--)this.set(S+_+p,this.get(S+_));const h=S+C+p-this._length;if(h>0)for(this._length+=h;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let h=0;h<C;h++)this.set(S+h+p,this.get(S+h))}}_getCyclicIndex(S){return(this._startIndex+S)%this._maxLength}}n.CircularList=f},1439:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.clone=void 0,n.clone=function o(d,v=5){if(typeof d!="object")return d;const f=Array.isArray(d)?[]:{};for(const g in d)f[g]=v<=1?d[g]:d[g]&&o(d[g],v-1);return f}},8055:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.contrastRatio=n.toPaddedHex=n.rgba=n.rgb=n.css=n.color=n.channels=n.NULL_COLOR=void 0;let o=0,d=0,v=0,f=0;var g,S,C,p,h;function _(u){const m=u.toString(16);return m.length<2?"0"+m:m}function l(u,m){return u<m?(m+.05)/(u+.05):(u+.05)/(m+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},function(u){u.toCss=function(m,w,y,E){return E!==void 0?`#${_(m)}${_(w)}${_(y)}${_(E)}`:`#${_(m)}${_(w)}${_(y)}`},u.toRgba=function(m,w,y,E=255){return(m<<24|w<<16|y<<8|E)>>>0},u.toColor=function(m,w,y,E){return{css:u.toCss(m,w,y,E),rgba:u.toRgba(m,w,y,E)}}}(g||(n.channels=g={})),function(u){function m(w,y){return f=Math.round(255*y),[o,d,v]=h.toChannels(w.rgba),{css:g.toCss(o,d,v,f),rgba:g.toRgba(o,d,v,f)}}u.blend=function(w,y){if(f=(255&y.rgba)/255,f===1)return{css:y.css,rgba:y.rgba};const E=y.rgba>>24&255,b=y.rgba>>16&255,x=y.rgba>>8&255,A=w.rgba>>24&255,O=w.rgba>>16&255,R=w.rgba>>8&255;return o=A+Math.round((E-A)*f),d=O+Math.round((b-O)*f),v=R+Math.round((x-R)*f),{css:g.toCss(o,d,v),rgba:g.toRgba(o,d,v)}},u.isOpaque=function(w){return(255&w.rgba)==255},u.ensureContrastRatio=function(w,y,E){const b=h.ensureContrastRatio(w.rgba,y.rgba,E);if(b)return g.toColor(b>>24&255,b>>16&255,b>>8&255)},u.opaque=function(w){const y=(255|w.rgba)>>>0;return[o,d,v]=h.toChannels(y),{css:g.toCss(o,d,v),rgba:y}},u.opacity=m,u.multiplyOpacity=function(w,y){return f=255&w.rgba,m(w,f*y/255)},u.toColorRGB=function(w){return[w.rgba>>24&255,w.rgba>>16&255,w.rgba>>8&255]}}(S||(n.color=S={})),function(u){let m,w;try{const y=document.createElement("canvas");y.width=1,y.height=1;const E=y.getContext("2d",{willReadFrequently:!0});E&&(m=E,m.globalCompositeOperation="copy",w=m.createLinearGradient(0,0,1,1))}catch{}u.toColor=function(y){if(y.match(/#[\da-f]{3,8}/i))switch(y.length){case 4:return o=parseInt(y.slice(1,2).repeat(2),16),d=parseInt(y.slice(2,3).repeat(2),16),v=parseInt(y.slice(3,4).repeat(2),16),g.toColor(o,d,v);case 5:return o=parseInt(y.slice(1,2).repeat(2),16),d=parseInt(y.slice(2,3).repeat(2),16),v=parseInt(y.slice(3,4).repeat(2),16),f=parseInt(y.slice(4,5).repeat(2),16),g.toColor(o,d,v,f);case 7:return{css:y,rgba:(parseInt(y.slice(1),16)<<8|255)>>>0};case 9:return{css:y,rgba:parseInt(y.slice(1),16)>>>0}}const E=y.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(E)return o=parseInt(E[1]),d=parseInt(E[2]),v=parseInt(E[3]),f=Math.round(255*(E[5]===void 0?1:parseFloat(E[5]))),g.toColor(o,d,v,f);if(!m||!w)throw new Error("css.toColor: Unsupported css format");if(m.fillStyle=w,m.fillStyle=y,typeof m.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(m.fillRect(0,0,1,1),[o,d,v,f]=m.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(o,d,v,f),css:y}}}(C||(n.css=C={})),function(u){function m(w,y,E){const b=w/255,x=y/255,A=E/255;return .2126*(b<=.03928?b/12.92:Math.pow((b+.055)/1.055,2.4))+.7152*(x<=.03928?x/12.92:Math.pow((x+.055)/1.055,2.4))+.0722*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))}u.relativeLuminance=function(w){return m(w>>16&255,w>>8&255,255&w)},u.relativeLuminance2=m}(p||(n.rgb=p={})),function(u){function m(y,E,b){const x=y>>24&255,A=y>>16&255,O=y>>8&255;let R=E>>24&255,D=E>>16&255,B=E>>8&255,U=l(p.relativeLuminance2(R,D,B),p.relativeLuminance2(x,A,O));for(;U<b&&(R>0||D>0||B>0);)R-=Math.max(0,Math.ceil(.1*R)),D-=Math.max(0,Math.ceil(.1*D)),B-=Math.max(0,Math.ceil(.1*B)),U=l(p.relativeLuminance2(R,D,B),p.relativeLuminance2(x,A,O));return(R<<24|D<<16|B<<8|255)>>>0}function w(y,E,b){const x=y>>24&255,A=y>>16&255,O=y>>8&255;let R=E>>24&255,D=E>>16&255,B=E>>8&255,U=l(p.relativeLuminance2(R,D,B),p.relativeLuminance2(x,A,O));for(;U<b&&(R<255||D<255||B<255);)R=Math.min(255,R+Math.ceil(.1*(255-R))),D=Math.min(255,D+Math.ceil(.1*(255-D))),B=Math.min(255,B+Math.ceil(.1*(255-B))),U=l(p.relativeLuminance2(R,D,B),p.relativeLuminance2(x,A,O));return(R<<24|D<<16|B<<8|255)>>>0}u.blend=function(y,E){if(f=(255&E)/255,f===1)return E;const b=E>>24&255,x=E>>16&255,A=E>>8&255,O=y>>24&255,R=y>>16&255,D=y>>8&255;return o=O+Math.round((b-O)*f),d=R+Math.round((x-R)*f),v=D+Math.round((A-D)*f),g.toRgba(o,d,v)},u.ensureContrastRatio=function(y,E,b){const x=p.relativeLuminance(y>>8),A=p.relativeLuminance(E>>8);if(l(x,A)<b){if(A<x){const D=m(y,E,b),B=l(x,p.relativeLuminance(D>>8));if(B<b){const U=w(y,E,b);return B>l(x,p.relativeLuminance(U>>8))?D:U}return D}const O=w(y,E,b),R=l(x,p.relativeLuminance(O>>8));if(R<b){const D=m(y,E,b);return R>l(x,p.relativeLuminance(D>>8))?O:D}return O}},u.reduceLuminance=m,u.increaseLuminance=w,u.toChannels=function(y){return[y>>24&255,y>>16&255,y>>8&255,255&y]}}(h||(n.rgba=h={})),n.toPaddedHex=_,n.contrastRatio=l},8969:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreTerminal=void 0;const d=o(844),v=o(2585),f=o(4348),g=o(7866),S=o(744),C=o(7302),p=o(6975),h=o(8460),_=o(1753),l=o(1480),u=o(7994),m=o(9282),w=o(5435),y=o(5981),E=o(2660);let b=!1;class x extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new h.EventEmitter),this._onScroll.event(O=>{var R;(R=this._onScrollApi)==null||R.fire(O.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(O){for(const R in O)this.optionsService.options[R]=O[R]}constructor(O){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new h.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new h.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new h.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new h.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new h.EventEmitter),this._instantiationService=new f.InstantiationService,this.optionsService=this.register(new C.OptionsService(O)),this._instantiationService.setService(v.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(S.BufferService)),this._instantiationService.setService(v.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(g.LogService)),this._instantiationService.setService(v.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(p.CoreService)),this._instantiationService.setService(v.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(_.CoreMouseService)),this._instantiationService.setService(v.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(l.UnicodeService)),this._instantiationService.setService(v.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(u.CharsetService),this._instantiationService.setService(v.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(E.OscLinkService),this._instantiationService.setService(v.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new w.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,h.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,h.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,h.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,h.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(R=>{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(R=>{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 y.WriteBuffer((R,D)=>this._inputHandler.parse(R,D))),this.register((0,h.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(O,R){this._writeBuffer.write(O,R)}writeSync(O,R){this._logService.logLevel<=v.LogLevelEnum.WARN&&!b&&(this._logService.warn("writeSync is unreliable and will be removed soon."),b=!0),this._writeBuffer.writeSync(O,R)}input(O,R=!0){this.coreService.triggerDataEvent(O,R)}resize(O,R){isNaN(O)||isNaN(R)||(O=Math.max(O,S.MINIMUM_COLS),R=Math.max(R,S.MINIMUM_ROWS),this._bufferService.resize(O,R))}scroll(O,R=!1){this._bufferService.scroll(O,R)}scrollLines(O,R,D){this._bufferService.scrollLines(O,R,D)}scrollPages(O){this.scrollLines(O*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(O){const R=O-this._bufferService.buffer.ydisp;R!==0&&this.scrollLines(R)}registerEscHandler(O,R){return this._inputHandler.registerEscHandler(O,R)}registerDcsHandler(O,R){return this._inputHandler.registerDcsHandler(O,R)}registerCsiHandler(O,R){return this._inputHandler.registerCsiHandler(O,R)}registerOscHandler(O,R){return this._inputHandler.registerOscHandler(O,R)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let O=!1;const R=this.optionsService.rawOptions.windowsPty;R&&R.buildNumber!==void 0&&R.buildNumber!==void 0?O=R.backend==="conpty"&&R.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(O=!0),O?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const O=[];O.push(this.onLineFeed(m.updateWindowsModeWrappedState.bind(null,this._bufferService))),O.push(this.registerCsiHandler({final:"H"},()=>((0,m.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)(()=>{for(const R of O)R.dispose()})}}}n.CoreTerminal=x},8460:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.runAndSubscribe=n.forwardEvent=n.EventEmitter=void 0,n.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=o=>(this._listeners.push(o),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===o)return void this._listeners.splice(d,1)}}})),this._event}fire(o,d){const v=[];for(let f=0;f<this._listeners.length;f++)v.push(this._listeners[f]);for(let f=0;f<v.length;f++)v[f].call(void 0,o,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(o,d){return o(v=>d.fire(v))},n.runAndSubscribe=function(o,d){return d(void 0),o(v=>d(v))}},5435:function(c,n,o){var d=this&&this.__decorate||function(z,L,M,k){var H,$=arguments.length,V=$<3?L:k===null?k=Object.getOwnPropertyDescriptor(L,M):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(z,L,M,k);else for(var Z=z.length-1;Z>=0;Z--)(H=z[Z])&&(V=($<3?H(V):$>3?H(L,M,V):H(L,M))||V);return $>3&&V&&Object.defineProperty(L,M,V),V},v=this&&this.__param||function(z,L){return function(M,k){L(M,k,z)}};Object.defineProperty(n,"__esModule",{value:!0}),n.InputHandler=n.WindowsOptionsReportType=void 0;const f=o(2584),g=o(7116),S=o(2015),C=o(844),p=o(482),h=o(8437),_=o(8460),l=o(643),u=o(511),m=o(3734),w=o(2585),y=o(1480),E=o(6242),b=o(6351),x=o(5941),A={"(":0,")":1,"*":2,"+":3,"-":1,".":2},O=131072;function R(z,L){if(z>24)return L.setWinLines||!1;switch(z){case 1:return!!L.restoreWin;case 2:return!!L.minimizeWin;case 3:return!!L.setWinPosition;case 4:return!!L.setWinSizePixels;case 5:return!!L.raiseWin;case 6:return!!L.lowerWin;case 7:return!!L.refreshWin;case 8:return!!L.setWinSizeChars;case 9:return!!L.maximizeWin;case 10:return!!L.fullscreenWin;case 11:return!!L.getWinState;case 13:return!!L.getWinPosition;case 14:return!!L.getWinSizePixels;case 15:return!!L.getScreenSizePixels;case 16:return!!L.getCellSizePixels;case 18:return!!L.getWinSizeChars;case 19:return!!L.getScreenSizeChars;case 20:return!!L.getIconTitle;case 21:return!!L.getWinTitle;case 22:return!!L.pushTitle;case 23:return!!L.popTitle;case 24:return!!L.setWinLines}return!1}var D;(function(z){z[z.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",z[z.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(D||(n.WindowsOptionsReportType=D={}));let B=0;class U extends C.Disposable{getAttrData(){return this._curAttrData}constructor(L,M,k,H,$,V,Z,J,j=new S.EscapeSequenceParser){super(),this._bufferService=L,this._charsetService=M,this._coreService=k,this._logService=H,this._optionsService=$,this._oscLinkService=V,this._coreMouseService=Z,this._unicodeService=J,this._parser=j,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new p.StringToUtf32,this._utf8Decoder=new p.Utf8ToUtf32,this._workCell=new u.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=h.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=h.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new _.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new _.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new _.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new _.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new _.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new _.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new _.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new _.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new _.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new _.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new _.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new _.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new _.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 N(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(T=>this._activeBuffer=T.activeBuffer)),this._parser.setCsiHandlerFallback((T,W)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(T),params:W.toArray()})}),this._parser.setEscHandlerFallback(T=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(T)})}),this._parser.setExecuteHandlerFallback(T=>{this._logService.debug("Unknown EXECUTE code: ",{code:T})}),this._parser.setOscHandlerFallback((T,W,F)=>{this._logService.debug("Unknown OSC code: ",{identifier:T,action:W,data:F})}),this._parser.setDcsHandlerFallback((T,W,F)=>{W==="HOOK"&&(F=F.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(T),action:W,payload:F})}),this._parser.setPrintHandler((T,W,F)=>this.print(T,W,F)),this._parser.registerCsiHandler({final:"@"},T=>this.insertChars(T)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},T=>this.scrollLeft(T)),this._parser.registerCsiHandler({final:"A"},T=>this.cursorUp(T)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},T=>this.scrollRight(T)),this._parser.registerCsiHandler({final:"B"},T=>this.cursorDown(T)),this._parser.registerCsiHandler({final:"C"},T=>this.cursorForward(T)),this._parser.registerCsiHandler({final:"D"},T=>this.cursorBackward(T)),this._parser.registerCsiHandler({final:"E"},T=>this.cursorNextLine(T)),this._parser.registerCsiHandler({final:"F"},T=>this.cursorPrecedingLine(T)),this._parser.registerCsiHandler({final:"G"},T=>this.cursorCharAbsolute(T)),this._parser.registerCsiHandler({final:"H"},T=>this.cursorPosition(T)),this._parser.registerCsiHandler({final:"I"},T=>this.cursorForwardTab(T)),this._parser.registerCsiHandler({final:"J"},T=>this.eraseInDisplay(T,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},T=>this.eraseInDisplay(T,!0)),this._parser.registerCsiHandler({final:"K"},T=>this.eraseInLine(T,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},T=>this.eraseInLine(T,!0)),this._parser.registerCsiHandler({final:"L"},T=>this.insertLines(T)),this._parser.registerCsiHandler({final:"M"},T=>this.deleteLines(T)),this._parser.registerCsiHandler({final:"P"},T=>this.deleteChars(T)),this._parser.registerCsiHandler({final:"S"},T=>this.scrollUp(T)),this._parser.registerCsiHandler({final:"T"},T=>this.scrollDown(T)),this._parser.registerCsiHandler({final:"X"},T=>this.eraseChars(T)),this._parser.registerCsiHandler({final:"Z"},T=>this.cursorBackwardTab(T)),this._parser.registerCsiHandler({final:"`"},T=>this.charPosAbsolute(T)),this._parser.registerCsiHandler({final:"a"},T=>this.hPositionRelative(T)),this._parser.registerCsiHandler({final:"b"},T=>this.repeatPrecedingCharacter(T)),this._parser.registerCsiHandler({final:"c"},T=>this.sendDeviceAttributesPrimary(T)),this._parser.registerCsiHandler({prefix:">",final:"c"},T=>this.sendDeviceAttributesSecondary(T)),this._parser.registerCsiHandler({final:"d"},T=>this.linePosAbsolute(T)),this._parser.registerCsiHandler({final:"e"},T=>this.vPositionRelative(T)),this._parser.registerCsiHandler({final:"f"},T=>this.hVPosition(T)),this._parser.registerCsiHandler({final:"g"},T=>this.tabClear(T)),this._parser.registerCsiHandler({final:"h"},T=>this.setMode(T)),this._parser.registerCsiHandler({prefix:"?",final:"h"},T=>this.setModePrivate(T)),this._parser.registerCsiHandler({final:"l"},T=>this.resetMode(T)),this._parser.registerCsiHandler({prefix:"?",final:"l"},T=>this.resetModePrivate(T)),this._parser.registerCsiHandler({final:"m"},T=>this.charAttributes(T)),this._parser.registerCsiHandler({final:"n"},T=>this.deviceStatus(T)),this._parser.registerCsiHandler({prefix:"?",final:"n"},T=>this.deviceStatusPrivate(T)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},T=>this.softReset(T)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},T=>this.setCursorStyle(T)),this._parser.registerCsiHandler({final:"r"},T=>this.setScrollRegion(T)),this._parser.registerCsiHandler({final:"s"},T=>this.saveCursor(T)),this._parser.registerCsiHandler({final:"t"},T=>this.windowOptions(T)),this._parser.registerCsiHandler({final:"u"},T=>this.restoreCursor(T)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},T=>this.insertColumns(T)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},T=>this.deleteColumns(T)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},T=>this.selectProtected(T)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},T=>this.requestMode(T,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},T=>this.requestMode(T,!1)),this._parser.setExecuteHandler(f.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(f.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(f.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(f.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(f.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(f.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(f.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(f.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(f.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(f.C1.IND,()=>this.index()),this._parser.setExecuteHandler(f.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(f.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new E.OscHandler(T=>(this.setTitle(T),this.setIconName(T),!0))),this._parser.registerOscHandler(1,new E.OscHandler(T=>this.setIconName(T))),this._parser.registerOscHandler(2,new E.OscHandler(T=>this.setTitle(T))),this._parser.registerOscHandler(4,new E.OscHandler(T=>this.setOrReportIndexedColor(T))),this._parser.registerOscHandler(8,new E.OscHandler(T=>this.setHyperlink(T))),this._parser.registerOscHandler(10,new E.OscHandler(T=>this.setOrReportFgColor(T))),this._parser.registerOscHandler(11,new E.OscHandler(T=>this.setOrReportBgColor(T))),this._parser.registerOscHandler(12,new E.OscHandler(T=>this.setOrReportCursorColor(T))),this._parser.registerOscHandler(104,new E.OscHandler(T=>this.restoreIndexedColor(T))),this._parser.registerOscHandler(110,new E.OscHandler(T=>this.restoreFgColor(T))),this._parser.registerOscHandler(111,new E.OscHandler(T=>this.restoreBgColor(T))),this._parser.registerOscHandler(112,new E.OscHandler(T=>this.restoreCursorColor(T))),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 T in g.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:T},()=>this.selectCharset("("+T)),this._parser.registerEscHandler({intermediates:")",final:T},()=>this.selectCharset(")"+T)),this._parser.registerEscHandler({intermediates:"*",final:T},()=>this.selectCharset("*"+T)),this._parser.registerEscHandler({intermediates:"+",final:T},()=>this.selectCharset("+"+T)),this._parser.registerEscHandler({intermediates:"-",final:T},()=>this.selectCharset("-"+T)),this._parser.registerEscHandler({intermediates:".",final:T},()=>this.selectCharset("."+T)),this._parser.registerEscHandler({intermediates:"/",final:T},()=>this.selectCharset("/"+T));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(T=>(this._logService.error("Parsing error: ",T),T)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new b.DcsHandler((T,W)=>this.requestStatusString(T,W)))}_preserveStack(L,M,k,H){this._parseStack.paused=!0,this._parseStack.cursorStartX=L,this._parseStack.cursorStartY=M,this._parseStack.decodedLength=k,this._parseStack.position=H}_logSlowResolvingAsync(L){this._logService.logLevel<=w.LogLevelEnum.WARN&&Promise.race([L,new Promise((M,k)=>setTimeout(()=>k("#SLOW_TIMEOUT"),5e3))]).catch(M=>{if(M!=="#SLOW_TIMEOUT")throw M;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(L,M){let k,H=this._activeBuffer.x,$=this._activeBuffer.y,V=0;const Z=this._parseStack.paused;if(Z){if(k=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,M))return this._logSlowResolvingAsync(k),k;H=this._parseStack.cursorStartX,$=this._parseStack.cursorStartY,this._parseStack.paused=!1,L.length>O&&(V=this._parseStack.position+O)}if(this._logService.logLevel<=w.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof L=="string"?` "${L}"`:` "${Array.prototype.map.call(L,T=>String.fromCharCode(T)).join("")}"`),typeof L=="string"?L.split("").map(T=>T.charCodeAt(0)):L),this._parseBuffer.length<L.length&&this._parseBuffer.length<O&&(this._parseBuffer=new Uint32Array(Math.min(L.length,O))),Z||this._dirtyRowTracker.clearRange(),L.length>O)for(let T=V;T<L.length;T+=O){const W=T+O<L.length?T+O:L.length,F=typeof L=="string"?this._stringDecoder.decode(L.substring(T,W),this._parseBuffer):this._utf8Decoder.decode(L.subarray(T,W),this._parseBuffer);if(k=this._parser.parse(this._parseBuffer,F))return this._preserveStack(H,$,F,T),this._logSlowResolvingAsync(k),k}else if(!Z){const T=typeof L=="string"?this._stringDecoder.decode(L,this._parseBuffer):this._utf8Decoder.decode(L,this._parseBuffer);if(k=this._parser.parse(this._parseBuffer,T))return this._preserveStack(H,$,T,0),this._logSlowResolvingAsync(k),k}this._activeBuffer.x===H&&this._activeBuffer.y===$||this._onCursorMove.fire();const J=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),j=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);j<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(j,this._bufferService.rows-1),Math.min(J,this._bufferService.rows-1))}print(L,M,k){let H,$;const V=this._charsetService.charset,Z=this._optionsService.rawOptions.screenReaderMode,J=this._bufferService.cols,j=this._coreService.decPrivateModes.wraparound,T=this._coreService.modes.insertMode,W=this._curAttrData;let F=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&k-M>0&&F.getWidth(this._activeBuffer.x-1)===2&&F.setCellFromCodepoint(this._activeBuffer.x-1,0,1,W);let X=this._parser.precedingJoinState;for(let Y=M;Y<k;++Y){if(H=L[Y],H<127&&V){const Fe=V[String.fromCharCode(H)];Fe&&(H=Fe.charCodeAt(0))}const oe=this._unicodeService.charProperties(H,X);$=y.UnicodeService.extractWidth(oe);const te=y.UnicodeService.extractShouldJoin(oe),xe=te?y.UnicodeService.extractWidth(X):0;if(X=oe,Z&&this._onA11yChar.fire((0,p.stringFromCodePoint)(H)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+$-xe>J){if(j){const Fe=F;let ee=this._activeBuffer.x-xe;for(this._activeBuffer.x=xe,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),F=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),xe>0&&F instanceof h.BufferLine&&F.copyCellsFrom(Fe,ee,0,xe,!1);ee<J;)Fe.setCellFromCodepoint(ee++,0,1,W)}else if(this._activeBuffer.x=J-1,$===2)continue}if(te&&this._activeBuffer.x){const Fe=F.getWidth(this._activeBuffer.x-1)?1:2;F.addCodepointToCell(this._activeBuffer.x-Fe,H,$);for(let ee=$-xe;--ee>=0;)F.setCellFromCodepoint(this._activeBuffer.x++,0,0,W)}else if(T&&(F.insertCells(this._activeBuffer.x,$-xe,this._activeBuffer.getNullCell(W)),F.getWidth(J-1)===2&&F.setCellFromCodepoint(J-1,l.NULL_CELL_CODE,l.NULL_CELL_WIDTH,W)),F.setCellFromCodepoint(this._activeBuffer.x++,H,$,W),$>0)for(;--$;)F.setCellFromCodepoint(this._activeBuffer.x++,0,0,W)}this._parser.precedingJoinState=X,this._activeBuffer.x<J&&k-M>0&&F.getWidth(this._activeBuffer.x)===0&&!F.hasContent(this._activeBuffer.x)&&F.setCellFromCodepoint(this._activeBuffer.x,0,1,W),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(L,M){return L.final!=="t"||L.prefix||L.intermediates?this._parser.registerCsiHandler(L,M):this._parser.registerCsiHandler(L,k=>!R(k.params[0],this._optionsService.rawOptions.windowOptions)||M(k))}registerDcsHandler(L,M){return this._parser.registerDcsHandler(L,new b.DcsHandler(M))}registerEscHandler(L,M){return this._parser.registerEscHandler(L,M)}registerOscHandler(L,M){return this._parser.registerOscHandler(L,new E.OscHandler(M))}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 L;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&&((L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&L.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);M.hasWidth(this._activeBuffer.x)&&!M.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const L=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-L),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(L=this._bufferService.cols-1){this._activeBuffer.x=Math.min(L,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(L,M){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=L,this._activeBuffer.y=this._activeBuffer.scrollTop+M):(this._activeBuffer.x=L,this._activeBuffer.y=M),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(L,M){this._restrictCursor(),this._setCursor(this._activeBuffer.x+L,this._activeBuffer.y+M)}cursorUp(L){const M=this._activeBuffer.y-this._activeBuffer.scrollTop;return M>=0?this._moveCursor(0,-Math.min(M,L.params[0]||1)):this._moveCursor(0,-(L.params[0]||1)),!0}cursorDown(L){const M=this._activeBuffer.scrollBottom-this._activeBuffer.y;return M>=0?this._moveCursor(0,Math.min(M,L.params[0]||1)):this._moveCursor(0,L.params[0]||1),!0}cursorForward(L){return this._moveCursor(L.params[0]||1,0),!0}cursorBackward(L){return this._moveCursor(-(L.params[0]||1),0),!0}cursorNextLine(L){return this.cursorDown(L),this._activeBuffer.x=0,!0}cursorPrecedingLine(L){return this.cursorUp(L),this._activeBuffer.x=0,!0}cursorCharAbsolute(L){return this._setCursor((L.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(L){return this._setCursor(L.length>=2?(L.params[1]||1)-1:0,(L.params[0]||1)-1),!0}charPosAbsolute(L){return this._setCursor((L.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(L){return this._moveCursor(L.params[0]||1,0),!0}linePosAbsolute(L){return this._setCursor(this._activeBuffer.x,(L.params[0]||1)-1),!0}vPositionRelative(L){return this._moveCursor(0,L.params[0]||1),!0}hVPosition(L){return this.cursorPosition(L),!0}tabClear(L){const M=L.params[0];return M===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:M===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(L){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let M=L.params[0]||1;for(;M--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(L){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let M=L.params[0]||1;for(;M--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(L){const M=L.params[0];return M===1&&(this._curAttrData.bg|=536870912),M!==2&&M!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(L,M,k,H=!1,$=!1){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);V.replaceCells(M,k,this._activeBuffer.getNullCell(this._eraseAttrData()),$),H&&(V.isWrapped=!1)}_resetBufferLine(L,M=!1){const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);k&&(k.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),M),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+L),k.isWrapped=!1)}eraseInDisplay(L,M=!1){let k;switch(this._restrictCursor(this._bufferService.cols),L.params[0]){case 0:for(k=this._activeBuffer.y,this._dirtyRowTracker.markDirty(k),this._eraseInBufferLine(k++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,M);k<this._bufferService.rows;k++)this._resetBufferLine(k,M);this._dirtyRowTracker.markDirty(k);break;case 1:for(k=this._activeBuffer.y,this._dirtyRowTracker.markDirty(k),this._eraseInBufferLine(k,0,this._activeBuffer.x+1,!0,M),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(k+1).isWrapped=!1);k--;)this._resetBufferLine(k,M);this._dirtyRowTracker.markDirty(0);break;case 2:for(k=this._bufferService.rows,this._dirtyRowTracker.markDirty(k-1);k--;)this._resetBufferLine(k,M);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(L,M=!1){switch(this._restrictCursor(this._bufferService.cols),L.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,M);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,M);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,M)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(L){this._restrictCursor();let M=L.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const k=this._activeBuffer.ybase+this._activeBuffer.y,H=this._bufferService.rows-1-this._activeBuffer.scrollBottom,$=this._bufferService.rows-1+this._activeBuffer.ybase-H+1;for(;M--;)this._activeBuffer.lines.splice($-1,1),this._activeBuffer.lines.splice(k,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(L){this._restrictCursor();let M=L.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const k=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;M--;)this._activeBuffer.lines.splice(k,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(L){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.insertCells(this._activeBuffer.x,L.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(L){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.deleteCells(this._activeBuffer.x,L.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(L){let M=L.params[0]||1;for(;M--;)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(L){let M=L.params[0]||1;for(;M--;)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(h.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(L){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=L.params[0]||1;for(let k=this._activeBuffer.scrollTop;k<=this._activeBuffer.scrollBottom;++k){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+k);H.deleteCells(0,M,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(L){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=L.params[0]||1;for(let k=this._activeBuffer.scrollTop;k<=this._activeBuffer.scrollBottom;++k){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+k);H.insertCells(0,M,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(L){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=L.params[0]||1;for(let k=this._activeBuffer.scrollTop;k<=this._activeBuffer.scrollBottom;++k){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+k);H.insertCells(this._activeBuffer.x,M,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(L){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const M=L.params[0]||1;for(let k=this._activeBuffer.scrollTop;k<=this._activeBuffer.scrollBottom;++k){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+k);H.deleteCells(this._activeBuffer.x,M,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(L){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(L.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(L){const M=this._parser.precedingJoinState;if(!M)return!0;const k=L.params[0]||1,H=y.UnicodeService.extractWidth(M),$=this._activeBuffer.x-H,V=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString($),Z=new Uint32Array(V.length*k);let J=0;for(let T=0;T<V.length;){const W=V.codePointAt(T)||0;Z[J++]=W,T+=W>65535?2:1}let j=J;for(let T=1;T<k;++T)Z.copyWithin(j,0,J),j+=J;return this.print(Z,0,j),!0}sendDeviceAttributesPrimary(L){return L.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(f.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(f.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(L){return L.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(f.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(f.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(L.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(f.C0.ESC+"[>83;40003;0c")),!0}_is(L){return(this._optionsService.rawOptions.termName+"").indexOf(L)===0}setMode(L){for(let M=0;M<L.length;M++)switch(L.params[M]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(L){for(let M=0;M<L.length;M++)switch(L.params[M]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),this._charsetService.setgCharset(1,g.DEFAULT_CHARSET),this._charsetService.setgCharset(2,g.DEFAULT_CHARSET),this._charsetService.setgCharset(3,g.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(L){for(let M=0;M<L.length;M++)switch(L.params[M]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(L){for(let M=0;M<L.length;M++)switch(L.params[M]){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(),L.params[M]===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(L,M){const k=this._coreService.decPrivateModes,{activeProtocol:H,activeEncoding:$}=this._coreMouseService,V=this._coreService,{buffers:Z,cols:J}=this._bufferService,{active:j,alt:T}=Z,W=this._optionsService.rawOptions,F=te=>te?1:2,X=L.params[0];return Y=X,oe=M?X===2?4:X===4?F(V.modes.insertMode):X===12?3:X===20?F(W.convertEol):0:X===1?F(k.applicationCursorKeys):X===3?W.windowOptions.setWinLines?J===80?2:J===132?1:0:0:X===6?F(k.origin):X===7?F(k.wraparound):X===8?3:X===9?F(H==="X10"):X===12?F(W.cursorBlink):X===25?F(!V.isCursorHidden):X===45?F(k.reverseWraparound):X===66?F(k.applicationKeypad):X===67?4:X===1e3?F(H==="VT200"):X===1002?F(H==="DRAG"):X===1003?F(H==="ANY"):X===1004?F(k.sendFocus):X===1005?4:X===1006?F($==="SGR"):X===1015?4:X===1016?F($==="SGR_PIXELS"):X===1048?1:X===47||X===1047||X===1049?F(j===T):X===2004?F(k.bracketedPasteMode):0,V.triggerDataEvent(`${f.C0.ESC}[${M?"":"?"}${Y};${oe}$y`),!0;var Y,oe}_updateAttrColor(L,M,k,H,$){return M===2?(L|=50331648,L&=-16777216,L|=m.AttributeData.fromColorRGB([k,H,$])):M===5&&(L&=-50331904,L|=33554432|255&k),L}_extractColor(L,M,k){const H=[0,0,-1,0,0,0];let $=0,V=0;do{if(H[V+$]=L.params[M+V],L.hasSubParams(M+V)){const Z=L.getSubParams(M+V);let J=0;do H[1]===5&&($=1),H[V+J+1+$]=Z[J];while(++J<Z.length&&J+V+1+$<H.length);break}if(H[1]===5&&V+$>=2||H[1]===2&&V+$>=5)break;H[1]&&($=1)}while(++V+M<L.length&&V+$<H.length);for(let Z=2;Z<H.length;++Z)H[Z]===-1&&(H[Z]=0);switch(H[0]){case 38:k.fg=this._updateAttrColor(k.fg,H[1],H[3],H[4],H[5]);break;case 48:k.bg=this._updateAttrColor(k.bg,H[1],H[3],H[4],H[5]);break;case 58:k.extended=k.extended.clone(),k.extended.underlineColor=this._updateAttrColor(k.extended.underlineColor,H[1],H[3],H[4],H[5])}return V}_processUnderline(L,M){M.extended=M.extended.clone(),(!~L||L>5)&&(L=1),M.extended.underlineStyle=L,M.fg|=268435456,L===0&&(M.fg&=-268435457),M.updateExtended()}_processSGR0(L){L.fg=h.DEFAULT_ATTR_DATA.fg,L.bg=h.DEFAULT_ATTR_DATA.bg,L.extended=L.extended.clone(),L.extended.underlineStyle=0,L.extended.underlineColor&=-67108864,L.updateExtended()}charAttributes(L){if(L.length===1&&L.params[0]===0)return this._processSGR0(this._curAttrData),!0;const M=L.length;let k;const H=this._curAttrData;for(let $=0;$<M;$++)k=L.params[$],k>=30&&k<=37?(H.fg&=-50331904,H.fg|=16777216|k-30):k>=40&&k<=47?(H.bg&=-50331904,H.bg|=16777216|k-40):k>=90&&k<=97?(H.fg&=-50331904,H.fg|=16777224|k-90):k>=100&&k<=107?(H.bg&=-50331904,H.bg|=16777224|k-100):k===0?this._processSGR0(H):k===1?H.fg|=134217728:k===3?H.bg|=67108864:k===4?(H.fg|=268435456,this._processUnderline(L.hasSubParams($)?L.getSubParams($)[0]:1,H)):k===5?H.fg|=536870912:k===7?H.fg|=67108864:k===8?H.fg|=1073741824:k===9?H.fg|=2147483648:k===2?H.bg|=134217728:k===21?this._processUnderline(2,H):k===22?(H.fg&=-134217729,H.bg&=-134217729):k===23?H.bg&=-67108865:k===24?(H.fg&=-268435457,this._processUnderline(0,H)):k===25?H.fg&=-536870913:k===27?H.fg&=-67108865:k===28?H.fg&=-1073741825:k===29?H.fg&=2147483647:k===39?(H.fg&=-67108864,H.fg|=16777215&h.DEFAULT_ATTR_DATA.fg):k===49?(H.bg&=-67108864,H.bg|=16777215&h.DEFAULT_ATTR_DATA.bg):k===38||k===48||k===58?$+=this._extractColor(L,$,H):k===53?H.bg|=1073741824:k===55?H.bg&=-1073741825:k===59?(H.extended=H.extended.clone(),H.extended.underlineColor=-1,H.updateExtended()):k===100?(H.fg&=-67108864,H.fg|=16777215&h.DEFAULT_ATTR_DATA.fg,H.bg&=-67108864,H.bg|=16777215&h.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",k);return!0}deviceStatus(L){switch(L.params[0]){case 5:this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);break;case 6:const M=this._activeBuffer.y+1,k=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${M};${k}R`)}return!0}deviceStatusPrivate(L){if(L.params[0]===6){const M=this._activeBuffer.y+1,k=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${M};${k}R`)}return!0}softReset(L){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=h.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(L){const M=L.params[0]||1;switch(M){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 k=M%2==1;return this._optionsService.options.cursorBlink=k,!0}setScrollRegion(L){const M=L.params[0]||1;let k;return(L.length<2||(k=L.params[1])>this._bufferService.rows||k===0)&&(k=this._bufferService.rows),k>M&&(this._activeBuffer.scrollTop=M-1,this._activeBuffer.scrollBottom=k-1,this._setCursor(0,0)),!0}windowOptions(L){if(!R(L.params[0],this._optionsService.rawOptions.windowOptions))return!0;const M=L.length>1?L.params[1]:0;switch(L.params[0]){case 14:M!==2&&this._onRequestWindowsOptionsReport.fire(D.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(D.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${f.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:M!==0&&M!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),M!==0&&M!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:M!==0&&M!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),M!==0&&M!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(L){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(L){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(L){return this._windowTitle=L,this._onTitleChange.fire(L),!0}setIconName(L){return this._iconName=L,!0}setOrReportIndexedColor(L){const M=[],k=L.split(";");for(;k.length>1;){const H=k.shift(),$=k.shift();if(/^\d+$/.exec(H)){const V=parseInt(H);if(P(V))if($==="?")M.push({type:0,index:V});else{const Z=(0,x.parseColor)($);Z&&M.push({type:1,index:V,color:Z})}}}return M.length&&this._onColor.fire(M),!0}setHyperlink(L){const M=L.split(";");return!(M.length<2)&&(M[1]?this._createHyperlink(M[0],M[1]):!M[0]&&this._finishHyperlink())}_createHyperlink(L,M){this._getCurrentLinkId()&&this._finishHyperlink();const k=L.split(":");let H;const $=k.findIndex(V=>V.startsWith("id="));return $!==-1&&(H=k[$].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:H,uri:M}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(L,M){const k=L.split(";");for(let H=0;H<k.length&&!(M>=this._specialColors.length);++H,++M)if(k[H]==="?")this._onColor.fire([{type:0,index:this._specialColors[M]}]);else{const $=(0,x.parseColor)(k[H]);$&&this._onColor.fire([{type:1,index:this._specialColors[M],color:$}])}return!0}setOrReportFgColor(L){return this._setOrReportSpecialColor(L,0)}setOrReportBgColor(L){return this._setOrReportSpecialColor(L,1)}setOrReportCursorColor(L){return this._setOrReportSpecialColor(L,2)}restoreIndexedColor(L){if(!L)return this._onColor.fire([{type:2}]),!0;const M=[],k=L.split(";");for(let H=0;H<k.length;++H)if(/^\d+$/.exec(k[H])){const $=parseInt(k[H]);P($)&&M.push({type:2,index:$})}return M.length&&this._onColor.fire(M),!0}restoreFgColor(L){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(L){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(L){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,g.DEFAULT_CHARSET),!0}selectCharset(L){return L.length!==2?(this.selectDefaultCharset(),!0):(L[0]==="/"||this._charsetService.setgCharset(A[L[0]],g.CHARSETS[L[1]]||g.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 L=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,L,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=h.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=h.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(L){return this._charsetService.setgLevel(L),!0}screenAlignmentPattern(){const L=new u.CellData;L.content=4194373,L.fg=this._curAttrData.fg,L.bg=this._curAttrData.bg,this._setCursor(0,0);for(let M=0;M<this._bufferService.rows;++M){const k=this._activeBuffer.ybase+this._activeBuffer.y+M,H=this._activeBuffer.lines.get(k);H&&(H.fill(L),H.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(L,M){const k=this._bufferService.buffer,H=this._optionsService.rawOptions;return($=>(this._coreService.triggerDataEvent(`${f.C0.ESC}${$}${f.C0.ESC}\\`),!0))(L==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:L==='"p'?'P1$r61;1"p':L==="r"?`P1$r${k.scrollTop+1};${k.scrollBottom+1}r`:L==="m"?"P1$r0m":L===" q"?`P1$r${{block:2,underline:4,bar:6}[H.cursorStyle]-(H.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(L,M){this._dirtyRowTracker.markRangeDirty(L,M)}}n.InputHandler=U;let N=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,L){z>L&&(B=z,z=L,L=B),z<this.start&&(this.start=z),L>this.end&&(this.end=L)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function P(z){return 0<=z&&z<256}N=d([v(0,w.IBufferService)],N)},844:(c,n)=>{function o(d){for(const v of d)v.dispose();d.length=0}Object.defineProperty(n,"__esModule",{value:!0}),n.getDisposeArrayDisposable=n.disposeArray=n.toDisposable=n.MutableDisposable=n.Disposable=void 0,n.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const v=this._disposables.indexOf(d);v!==-1&&this._disposables.splice(v,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var v;this._isDisposed||d===this._value||((v=this._value)==null||v.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},n.toDisposable=function(d){return{dispose:d}},n.disposeArray=o,n.getDisposeArrayDisposable=function(d){return{dispose:()=>o(d)}}},1505:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class o{constructor(){this._data={}}set(v,f,g){this._data[v]||(this._data[v]={}),this._data[v][f]=g}get(v,f){return this._data[v]?this._data[v][f]:void 0}clear(){this._data={}}}n.TwoKeyMap=o,n.FourKeyMap=class{constructor(){this._data=new o}set(d,v,f,g,S){this._data.get(d,v)||this._data.set(d,v,new o),this._data.get(d,v).set(f,g,S)}get(d,v,f,g){var S;return(S=this._data.get(d,v))==null?void 0:S.get(f,g)}clear(){this._data.clear()}}},6114:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.isChromeOS=n.isLinux=n.isWindows=n.isIphone=n.isIpad=n.isMac=n.getSafariVersion=n.isSafari=n.isLegacyEdge=n.isFirefox=n.isNode=void 0,n.isNode=typeof process<"u"&&"title"in process;const o=n.isNode?"node":navigator.userAgent,d=n.isNode?"node":navigator.platform;n.isFirefox=o.includes("Firefox"),n.isLegacyEdge=o.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(o),n.getSafariVersion=function(){if(!n.isSafari)return 0;const v=o.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),n.isIpad=d==="iPad",n.isIphone=d==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),n.isLinux=d.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(o)},6106:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SortedList=void 0;let o=0;n.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(o=this._search(this._getKey(d)),this._array.splice(o,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const v=this._getKey(d);if(v===void 0||(o=this._search(v),o===-1)||this._getKey(this._array[o])!==v)return!1;do if(this._array[o]===d)return this._array.splice(o,1),!0;while(++o<this._array.length&&this._getKey(this._array[o])===v);return!1}*getKeyIterator(d){if(this._array.length!==0&&(o=this._search(d),!(o<0||o>=this._array.length)&&this._getKey(this._array[o])===d))do yield this._array[o];while(++o<this._array.length&&this._getKey(this._array[o])===d)}forEachByKey(d,v){if(this._array.length!==0&&(o=this._search(d),!(o<0||o>=this._array.length)&&this._getKey(this._array[o])===d))do v(this._array[o]);while(++o<this._array.length&&this._getKey(this._array[o])===d)}values(){return[...this._array].values()}_search(d){let v=0,f=this._array.length-1;for(;f>=v;){let g=v+f>>1;const S=this._getKey(this._array[g]);if(S>d)f=g-1;else{if(!(S<d)){for(;g>0&&this._getKey(this._array[g-1])===d;)g--;return g}v=g+1}}return v}}},7226:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const d=o(6114);class v{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,p=0,h=S.timeRemaining(),_=0;for(;this._i<this._tasks.length;){if(C=Date.now(),this._tasks[this._i]()||this._i++,C=Math.max(1,Date.now()-C),p=Math.max(C,p),_=S.timeRemaining(),1.5*p>_)return h-C<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(h-C))}ms`),void this._start();h=_}this.clear()}}class f extends v{_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())}}}n.PriorityTaskQueue=f,n.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:f,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},9282:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.updateWindowsModeWrappedState=void 0;const d=o(643);n.updateWindowsModeWrappedState=function(v){const f=v.buffer.lines.get(v.buffer.ybase+v.buffer.y-1),g=f==null?void 0:f.get(v.cols-1),S=v.buffer.lines.get(v.buffer.ybase+v.buffer.y);S&&g&&(S.isWrapped=g[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&g[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class o{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(f){return[f>>>16&255,f>>>8&255,255&f]}static fromColorRGB(f){return(255&f[0])<<16|(255&f[1])<<8|255&f[2]}clone(){const f=new o;return f.fg=this.fg,f.bg=this.bg,f.extended=this.extended.clone(),f}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}}n.AttributeData=o;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(f){this._ext=f}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(f){this._ext&=-469762049,this._ext|=f<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(f){this._ext&=-67108864,this._ext|=67108863&f}get urlId(){return this._urlId}set urlId(f){this._urlId=f}get underlineVariantOffset(){const f=(3758096384&this._ext)>>29;return f<0?4294967288^f:f}set underlineVariantOffset(f){this._ext&=536870911,this._ext|=f<<29&3758096384}constructor(f=0,g=0){this._ext=0,this._urlId=0,this._ext=f,this._urlId=g}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=d},9092:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Buffer=n.MAX_BUFFER_SIZE=void 0;const d=o(6349),v=o(7226),f=o(3734),g=o(8437),S=o(4634),C=o(511),p=o(643),h=o(4863),_=o(7116);n.MAX_BUFFER_SIZE=4294967295,n.Buffer=class{constructor(l,u,m){this._hasScrollback=l,this._optionsService=u,this._bufferService=m,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=g.DEFAULT_ATTR_DATA.clone(),this.savedCharset=_.DEFAULT_CHARSET,this.markers=[],this._nullCell=C.CellData.fromCharData([0,p.NULL_CELL_CHAR,p.NULL_CELL_WIDTH,p.NULL_CELL_CODE]),this._whitespaceCell=C.CellData.fromCharData([0,p.WHITESPACE_CELL_CHAR,p.WHITESPACE_CELL_WIDTH,p.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new v.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(l){return l?(this._nullCell.fg=l.fg,this._nullCell.bg=l.bg,this._nullCell.extended=l.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(l){return l?(this._whitespaceCell.fg=l.fg,this._whitespaceCell.bg=l.bg,this._whitespaceCell.extended=l.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(l,u){return new g.BufferLine(this._bufferService.cols,this.getNullCell(l),u)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const l=this.ybase+this.y-this.ydisp;return l>=0&&l<this._rows}_getCorrectBufferLength(l){if(!this._hasScrollback)return l;const u=l+this._optionsService.rawOptions.scrollback;return u>n.MAX_BUFFER_SIZE?n.MAX_BUFFER_SIZE:u}fillViewportRows(l){if(this.lines.length===0){l===void 0&&(l=g.DEFAULT_ATTR_DATA);let u=this._rows;for(;u--;)this.lines.push(this.getBlankLine(l))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(l,u){const m=this.getNullCell(g.DEFAULT_ATTR_DATA);let w=0;const y=this._getCorrectBufferLength(u);if(y>this.lines.maxLength&&(this.lines.maxLength=y),this.lines.length>0){if(this._cols<l)for(let b=0;b<this.lines.length;b++)w+=+this.lines.get(b).resize(l,m);let E=0;if(this._rows<u)for(let b=this._rows;b<u;b++)this.lines.length<u+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new g.BufferLine(l,m)):this.ybase>0&&this.lines.length<=this.ybase+this.y+E+1?(this.ybase--,E++,this.ydisp>0&&this.ydisp--):this.lines.push(new g.BufferLine(l,m)));else for(let b=this._rows;b>u;b--)this.lines.length>u+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(y<this.lines.maxLength){const b=this.lines.length-y;b>0&&(this.lines.trimStart(b),this.ybase=Math.max(this.ybase-b,0),this.ydisp=Math.max(this.ydisp-b,0),this.savedY=Math.max(this.savedY-b,0)),this.lines.maxLength=y}this.x=Math.min(this.x,l-1),this.y=Math.min(this.y,u-1),E&&(this.y+=E),this.savedX=Math.min(this.savedX,l-1),this.scrollTop=0}if(this.scrollBottom=u-1,this._isReflowEnabled&&(this._reflow(l,u),this._cols>l))for(let E=0;E<this.lines.length;E++)w+=+this.lines.get(E).resize(l,m);this._cols=l,this._rows=u,this._memoryCleanupQueue.clear(),w>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let l=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,l=!1);let u=0;for(;this._memoryCleanupPosition<this.lines.length;)if(u+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),u>100)return!0;return l}get _isReflowEnabled(){const l=this._optionsService.rawOptions.windowsPty;return l&&l.buildNumber?this._hasScrollback&&l.backend==="conpty"&&l.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(l,u){this._cols!==l&&(l>this._cols?this._reflowLarger(l,u):this._reflowSmaller(l,u))}_reflowLarger(l,u){const m=(0,S.reflowLargerGetLinesToRemove)(this.lines,this._cols,l,this.ybase+this.y,this.getNullCell(g.DEFAULT_ATTR_DATA));if(m.length>0){const w=(0,S.reflowLargerCreateNewLayout)(this.lines,m);(0,S.reflowLargerApplyNewLayout)(this.lines,w.layout),this._reflowLargerAdjustViewport(l,u,w.countRemoved)}}_reflowLargerAdjustViewport(l,u,m){const w=this.getNullCell(g.DEFAULT_ATTR_DATA);let y=m;for(;y-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<u&&this.lines.push(new g.BufferLine(l,w))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-m,0)}_reflowSmaller(l,u){const m=this.getNullCell(g.DEFAULT_ATTR_DATA),w=[];let y=0;for(let E=this.lines.length-1;E>=0;E--){let b=this.lines.get(E);if(!b||!b.isWrapped&&b.getTrimmedLength()<=l)continue;const x=[b];for(;b.isWrapped&&E>0;)b=this.lines.get(--E),x.unshift(b);const A=this.ybase+this.y;if(A>=E&&A<E+x.length)continue;const O=x[x.length-1].getTrimmedLength(),R=(0,S.reflowSmallerGetNewLineLengths)(x,this._cols,l),D=R.length-x.length;let B;B=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+D):Math.max(0,this.lines.length-this.lines.maxLength+D);const U=[];for(let k=0;k<D;k++){const H=this.getBlankLine(g.DEFAULT_ATTR_DATA,!0);U.push(H)}U.length>0&&(w.push({start:E+x.length+y,newLines:U}),y+=U.length),x.push(...U);let N=R.length-1,P=R[N];P===0&&(N--,P=R[N]);let z=x.length-D-1,L=O;for(;z>=0;){const k=Math.min(L,P);if(x[N]===void 0)break;if(x[N].copyCellsFrom(x[z],L-k,P-k,k,!0),P-=k,P===0&&(N--,P=R[N]),L-=k,L===0){z--;const H=Math.max(z,0);L=(0,S.getWrappedLineTrimmedLength)(x,H,this._cols)}}for(let k=0;k<x.length;k++)R[k]<l&&x[k].setCell(R[k],m);let M=D-B;for(;M-- >0;)this.ybase===0?this.y<u-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+y)-u&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+D,this.ybase+u-1)}if(w.length>0){const E=[],b=[];for(let N=0;N<this.lines.length;N++)b.push(this.lines.get(N));const x=this.lines.length;let A=x-1,O=0,R=w[O];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+y);let D=0;for(let N=Math.min(this.lines.maxLength-1,x+y-1);N>=0;N--)if(R&&R.start>A+D){for(let P=R.newLines.length-1;P>=0;P--)this.lines.set(N--,R.newLines[P]);N++,E.push({index:A+1,amount:R.newLines.length}),D+=R.newLines.length,R=w[++O]}else this.lines.set(N,b[A--]);let B=0;for(let N=E.length-1;N>=0;N--)E[N].index+=B,this.lines.onInsertEmitter.fire(E[N]),B+=E[N].amount;const U=Math.max(0,x+y-this.lines.maxLength);U>0&&this.lines.onTrimEmitter.fire(U)}}translateBufferLineToString(l,u,m=0,w){const y=this.lines.get(l);return y?y.translateToString(u,m,w):""}getWrappedRangeForLine(l){let u=l,m=l;for(;u>0&&this.lines.get(u).isWrapped;)u--;for(;m+1<this.lines.length&&this.lines.get(m+1).isWrapped;)m++;return{first:u,last:m}}setupTabStops(l){for(l!=null?this.tabs[l]||(l=this.prevStop(l)):(this.tabs={},l=0);l<this._cols;l+=this._optionsService.rawOptions.tabStopWidth)this.tabs[l]=!0}prevStop(l){for(l==null&&(l=this.x);!this.tabs[--l]&&l>0;);return l>=this._cols?this._cols-1:l<0?0:l}nextStop(l){for(l==null&&(l=this.x);!this.tabs[++l]&&l<this._cols;);return l>=this._cols?this._cols-1:l<0?0:l}clearMarkers(l){this._isClearing=!0;for(let u=0;u<this.markers.length;u++)this.markers[u].line===l&&(this.markers[u].dispose(),this.markers.splice(u--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].dispose(),this.markers.splice(l--,1);this._isClearing=!1}addMarker(l){const u=new h.Marker(l);return this.markers.push(u),u.register(this.lines.onTrim(m=>{u.line-=m,u.line<0&&u.dispose()})),u.register(this.lines.onInsert(m=>{u.line>=m.index&&(u.line+=m.amount)})),u.register(this.lines.onDelete(m=>{u.line>=m.index&&u.line<m.index+m.amount&&u.dispose(),u.line>m.index&&(u.line-=m.amount)})),u.register(u.onDispose(()=>this._removeMarker(u))),u}_removeMarker(l){this._isClearing||this.markers.splice(this.markers.indexOf(l),1)}}},8437:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLine=n.DEFAULT_ATTR_DATA=void 0;const d=o(3734),v=o(511),f=o(643),g=o(482);n.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let S=0;class C{constructor(h,_,l=!1){this.isWrapped=l,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*h);const u=_||v.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let m=0;m<h;++m)this.setCell(m,u);this.length=h}get(h){const _=this._data[3*h+0],l=2097151&_;return[this._data[3*h+1],2097152&_?this._combined[h]:l?(0,g.stringFromCodePoint)(l):"",_>>22,2097152&_?this._combined[h].charCodeAt(this._combined[h].length-1):l]}set(h,_){this._data[3*h+1]=_[f.CHAR_DATA_ATTR_INDEX],_[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[h]=_[1],this._data[3*h+0]=2097152|h|_[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*h+0]=_[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|_[f.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(h){return this._data[3*h+0]>>22}hasWidth(h){return 12582912&this._data[3*h+0]}getFg(h){return this._data[3*h+1]}getBg(h){return this._data[3*h+2]}hasContent(h){return 4194303&this._data[3*h+0]}getCodePoint(h){const _=this._data[3*h+0];return 2097152&_?this._combined[h].charCodeAt(this._combined[h].length-1):2097151&_}isCombined(h){return 2097152&this._data[3*h+0]}getString(h){const _=this._data[3*h+0];return 2097152&_?this._combined[h]:2097151&_?(0,g.stringFromCodePoint)(2097151&_):""}isProtected(h){return 536870912&this._data[3*h+2]}loadCell(h,_){return S=3*h,_.content=this._data[S+0],_.fg=this._data[S+1],_.bg=this._data[S+2],2097152&_.content&&(_.combinedData=this._combined[h]),268435456&_.bg&&(_.extended=this._extendedAttrs[h]),_}setCell(h,_){2097152&_.content&&(this._combined[h]=_.combinedData),268435456&_.bg&&(this._extendedAttrs[h]=_.extended),this._data[3*h+0]=_.content,this._data[3*h+1]=_.fg,this._data[3*h+2]=_.bg}setCellFromCodepoint(h,_,l,u){268435456&u.bg&&(this._extendedAttrs[h]=u.extended),this._data[3*h+0]=_|l<<22,this._data[3*h+1]=u.fg,this._data[3*h+2]=u.bg}addCodepointToCell(h,_,l){let u=this._data[3*h+0];2097152&u?this._combined[h]+=(0,g.stringFromCodePoint)(_):2097151&u?(this._combined[h]=(0,g.stringFromCodePoint)(2097151&u)+(0,g.stringFromCodePoint)(_),u&=-2097152,u|=2097152):u=_|4194304,l&&(u&=-12582913,u|=l<<22),this._data[3*h+0]=u}insertCells(h,_,l){if((h%=this.length)&&this.getWidth(h-1)===2&&this.setCellFromCodepoint(h-1,0,1,l),_<this.length-h){const u=new v.CellData;for(let m=this.length-h-_-1;m>=0;--m)this.setCell(h+_+m,this.loadCell(h+m,u));for(let m=0;m<_;++m)this.setCell(h+m,l)}else for(let u=h;u<this.length;++u)this.setCell(u,l);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,l)}deleteCells(h,_,l){if(h%=this.length,_<this.length-h){const u=new v.CellData;for(let m=0;m<this.length-h-_;++m)this.setCell(h+m,this.loadCell(h+_+m,u));for(let m=this.length-_;m<this.length;++m)this.setCell(m,l)}else for(let u=h;u<this.length;++u)this.setCell(u,l);h&&this.getWidth(h-1)===2&&this.setCellFromCodepoint(h-1,0,1,l),this.getWidth(h)!==0||this.hasContent(h)||this.setCellFromCodepoint(h,0,1,l)}replaceCells(h,_,l,u=!1){if(u)for(h&&this.getWidth(h-1)===2&&!this.isProtected(h-1)&&this.setCellFromCodepoint(h-1,0,1,l),_<this.length&&this.getWidth(_-1)===2&&!this.isProtected(_)&&this.setCellFromCodepoint(_,0,1,l);h<_&&h<this.length;)this.isProtected(h)||this.setCell(h,l),h++;else for(h&&this.getWidth(h-1)===2&&this.setCellFromCodepoint(h-1,0,1,l),_<this.length&&this.getWidth(_-1)===2&&this.setCellFromCodepoint(_,0,1,l);h<_&&h<this.length;)this.setCell(h++,l)}resize(h,_){if(h===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const l=3*h;if(h>this.length){if(this._data.buffer.byteLength>=4*l)this._data=new Uint32Array(this._data.buffer,0,l);else{const u=new Uint32Array(l);u.set(this._data),this._data=u}for(let u=this.length;u<h;++u)this.setCell(u,_)}else{this._data=this._data.subarray(0,l);const u=Object.keys(this._combined);for(let w=0;w<u.length;w++){const y=parseInt(u[w],10);y>=h&&delete this._combined[y]}const m=Object.keys(this._extendedAttrs);for(let w=0;w<m.length;w++){const y=parseInt(m[w],10);y>=h&&delete this._extendedAttrs[y]}}return this.length=h,4*l*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const h=new Uint32Array(this._data.length);return h.set(this._data),this._data=h,1}return 0}fill(h,_=!1){if(_)for(let l=0;l<this.length;++l)this.isProtected(l)||this.setCell(l,h);else{this._combined={},this._extendedAttrs={};for(let l=0;l<this.length;++l)this.setCell(l,h)}}copyFrom(h){this.length!==h.length?this._data=new Uint32Array(h._data):this._data.set(h._data),this.length=h.length,this._combined={};for(const _ in h._combined)this._combined[_]=h._combined[_];this._extendedAttrs={};for(const _ in h._extendedAttrs)this._extendedAttrs[_]=h._extendedAttrs[_];this.isWrapped=h.isWrapped}clone(){const h=new C(0);h._data=new Uint32Array(this._data),h.length=this.length;for(const _ in this._combined)h._combined[_]=this._combined[_];for(const _ in this._extendedAttrs)h._extendedAttrs[_]=this._extendedAttrs[_];return h.isWrapped=this.isWrapped,h}getTrimmedLength(){for(let h=this.length-1;h>=0;--h)if(4194303&this._data[3*h+0])return h+(this._data[3*h+0]>>22);return 0}getNoBgTrimmedLength(){for(let h=this.length-1;h>=0;--h)if(4194303&this._data[3*h+0]||50331648&this._data[3*h+2])return h+(this._data[3*h+0]>>22);return 0}copyCellsFrom(h,_,l,u,m){const w=h._data;if(m)for(let E=u-1;E>=0;E--){for(let b=0;b<3;b++)this._data[3*(l+E)+b]=w[3*(_+E)+b];268435456&w[3*(_+E)+2]&&(this._extendedAttrs[l+E]=h._extendedAttrs[_+E])}else for(let E=0;E<u;E++){for(let b=0;b<3;b++)this._data[3*(l+E)+b]=w[3*(_+E)+b];268435456&w[3*(_+E)+2]&&(this._extendedAttrs[l+E]=h._extendedAttrs[_+E])}const y=Object.keys(h._combined);for(let E=0;E<y.length;E++){const b=parseInt(y[E],10);b>=_&&(this._combined[b-_+l]=h._combined[b])}}translateToString(h,_,l,u){_=_??0,l=l??this.length,h&&(l=Math.min(l,this.getTrimmedLength())),u&&(u.length=0);let m="";for(;_<l;){const w=this._data[3*_+0],y=2097151&w,E=2097152&w?this._combined[_]:y?(0,g.stringFromCodePoint)(y):f.WHITESPACE_CELL_CHAR;if(m+=E,u)for(let b=0;b<E.length;++b)u.push(_);_+=w>>22||1}return u&&u.push(_),m}}n.BufferLine=C},4841:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.getRangeLength=void 0,n.getRangeLength=function(o,d){if(o.start.y>o.end.y)throw new Error(`Buffer range end (${o.end.x}, ${o.end.y}) cannot be before start (${o.start.x}, ${o.start.y})`);return d*(o.end.y-o.start.y)+(o.end.x-o.start.x+1)}},4634:(c,n)=>{function o(d,v,f){if(v===d.length-1)return d[v].getTrimmedLength();const g=!d[v].hasContent(f-1)&&d[v].getWidth(f-1)===1,S=d[v+1].getWidth(0)===2;return g&&S?f-1:f}Object.defineProperty(n,"__esModule",{value:!0}),n.getWrappedLineTrimmedLength=n.reflowSmallerGetNewLineLengths=n.reflowLargerApplyNewLayout=n.reflowLargerCreateNewLayout=n.reflowLargerGetLinesToRemove=void 0,n.reflowLargerGetLinesToRemove=function(d,v,f,g,S){const C=[];for(let p=0;p<d.length-1;p++){let h=p,_=d.get(++h);if(!_.isWrapped)continue;const l=[d.get(p)];for(;h<d.length&&_.isWrapped;)l.push(_),_=d.get(++h);if(g>=p&&g<h){p+=l.length-1;continue}let u=0,m=o(l,u,v),w=1,y=0;for(;w<l.length;){const b=o(l,w,v),x=b-y,A=f-m,O=Math.min(x,A);l[u].copyCellsFrom(l[w],y,m,O,!1),m+=O,m===f&&(u++,m=0),y+=O,y===b&&(w++,y=0),m===0&&u!==0&&l[u-1].getWidth(f-1)===2&&(l[u].copyCellsFrom(l[u-1],f-1,m++,1,!1),l[u-1].setCell(f-1,S))}l[u].replaceCells(m,f,S);let E=0;for(let b=l.length-1;b>0&&(b>u||l[b].getTrimmedLength()===0);b--)E++;E>0&&(C.push(p+l.length-E),C.push(E)),p+=l.length-1}return C},n.reflowLargerCreateNewLayout=function(d,v){const f=[];let g=0,S=v[g],C=0;for(let p=0;p<d.length;p++)if(S===p){const h=v[++g];d.onDeleteEmitter.fire({index:p-C,amount:h}),p+=h-1,C+=h,S=v[++g]}else f.push(p);return{layout:f,countRemoved:C}},n.reflowLargerApplyNewLayout=function(d,v){const f=[];for(let g=0;g<v.length;g++)f.push(d.get(v[g]));for(let g=0;g<f.length;g++)d.set(g,f[g]);d.length=v.length},n.reflowSmallerGetNewLineLengths=function(d,v,f){const g=[],S=d.map((_,l)=>o(d,l,v)).reduce((_,l)=>_+l);let C=0,p=0,h=0;for(;h<S;){if(S-h<f){g.push(S-h);break}C+=f;const _=o(d,p,v);C>_&&(C-=_,p++);const l=d[p].getWidth(C-1)===2;l&&C--;const u=l?f-1:f;g.push(u),h+=u}return g},n.getWrappedLineTrimmedLength=o},5295:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferSet=void 0;const d=o(8460),v=o(844),f=o(9092);class g extends v.Disposable{constructor(C,p){super(),this._optionsService=C,this._bufferService=p,this._onBufferActivate=this.register(new d.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 f.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new f.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,p){this._normal.resize(C,p),this._alt.resize(C,p),this.setupTabStops(C)}setupTabStops(C){this._normal.setupTabStops(C),this._alt.setupTabStops(C)}}n.BufferSet=g},511:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const d=o(482),v=o(643),f=o(3734);class g extends f.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new f.ExtendedAttrs,this.combinedData=""}static fromCharData(C){const p=new g;return p.setFromCharData(C),p}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(C){this.fg=C[v.CHAR_DATA_ATTR_INDEX],this.bg=0;let p=!1;if(C[v.CHAR_DATA_CHAR_INDEX].length>2)p=!0;else if(C[v.CHAR_DATA_CHAR_INDEX].length===2){const h=C[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=h&&h<=56319){const _=C[v.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=_&&_<=57343?this.content=1024*(h-55296)+_-56320+65536|C[v.CHAR_DATA_WIDTH_INDEX]<<22:p=!0}else p=!0}else this.content=C[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|C[v.CHAR_DATA_WIDTH_INDEX]<<22;p&&(this.combinedData=C[v.CHAR_DATA_CHAR_INDEX],this.content=2097152|C[v.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=g},643:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WHITESPACE_CELL_CODE=n.WHITESPACE_CELL_WIDTH=n.WHITESPACE_CELL_CHAR=n.NULL_CELL_CODE=n.NULL_CELL_WIDTH=n.NULL_CELL_CHAR=n.CHAR_DATA_CODE_INDEX=n.CHAR_DATA_WIDTH_INDEX=n.CHAR_DATA_CHAR_INDEX=n.CHAR_DATA_ATTR_INDEX=n.DEFAULT_EXT=n.DEFAULT_ATTR=n.DEFAULT_COLOR=void 0,n.DEFAULT_COLOR=0,n.DEFAULT_ATTR=256|n.DEFAULT_COLOR<<9,n.DEFAULT_EXT=0,n.CHAR_DATA_ATTR_INDEX=0,n.CHAR_DATA_CHAR_INDEX=1,n.CHAR_DATA_WIDTH_INDEX=2,n.CHAR_DATA_CODE_INDEX=3,n.NULL_CELL_CHAR="",n.NULL_CELL_WIDTH=1,n.NULL_CELL_CODE=0,n.WHITESPACE_CELL_CHAR=" ",n.WHITESPACE_CELL_WIDTH=1,n.WHITESPACE_CELL_CODE=32},4863:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Marker=void 0;const d=o(8460),v=o(844);class f{get id(){return this._id}constructor(S){this.line=S,this.isDisposed=!1,this._disposables=[],this._id=f._nextId++,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,v.disposeArray)(this._disposables),this._disposables.length=0)}register(S){return this._disposables.push(S),S}}n.Marker=f,f._nextId=1},7116:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_CHARSET=n.CHARSETS=void 0,n.CHARSETS={},n.DEFAULT_CHARSET=n.CHARSETS.B,n.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:"≥","{":"π","|":"≠","}":"£","~":"·"},n.CHARSETS.A={"#":"£"},n.CHARSETS.B=void 0,n.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},n.CHARSETS.C=n.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},n.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},n.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},n.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},n.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},n.CHARSETS.E=n.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},n.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},n.CHARSETS.H=n.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},n.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(c,n)=>{var o,d,v;Object.defineProperty(n,"__esModule",{value:!0}),n.C1_ESCAPED=n.C1=n.C0=void 0,function(f){f.NUL="\0",f.SOH="",f.STX="",f.ETX="",f.EOT="",f.ENQ="",f.ACK="",f.BEL="\x07",f.BS="\b",f.HT=" ",f.LF=`
155
+ `,f.VT="\v",f.FF="\f",f.CR="\r",f.SO="",f.SI="",f.DLE="",f.DC1="",f.DC2="",f.DC3="",f.DC4="",f.NAK="",f.SYN="",f.ETB="",f.CAN="",f.EM="",f.SUB="",f.ESC="\x1B",f.FS="",f.GS="",f.RS="",f.US="",f.SP=" ",f.DEL=""}(o||(n.C0=o={})),function(f){f.PAD="€",f.HOP="",f.BPH="‚",f.NBH="ƒ",f.IND="„",f.NEL="…",f.SSA="†",f.ESA="‡",f.HTS="ˆ",f.HTJ="‰",f.VTS="Š",f.PLD="‹",f.PLU="Œ",f.RI="",f.SS2="Ž",f.SS3="",f.DCS="",f.PU1="‘",f.PU2="’",f.STS="“",f.CCH="”",f.MW="•",f.SPA="–",f.EPA="—",f.SOS="˜",f.SGCI="™",f.SCI="š",f.CSI="›",f.ST="œ",f.OSC="",f.PM="ž",f.APC="Ÿ"}(d||(n.C1=d={})),function(f){f.ST=`${o.ESC}\\`}(v||(n.C1_ESCAPED=v={}))},7399:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.evaluateKeyboardEvent=void 0;const d=o(2584),v={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:["'",'"']};n.evaluateKeyboardEvent=function(f,g,S,C){const p={type:0,cancel:!1,key:void 0},h=(f.shiftKey?1:0)|(f.altKey?2:0)|(f.ctrlKey?4:0)|(f.metaKey?8:0);switch(f.keyCode){case 0:f.key==="UIKeyInputUpArrow"?p.key=g?d.C0.ESC+"OA":d.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?p.key=g?d.C0.ESC+"OD":d.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?p.key=g?d.C0.ESC+"OC":d.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(p.key=g?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:p.key=f.ctrlKey?"\b":d.C0.DEL,f.altKey&&(p.key=d.C0.ESC+p.key);break;case 9:if(f.shiftKey){p.key=d.C0.ESC+"[Z";break}p.key=d.C0.HT,p.cancel=!0;break;case 13:p.key=f.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,p.cancel=!0;break;case 27:p.key=d.C0.ESC,f.altKey&&(p.key=d.C0.ESC+d.C0.ESC),p.cancel=!0;break;case 37:if(f.metaKey)break;h?(p.key=d.C0.ESC+"[1;"+(h+1)+"D",p.key===d.C0.ESC+"[1;3D"&&(p.key=d.C0.ESC+(S?"b":"[1;5D"))):p.key=g?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(f.metaKey)break;h?(p.key=d.C0.ESC+"[1;"+(h+1)+"C",p.key===d.C0.ESC+"[1;3C"&&(p.key=d.C0.ESC+(S?"f":"[1;5C"))):p.key=g?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(f.metaKey)break;h?(p.key=d.C0.ESC+"[1;"+(h+1)+"A",S||p.key!==d.C0.ESC+"[1;3A"||(p.key=d.C0.ESC+"[1;5A")):p.key=g?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(f.metaKey)break;h?(p.key=d.C0.ESC+"[1;"+(h+1)+"B",S||p.key!==d.C0.ESC+"[1;3B"||(p.key=d.C0.ESC+"[1;5B")):p.key=g?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(p.key=d.C0.ESC+"[2~");break;case 46:p.key=h?d.C0.ESC+"[3;"+(h+1)+"~":d.C0.ESC+"[3~";break;case 36:p.key=h?d.C0.ESC+"[1;"+(h+1)+"H":g?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:p.key=h?d.C0.ESC+"[1;"+(h+1)+"F":g?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:f.shiftKey?p.type=2:f.ctrlKey?p.key=d.C0.ESC+"[5;"+(h+1)+"~":p.key=d.C0.ESC+"[5~";break;case 34:f.shiftKey?p.type=3:f.ctrlKey?p.key=d.C0.ESC+"[6;"+(h+1)+"~":p.key=d.C0.ESC+"[6~";break;case 112:p.key=h?d.C0.ESC+"[1;"+(h+1)+"P":d.C0.ESC+"OP";break;case 113:p.key=h?d.C0.ESC+"[1;"+(h+1)+"Q":d.C0.ESC+"OQ";break;case 114:p.key=h?d.C0.ESC+"[1;"+(h+1)+"R":d.C0.ESC+"OR";break;case 115:p.key=h?d.C0.ESC+"[1;"+(h+1)+"S":d.C0.ESC+"OS";break;case 116:p.key=h?d.C0.ESC+"[15;"+(h+1)+"~":d.C0.ESC+"[15~";break;case 117:p.key=h?d.C0.ESC+"[17;"+(h+1)+"~":d.C0.ESC+"[17~";break;case 118:p.key=h?d.C0.ESC+"[18;"+(h+1)+"~":d.C0.ESC+"[18~";break;case 119:p.key=h?d.C0.ESC+"[19;"+(h+1)+"~":d.C0.ESC+"[19~";break;case 120:p.key=h?d.C0.ESC+"[20;"+(h+1)+"~":d.C0.ESC+"[20~";break;case 121:p.key=h?d.C0.ESC+"[21;"+(h+1)+"~":d.C0.ESC+"[21~";break;case 122:p.key=h?d.C0.ESC+"[23;"+(h+1)+"~":d.C0.ESC+"[23~";break;case 123:p.key=h?d.C0.ESC+"[24;"+(h+1)+"~":d.C0.ESC+"[24~";break;default:if(!f.ctrlKey||f.shiftKey||f.altKey||f.metaKey)if(S&&!C||!f.altKey||f.metaKey)!S||f.altKey||f.ctrlKey||f.shiftKey||!f.metaKey?f.key&&!f.ctrlKey&&!f.altKey&&!f.metaKey&&f.keyCode>=48&&f.key.length===1?p.key=f.key:f.key&&f.ctrlKey&&(f.key==="_"&&(p.key=d.C0.US),f.key==="@"&&(p.key=d.C0.NUL)):f.keyCode===65&&(p.type=1);else{const _=v[f.keyCode],l=_==null?void 0:_[f.shiftKey?1:0];if(l)p.key=d.C0.ESC+l;else if(f.keyCode>=65&&f.keyCode<=90){const u=f.ctrlKey?f.keyCode-64:f.keyCode+32;let m=String.fromCharCode(u);f.shiftKey&&(m=m.toUpperCase()),p.key=d.C0.ESC+m}else if(f.keyCode===32)p.key=d.C0.ESC+(f.ctrlKey?d.C0.NUL:" ");else if(f.key==="Dead"&&f.code.startsWith("Key")){let u=f.code.slice(3,4);f.shiftKey||(u=u.toLowerCase()),p.key=d.C0.ESC+u,p.cancel=!0}}else f.keyCode>=65&&f.keyCode<=90?p.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?p.key=d.C0.NUL:f.keyCode>=51&&f.keyCode<=55?p.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?p.key=d.C0.DEL:f.keyCode===219?p.key=d.C0.ESC:f.keyCode===220?p.key=d.C0.FS:f.keyCode===221&&(p.key=d.C0.GS)}return p}},482:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(o){return o>65535?(o-=65536,String.fromCharCode(55296+(o>>10))+String.fromCharCode(o%1024+56320)):String.fromCharCode(o)},n.utf32ToString=function(o,d=0,v=o.length){let f="";for(let g=d;g<v;++g){let S=o[g];S>65535?(S-=65536,f+=String.fromCharCode(55296+(S>>10))+String.fromCharCode(S%1024+56320)):f+=String.fromCharCode(S)}return f},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(o,d){const v=o.length;if(!v)return 0;let f=0,g=0;if(this._interim){const S=o.charCodeAt(g++);56320<=S&&S<=57343?d[f++]=1024*(this._interim-55296)+S-56320+65536:(d[f++]=this._interim,d[f++]=S),this._interim=0}for(let S=g;S<v;++S){const C=o.charCodeAt(S);if(55296<=C&&C<=56319){if(++S>=v)return this._interim=C,f;const p=o.charCodeAt(S);56320<=p&&p<=57343?d[f++]=1024*(C-55296)+p-56320+65536:(d[f++]=C,d[f++]=p)}else C!==65279&&(d[f++]=C)}return f}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(o,d){const v=o.length;if(!v)return 0;let f,g,S,C,p=0,h=0,_=0;if(this.interim[0]){let m=!1,w=this.interim[0];w&=(224&w)==192?31:(240&w)==224?15:7;let y,E=0;for(;(y=63&this.interim[++E])&&E<4;)w<<=6,w|=y;const b=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,x=b-E;for(;_<x;){if(_>=v)return 0;if(y=o[_++],(192&y)!=128){_--,m=!0;break}this.interim[E++]=y,w<<=6,w|=63&y}m||(b===2?w<128?_--:d[p++]=w:b===3?w<2048||w>=55296&&w<=57343||w===65279||(d[p++]=w):w<65536||w>1114111||(d[p++]=w)),this.interim.fill(0)}const l=v-4;let u=_;for(;u<v;){for(;!(!(u<l)||128&(f=o[u])||128&(g=o[u+1])||128&(S=o[u+2])||128&(C=o[u+3]));)d[p++]=f,d[p++]=g,d[p++]=S,d[p++]=C,u+=4;if(f=o[u++],f<128)d[p++]=f;else if((224&f)==192){if(u>=v)return this.interim[0]=f,p;if(g=o[u++],(192&g)!=128){u--;continue}if(h=(31&f)<<6|63&g,h<128){u--;continue}d[p++]=h}else if((240&f)==224){if(u>=v)return this.interim[0]=f,p;if(g=o[u++],(192&g)!=128){u--;continue}if(u>=v)return this.interim[0]=f,this.interim[1]=g,p;if(S=o[u++],(192&S)!=128){u--;continue}if(h=(15&f)<<12|(63&g)<<6|63&S,h<2048||h>=55296&&h<=57343||h===65279)continue;d[p++]=h}else if((248&f)==240){if(u>=v)return this.interim[0]=f,p;if(g=o[u++],(192&g)!=128){u--;continue}if(u>=v)return this.interim[0]=f,this.interim[1]=g,p;if(S=o[u++],(192&S)!=128){u--;continue}if(u>=v)return this.interim[0]=f,this.interim[1]=g,this.interim[2]=S,p;if(C=o[u++],(192&C)!=128){u--;continue}if(h=(7&f)<<18|(63&g)<<12|(63&S)<<6|63&C,h<65536||h>1114111)continue;d[p++]=h}}return p}}},225:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeV6=void 0;const d=o(1480),v=[[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]],f=[[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 g;n.UnicodeV6=class{constructor(){if(this.version="6",!g){g=new Uint8Array(65536),g.fill(1),g[0]=0,g.fill(0,1,32),g.fill(0,127,160),g.fill(2,4352,4448),g[9001]=2,g[9002]=2,g.fill(2,11904,42192),g[12351]=1,g.fill(2,44032,55204),g.fill(2,63744,64256),g.fill(2,65040,65050),g.fill(2,65072,65136),g.fill(2,65280,65377),g.fill(2,65504,65511);for(let S=0;S<v.length;++S)g.fill(0,v[S][0],v[S][1]+1)}}wcwidth(S){return S<32?0:S<127?1:S<65536?g[S]:function(C,p){let h,_=0,l=p.length-1;if(C<p[0][0]||C>p[l][1])return!1;for(;l>=_;)if(h=_+l>>1,C>p[h][1])_=h+1;else{if(!(C<p[h][0]))return!0;l=h-1}return!1}(S,f)?0:S>=131072&&S<=196605||S>=196608&&S<=262141?2:1}charProperties(S,C){let p=this.wcwidth(S),h=p===0&&C!==0;if(h){const _=d.UnicodeService.extractWidth(C);_===0?h=!1:_>p&&(p=_)}return d.UnicodeService.createPropertyValue(0,p,h)}}},5981:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WriteBuffer=void 0;const d=o(8460),v=o(844);class f extends v.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 d.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 p;for(this._isSyncWriting=!0;p=this._writeBuffer.shift();){this._action(p);const h=this._callbacks.shift();h&&h()}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 p=S||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const h=this._writeBuffer[this._bufferOffset],_=this._action(h,C);if(_){const u=m=>Date.now()-p>=12?setTimeout(()=>this._innerWrite(0,m)):this._innerWrite(p,m);return void _.catch(m=>(queueMicrotask(()=>{throw m}),Promise.resolve(!1))).then(u)}const l=this._callbacks[this._bufferOffset];if(l&&l(),this._bufferOffset++,this._pendingData-=h.length,Date.now()-p>=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()}}n.WriteBuffer=f},5941:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.toRgbString=n.parseColor=void 0;const o=/^([\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})$/,d=/^[\da-f]+$/;function v(f,g){const S=f.toString(16),C=S.length<2?"0"+S:S;switch(g){case 4:return S[0];case 8:return C;case 12:return(C+C).slice(0,3);default:return C+C}}n.parseColor=function(f){if(!f)return;let g=f.toLowerCase();if(g.indexOf("rgb:")===0){g=g.slice(4);const S=o.exec(g);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(g.indexOf("#")===0&&(g=g.slice(1),d.exec(g)&&[3,6,9,12].includes(g.length))){const S=g.length/3,C=[0,0,0];for(let p=0;p<3;++p){const h=parseInt(g.slice(S*p,S*p+S),16);C[p]=S===1?h<<4:S===2?h:S===3?h>>4:h>>8}return C}},n.toRgbString=function(f,g=16){const[S,C,p]=f;return`rgb:${v(S,g)}/${v(C,g)}/${v(p,g)}`}},5770:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.PAYLOAD_LIMIT=void 0,n.PAYLOAD_LIMIT=1e7},6351:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DcsHandler=n.DcsParser=void 0;const d=o(482),v=o(8742),f=o(5770),g=[];n.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=g,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=g}registerHandler(C,p){this._handlers[C]===void 0&&(this._handlers[C]=[]);const h=this._handlers[C];return h.push(p),{dispose:()=>{const _=h.indexOf(p);_!==-1&&h.splice(_,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=g,this._ident=0}hook(C,p){if(this.reset(),this._ident=C,this._active=this._handlers[C]||g,this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].hook(p);else this._handlerFb(this._ident,"HOOK",p)}put(C,p,h){if(this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].put(C,p,h);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(C,p,h))}unhook(C,p=!0){if(this._active.length){let h=!1,_=this._active.length-1,l=!1;if(this._stack.paused&&(_=this._stack.loopPosition-1,h=p,l=this._stack.fallThrough,this._stack.paused=!1),!l&&h===!1){for(;_>=0&&(h=this._active[_].unhook(C),h!==!0);_--)if(h instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!1,h;_--}for(;_>=0;_--)if(h=this._active[_].unhook(!1),h instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!0,h}else this._handlerFb(this._ident,"UNHOOK",C);this._active=g,this._ident=0}};const S=new v.Params;S.addParam(0),n.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,p,h){this._hitLimit||(this._data+=(0,d.utf32ToString)(C,p,h),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(C){let p=!1;if(this._hitLimit)p=!1;else if(C&&(p=this._handler(this._data,this._params),p instanceof Promise))return p.then(h=>(this._params=S,this._data="",this._hitLimit=!1,h));return this._params=S,this._data="",this._hitLimit=!1,p}}},2015:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.EscapeSequenceParser=n.VT500_TRANSITION_TABLE=n.TransitionTable=void 0;const d=o(844),v=o(8742),f=o(6242),g=o(6351);class S{constructor(_){this.table=new Uint8Array(_)}setDefault(_,l){this.table.fill(_<<4|l)}add(_,l,u,m){this.table[l<<8|_]=u<<4|m}addMany(_,l,u,m){for(let w=0;w<_.length;w++)this.table[l<<8|_[w]]=u<<4|m}}n.TransitionTable=S;const C=160;n.VT500_TRANSITION_TABLE=function(){const h=new S(4095),_=Array.apply(null,Array(256)).map((E,b)=>b),l=(E,b)=>_.slice(E,b),u=l(32,127),m=l(0,24);m.push(25),m.push.apply(m,l(28,32));const w=l(0,14);let y;for(y in h.setDefault(1,0),h.addMany(u,0,2,0),w)h.addMany([24,26,153,154],y,3,0),h.addMany(l(128,144),y,3,0),h.addMany(l(144,152),y,3,0),h.add(156,y,0,0),h.add(27,y,11,1),h.add(157,y,4,8),h.addMany([152,158,159],y,0,7),h.add(155,y,11,3),h.add(144,y,11,9);return h.addMany(m,0,3,0),h.addMany(m,1,3,1),h.add(127,1,0,1),h.addMany(m,8,0,8),h.addMany(m,3,3,3),h.add(127,3,0,3),h.addMany(m,4,3,4),h.add(127,4,0,4),h.addMany(m,6,3,6),h.addMany(m,5,3,5),h.add(127,5,0,5),h.addMany(m,2,3,2),h.add(127,2,0,2),h.add(93,1,4,8),h.addMany(u,8,5,8),h.add(127,8,5,8),h.addMany([156,27,24,26,7],8,6,0),h.addMany(l(28,32),8,0,8),h.addMany([88,94,95],1,0,7),h.addMany(u,7,0,7),h.addMany(m,7,0,7),h.add(156,7,0,0),h.add(127,7,0,7),h.add(91,1,11,3),h.addMany(l(64,127),3,7,0),h.addMany(l(48,60),3,8,4),h.addMany([60,61,62,63],3,9,4),h.addMany(l(48,60),4,8,4),h.addMany(l(64,127),4,7,0),h.addMany([60,61,62,63],4,0,6),h.addMany(l(32,64),6,0,6),h.add(127,6,0,6),h.addMany(l(64,127),6,0,0),h.addMany(l(32,48),3,9,5),h.addMany(l(32,48),5,9,5),h.addMany(l(48,64),5,0,6),h.addMany(l(64,127),5,7,0),h.addMany(l(32,48),4,9,5),h.addMany(l(32,48),1,9,2),h.addMany(l(32,48),2,9,2),h.addMany(l(48,127),2,10,0),h.addMany(l(48,80),1,10,0),h.addMany(l(81,88),1,10,0),h.addMany([89,90,92],1,10,0),h.addMany(l(96,127),1,10,0),h.add(80,1,11,9),h.addMany(m,9,0,9),h.add(127,9,0,9),h.addMany(l(28,32),9,0,9),h.addMany(l(32,48),9,9,12),h.addMany(l(48,60),9,8,10),h.addMany([60,61,62,63],9,9,10),h.addMany(m,11,0,11),h.addMany(l(32,128),11,0,11),h.addMany(l(28,32),11,0,11),h.addMany(m,10,0,10),h.add(127,10,0,10),h.addMany(l(28,32),10,0,10),h.addMany(l(48,60),10,8,10),h.addMany([60,61,62,63],10,0,11),h.addMany(l(32,48),10,9,12),h.addMany(m,12,0,12),h.add(127,12,0,12),h.addMany(l(28,32),12,0,12),h.addMany(l(32,48),12,9,12),h.addMany(l(48,64),12,0,11),h.addMany(l(64,127),12,12,13),h.addMany(l(64,127),10,12,13),h.addMany(l(64,127),9,12,13),h.addMany(m,13,13,13),h.addMany(u,13,13,13),h.add(127,13,0,13),h.addMany([27,156,24,26],13,14,0),h.add(C,0,2,0),h.add(C,8,5,8),h.add(C,6,0,6),h.add(C,11,0,11),h.add(C,13,13,13),h}();class p extends d.Disposable{constructor(_=n.VT500_TRANSITION_TABLE){super(),this._transitions=_,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new v.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(l,u,m)=>{},this._executeHandlerFb=l=>{},this._csiHandlerFb=(l,u)=>{},this._escHandlerFb=l=>{},this._errorHandlerFb=l=>l,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new f.OscParser),this._dcsParser=this.register(new g.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(_,l=[64,126]){let u=0;if(_.prefix){if(_.prefix.length>1)throw new Error("only one byte as prefix supported");if(u=_.prefix.charCodeAt(0),u&&60>u||u>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(_.intermediates){if(_.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let w=0;w<_.intermediates.length;++w){const y=_.intermediates.charCodeAt(w);if(32>y||y>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");u<<=8,u|=y}}if(_.final.length!==1)throw new Error("final must be a single byte");const m=_.final.charCodeAt(0);if(l[0]>m||m>l[1])throw new Error(`final must be in range ${l[0]} .. ${l[1]}`);return u<<=8,u|=m,u}identToString(_){const l=[];for(;_;)l.push(String.fromCharCode(255&_)),_>>=8;return l.reverse().join("")}setPrintHandler(_){this._printHandler=_}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(_,l){const u=this._identifier(_,[48,126]);this._escHandlers[u]===void 0&&(this._escHandlers[u]=[]);const m=this._escHandlers[u];return m.push(l),{dispose:()=>{const w=m.indexOf(l);w!==-1&&m.splice(w,1)}}}clearEscHandler(_){this._escHandlers[this._identifier(_,[48,126])]&&delete this._escHandlers[this._identifier(_,[48,126])]}setEscHandlerFallback(_){this._escHandlerFb=_}setExecuteHandler(_,l){this._executeHandlers[_.charCodeAt(0)]=l}clearExecuteHandler(_){this._executeHandlers[_.charCodeAt(0)]&&delete this._executeHandlers[_.charCodeAt(0)]}setExecuteHandlerFallback(_){this._executeHandlerFb=_}registerCsiHandler(_,l){const u=this._identifier(_);this._csiHandlers[u]===void 0&&(this._csiHandlers[u]=[]);const m=this._csiHandlers[u];return m.push(l),{dispose:()=>{const w=m.indexOf(l);w!==-1&&m.splice(w,1)}}}clearCsiHandler(_){this._csiHandlers[this._identifier(_)]&&delete this._csiHandlers[this._identifier(_)]}setCsiHandlerFallback(_){this._csiHandlerFb=_}registerDcsHandler(_,l){return this._dcsParser.registerHandler(this._identifier(_),l)}clearDcsHandler(_){this._dcsParser.clearHandler(this._identifier(_))}setDcsHandlerFallback(_){this._dcsParser.setHandlerFallback(_)}registerOscHandler(_,l){return this._oscParser.registerHandler(_,l)}clearOscHandler(_){this._oscParser.clearHandler(_)}setOscHandlerFallback(_){this._oscParser.setHandlerFallback(_)}setErrorHandler(_){this._errorHandler=_}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(_,l,u,m,w){this._parseStack.state=_,this._parseStack.handlers=l,this._parseStack.handlerPos=u,this._parseStack.transition=m,this._parseStack.chunkPos=w}parse(_,l,u){let m,w=0,y=0,E=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,E=this._parseStack.chunkPos+1;else{if(u===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const b=this._parseStack.handlers;let x=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(u===!1&&x>-1){for(;x>=0&&(m=b[x](this._params),m!==!0);x--)if(m instanceof Promise)return this._parseStack.handlerPos=x,m}this._parseStack.handlers=[];break;case 4:if(u===!1&&x>-1){for(;x>=0&&(m=b[x](),m!==!0);x--)if(m instanceof Promise)return this._parseStack.handlerPos=x,m}this._parseStack.handlers=[];break;case 6:if(w=_[this._parseStack.chunkPos],m=this._dcsParser.unhook(w!==24&&w!==26,u),m)return m;w===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(w=_[this._parseStack.chunkPos],m=this._oscParser.end(w!==24&&w!==26,u),m)return m;w===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,E=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let b=E;b<l;++b){switch(w=_[b],y=this._transitions.table[this.currentState<<8|(w<160?w:C)],y>>4){case 2:for(let D=b+1;;++D){if(D>=l||(w=_[D])<32||w>126&&w<C){this._printHandler(_,b,D),b=D-1;break}if(++D>=l||(w=_[D])<32||w>126&&w<C){this._printHandler(_,b,D),b=D-1;break}if(++D>=l||(w=_[D])<32||w>126&&w<C){this._printHandler(_,b,D),b=D-1;break}if(++D>=l||(w=_[D])<32||w>126&&w<C){this._printHandler(_,b,D),b=D-1;break}}break;case 3:this._executeHandlers[w]?this._executeHandlers[w]():this._executeHandlerFb(w),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:b,code:w,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const x=this._csiHandlers[this._collect<<8|w];let A=x?x.length-1:-1;for(;A>=0&&(m=x[A](this._params),m!==!0);A--)if(m instanceof Promise)return this._preserveStack(3,x,A,y,b),m;A<0&&this._csiHandlerFb(this._collect<<8|w,this._params),this.precedingJoinState=0;break;case 8:do switch(w){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(w-48)}while(++b<l&&(w=_[b])>47&&w<60);b--;break;case 9:this._collect<<=8,this._collect|=w;break;case 10:const O=this._escHandlers[this._collect<<8|w];let R=O?O.length-1:-1;for(;R>=0&&(m=O[R](),m!==!0);R--)if(m instanceof Promise)return this._preserveStack(4,O,R,y,b),m;R<0&&this._escHandlerFb(this._collect<<8|w),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|w,this._params);break;case 13:for(let D=b+1;;++D)if(D>=l||(w=_[D])===24||w===26||w===27||w>127&&w<C){this._dcsParser.put(_,b,D),b=D-1;break}break;case 14:if(m=this._dcsParser.unhook(w!==24&&w!==26),m)return this._preserveStack(6,[],0,y,b),m;w===27&&(y|=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 D=b+1;;D++)if(D>=l||(w=_[D])<32||w>127&&w<C){this._oscParser.put(_,b,D),b=D-1;break}break;case 6:if(m=this._oscParser.end(w!==24&&w!==26),m)return this._preserveStack(5,[],0,y,b),m;w===27&&(y|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&y}}}n.EscapeSequenceParser=p},6242:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OscHandler=n.OscParser=void 0;const d=o(5770),v=o(482),f=[];n.OscParser=class{constructor(){this._state=0,this._active=f,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(g,S){this._handlers[g]===void 0&&(this._handlers[g]=[]);const C=this._handlers[g];return C.push(S),{dispose:()=>{const p=C.indexOf(S);p!==-1&&C.splice(p,1)}}}clearHandler(g){this._handlers[g]&&delete this._handlers[g]}setHandlerFallback(g){this._handlerFb=g}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=f}reset(){if(this._state===2)for(let g=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;g>=0;--g)this._active[g].end(!1);this._stack.paused=!1,this._active=f,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||f,this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].start();else this._handlerFb(this._id,"START")}_put(g,S,C){if(this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].put(g,S,C);else this._handlerFb(this._id,"PUT",(0,v.utf32ToString)(g,S,C))}start(){this.reset(),this._state=1}put(g,S,C){if(this._state!==3){if(this._state===1)for(;S<C;){const p=g[S++];if(p===59){this._state=2,this._start();break}if(p<48||57<p)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+p-48}this._state===2&&C-S>0&&this._put(g,S,C)}}end(g,S=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let C=!1,p=this._active.length-1,h=!1;if(this._stack.paused&&(p=this._stack.loopPosition-1,C=S,h=this._stack.fallThrough,this._stack.paused=!1),!h&&C===!1){for(;p>=0&&(C=this._active[p].end(g),C!==!0);p--)if(C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=p,this._stack.fallThrough=!1,C;p--}for(;p>=0;p--)if(C=this._active[p].end(!1),C instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=p,this._stack.fallThrough=!0,C}else this._handlerFb(this._id,"END",g);this._active=f,this._id=-1,this._state=0}}},n.OscHandler=class{constructor(g){this._handler=g,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(g,S,C){this._hitLimit||(this._data+=(0,v.utf32ToString)(g,S,C),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(g){let S=!1;if(this._hitLimit)S=!1;else if(g&&(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:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Params=void 0;const o=2147483647;class d{static fromArray(f){const g=new d;if(!f.length)return g;for(let S=Array.isArray(f[0])?1:0;S<f.length;++S){const C=f[S];if(Array.isArray(C))for(let p=0;p<C.length;++p)g.addSubParam(C[p]);else g.addParam(C)}return g}constructor(f=32,g=32){if(this.maxLength=f,this.maxSubParamsLength=g,g>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(f),this.length=0,this._subParams=new Int32Array(g),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(f),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const f=new d(this.maxLength,this.maxSubParamsLength);return f.params.set(this.params),f.length=this.length,f._subParams.set(this._subParams),f._subParamsLength=this._subParamsLength,f._subParamsIdx.set(this._subParamsIdx),f._rejectDigits=this._rejectDigits,f._rejectSubDigits=this._rejectSubDigits,f._digitIsSub=this._digitIsSub,f}toArray(){const f=[];for(let g=0;g<this.length;++g){f.push(this.params[g]);const S=this._subParamsIdx[g]>>8,C=255&this._subParamsIdx[g];C-S>0&&f.push(Array.prototype.slice.call(this._subParams,S,C))}return f}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(f){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=f>o?o:f}}addSubParam(f){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(f<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=f>o?o:f,this._subParamsIdx[this.length-1]++}}hasSubParams(f){return(255&this._subParamsIdx[f])-(this._subParamsIdx[f]>>8)>0}getSubParams(f){const g=this._subParamsIdx[f]>>8,S=255&this._subParamsIdx[f];return S-g>0?this._subParams.subarray(g,S):null}getSubParamsAll(){const f={};for(let g=0;g<this.length;++g){const S=this._subParamsIdx[g]>>8,C=255&this._subParamsIdx[g];C-S>0&&(f[g]=this._subParams.slice(S,C))}return f}addDigit(f){let g;if(this._rejectDigits||!(g=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const S=this._digitIsSub?this._subParams:this.params,C=S[g-1];S[g-1]=~C?Math.min(10*C+f,o):f}}n.Params=d},5741:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.AddonManager=void 0,n.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let o=this._addons.length-1;o>=0;o--)this._addons[o].instance.dispose()}loadAddon(o,d){const v={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(v),d.dispose=()=>this._wrappedAddonDispose(v),d.activate(o)}_wrappedAddonDispose(o){if(o.isDisposed)return;let d=-1;for(let v=0;v<this._addons.length;v++)if(this._addons[v]===o){d=v;break}if(d===-1)throw new Error("Could not dispose an addon that has not been loaded");o.isDisposed=!0,o.dispose.apply(o.instance),this._addons.splice(d,1)}}},8771:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferApiView=void 0;const d=o(3785),v=o(511);n.BufferApiView=class{constructor(f,g){this._buffer=f,this.type=g}init(f){return this._buffer=f,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(f){const g=this._buffer.lines.get(f);if(g)return new d.BufferLineApiView(g)}getNullCell(){return new v.CellData}}},3785:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLineApiView=void 0;const d=o(511);n.BufferLineApiView=class{constructor(v){this._line=v}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(v,f){if(!(v<0||v>=this._line.length))return f?(this._line.loadCell(v,f),f):this._line.loadCell(v,new d.CellData)}translateToString(v,f,g){return this._line.translateToString(v,f,g)}}},8285:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferNamespaceApi=void 0;const d=o(8771),v=o(8460),f=o(844);class g extends f.Disposable{constructor(C){super(),this._core=C,this._onBufferChange=this.register(new v.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new d.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new d.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)}}n.BufferNamespaceApi=g},7975:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ParserApi=void 0,n.ParserApi=class{constructor(o){this._core=o}registerCsiHandler(o,d){return this._core.registerCsiHandler(o,v=>d(v.toArray()))}addCsiHandler(o,d){return this.registerCsiHandler(o,d)}registerDcsHandler(o,d){return this._core.registerDcsHandler(o,(v,f)=>d(v,f.toArray()))}addDcsHandler(o,d){return this.registerDcsHandler(o,d)}registerEscHandler(o,d){return this._core.registerEscHandler(o,d)}addEscHandler(o,d){return this.registerEscHandler(o,d)}registerOscHandler(o,d){return this._core.registerOscHandler(o,d)}addOscHandler(o,d){return this.registerOscHandler(o,d)}}},7090:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeApi=void 0,n.UnicodeApi=class{constructor(o){this._core=o}register(o){this._core.unicodeService.register(o)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(o){this._core.unicodeService.activeVersion=o}}},744:function(c,n,o){var d=this&&this.__decorate||function(h,_,l,u){var m,w=arguments.length,y=w<3?_:u===null?u=Object.getOwnPropertyDescriptor(_,l):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(h,_,l,u);else for(var E=h.length-1;E>=0;E--)(m=h[E])&&(y=(w<3?m(y):w>3?m(_,l,y):m(_,l))||y);return w>3&&y&&Object.defineProperty(_,l,y),y},v=this&&this.__param||function(h,_){return function(l,u){_(l,u,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferService=n.MINIMUM_ROWS=n.MINIMUM_COLS=void 0;const f=o(8460),g=o(844),S=o(5295),C=o(2585);n.MINIMUM_COLS=2,n.MINIMUM_ROWS=1;let p=n.BufferService=class extends g.Disposable{get buffer(){return this.buffers.active}constructor(h){super(),this.isUserScrolling=!1,this._onResize=this.register(new f.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new f.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(h.rawOptions.cols||0,n.MINIMUM_COLS),this.rows=Math.max(h.rawOptions.rows||0,n.MINIMUM_ROWS),this.buffers=this.register(new S.BufferSet(h,this))}resize(h,_){this.cols=h,this.rows=_,this.buffers.resize(h,_),this._onResize.fire({cols:h,rows:_})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(h,_=!1){const l=this.buffer;let u;u=this._cachedBlankLine,u&&u.length===this.cols&&u.getFg(0)===h.fg&&u.getBg(0)===h.bg||(u=l.getBlankLine(h,_),this._cachedBlankLine=u),u.isWrapped=_;const m=l.ybase+l.scrollTop,w=l.ybase+l.scrollBottom;if(l.scrollTop===0){const y=l.lines.isFull;w===l.lines.length-1?y?l.lines.recycle().copyFrom(u):l.lines.push(u.clone()):l.lines.splice(w+1,0,u.clone()),y?this.isUserScrolling&&(l.ydisp=Math.max(l.ydisp-1,0)):(l.ybase++,this.isUserScrolling||l.ydisp++)}else{const y=w-m+1;l.lines.shiftElements(m+1,y-1,-1),l.lines.set(w,u.clone())}this.isUserScrolling||(l.ydisp=l.ybase),this._onScroll.fire(l.ydisp)}scrollLines(h,_,l){const u=this.buffer;if(h<0){if(u.ydisp===0)return;this.isUserScrolling=!0}else h+u.ydisp>=u.ybase&&(this.isUserScrolling=!1);const m=u.ydisp;u.ydisp=Math.max(Math.min(u.ydisp+h,u.ybase),0),m!==u.ydisp&&(_||this._onScroll.fire(u.ydisp))}};n.BufferService=p=d([v(0,C.IOptionsService)],p)},7994:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CharsetService=void 0,n.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(o){this.glevel=o,this.charset=this._charsets[o]}setgCharset(o,d){this._charsets[o]=d,this.glevel===o&&(this.charset=d)}}},1753:function(c,n,o){var d=this&&this.__decorate||function(u,m,w,y){var E,b=arguments.length,x=b<3?m:y===null?y=Object.getOwnPropertyDescriptor(m,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(u,m,w,y);else for(var A=u.length-1;A>=0;A--)(E=u[A])&&(x=(b<3?E(x):b>3?E(m,w,x):E(m,w))||x);return b>3&&x&&Object.defineProperty(m,w,x),x},v=this&&this.__param||function(u,m){return function(w,y){m(w,y,u)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreMouseService=void 0;const f=o(2585),g=o(8460),S=o(844),C={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:u=>u.button!==4&&u.action===1&&(u.ctrl=!1,u.alt=!1,u.shift=!1,!0)},VT200:{events:19,restrict:u=>u.action!==32},DRAG:{events:23,restrict:u=>u.action!==32||u.button!==3},ANY:{events:31,restrict:u=>!0}};function p(u,m){let w=(u.ctrl?16:0)|(u.shift?4:0)|(u.alt?8:0);return u.button===4?(w|=64,w|=u.action):(w|=3&u.button,4&u.button&&(w|=64),8&u.button&&(w|=128),u.action===32?w|=32:u.action!==0||m||(w|=3)),w}const h=String.fromCharCode,_={DEFAULT:u=>{const m=[p(u,!1)+32,u.col+32,u.row+32];return m[0]>255||m[1]>255||m[2]>255?"":`\x1B[M${h(m[0])}${h(m[1])}${h(m[2])}`},SGR:u=>{const m=u.action===0&&u.button!==4?"m":"M";return`\x1B[<${p(u,!0)};${u.col};${u.row}${m}`},SGR_PIXELS:u=>{const m=u.action===0&&u.button!==4?"m":"M";return`\x1B[<${p(u,!0)};${u.x};${u.y}${m}`}};let l=n.CoreMouseService=class extends S.Disposable{constructor(u,m){super(),this._bufferService=u,this._coreService=m,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new g.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const w of Object.keys(C))this.addProtocol(w,C[w]);for(const w of Object.keys(_))this.addEncoding(w,_[w]);this.reset()}addProtocol(u,m){this._protocols[u]=m}addEncoding(u,m){this._encodings[u]=m}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(u){if(!this._protocols[u])throw new Error(`unknown protocol "${u}"`);this._activeProtocol=u,this._onProtocolChange.fire(this._protocols[u].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(u){if(!this._encodings[u])throw new Error(`unknown encoding "${u}"`);this._activeEncoding=u}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(u){if(u.col<0||u.col>=this._bufferService.cols||u.row<0||u.row>=this._bufferService.rows||u.button===4&&u.action===32||u.button===3&&u.action!==32||u.button!==4&&(u.action===2||u.action===3)||(u.col++,u.row++,u.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,u,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(u))return!1;const m=this._encodings[this._activeEncoding](u);return m&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(m):this._coreService.triggerDataEvent(m,!0)),this._lastEvent=u,!0}explainEvents(u){return{down:!!(1&u),up:!!(2&u),drag:!!(4&u),move:!!(8&u),wheel:!!(16&u)}}_equalEvents(u,m,w){if(w){if(u.x!==m.x||u.y!==m.y)return!1}else if(u.col!==m.col||u.row!==m.row)return!1;return u.button===m.button&&u.action===m.action&&u.ctrl===m.ctrl&&u.alt===m.alt&&u.shift===m.shift}};n.CoreMouseService=l=d([v(0,f.IBufferService),v(1,f.ICoreService)],l)},6975:function(c,n,o){var d=this&&this.__decorate||function(l,u,m,w){var y,E=arguments.length,b=E<3?u:w===null?w=Object.getOwnPropertyDescriptor(u,m):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,u,m,w);else for(var x=l.length-1;x>=0;x--)(y=l[x])&&(b=(E<3?y(b):E>3?y(u,m,b):y(u,m))||b);return E>3&&b&&Object.defineProperty(u,m,b),b},v=this&&this.__param||function(l,u){return function(m,w){u(m,w,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreService=void 0;const f=o(1439),g=o(8460),S=o(844),C=o(2585),p=Object.freeze({insertMode:!1}),h=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let _=n.CoreService=class extends S.Disposable{constructor(l,u,m){super(),this._bufferService=l,this._logService=u,this._optionsService=m,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new g.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new g.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new g.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new g.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,f.clone)(p),this.decPrivateModes=(0,f.clone)(h)}reset(){this.modes=(0,f.clone)(p),this.decPrivateModes=(0,f.clone)(h)}triggerDataEvent(l,u=!1){if(this._optionsService.rawOptions.disableStdin)return;const m=this._bufferService.buffer;u&&this._optionsService.rawOptions.scrollOnUserInput&&m.ybase!==m.ydisp&&this._onRequestScrollToBottom.fire(),u&&this._onUserInput.fire(),this._logService.debug(`sending data "${l}"`,()=>l.split("").map(w=>w.charCodeAt(0))),this._onData.fire(l)}triggerBinaryEvent(l){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${l}"`,()=>l.split("").map(u=>u.charCodeAt(0))),this._onBinary.fire(l))}};n.CoreService=_=d([v(0,C.IBufferService),v(1,C.ILogService),v(2,C.IOptionsService)],_)},9074:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DecorationService=void 0;const d=o(8055),v=o(8460),f=o(844),g=o(6106);let S=0,C=0;class p extends f.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new g.SortedList(l=>l==null?void 0:l.marker.line),this._onDecorationRegistered=this.register(new v.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new v.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,f.toDisposable)(()=>this.reset()))}registerDecoration(l){if(l.marker.isDisposed)return;const u=new h(l);if(u){const m=u.marker.onDispose(()=>u.dispose());u.onDispose(()=>{u&&(this._decorations.delete(u)&&this._onDecorationRemoved.fire(u),m.dispose())}),this._decorations.insert(u),this._onDecorationRegistered.fire(u)}return u}reset(){for(const l of this._decorations.values())l.dispose();this._decorations.clear()}*getDecorationsAtCell(l,u,m){let w=0,y=0;for(const E of this._decorations.getKeyIterator(u))w=E.options.x??0,y=w+(E.options.width??1),l>=w&&l<y&&(!m||(E.options.layer??"bottom")===m)&&(yield E)}forEachDecorationAtCell(l,u,m,w){this._decorations.forEachByKey(u,y=>{S=y.options.x??0,C=S+(y.options.width??1),l>=S&&l<C&&(!m||(y.options.layer??"bottom")===m)&&w(y)})}}n.DecorationService=p;class h extends f.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=d.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=d.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(l){super(),this.options=l,this.onRenderEmitter=this.register(new v.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new v.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=l.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.InstantiationService=n.ServiceCollection=void 0;const d=o(2585),v=o(8343);class f{constructor(...S){this._entries=new Map;for(const[C,p]of S)this.set(C,p)}set(S,C){const p=this._entries.get(S);return this._entries.set(S,C),p}forEach(S){for(const[C,p]of this._entries.entries())S(C,p)}has(S){return this._entries.has(S)}get(S){return this._entries.get(S)}}n.ServiceCollection=f,n.InstantiationService=class{constructor(){this._services=new f,this._services.set(d.IInstantiationService,this)}setService(g,S){this._services.set(g,S)}getService(g){return this._services.get(g)}createInstance(g,...S){const C=(0,v.getServiceDependencies)(g).sort((_,l)=>_.index-l.index),p=[];for(const _ of C){const l=this._services.get(_.id);if(!l)throw new Error(`[createInstance] ${g.name} depends on UNKNOWN service ${_.id}.`);p.push(l)}const h=C.length>0?C[0].index:S.length;if(S.length!==h)throw new Error(`[createInstance] First service dependency of ${g.name} at position ${h+1} conflicts with ${S.length} static arguments`);return new g(...S,...p)}}},7866:function(c,n,o){var d=this&&this.__decorate||function(h,_,l,u){var m,w=arguments.length,y=w<3?_:u===null?u=Object.getOwnPropertyDescriptor(_,l):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(h,_,l,u);else for(var E=h.length-1;E>=0;E--)(m=h[E])&&(y=(w<3?m(y):w>3?m(_,l,y):m(_,l))||y);return w>3&&y&&Object.defineProperty(_,l,y),y},v=this&&this.__param||function(h,_){return function(l,u){_(l,u,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const f=o(844),g=o(2585),S={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let C,p=n.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(h){super(),this._optionsService=h,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),C=this}_updateLogLevel(){this._logLevel=S[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(h){for(let _=0;_<h.length;_++)typeof h[_]=="function"&&(h[_]=h[_]())}_log(h,_,l){this._evalLazyOptionalParams(l),h.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+_,...l)}trace(h,..._){var l;this._logLevel<=g.LogLevelEnum.TRACE&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.trace.bind(this._optionsService.options.logger))??console.log,h,_)}debug(h,..._){var l;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.debug.bind(this._optionsService.options.logger))??console.log,h,_)}info(h,..._){var l;this._logLevel<=g.LogLevelEnum.INFO&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.info.bind(this._optionsService.options.logger))??console.info,h,_)}warn(h,..._){var l;this._logLevel<=g.LogLevelEnum.WARN&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.warn.bind(this._optionsService.options.logger))??console.warn,h,_)}error(h,..._){var l;this._logLevel<=g.LogLevelEnum.ERROR&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.error.bind(this._optionsService.options.logger))??console.error,h,_)}};n.LogService=p=d([v(0,g.IOptionsService)],p),n.setTraceLogger=function(h){C=h},n.traceCall=function(h,_,l){if(typeof l.value!="function")throw new Error("not supported");const u=l.value;l.value=function(...m){if(C.logLevel!==g.LogLevelEnum.TRACE)return u.apply(this,m);C.trace(`GlyphRenderer#${u.name}(${m.map(y=>JSON.stringify(y)).join(", ")})`);const w=u.apply(this,m);return C.trace(`GlyphRenderer#${u.name} return`,w),w}}},7302:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OptionsService=n.DEFAULT_OPTIONS=void 0;const d=o(8460),v=o(844),f=o(6114);n.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:f.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const g=["normal","bold","100","200","300","400","500","600","700","800","900"];class S extends v.Disposable{constructor(p){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const h={...n.DEFAULT_OPTIONS};for(const _ in p)if(_ in h)try{const l=p[_];h[_]=this._sanitizeAndValidateOption(_,l)}catch(l){console.error(l)}this.rawOptions=h,this.options={...h},this._setupOptions(),this.register((0,v.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(p,h){return this.onOptionChange(_=>{_===p&&h(this.rawOptions[p])})}onMultipleOptionChange(p,h){return this.onOptionChange(_=>{p.indexOf(_)!==-1&&h()})}_setupOptions(){const p=_=>{if(!(_ in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${_}"`);return this.rawOptions[_]},h=(_,l)=>{if(!(_ in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${_}"`);l=this._sanitizeAndValidateOption(_,l),this.rawOptions[_]!==l&&(this.rawOptions[_]=l,this._onOptionChange.fire(_))};for(const _ in this.rawOptions){const l={get:p.bind(this,_),set:h.bind(this,_)};Object.defineProperty(this.options,_,l)}}_sanitizeAndValidateOption(p,h){switch(p){case"cursorStyle":if(h||(h=n.DEFAULT_OPTIONS[p]),!function(_){return _==="block"||_==="underline"||_==="bar"}(h))throw new Error(`"${h}" is not a valid value for ${p}`);break;case"wordSeparator":h||(h=n.DEFAULT_OPTIONS[p]);break;case"fontWeight":case"fontWeightBold":if(typeof h=="number"&&1<=h&&h<=1e3)break;h=g.includes(h)?h:n.DEFAULT_OPTIONS[p];break;case"cursorWidth":h=Math.floor(h);case"lineHeight":case"tabStopWidth":if(h<1)throw new Error(`${p} cannot be less than 1, value: ${h}`);break;case"minimumContrastRatio":h=Math.max(1,Math.min(21,Math.round(10*h)/10));break;case"scrollback":if((h=Math.min(h,4294967295))<0)throw new Error(`${p} cannot be less than 0, value: ${h}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(h<=0)throw new Error(`${p} cannot be less than or equal to 0, value: ${h}`);break;case"rows":case"cols":if(!h&&h!==0)throw new Error(`${p} must be numeric, value: ${h}`);break;case"windowsPty":h=h??{}}return h}}n.OptionsService=S},2660:function(c,n,o){var d=this&&this.__decorate||function(S,C,p,h){var _,l=arguments.length,u=l<3?C:h===null?h=Object.getOwnPropertyDescriptor(C,p):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(S,C,p,h);else for(var m=S.length-1;m>=0;m--)(_=S[m])&&(u=(l<3?_(u):l>3?_(C,p,u):_(C,p))||u);return l>3&&u&&Object.defineProperty(C,p,u),u},v=this&&this.__param||function(S,C){return function(p,h){C(p,h,S)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkService=void 0;const f=o(2585);let g=n.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 m=C.addMarker(C.ybase+C.y),w={data:S,id:this._nextId++,lines:[m]};return m.onDispose(()=>this._removeMarkerFromLink(w,m)),this._dataByLinkId.set(w.id,w),w.id}const p=S,h=this._getEntryIdKey(p),_=this._entriesWithId.get(h);if(_)return this.addLineToLink(_.id,C.ybase+C.y),_.id;const l=C.addMarker(C.ybase+C.y),u={id:this._nextId++,key:this._getEntryIdKey(p),data:p,lines:[l]};return l.onDispose(()=>this._removeMarkerFromLink(u,l)),this._entriesWithId.set(u.key,u),this._dataByLinkId.set(u.id,u),u.id}addLineToLink(S,C){const p=this._dataByLinkId.get(S);if(p&&p.lines.every(h=>h.line!==C)){const h=this._bufferService.buffer.addMarker(C);p.lines.push(h),h.onDispose(()=>this._removeMarkerFromLink(p,h))}}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 p=S.lines.indexOf(C);p!==-1&&(S.lines.splice(p,1),S.lines.length===0&&(S.data.id!==void 0&&this._entriesWithId.delete(S.key),this._dataByLinkId.delete(S.id)))}};n.OscLinkService=g=d([v(0,f.IBufferService)],g)},8343:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const o="di$target",d="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(v){return v[d]||[]},n.createDecorator=function(v){if(n.serviceRegistry.has(v))return n.serviceRegistry.get(v);const f=function(g,S,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(p,h,_){h[o]===h?h[d].push({id:p,index:_}):(h[d]=[{id:p,index:_}],h[o]=h)})(f,g,C)};return f.toString=()=>v,n.serviceRegistry.set(v,f),f}},2585:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.IDecorationService=n.IUnicodeService=n.IOscLinkService=n.IOptionsService=n.ILogService=n.LogLevelEnum=n.IInstantiationService=n.ICharsetService=n.ICoreService=n.ICoreMouseService=n.IBufferService=void 0;const d=o(8343);var v;n.IBufferService=(0,d.createDecorator)("BufferService"),n.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),n.ICoreService=(0,d.createDecorator)("CoreService"),n.ICharsetService=(0,d.createDecorator)("CharsetService"),n.IInstantiationService=(0,d.createDecorator)("InstantiationService"),function(f){f[f.TRACE=0]="TRACE",f[f.DEBUG=1]="DEBUG",f[f.INFO=2]="INFO",f[f.WARN=3]="WARN",f[f.ERROR=4]="ERROR",f[f.OFF=5]="OFF"}(v||(n.LogLevelEnum=v={})),n.ILogService=(0,d.createDecorator)("LogService"),n.IOptionsService=(0,d.createDecorator)("OptionsService"),n.IOscLinkService=(0,d.createDecorator)("OscLinkService"),n.IUnicodeService=(0,d.createDecorator)("UnicodeService"),n.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeService=void 0;const d=o(8460),v=o(225);class f{static extractShouldJoin(S){return(1&S)!=0}static extractWidth(S){return S>>1&3}static extractCharKind(S){return S>>3}static createPropertyValue(S,C,p=!1){return(16777215&S)<<3|(3&C)<<1|(p?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const S=new v.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,p=0;const h=S.length;for(let _=0;_<h;++_){let l=S.charCodeAt(_);if(55296<=l&&l<=56319){if(++_>=h)return C+this.wcwidth(l);const w=S.charCodeAt(_);56320<=w&&w<=57343?l=1024*(l-55296)+w-56320+65536:C+=this.wcwidth(w)}const u=this.charProperties(l,p);let m=f.extractWidth(u);f.extractShouldJoin(u)&&(m-=f.extractWidth(p)),C+=m,p=u}return C}charProperties(S,C){return this._activeProvider.charProperties(S,C)}}n.UnicodeService=f}},r={};function s(c){var n=r[c];if(n!==void 0)return n.exports;var o=r[c]={exports:{}};return i[c].call(o.exports,o,o.exports,s),o.exports}var a={};return(()=>{var c=a;Object.defineProperty(c,"__esModule",{value:!0}),c.Terminal=void 0;const n=s(9042),o=s(3236),d=s(844),v=s(5741),f=s(8285),g=s(7975),S=s(7090),C=["cols","rows"];class p extends d.Disposable{constructor(_){super(),this._core=this.register(new o.Terminal(_)),this._addonManager=this.register(new v.AddonManager),this._publicOptions={...this._core.options};const l=m=>this._core.options[m],u=(m,w)=>{this._checkReadonlyOptions(m),this._core.options[m]=w};for(const m in this._core.options){const w={get:l.bind(this,m),set:u.bind(this,m)};Object.defineProperty(this._publicOptions,m,w)}}_checkReadonlyOptions(_){if(C.includes(_))throw new Error(`Option "${_}" 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 g.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 f.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const _=this._core.coreService.decPrivateModes;let l="none";switch(this._core.coreMouseService.activeProtocol){case"X10":l="x10";break;case"VT200":l="vt200";break;case"DRAG":l="drag";break;case"ANY":l="any"}return{applicationCursorKeysMode:_.applicationCursorKeys,applicationKeypadMode:_.applicationKeypad,bracketedPasteMode:_.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:l,originMode:_.origin,reverseWraparoundMode:_.reverseWraparound,sendFocusMode:_.sendFocus,wraparoundMode:_.wraparound}}get options(){return this._publicOptions}set options(_){for(const l in _)this._publicOptions[l]=_[l]}blur(){this._core.blur()}focus(){this._core.focus()}input(_,l=!0){this._core.input(_,l)}resize(_,l){this._verifyIntegers(_,l),this._core.resize(_,l)}open(_){this._core.open(_)}attachCustomKeyEventHandler(_){this._core.attachCustomKeyEventHandler(_)}attachCustomWheelEventHandler(_){this._core.attachCustomWheelEventHandler(_)}registerLinkProvider(_){return this._core.registerLinkProvider(_)}registerCharacterJoiner(_){return this._checkProposedApi(),this._core.registerCharacterJoiner(_)}deregisterCharacterJoiner(_){this._checkProposedApi(),this._core.deregisterCharacterJoiner(_)}registerMarker(_=0){return this._verifyIntegers(_),this._core.registerMarker(_)}registerDecoration(_){return this._checkProposedApi(),this._verifyPositiveIntegers(_.x??0,_.width??0,_.height??0),this._core.registerDecoration(_)}hasSelection(){return this._core.hasSelection()}select(_,l,u){this._verifyIntegers(_,l,u),this._core.select(_,l,u)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(_,l){this._verifyIntegers(_,l),this._core.selectLines(_,l)}dispose(){super.dispose()}scrollLines(_){this._verifyIntegers(_),this._core.scrollLines(_)}scrollPages(_){this._verifyIntegers(_),this._core.scrollPages(_)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(_){this._verifyIntegers(_),this._core.scrollToLine(_)}clear(){this._core.clear()}write(_,l){this._core.write(_,l)}writeln(_,l){this._core.write(_),this._core.write(`\r
156
+ `,l)}paste(_){this._core.paste(_)}refresh(_,l){this._verifyIntegers(_,l),this._core.refresh(_,l)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(_){this._addonManager.loadAddon(this,_)}static get strings(){return n}_verifyIntegers(..._){for(const l of _)if(l===1/0||isNaN(l)||l%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(..._){for(const l of _)if(l&&(l===1/0||isNaN(l)||l%1!=0||l<0))throw new Error("This API only accepts positive integers")}}c.Terminal=p})(),a})())})(L0);var A2=L0.exports;/**
157
+ * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
158
+ * @license MIT
159
+ *
160
+ * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
161
+ * @license MIT
162
+ *
163
+ * Originally forked from (with the author's permission):
164
+ * Fabrice Bellard's javascript vt100 for jslinux:
165
+ * http://bellard.org/jslinux/
166
+ * Copyright (c) 2011 Fabrice Bellard
167
+ */var L2=2,O2=1,R2=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){var f;if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:((f=this._terminal.options.overviewRuler)==null?void 0:f.width)||14,i=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(i.getPropertyValue("height")),s=Math.max(0,parseInt(i.getPropertyValue("width"))),a=window.getComputedStyle(this._terminal.element),c={top:parseInt(a.getPropertyValue("padding-top")),bottom:parseInt(a.getPropertyValue("padding-bottom")),right:parseInt(a.getPropertyValue("padding-right")),left:parseInt(a.getPropertyValue("padding-left"))},n=c.top+c.bottom,o=c.right+c.left,d=r-n,v=s-o-t;return{cols:Math.max(L2,Math.floor(v/e.css.cell.width)),rows:Math.max(O2,Math.floor(d/e.css.cell.height))}}},R0={exports:{}};(function(e,t){(function(i,r){e.exports=r()})(self,()=>(()=>{var i={903:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BaseRenderLayer=void 0;const d=o(274),v=o(627),f=o(237),g=o(860),S=o(374),C=o(296),p=o(345),h=o(859),_=o(399),l=o(855);class u extends h.Disposable{get canvas(){return this._canvas}get cacheCanvas(){var y;return(y=this._charAtlas)==null?void 0:y.pages[0].canvas}constructor(y,E,b,x,A,O,R,D,B,U){super(),this._terminal=y,this._container=E,this._alpha=A,this._themeService=O,this._bufferService=R,this._optionsService=D,this._decorationService=B,this._coreBrowserService=U,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._selectionModel=(0,C.createSelectionRenderModel)(),this._bitmapGenerator=[],this._charAtlasDisposable=this.register(new h.MutableDisposable),this._onAddTextureAtlasCanvas=this.register(new p.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._cellColorResolver=new d.CellColorResolver(this._terminal,this._optionsService,this._selectionModel,this._decorationService,this._coreBrowserService,this._themeService),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${b}-layer`),this._canvas.style.zIndex=x.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._refreshCharAtlas(this._themeService.colors),this.register(this._themeService.onChangeColors(N=>{this._refreshCharAtlas(N),this.reset(),this.handleSelectionChanged(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)})),this.register((0,h.toDisposable)(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=(0,S.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(){}handleFocus(){}handleCursorMove(){}handleGridChanged(y,E){}handleSelectionChanged(y,E,b=!1){this._selectionModel.update(this._terminal._core,y,E,b)}_setTransparency(y){if(y===this._alpha)return;const E=this._canvas;this._alpha=y,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,E),this._refreshCharAtlas(this._themeService.colors),this.handleGridChanged(0,this._bufferService.rows-1)}_refreshCharAtlas(y){if(!(this._deviceCharWidth<=0&&this._deviceCharHeight<=0)){this._charAtlas=(0,v.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,y,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlasDisposable.value=(0,p.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),this._charAtlas.warmUp();for(let E=0;E<this._charAtlas.pages.length;E++)this._bitmapGenerator[E]=new m(this._charAtlas.pages[E].canvas)}}resize(y){this._deviceCellWidth=y.device.cell.width,this._deviceCellHeight=y.device.cell.height,this._deviceCharWidth=y.device.char.width,this._deviceCharHeight=y.device.char.height,this._deviceCharLeft=y.device.char.left,this._deviceCharTop=y.device.char.top,this._canvas.width=y.device.canvas.width,this._canvas.height=y.device.canvas.height,this._canvas.style.width=`${y.css.canvas.width}px`,this._canvas.style.height=`${y.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(this._themeService.colors)}clearTextureAtlas(){var y;(y=this._charAtlas)==null||y.clearTexture()}_fillCells(y,E,b,x){this._ctx.fillRect(y*this._deviceCellWidth,E*this._deviceCellHeight,b*this._deviceCellWidth,x*this._deviceCellHeight)}_fillMiddleLineAtCells(y,E,b=1){const x=Math.ceil(.5*this._deviceCellHeight);this._ctx.fillRect(y*this._deviceCellWidth,(E+1)*this._deviceCellHeight-x-this._coreBrowserService.dpr,b*this._deviceCellWidth,this._coreBrowserService.dpr)}_fillBottomLineAtCells(y,E,b=1,x=0){this._ctx.fillRect(y*this._deviceCellWidth,(E+1)*this._deviceCellHeight+x-this._coreBrowserService.dpr-1,b*this._deviceCellWidth,this._coreBrowserService.dpr)}_curlyUnderlineAtCell(y,E,b=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const x=this._coreBrowserService.dpr;this._ctx.lineWidth=x;for(let A=0;A<b;A++){const O=(y+A)*this._deviceCellWidth,R=(y+A+.5)*this._deviceCellWidth,D=(y+A+1)*this._deviceCellWidth,B=(E+1)*this._deviceCellHeight-x-1,U=B-x,N=B+x;this._ctx.moveTo(O,B),this._ctx.bezierCurveTo(O,U,R,U,R,B),this._ctx.bezierCurveTo(R,N,D,N,D,B)}this._ctx.stroke(),this._ctx.restore()}_dottedUnderlineAtCell(y,E,b=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const x=this._coreBrowserService.dpr;this._ctx.lineWidth=x,this._ctx.setLineDash([2*x,x]);const A=y*this._deviceCellWidth,O=(E+1)*this._deviceCellHeight-x-1;this._ctx.moveTo(A,O);for(let R=0;R<b;R++){const D=(y+b+R)*this._deviceCellWidth;this._ctx.lineTo(D,O)}this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_dashedUnderlineAtCell(y,E,b=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const x=this._coreBrowserService.dpr;this._ctx.lineWidth=x,this._ctx.setLineDash([4*x,3*x]);const A=y*this._deviceCellWidth,O=(y+b)*this._deviceCellWidth,R=(E+1)*this._deviceCellHeight-x-1;this._ctx.moveTo(A,R),this._ctx.lineTo(O,R),this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_fillLeftLineAtCell(y,E,b){this._ctx.fillRect(y*this._deviceCellWidth,E*this._deviceCellHeight,this._coreBrowserService.dpr*b,this._deviceCellHeight)}_strokeRectAtCell(y,E,b,x){const A=this._coreBrowserService.dpr;this._ctx.lineWidth=A,this._ctx.strokeRect(y*this._deviceCellWidth+A/2,E*this._deviceCellHeight+A/2,b*this._deviceCellWidth-A,x*this._deviceCellHeight-A)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(y,E,b,x){this._alpha?this._ctx.clearRect(y*this._deviceCellWidth,E*this._deviceCellHeight,b*this._deviceCellWidth,x*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(y*this._deviceCellWidth,E*this._deviceCellHeight,b*this._deviceCellWidth,x*this._deviceCellHeight))}_fillCharTrueColor(y,E,b){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=f.TEXT_BASELINE,this._clipRow(b);let x=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(x=(0,g.tryDrawCustomChar)(this._ctx,y.getChars(),E*this._deviceCellWidth,b*this._deviceCellHeight,this._deviceCellWidth,this._deviceCellHeight,this._optionsService.rawOptions.fontSize,this._coreBrowserService.dpr)),x||this._ctx.fillText(y.getChars(),E*this._deviceCellWidth+this._deviceCharLeft,b*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_drawChars(y,E,b){var B,U,N,P;const x=y.getChars(),A=y.getCode(),O=y.getWidth();if(this._cellColorResolver.resolve(y,E,this._bufferService.buffer.ydisp+b,this._deviceCellWidth),!this._charAtlas)return;let R;if(R=x&&x.length>1?this._charAtlas.getRasterizedGlyphCombinedChar(x,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0):this._charAtlas.getRasterizedGlyph(y.getCode()||l.WHITESPACE_CELL_CODE,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0),!R.size.x||!R.size.y)return;this._ctx.save(),this._clipRow(b),this._bitmapGenerator[R.texturePage]&&this._charAtlas.pages[R.texturePage].canvas!==this._bitmapGenerator[R.texturePage].canvas&&((U=(B=this._bitmapGenerator[R.texturePage])==null?void 0:B.bitmap)==null||U.close(),delete this._bitmapGenerator[R.texturePage]),this._charAtlas.pages[R.texturePage].version!==((N=this._bitmapGenerator[R.texturePage])==null?void 0:N.version)&&(this._bitmapGenerator[R.texturePage]||(this._bitmapGenerator[R.texturePage]=new m(this._charAtlas.pages[R.texturePage].canvas)),this._bitmapGenerator[R.texturePage].refresh(),this._bitmapGenerator[R.texturePage].version=this._charAtlas.pages[R.texturePage].version);let D=R.size.x;this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,S.allowRescaling)(A,O,R.size.x,this._deviceCellWidth)&&(D=this._deviceCellWidth-1),this._ctx.drawImage(((P=this._bitmapGenerator[R.texturePage])==null?void 0:P.bitmap)||this._charAtlas.pages[R.texturePage].canvas,R.texturePosition.x,R.texturePosition.y,R.size.x,R.size.y,E*this._deviceCellWidth+this._deviceCharLeft-R.offset.x,b*this._deviceCellHeight+this._deviceCharTop-R.offset.y,D,R.size.y),this._ctx.restore()}_clipRow(y){this._ctx.beginPath(),this._ctx.rect(0,y*this._deviceCellHeight,this._bufferService.cols*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(y,E){return`${E?"italic":""} ${y?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize*this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`}}n.BaseRenderLayer=u;class m{get bitmap(){return this._bitmap}constructor(y){this.canvas=y,this._state=0,this._commitTimeout=void 0,this._bitmap=void 0,this.version=-1}refresh(){var y;(y=this._bitmap)==null||y.close(),this._bitmap=void 0,_.isSafari||(this._commitTimeout===void 0&&(this._commitTimeout=window.setTimeout(()=>this._generate(),100)),this._state===1&&(this._state=2))}_generate(){var y;this._state===0&&((y=this._bitmap)==null||y.close(),this._bitmap=void 0,this._state=1,window.createImageBitmap(this.canvas).then(E=>{this._state===2?this.refresh():this._bitmap=E,this._state=0}),this._commitTimeout&&(this._commitTimeout=void 0))}}},949:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CanvasRenderer=void 0;const d=o(627),v=o(56),f=o(374),g=o(345),S=o(859),C=o(873),p=o(43),h=o(630),_=o(744);class l extends S.Disposable{constructor(m,w,y,E,b,x,A,O,R,D,B){super(),this._terminal=m,this._screenElement=w,this._bufferService=E,this._charSizeService=b,this._optionsService=x,this._coreBrowserService=R,this._themeService=B,this._observerDisposable=this.register(new S.MutableDisposable),this._onRequestRedraw=this.register(new g.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onChangeTextureAtlas=this.register(new g.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new g.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;const U=this._optionsService.rawOptions.allowTransparency;this._renderLayers=[new _.TextRenderLayer(this._terminal,this._screenElement,0,U,this._bufferService,this._optionsService,A,D,this._coreBrowserService,B),new h.SelectionRenderLayer(this._terminal,this._screenElement,1,this._bufferService,this._coreBrowserService,D,this._optionsService,B),new p.LinkRenderLayer(this._terminal,this._screenElement,2,y,this._bufferService,this._optionsService,D,this._coreBrowserService,B),new C.CursorRenderLayer(this._terminal,this._screenElement,3,this._onRequestRedraw,this._bufferService,this._optionsService,O,this._coreBrowserService,D,B)];for(const N of this._renderLayers)(0,g.forwardEvent)(N.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas);this.dimensions=(0,f.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._observerDisposable.value=(0,v.observeDevicePixelDimensions)(this._renderLayers[0].canvas,this._coreBrowserService.window,(N,P)=>this._setCanvasDevicePixelDimensions(N,P)),this.register(this._coreBrowserService.onWindowChange(N=>{this._observerDisposable.value=(0,v.observeDevicePixelDimensions)(this._renderLayers[0].canvas,N,(P,z)=>this._setCanvasDevicePixelDimensions(P,z))})),this.register((0,S.toDisposable)(()=>{for(const N of this._renderLayers)N.dispose();(0,d.removeTerminalFromCache)(this._terminal)}))}get textureAtlas(){return this._renderLayers[0].cacheCanvas}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._bufferService.cols,this._bufferService.rows))}handleResize(m,w){this._updateDimensions();for(const y of this._renderLayers)y.resize(this.dimensions);this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}handleCharSizeChanged(){this.handleResize(this._bufferService.cols,this._bufferService.rows)}handleBlur(){this._runOperation(m=>m.handleBlur())}handleFocus(){this._runOperation(m=>m.handleFocus())}handleSelectionChanged(m,w,y=!1){this._runOperation(E=>E.handleSelectionChanged(m,w,y)),this._themeService.colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}handleCursorMove(){this._runOperation(m=>m.handleCursorMove())}clear(){this._runOperation(m=>m.reset())}_runOperation(m){for(const w of this._renderLayers)m(w)}renderRows(m,w){for(const y of this._renderLayers)y.handleGridChanged(m,w)}clearTextureAtlas(){for(const m of this._renderLayers)m.clearTextureAtlas()}_updateDimensions(){if(!this._charSizeService.hasValidSize)return;const m=this._coreBrowserService.dpr;this.dimensions.device.char.width=Math.floor(this._charSizeService.width*m),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*m),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._bufferService.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._bufferService.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/m),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/m),this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows,this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols}_setCanvasDevicePixelDimensions(m,w){this.dimensions.device.canvas.height=w,this.dimensions.device.canvas.width=m;for(const y of this._renderLayers)y.resize(this.dimensions);this._requestRedrawViewport()}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}}n.CanvasRenderer=l},873:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorRenderLayer=void 0;const d=o(457),v=o(859),f=o(399),g=o(782),S=o(903);class C extends S.BaseRenderLayer{constructor(h,_,l,u,m,w,y,E,b,x){super(h,_,"cursor",l,!0,x,m,w,b,E),this._onRequestRedraw=u,this._coreService=y,this._cursorBlinkStateManager=this.register(new v.MutableDisposable),this._cell=new g.CellData,this._state={x:0,y:0,isFocused:!1,style:"",width:0},this._cursorRenderers={bar:this._renderBarCursor.bind(this),block:this._renderBlockCursor.bind(this),underline:this._renderUnderlineCursor.bind(this),outline:this._renderOutlineCursor.bind(this)},this.register(w.onOptionChange(()=>this._handleOptionsChanged())),this._handleOptionsChanged()}resize(h){super.resize(h),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(){var h;this._clearCursor(),(h=this._cursorBlinkStateManager.value)==null||h.restartBlinkAnimation(),this._handleOptionsChanged()}handleBlur(){var h;(h=this._cursorBlinkStateManager.value)==null||h.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleFocus(){var h;(h=this._cursorBlinkStateManager.value)==null||h.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}_handleOptionsChanged(){this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager.value||(this._cursorBlinkStateManager.value=new d.CursorBlinkStateManager(()=>this._render(!0),this._coreBrowserService)):this._cursorBlinkStateManager.clear(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleCursorMove(){var h;(h=this._cursorBlinkStateManager.value)==null||h.restartBlinkAnimation()}handleGridChanged(h,_){!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isPaused?this._render(!1):this._cursorBlinkStateManager.value.restartBlinkAnimation()}_render(h){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();const _=this._bufferService.buffer.ybase+this._bufferService.buffer.y,l=_-this._bufferService.buffer.ydisp;if(l<0||l>=this._bufferService.rows)return void this._clearCursor();const u=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(_).loadCell(u,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css;const m=this._optionsService.rawOptions.cursorStyle,w=this._optionsService.rawOptions.cursorInactiveStyle;return w&&w!=="none"&&this._cursorRenderers[w](u,l,this._cell),this._ctx.restore(),this._state.x=u,this._state.y=l,this._state.isFocused=!1,this._state.style=m,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible){if(this._state){if(this._state.x===u&&this._state.y===l&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](u,l,this._cell),this._ctx.restore(),this._state.x=u,this._state.y=l,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(f.isFirefox||this._coreBrowserService.dpr<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})}_renderBarCursor(h,_,l){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillLeftLineAtCell(h,_,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()}_renderBlockCursor(h,_,l){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillCells(h,_,l.getWidth(),1),this._ctx.fillStyle=this._themeService.colors.cursorAccent.css,this._fillCharTrueColor(l,h,_),this._ctx.restore()}_renderUnderlineCursor(h,_,l){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillBottomLineAtCells(h,_),this._ctx.restore()}_renderOutlineCursor(h,_,l){this._ctx.save(),this._ctx.strokeStyle=this._themeService.colors.cursor.css,this._strokeRectAtCell(h,_,l.getWidth(),1),this._ctx.restore()}}n.CursorRenderLayer=C},574:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GridCache=void 0,n.GridCache=class{constructor(){this.cache=[]}resize(o,d){for(let v=0;v<o;v++){this.cache.length<=v&&this.cache.push([]);for(let f=this.cache[v].length;f<d;f++)this.cache[v].push(void 0);this.cache[v].length=d}this.cache.length=o}clear(){for(let o=0;o<this.cache.length;o++)for(let d=0;d<this.cache[o].length;d++)this.cache[o][d]=void 0}}},43:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkRenderLayer=void 0;const d=o(197),v=o(237),f=o(903);class g extends f.BaseRenderLayer{constructor(C,p,h,_,l,u,m,w,y){super(C,p,"link",h,!0,y,l,u,m,w),this.register(_.onShowLinkUnderline(E=>this._handleShowLinkUnderline(E))),this.register(_.onHideLinkUnderline(E=>this._handleHideLinkUnderline(E)))}resize(C){super.resize(C),this._state=void 0}reset(){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const C=this._state.y2-this._state.y1-1;C>0&&this._clearCells(0,this._state.y1+1,this._state.cols,C),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(C){if(C.fg===v.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:C.fg&&(0,d.is256Color)(C.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[C.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,C.y1===C.y2)this._fillBottomLineAtCells(C.x1,C.y1,C.x2-C.x1);else{this._fillBottomLineAtCells(C.x1,C.y1,C.cols-C.x1);for(let p=C.y1+1;p<C.y2;p++)this._fillBottomLineAtCells(0,p,C.cols);this._fillBottomLineAtCells(0,C.y2,C.x2)}this._state=C}_handleHideLinkUnderline(C){this._clearCurrentLink()}}n.LinkRenderLayer=g},630:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionRenderLayer=void 0;const d=o(903);class v extends d.BaseRenderLayer{constructor(g,S,C,p,h,_,l,u){super(g,S,"selection",C,!0,u,p,l,_,h),this._clearState()}_clearState(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}}resize(g){super.resize(g),this._selectionModel.selectionStart&&this._selectionModel.selectionEnd&&(this._clearState(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode))}reset(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())}handleBlur(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleFocus(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleSelectionChanged(g,S,C){super.handleSelectionChanged(g,S,C),this._redrawSelection(g,S,C)}_redrawSelection(g,S,C){if(!this._didStateChange(g,S,C,this._bufferService.buffer.ydisp))return;if(this._clearAll(),!g||!S)return void this._clearState();const p=g[1]-this._bufferService.buffer.ydisp,h=S[1]-this._bufferService.buffer.ydisp,_=Math.max(p,0),l=Math.min(h,this._bufferService.rows-1);if(_>=this._bufferService.rows||l<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=(this._coreBrowserService.isFocused?this._themeService.colors.selectionBackgroundTransparent:this._themeService.colors.selectionInactiveBackgroundTransparent).css,C){const u=g[0],m=S[0]-u,w=l-_+1;this._fillCells(u,_,m,w)}else{const u=p===_?g[0]:0,m=_===h?S[0]:this._bufferService.cols;this._fillCells(u,_,m-u,1);const w=Math.max(l-_-1,0);if(this._fillCells(0,_+1,this._bufferService.cols,w),_!==l){const y=h===l?S[0]:this._bufferService.cols;this._fillCells(0,l,y,1)}}this._state.start=[g[0],g[1]],this._state.end=[S[0],S[1]],this._state.columnSelectMode=C,this._state.ydisp=this._bufferService.buffer.ydisp}}_didStateChange(g,S,C,p){return!this._areCoordinatesEqual(g,this._state.start)||!this._areCoordinatesEqual(S,this._state.end)||C!==this._state.columnSelectMode||p!==this._state.ydisp}_areCoordinatesEqual(g,S){return!(!g||!S)&&g[0]===S[0]&&g[1]===S[1]}}n.SelectionRenderLayer=v},744:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextRenderLayer=void 0;const d=o(577),v=o(147),f=o(782),g=o(855),S=o(903),C=o(574);class p extends S.BaseRenderLayer{constructor(_,l,u,m,w,y,E,b,x,A){super(_,l,"text",u,m,A,w,y,b,x),this._characterJoinerService=E,this._characterWidth=0,this._characterFont="",this._characterOverlapCache={},this._workCell=new f.CellData,this._state=new C.GridCache,this.register(y.onSpecificOptionChange("allowTransparency",O=>this._setTransparency(O)))}resize(_){super.resize(_);const l=this._getFont(!1,!1);this._characterWidth===_.device.char.width&&this._characterFont===l||(this._characterWidth=_.device.char.width,this._characterFont=l,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)}reset(){this._state.clear(),this._clearAll()}_forEachCell(_,l,u){for(let m=_;m<=l;m++){const w=m+this._bufferService.buffer.ydisp,y=this._bufferService.buffer.lines.get(w),E=this._characterJoinerService.getJoinedCharacters(w);for(let b=0;b<this._bufferService.cols;b++){y.loadCell(b,this._workCell);let x=this._workCell,A=!1,O=b;if(x.getWidth()!==0){if(E.length>0&&b===E[0][0]){A=!0;const R=E.shift();x=new d.JoinedCellData(this._workCell,y.translateToString(!0,R[0],R[1]),R[1]-R[0]),O=R[1]-1}!A&&this._isOverlapping(x)&&O<y.length-1&&y.getCodePoint(O+1)===g.NULL_CELL_CODE&&(x.content&=-12582913,x.content|=8388608),u(x,b,m),b=O}}}}_drawBackground(_,l){const u=this._ctx,m=this._bufferService.cols;let w=0,y=0,E=null;u.save(),this._forEachCell(_,l,(b,x,A)=>{let O=null;b.isInverse()?O=b.isFgDefault()?this._themeService.colors.foreground.css:b.isFgRGB()?`rgb(${v.AttributeData.toColorRGB(b.getFgColor()).join(",")})`:this._themeService.colors.ansi[b.getFgColor()].css:b.isBgRGB()?O=`rgb(${v.AttributeData.toColorRGB(b.getBgColor()).join(",")})`:b.isBgPalette()&&(O=this._themeService.colors.ansi[b.getBgColor()].css);let R=!1;this._decorationService.forEachDecorationAtCell(x,this._bufferService.buffer.ydisp+A,void 0,D=>{D.options.layer!=="top"&&R||(D.backgroundColorRGB&&(O=D.backgroundColorRGB.css),R=D.options.layer==="top")}),E===null&&(w=x,y=A),A!==y?(u.fillStyle=E||"",this._fillCells(w,y,m-w,1),w=x,y=A):E!==O&&(u.fillStyle=E||"",this._fillCells(w,y,x-w,1),w=x,y=A),E=O}),E!==null&&(u.fillStyle=E,this._fillCells(w,y,m-w,1)),u.restore()}_drawForeground(_,l){this._forEachCell(_,l,(u,m,w)=>this._drawChars(u,m,w))}handleGridChanged(_,l){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,_,this._bufferService.cols,l-_+1),this._drawBackground(_,l),this._drawForeground(_,l))}_isOverlapping(_){if(_.getWidth()!==1||_.getCode()<256)return!1;const l=_.getChars();if(this._characterOverlapCache.hasOwnProperty(l))return this._characterOverlapCache[l];this._ctx.save(),this._ctx.font=this._characterFont;const u=Math.floor(this._ctx.measureText(l).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[l]=u,u}}n.TextRenderLayer=p},274:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellColorResolver=void 0;const d=o(855),v=o(160),f=o(374);let g,S=0,C=0,p=!1,h=!1,_=!1,l=0;n.CellColorResolver=class{constructor(u,m,w,y,E,b){this._terminal=u,this._optionService=m,this._selectionRenderModel=w,this._decorationService=y,this._coreBrowserService=E,this._themeService=b,this.result={fg:0,bg:0,ext:0}}resolve(u,m,w,y){if(this.result.bg=u.bg,this.result.fg=u.fg,this.result.ext=268435456&u.bg?u.extended.ext:0,C=0,S=0,h=!1,p=!1,_=!1,g=this._themeService.colors,l=0,u.getCode()!==d.NULL_CELL_CODE&&u.extended.underlineStyle===4){const E=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));l=m*y%(2*Math.round(E))}if(this._decorationService.forEachDecorationAtCell(m,w,"bottom",E=>{E.backgroundColorRGB&&(C=E.backgroundColorRGB.rgba>>8&16777215,h=!0),E.foregroundColorRGB&&(S=E.foregroundColorRGB.rgba>>8&16777215,p=!0)}),_=this._selectionRenderModel.isCellSelected(this._terminal,m,w),_){if(67108864&this.result.fg||50331648&this.result.bg){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:C=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:C=(16777215&this.result.fg)<<8|255;break;default:C=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:C=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:C=(16777215&this.result.bg)<<8|255}C=v.rgba.blend(C,4294967040&(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else C=(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(h=!0,g.selectionForeground&&(S=g.selectionForeground.rgba>>8&16777215,p=!0),(0,f.treatGlyphAsBackgroundColor)(u.getCode())){if(67108864&this.result.fg&&!(50331648&this.result.bg))S=(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:S=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:S=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:S=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:S=(16777215&this.result.fg)<<8|255;break;default:S=this._themeService.colors.foreground.rgba}S=v.rgba.blend(S,4294967040&(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}p=!0}}this._decorationService.forEachDecorationAtCell(m,w,"top",E=>{E.backgroundColorRGB&&(C=E.backgroundColorRGB.rgba>>8&16777215,h=!0),E.foregroundColorRGB&&(S=E.foregroundColorRGB.rgba>>8&16777215,p=!0)}),h&&(C=_?-16777216&u.bg&-134217729|C|50331648:-16777216&u.bg|C|50331648),p&&(S=-16777216&u.fg&-67108865|S|50331648),67108864&this.result.fg&&(h&&!p&&(S=50331648&this.result.bg?-134217728&this.result.fg|67108863&this.result.bg:-134217728&this.result.fg|16777215&g.background.rgba>>8|50331648,p=!0),!h&&p&&(C=50331648&this.result.fg?-67108864&this.result.bg|67108863&this.result.fg:-67108864&this.result.bg|16777215&g.foreground.rgba>>8|50331648,h=!0)),g=void 0,this.result.bg=h?C:this.result.bg,this.result.fg=p?S:this.result.fg,this.result.ext&=536870911,this.result.ext|=l<<29&3758096384}}},627:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.removeTerminalFromCache=n.acquireTextureAtlas=void 0;const d=o(509),v=o(197),f=[];n.acquireTextureAtlas=function(g,S,C,p,h,_,l,u){const m=(0,v.generateConfig)(p,h,_,l,S,C,u);for(let E=0;E<f.length;E++){const b=f[E],x=b.ownedBy.indexOf(g);if(x>=0){if((0,v.configEquals)(b.config,m))return b.atlas;b.ownedBy.length===1?(b.atlas.dispose(),f.splice(E,1)):b.ownedBy.splice(x,1);break}}for(let E=0;E<f.length;E++){const b=f[E];if((0,v.configEquals)(b.config,m))return b.ownedBy.push(g),b.atlas}const w=g._core,y={atlas:new d.TextureAtlas(document,m,w.unicodeService),config:m,ownedBy:[g]};return f.push(y),y.atlas},n.removeTerminalFromCache=function(g){for(let S=0;S<f.length;S++){const C=f[S].ownedBy.indexOf(g);if(C!==-1){f[S].ownedBy.length===1?(f[S].atlas.dispose(),f.splice(S,1)):f[S].ownedBy.splice(C,1);break}}}},197:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.is256Color=n.configEquals=n.generateConfig=void 0;const d=o(160);n.generateConfig=function(v,f,g,S,C,p,h){const _={foreground:p.foreground,background:p.background,cursor:d.NULL_COLOR,cursorAccent:d.NULL_COLOR,selectionForeground:d.NULL_COLOR,selectionBackgroundTransparent:d.NULL_COLOR,selectionBackgroundOpaque:d.NULL_COLOR,selectionInactiveBackgroundTransparent:d.NULL_COLOR,selectionInactiveBackgroundOpaque:d.NULL_COLOR,ansi:p.ansi.slice(),contrastCache:p.contrastCache,halfContrastCache:p.halfContrastCache};return{customGlyphs:C.customGlyphs,devicePixelRatio:h,letterSpacing:C.letterSpacing,lineHeight:C.lineHeight,deviceCellWidth:v,deviceCellHeight:f,deviceCharWidth:g,deviceCharHeight:S,fontFamily:C.fontFamily,fontSize:C.fontSize,fontWeight:C.fontWeight,fontWeightBold:C.fontWeightBold,allowTransparency:C.allowTransparency,drawBoldTextInBrightColors:C.drawBoldTextInBrightColors,minimumContrastRatio:C.minimumContrastRatio,colors:_}},n.configEquals=function(v,f){for(let g=0;g<v.colors.ansi.length;g++)if(v.colors.ansi[g].rgba!==f.colors.ansi[g].rgba)return!1;return v.devicePixelRatio===f.devicePixelRatio&&v.customGlyphs===f.customGlyphs&&v.lineHeight===f.lineHeight&&v.letterSpacing===f.letterSpacing&&v.fontFamily===f.fontFamily&&v.fontSize===f.fontSize&&v.fontWeight===f.fontWeight&&v.fontWeightBold===f.fontWeightBold&&v.allowTransparency===f.allowTransparency&&v.deviceCharWidth===f.deviceCharWidth&&v.deviceCharHeight===f.deviceCharHeight&&v.drawBoldTextInBrightColors===f.drawBoldTextInBrightColors&&v.minimumContrastRatio===f.minimumContrastRatio&&v.colors.foreground.rgba===f.colors.foreground.rgba&&v.colors.background.rgba===f.colors.background.rgba},n.is256Color=function(v){return(50331648&v)==16777216||(50331648&v)==33554432}},237:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const d=o(399);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},457:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorBlinkStateManager=void 0,n.CursorBlinkStateManager=class{constructor(o,d){this._renderCallback=o,this._coreBrowserService=d,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})))}_restartInterval(o=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout(()=>{if(this._animationTimeRestarted){const d=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,d>0)return void this._restartInterval(d)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0}),this._blinkInterval=this._coreBrowserService.window.setInterval(()=>{if(this._animationTimeRestarted){const d=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(d)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._renderCallback(),this._animationFrame=void 0})},600)},o)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tryDrawCustomChar=n.powerlineDefinitions=n.boxDrawingDefinitions=n.blockElementDefinitions=void 0;const d=o(374);n.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const v={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};n.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(p,h)=>`M0,${.5-h} L1,${.5-h} M0,${.5+h} L1,${.5+h}`},"║":{1:(p,h)=>`M${.5-p},0 L${.5-p},1 M${.5+p},0 L${.5+p},1`},"╒":{1:(p,h)=>`M.5,1 L.5,${.5-h} L1,${.5-h} M.5,${.5+h} L1,${.5+h}`},"╓":{1:(p,h)=>`M${.5-p},1 L${.5-p},.5 L1,.5 M${.5+p},.5 L${.5+p},1`},"╔":{1:(p,h)=>`M1,${.5-h} L${.5-p},${.5-h} L${.5-p},1 M1,${.5+h} L${.5+p},${.5+h} L${.5+p},1`},"╕":{1:(p,h)=>`M0,${.5-h} L.5,${.5-h} L.5,1 M0,${.5+h} L.5,${.5+h}`},"╖":{1:(p,h)=>`M${.5+p},1 L${.5+p},.5 L0,.5 M${.5-p},.5 L${.5-p},1`},"╗":{1:(p,h)=>`M0,${.5+h} L${.5-p},${.5+h} L${.5-p},1 M0,${.5-h} L${.5+p},${.5-h} L${.5+p},1`},"╘":{1:(p,h)=>`M.5,0 L.5,${.5+h} L1,${.5+h} M.5,${.5-h} L1,${.5-h}`},"╙":{1:(p,h)=>`M1,.5 L${.5-p},.5 L${.5-p},0 M${.5+p},.5 L${.5+p},0`},"╚":{1:(p,h)=>`M1,${.5-h} L${.5+p},${.5-h} L${.5+p},0 M1,${.5+h} L${.5-p},${.5+h} L${.5-p},0`},"╛":{1:(p,h)=>`M0,${.5+h} L.5,${.5+h} L.5,0 M0,${.5-h} L.5,${.5-h}`},"╜":{1:(p,h)=>`M0,.5 L${.5+p},.5 L${.5+p},0 M${.5-p},.5 L${.5-p},0`},"╝":{1:(p,h)=>`M0,${.5-h} L${.5-p},${.5-h} L${.5-p},0 M0,${.5+h} L${.5+p},${.5+h} L${.5+p},0`},"╞":{1:(p,h)=>`M.5,0 L.5,1 M.5,${.5-h} L1,${.5-h} M.5,${.5+h} L1,${.5+h}`},"╟":{1:(p,h)=>`M${.5-p},0 L${.5-p},1 M${.5+p},0 L${.5+p},1 M${.5+p},.5 L1,.5`},"╠":{1:(p,h)=>`M${.5-p},0 L${.5-p},1 M1,${.5+h} L${.5+p},${.5+h} L${.5+p},1 M1,${.5-h} L${.5+p},${.5-h} L${.5+p},0`},"╡":{1:(p,h)=>`M.5,0 L.5,1 M0,${.5-h} L.5,${.5-h} M0,${.5+h} L.5,${.5+h}`},"╢":{1:(p,h)=>`M0,.5 L${.5-p},.5 M${.5-p},0 L${.5-p},1 M${.5+p},0 L${.5+p},1`},"╣":{1:(p,h)=>`M${.5+p},0 L${.5+p},1 M0,${.5+h} L${.5-p},${.5+h} L${.5-p},1 M0,${.5-h} L${.5-p},${.5-h} L${.5-p},0`},"╤":{1:(p,h)=>`M0,${.5-h} L1,${.5-h} M0,${.5+h} L1,${.5+h} M.5,${.5+h} L.5,1`},"╥":{1:(p,h)=>`M0,.5 L1,.5 M${.5-p},.5 L${.5-p},1 M${.5+p},.5 L${.5+p},1`},"╦":{1:(p,h)=>`M0,${.5-h} L1,${.5-h} M0,${.5+h} L${.5-p},${.5+h} L${.5-p},1 M1,${.5+h} L${.5+p},${.5+h} L${.5+p},1`},"╧":{1:(p,h)=>`M.5,0 L.5,${.5-h} M0,${.5-h} L1,${.5-h} M0,${.5+h} L1,${.5+h}`},"╨":{1:(p,h)=>`M0,.5 L1,.5 M${.5-p},.5 L${.5-p},0 M${.5+p},.5 L${.5+p},0`},"╩":{1:(p,h)=>`M0,${.5+h} L1,${.5+h} M0,${.5-h} L${.5-p},${.5-h} L${.5-p},0 M1,${.5-h} L${.5+p},${.5-h} L${.5+p},0`},"╪":{1:(p,h)=>`M.5,0 L.5,1 M0,${.5-h} L1,${.5-h} M0,${.5+h} L1,${.5+h}`},"╫":{1:(p,h)=>`M0,.5 L1,.5 M${.5-p},0 L${.5-p},1 M${.5+p},0 L${.5+p},1`},"╬":{1:(p,h)=>`M0,${.5+h} L${.5-p},${.5+h} L${.5-p},1 M1,${.5+h} L${.5+p},${.5+h} L${.5+p},1 M0,${.5-h} L${.5-p},${.5-h} L${.5-p},0 M1,${.5-h} L${.5+p},${.5-h} L${.5+p},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(p,h)=>`M.5,1 L.5,${.5+h/.15*.5} C.5,${.5+h/.15*.5},.5,.5,1,.5`},"╮":{1:(p,h)=>`M.5,1 L.5,${.5+h/.15*.5} C.5,${.5+h/.15*.5},.5,.5,0,.5`},"╯":{1:(p,h)=>`M.5,0 L.5,${.5-h/.15*.5} C.5,${.5-h/.15*.5},.5,.5,0,.5`},"╰":{1:(p,h)=>`M.5,0 L.5,${.5-h/.15*.5} C.5,${.5-h/.15*.5},.5,.5,1,.5`}},n.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},n.powerlineDefinitions[""]=n.powerlineDefinitions[""],n.powerlineDefinitions[""]=n.powerlineDefinitions[""],n.tryDrawCustomChar=function(p,h,_,l,u,m,w,y){const E=n.blockElementDefinitions[h];if(E)return function(O,R,D,B,U,N){for(let P=0;P<R.length;P++){const z=R[P],L=U/8,M=N/8;O.fillRect(D+z.x*L,B+z.y*M,z.w*L,z.h*M)}}(p,E,_,l,u,m),!0;const b=v[h];if(b)return function(O,R,D,B,U,N){let P=f.get(R);P||(P=new Map,f.set(R,P));const z=O.fillStyle;if(typeof z!="string")throw new Error(`Unexpected fillStyle type "${z}"`);let L=P.get(z);if(!L){const M=R[0].length,k=R.length,H=O.canvas.ownerDocument.createElement("canvas");H.width=M,H.height=k;const $=(0,d.throwIfFalsy)(H.getContext("2d")),V=new ImageData(M,k);let Z,J,j,T;if(z.startsWith("#"))Z=parseInt(z.slice(1,3),16),J=parseInt(z.slice(3,5),16),j=parseInt(z.slice(5,7),16),T=z.length>7&&parseInt(z.slice(7,9),16)||1;else{if(!z.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${z}" when drawing pattern glyph`);[Z,J,j,T]=z.substring(5,z.length-1).split(",").map(W=>parseFloat(W))}for(let W=0;W<k;W++)for(let F=0;F<M;F++)V.data[4*(W*M+F)]=Z,V.data[4*(W*M+F)+1]=J,V.data[4*(W*M+F)+2]=j,V.data[4*(W*M+F)+3]=R[W][F]*(255*T);$.putImageData(V,0,0),L=(0,d.throwIfFalsy)(O.createPattern(H,null)),P.set(z,L)}O.fillStyle=L,O.fillRect(D,B,U,N)}(p,b,_,l,u,m),!0;const x=n.boxDrawingDefinitions[h];if(x)return function(O,R,D,B,U,N,P){O.strokeStyle=O.fillStyle;for(const[z,L]of Object.entries(R)){let M;O.beginPath(),O.lineWidth=P*Number.parseInt(z),M=typeof L=="function"?L(.15,.15/N*U):L;for(const k of M.split(" ")){const H=k[0],$=S[H];if(!$){console.error(`Could not find drawing instructions for "${H}"`);continue}const V=k.substring(1).split(",");V[0]&&V[1]&&$(O,C(V,U,N,D,B,!0,P))}O.stroke(),O.closePath()}}(p,x,_,l,u,m,y),!0;const A=n.powerlineDefinitions[h];return!!A&&(function(O,R,D,B,U,N,P,z){const L=new Path2D;L.rect(D,B,U,N),O.clip(L),O.beginPath();const M=P/12;O.lineWidth=z*M;for(const k of R.d.split(" ")){const H=k[0],$=S[H];if(!$){console.error(`Could not find drawing instructions for "${H}"`);continue}const V=k.substring(1).split(",");V[0]&&V[1]&&$(O,C(V,U,N,D,B,!1,z,(R.leftPadding??0)*(M/2),(R.rightPadding??0)*(M/2)))}R.type===1?(O.strokeStyle=O.fillStyle,O.stroke()):O.fill(),O.closePath()}(p,A,_,l,u,m,w,y),!0)};const f=new Map;function g(p,h,_=0){return Math.max(Math.min(p,h),_)}const S={C:(p,h)=>p.bezierCurveTo(h[0],h[1],h[2],h[3],h[4],h[5]),L:(p,h)=>p.lineTo(h[0],h[1]),M:(p,h)=>p.moveTo(h[0],h[1])};function C(p,h,_,l,u,m,w,y=0,E=0){const b=p.map(x=>parseFloat(x)||parseInt(x));if(b.length<2)throw new Error("Too few arguments for instruction");for(let x=0;x<b.length;x+=2)b[x]*=h-y*w-E*w,m&&b[x]!==0&&(b[x]=g(Math.round(b[x]+.5)-.5,h,0)),b[x]+=l+y*w;for(let x=1;x<b.length;x+=2)b[x]*=_,m&&b[x]!==0&&(b[x]=g(Math.round(b[x]+.5)-.5,_,0)),b[x]+=u;return b}},56:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.observeDevicePixelDimensions=void 0;const d=o(859);n.observeDevicePixelDimensions=function(v,f,g){let S=new f.ResizeObserver(C=>{const p=C.find(l=>l.target===v);if(!p)return;if(!("devicePixelContentBoxSize"in p))return S==null||S.disconnect(),void(S=void 0);const h=p.devicePixelContentBoxSize[0].inlineSize,_=p.devicePixelContentBoxSize[0].blockSize;h>0&&_>0&&g(h,_)});try{S.observe(v,{box:["device-pixel-content-box"]})}catch{S.disconnect(),S=void 0}return(0,d.toDisposable)(()=>S==null?void 0:S.disconnect())}},374:(c,n)=>{function o(v){return 57508<=v&&v<=57558}function d(v){return v>=128512&&v<=128591||v>=127744&&v<=128511||v>=128640&&v<=128767||v>=9728&&v<=9983||v>=9984&&v<=10175||v>=65024&&v<=65039||v>=129280&&v<=129535||v>=127462&&v<=127487}Object.defineProperty(n,"__esModule",{value:!0}),n.computeNextVariantOffset=n.createRenderDimensions=n.treatGlyphAsBackgroundColor=n.allowRescaling=n.isEmoji=n.isRestrictedPowerlineGlyph=n.isPowerlineGlyph=n.throwIfFalsy=void 0,n.throwIfFalsy=function(v){if(!v)throw new Error("value must not be falsy");return v},n.isPowerlineGlyph=o,n.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},n.isEmoji=d,n.allowRescaling=function(v,f,g,S){return f===1&&g>Math.ceil(1.5*S)&&v!==void 0&&v>255&&!d(v)&&!o(v)&&!function(C){return 57344<=C&&C<=63743}(v)},n.treatGlyphAsBackgroundColor=function(v){return o(v)||function(f){return 9472<=f&&f<=9631}(v)},n.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}}}},n.computeNextVariantOffset=function(v,f,g=0){return(v-(2*Math.round(f)-g))%(2*Math.round(f))}},296:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class o{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(v,f,g,S=!1){if(this.selectionStart=f,this.selectionEnd=g,!f||!g||f[0]===g[0]&&f[1]===g[1])return void this.clear();const C=v.buffers.active.ydisp,p=f[1]-C,h=g[1]-C,_=Math.max(p,0),l=Math.min(h,v.rows-1);_>=v.rows||l<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=S,this.viewportStartRow=p,this.viewportEndRow=h,this.viewportCappedStartRow=_,this.viewportCappedEndRow=l,this.startCol=f[0],this.endCol=g[0])}isCellSelected(v,f,g){return!!this.hasSelection&&(g-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?f>=this.startCol&&g>=this.viewportCappedStartRow&&f<this.endCol&&g<=this.viewportCappedEndRow:f<this.startCol&&g>=this.viewportCappedStartRow&&f>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&f>=this.startCol&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&f<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportStartRow&&f>=this.startCol)}}n.createSelectionRenderModel=function(){return new o}},509:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextureAtlas=void 0;const d=o(237),v=o(860),f=o(374),g=o(160),S=o(345),C=o(485),p=o(385),h=o(147),_=o(855),l={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let u;class m{get pages(){return this._pages}constructor(x,A,O){this._document=x,this._config=A,this._unicodeService=O,this._didWarmUp=!1,this._cacheMap=new C.FourKeyMap,this._cacheMapCombined=new C.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new h.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new S.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new S.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=E(x,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,f.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const x of this.pages)x.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const x=new p.IdleTaskQueue;for(let A=33;A<126;A++)x.enqueue(()=>{if(!this._cacheMap.get(A,_.DEFAULT_COLOR,_.DEFAULT_COLOR,_.DEFAULT_EXT)){const O=this._drawToCache(A,_.DEFAULT_COLOR,_.DEFAULT_COLOR,_.DEFAULT_EXT);this._cacheMap.set(A,_.DEFAULT_COLOR,_.DEFAULT_COLOR,_.DEFAULT_EXT,O)}})}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const x of this._pages)x.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(m.maxAtlasPages&&this._pages.length>=Math.max(4,m.maxAtlasPages)){const A=this._pages.filter(P=>2*P.canvas.width<=(m.maxTextureSize||4096)).sort((P,z)=>z.canvas.width!==P.canvas.width?z.canvas.width-P.canvas.width:z.percentageUsed-P.percentageUsed);let O=-1,R=0;for(let P=0;P<A.length;P++)if(A[P].canvas.width!==R)O=P,R=A[P].canvas.width;else if(P-O==3)break;const D=A.slice(O,O+4),B=D.map(P=>P.glyphs[0].texturePage).sort((P,z)=>P>z?1:-1),U=this.pages.length-D.length,N=this._mergePages(D,U);N.version++;for(let P=B.length-1;P>=0;P--)this._deletePage(B[P]);this.pages.push(N),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(N.canvas)}const x=new w(this._document,this._textureSize);return this._pages.push(x),this._activePages.push(x),this._onAddTextureAtlasCanvas.fire(x.canvas),x}_mergePages(x,A){const O=2*x[0].canvas.width,R=new w(this._document,O,x);for(const[D,B]of x.entries()){const U=D*B.canvas.width%O,N=Math.floor(D/2)*B.canvas.height;R.ctx.drawImage(B.canvas,U,N);for(const z of B.glyphs)z.texturePage=A,z.sizeClipSpace.x=z.size.x/O,z.sizeClipSpace.y=z.size.y/O,z.texturePosition.x+=U,z.texturePosition.y+=N,z.texturePositionClipSpace.x=z.texturePosition.x/O,z.texturePositionClipSpace.y=z.texturePosition.y/O;this._onRemoveTextureAtlasCanvas.fire(B.canvas);const P=this._activePages.indexOf(B);P!==-1&&this._activePages.splice(P,1)}return R}_deletePage(x){this._pages.splice(x,1);for(let A=x;A<this._pages.length;A++){const O=this._pages[A];for(const R of O.glyphs)R.texturePage--;O.version++}}getRasterizedGlyphCombinedChar(x,A,O,R,D){return this._getFromCacheMap(this._cacheMapCombined,x,A,O,R,D)}getRasterizedGlyph(x,A,O,R,D){return this._getFromCacheMap(this._cacheMap,x,A,O,R,D)}_getFromCacheMap(x,A,O,R,D,B=!1){return u=x.get(A,O,R,D),u||(u=this._drawToCache(A,O,R,D,B),x.set(A,O,R,D,u)),u}_getColorFromAnsiIndex(x){if(x>=this._config.colors.ansi.length)throw new Error("No color found for idx "+x);return this._config.colors.ansi[x]}_getBackgroundColor(x,A,O,R){if(this._config.allowTransparency)return g.NULL_COLOR;let D;switch(x){case 16777216:case 33554432:D=this._getColorFromAnsiIndex(A);break;case 50331648:const B=h.AttributeData.toColorRGB(A);D=g.channels.toColor(B[0],B[1],B[2]);break;default:D=O?g.color.opaque(this._config.colors.foreground):this._config.colors.background}return D}_getForegroundColor(x,A,O,R,D,B,U,N,P,z){const L=this._getMinimumContrastColor(x,A,O,R,D,B,U,P,N,z);if(L)return L;let M;switch(D){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&P&&B<8&&(B+=8),M=this._getColorFromAnsiIndex(B);break;case 50331648:const k=h.AttributeData.toColorRGB(B);M=g.channels.toColor(k[0],k[1],k[2]);break;default:M=U?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(M=g.color.opaque(M)),N&&(M=g.color.multiplyOpacity(M,d.DIM_OPACITY)),M}_resolveBackgroundRgba(x,A,O){switch(x){case 16777216:case 33554432:return this._getColorFromAnsiIndex(A).rgba;case 50331648:return A<<8;default:return O?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(x,A,O,R){switch(x){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&R&&A<8&&(A+=8),this._getColorFromAnsiIndex(A).rgba;case 50331648:return A<<8;default:return O?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(x,A,O,R,D,B,U,N,P,z){if(this._config.minimumContrastRatio===1||z)return;const L=this._getContrastCache(P),M=L.getColor(x,R);if(M!==void 0)return M||void 0;const k=this._resolveBackgroundRgba(A,O,U),H=this._resolveForegroundRgba(D,B,U,N),$=g.rgba.ensureContrastRatio(k,H,this._config.minimumContrastRatio/(P?2:1));if(!$)return void L.setColor(x,R,null);const V=g.channels.toColor($>>24&255,$>>16&255,$>>8&255);return L.setColor(x,R,V),V}_getContrastCache(x){return x?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(x,A,O,R,D=!1){const B=typeof x=="number"?String.fromCharCode(x):x,U=Math.min(this._config.deviceCellWidth*Math.max(B.length,2)+4,this._textureSize);this._tmpCanvas.width<U&&(this._tmpCanvas.width=U);const N=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<N&&(this._tmpCanvas.height=N),this._tmpCtx.save(),this._workAttributeData.fg=O,this._workAttributeData.bg=A,this._workAttributeData.extended.ext=R,this._workAttributeData.isInvisible())return l;const P=!!this._workAttributeData.isBold(),z=!!this._workAttributeData.isInverse(),L=!!this._workAttributeData.isDim(),M=!!this._workAttributeData.isItalic(),k=!!this._workAttributeData.isUnderline(),H=!!this._workAttributeData.isStrikethrough(),$=!!this._workAttributeData.isOverline();let V=this._workAttributeData.getFgColor(),Z=this._workAttributeData.getFgColorMode(),J=this._workAttributeData.getBgColor(),j=this._workAttributeData.getBgColorMode();if(z){const Q=V;V=J,J=Q;const ve=Z;Z=j,j=ve}const T=this._getBackgroundColor(j,J,z,L);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=T.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const W=P?this._config.fontWeightBold:this._config.fontWeight,F=M?"italic":"";this._tmpCtx.font=`${F} ${W} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=d.TEXT_BASELINE;const X=B.length===1&&(0,f.isPowerlineGlyph)(B.charCodeAt(0)),Y=B.length===1&&(0,f.isRestrictedPowerlineGlyph)(B.charCodeAt(0)),oe=this._getForegroundColor(A,j,J,O,Z,V,z,L,P,(0,f.treatGlyphAsBackgroundColor)(B.charCodeAt(0)));this._tmpCtx.fillStyle=oe.css;const te=Y?0:4;let xe=!1;this._config.customGlyphs!==!1&&(xe=(0,v.tryDrawCustomChar)(this._tmpCtx,B,te,te,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let Fe,ee=!X;if(Fe=typeof x=="number"?this._unicodeService.wcwidth(x):this._unicodeService.getStringCellWidth(x),k){this._tmpCtx.save();const Q=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ve=Q%2==1?.5:0;if(this._tmpCtx.lineWidth=Q,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())ee=!1,this._tmpCtx.strokeStyle=`rgb(${h.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{ee=!1;let $e=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&$e<8&&($e+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex($e).css}this._tmpCtx.beginPath();const ze=te,De=Math.ceil(te+this._config.deviceCharHeight)-ve-(D?2*Q:0),vi=De+Q,ct=De+2*Q;let Mt=this._workAttributeData.getUnderlineVariantOffset();for(let $e=0;$e<Fe;$e++){this._tmpCtx.save();const Le=ze+$e*this._config.deviceCellWidth,le=ze+($e+1)*this._config.deviceCellWidth,nn=Le+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Le,De),this._tmpCtx.lineTo(le,De),this._tmpCtx.moveTo(Le,ct),this._tmpCtx.lineTo(le,ct);break;case 3:const ya=Q<=1?ct:Math.ceil(te+this._config.deviceCharHeight-Q/2)-ve,ba=Q<=1?De:Math.ceil(te+this._config.deviceCharHeight+Q/2)-ve,mf=new Path2D;mf.rect(Le,De,this._config.deviceCellWidth,ct-De),this._tmpCtx.clip(mf),this._tmpCtx.moveTo(Le-this._config.deviceCellWidth/2,vi),this._tmpCtx.bezierCurveTo(Le-this._config.deviceCellWidth/2,ba,Le,ba,Le,vi),this._tmpCtx.bezierCurveTo(Le,ya,nn,ya,nn,vi),this._tmpCtx.bezierCurveTo(nn,ba,le,ba,le,vi),this._tmpCtx.bezierCurveTo(le,ya,le+this._config.deviceCellWidth/2,ya,le+this._config.deviceCellWidth/2,vi);break;case 4:const Ca=Mt===0?0:Mt>=Q?2*Q-Mt:Q-Mt;Mt>=Q||Ca===0?(this._tmpCtx.setLineDash([Math.round(Q),Math.round(Q)]),this._tmpCtx.moveTo(Le+Ca,De),this._tmpCtx.lineTo(le,De)):(this._tmpCtx.setLineDash([Math.round(Q),Math.round(Q)]),this._tmpCtx.moveTo(Le,De),this._tmpCtx.lineTo(Le+Ca,De),this._tmpCtx.moveTo(Le+Ca+Q,De),this._tmpCtx.lineTo(le,De)),Mt=(0,f.computeNextVariantOffset)(le-Le,Q,Mt);break;case 5:const M0=.6,T0=.3,Pl=le-Le,Sf=Math.floor(M0*Pl),yf=Math.floor(T0*Pl),B0=Pl-Sf-yf;this._tmpCtx.setLineDash([Sf,yf,B0]),this._tmpCtx.moveTo(Le,De),this._tmpCtx.lineTo(le,De);break;default:this._tmpCtx.moveTo(Le,De),this._tmpCtx.lineTo(le,De)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!xe&&this._config.fontSize>=12&&!this._config.allowTransparency&&B!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const $e=this._tmpCtx.measureText(B);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in $e&&$e.actualBoundingBoxDescent>0){this._tmpCtx.save();const Le=new Path2D;Le.rect(ze,De-Math.ceil(Q/2),this._config.deviceCellWidth*Fe,ct-De+Math.ceil(Q/2)),this._tmpCtx.clip(Le),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=T.css,this._tmpCtx.strokeText(B,te,te+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if($){const Q=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ve=Q%2==1?.5:0;this._tmpCtx.lineWidth=Q,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(te,te+ve),this._tmpCtx.lineTo(te+this._config.deviceCharWidth*Fe,te+ve),this._tmpCtx.stroke()}if(xe||this._tmpCtx.fillText(B,te,te+this._config.deviceCharHeight),B==="_"&&!this._config.allowTransparency){let Q=y(this._tmpCtx.getImageData(te,te,this._config.deviceCellWidth,this._config.deviceCellHeight),T,oe,ee);if(Q)for(let ve=1;ve<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=T.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(B,te,te+this._config.deviceCharHeight-ve),Q=y(this._tmpCtx.getImageData(te,te,this._config.deviceCellWidth,this._config.deviceCellHeight),T,oe,ee),Q);ve++);}if(H){const Q=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),ve=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=Q,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(te,te+Math.floor(this._config.deviceCharHeight/2)-ve),this._tmpCtx.lineTo(te+this._config.deviceCharWidth*Fe,te+Math.floor(this._config.deviceCharHeight/2)-ve),this._tmpCtx.stroke()}this._tmpCtx.restore();const ti=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Jr;if(Jr=this._config.allowTransparency?function(Q){for(let ve=0;ve<Q.data.length;ve+=4)if(Q.data[ve+3]>0)return!1;return!0}(ti):y(ti,T,oe,ee),Jr)return l;const pe=this._findGlyphBoundingBox(ti,this._workBoundingBox,U,Y,xe,te);let he,fe;for(;;){if(this._activePages.length===0){const Q=this._createNewPage();he=Q,fe=Q.currentRow,fe.height=pe.size.y;break}he=this._activePages[this._activePages.length-1],fe=he.currentRow;for(const Q of this._activePages)pe.size.y<=Q.currentRow.height&&(he=Q,fe=Q.currentRow);for(let Q=this._activePages.length-1;Q>=0;Q--)for(const ve of this._activePages[Q].fixedRows)ve.height<=fe.height&&pe.size.y<=ve.height&&(he=this._activePages[Q],fe=ve);if(fe.y+pe.size.y>=he.canvas.height||fe.height>pe.size.y+2){let Q=!1;if(he.currentRow.y+he.currentRow.height+pe.size.y>=he.canvas.height){let ve;for(const ze of this._activePages)if(ze.currentRow.y+ze.currentRow.height+pe.size.y<ze.canvas.height){ve=ze;break}if(ve)he=ve;else if(m.maxAtlasPages&&this._pages.length>=m.maxAtlasPages&&fe.y+pe.size.y<=he.canvas.height&&fe.height>=pe.size.y&&fe.x+pe.size.x<=he.canvas.width)Q=!0;else{const ze=this._createNewPage();he=ze,fe=ze.currentRow,fe.height=pe.size.y,Q=!0}}Q||(he.currentRow.height>0&&he.fixedRows.push(he.currentRow),fe={x:0,y:he.currentRow.y+he.currentRow.height,height:pe.size.y},he.fixedRows.push(fe),he.currentRow={x:0,y:fe.y+fe.height,height:0})}if(fe.x+pe.size.x<=he.canvas.width)break;fe===he.currentRow?(fe.x=0,fe.y+=fe.height,fe.height=0):he.fixedRows.splice(he.fixedRows.indexOf(fe),1)}return pe.texturePage=this._pages.indexOf(he),pe.texturePosition.x=fe.x,pe.texturePosition.y=fe.y,pe.texturePositionClipSpace.x=fe.x/he.canvas.width,pe.texturePositionClipSpace.y=fe.y/he.canvas.height,pe.sizeClipSpace.x/=he.canvas.width,pe.sizeClipSpace.y/=he.canvas.height,fe.height=Math.max(fe.height,pe.size.y),fe.x+=pe.size.x,he.ctx.putImageData(ti,pe.texturePosition.x-this._workBoundingBox.left,pe.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,pe.size.x,pe.size.y),he.addGlyph(pe),he.version++,pe}_findGlyphBoundingBox(x,A,O,R,D,B){A.top=0;const U=R?this._config.deviceCellHeight:this._tmpCanvas.height,N=R?this._config.deviceCellWidth:O;let P=!1;for(let z=0;z<U;z++){for(let L=0;L<N;L++){const M=z*this._tmpCanvas.width*4+4*L+3;if(x.data[M]!==0){A.top=z,P=!0;break}}if(P)break}A.left=0,P=!1;for(let z=0;z<B+N;z++){for(let L=0;L<U;L++){const M=L*this._tmpCanvas.width*4+4*z+3;if(x.data[M]!==0){A.left=z,P=!0;break}}if(P)break}A.right=N,P=!1;for(let z=B+N-1;z>=B;z--){for(let L=0;L<U;L++){const M=L*this._tmpCanvas.width*4+4*z+3;if(x.data[M]!==0){A.right=z,P=!0;break}}if(P)break}A.bottom=U,P=!1;for(let z=U-1;z>=0;z--){for(let L=0;L<N;L++){const M=z*this._tmpCanvas.width*4+4*L+3;if(x.data[M]!==0){A.bottom=z,P=!0;break}}if(P)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:A.right-A.left+1,y:A.bottom-A.top+1},sizeClipSpace:{x:A.right-A.left+1,y:A.bottom-A.top+1},offset:{x:-A.left+B+(R||D?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-A.top+B+(R||D?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}n.TextureAtlas=m;class w{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(x){this._glyphs.push(x),this._usedPixels+=x.size.x*x.size.y}constructor(x,A,O){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],O)for(const R of O)this._glyphs.push(...R.glyphs),this._usedPixels+=R._usedPixels;this.canvas=E(x,A,A),this.ctx=(0,f.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function y(b,x,A,O){const R=x.rgba>>>24,D=x.rgba>>>16&255,B=x.rgba>>>8&255,U=A.rgba>>>24,N=A.rgba>>>16&255,P=A.rgba>>>8&255,z=Math.floor((Math.abs(R-U)+Math.abs(D-N)+Math.abs(B-P))/12);let L=!0;for(let M=0;M<b.data.length;M+=4)b.data[M]===R&&b.data[M+1]===D&&b.data[M+2]===B||O&&Math.abs(b.data[M]-R)+Math.abs(b.data[M+1]-D)+Math.abs(b.data[M+2]-B)<z?b.data[M+3]=0:L=!1;return L}function E(b,x,A){const O=b.createElement("canvas");return O.width=x,O.height=A,O}},577:function(c,n,o){var d=this&&this.__decorate||function(_,l,u,m){var w,y=arguments.length,E=y<3?l:m===null?m=Object.getOwnPropertyDescriptor(l,u):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(_,l,u,m);else for(var b=_.length-1;b>=0;b--)(w=_[b])&&(E=(y<3?w(E):y>3?w(l,u,E):w(l,u))||E);return y>3&&E&&Object.defineProperty(l,u,E),E},v=this&&this.__param||function(_,l){return function(u,m){l(u,m,_)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const f=o(147),g=o(855),S=o(782),C=o(97);class p extends f.AttributeData{constructor(l,u,m){super(),this.content=0,this.combinedData="",this.fg=l.fg,this.bg=l.bg,this.combinedData=u,this._width=m}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(l){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.JoinedCellData=p;let h=n.CharacterJoinerService=class D0{constructor(l){this._bufferService=l,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new S.CellData}register(l){const u={id:this._nextCharacterJoinerId++,handler:l};return this._characterJoiners.push(u),u.id}deregister(l){for(let u=0;u<this._characterJoiners.length;u++)if(this._characterJoiners[u].id===l)return this._characterJoiners.splice(u,1),!0;return!1}getJoinedCharacters(l){if(this._characterJoiners.length===0)return[];const u=this._bufferService.buffer.lines.get(l);if(!u||u.length===0)return[];const m=[],w=u.translateToString(!0);let y=0,E=0,b=0,x=u.getFg(0),A=u.getBg(0);for(let O=0;O<u.getTrimmedLength();O++)if(u.loadCell(O,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==x||this._workCell.bg!==A){if(O-y>1){const R=this._getJoinedRanges(w,b,E,u,y);for(let D=0;D<R.length;D++)m.push(R[D])}y=O,b=E,x=this._workCell.fg,A=this._workCell.bg}E+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-y>1){const O=this._getJoinedRanges(w,b,E,u,y);for(let R=0;R<O.length;R++)m.push(O[R])}return m}_getJoinedRanges(l,u,m,w,y){const E=l.substring(u,m);let b=[];try{b=this._characterJoiners[0].handler(E)}catch(x){console.error(x)}for(let x=1;x<this._characterJoiners.length;x++)try{const A=this._characterJoiners[x].handler(E);for(let O=0;O<A.length;O++)D0._mergeRanges(b,A[O])}catch(A){console.error(A)}return this._stringRangesToCellRanges(b,w,y),b}_stringRangesToCellRanges(l,u,m){let w=0,y=!1,E=0,b=l[w];if(b){for(let x=m;x<this._bufferService.cols;x++){const A=u.getWidth(x),O=u.getString(x).length||g.WHITESPACE_CELL_CHAR.length;if(A!==0){if(!y&&b[0]<=E&&(b[0]=x,y=!0),b[1]<=E){if(b[1]=x,b=l[++w],!b)break;b[0]<=E?(b[0]=x,y=!0):y=!1}E+=O}}b&&(b[1]=this._bufferService.cols)}}static _mergeRanges(l,u){let m=!1;for(let w=0;w<l.length;w++){const y=l[w];if(m){if(u[1]<=y[0])return l[w-1][1]=u[1],l;if(u[1]<=y[1])return l[w-1][1]=Math.max(u[1],y[1]),l.splice(w,1),l;l.splice(w,1),w--}else{if(u[1]<=y[0])return l.splice(w,0,u),l;if(u[1]<=y[1])return y[0]=Math.min(u[0],y[0]),l;u[0]<y[1]&&(y[0]=Math.min(u[0],y[0]),m=!0)}}return m?l[l.length-1][1]=u[1]:l.push(u),l}};n.CharacterJoinerService=h=d([v(0,C.IBufferService)],h)},160:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.contrastRatio=n.toPaddedHex=n.rgba=n.rgb=n.css=n.color=n.channels=n.NULL_COLOR=void 0;let o=0,d=0,v=0,f=0;var g,S,C,p,h;function _(u){const m=u.toString(16);return m.length<2?"0"+m:m}function l(u,m){return u<m?(m+.05)/(u+.05):(u+.05)/(m+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},function(u){u.toCss=function(m,w,y,E){return E!==void 0?`#${_(m)}${_(w)}${_(y)}${_(E)}`:`#${_(m)}${_(w)}${_(y)}`},u.toRgba=function(m,w,y,E=255){return(m<<24|w<<16|y<<8|E)>>>0},u.toColor=function(m,w,y,E){return{css:u.toCss(m,w,y,E),rgba:u.toRgba(m,w,y,E)}}}(g||(n.channels=g={})),function(u){function m(w,y){return f=Math.round(255*y),[o,d,v]=h.toChannels(w.rgba),{css:g.toCss(o,d,v,f),rgba:g.toRgba(o,d,v,f)}}u.blend=function(w,y){if(f=(255&y.rgba)/255,f===1)return{css:y.css,rgba:y.rgba};const E=y.rgba>>24&255,b=y.rgba>>16&255,x=y.rgba>>8&255,A=w.rgba>>24&255,O=w.rgba>>16&255,R=w.rgba>>8&255;return o=A+Math.round((E-A)*f),d=O+Math.round((b-O)*f),v=R+Math.round((x-R)*f),{css:g.toCss(o,d,v),rgba:g.toRgba(o,d,v)}},u.isOpaque=function(w){return(255&w.rgba)==255},u.ensureContrastRatio=function(w,y,E){const b=h.ensureContrastRatio(w.rgba,y.rgba,E);if(b)return g.toColor(b>>24&255,b>>16&255,b>>8&255)},u.opaque=function(w){const y=(255|w.rgba)>>>0;return[o,d,v]=h.toChannels(y),{css:g.toCss(o,d,v),rgba:y}},u.opacity=m,u.multiplyOpacity=function(w,y){return f=255&w.rgba,m(w,f*y/255)},u.toColorRGB=function(w){return[w.rgba>>24&255,w.rgba>>16&255,w.rgba>>8&255]}}(S||(n.color=S={})),function(u){let m,w;try{const y=document.createElement("canvas");y.width=1,y.height=1;const E=y.getContext("2d",{willReadFrequently:!0});E&&(m=E,m.globalCompositeOperation="copy",w=m.createLinearGradient(0,0,1,1))}catch{}u.toColor=function(y){if(y.match(/#[\da-f]{3,8}/i))switch(y.length){case 4:return o=parseInt(y.slice(1,2).repeat(2),16),d=parseInt(y.slice(2,3).repeat(2),16),v=parseInt(y.slice(3,4).repeat(2),16),g.toColor(o,d,v);case 5:return o=parseInt(y.slice(1,2).repeat(2),16),d=parseInt(y.slice(2,3).repeat(2),16),v=parseInt(y.slice(3,4).repeat(2),16),f=parseInt(y.slice(4,5).repeat(2),16),g.toColor(o,d,v,f);case 7:return{css:y,rgba:(parseInt(y.slice(1),16)<<8|255)>>>0};case 9:return{css:y,rgba:parseInt(y.slice(1),16)>>>0}}const E=y.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(E)return o=parseInt(E[1]),d=parseInt(E[2]),v=parseInt(E[3]),f=Math.round(255*(E[5]===void 0?1:parseFloat(E[5]))),g.toColor(o,d,v,f);if(!m||!w)throw new Error("css.toColor: Unsupported css format");if(m.fillStyle=w,m.fillStyle=y,typeof m.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(m.fillRect(0,0,1,1),[o,d,v,f]=m.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(o,d,v,f),css:y}}}(C||(n.css=C={})),function(u){function m(w,y,E){const b=w/255,x=y/255,A=E/255;return .2126*(b<=.03928?b/12.92:Math.pow((b+.055)/1.055,2.4))+.7152*(x<=.03928?x/12.92:Math.pow((x+.055)/1.055,2.4))+.0722*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))}u.relativeLuminance=function(w){return m(w>>16&255,w>>8&255,255&w)},u.relativeLuminance2=m}(p||(n.rgb=p={})),function(u){function m(y,E,b){const x=y>>24&255,A=y>>16&255,O=y>>8&255;let R=E>>24&255,D=E>>16&255,B=E>>8&255,U=l(p.relativeLuminance2(R,D,B),p.relativeLuminance2(x,A,O));for(;U<b&&(R>0||D>0||B>0);)R-=Math.max(0,Math.ceil(.1*R)),D-=Math.max(0,Math.ceil(.1*D)),B-=Math.max(0,Math.ceil(.1*B)),U=l(p.relativeLuminance2(R,D,B),p.relativeLuminance2(x,A,O));return(R<<24|D<<16|B<<8|255)>>>0}function w(y,E,b){const x=y>>24&255,A=y>>16&255,O=y>>8&255;let R=E>>24&255,D=E>>16&255,B=E>>8&255,U=l(p.relativeLuminance2(R,D,B),p.relativeLuminance2(x,A,O));for(;U<b&&(R<255||D<255||B<255);)R=Math.min(255,R+Math.ceil(.1*(255-R))),D=Math.min(255,D+Math.ceil(.1*(255-D))),B=Math.min(255,B+Math.ceil(.1*(255-B))),U=l(p.relativeLuminance2(R,D,B),p.relativeLuminance2(x,A,O));return(R<<24|D<<16|B<<8|255)>>>0}u.blend=function(y,E){if(f=(255&E)/255,f===1)return E;const b=E>>24&255,x=E>>16&255,A=E>>8&255,O=y>>24&255,R=y>>16&255,D=y>>8&255;return o=O+Math.round((b-O)*f),d=R+Math.round((x-R)*f),v=D+Math.round((A-D)*f),g.toRgba(o,d,v)},u.ensureContrastRatio=function(y,E,b){const x=p.relativeLuminance(y>>8),A=p.relativeLuminance(E>>8);if(l(x,A)<b){if(A<x){const D=m(y,E,b),B=l(x,p.relativeLuminance(D>>8));if(B<b){const U=w(y,E,b);return B>l(x,p.relativeLuminance(U>>8))?D:U}return D}const O=w(y,E,b),R=l(x,p.relativeLuminance(O>>8));if(R<b){const D=m(y,E,b);return R>l(x,p.relativeLuminance(D>>8))?O:D}return O}},u.reduceLuminance=m,u.increaseLuminance=w,u.toChannels=function(y){return[y>>24&255,y>>16&255,y>>8&255,255&y]}}(h||(n.rgba=h={})),n.toPaddedHex=_,n.contrastRatio=l},345:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.runAndSubscribe=n.forwardEvent=n.EventEmitter=void 0,n.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=o=>(this._listeners.push(o),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===o)return void this._listeners.splice(d,1)}}})),this._event}fire(o,d){const v=[];for(let f=0;f<this._listeners.length;f++)v.push(this._listeners[f]);for(let f=0;f<v.length;f++)v[f].call(void 0,o,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(o,d){return o(v=>d.fire(v))},n.runAndSubscribe=function(o,d){return d(void 0),o(v=>d(v))}},859:(c,n)=>{function o(d){for(const v of d)v.dispose();d.length=0}Object.defineProperty(n,"__esModule",{value:!0}),n.getDisposeArrayDisposable=n.disposeArray=n.toDisposable=n.MutableDisposable=n.Disposable=void 0,n.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const v=this._disposables.indexOf(d);v!==-1&&this._disposables.splice(v,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var v;this._isDisposed||d===this._value||((v=this._value)==null||v.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},n.toDisposable=function(d){return{dispose:d}},n.disposeArray=o,n.getDisposeArrayDisposable=function(d){return{dispose:()=>o(d)}}},485:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class o{constructor(){this._data={}}set(v,f,g){this._data[v]||(this._data[v]={}),this._data[v][f]=g}get(v,f){return this._data[v]?this._data[v][f]:void 0}clear(){this._data={}}}n.TwoKeyMap=o,n.FourKeyMap=class{constructor(){this._data=new o}set(d,v,f,g,S){this._data.get(d,v)||this._data.set(d,v,new o),this._data.get(d,v).set(f,g,S)}get(d,v,f,g){var S;return(S=this._data.get(d,v))==null?void 0:S.get(f,g)}clear(){this._data.clear()}}},399:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.isChromeOS=n.isLinux=n.isWindows=n.isIphone=n.isIpad=n.isMac=n.getSafariVersion=n.isSafari=n.isLegacyEdge=n.isFirefox=n.isNode=void 0,n.isNode=typeof process<"u"&&"title"in process;const o=n.isNode?"node":navigator.userAgent,d=n.isNode?"node":navigator.platform;n.isFirefox=o.includes("Firefox"),n.isLegacyEdge=o.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(o),n.getSafariVersion=function(){if(!n.isSafari)return 0;const v=o.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),n.isIpad=d==="iPad",n.isIphone=d==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),n.isLinux=d.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(o)},385:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const d=o(399);class v{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,p=0,h=S.timeRemaining(),_=0;for(;this._i<this._tasks.length;){if(C=Date.now(),this._tasks[this._i]()||this._i++,C=Math.max(1,Date.now()-C),p=Math.max(C,p),_=S.timeRemaining(),1.5*p>_)return h-C<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(h-C))}ms`),void this._start();h=_}this.clear()}}class f extends v{_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())}}}n.PriorityTaskQueue=f,n.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:f,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},147:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class o{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(f){return[f>>>16&255,f>>>8&255,255&f]}static fromColorRGB(f){return(255&f[0])<<16|(255&f[1])<<8|255&f[2]}clone(){const f=new o;return f.fg=this.fg,f.bg=this.bg,f.extended=this.extended.clone(),f}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}}n.AttributeData=o;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(f){this._ext=f}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(f){this._ext&=-469762049,this._ext|=f<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(f){this._ext&=-67108864,this._ext|=67108863&f}get urlId(){return this._urlId}set urlId(f){this._urlId=f}get underlineVariantOffset(){const f=(3758096384&this._ext)>>29;return f<0?4294967288^f:f}set underlineVariantOffset(f){this._ext&=536870911,this._ext|=f<<29&3758096384}constructor(f=0,g=0){this._ext=0,this._urlId=0,this._ext=f,this._urlId=g}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=d},782:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const d=o(133),v=o(855),f=o(147);class g extends f.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new f.ExtendedAttrs,this.combinedData=""}static fromCharData(C){const p=new g;return p.setFromCharData(C),p}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(C){this.fg=C[v.CHAR_DATA_ATTR_INDEX],this.bg=0;let p=!1;if(C[v.CHAR_DATA_CHAR_INDEX].length>2)p=!0;else if(C[v.CHAR_DATA_CHAR_INDEX].length===2){const h=C[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=h&&h<=56319){const _=C[v.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=_&&_<=57343?this.content=1024*(h-55296)+_-56320+65536|C[v.CHAR_DATA_WIDTH_INDEX]<<22:p=!0}else p=!0}else this.content=C[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|C[v.CHAR_DATA_WIDTH_INDEX]<<22;p&&(this.combinedData=C[v.CHAR_DATA_CHAR_INDEX],this.content=2097152|C[v.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=g},855:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WHITESPACE_CELL_CODE=n.WHITESPACE_CELL_WIDTH=n.WHITESPACE_CELL_CHAR=n.NULL_CELL_CODE=n.NULL_CELL_WIDTH=n.NULL_CELL_CHAR=n.CHAR_DATA_CODE_INDEX=n.CHAR_DATA_WIDTH_INDEX=n.CHAR_DATA_CHAR_INDEX=n.CHAR_DATA_ATTR_INDEX=n.DEFAULT_EXT=n.DEFAULT_ATTR=n.DEFAULT_COLOR=void 0,n.DEFAULT_COLOR=0,n.DEFAULT_ATTR=256|n.DEFAULT_COLOR<<9,n.DEFAULT_EXT=0,n.CHAR_DATA_ATTR_INDEX=0,n.CHAR_DATA_CHAR_INDEX=1,n.CHAR_DATA_WIDTH_INDEX=2,n.CHAR_DATA_CODE_INDEX=3,n.NULL_CELL_CHAR="",n.NULL_CELL_WIDTH=1,n.NULL_CELL_CODE=0,n.WHITESPACE_CELL_CHAR=" ",n.WHITESPACE_CELL_WIDTH=1,n.WHITESPACE_CELL_CODE=32},133:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(o){return o>65535?(o-=65536,String.fromCharCode(55296+(o>>10))+String.fromCharCode(o%1024+56320)):String.fromCharCode(o)},n.utf32ToString=function(o,d=0,v=o.length){let f="";for(let g=d;g<v;++g){let S=o[g];S>65535?(S-=65536,f+=String.fromCharCode(55296+(S>>10))+String.fromCharCode(S%1024+56320)):f+=String.fromCharCode(S)}return f},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(o,d){const v=o.length;if(!v)return 0;let f=0,g=0;if(this._interim){const S=o.charCodeAt(g++);56320<=S&&S<=57343?d[f++]=1024*(this._interim-55296)+S-56320+65536:(d[f++]=this._interim,d[f++]=S),this._interim=0}for(let S=g;S<v;++S){const C=o.charCodeAt(S);if(55296<=C&&C<=56319){if(++S>=v)return this._interim=C,f;const p=o.charCodeAt(S);56320<=p&&p<=57343?d[f++]=1024*(C-55296)+p-56320+65536:(d[f++]=C,d[f++]=p)}else C!==65279&&(d[f++]=C)}return f}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(o,d){const v=o.length;if(!v)return 0;let f,g,S,C,p=0,h=0,_=0;if(this.interim[0]){let m=!1,w=this.interim[0];w&=(224&w)==192?31:(240&w)==224?15:7;let y,E=0;for(;(y=63&this.interim[++E])&&E<4;)w<<=6,w|=y;const b=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,x=b-E;for(;_<x;){if(_>=v)return 0;if(y=o[_++],(192&y)!=128){_--,m=!0;break}this.interim[E++]=y,w<<=6,w|=63&y}m||(b===2?w<128?_--:d[p++]=w:b===3?w<2048||w>=55296&&w<=57343||w===65279||(d[p++]=w):w<65536||w>1114111||(d[p++]=w)),this.interim.fill(0)}const l=v-4;let u=_;for(;u<v;){for(;!(!(u<l)||128&(f=o[u])||128&(g=o[u+1])||128&(S=o[u+2])||128&(C=o[u+3]));)d[p++]=f,d[p++]=g,d[p++]=S,d[p++]=C,u+=4;if(f=o[u++],f<128)d[p++]=f;else if((224&f)==192){if(u>=v)return this.interim[0]=f,p;if(g=o[u++],(192&g)!=128){u--;continue}if(h=(31&f)<<6|63&g,h<128){u--;continue}d[p++]=h}else if((240&f)==224){if(u>=v)return this.interim[0]=f,p;if(g=o[u++],(192&g)!=128){u--;continue}if(u>=v)return this.interim[0]=f,this.interim[1]=g,p;if(S=o[u++],(192&S)!=128){u--;continue}if(h=(15&f)<<12|(63&g)<<6|63&S,h<2048||h>=55296&&h<=57343||h===65279)continue;d[p++]=h}else if((248&f)==240){if(u>=v)return this.interim[0]=f,p;if(g=o[u++],(192&g)!=128){u--;continue}if(u>=v)return this.interim[0]=f,this.interim[1]=g,p;if(S=o[u++],(192&S)!=128){u--;continue}if(u>=v)return this.interim[0]=f,this.interim[1]=g,this.interim[2]=S,p;if(C=o[u++],(192&C)!=128){u--;continue}if(h=(7&f)<<18|(63&g)<<12|(63&S)<<6|63&C,h<65536||h>1114111)continue;d[p++]=h}}return p}}},776:function(c,n,o){var d=this&&this.__decorate||function(h,_,l,u){var m,w=arguments.length,y=w<3?_:u===null?u=Object.getOwnPropertyDescriptor(_,l):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(h,_,l,u);else for(var E=h.length-1;E>=0;E--)(m=h[E])&&(y=(w<3?m(y):w>3?m(_,l,y):m(_,l))||y);return w>3&&y&&Object.defineProperty(_,l,y),y},v=this&&this.__param||function(h,_){return function(l,u){_(l,u,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const f=o(859),g=o(97),S={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let C,p=n.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(h){super(),this._optionsService=h,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),C=this}_updateLogLevel(){this._logLevel=S[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(h){for(let _=0;_<h.length;_++)typeof h[_]=="function"&&(h[_]=h[_]())}_log(h,_,l){this._evalLazyOptionalParams(l),h.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+_,...l)}trace(h,..._){var l;this._logLevel<=g.LogLevelEnum.TRACE&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.trace.bind(this._optionsService.options.logger))??console.log,h,_)}debug(h,..._){var l;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.debug.bind(this._optionsService.options.logger))??console.log,h,_)}info(h,..._){var l;this._logLevel<=g.LogLevelEnum.INFO&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.info.bind(this._optionsService.options.logger))??console.info,h,_)}warn(h,..._){var l;this._logLevel<=g.LogLevelEnum.WARN&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.warn.bind(this._optionsService.options.logger))??console.warn,h,_)}error(h,..._){var l;this._logLevel<=g.LogLevelEnum.ERROR&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.error.bind(this._optionsService.options.logger))??console.error,h,_)}};n.LogService=p=d([v(0,g.IOptionsService)],p),n.setTraceLogger=function(h){C=h},n.traceCall=function(h,_,l){if(typeof l.value!="function")throw new Error("not supported");const u=l.value;l.value=function(...m){if(C.logLevel!==g.LogLevelEnum.TRACE)return u.apply(this,m);C.trace(`GlyphRenderer#${u.name}(${m.map(y=>JSON.stringify(y)).join(", ")})`);const w=u.apply(this,m);return C.trace(`GlyphRenderer#${u.name} return`,w),w}}},726:(c,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const o="di$target",d="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(v){return v[d]||[]},n.createDecorator=function(v){if(n.serviceRegistry.has(v))return n.serviceRegistry.get(v);const f=function(g,S,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(p,h,_){h[o]===h?h[d].push({id:p,index:_}):(h[d]=[{id:p,index:_}],h[o]=h)})(f,g,C)};return f.toString=()=>v,n.serviceRegistry.set(v,f),f}},97:(c,n,o)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.IDecorationService=n.IUnicodeService=n.IOscLinkService=n.IOptionsService=n.ILogService=n.LogLevelEnum=n.IInstantiationService=n.ICharsetService=n.ICoreService=n.ICoreMouseService=n.IBufferService=void 0;const d=o(726);var v;n.IBufferService=(0,d.createDecorator)("BufferService"),n.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),n.ICoreService=(0,d.createDecorator)("CoreService"),n.ICharsetService=(0,d.createDecorator)("CharsetService"),n.IInstantiationService=(0,d.createDecorator)("InstantiationService"),function(f){f[f.TRACE=0]="TRACE",f[f.DEBUG=1]="DEBUG",f[f.INFO=2]="INFO",f[f.WARN=3]="WARN",f[f.ERROR=4]="ERROR",f[f.OFF=5]="OFF"}(v||(n.LogLevelEnum=v={})),n.ILogService=(0,d.createDecorator)("LogService"),n.IOptionsService=(0,d.createDecorator)("OptionsService"),n.IOscLinkService=(0,d.createDecorator)("OscLinkService"),n.IUnicodeService=(0,d.createDecorator)("UnicodeService"),n.IDecorationService=(0,d.createDecorator)("DecorationService")}},r={};function s(c){var n=r[c];if(n!==void 0)return n.exports;var o=r[c]={exports:{}};return i[c].call(o.exports,o,o.exports,s),o.exports}var a={};return(()=>{var c=a;Object.defineProperty(c,"__esModule",{value:!0}),c.CanvasAddon=void 0;const n=s(345),o=s(859),d=s(776),v=s(949);class f extends o.Disposable{constructor(){super(...arguments),this._onChangeTextureAtlas=this.register(new n.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new n.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event}get textureAtlas(){var S;return(S=this._renderer)==null?void 0:S.textureAtlas}activate(S){const C=S._core;if(!S.element)return void this.register(C.onWillOpen(()=>this.activate(S)));this._terminal=S;const p=C.coreService,h=C.optionsService,_=C.screenElement,l=C.linkifier,u=C,m=u._bufferService,w=u._renderService,y=u._characterJoinerService,E=u._charSizeService,b=u._coreBrowserService,x=u._decorationService,A=u._logService,O=u._themeService;(0,d.setTraceLogger)(A),this._renderer=new v.CanvasRenderer(S,_,l,m,E,h,y,p,b,x,O),this.register((0,n.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,n.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),w.setRenderer(this._renderer),w.handleResize(m.cols,m.rows),this.register((0,o.toDisposable)(()=>{var R;w.setRenderer(this._terminal._core._createRenderer()),w.handleResize(S.cols,S.rows),(R=this._renderer)==null||R.dispose(),this._renderer=void 0}))}clearTextureAtlas(){var S;(S=this._renderer)==null||S.clearTextureAtlas()}}c.CanvasAddon=f})(),a})())})(R0);var D2=R0.exports;function M2({content:e,theme:t}){const i=I.useRef(null),r=I.useRef(null),s=I.useRef(null),a=I.useRef(!1),c=I.useRef(0);return I.useEffect(()=>{const n=new R2,o=new A2.Terminal({fontFamily:"SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace",fontSize:12,convertEol:!0,theme:t});o.loadAddon(n),i.current&&o.open(i.current),r.current=o,s.current=n,a.current=!1,c.current=0;const d=new ResizeObserver(()=>{!i.current||i.current.offsetWidth===0||(n.fit(),a.current||(a.current=!0,o.loadAddon(new D2.CanvasAddon)))});return i.current&&d.observe(i.current),()=>{d.disconnect(),o.dispose(),a.current=!1}},[]),I.useEffect(()=>{r.current&&(r.current.options.theme=t)},[t]),I.useEffect(()=>{if(!r.current)return;const n=c.current;if(e.length<n)r.current.clear(),e&&r.current.write(e);else{const o=e.slice(n);o&&r.current.write(o)}c.current=e.length},[e]),G.jsx("div",{ref:i,className:"h-full w-full"})}const T2=Bl(({page:e,nodePort:t})=>{const{t:i}=_f(),r=e.type==="node"?He.pageType.node:e.type==="page"?He.pageType.page:He.pageType.other;return G.jsxs("div",{className:`flex items-center gap-3 px-3 py-2 border-b ${He.border.divider} last:border-b-0 hover:bg-stone-50 dark:hover:bg-stone-900/60 transition-colors duration-100 group`,children:[G.jsx("span",{className:`shrink-0 inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-semibold uppercase tracking-wider ${r}`,children:e.type}),G.jsxs("div",{className:"flex-1 min-w-0",children:[G.jsx("div",{className:`text-[12px] ${He.text.primary} truncate leading-snug`,children:e.title||e.url}),e.title&&G.jsx("div",{className:`text-[10.5px] ${He.text.muted} truncate mt-0.5`,children:e.url})]}),G.jsx("button",{className:`shrink-0 px-2.5 py-1 text-[11px] font-semibold rounded-md cursor-pointer bg-transparent transition-all duration-150 ${He.button.inspect}`,onClick:()=>electronDebug.openDevTools(t,e.devtoolsFrontendUrl).catch(s=>alert((s==null?void 0:s.message)||String(s))),children:i("inspect")})]})}),B2=Bl(()=>{const{t:e}=_f(),{activeSession:t}=St,i=St.isDark?O_.dark:O_.light;return G.jsx("div",{className:"flex flex-col h-full",children:t?G.jsxs(G.Fragment,{children:[G.jsx("div",{className:`shrink-0 border-b ${He.border.divider} max-h-48 overflow-y-auto`,children:t.pages.length===0?G.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-4",children:[G.jsxs("div",{className:"flex gap-1",children:[G.jsx("span",{className:"w-1 h-1 rounded-full bg-stone-400 dark:bg-stone-600 animate-dot-pulse"}),G.jsx("span",{className:"w-1 h-1 rounded-full bg-stone-400 dark:bg-stone-600 animate-dot-pulse-2"}),G.jsx("span",{className:"w-1 h-1 rounded-full bg-stone-400 dark:bg-stone-600 animate-dot-pulse-3"})]}),G.jsx("span",{className:`text-[11px] ${He.text.muted}`,children:e("waitingForDebug")})]}):t.pages.map(r=>G.jsx(T2,{page:r,nodePort:t.nodePort},r.id))}),G.jsx("div",{className:`flex-1 min-h-0 p-1 ${He.background.term}`,children:G.jsx(M2,{content:t.log,theme:i},t.sessionId)})]}):G.jsx("div",{className:`flex-1 flex items-center justify-center text-[12.5px] ${He.text.muted}`,children:e("noActiveSession")})})}),k2=Bl(()=>{const{dialogApp:e}=St,t=I.useRef(!1),i=St.sessions.size;I.useEffect(()=>{e&&St.launchApp(e)},[e]),I.useEffect(()=>{i>0?t.current=!0:t.current&&e&&(t.current=!1,St.closeDialog())},[i,e]);const r=()=>{St.stopAllSessions(),St.closeDialog()};return G.jsx(f2,{open:!!e,onOpenChange:s=>!s&&r(),children:G.jsxs(d2,{children:[G.jsx(_2,{className:"fixed inset-0 bg-black/50"}),G.jsxs(v2,{className:`fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 flex flex-col w-[calc(100vw-4rem)] max-w-2xl max-h-[580px] rounded-xl shadow-2xl border ${He.border.divider} ${He.background.app} overflow-hidden animate-fade-up`,children:[G.jsxs("div",{className:`flex items-center gap-2.5 px-4 py-3 border-b ${He.border.divider} ${He.background.toolbar} shrink-0`,children:[e&&G.jsxs("div",{className:"relative shrink-0",children:[G.jsx("img",{src:Km(e.icon),alt:e.name,className:"w-5 h-5 object-contain"}),G.jsx("span",{className:`status-pulse absolute -bottom-0.5 -right-0.5 w-2 h-2 rounded-full bg-emerald-500 border ${He.border.statusIndicator}`})]}),G.jsx(g2,{className:`text-[13px] font-semibold ${He.text.primary} flex-1 min-w-0 truncate`,children:e==null?void 0:e.name}),G.jsx(p2,{className:`p-1 rounded bg-transparent border-none cursor-pointer ${He.text.muted} hover:${He.text.primary} transition-colors duration-150`,children:G.jsx(x2,{className:"w-3.5 h-3.5"})})]}),G.jsx("div",{className:"flex-1 min-h-0",children:G.jsx(B2,{})})]})]})})}),N2=Bl(()=>{const{t:e}=_f();return I.useEffect(()=>{St.loadApps()},[]),G.jsxs("div",{className:`h-screen flex flex-col ${He.background.app} overflow-hidden`,children:[G.jsx("div",{className:"flex-1 overflow-y-auto",children:St.loading?G.jsxs("div",{className:"flex items-center justify-center h-full gap-1.5",children:[G.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-stone-400 dark:bg-stone-600 animate-dot-pulse"}),G.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-stone-400 dark:bg-stone-600 animate-dot-pulse-2"}),G.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-stone-400 dark:bg-stone-600 animate-dot-pulse-3"})]}):St.apps.length===0?G.jsx("div",{className:`flex items-center justify-center h-full text-[12.5px] ${He.text.muted}`,children:e("noApps")}):G.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(76px,1fr))] p-2 gap-0.5",children:St.apps.map(t=>G.jsxs("button",{className:"group flex flex-col items-center gap-1.5 p-2.5 rounded-xl cursor-pointer border border-transparent hover:border-stone-200 dark:hover:border-stone-700/80 hover:bg-white dark:hover:bg-stone-900 transition-all duration-150 bg-transparent",title:t.path,onClick:()=>St.openDialog(t),children:[G.jsx("div",{className:"w-12 h-12 rounded-xl flex items-center justify-center overflow-hidden",children:G.jsx("img",{src:Km(t.icon),alt:t.name,className:"w-12 h-12 object-contain",draggable:!1})}),G.jsx("span",{className:`text-[11.5px] text-center leading-tight ${He.text.secondary} group-hover:${He.text.primary} line-clamp-2 w-full transition-colors duration-150`,children:t.name})]},t.path))})}),G.jsx(k2,{})]})}),H2="Loading...",z2="No apps found",P2="Inspect",U2="Waiting for debug endpoint...",j2="No active session",I2={loading:H2,noApps:z2,inspect:P2,waitingForDebug:U2,noActiveSession:j2},F2="加载中...",$2="未找到应用",q2="检查",W2="等待调试端点...",V2="无活跃会话",G2={loading:F2,noApps:$2,inspect:q2,waitingForDebug:W2,noActiveSession:V2};nt.use(E5).init({resources:{"en-US":{translation:I2},"zh-CN":{translation:G2}},lng:"en-US",fallbackLng:"en-US",interpolation:{escapeValue:!1}});function K2(){const e=document.getElementById("app");e&&Bb.createRoot(e).render(G.jsx(N2,{}))}(async function(){const e=await tinker.getLanguage();nt.changeLanguage(e),K2()})();