@cluesmith/codev 2.0.0-rc.63 → 2.0.0-rc.64

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.
@@ -1,4 +1,4 @@
1
- var Rv=Object.defineProperty;var Dv=(U,G,X)=>G in U?Rv(U,G,{enumerable:!0,configurable:!0,writable:!0,value:X}):U[G]=X;var ua=(U,G,X)=>Dv(U,typeof G!="symbol"?G+"":G,X);(function(){const G=document.createElement("link").relList;if(G&&G.supports&&G.supports("modulepreload"))return;for(const Z of document.querySelectorAll('link[rel="modulepreload"]'))j(Z);new MutationObserver(Z=>{for(const ne of Z)if(ne.type==="childList")for(const $ of ne.addedNodes)$.tagName==="LINK"&&$.rel==="modulepreload"&&j($)}).observe(document,{childList:!0,subtree:!0});function X(Z){const ne={};return Z.integrity&&(ne.integrity=Z.integrity),Z.referrerPolicy&&(ne.referrerPolicy=Z.referrerPolicy),Z.crossOrigin==="use-credentials"?ne.credentials="include":Z.crossOrigin==="anonymous"?ne.credentials="omit":ne.credentials="same-origin",ne}function j(Z){if(Z.ep)return;Z.ep=!0;const ne=X(Z);fetch(Z.href,ne)}})();var Ao={exports:{}},Vr={};/**
1
+ var Rv=Object.defineProperty;var Dv=(U,G,X)=>G in U?Rv(U,G,{enumerable:!0,configurable:!0,writable:!0,value:X}):U[G]=X;var ua=(U,G,X)=>Dv(U,typeof G!="symbol"?G+"":G,X);(function(){const G=document.createElement("link").relList;if(G&&G.supports&&G.supports("modulepreload"))return;for(const Z of document.querySelectorAll('link[rel="modulepreload"]'))P(Z);new MutationObserver(Z=>{for(const ne of Z)if(ne.type==="childList")for(const j of ne.addedNodes)j.tagName==="LINK"&&j.rel==="modulepreload"&&P(j)}).observe(document,{childList:!0,subtree:!0});function X(Z){const ne={};return Z.integrity&&(ne.integrity=Z.integrity),Z.referrerPolicy&&(ne.referrerPolicy=Z.referrerPolicy),Z.crossOrigin==="use-credentials"?ne.credentials="include":Z.crossOrigin==="anonymous"?ne.credentials="omit":ne.credentials="same-origin",ne}function P(Z){if(Z.ep)return;Z.ep=!0;const ne=X(Z);fetch(Z.href,ne)}})();var Ao={exports:{}},Vr={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@ var Rv=Object.defineProperty;var Dv=(U,G,X)=>G in U?Rv(U,G,{enumerable:!0,config
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Id;function Tv(){if(Id)return Vr;Id=1;var U=Symbol.for("react.transitional.element"),G=Symbol.for("react.fragment");function X(j,Z,ne){var $=null;if(ne!==void 0&&($=""+ne),Z.key!==void 0&&($=""+Z.key),"key"in Z){ne={};for(var n in Z)n!=="key"&&(ne[n]=Z[n])}else ne=Z;return Z=ne.ref,{$$typeof:U,type:j,key:$,ref:Z!==void 0?Z:null,props:ne}}return Vr.Fragment=G,Vr.jsx=X,Vr.jsxs=X,Vr}var Pd;function Bv(){return Pd||(Pd=1,Ao.exports=Tv()),Ao.exports}var K=Bv(),Ro={exports:{}},De={};/**
9
+ */var Id;function Tv(){if(Id)return Vr;Id=1;var U=Symbol.for("react.transitional.element"),G=Symbol.for("react.fragment");function X(P,Z,ne){var j=null;if(ne!==void 0&&(j=""+ne),Z.key!==void 0&&(j=""+Z.key),"key"in Z){ne={};for(var n in Z)n!=="key"&&(ne[n]=Z[n])}else ne=Z;return Z=ne.ref,{$$typeof:U,type:P,key:j,ref:Z!==void 0?Z:null,props:ne}}return Vr.Fragment=G,Vr.jsx=X,Vr.jsxs=X,Vr}var Pd;function Bv(){return Pd||(Pd=1,Ao.exports=Tv()),Ao.exports}var K=Bv(),Ro={exports:{}},De={};/**
10
10
  * @license React
11
11
  * react.production.js
12
12
  *
@@ -14,7 +14,7 @@ var Rv=Object.defineProperty;var Dv=(U,G,X)=>G in U?Rv(U,G,{enumerable:!0,config
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var jd;function Ov(){if(jd)return De;jd=1;var U=Symbol.for("react.transitional.element"),G=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),ne=Symbol.for("react.consumer"),$=Symbol.for("react.context"),n=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),a=Symbol.for("react.activity"),p=Symbol.iterator;function b(T){return T===null||typeof T!="object"?null:(T=p&&T[p]||T["@@iterator"],typeof T=="function"?T:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},c=Object.assign,r={};function h(T,H,V){this.props=T,this.context=H,this.refs=r,this.updater=V||w}h.prototype.isReactComponent={},h.prototype.setState=function(T,H){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,H,"setState")},h.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function o(){}o.prototype=h.prototype;function l(T,H,V){this.props=T,this.context=H,this.refs=r,this.updater=V||w}var S=l.prototype=new o;S.constructor=l,c(S,h.prototype),S.isPureReactComponent=!0;var x=Array.isArray;function v(){}var y={H:null,A:null,T:null,S:null},m=Object.prototype.hasOwnProperty;function C(T,H,V){var Q=V.ref;return{$$typeof:U,type:T,key:H,ref:Q!==void 0?Q:null,props:V}}function L(T,H){return C(T.type,H,T.props)}function A(T){return typeof T=="object"&&T!==null&&T.$$typeof===U}function E(T){var H={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(V){return H[V]})}var D=/\/+/g;function O(T,H){return typeof T=="object"&&T!==null&&T.key!=null?E(""+T.key):H.toString(36)}function F(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(v,v):(T.status="pending",T.then(function(H){T.status==="pending"&&(T.status="fulfilled",T.value=H)},function(H){T.status==="pending"&&(T.status="rejected",T.reason=H)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function N(T,H,V,Q,ue){var de=typeof T;(de==="undefined"||de==="boolean")&&(T=null);var q=!1;if(T===null)q=!0;else switch(de){case"bigint":case"string":case"number":q=!0;break;case"object":switch(T.$$typeof){case U:case G:q=!0;break;case _:return q=T._init,N(q(T._payload),H,V,Q,ue)}}if(q)return ue=ue(T),q=Q===""?"."+O(T,0):Q,x(ue)?(V="",q!=null&&(V=q.replace(D,"$&/")+"/"),N(ue,H,V,"",function(ie){return ie})):ue!=null&&(A(ue)&&(ue=L(ue,V+(ue.key==null||T&&T.key===ue.key?"":(""+ue.key).replace(D,"$&/")+"/")+q)),H.push(ue)),1;q=0;var z=Q===""?".":Q+":";if(x(T))for(var se=0;se<T.length;se++)Q=T[se],de=z+O(Q,se),q+=N(Q,H,V,de,ue);else if(se=b(T),typeof se=="function")for(T=se.call(T),se=0;!(Q=T.next()).done;)Q=Q.value,de=z+O(Q,se++),q+=N(Q,H,V,de,ue);else if(de==="object"){if(typeof T.then=="function")return N(F(T),H,V,Q,ue);throw H=String(T),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return q}function I(T,H,V){if(T==null)return T;var Q=[],ue=0;return N(T,Q,"","",function(de){return H.call(V,de,ue++)}),Q}function P(T){if(T._status===-1){var H=T._result;H=H(),H.then(function(V){(T._status===0||T._status===-1)&&(T._status=1,T._result=V)},function(V){(T._status===0||T._status===-1)&&(T._status=2,T._result=V)}),T._status===-1&&(T._status=0,T._result=H)}if(T._status===1)return T._result.default;throw T._result}var R=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},B={map:I,forEach:function(T,H,V){I(T,function(){H.apply(this,arguments)},V)},count:function(T){var H=0;return I(T,function(){H++}),H},toArray:function(T){return I(T,function(H){return H})||[]},only:function(T){if(!A(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return De.Activity=a,De.Children=B,De.Component=h,De.Fragment=X,De.Profiler=Z,De.PureComponent=l,De.StrictMode=j,De.Suspense=u,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=y,De.__COMPILER_RUNTIME={__proto__:null,c:function(T){return y.H.useMemoCache(T)}},De.cache=function(T){return function(){return T.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(T,H,V){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var Q=c({},T.props),ue=T.key;if(H!=null)for(de in H.key!==void 0&&(ue=""+H.key),H)!m.call(H,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&H.ref===void 0||(Q[de]=H[de]);var de=arguments.length-2;if(de===1)Q.children=V;else if(1<de){for(var q=Array(de),z=0;z<de;z++)q[z]=arguments[z+2];Q.children=q}return C(T.type,ue,Q)},De.createContext=function(T){return T={$$typeof:$,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:ne,_context:T},T},De.createElement=function(T,H,V){var Q,ue={},de=null;if(H!=null)for(Q in H.key!==void 0&&(de=""+H.key),H)m.call(H,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(ue[Q]=H[Q]);var q=arguments.length-2;if(q===1)ue.children=V;else if(1<q){for(var z=Array(q),se=0;se<q;se++)z[se]=arguments[se+2];ue.children=z}if(T&&T.defaultProps)for(Q in q=T.defaultProps,q)ue[Q]===void 0&&(ue[Q]=q[Q]);return C(T,de,ue)},De.createRef=function(){return{current:null}},De.forwardRef=function(T){return{$$typeof:n,render:T}},De.isValidElement=A,De.lazy=function(T){return{$$typeof:_,_payload:{_status:-1,_result:T},_init:P}},De.memo=function(T,H){return{$$typeof:f,type:T,compare:H===void 0?null:H}},De.startTransition=function(T){var H=y.T,V={};y.T=V;try{var Q=T(),ue=y.S;ue!==null&&ue(V,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(v,R)}catch(de){R(de)}finally{H!==null&&V.types!==null&&(H.types=V.types),y.T=H}},De.unstable_useCacheRefresh=function(){return y.H.useCacheRefresh()},De.use=function(T){return y.H.use(T)},De.useActionState=function(T,H,V){return y.H.useActionState(T,H,V)},De.useCallback=function(T,H){return y.H.useCallback(T,H)},De.useContext=function(T){return y.H.useContext(T)},De.useDebugValue=function(){},De.useDeferredValue=function(T,H){return y.H.useDeferredValue(T,H)},De.useEffect=function(T,H){return y.H.useEffect(T,H)},De.useEffectEvent=function(T){return y.H.useEffectEvent(T)},De.useId=function(){return y.H.useId()},De.useImperativeHandle=function(T,H,V){return y.H.useImperativeHandle(T,H,V)},De.useInsertionEffect=function(T,H){return y.H.useInsertionEffect(T,H)},De.useLayoutEffect=function(T,H){return y.H.useLayoutEffect(T,H)},De.useMemo=function(T,H){return y.H.useMemo(T,H)},De.useOptimistic=function(T,H){return y.H.useOptimistic(T,H)},De.useReducer=function(T,H,V){return y.H.useReducer(T,H,V)},De.useRef=function(T){return y.H.useRef(T)},De.useState=function(T){return y.H.useState(T)},De.useSyncExternalStore=function(T,H,V){return y.H.useSyncExternalStore(T,H,V)},De.useTransition=function(){return y.H.useTransition()},De.version="19.2.4",De}var Fd;function Fo(){return Fd||(Fd=1,Ro.exports=Ov()),Ro.exports}var we=Fo(),Do={exports:{}},Yr={},To={exports:{}},Bo={};/**
17
+ */var jd;function Ov(){if(jd)return De;jd=1;var U=Symbol.for("react.transitional.element"),G=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),ne=Symbol.for("react.consumer"),j=Symbol.for("react.context"),n=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),a=Symbol.for("react.activity"),p=Symbol.iterator;function w(T){return T===null||typeof T!="object"?null:(T=p&&T[p]||T["@@iterator"],typeof T=="function"?T:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},o=Object.assign,r={};function h(T,H,V){this.props=T,this.context=H,this.refs=r,this.updater=V||y}h.prototype.isReactComponent={},h.prototype.setState=function(T,H){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,H,"setState")},h.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function c(){}c.prototype=h.prototype;function l(T,H,V){this.props=T,this.context=H,this.refs=r,this.updater=V||y}var S=l.prototype=new c;S.constructor=l,o(S,h.prototype),S.isPureReactComponent=!0;var x=Array.isArray;function v(){}var b={H:null,A:null,T:null,S:null},m=Object.prototype.hasOwnProperty;function C(T,H,V){var Q=V.ref;return{$$typeof:U,type:T,key:H,ref:Q!==void 0?Q:null,props:V}}function L(T,H){return C(T.type,H,T.props)}function M(T){return typeof T=="object"&&T!==null&&T.$$typeof===U}function E(T){var H={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(V){return H[V]})}var R=/\/+/g;function B(T,H){return typeof T=="object"&&T!==null&&T.key!=null?E(""+T.key):H.toString(36)}function $(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(v,v):(T.status="pending",T.then(function(H){T.status==="pending"&&(T.status="fulfilled",T.value=H)},function(H){T.status==="pending"&&(T.status="rejected",T.reason=H)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function N(T,H,V,Q,ue){var de=typeof T;(de==="undefined"||de==="boolean")&&(T=null);var q=!1;if(T===null)q=!0;else switch(de){case"bigint":case"string":case"number":q=!0;break;case"object":switch(T.$$typeof){case U:case G:q=!0;break;case _:return q=T._init,N(q(T._payload),H,V,Q,ue)}}if(q)return ue=ue(T),q=Q===""?"."+B(T,0):Q,x(ue)?(V="",q!=null&&(V=q.replace(R,"$&/")+"/"),N(ue,H,V,"",function(ie){return ie})):ue!=null&&(M(ue)&&(ue=L(ue,V+(ue.key==null||T&&T.key===ue.key?"":(""+ue.key).replace(R,"$&/")+"/")+q)),H.push(ue)),1;q=0;var z=Q===""?".":Q+":";if(x(T))for(var se=0;se<T.length;se++)Q=T[se],de=z+B(Q,se),q+=N(Q,H,V,de,ue);else if(se=w(T),typeof se=="function")for(T=se.call(T),se=0;!(Q=T.next()).done;)Q=Q.value,de=z+B(Q,se++),q+=N(Q,H,V,de,ue);else if(de==="object"){if(typeof T.then=="function")return N($(T),H,V,Q,ue);throw H=String(T),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return q}function I(T,H,V){if(T==null)return T;var Q=[],ue=0;return N(T,Q,"","",function(de){return H.call(V,de,ue++)}),Q}function F(T){if(T._status===-1){var H=T._result;H=H(),H.then(function(V){(T._status===0||T._status===-1)&&(T._status=1,T._result=V)},function(V){(T._status===0||T._status===-1)&&(T._status=2,T._result=V)}),T._status===-1&&(T._status=0,T._result=H)}if(T._status===1)return T._result.default;throw T._result}var D=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},O={map:I,forEach:function(T,H,V){I(T,function(){H.apply(this,arguments)},V)},count:function(T){var H=0;return I(T,function(){H++}),H},toArray:function(T){return I(T,function(H){return H})||[]},only:function(T){if(!M(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return De.Activity=a,De.Children=O,De.Component=h,De.Fragment=X,De.Profiler=Z,De.PureComponent=l,De.StrictMode=P,De.Suspense=u,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=b,De.__COMPILER_RUNTIME={__proto__:null,c:function(T){return b.H.useMemoCache(T)}},De.cache=function(T){return function(){return T.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(T,H,V){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var Q=o({},T.props),ue=T.key;if(H!=null)for(de in H.key!==void 0&&(ue=""+H.key),H)!m.call(H,de)||de==="key"||de==="__self"||de==="__source"||de==="ref"&&H.ref===void 0||(Q[de]=H[de]);var de=arguments.length-2;if(de===1)Q.children=V;else if(1<de){for(var q=Array(de),z=0;z<de;z++)q[z]=arguments[z+2];Q.children=q}return C(T.type,ue,Q)},De.createContext=function(T){return T={$$typeof:j,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:ne,_context:T},T},De.createElement=function(T,H,V){var Q,ue={},de=null;if(H!=null)for(Q in H.key!==void 0&&(de=""+H.key),H)m.call(H,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(ue[Q]=H[Q]);var q=arguments.length-2;if(q===1)ue.children=V;else if(1<q){for(var z=Array(q),se=0;se<q;se++)z[se]=arguments[se+2];ue.children=z}if(T&&T.defaultProps)for(Q in q=T.defaultProps,q)ue[Q]===void 0&&(ue[Q]=q[Q]);return C(T,de,ue)},De.createRef=function(){return{current:null}},De.forwardRef=function(T){return{$$typeof:n,render:T}},De.isValidElement=M,De.lazy=function(T){return{$$typeof:_,_payload:{_status:-1,_result:T},_init:F}},De.memo=function(T,H){return{$$typeof:f,type:T,compare:H===void 0?null:H}},De.startTransition=function(T){var H=b.T,V={};b.T=V;try{var Q=T(),ue=b.S;ue!==null&&ue(V,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(v,D)}catch(de){D(de)}finally{H!==null&&V.types!==null&&(H.types=V.types),b.T=H}},De.unstable_useCacheRefresh=function(){return b.H.useCacheRefresh()},De.use=function(T){return b.H.use(T)},De.useActionState=function(T,H,V){return b.H.useActionState(T,H,V)},De.useCallback=function(T,H){return b.H.useCallback(T,H)},De.useContext=function(T){return b.H.useContext(T)},De.useDebugValue=function(){},De.useDeferredValue=function(T,H){return b.H.useDeferredValue(T,H)},De.useEffect=function(T,H){return b.H.useEffect(T,H)},De.useEffectEvent=function(T){return b.H.useEffectEvent(T)},De.useId=function(){return b.H.useId()},De.useImperativeHandle=function(T,H,V){return b.H.useImperativeHandle(T,H,V)},De.useInsertionEffect=function(T,H){return b.H.useInsertionEffect(T,H)},De.useLayoutEffect=function(T,H){return b.H.useLayoutEffect(T,H)},De.useMemo=function(T,H){return b.H.useMemo(T,H)},De.useOptimistic=function(T,H){return b.H.useOptimistic(T,H)},De.useReducer=function(T,H,V){return b.H.useReducer(T,H,V)},De.useRef=function(T){return b.H.useRef(T)},De.useState=function(T){return b.H.useState(T)},De.useSyncExternalStore=function(T,H,V){return b.H.useSyncExternalStore(T,H,V)},De.useTransition=function(){return b.H.useTransition()},De.version="19.2.4",De}var Fd;function Fo(){return Fd||(Fd=1,Ro.exports=Ov()),Ro.exports}var xe=Fo(),Do={exports:{}},Yr={},To={exports:{}},Bo={};/**
18
18
  * @license React
19
19
  * scheduler.production.js
20
20
  *
@@ -22,7 +22,7 @@ var Rv=Object.defineProperty;var Dv=(U,G,X)=>G in U?Rv(U,G,{enumerable:!0,config
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */var $d;function kv(){return $d||($d=1,(function(U){function G(N,I){var P=N.length;N.push(I);e:for(;0<P;){var R=P-1>>>1,B=N[R];if(0<Z(B,I))N[R]=I,N[P]=B,P=R;else break e}}function X(N){return N.length===0?null:N[0]}function j(N){if(N.length===0)return null;var I=N[0],P=N.pop();if(P!==I){N[0]=P;e:for(var R=0,B=N.length,T=B>>>1;R<T;){var H=2*(R+1)-1,V=N[H],Q=H+1,ue=N[Q];if(0>Z(V,P))Q<B&&0>Z(ue,V)?(N[R]=ue,N[Q]=P,R=Q):(N[R]=V,N[H]=P,R=H);else if(Q<B&&0>Z(ue,P))N[R]=ue,N[Q]=P,R=Q;else break e}}return I}function Z(N,I){var P=N.sortIndex-I.sortIndex;return P!==0?P:N.id-I.id}if(U.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var ne=performance;U.unstable_now=function(){return ne.now()}}else{var $=Date,n=$.now();U.unstable_now=function(){return $.now()-n}}var u=[],f=[],_=1,a=null,p=3,b=!1,w=!1,c=!1,r=!1,h=typeof setTimeout=="function"?setTimeout:null,o=typeof clearTimeout=="function"?clearTimeout:null,l=typeof setImmediate<"u"?setImmediate:null;function S(N){for(var I=X(f);I!==null;){if(I.callback===null)j(f);else if(I.startTime<=N)j(f),I.sortIndex=I.expirationTime,G(u,I);else break;I=X(f)}}function x(N){if(c=!1,S(N),!w)if(X(u)!==null)w=!0,v||(v=!0,E());else{var I=X(f);I!==null&&F(x,I.startTime-N)}}var v=!1,y=-1,m=5,C=-1;function L(){return r?!0:!(U.unstable_now()-C<m)}function A(){if(r=!1,v){var N=U.unstable_now();C=N;var I=!0;try{e:{w=!1,c&&(c=!1,o(y),y=-1),b=!0;var P=p;try{t:{for(S(N),a=X(u);a!==null&&!(a.expirationTime>N&&L());){var R=a.callback;if(typeof R=="function"){a.callback=null,p=a.priorityLevel;var B=R(a.expirationTime<=N);if(N=U.unstable_now(),typeof B=="function"){a.callback=B,S(N),I=!0;break t}a===X(u)&&j(u),S(N)}else j(u);a=X(u)}if(a!==null)I=!0;else{var T=X(f);T!==null&&F(x,T.startTime-N),I=!1}}break e}finally{a=null,p=P,b=!1}I=void 0}}finally{I?E():v=!1}}}var E;if(typeof l=="function")E=function(){l(A)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,O=D.port2;D.port1.onmessage=A,E=function(){O.postMessage(null)}}else E=function(){h(A,0)};function F(N,I){y=h(function(){N(U.unstable_now())},I)}U.unstable_IdlePriority=5,U.unstable_ImmediatePriority=1,U.unstable_LowPriority=4,U.unstable_NormalPriority=3,U.unstable_Profiling=null,U.unstable_UserBlockingPriority=2,U.unstable_cancelCallback=function(N){N.callback=null},U.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"):m=0<N?Math.floor(1e3/N):5},U.unstable_getCurrentPriorityLevel=function(){return p},U.unstable_next=function(N){switch(p){case 1:case 2:case 3:var I=3;break;default:I=p}var P=p;p=I;try{return N()}finally{p=P}},U.unstable_requestPaint=function(){r=!0},U.unstable_runWithPriority=function(N,I){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var P=p;p=N;try{return I()}finally{p=P}},U.unstable_scheduleCallback=function(N,I,P){var R=U.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?R+P:R):P=R,N){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=P+B,N={id:_++,callback:I,priorityLevel:N,startTime:P,expirationTime:B,sortIndex:-1},P>R?(N.sortIndex=P,G(f,N),X(u)===null&&N===X(f)&&(c?(o(y),y=-1):c=!0,F(x,P-R))):(N.sortIndex=B,G(u,N),w||b||(w=!0,v||(v=!0,E()))),N},U.unstable_shouldYield=L,U.unstable_wrapCallback=function(N){var I=p;return function(){var P=p;p=I;try{return N.apply(this,arguments)}finally{p=P}}}})(Bo)),Bo}var qd;function Hv(){return qd||(qd=1,To.exports=kv()),To.exports}var Oo={exports:{}},wt={};/**
25
+ */var $d;function kv(){return $d||($d=1,(function(U){function G(N,I){var F=N.length;N.push(I);e:for(;0<F;){var D=F-1>>>1,O=N[D];if(0<Z(O,I))N[D]=I,N[F]=O,F=D;else break e}}function X(N){return N.length===0?null:N[0]}function P(N){if(N.length===0)return null;var I=N[0],F=N.pop();if(F!==I){N[0]=F;e:for(var D=0,O=N.length,T=O>>>1;D<T;){var H=2*(D+1)-1,V=N[H],Q=H+1,ue=N[Q];if(0>Z(V,F))Q<O&&0>Z(ue,V)?(N[D]=ue,N[Q]=F,D=Q):(N[D]=V,N[H]=F,D=H);else if(Q<O&&0>Z(ue,F))N[D]=ue,N[Q]=F,D=Q;else break e}}return I}function Z(N,I){var F=N.sortIndex-I.sortIndex;return F!==0?F:N.id-I.id}if(U.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var ne=performance;U.unstable_now=function(){return ne.now()}}else{var j=Date,n=j.now();U.unstable_now=function(){return j.now()-n}}var u=[],f=[],_=1,a=null,p=3,w=!1,y=!1,o=!1,r=!1,h=typeof setTimeout=="function"?setTimeout:null,c=typeof clearTimeout=="function"?clearTimeout:null,l=typeof setImmediate<"u"?setImmediate:null;function S(N){for(var I=X(f);I!==null;){if(I.callback===null)P(f);else if(I.startTime<=N)P(f),I.sortIndex=I.expirationTime,G(u,I);else break;I=X(f)}}function x(N){if(o=!1,S(N),!y)if(X(u)!==null)y=!0,v||(v=!0,E());else{var I=X(f);I!==null&&$(x,I.startTime-N)}}var v=!1,b=-1,m=5,C=-1;function L(){return r?!0:!(U.unstable_now()-C<m)}function M(){if(r=!1,v){var N=U.unstable_now();C=N;var I=!0;try{e:{y=!1,o&&(o=!1,c(b),b=-1),w=!0;var F=p;try{t:{for(S(N),a=X(u);a!==null&&!(a.expirationTime>N&&L());){var D=a.callback;if(typeof D=="function"){a.callback=null,p=a.priorityLevel;var O=D(a.expirationTime<=N);if(N=U.unstable_now(),typeof O=="function"){a.callback=O,S(N),I=!0;break t}a===X(u)&&P(u),S(N)}else P(u);a=X(u)}if(a!==null)I=!0;else{var T=X(f);T!==null&&$(x,T.startTime-N),I=!1}}break e}finally{a=null,p=F,w=!1}I=void 0}}finally{I?E():v=!1}}}var E;if(typeof l=="function")E=function(){l(M)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,B=R.port2;R.port1.onmessage=M,E=function(){B.postMessage(null)}}else E=function(){h(M,0)};function $(N,I){b=h(function(){N(U.unstable_now())},I)}U.unstable_IdlePriority=5,U.unstable_ImmediatePriority=1,U.unstable_LowPriority=4,U.unstable_NormalPriority=3,U.unstable_Profiling=null,U.unstable_UserBlockingPriority=2,U.unstable_cancelCallback=function(N){N.callback=null},U.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"):m=0<N?Math.floor(1e3/N):5},U.unstable_getCurrentPriorityLevel=function(){return p},U.unstable_next=function(N){switch(p){case 1:case 2:case 3:var I=3;break;default:I=p}var F=p;p=I;try{return N()}finally{p=F}},U.unstable_requestPaint=function(){r=!0},U.unstable_runWithPriority=function(N,I){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var F=p;p=N;try{return I()}finally{p=F}},U.unstable_scheduleCallback=function(N,I,F){var D=U.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?D+F:D):F=D,N){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=F+O,N={id:_++,callback:I,priorityLevel:N,startTime:F,expirationTime:O,sortIndex:-1},F>D?(N.sortIndex=F,G(f,N),X(u)===null&&N===X(f)&&(o?(c(b),b=-1):o=!0,$(x,F-D))):(N.sortIndex=O,G(u,N),y||w||(y=!0,v||(v=!0,E()))),N},U.unstable_shouldYield=L,U.unstable_wrapCallback=function(N){var I=p;return function(){var F=p;p=I;try{return N.apply(this,arguments)}finally{p=F}}}})(Bo)),Bo}var qd;function Hv(){return qd||(qd=1,To.exports=kv()),To.exports}var Oo={exports:{}},wt={};/**
26
26
  * @license React
27
27
  * react-dom.production.js
28
28
  *
@@ -30,7 +30,7 @@ var Rv=Object.defineProperty;var Dv=(U,G,X)=>G in U?Rv(U,G,{enumerable:!0,config
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var Wd;function zv(){if(Wd)return wt;Wd=1;var U=Fo();function G(u){var f="https://react.dev/errors/"+u;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var _=2;_<arguments.length;_++)f+="&args[]="+encodeURIComponent(arguments[_])}return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function X(){}var j={d:{f:X,r:function(){throw Error(G(522))},D:X,C:X,L:X,m:X,X,S:X,M:X},p:0,findDOMNode:null},Z=Symbol.for("react.portal");function ne(u,f,_){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Z,key:a==null?null:""+a,children:u,containerInfo:f,implementation:_}}var $=U.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function n(u,f){if(u==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return wt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,wt.createPortal=function(u,f){var _=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(G(299));return ne(u,f,null,_)},wt.flushSync=function(u){var f=$.T,_=j.p;try{if($.T=null,j.p=2,u)return u()}finally{$.T=f,j.p=_,j.d.f()}},wt.preconnect=function(u,f){typeof u=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,j.d.C(u,f))},wt.prefetchDNS=function(u){typeof u=="string"&&j.d.D(u)},wt.preinit=function(u,f){if(typeof u=="string"&&f&&typeof f.as=="string"){var _=f.as,a=n(_,f.crossOrigin),p=typeof f.integrity=="string"?f.integrity:void 0,b=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;_==="style"?j.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:a,integrity:p,fetchPriority:b}):_==="script"&&j.d.X(u,{crossOrigin:a,integrity:p,fetchPriority:b,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},wt.preinitModule=function(u,f){if(typeof u=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var _=n(f.as,f.crossOrigin);j.d.M(u,{crossOrigin:_,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&j.d.M(u)},wt.preload=function(u,f){if(typeof u=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var _=f.as,a=n(_,f.crossOrigin);j.d.L(u,_,{crossOrigin:a,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},wt.preloadModule=function(u,f){if(typeof u=="string")if(f){var _=n(f.as,f.crossOrigin);j.d.m(u,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:_,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else j.d.m(u)},wt.requestFormReset=function(u){j.d.r(u)},wt.unstable_batchedUpdates=function(u,f){return u(f)},wt.useFormState=function(u,f,_){return $.H.useFormState(u,f,_)},wt.useFormStatus=function(){return $.H.useHostTransitionStatus()},wt.version="19.2.4",wt}var Gd;function Nv(){if(Gd)return Oo.exports;Gd=1;function U(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(U)}catch(G){console.error(G)}}return U(),Oo.exports=zv(),Oo.exports}/**
33
+ */var Wd;function zv(){if(Wd)return wt;Wd=1;var U=Fo();function G(u){var f="https://react.dev/errors/"+u;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var _=2;_<arguments.length;_++)f+="&args[]="+encodeURIComponent(arguments[_])}return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function X(){}var P={d:{f:X,r:function(){throw Error(G(522))},D:X,C:X,L:X,m:X,X,S:X,M:X},p:0,findDOMNode:null},Z=Symbol.for("react.portal");function ne(u,f,_){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Z,key:a==null?null:""+a,children:u,containerInfo:f,implementation:_}}var j=U.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function n(u,f){if(u==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return wt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,wt.createPortal=function(u,f){var _=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(G(299));return ne(u,f,null,_)},wt.flushSync=function(u){var f=j.T,_=P.p;try{if(j.T=null,P.p=2,u)return u()}finally{j.T=f,P.p=_,P.d.f()}},wt.preconnect=function(u,f){typeof u=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,P.d.C(u,f))},wt.prefetchDNS=function(u){typeof u=="string"&&P.d.D(u)},wt.preinit=function(u,f){if(typeof u=="string"&&f&&typeof f.as=="string"){var _=f.as,a=n(_,f.crossOrigin),p=typeof f.integrity=="string"?f.integrity:void 0,w=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;_==="style"?P.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:a,integrity:p,fetchPriority:w}):_==="script"&&P.d.X(u,{crossOrigin:a,integrity:p,fetchPriority:w,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},wt.preinitModule=function(u,f){if(typeof u=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var _=n(f.as,f.crossOrigin);P.d.M(u,{crossOrigin:_,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&P.d.M(u)},wt.preload=function(u,f){if(typeof u=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var _=f.as,a=n(_,f.crossOrigin);P.d.L(u,_,{crossOrigin:a,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},wt.preloadModule=function(u,f){if(typeof u=="string")if(f){var _=n(f.as,f.crossOrigin);P.d.m(u,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:_,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else P.d.m(u)},wt.requestFormReset=function(u){P.d.r(u)},wt.unstable_batchedUpdates=function(u,f){return u(f)},wt.useFormState=function(u,f,_){return j.H.useFormState(u,f,_)},wt.useFormStatus=function(){return j.H.useHostTransitionStatus()},wt.version="19.2.4",wt}var Gd;function Nv(){if(Gd)return Oo.exports;Gd=1;function U(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(U)}catch(G){console.error(G)}}return U(),Oo.exports=zv(),Oo.exports}/**
34
34
  * @license React
35
35
  * react-dom-client.production.js
36
36
  *
@@ -38,23 +38,23 @@ var Rv=Object.defineProperty;var Dv=(U,G,X)=>G in U?Rv(U,G,{enumerable:!0,config
38
38
  *
39
39
  * This source code is licensed under the MIT license found in the
40
40
  * LICENSE file in the root directory of this source tree.
41
- */var Xd;function Uv(){if(Xd)return Yr;Xd=1;var U=Hv(),G=Fo(),X=Nv();function j(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 Z(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ne(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function $(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 n(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 u(e){if(ne(e)!==e)throw Error(j(188))}function f(e){var t=e.alternate;if(!t){if(t=ne(e),t===null)throw Error(j(188));return t!==e?null:e}for(var i=e,s=t;;){var d=i.return;if(d===null)break;var g=d.alternate;if(g===null){if(s=d.return,s!==null){i=s;continue}break}if(d.child===g.child){for(g=d.child;g;){if(g===i)return u(d),e;if(g===s)return u(d),t;g=g.sibling}throw Error(j(188))}if(i.return!==s.return)i=d,s=g;else{for(var M=!1,k=d.child;k;){if(k===i){M=!0,i=d,s=g;break}if(k===s){M=!0,s=d,i=g;break}k=k.sibling}if(!M){for(k=g.child;k;){if(k===i){M=!0,i=g,s=d;break}if(k===s){M=!0,s=g,i=d;break}k=k.sibling}if(!M)throw Error(j(189))}}if(i.alternate!==s)throw Error(j(190))}if(i.tag!==3)throw Error(j(188));return i.stateNode.current===i?e:t}function _(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=_(e),t!==null)return t;e=e.sibling}return null}var a=Object.assign,p=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),C=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),A=Symbol.iterator;function E(e){return e===null||typeof e!="object"?null:(e=A&&e[A]||e["@@iterator"],typeof e=="function"?e:null)}var D=Symbol.for("react.client.reference");function O(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===D?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case c:return"Fragment";case h:return"Profiler";case r:return"StrictMode";case x:return"Suspense";case v:return"SuspenseList";case C:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case l:return e.displayName||"Context";case o:return(e._context.displayName||"Context")+".Consumer";case S:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case y:return t=e.displayName||null,t!==null?t:O(e.type)||"Memo";case m:t=e._payload,e=e._init;try{return O(e(t))}catch{}}return null}var F=Array.isArray,N=G.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=X.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},R=[],B=-1;function T(e){return{current:e}}function H(e){0>B||(e.current=R[B],R[B]=null,B--)}function V(e,t){B++,R[B]=e.current,e.current=t}var Q=T(null),ue=T(null),de=T(null),q=T(null);function z(e,t){switch(V(de,t),V(ue,e),V(Q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?od(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=od(t),e=cd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(Q),V(Q,e)}function se(){H(Q),H(ue),H(de)}function ie(e){e.memoizedState!==null&&V(q,e);var t=Q.current,i=cd(t,e.type);t!==i&&(V(ue,e),V(Q,i))}function ve(e){ue.current===e&&(H(Q),H(ue)),q.current===e&&(H(q),qr._currentValue=P)}var fe,Me;function _e(e){if(fe===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||"",Me=-1<i.stack.indexOf(`
41
+ */var Xd;function Uv(){if(Xd)return Yr;Xd=1;var U=Hv(),G=Fo(),X=Nv();function P(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 Z(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ne(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function j(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 n(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 u(e){if(ne(e)!==e)throw Error(P(188))}function f(e){var t=e.alternate;if(!t){if(t=ne(e),t===null)throw Error(P(188));return t!==e?null:e}for(var i=e,s=t;;){var d=i.return;if(d===null)break;var g=d.alternate;if(g===null){if(s=d.return,s!==null){i=s;continue}break}if(d.child===g.child){for(g=d.child;g;){if(g===i)return u(d),e;if(g===s)return u(d),t;g=g.sibling}throw Error(P(188))}if(i.return!==s.return)i=d,s=g;else{for(var A=!1,k=d.child;k;){if(k===i){A=!0,i=d,s=g;break}if(k===s){A=!0,s=d,i=g;break}k=k.sibling}if(!A){for(k=g.child;k;){if(k===i){A=!0,i=g,s=d;break}if(k===s){A=!0,s=g,i=d;break}k=k.sibling}if(!A)throw Error(P(189))}}if(i.alternate!==s)throw Error(P(190))}if(i.tag!==3)throw Error(P(188));return i.stateNode.current===i?e:t}function _(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=_(e),t!==null)return t;e=e.sibling}return null}var a=Object.assign,p=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),l=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),C=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),M=Symbol.iterator;function E(e){return e===null||typeof e!="object"?null:(e=M&&e[M]||e["@@iterator"],typeof e=="function"?e:null)}var R=Symbol.for("react.client.reference");function B(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===R?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case o:return"Fragment";case h:return"Profiler";case r:return"StrictMode";case x:return"Suspense";case v:return"SuspenseList";case C:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case y:return"Portal";case l:return e.displayName||"Context";case c:return(e._context.displayName||"Context")+".Consumer";case S:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case b:return t=e.displayName||null,t!==null?t:B(e.type)||"Memo";case m:t=e._payload,e=e._init;try{return B(e(t))}catch{}}return null}var $=Array.isArray,N=G.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=X.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},D=[],O=-1;function T(e){return{current:e}}function H(e){0>O||(e.current=D[O],D[O]=null,O--)}function V(e,t){O++,D[O]=e.current,e.current=t}var Q=T(null),ue=T(null),de=T(null),q=T(null);function z(e,t){switch(V(de,t),V(ue,e),V(Q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?od(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=od(t),e=cd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(Q),V(Q,e)}function se(){H(Q),H(ue),H(de)}function ie(e){e.memoizedState!==null&&V(q,e);var t=Q.current,i=cd(t,e.type);t!==i&&(V(ue,e),V(Q,i))}function ve(e){ue.current===e&&(H(Q),H(ue)),q.current===e&&(H(q),qr._currentValue=F)}var fe,Me;function _e(e){if(fe===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||"",Me=-1<i.stack.indexOf(`
42
42
  at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+fe+e+Me}var Oe=!1;function qe(e,t){if(!e||Oe)return"";Oe=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(ae){var re=ae}Reflect.construct(e,[],he)}else{try{he.call()}catch(ae){re=ae}e.call(he.prototype)}}else{try{throw Error()}catch(ae){re=ae}(he=e())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(ae){if(ae&&re&&typeof ae.stack=="string")return[ae.stack,re.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=s.DetermineComponentFrameRoot(),M=g[0],k=g[1];if(M&&k){var W=M.split(`
43
+ `+fe+e+Me}var Oe=!1;function qe(e,t){if(!e||Oe)return"";Oe=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(ae){var re=ae}Reflect.construct(e,[],he)}else{try{he.call()}catch(ae){re=ae}e.call(he.prototype)}}else{try{throw Error()}catch(ae){re=ae}(he=e())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(ae){if(ae&&re&&typeof ae.stack=="string")return[ae.stack,re.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=s.DetermineComponentFrameRoot(),A=g[0],k=g[1];if(A&&k){var W=A.split(`
44
44
  `),te=k.split(`
45
45
  `);for(d=s=0;s<W.length&&!W[s].includes("DetermineComponentFrameRoot");)s++;for(;d<te.length&&!te[d].includes("DetermineComponentFrameRoot");)d++;if(s===W.length||d===te.length)for(s=W.length-1,d=te.length-1;1<=s&&0<=d&&W[s]!==te[d];)d--;for(;1<=s&&0<=d;s--,d--)if(W[s]!==te[d]){if(s!==1||d!==1)do if(s--,d--,0>d||W[s]!==te[d]){var le=`
46
46
  `+W[s].replace(" at new "," at ");return e.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",e.displayName)),le}while(1<=s&&0<=d);break}}}finally{Oe=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?_e(i):""}function be(e,t){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e("Lazy");case 13:return e.child!==t&&t!==null?_e("Suspense Fallback"):_e("Suspense");case 19:return _e("SuspenseList");case 0:case 15:return qe(e.type,!1);case 11:return qe(e.type.render,!1);case 1:return qe(e.type,!0);case 31:return _e("Activity");default:return""}}function ft(e){try{var t="",i=null;do t+=be(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
47
47
  Error generating stack: `+s.message+`
48
- `+s.stack}}var Ot=Object.prototype.hasOwnProperty,Se=U.unstable_scheduleCallback,pe=U.unstable_cancelCallback,me=U.unstable_shouldYield,ce=U.unstable_requestPaint,ge=U.unstable_now,ze=U.unstable_getCurrentPriorityLevel,Re=U.unstable_ImmediatePriority,_t=U.unstable_UserBlockingPriority,Qe=U.unstable_NormalPriority,it=U.unstable_LowPriority,Ie=U.unstable_IdlePriority,Ae=U.log,Le=U.unstable_setDisableYieldValue,xt=null,tt=null;function vt(e){if(typeof Ae=="function"&&Le(e),tt&&typeof tt.setStrictMode=="function")try{tt.setStrictMode(xt,e)}catch{}}var ut=Math.clz32?Math.clz32:ir,Zt=Math.log,tr=Math.LN2;function ir(e){return e>>>=0,e===0?32:31-(Zt(e)/tr|0)|0}var jt=256,si=262144,ri=4194304;function Jt(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 Qr(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var d=0,g=e.suspendedLanes,M=e.pingedLanes;e=e.warmLanes;var k=s&134217727;return k!==0?(s=k&~g,s!==0?d=Jt(s):(M&=k,M!==0?d=Jt(M):i||(i=k&~e,i!==0&&(d=Jt(i))))):(k=s&~g,k!==0?d=Jt(k):M!==0?d=Jt(M):i||(i=s&~e,i!==0&&(d=Jt(i)))),d===0?0:t!==0&&t!==d&&(t&g)===0&&(g=d&-d,i=t&-t,g>=i||g===32&&(i&4194048)!==0)?t:d}function sr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function gf(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 $o(){var e=ri;return ri<<=1,(ri&62914560)===0&&(ri=4194304),e}function va(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function rr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function pf(e,t,i,s,d,g){var M=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 k=e.entanglements,W=e.expirationTimes,te=e.hiddenUpdates;for(i=M&~i;0<i;){var le=31-ut(i),he=1<<le;k[le]=0,W[le]=-1;var re=te[le];if(re!==null)for(te[le]=null,le=0;le<re.length;le++){var ae=re[le];ae!==null&&(ae.lane&=-536870913)}i&=~he}s!==0&&qo(e,s,0),g!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=g&~(M&~t))}function qo(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-ut(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Wo(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-ut(i),d=1<<s;d&t|e[s]&t&&(e[s]|=t),i&=~d}}function Go(e,t){var i=t&-t;return i=(i&42)!==0?1:ga(i),(i&(e.suspendedLanes|t))!==0?0:i}function ga(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 pa(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Xo(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:Bd(e.type))}function Vo(e,t){var i=I.p;try{return I.p=e,t()}finally{I.p=i}}var Ai=Math.random().toString(36).slice(2),mt="__reactFiber$"+Ai,Et="__reactProps$"+Ai,gs="__reactContainer$"+Ai,ma="__reactEvents$"+Ai,mf="__reactListeners$"+Ai,Sf="__reactHandles$"+Ai,Yo="__reactResources$"+Ai,nr="__reactMarker$"+Ai;function Sa(e){delete e[mt],delete e[Et],delete e[ma],delete e[mf],delete e[Sf]}function ps(e){var t=e[mt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[gs]||i[mt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=gd(e);e!==null;){if(i=e[mt])return i;e=gd(e)}return t}e=i,i=e.parentNode}return null}function ms(e){if(e=e[mt]||e[gs]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ar(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(j(33))}function Ss(e){var t=e[Yo];return t||(t=e[Yo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function gt(e){e[nr]=!0}var Ko=new Set,Qo={};function Zi(e,t){Cs(e,t),Cs(e+"Capture",t)}function Cs(e,t){for(Qo[e]=t,e=0;e<t.length;e++)Ko.add(t[e])}var Cf=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]*$"),Zo={},Jo={};function yf(e){return Ot.call(Jo,e)?!0:Ot.call(Zo,e)?!1:Cf.test(e)?Jo[e]=!0:(Zo[e]=!0,!1)}function Zr(e,t,i){if(yf(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function Jr(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 hi(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+s)}}function Ft(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ec(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bf(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var d=s.get,g=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return d.call(this)},set:function(M){i=""+M,g.call(this,M)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(M){i=""+M},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ca(e){if(!e._valueTracker){var t=ec(e)?"checked":"value";e._valueTracker=bf(e,t,""+e[t])}}function tc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=ec(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function en(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 wf=/[\n"\\]/g;function $t(e){return e.replace(wf,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ya(e,t,i,s,d,g,M,k){e.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?e.type=M:e.removeAttribute("type"),t!=null?M==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ft(t)):e.value!==""+Ft(t)&&(e.value=""+Ft(t)):M!=="submit"&&M!=="reset"||e.removeAttribute("value"),t!=null?ba(e,M,Ft(t)):i!=null?ba(e,M,Ft(i)):s!=null&&e.removeAttribute("value"),d==null&&g!=null&&(e.defaultChecked=!!g),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?e.name=""+Ft(k):e.removeAttribute("name")}function ic(e,t,i,s,d,g,M,k){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.type=g),t!=null||i!=null){if(!(g!=="submit"&&g!=="reset"||t!=null)){Ca(e);return}i=i!=null?""+Ft(i):"",t=t!=null?""+Ft(t):i,k||t===e.value||(e.value=t),e.defaultValue=t}s=s??d,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=k?e.checked:!!s,e.defaultChecked=!!s,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(e.name=M),Ca(e)}function ba(e,t,i){t==="number"&&en(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function ys(e,t,i,s){if(e=e.options,t){t={};for(var d=0;d<i.length;d++)t["$"+i[d]]=!0;for(i=0;i<e.length;i++)d=t.hasOwnProperty("$"+e[i].value),e[i].selected!==d&&(e[i].selected=d),d&&s&&(e[i].defaultSelected=!0)}else{for(i=""+Ft(i),t=null,d=0;d<e.length;d++){if(e[d].value===i){e[d].selected=!0,s&&(e[d].defaultSelected=!0);return}t!==null||e[d].disabled||(t=e[d])}t!==null&&(t.selected=!0)}}function sc(e,t,i){if(t!=null&&(t=""+Ft(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Ft(i):""}function rc(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(j(92));if(F(s)){if(1<s.length)throw Error(j(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Ft(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),Ca(e)}function bs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var xf=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 nc(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||xf.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function ac(e,t,i){if(t!=null&&typeof t!="object")throw Error(j(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var d in t)s=t[d],t.hasOwnProperty(d)&&i[d]!==s&&nc(e,d,s)}else for(var g in t)t.hasOwnProperty(g)&&nc(e,g,t[g])}function wa(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 Lf=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"]]),Ef=/^[\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 tn(e){return Ef.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ui(){}var xa=null;function La(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ws=null,xs=null;function lc(e){var t=ms(e);if(t&&(e=t.stateNode)){var i=e[Et]||null;e:switch(e=t.stateNode,t.type){case"input":if(ya(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="'+$t(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var d=s[Et]||null;if(!d)throw Error(j(90));ya(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&tc(s)}break e;case"textarea":sc(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&ys(e,!!i.multiple,t,!1)}}}var Ea=!1;function oc(e,t,i){if(Ea)return e(t,i);Ea=!0;try{var s=e(t);return s}finally{if(Ea=!1,(ws!==null||xs!==null)&&($n(),ws&&(t=ws,e=xs,xs=ws=null,lc(t),e)))for(t=0;t<e.length;t++)lc(e[t])}}function lr(e,t){var i=e.stateNode;if(i===null)return null;var s=i[Et]||null;if(s===null)return null;i=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(j(231,t,typeof i));return i}var di=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ma=!1;if(di)try{var or={};Object.defineProperty(or,"passive",{get:function(){Ma=!0}}),window.addEventListener("test",or,or),window.removeEventListener("test",or,or)}catch{Ma=!1}var Ri=null,Aa=null,sn=null;function cc(){if(sn)return sn;var e,t=Aa,i=t.length,s,d="value"in Ri?Ri.value:Ri.textContent,g=d.length;for(e=0;e<i&&t[e]===d[e];e++);var M=i-e;for(s=1;s<=M&&t[i-s]===d[g-s];s++);return sn=d.slice(e,1<s?1-s:void 0)}function rn(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 nn(){return!0}function hc(){return!1}function Mt(e){function t(i,s,d,g,M){this._reactName=i,this._targetInst=d,this.type=s,this.nativeEvent=g,this.target=M,this.currentTarget=null;for(var k in e)e.hasOwnProperty(k)&&(i=e[k],this[k]=i?i(g):g[k]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?nn:hc,this.isPropagationStopped=hc,this}return a(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=nn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var Ji={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},an=Mt(Ji),cr=a({},Ji,{view:0,detail:0}),Mf=Mt(cr),Ra,Da,hr,ln=a({},cr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ba,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!==hr&&(hr&&e.type==="mousemove"?(Ra=e.screenX-hr.screenX,Da=e.screenY-hr.screenY):Da=Ra=0,hr=e),Ra)},movementY:function(e){return"movementY"in e?e.movementY:Da}}),uc=Mt(ln),Af=a({},ln,{dataTransfer:0}),Rf=Mt(Af),Df=a({},cr,{relatedTarget:0}),Ta=Mt(Df),Tf=a({},Ji,{animationName:0,elapsedTime:0,pseudoElement:0}),Bf=Mt(Tf),Of=a({},Ji,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kf=Mt(Of),Hf=a({},Ji,{data:0}),dc=Mt(Hf),zf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nf={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"},Uf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function If(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Uf[e])?!!t[e]:!1}function Ba(){return If}var Pf=a({},cr,{key:function(e){if(e.key){var t=zf[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=rn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Nf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ba,charCode:function(e){return e.type==="keypress"?rn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?rn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),jf=Mt(Pf),Ff=a({},ln,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fc=Mt(Ff),$f=a({},cr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ba}),qf=Mt($f),Wf=a({},Ji,{propertyName:0,elapsedTime:0,pseudoElement:0}),Gf=Mt(Wf),Xf=a({},ln,{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}),Vf=Mt(Xf),Yf=a({},Ji,{newState:0,oldState:0}),Kf=Mt(Yf),Qf=[9,13,27,32],Oa=di&&"CompositionEvent"in window,ur=null;di&&"documentMode"in document&&(ur=document.documentMode);var Zf=di&&"TextEvent"in window&&!ur,_c=di&&(!Oa||ur&&8<ur&&11>=ur),vc=" ",gc=!1;function pc(e,t){switch(e){case"keyup":return Qf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ls=!1;function Jf(e,t){switch(e){case"compositionend":return mc(t);case"keypress":return t.which!==32?null:(gc=!0,vc);case"textInput":return e=t.data,e===vc&&gc?null:e;default:return null}}function e_(e,t){if(Ls)return e==="compositionend"||!Oa&&pc(e,t)?(e=cc(),sn=Aa=Ri=null,Ls=!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 _c&&t.locale!=="ko"?null:t.data;default:return null}}var t_={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 Sc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!t_[e.type]:t==="textarea"}function Cc(e,t,i,s){ws?xs?xs.push(s):xs=[s]:ws=s,t=Kn(t,"onChange"),0<t.length&&(i=new an("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var dr=null,fr=null;function i_(e){id(e,0)}function on(e){var t=ar(e);if(tc(t))return e}function yc(e,t){if(e==="change")return t}var bc=!1;if(di){var ka;if(di){var Ha="oninput"in document;if(!Ha){var wc=document.createElement("div");wc.setAttribute("oninput","return;"),Ha=typeof wc.oninput=="function"}ka=Ha}else ka=!1;bc=ka&&(!document.documentMode||9<document.documentMode)}function xc(){dr&&(dr.detachEvent("onpropertychange",Lc),fr=dr=null)}function Lc(e){if(e.propertyName==="value"&&on(fr)){var t=[];Cc(t,fr,e,La(e)),oc(i_,t)}}function s_(e,t,i){e==="focusin"?(xc(),dr=t,fr=i,dr.attachEvent("onpropertychange",Lc)):e==="focusout"&&xc()}function r_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return on(fr)}function n_(e,t){if(e==="click")return on(t)}function a_(e,t){if(e==="input"||e==="change")return on(t)}function l_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:l_;function _r(e,t){if(kt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var d=i[s];if(!Ot.call(t,d)||!kt(e[d],t[d]))return!1}return!0}function Ec(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mc(e,t){var i=Ec(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Ec(i)}}function Ac(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ac(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=en(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=en(e.document)}return t}function za(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 o_=di&&"documentMode"in document&&11>=document.documentMode,Es=null,Na=null,vr=null,Ua=!1;function Dc(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ua||Es==null||Es!==en(s)||(s=Es,"selectionStart"in s&&za(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),vr&&_r(vr,s)||(vr=s,s=Kn(Na,"onSelect"),0<s.length&&(t=new an("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Es)))}function es(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Ms={animationend:es("Animation","AnimationEnd"),animationiteration:es("Animation","AnimationIteration"),animationstart:es("Animation","AnimationStart"),transitionrun:es("Transition","TransitionRun"),transitionstart:es("Transition","TransitionStart"),transitioncancel:es("Transition","TransitionCancel"),transitionend:es("Transition","TransitionEnd")},Ia={},Tc={};di&&(Tc=document.createElement("div").style,"AnimationEvent"in window||(delete Ms.animationend.animation,delete Ms.animationiteration.animation,delete Ms.animationstart.animation),"TransitionEvent"in window||delete Ms.transitionend.transition);function ts(e){if(Ia[e])return Ia[e];if(!Ms[e])return e;var t=Ms[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Tc)return Ia[e]=t[i];return e}var Bc=ts("animationend"),Oc=ts("animationiteration"),kc=ts("animationstart"),c_=ts("transitionrun"),h_=ts("transitionstart"),u_=ts("transitioncancel"),Hc=ts("transitionend"),zc=new Map,Pa="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(" ");Pa.push("scrollEnd");function ei(e,t){zc.set(e,t),Zi(t,[e])}var cn=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)},qt=[],As=0,ja=0;function hn(){for(var e=As,t=ja=As=0;t<e;){var i=qt[t];qt[t++]=null;var s=qt[t];qt[t++]=null;var d=qt[t];qt[t++]=null;var g=qt[t];if(qt[t++]=null,s!==null&&d!==null){var M=s.pending;M===null?d.next=d:(d.next=M.next,M.next=d),s.pending=d}g!==0&&Nc(i,d,g)}}function un(e,t,i,s){qt[As++]=e,qt[As++]=t,qt[As++]=i,qt[As++]=s,ja|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Fa(e,t,i,s){return un(e,t,i,s),dn(e)}function is(e,t){return un(e,null,null,t),dn(e)}function Nc(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var d=!1,g=e.return;g!==null;)g.childLanes|=i,s=g.alternate,s!==null&&(s.childLanes|=i),g.tag===22&&(e=g.stateNode,e===null||e._visibility&1||(d=!0)),e=g,g=g.return;return e.tag===3?(g=e.stateNode,d&&t!==null&&(d=31-ut(i),e=g.hiddenUpdates,s=e[d],s===null?e[d]=[t]:s.push(t),t.lane=i|536870912),g):null}function dn(e){if(50<Nr)throw Nr=0,Ql=null,Error(j(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Rs={};function d_(e,t,i,s){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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ht(e,t,i,s){return new d_(e,t,i,s)}function $a(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fi(e,t){var i=e.alternate;return i===null?(i=Ht(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 Uc(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 fn(e,t,i,s,d,g){var M=0;if(s=e,typeof e=="function")$a(e)&&(M=1);else if(typeof e=="string")M=pv(e,i,Q.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case C:return e=Ht(31,i,t,d),e.elementType=C,e.lanes=g,e;case c:return ss(i.children,d,g,t);case r:M=8,d|=24;break;case h:return e=Ht(12,i,t,d|2),e.elementType=h,e.lanes=g,e;case x:return e=Ht(13,i,t,d),e.elementType=x,e.lanes=g,e;case v:return e=Ht(19,i,t,d),e.elementType=v,e.lanes=g,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l:M=10;break e;case o:M=9;break e;case S:M=11;break e;case y:M=14;break e;case m:M=16,s=null;break e}M=29,i=Error(j(130,e===null?"null":typeof e,"")),s=null}return t=Ht(M,i,t,d),t.elementType=e,t.type=s,t.lanes=g,t}function ss(e,t,i,s){return e=Ht(7,e,s,t),e.lanes=i,e}function qa(e,t,i){return e=Ht(6,e,null,t),e.lanes=i,e}function Ic(e){var t=Ht(18,null,null,0);return t.stateNode=e,t}function Wa(e,t,i){return t=Ht(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Pc=new WeakMap;function Wt(e,t){if(typeof e=="object"&&e!==null){var i=Pc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:ft(t)},Pc.set(e,t),t)}return{value:e,source:t,stack:ft(t)}}var Ds=[],Ts=0,_n=null,gr=0,Gt=[],Xt=0,Di=null,ni=1,ai="";function _i(e,t){Ds[Ts++]=gr,Ds[Ts++]=_n,_n=e,gr=t}function jc(e,t,i){Gt[Xt++]=ni,Gt[Xt++]=ai,Gt[Xt++]=Di,Di=e;var s=ni;e=ai;var d=32-ut(s)-1;s&=~(1<<d),i+=1;var g=32-ut(t)+d;if(30<g){var M=d-d%5;g=(s&(1<<M)-1).toString(32),s>>=M,d-=M,ni=1<<32-ut(t)+d|i<<d|s,ai=g+e}else ni=1<<g|i<<d|s,ai=e}function Ga(e){e.return!==null&&(_i(e,1),jc(e,1,0))}function Xa(e){for(;e===_n;)_n=Ds[--Ts],Ds[Ts]=null,gr=Ds[--Ts],Ds[Ts]=null;for(;e===Di;)Di=Gt[--Xt],Gt[Xt]=null,ai=Gt[--Xt],Gt[Xt]=null,ni=Gt[--Xt],Gt[Xt]=null}function Fc(e,t){Gt[Xt++]=ni,Gt[Xt++]=ai,Gt[Xt++]=Di,ni=t.id,ai=t.overflow,Di=e}var St=null,Ze=null,Pe=!1,Ti=null,Vt=!1,Va=Error(j(519));function Bi(e){var t=Error(j(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw pr(Wt(t,e)),Va}function $c(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[mt]=e,t[Et]=s,i){case"dialog":He("cancel",t),He("close",t);break;case"iframe":case"object":case"embed":He("load",t);break;case"video":case"audio":for(i=0;i<Ir.length;i++)He(Ir[i],t);break;case"source":He("error",t);break;case"img":case"image":case"link":He("error",t),He("load",t);break;case"details":He("toggle",t);break;case"input":He("invalid",t),ic(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":He("invalid",t);break;case"textarea":He("invalid",t),rc(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||ad(t.textContent,i)?(s.popover!=null&&(He("beforetoggle",t),He("toggle",t)),s.onScroll!=null&&He("scroll",t),s.onScrollEnd!=null&&He("scrollend",t),s.onClick!=null&&(t.onclick=ui),t=!0):t=!1,t||Bi(e,!0)}function qc(e){for(St=e.return;St;)switch(St.tag){case 5:case 31:case 13:Vt=!1;return;case 27:case 3:Vt=!0;return;default:St=St.return}}function Bs(e){if(e!==St)return!1;if(!Pe)return qc(e),Pe=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||fo(e.type,e.memoizedProps)),i=!i),i&&Ze&&Bi(e),qc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));Ze=vd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));Ze=vd(e)}else t===27?(t=Ze,Gi(e.type)?(e=mo,mo=null,Ze=e):Ze=t):Ze=St?Kt(e.stateNode.nextSibling):null;return!0}function rs(){Ze=St=null,Pe=!1}function Ya(){var e=Ti;return e!==null&&(Tt===null?Tt=e:Tt.push.apply(Tt,e),Ti=null),e}function pr(e){Ti===null?Ti=[e]:Ti.push(e)}var Ka=T(null),ns=null,vi=null;function Oi(e,t,i){V(Ka,t._currentValue),t._currentValue=i}function gi(e){e._currentValue=Ka.current,H(Ka)}function Qa(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function Za(e,t,i,s){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var g=d.dependencies;if(g!==null){var M=d.child;g=g.firstContext;e:for(;g!==null;){var k=g;g=d;for(var W=0;W<t.length;W++)if(k.context===t[W]){g.lanes|=i,k=g.alternate,k!==null&&(k.lanes|=i),Qa(g.return,i,e),s||(M=null);break e}g=k.next}}else if(d.tag===18){if(M=d.return,M===null)throw Error(j(341));M.lanes|=i,g=M.alternate,g!==null&&(g.lanes|=i),Qa(M,i,e),M=null}else M=d.child;if(M!==null)M.return=d;else for(M=d;M!==null;){if(M===e){M=null;break}if(d=M.sibling,d!==null){d.return=M.return,M=d;break}M=M.return}d=M}}function Os(e,t,i,s){e=null;for(var d=t,g=!1;d!==null;){if(!g){if((d.flags&524288)!==0)g=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var M=d.alternate;if(M===null)throw Error(j(387));if(M=M.memoizedProps,M!==null){var k=d.type;kt(d.pendingProps.value,M.value)||(e!==null?e.push(k):e=[k])}}else if(d===q.current){if(M=d.alternate,M===null)throw Error(j(387));M.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(qr):e=[qr])}d=d.return}e!==null&&Za(t,e,i,s),t.flags|=262144}function vn(e){for(e=e.firstContext;e!==null;){if(!kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function as(e){ns=e,vi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ct(e){return Wc(ns,e)}function gn(e,t){return ns===null&&as(e),Wc(e,t)}function Wc(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},vi===null){if(e===null)throw Error(j(308));vi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else vi=vi.next=t;return i}var f_=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},__=U.unstable_scheduleCallback,v_=U.unstable_NormalPriority,lt={$$typeof:l,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ja(){return{controller:new f_,data:new Map,refCount:0}}function mr(e){e.refCount--,e.refCount===0&&__(v_,function(){e.controller.abort()})}var Sr=null,el=0,ks=0,Hs=null;function g_(e,t){if(Sr===null){var i=Sr=[];el=0,ks=so(),Hs={status:"pending",value:void 0,then:function(s){i.push(s)}}}return el++,t.then(Gc,Gc),t}function Gc(){if(--el===0&&Sr!==null){Hs!==null&&(Hs.status="fulfilled");var e=Sr;Sr=null,ks=0,Hs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function p_(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(d){i.push(d)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var d=0;d<i.length;d++)(0,i[d])(t)},function(d){for(s.status="rejected",s.reason=d,d=0;d<i.length;d++)(0,i[d])(void 0)}),s}var Xc=N.S;N.S=function(e,t){Du=ge(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&g_(e,t),Xc!==null&&Xc(e,t)};var ls=T(null);function tl(){var e=ls.current;return e!==null?e:Ke.pooledCache}function pn(e,t){t===null?V(ls,ls.current):V(ls,t.pool)}function Vc(){var e=tl();return e===null?null:{parent:lt._currentValue,pool:e}}var zs=Error(j(460)),il=Error(j(474)),mn=Error(j(542)),Sn={then:function(){}};function Yc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Kc(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(ui,ui),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Zc(e),e;default:if(typeof t.status=="string")t.then(ui,ui);else{if(e=Ke,e!==null&&100<e.shellSuspendCounter)throw Error(j(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var d=t;d.status="fulfilled",d.value=s}},function(s){if(t.status==="pending"){var d=t;d.status="rejected",d.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Zc(e),e}throw cs=t,zs}}function os(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(cs=i,zs):i}}var cs=null;function Qc(){if(cs===null)throw Error(j(459));var e=cs;return cs=null,e}function Zc(e){if(e===zs||e===mn)throw Error(j(483))}var Ns=null,Cr=0;function Cn(e){var t=Cr;return Cr+=1,Ns===null&&(Ns=[]),Kc(Ns,e,t)}function yr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function yn(e,t){throw t.$$typeof===p?Error(j(525)):(e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Jc(e){function t(J,Y){if(e){var ee=J.deletions;ee===null?(J.deletions=[Y],J.flags|=16):ee.push(Y)}}function i(J,Y){if(!e)return null;for(;Y!==null;)t(J,Y),Y=Y.sibling;return null}function s(J){for(var Y=new Map;J!==null;)J.key!==null?Y.set(J.key,J):Y.set(J.index,J),J=J.sibling;return Y}function d(J,Y){return J=fi(J,Y),J.index=0,J.sibling=null,J}function g(J,Y,ee){return J.index=ee,e?(ee=J.alternate,ee!==null?(ee=ee.index,ee<Y?(J.flags|=67108866,Y):ee):(J.flags|=67108866,Y)):(J.flags|=1048576,Y)}function M(J){return e&&J.alternate===null&&(J.flags|=67108866),J}function k(J,Y,ee,oe){return Y===null||Y.tag!==6?(Y=qa(ee,J.mode,oe),Y.return=J,Y):(Y=d(Y,ee),Y.return=J,Y)}function W(J,Y,ee,oe){var xe=ee.type;return xe===c?le(J,Y,ee.props.children,oe,ee.key):Y!==null&&(Y.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===m&&os(xe)===Y.type)?(Y=d(Y,ee.props),yr(Y,ee),Y.return=J,Y):(Y=fn(ee.type,ee.key,ee.props,null,J.mode,oe),yr(Y,ee),Y.return=J,Y)}function te(J,Y,ee,oe){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==ee.containerInfo||Y.stateNode.implementation!==ee.implementation?(Y=Wa(ee,J.mode,oe),Y.return=J,Y):(Y=d(Y,ee.children||[]),Y.return=J,Y)}function le(J,Y,ee,oe,xe){return Y===null||Y.tag!==7?(Y=ss(ee,J.mode,oe,xe),Y.return=J,Y):(Y=d(Y,ee),Y.return=J,Y)}function he(J,Y,ee){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Y=qa(""+Y,J.mode,ee),Y.return=J,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case b:return ee=fn(Y.type,Y.key,Y.props,null,J.mode,ee),yr(ee,Y),ee.return=J,ee;case w:return Y=Wa(Y,J.mode,ee),Y.return=J,Y;case m:return Y=os(Y),he(J,Y,ee)}if(F(Y)||E(Y))return Y=ss(Y,J.mode,ee,null),Y.return=J,Y;if(typeof Y.then=="function")return he(J,Cn(Y),ee);if(Y.$$typeof===l)return he(J,gn(J,Y),ee);yn(J,Y)}return null}function re(J,Y,ee,oe){var xe=Y!==null?Y.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return xe!==null?null:k(J,Y,""+ee,oe);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case b:return ee.key===xe?W(J,Y,ee,oe):null;case w:return ee.key===xe?te(J,Y,ee,oe):null;case m:return ee=os(ee),re(J,Y,ee,oe)}if(F(ee)||E(ee))return xe!==null?null:le(J,Y,ee,oe,null);if(typeof ee.then=="function")return re(J,Y,Cn(ee),oe);if(ee.$$typeof===l)return re(J,Y,gn(J,ee),oe);yn(J,ee)}return null}function ae(J,Y,ee,oe,xe){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return J=J.get(ee)||null,k(Y,J,""+oe,xe);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case b:return J=J.get(oe.key===null?ee:oe.key)||null,W(Y,J,oe,xe);case w:return J=J.get(oe.key===null?ee:oe.key)||null,te(Y,J,oe,xe);case m:return oe=os(oe),ae(J,Y,ee,oe,xe)}if(F(oe)||E(oe))return J=J.get(ee)||null,le(Y,J,oe,xe,null);if(typeof oe.then=="function")return ae(J,Y,ee,Cn(oe),xe);if(oe.$$typeof===l)return ae(J,Y,ee,gn(Y,oe),xe);yn(Y,oe)}return null}function Ce(J,Y,ee,oe){for(var xe=null,je=null,ye=Y,Be=Y=0,Ue=null;ye!==null&&Be<ee.length;Be++){ye.index>Be?(Ue=ye,ye=null):Ue=ye.sibling;var Fe=re(J,ye,ee[Be],oe);if(Fe===null){ye===null&&(ye=Ue);break}e&&ye&&Fe.alternate===null&&t(J,ye),Y=g(Fe,Y,Be),je===null?xe=Fe:je.sibling=Fe,je=Fe,ye=Ue}if(Be===ee.length)return i(J,ye),Pe&&_i(J,Be),xe;if(ye===null){for(;Be<ee.length;Be++)ye=he(J,ee[Be],oe),ye!==null&&(Y=g(ye,Y,Be),je===null?xe=ye:je.sibling=ye,je=ye);return Pe&&_i(J,Be),xe}for(ye=s(ye);Be<ee.length;Be++)Ue=ae(ye,J,Be,ee[Be],oe),Ue!==null&&(e&&Ue.alternate!==null&&ye.delete(Ue.key===null?Be:Ue.key),Y=g(Ue,Y,Be),je===null?xe=Ue:je.sibling=Ue,je=Ue);return e&&ye.forEach(function(Qi){return t(J,Qi)}),Pe&&_i(J,Be),xe}function Ee(J,Y,ee,oe){if(ee==null)throw Error(j(151));for(var xe=null,je=null,ye=Y,Be=Y=0,Ue=null,Fe=ee.next();ye!==null&&!Fe.done;Be++,Fe=ee.next()){ye.index>Be?(Ue=ye,ye=null):Ue=ye.sibling;var Qi=re(J,ye,Fe.value,oe);if(Qi===null){ye===null&&(ye=Ue);break}e&&ye&&Qi.alternate===null&&t(J,ye),Y=g(Qi,Y,Be),je===null?xe=Qi:je.sibling=Qi,je=Qi,ye=Ue}if(Fe.done)return i(J,ye),Pe&&_i(J,Be),xe;if(ye===null){for(;!Fe.done;Be++,Fe=ee.next())Fe=he(J,Fe.value,oe),Fe!==null&&(Y=g(Fe,Y,Be),je===null?xe=Fe:je.sibling=Fe,je=Fe);return Pe&&_i(J,Be),xe}for(ye=s(ye);!Fe.done;Be++,Fe=ee.next())Fe=ae(ye,J,Be,Fe.value,oe),Fe!==null&&(e&&Fe.alternate!==null&&ye.delete(Fe.key===null?Be:Fe.key),Y=g(Fe,Y,Be),je===null?xe=Fe:je.sibling=Fe,je=Fe);return e&&ye.forEach(function(Av){return t(J,Av)}),Pe&&_i(J,Be),xe}function Ye(J,Y,ee,oe){if(typeof ee=="object"&&ee!==null&&ee.type===c&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case b:e:{for(var xe=ee.key;Y!==null;){if(Y.key===xe){if(xe=ee.type,xe===c){if(Y.tag===7){i(J,Y.sibling),oe=d(Y,ee.props.children),oe.return=J,J=oe;break e}}else if(Y.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===m&&os(xe)===Y.type){i(J,Y.sibling),oe=d(Y,ee.props),yr(oe,ee),oe.return=J,J=oe;break e}i(J,Y);break}else t(J,Y);Y=Y.sibling}ee.type===c?(oe=ss(ee.props.children,J.mode,oe,ee.key),oe.return=J,J=oe):(oe=fn(ee.type,ee.key,ee.props,null,J.mode,oe),yr(oe,ee),oe.return=J,J=oe)}return M(J);case w:e:{for(xe=ee.key;Y!==null;){if(Y.key===xe)if(Y.tag===4&&Y.stateNode.containerInfo===ee.containerInfo&&Y.stateNode.implementation===ee.implementation){i(J,Y.sibling),oe=d(Y,ee.children||[]),oe.return=J,J=oe;break e}else{i(J,Y);break}else t(J,Y);Y=Y.sibling}oe=Wa(ee,J.mode,oe),oe.return=J,J=oe}return M(J);case m:return ee=os(ee),Ye(J,Y,ee,oe)}if(F(ee))return Ce(J,Y,ee,oe);if(E(ee)){if(xe=E(ee),typeof xe!="function")throw Error(j(150));return ee=xe.call(ee),Ee(J,Y,ee,oe)}if(typeof ee.then=="function")return Ye(J,Y,Cn(ee),oe);if(ee.$$typeof===l)return Ye(J,Y,gn(J,ee),oe);yn(J,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint"?(ee=""+ee,Y!==null&&Y.tag===6?(i(J,Y.sibling),oe=d(Y,ee),oe.return=J,J=oe):(i(J,Y),oe=qa(ee,J.mode,oe),oe.return=J,J=oe),M(J)):i(J,Y)}return function(J,Y,ee,oe){try{Cr=0;var xe=Ye(J,Y,ee,oe);return Ns=null,xe}catch(ye){if(ye===zs||ye===mn)throw ye;var je=Ht(29,ye,null,J.mode);return je.lanes=oe,je.return=J,je}finally{}}}var hs=Jc(!0),eh=Jc(!1),ki=!1;function sl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function rl(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 Hi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function zi(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,($e&2)!==0){var d=s.pending;return d===null?t.next=t:(t.next=d.next,d.next=t),s.pending=t,t=dn(e),Nc(e,null,i),t}return un(e,s,t,i),dn(e)}function br(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Wo(e,i)}}function nl(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var d=null,g=null;if(i=i.firstBaseUpdate,i!==null){do{var M={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};g===null?d=g=M:g=g.next=M,i=i.next}while(i!==null);g===null?d=g=t:g=g.next=t}else d=g=t;i={baseState:s.baseState,firstBaseUpdate:d,lastBaseUpdate:g,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var al=!1;function wr(){if(al){var e=Hs;if(e!==null)throw e}}function xr(e,t,i,s){al=!1;var d=e.updateQueue;ki=!1;var g=d.firstBaseUpdate,M=d.lastBaseUpdate,k=d.shared.pending;if(k!==null){d.shared.pending=null;var W=k,te=W.next;W.next=null,M===null?g=te:M.next=te,M=W;var le=e.alternate;le!==null&&(le=le.updateQueue,k=le.lastBaseUpdate,k!==M&&(k===null?le.firstBaseUpdate=te:k.next=te,le.lastBaseUpdate=W))}if(g!==null){var he=d.baseState;M=0,le=te=W=null,k=g;do{var re=k.lane&-536870913,ae=re!==k.lane;if(ae?(Ne&re)===re:(s&re)===re){re!==0&&re===ks&&(al=!0),le!==null&&(le=le.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Ce=e,Ee=k;re=t;var Ye=i;switch(Ee.tag){case 1:if(Ce=Ee.payload,typeof Ce=="function"){he=Ce.call(Ye,he,re);break e}he=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=Ee.payload,re=typeof Ce=="function"?Ce.call(Ye,he,re):Ce,re==null)break e;he=a({},he,re);break e;case 2:ki=!0}}re=k.callback,re!==null&&(e.flags|=64,ae&&(e.flags|=8192),ae=d.callbacks,ae===null?d.callbacks=[re]:ae.push(re))}else ae={lane:re,tag:k.tag,payload:k.payload,callback:k.callback,next:null},le===null?(te=le=ae,W=he):le=le.next=ae,M|=re;if(k=k.next,k===null){if(k=d.shared.pending,k===null)break;ae=k,k=ae.next,ae.next=null,d.lastBaseUpdate=ae,d.shared.pending=null}}while(!0);le===null&&(W=he),d.baseState=W,d.firstBaseUpdate=te,d.lastBaseUpdate=le,g===null&&(d.shared.lanes=0),ji|=M,e.lanes=M,e.memoizedState=he}}function th(e,t){if(typeof e!="function")throw Error(j(191,e));e.call(t)}function ih(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)th(i[e],t)}var Us=T(null),bn=T(0);function sh(e,t){e=Li,V(bn,e),V(Us,t),Li=e|t.baseLanes}function ll(){V(bn,Li),V(Us,Us.current)}function ol(){Li=bn.current,H(Us),H(bn)}var zt=T(null),Yt=null;function Ni(e){var t=e.alternate;V(nt,nt.current&1),V(zt,e),Yt===null&&(t===null||Us.current!==null||t.memoizedState!==null)&&(Yt=e)}function cl(e){V(nt,nt.current),V(zt,e),Yt===null&&(Yt=e)}function rh(e){e.tag===22?(V(nt,nt.current),V(zt,e),Yt===null&&(Yt=e)):Ui()}function Ui(){V(nt,nt.current),V(zt,zt.current)}function Nt(e){H(zt),Yt===e&&(Yt=null),H(nt)}var nt=T(0);function wn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||go(i)||po(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)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var pi=0,Te=null,Xe=null,ot=null,xn=!1,Is=!1,us=!1,Ln=0,Lr=0,Ps=null,m_=0;function st(){throw Error(j(321))}function hl(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!kt(e[i],t[i]))return!1;return!0}function ul(e,t,i,s,d,g){return pi=g,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?jh:El,us=!1,g=i(s,d),us=!1,Is&&(g=ah(t,i,s,d)),nh(e),g}function nh(e){N.H=Ar;var t=Xe!==null&&Xe.next!==null;if(pi=0,ot=Xe=Te=null,xn=!1,Lr=0,Ps=null,t)throw Error(j(300));e===null||ct||(e=e.dependencies,e!==null&&vn(e)&&(ct=!0))}function ah(e,t,i,s){Te=e;var d=0;do{if(Is&&(Ps=null),Lr=0,Is=!1,25<=d)throw Error(j(301));if(d+=1,ot=Xe=null,e.updateQueue!=null){var g=e.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}N.H=Fh,g=t(i,s)}while(Is);return g}function S_(){var e=N.H,t=e.useState()[0];return t=typeof t.then=="function"?Er(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(Te.flags|=1024),t}function dl(){var e=Ln!==0;return Ln=0,e}function fl(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function _l(e){if(xn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}xn=!1}pi=0,ot=Xe=Te=null,Is=!1,Lr=Ln=0,Ps=null}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?Te.memoizedState=ot=e:ot=ot.next=e,ot}function at(){if(Xe===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=ot===null?Te.memoizedState:ot.next;if(t!==null)ot=t,Xe=e;else{if(e===null)throw Te.alternate===null?Error(j(467)):Error(j(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ot===null?Te.memoizedState=ot=e:ot=ot.next=e}return ot}function En(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Er(e){var t=Lr;return Lr+=1,Ps===null&&(Ps=[]),e=Kc(Ps,e,t),t=Te,(ot===null?t.memoizedState:ot.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?jh:El),e}function Mn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Er(e);if(e.$$typeof===l)return Ct(e)}throw Error(j(438,String(e)))}function vl(e){var t=null,i=Te.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Te.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(d){return d.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=En(),Te.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=L;return t.index++,i}function mi(e,t){return typeof t=="function"?t(e):t}function An(e){var t=at();return gl(t,Xe,e)}function gl(e,t,i){var s=e.queue;if(s===null)throw Error(j(311));s.lastRenderedReducer=i;var d=e.baseQueue,g=s.pending;if(g!==null){if(d!==null){var M=d.next;d.next=g.next,g.next=M}t.baseQueue=d=g,s.pending=null}if(g=e.baseState,d===null)e.memoizedState=g;else{t=d.next;var k=M=null,W=null,te=t,le=!1;do{var he=te.lane&-536870913;if(he!==te.lane?(Ne&he)===he:(pi&he)===he){var re=te.revertLane;if(re===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),he===ks&&(le=!0);else if((pi&re)===re){te=te.next,re===ks&&(le=!0);continue}else he={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},W===null?(k=W=he,M=g):W=W.next=he,Te.lanes|=re,ji|=re;he=te.action,us&&i(g,he),g=te.hasEagerState?te.eagerState:i(g,he)}else re={lane:he,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},W===null?(k=W=re,M=g):W=W.next=re,Te.lanes|=he,ji|=he;te=te.next}while(te!==null&&te!==t);if(W===null?M=g:W.next=k,!kt(g,e.memoizedState)&&(ct=!0,le&&(i=Hs,i!==null)))throw i;e.memoizedState=g,e.baseState=M,e.baseQueue=W,s.lastRenderedState=g}return d===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function pl(e){var t=at(),i=t.queue;if(i===null)throw Error(j(311));i.lastRenderedReducer=e;var s=i.dispatch,d=i.pending,g=t.memoizedState;if(d!==null){i.pending=null;var M=d=d.next;do g=e(g,M.action),M=M.next;while(M!==d);kt(g,t.memoizedState)||(ct=!0),t.memoizedState=g,t.baseQueue===null&&(t.baseState=g),i.lastRenderedState=g}return[g,s]}function lh(e,t,i){var s=Te,d=at(),g=Pe;if(g){if(i===void 0)throw Error(j(407));i=i()}else i=t();var M=!kt((Xe||d).memoizedState,i);if(M&&(d.memoizedState=i,ct=!0),d=d.queue,Cl(hh.bind(null,s,d,e),[e]),d.getSnapshot!==t||M||ot!==null&&ot.memoizedState.tag&1){if(s.flags|=2048,js(9,{destroy:void 0},ch.bind(null,s,d,i,t),null),Ke===null)throw Error(j(349));g||(pi&127)!==0||oh(s,t,i)}return i}function oh(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Te.updateQueue,t===null?(t=En(),Te.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function ch(e,t,i,s){t.value=i,t.getSnapshot=s,uh(t)&&dh(e)}function hh(e,t,i){return i(function(){uh(t)&&dh(e)})}function uh(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!kt(e,i)}catch{return!0}}function dh(e){var t=is(e,2);t!==null&&Bt(t,e,2)}function ml(e){var t=Lt();if(typeof e=="function"){var i=e;if(e=i(),us){vt(!0);try{i()}finally{vt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mi,lastRenderedState:e},t}function fh(e,t,i,s){return e.baseState=i,gl(e,Xe,typeof s=="function"?s:mi)}function C_(e,t,i,s,d){if(Tn(e))throw Error(j(485));if(e=t.action,e!==null){var g={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){g.listeners.push(M)}};N.T!==null?i(!0):g.isTransition=!1,s(g),i=t.pending,i===null?(g.next=t.pending=g,_h(t,g)):(g.next=i.next,t.pending=i.next=g)}}function _h(e,t){var i=t.action,s=t.payload,d=e.state;if(t.isTransition){var g=N.T,M={};N.T=M;try{var k=i(d,s),W=N.S;W!==null&&W(M,k),vh(e,t,k)}catch(te){Sl(e,t,te)}finally{g!==null&&M.types!==null&&(g.types=M.types),N.T=g}}else try{g=i(d,s),vh(e,t,g)}catch(te){Sl(e,t,te)}}function vh(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){gh(e,t,s)},function(s){return Sl(e,t,s)}):gh(e,t,i)}function gh(e,t,i){t.status="fulfilled",t.value=i,ph(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,_h(e,i)))}function Sl(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,ph(t),t=t.next;while(t!==s)}e.action=null}function ph(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function mh(e,t){return t}function Sh(e,t){if(Pe){var i=Ke.formState;if(i!==null){e:{var s=Te;if(Pe){if(Ze){t:{for(var d=Ze,g=Vt;d.nodeType!==8;){if(!g){d=null;break t}if(d=Kt(d.nextSibling),d===null){d=null;break t}}g=d.data,d=g==="F!"||g==="F"?d:null}if(d){Ze=Kt(d.nextSibling),s=d.data==="F!";break e}}Bi(s)}s=!1}s&&(t=i[0])}}return i=Lt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mh,lastRenderedState:t},i.queue=s,i=Uh.bind(null,Te,s),s.dispatch=i,s=ml(!1),g=Ll.bind(null,Te,!1,s.queue),s=Lt(),d={state:t,dispatch:null,action:e,pending:null},s.queue=d,i=C_.bind(null,Te,d,g,i),d.dispatch=i,s.memoizedState=e,[t,i,!1]}function Ch(e){var t=at();return yh(t,Xe,e)}function yh(e,t,i){if(t=gl(e,t,mh)[0],e=An(mi)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Er(t)}catch(M){throw M===zs?mn:M}else s=t;t=at();var d=t.queue,g=d.dispatch;return i!==t.memoizedState&&(Te.flags|=2048,js(9,{destroy:void 0},y_.bind(null,d,i),null)),[s,g,e]}function y_(e,t){e.action=t}function bh(e){var t=at(),i=Xe;if(i!==null)return yh(t,i,e);at(),t=t.memoizedState,i=at();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function js(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Te.updateQueue,t===null&&(t=En(),Te.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function wh(){return at().memoizedState}function Rn(e,t,i,s){var d=Lt();Te.flags|=e,d.memoizedState=js(1|t,{destroy:void 0},i,s===void 0?null:s)}function Dn(e,t,i,s){var d=at();s=s===void 0?null:s;var g=d.memoizedState.inst;Xe!==null&&s!==null&&hl(s,Xe.memoizedState.deps)?d.memoizedState=js(t,g,i,s):(Te.flags|=e,d.memoizedState=js(1|t,g,i,s))}function xh(e,t){Rn(8390656,8,e,t)}function Cl(e,t){Dn(2048,8,e,t)}function b_(e){Te.flags|=4;var t=Te.updateQueue;if(t===null)t=En(),Te.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Lh(e){var t=at().memoizedState;return b_({ref:t,nextImpl:e}),function(){if(($e&2)!==0)throw Error(j(440));return t.impl.apply(void 0,arguments)}}function Eh(e,t){return Dn(4,2,e,t)}function Mh(e,t){return Dn(4,4,e,t)}function Ah(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 Rh(e,t,i){i=i!=null?i.concat([e]):null,Dn(4,4,Ah.bind(null,t,e),i)}function yl(){}function Dh(e,t){var i=at();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&hl(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Th(e,t){var i=at();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&hl(t,s[1]))return s[0];if(s=e(),us){vt(!0);try{e()}finally{vt(!1)}}return i.memoizedState=[s,t],s}function bl(e,t,i){return i===void 0||(pi&1073741824)!==0&&(Ne&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Bu(),Te.lanes|=e,ji|=e,i)}function Bh(e,t,i,s){return kt(i,t)?i:Us.current!==null?(e=bl(e,i,s),kt(e,t)||(ct=!0),e):(pi&42)===0||(pi&1073741824)!==0&&(Ne&261930)===0?(ct=!0,e.memoizedState=i):(e=Bu(),Te.lanes|=e,ji|=e,t)}function Oh(e,t,i,s,d){var g=I.p;I.p=g!==0&&8>g?g:8;var M=N.T,k={};N.T=k,Ll(e,!1,t,i);try{var W=d(),te=N.S;if(te!==null&&te(k,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var le=p_(W,s);Mr(e,t,le,Pt(e))}else Mr(e,t,s,Pt(e))}catch(he){Mr(e,t,{then:function(){},status:"rejected",reason:he},Pt())}finally{I.p=g,M!==null&&k.types!==null&&(M.types=k.types),N.T=M}}function w_(){}function wl(e,t,i,s){if(e.tag!==5)throw Error(j(476));var d=kh(e).queue;Oh(e,d,t,P,i===null?w_:function(){return Hh(e),i(s)})}function kh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mi,lastRenderedState:P},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mi,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Hh(e){var t=kh(e);t.next===null&&(t=e.alternate.memoizedState),Mr(e,t.next.queue,{},Pt())}function xl(){return Ct(qr)}function zh(){return at().memoizedState}function Nh(){return at().memoizedState}function x_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Pt();e=Hi(i);var s=zi(t,e,i);s!==null&&(Bt(s,t,i),br(s,t,i)),t={cache:Ja()},e.payload=t;return}t=t.return}}function L_(e,t,i){var s=Pt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Tn(e)?Ih(t,i):(i=Fa(e,t,i,s),i!==null&&(Bt(i,e,s),Ph(i,t,s)))}function Uh(e,t,i){var s=Pt();Mr(e,t,i,s)}function Mr(e,t,i,s){var d={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Tn(e))Ih(t,d);else{var g=e.alternate;if(e.lanes===0&&(g===null||g.lanes===0)&&(g=t.lastRenderedReducer,g!==null))try{var M=t.lastRenderedState,k=g(M,i);if(d.hasEagerState=!0,d.eagerState=k,kt(k,M))return un(e,t,d,0),Ke===null&&hn(),!1}catch{}finally{}if(i=Fa(e,t,d,s),i!==null)return Bt(i,e,s),Ph(i,t,s),!0}return!1}function Ll(e,t,i,s){if(s={lane:2,revertLane:so(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Tn(e)){if(t)throw Error(j(479))}else t=Fa(e,i,s,2),t!==null&&Bt(t,e,2)}function Tn(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function Ih(e,t){Is=xn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Ph(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Wo(e,i)}}var Ar={readContext:Ct,use:Mn,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st};Ar.useEffectEvent=st;var jh={readContext:Ct,use:Mn,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:Ct,useEffect:xh,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Rn(4194308,4,Ah.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Rn(4194308,4,e,t)},useInsertionEffect:function(e,t){Rn(4,2,e,t)},useMemo:function(e,t){var i=Lt();t=t===void 0?null:t;var s=e();if(us){vt(!0);try{e()}finally{vt(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=Lt();if(i!==void 0){var d=i(t);if(us){vt(!0);try{i(t)}finally{vt(!1)}}}else d=t;return s.memoizedState=s.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},s.queue=e,e=e.dispatch=L_.bind(null,Te,e),[s.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:function(e){e=ml(e);var t=e.queue,i=Uh.bind(null,Te,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:yl,useDeferredValue:function(e,t){var i=Lt();return bl(i,e,t)},useTransition:function(){var e=ml(!1);return e=Oh.bind(null,Te,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Te,d=Lt();if(Pe){if(i===void 0)throw Error(j(407));i=i()}else{if(i=t(),Ke===null)throw Error(j(349));(Ne&127)!==0||oh(s,t,i)}d.memoizedState=i;var g={value:i,getSnapshot:t};return d.queue=g,xh(hh.bind(null,s,g,e),[e]),s.flags|=2048,js(9,{destroy:void 0},ch.bind(null,s,g,i,t),null),i},useId:function(){var e=Lt(),t=Ke.identifierPrefix;if(Pe){var i=ai,s=ni;i=(s&~(1<<32-ut(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Ln++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=m_++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:xl,useFormState:Sh,useActionState:Sh,useOptimistic:function(e){var t=Lt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Ll.bind(null,Te,!0,i),i.dispatch=t,[e,t]},useMemoCache:vl,useCacheRefresh:function(){return Lt().memoizedState=x_.bind(null,Te)},useEffectEvent:function(e){var t=Lt(),i={impl:e};return t.memoizedState=i,function(){if(($e&2)!==0)throw Error(j(440));return i.impl.apply(void 0,arguments)}}},El={readContext:Ct,use:Mn,useCallback:Dh,useContext:Ct,useEffect:Cl,useImperativeHandle:Rh,useInsertionEffect:Eh,useLayoutEffect:Mh,useMemo:Th,useReducer:An,useRef:wh,useState:function(){return An(mi)},useDebugValue:yl,useDeferredValue:function(e,t){var i=at();return Bh(i,Xe.memoizedState,e,t)},useTransition:function(){var e=An(mi)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Er(e),t]},useSyncExternalStore:lh,useId:zh,useHostTransitionStatus:xl,useFormState:Ch,useActionState:Ch,useOptimistic:function(e,t){var i=at();return fh(i,Xe,e,t)},useMemoCache:vl,useCacheRefresh:Nh};El.useEffectEvent=Lh;var Fh={readContext:Ct,use:Mn,useCallback:Dh,useContext:Ct,useEffect:Cl,useImperativeHandle:Rh,useInsertionEffect:Eh,useLayoutEffect:Mh,useMemo:Th,useReducer:pl,useRef:wh,useState:function(){return pl(mi)},useDebugValue:yl,useDeferredValue:function(e,t){var i=at();return Xe===null?bl(i,e,t):Bh(i,Xe.memoizedState,e,t)},useTransition:function(){var e=pl(mi)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Er(e),t]},useSyncExternalStore:lh,useId:zh,useHostTransitionStatus:xl,useFormState:bh,useActionState:bh,useOptimistic:function(e,t){var i=at();return Xe!==null?fh(i,Xe,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:vl,useCacheRefresh:Nh};Fh.useEffectEvent=Lh;function Ml(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:a({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Al={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Pt(),d=Hi(s);d.payload=t,i!=null&&(d.callback=i),t=zi(e,d,s),t!==null&&(Bt(t,e,s),br(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Pt(),d=Hi(s);d.tag=1,d.payload=t,i!=null&&(d.callback=i),t=zi(e,d,s),t!==null&&(Bt(t,e,s),br(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Pt(),s=Hi(i);s.tag=2,t!=null&&(s.callback=t),t=zi(e,s,i),t!==null&&(Bt(t,e,i),br(t,e,i))}};function $h(e,t,i,s,d,g,M){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,g,M):t.prototype&&t.prototype.isPureReactComponent?!_r(i,s)||!_r(d,g):!0}function qh(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&Al.enqueueReplaceState(t,t.state,null)}function ds(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=a({},i));for(var d in e)i[d]===void 0&&(i[d]=e[d])}return i}function Wh(e){cn(e)}function Gh(e){console.error(e)}function Xh(e){cn(e)}function Bn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Vh(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Rl(e,t,i){return i=Hi(i),i.tag=3,i.payload={element:null},i.callback=function(){Bn(e,t)},i}function Yh(e){return e=Hi(e),e.tag=3,e}function Kh(e,t,i,s){var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var g=s.value;e.payload=function(){return d(g)},e.callback=function(){Vh(t,i,s)}}var M=i.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(e.callback=function(){Vh(t,i,s),typeof d!="function"&&(Fi===null?Fi=new Set([this]):Fi.add(this));var k=s.stack;this.componentDidCatch(s.value,{componentStack:k!==null?k:""})})}function E_(e,t,i,s,d){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Os(t,i,d,!0),i=zt.current,i!==null){switch(i.tag){case 31:case 13:return Yt===null?qn():i.alternate===null&&rt===0&&(rt=3),i.flags&=-257,i.flags|=65536,i.lanes=d,s===Sn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),eo(e,s,d)),!1;case 22:return i.flags|=65536,s===Sn?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),eo(e,s,d)),!1}throw Error(j(435,i.tag))}return eo(e,s,d),qn(),!1}if(Pe)return t=zt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=d,s!==Va&&(e=Error(j(422),{cause:s}),pr(Wt(e,i)))):(s!==Va&&(t=Error(j(423),{cause:s}),pr(Wt(t,i))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,s=Wt(s,i),d=Rl(e.stateNode,s,d),nl(e,d),rt!==4&&(rt=2)),!1;var g=Error(j(520),{cause:s});if(g=Wt(g,i),zr===null?zr=[g]:zr.push(g),rt!==4&&(rt=2),t===null)return!0;s=Wt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=d&-d,i.lanes|=e,e=Rl(i.stateNode,s,e),nl(i,e),!1;case 1:if(t=i.type,g=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Fi===null||!Fi.has(g))))return i.flags|=65536,d&=-d,i.lanes|=d,d=Yh(d),Kh(d,e,i,s),nl(i,d),!1}i=i.return}while(i!==null);return!1}var Dl=Error(j(461)),ct=!1;function yt(e,t,i,s){t.child=e===null?eh(t,null,i,s):hs(t,e.child,i,s)}function Qh(e,t,i,s,d){i=i.render;var g=t.ref;if("ref"in s){var M={};for(var k in s)k!=="ref"&&(M[k]=s[k])}else M=s;return as(t),s=ul(e,t,i,M,g,d),k=dl(),e!==null&&!ct?(fl(e,t,d),Si(e,t,d)):(Pe&&k&&Ga(t),t.flags|=1,yt(e,t,s,d),t.child)}function Zh(e,t,i,s,d){if(e===null){var g=i.type;return typeof g=="function"&&!$a(g)&&g.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=g,Jh(e,t,g,s,d)):(e=fn(i.type,null,s,t,t.mode,d),e.ref=t.ref,e.return=t,t.child=e)}if(g=e.child,!Ul(e,d)){var M=g.memoizedProps;if(i=i.compare,i=i!==null?i:_r,i(M,s)&&e.ref===t.ref)return Si(e,t,d)}return t.flags|=1,e=fi(g,s),e.ref=t.ref,e.return=t,t.child=e}function Jh(e,t,i,s,d){if(e!==null){var g=e.memoizedProps;if(_r(g,s)&&e.ref===t.ref)if(ct=!1,t.pendingProps=s=g,Ul(e,d))(e.flags&131072)!==0&&(ct=!0);else return t.lanes=e.lanes,Si(e,t,d)}return Tl(e,t,i,s,d)}function eu(e,t,i,s){var d=s.children,g=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(g=g!==null?g.baseLanes|i:i,e!==null){for(s=t.child=e.child,d=0;s!==null;)d=d|s.lanes|s.childLanes,s=s.sibling;s=d&~g}else s=0,t.child=null;return tu(e,t,g,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&pn(t,g!==null?g.cachePool:null),g!==null?sh(t,g):ll(),rh(t);else return s=t.lanes=536870912,tu(e,t,g!==null?g.baseLanes|i:i,i,s)}else g!==null?(pn(t,g.cachePool),sh(t,g),Ui(),t.memoizedState=null):(e!==null&&pn(t,null),ll(),Ui());return yt(e,t,d,i),t.child}function Rr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function tu(e,t,i,s,d){var g=tl();return g=g===null?null:{parent:lt._currentValue,pool:g},t.memoizedState={baseLanes:i,cachePool:g},e!==null&&pn(t,null),ll(),rh(t),e!==null&&Os(e,t,s,!0),t.childLanes=d,null}function On(e,t){return t=Hn({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function iu(e,t,i){return hs(t,e.child,null,i),e=On(t,t.pendingProps),e.flags|=2,Nt(t),t.memoizedState=null,e}function M_(e,t,i){var s=t.pendingProps,d=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Pe){if(s.mode==="hidden")return e=On(t,s),t.lanes=536870912,Rr(null,e);if(cl(t),(e=Ze)?(e=_d(e,Vt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Di!==null?{id:ni,overflow:ai}:null,retryLane:536870912,hydrationErrors:null},i=Ic(e),i.return=t,t.child=i,St=t,Ze=null)):e=null,e===null)throw Bi(t);return t.lanes=536870912,null}return On(t,s)}var g=e.memoizedState;if(g!==null){var M=g.dehydrated;if(cl(t),d)if(t.flags&256)t.flags&=-257,t=iu(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(j(558));else if(ct||Os(e,t,i,!1),d=(i&e.childLanes)!==0,ct||d){if(s=Ke,s!==null&&(M=Go(s,i),M!==0&&M!==g.retryLane))throw g.retryLane=M,is(e,M),Bt(s,e,M),Dl;qn(),t=iu(e,t,i)}else e=g.treeContext,Ze=Kt(M.nextSibling),St=t,Pe=!0,Ti=null,Vt=!1,e!==null&&Fc(t,e),t=On(t,s),t.flags|=4096;return t}return e=fi(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function kn(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(j(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Tl(e,t,i,s,d){return as(t),i=ul(e,t,i,s,void 0,d),s=dl(),e!==null&&!ct?(fl(e,t,d),Si(e,t,d)):(Pe&&s&&Ga(t),t.flags|=1,yt(e,t,i,d),t.child)}function su(e,t,i,s,d,g){return as(t),t.updateQueue=null,i=ah(t,s,i,d),nh(e),s=dl(),e!==null&&!ct?(fl(e,t,g),Si(e,t,g)):(Pe&&s&&Ga(t),t.flags|=1,yt(e,t,i,g),t.child)}function ru(e,t,i,s,d){if(as(t),t.stateNode===null){var g=Rs,M=i.contextType;typeof M=="object"&&M!==null&&(g=Ct(M)),g=new i(s,g),t.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Al,t.stateNode=g,g._reactInternals=t,g=t.stateNode,g.props=s,g.state=t.memoizedState,g.refs={},sl(t),M=i.contextType,g.context=typeof M=="object"&&M!==null?Ct(M):Rs,g.state=t.memoizedState,M=i.getDerivedStateFromProps,typeof M=="function"&&(Ml(t,i,M,s),g.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(M=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),M!==g.state&&Al.enqueueReplaceState(g,g.state,null),xr(t,s,g,d),wr(),g.state=t.memoizedState),typeof g.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){g=t.stateNode;var k=t.memoizedProps,W=ds(i,k);g.props=W;var te=g.context,le=i.contextType;M=Rs,typeof le=="object"&&le!==null&&(M=Ct(le));var he=i.getDerivedStateFromProps;le=typeof he=="function"||typeof g.getSnapshotBeforeUpdate=="function",k=t.pendingProps!==k,le||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(k||te!==M)&&qh(t,g,s,M),ki=!1;var re=t.memoizedState;g.state=re,xr(t,s,g,d),wr(),te=t.memoizedState,k||re!==te||ki?(typeof he=="function"&&(Ml(t,i,he,s),te=t.memoizedState),(W=ki||$h(t,i,W,s,re,te,M))?(le||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(t.flags|=4194308)):(typeof g.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=te),g.props=s,g.state=te,g.context=M,s=W):(typeof g.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{g=t.stateNode,rl(e,t),M=t.memoizedProps,le=ds(i,M),g.props=le,he=t.pendingProps,re=g.context,te=i.contextType,W=Rs,typeof te=="object"&&te!==null&&(W=Ct(te)),k=i.getDerivedStateFromProps,(te=typeof k=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(M!==he||re!==W)&&qh(t,g,s,W),ki=!1,re=t.memoizedState,g.state=re,xr(t,s,g,d),wr();var ae=t.memoizedState;M!==he||re!==ae||ki||e!==null&&e.dependencies!==null&&vn(e.dependencies)?(typeof k=="function"&&(Ml(t,i,k,s),ae=t.memoizedState),(le=ki||$h(t,i,le,s,re,ae,W)||e!==null&&e.dependencies!==null&&vn(e.dependencies))?(te||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(s,ae,W),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(s,ae,W)),typeof g.componentDidUpdate=="function"&&(t.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof g.componentDidUpdate!="function"||M===e.memoizedProps&&re===e.memoizedState||(t.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||M===e.memoizedProps&&re===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=ae),g.props=s,g.state=ae,g.context=W,s=le):(typeof g.componentDidUpdate!="function"||M===e.memoizedProps&&re===e.memoizedState||(t.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||M===e.memoizedProps&&re===e.memoizedState||(t.flags|=1024),s=!1)}return g=s,kn(e,t),s=(t.flags&128)!==0,g||s?(g=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:g.render(),t.flags|=1,e!==null&&s?(t.child=hs(t,e.child,null,d),t.child=hs(t,null,i,d)):yt(e,t,i,d),t.memoizedState=g.state,e=t.child):e=Si(e,t,d),e}function nu(e,t,i,s){return rs(),t.flags|=256,yt(e,t,i,s),t.child}var Bl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ol(e){return{baseLanes:e,cachePool:Vc()}}function kl(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=It),e}function au(e,t,i){var s=t.pendingProps,d=!1,g=(t.flags&128)!==0,M;if((M=g)||(M=e!==null&&e.memoizedState===null?!1:(nt.current&2)!==0),M&&(d=!0,t.flags&=-129),M=(t.flags&32)!==0,t.flags&=-33,e===null){if(Pe){if(d?Ni(t):Ui(),(e=Ze)?(e=_d(e,Vt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Di!==null?{id:ni,overflow:ai}:null,retryLane:536870912,hydrationErrors:null},i=Ic(e),i.return=t,t.child=i,St=t,Ze=null)):e=null,e===null)throw Bi(t);return po(e)?t.lanes=32:t.lanes=536870912,null}var k=s.children;return s=s.fallback,d?(Ui(),d=t.mode,k=Hn({mode:"hidden",children:k},d),s=ss(s,d,i,null),k.return=t,s.return=t,k.sibling=s,t.child=k,s=t.child,s.memoizedState=Ol(i),s.childLanes=kl(e,M,i),t.memoizedState=Bl,Rr(null,s)):(Ni(t),Hl(t,k))}var W=e.memoizedState;if(W!==null&&(k=W.dehydrated,k!==null)){if(g)t.flags&256?(Ni(t),t.flags&=-257,t=zl(e,t,i)):t.memoizedState!==null?(Ui(),t.child=e.child,t.flags|=128,t=null):(Ui(),k=s.fallback,d=t.mode,s=Hn({mode:"visible",children:s.children},d),k=ss(k,d,i,null),k.flags|=2,s.return=t,k.return=t,s.sibling=k,t.child=s,hs(t,e.child,null,i),s=t.child,s.memoizedState=Ol(i),s.childLanes=kl(e,M,i),t.memoizedState=Bl,t=Rr(null,s));else if(Ni(t),po(k)){if(M=k.nextSibling&&k.nextSibling.dataset,M)var te=M.dgst;M=te,s=Error(j(419)),s.stack="",s.digest=M,pr({value:s,source:null,stack:null}),t=zl(e,t,i)}else if(ct||Os(e,t,i,!1),M=(i&e.childLanes)!==0,ct||M){if(M=Ke,M!==null&&(s=Go(M,i),s!==0&&s!==W.retryLane))throw W.retryLane=s,is(e,s),Bt(M,e,s),Dl;go(k)||qn(),t=zl(e,t,i)}else go(k)?(t.flags|=192,t.child=e.child,t=null):(e=W.treeContext,Ze=Kt(k.nextSibling),St=t,Pe=!0,Ti=null,Vt=!1,e!==null&&Fc(t,e),t=Hl(t,s.children),t.flags|=4096);return t}return d?(Ui(),k=s.fallback,d=t.mode,W=e.child,te=W.sibling,s=fi(W,{mode:"hidden",children:s.children}),s.subtreeFlags=W.subtreeFlags&65011712,te!==null?k=fi(te,k):(k=ss(k,d,i,null),k.flags|=2),k.return=t,s.return=t,s.sibling=k,t.child=s,Rr(null,s),s=t.child,k=e.child.memoizedState,k===null?k=Ol(i):(d=k.cachePool,d!==null?(W=lt._currentValue,d=d.parent!==W?{parent:W,pool:W}:d):d=Vc(),k={baseLanes:k.baseLanes|i,cachePool:d}),s.memoizedState=k,s.childLanes=kl(e,M,i),t.memoizedState=Bl,Rr(e.child,s)):(Ni(t),i=e.child,e=i.sibling,i=fi(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(M=t.deletions,M===null?(t.deletions=[e],t.flags|=16):M.push(e)),t.child=i,t.memoizedState=null,i)}function Hl(e,t){return t=Hn({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Hn(e,t){return e=Ht(22,e,null,t),e.lanes=0,e}function zl(e,t,i){return hs(t,e.child,null,i),e=Hl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function lu(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Qa(e.return,t,i)}function Nl(e,t,i,s,d,g){var M=e.memoizedState;M===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:d,treeForkCount:g}:(M.isBackwards=t,M.rendering=null,M.renderingStartTime=0,M.last=s,M.tail=i,M.tailMode=d,M.treeForkCount=g)}function ou(e,t,i){var s=t.pendingProps,d=s.revealOrder,g=s.tail;s=s.children;var M=nt.current,k=(M&2)!==0;if(k?(M=M&1|2,t.flags|=128):M&=1,V(nt,M),yt(e,t,s,i),s=Pe?gr:0,!k&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&lu(e,i,t);else if(e.tag===19)lu(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(d){case"forwards":for(i=t.child,d=null;i!==null;)e=i.alternate,e!==null&&wn(e)===null&&(d=i),i=i.sibling;i=d,i===null?(d=t.child,t.child=null):(d=i.sibling,i.sibling=null),Nl(t,!1,d,i,g,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,d=t.child,t.child=null;d!==null;){if(e=d.alternate,e!==null&&wn(e)===null){t.child=d;break}e=d.sibling,d.sibling=i,i=d,d=e}Nl(t,!0,i,null,g,s);break;case"together":Nl(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Si(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),ji|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Os(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(j(153));if(t.child!==null){for(e=t.child,i=fi(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=fi(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Ul(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&vn(e)))}function A_(e,t,i){switch(t.tag){case 3:z(t,t.stateNode.containerInfo),Oi(t,lt,e.memoizedState.cache),rs();break;case 27:case 5:ie(t);break;case 4:z(t,t.stateNode.containerInfo);break;case 10:Oi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,cl(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Ni(t),t.flags|=128,null):(i&t.child.childLanes)!==0?au(e,t,i):(Ni(t),e=Si(e,t,i),e!==null?e.sibling:null);Ni(t);break;case 19:var d=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Os(e,t,i,!1),s=(i&t.childLanes)!==0),d){if(s)return ou(e,t,i);t.flags|=128}if(d=t.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),V(nt,nt.current),s)break;return null;case 22:return t.lanes=0,eu(e,t,i,t.pendingProps);case 24:Oi(t,lt,e.memoizedState.cache)}return Si(e,t,i)}function cu(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)ct=!0;else{if(!Ul(e,i)&&(t.flags&128)===0)return ct=!1,A_(e,t,i);ct=(e.flags&131072)!==0}else ct=!1,Pe&&(t.flags&1048576)!==0&&jc(t,gr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=os(t.elementType),t.type=e,typeof e=="function")$a(e)?(s=ds(e,s),t.tag=1,t=ru(null,t,e,s,i)):(t.tag=0,t=Tl(null,t,e,s,i));else{if(e!=null){var d=e.$$typeof;if(d===S){t.tag=11,t=Qh(null,t,e,s,i);break e}else if(d===y){t.tag=14,t=Zh(null,t,e,s,i);break e}}throw t=O(e)||e,Error(j(306,t,""))}}return t;case 0:return Tl(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,d=ds(s,t.pendingProps),ru(e,t,s,d,i);case 3:e:{if(z(t,t.stateNode.containerInfo),e===null)throw Error(j(387));s=t.pendingProps;var g=t.memoizedState;d=g.element,rl(e,t),xr(t,s,null,i);var M=t.memoizedState;if(s=M.cache,Oi(t,lt,s),s!==g.cache&&Za(t,[lt],i,!0),wr(),s=M.element,g.isDehydrated)if(g={element:s,isDehydrated:!1,cache:M.cache},t.updateQueue.baseState=g,t.memoizedState=g,t.flags&256){t=nu(e,t,s,i);break e}else if(s!==d){d=Wt(Error(j(424)),t),pr(d),t=nu(e,t,s,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(Ze=Kt(e.firstChild),St=t,Pe=!0,Ti=null,Vt=!0,i=eh(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(rs(),s===d){t=Si(e,t,i);break e}yt(e,t,s,i)}t=t.child}return t;case 26:return kn(e,t),e===null?(i=Cd(t.type,null,t.pendingProps,null))?t.memoizedState=i:Pe||(i=t.type,e=t.pendingProps,s=Qn(de.current).createElement(i),s[mt]=t,s[Et]=e,bt(s,i,e),gt(s),t.stateNode=s):t.memoizedState=Cd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ie(t),e===null&&Pe&&(s=t.stateNode=pd(t.type,t.pendingProps,de.current),St=t,Vt=!0,d=Ze,Gi(t.type)?(mo=d,Ze=Kt(s.firstChild)):Ze=d),yt(e,t,t.pendingProps.children,i),kn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Pe&&((d=s=Ze)&&(s=rv(s,t.type,t.pendingProps,Vt),s!==null?(t.stateNode=s,St=t,Ze=Kt(s.firstChild),Vt=!1,d=!0):d=!1),d||Bi(t)),ie(t),d=t.type,g=t.pendingProps,M=e!==null?e.memoizedProps:null,s=g.children,fo(d,g)?s=null:M!==null&&fo(d,M)&&(t.flags|=32),t.memoizedState!==null&&(d=ul(e,t,S_,null,null,i),qr._currentValue=d),kn(e,t),yt(e,t,s,i),t.child;case 6:return e===null&&Pe&&((e=i=Ze)&&(i=nv(i,t.pendingProps,Vt),i!==null?(t.stateNode=i,St=t,Ze=null,e=!0):e=!1),e||Bi(t)),null;case 13:return au(e,t,i);case 4:return z(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=hs(t,null,s,i):yt(e,t,s,i),t.child;case 11:return Qh(e,t,t.type,t.pendingProps,i);case 7:return yt(e,t,t.pendingProps,i),t.child;case 8:return yt(e,t,t.pendingProps.children,i),t.child;case 12:return yt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Oi(t,t.type,s.value),yt(e,t,s.children,i),t.child;case 9:return d=t.type._context,s=t.pendingProps.children,as(t),d=Ct(d),s=s(d),t.flags|=1,yt(e,t,s,i),t.child;case 14:return Zh(e,t,t.type,t.pendingProps,i);case 15:return Jh(e,t,t.type,t.pendingProps,i);case 19:return ou(e,t,i);case 31:return M_(e,t,i);case 22:return eu(e,t,i,t.pendingProps);case 24:return as(t),s=Ct(lt),e===null?(d=tl(),d===null&&(d=Ke,g=Ja(),d.pooledCache=g,g.refCount++,g!==null&&(d.pooledCacheLanes|=i),d=g),t.memoizedState={parent:s,cache:d},sl(t),Oi(t,lt,d)):((e.lanes&i)!==0&&(rl(e,t),xr(t,null,null,i),wr()),d=e.memoizedState,g=t.memoizedState,d.parent!==s?(d={parent:s,cache:s},t.memoizedState=d,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=d),Oi(t,lt,s)):(s=g.cache,Oi(t,lt,s),s!==d.cache&&Za(t,[lt],i,!0))),yt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(j(156,t.tag))}function Ci(e){e.flags|=4}function Il(e,t,i,s,d){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(zu())e.flags|=8192;else throw cs=Sn,il}else e.flags&=-16777217}function hu(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ld(t))if(zu())e.flags|=8192;else throw cs=Sn,il}function zn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?$o():536870912,e.lanes|=t,Ws|=t)}function Dr(e,t){if(!Pe)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 s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var d=e.child;d!==null;)i|=d.lanes|d.childLanes,s|=d.subtreeFlags&65011712,s|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)i|=d.lanes|d.childLanes,s|=d.subtreeFlags,s|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function R_(e,t,i){var s=t.pendingProps;switch(Xa(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(t),null;case 1:return Je(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),gi(lt),se(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Bs(t)?Ci(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ya())),Je(t),null;case 26:var d=t.type,g=t.memoizedState;return e===null?(Ci(t),g!==null?(Je(t),hu(t,g)):(Je(t),Il(t,d,null,s,i))):g?g!==e.memoizedState?(Ci(t),Je(t),hu(t,g)):(Je(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Ci(t),Je(t),Il(t,d,e,s,i)),null;case 27:if(ve(t),i=de.current,d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Ci(t);else{if(!s){if(t.stateNode===null)throw Error(j(166));return Je(t),null}e=Q.current,Bs(t)?$c(t):(e=pd(d,s,i),t.stateNode=e,Ci(t))}return Je(t),null;case 5:if(ve(t),d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Ci(t);else{if(!s){if(t.stateNode===null)throw Error(j(166));return Je(t),null}if(g=Q.current,Bs(t))$c(t);else{var M=Qn(de.current);switch(g){case 1:g=M.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:g=M.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":g=M.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":g=M.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":g=M.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof s.is=="string"?M.createElement("select",{is:s.is}):M.createElement("select"),s.multiple?g.multiple=!0:s.size&&(g.size=s.size);break;default:g=typeof s.is=="string"?M.createElement(d,{is:s.is}):M.createElement(d)}}g[mt]=t,g[Et]=s;e:for(M=t.child;M!==null;){if(M.tag===5||M.tag===6)g.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===t)break e;for(;M.sibling===null;){if(M.return===null||M.return===t)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}t.stateNode=g;e:switch(bt(g,d,s),d){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Ci(t)}}return Je(t),Il(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Ci(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(j(166));if(e=de.current,Bs(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,d=St,d!==null)switch(d.tag){case 27:case 5:s=d.memoizedProps}e[mt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||ad(e.nodeValue,i)),e||Bi(t,!0)}else e=Qn(e).createTextNode(s),e[mt]=t,t.stateNode=e}return Je(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Bs(t),i!==null){if(e===null){if(!s)throw Error(j(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(557));e[mt]=t}else rs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Je(t),e=!1}else i=Ya(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Nt(t),t):(Nt(t),null);if((t.flags&128)!==0)throw Error(j(558))}return Je(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=Bs(t),s!==null&&s.dehydrated!==null){if(e===null){if(!d)throw Error(j(318));if(d=t.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(j(317));d[mt]=t}else rs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Je(t),d=!1}else d=Ya(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return t.flags&256?(Nt(t),t):(Nt(t),null)}return Nt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,d=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(d=s.alternate.memoizedState.cachePool.pool),g=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(g=s.memoizedState.cachePool.pool),g!==d&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),zn(t,t.updateQueue),Je(t),null);case 4:return se(),e===null&&lo(t.stateNode.containerInfo),Je(t),null;case 10:return gi(t.type),Je(t),null;case 19:if(H(nt),s=t.memoizedState,s===null)return Je(t),null;if(d=(t.flags&128)!==0,g=s.rendering,g===null)if(d)Dr(s,!1);else{if(rt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(g=wn(e),g!==null){for(t.flags|=128,Dr(s,!1),e=g.updateQueue,t.updateQueue=e,zn(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Uc(i,e),i=i.sibling;return V(nt,nt.current&1|2),Pe&&_i(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&ge()>jn&&(t.flags|=128,d=!0,Dr(s,!1),t.lanes=4194304)}else{if(!d)if(e=wn(g),e!==null){if(t.flags|=128,d=!0,e=e.updateQueue,t.updateQueue=e,zn(t,e),Dr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!g.alternate&&!Pe)return Je(t),null}else 2*ge()-s.renderingStartTime>jn&&i!==536870912&&(t.flags|=128,d=!0,Dr(s,!1),t.lanes=4194304);s.isBackwards?(g.sibling=t.child,t.child=g):(e=s.last,e!==null?e.sibling=g:t.child=g,s.last=g)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ge(),e.sibling=null,i=nt.current,V(nt,d?i&1|2:i&1),Pe&&_i(t,s.treeForkCount),e):(Je(t),null);case 22:case 23:return Nt(t),ol(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),i=t.updateQueue,i!==null&&zn(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&H(ls),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),gi(lt),Je(t),null;case 25:return null;case 30:return null}throw Error(j(156,t.tag))}function D_(e,t){switch(Xa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return gi(lt),se(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ve(t),null;case 31:if(t.memoizedState!==null){if(Nt(t),t.alternate===null)throw Error(j(340));rs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Nt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));rs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(nt),null;case 4:return se(),null;case 10:return gi(t.type),null;case 22:case 23:return Nt(t),ol(),e!==null&&H(ls),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return gi(lt),null;case 25:return null;default:return null}}function uu(e,t){switch(Xa(t),t.tag){case 3:gi(lt),se();break;case 26:case 27:case 5:ve(t);break;case 4:se();break;case 31:t.memoizedState!==null&&Nt(t);break;case 13:Nt(t);break;case 19:H(nt);break;case 10:gi(t.type);break;case 22:case 23:Nt(t),ol(),e!==null&&H(ls);break;case 24:gi(lt)}}function Tr(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var d=s.next;i=d;do{if((i.tag&e)===e){s=void 0;var g=i.create,M=i.inst;s=g(),M.destroy=s}i=i.next}while(i!==d)}}catch(k){Ge(t,t.return,k)}}function Ii(e,t,i){try{var s=t.updateQueue,d=s!==null?s.lastEffect:null;if(d!==null){var g=d.next;s=g;do{if((s.tag&e)===e){var M=s.inst,k=M.destroy;if(k!==void 0){M.destroy=void 0,d=t;var W=i,te=k;try{te()}catch(le){Ge(d,W,le)}}}s=s.next}while(s!==g)}}catch(le){Ge(t,t.return,le)}}function du(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{ih(t,i)}catch(s){Ge(e,e.return,s)}}}function fu(e,t,i){i.props=ds(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Ge(e,t,s)}}function Br(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(d){Ge(e,t,d)}}function li(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(d){Ge(e,t,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(d){Ge(e,t,d)}else i.current=null}function _u(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(d){Ge(e,e.return,d)}}function Pl(e,t,i){try{var s=e.stateNode;Z_(s,e.type,i,t),s[Et]=t}catch(d){Ge(e,e.return,d)}}function vu(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Gi(e.type)||e.tag===4}function jl(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vu(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&&Gi(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 Fl(e,t,i){var s=e.tag;if(s===5||s===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=ui));else if(s!==4&&(s===27&&Gi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Fl(e,t,i),e=e.sibling;e!==null;)Fl(e,t,i),e=e.sibling}function Nn(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(s===27&&Gi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Nn(e,t,i),e=e.sibling;e!==null;)Nn(e,t,i),e=e.sibling}function gu(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,d=t.attributes;d.length;)t.removeAttributeNode(d[0]);bt(t,s,i),t[mt]=e,t[Et]=i}catch(g){Ge(e,e.return,g)}}var yi=!1,ht=!1,$l=!1,pu=typeof WeakSet=="function"?WeakSet:Set,pt=null;function T_(e,t){if(e=e.containerInfo,ho=ra,e=Rc(e),za(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var d=s.anchorOffset,g=s.focusNode;s=s.focusOffset;try{i.nodeType,g.nodeType}catch{i=null;break e}var M=0,k=-1,W=-1,te=0,le=0,he=e,re=null;t:for(;;){for(var ae;he!==i||d!==0&&he.nodeType!==3||(k=M+d),he!==g||s!==0&&he.nodeType!==3||(W=M+s),he.nodeType===3&&(M+=he.nodeValue.length),(ae=he.firstChild)!==null;)re=he,he=ae;for(;;){if(he===e)break t;if(re===i&&++te===d&&(k=M),re===g&&++le===s&&(W=M),(ae=he.nextSibling)!==null)break;he=re,re=he.parentNode}he=ae}i=k===-1||W===-1?null:{start:k,end:W}}else i=null}i=i||{start:0,end:0}}else i=null;for(uo={focusedElem:e,selectionRange:i},ra=!1,pt=t;pt!==null;)if(t=pt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pt=e;else for(;pt!==null;){switch(t=pt,g=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)d=e[i],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&g!==null){e=void 0,i=t,d=g.memoizedProps,g=g.memoizedState,s=i.stateNode;try{var Ce=ds(i.type,d);e=s.getSnapshotBeforeUpdate(Ce,g),s.__reactInternalSnapshotBeforeUpdate=e}catch(Ee){Ge(i,i.return,Ee)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)vo(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":vo(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(j(163))}if(e=t.sibling,e!==null){e.return=t.return,pt=e;break}pt=t.return}}function mu(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:wi(e,i),s&4&&Tr(5,i);break;case 1:if(wi(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(M){Ge(i,i.return,M)}else{var d=ds(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(d,t,e.__reactInternalSnapshotBeforeUpdate)}catch(M){Ge(i,i.return,M)}}s&64&&du(i),s&512&&Br(i,i.return);break;case 3:if(wi(e,i),s&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{ih(e,t)}catch(M){Ge(i,i.return,M)}}break;case 27:t===null&&s&4&&gu(i);case 26:case 5:wi(e,i),t===null&&s&4&&_u(i),s&512&&Br(i,i.return);break;case 12:wi(e,i);break;case 31:wi(e,i),s&4&&yu(e,i);break;case 13:wi(e,i),s&4&&bu(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=P_.bind(null,i),av(e,i))));break;case 22:if(s=i.memoizedState!==null||yi,!s){t=t!==null&&t.memoizedState!==null||ht,d=yi;var g=ht;yi=s,(ht=t)&&!g?xi(e,i,(i.subtreeFlags&8772)!==0):wi(e,i),yi=d,ht=g}break;case 30:break;default:wi(e,i)}}function Su(e){var t=e.alternate;t!==null&&(e.alternate=null,Su(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Sa(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 et=null,At=!1;function bi(e,t,i){for(i=i.child;i!==null;)Cu(e,t,i),i=i.sibling}function Cu(e,t,i){if(tt&&typeof tt.onCommitFiberUnmount=="function")try{tt.onCommitFiberUnmount(xt,i)}catch{}switch(i.tag){case 26:ht||li(i,t),bi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ht||li(i,t);var s=et,d=At;Gi(i.type)&&(et=i.stateNode,At=!1),bi(e,t,i),jr(i.stateNode),et=s,At=d;break;case 5:ht||li(i,t);case 6:if(s=et,d=At,et=null,bi(e,t,i),et=s,At=d,et!==null)if(At)try{(et.nodeType===9?et.body:et.nodeName==="HTML"?et.ownerDocument.body:et).removeChild(i.stateNode)}catch(g){Ge(i,t,g)}else try{et.removeChild(i.stateNode)}catch(g){Ge(i,t,g)}break;case 18:et!==null&&(At?(e=et,dd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Js(e)):dd(et,i.stateNode));break;case 4:s=et,d=At,et=i.stateNode.containerInfo,At=!0,bi(e,t,i),et=s,At=d;break;case 0:case 11:case 14:case 15:Ii(2,i,t),ht||Ii(4,i,t),bi(e,t,i);break;case 1:ht||(li(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&fu(i,t,s)),bi(e,t,i);break;case 21:bi(e,t,i);break;case 22:ht=(s=ht)||i.memoizedState!==null,bi(e,t,i),ht=s;break;default:bi(e,t,i)}}function yu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Js(e)}catch(i){Ge(t,t.return,i)}}}function bu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Js(e)}catch(i){Ge(t,t.return,i)}}function B_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new pu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new pu),t;default:throw Error(j(435,e.tag))}}function Un(e,t){var i=B_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var d=j_.bind(null,e,s);s.then(d,d)}})}function Rt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var d=i[s],g=e,M=t,k=M;e:for(;k!==null;){switch(k.tag){case 27:if(Gi(k.type)){et=k.stateNode,At=!1;break e}break;case 5:et=k.stateNode,At=!1;break e;case 3:case 4:et=k.stateNode.containerInfo,At=!0;break e}k=k.return}if(et===null)throw Error(j(160));Cu(g,M,d),et=null,At=!1,g=d.alternate,g!==null&&(g.return=null),d.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wu(t,e),t=t.sibling}var ti=null;function wu(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Rt(t,e),Dt(e),s&4&&(Ii(3,e,e.return),Tr(3,e),Ii(5,e,e.return));break;case 1:Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),s&64&&yi&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var d=ti;if(Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),s&4){var g=i!==null?i.memoizedState:null;if(s=e.memoizedState,i===null)if(s===null)if(e.stateNode===null){e:{s=e.type,i=e.memoizedProps,d=d.ownerDocument||d;t:switch(s){case"title":g=d.getElementsByTagName("title")[0],(!g||g[nr]||g[mt]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=d.createElement(s),d.head.insertBefore(g,d.querySelector("head > title"))),bt(g,s,i),g[mt]=e,gt(g),s=g;break e;case"link":var M=wd("link","href",d).get(s+(i.href||""));if(M){for(var k=0;k<M.length;k++)if(g=M[k],g.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&g.getAttribute("rel")===(i.rel==null?null:i.rel)&&g.getAttribute("title")===(i.title==null?null:i.title)&&g.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){M.splice(k,1);break t}}g=d.createElement(s),bt(g,s,i),d.head.appendChild(g);break;case"meta":if(M=wd("meta","content",d).get(s+(i.content||""))){for(k=0;k<M.length;k++)if(g=M[k],g.getAttribute("content")===(i.content==null?null:""+i.content)&&g.getAttribute("name")===(i.name==null?null:i.name)&&g.getAttribute("property")===(i.property==null?null:i.property)&&g.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&g.getAttribute("charset")===(i.charSet==null?null:i.charSet)){M.splice(k,1);break t}}g=d.createElement(s),bt(g,s,i),d.head.appendChild(g);break;default:throw Error(j(468,s))}g[mt]=e,gt(g),s=g}e.stateNode=s}else xd(d,e.type,e.stateNode);else e.stateNode=bd(d,s,e.memoizedProps);else g!==s?(g===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):g.count--,s===null?xd(d,e.type,e.stateNode):bd(d,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Pl(e,e.memoizedProps,i.memoizedProps)}break;case 27:Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),i!==null&&s&4&&Pl(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),e.flags&32){d=e.stateNode;try{bs(d,"")}catch(Ce){Ge(e,e.return,Ce)}}s&4&&e.stateNode!=null&&(d=e.memoizedProps,Pl(e,d,i!==null?i.memoizedProps:d)),s&1024&&($l=!0);break;case 6:if(Rt(t,e),Dt(e),s&4){if(e.stateNode===null)throw Error(j(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(Ce){Ge(e,e.return,Ce)}}break;case 3:if(ea=null,d=ti,ti=Zn(t.containerInfo),Rt(t,e),ti=d,Dt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Js(t.containerInfo)}catch(Ce){Ge(e,e.return,Ce)}$l&&($l=!1,xu(e));break;case 4:s=ti,ti=Zn(e.stateNode.containerInfo),Rt(t,e),Dt(e),ti=s;break;case 12:Rt(t,e),Dt(e);break;case 31:Rt(t,e),Dt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Un(e,s)));break;case 13:Rt(t,e),Dt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Pn=ge()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Un(e,s)));break;case 22:d=e.memoizedState!==null;var W=i!==null&&i.memoizedState!==null,te=yi,le=ht;if(yi=te||d,ht=le||W,Rt(t,e),ht=le,yi=te,Dt(e),s&8192)e:for(t=e.stateNode,t._visibility=d?t._visibility&-2:t._visibility|1,d&&(i===null||W||yi||ht||fs(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){W=i=t;try{if(g=W.stateNode,d)M=g.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{k=W.stateNode;var he=W.memoizedProps.style,re=he!=null&&he.hasOwnProperty("display")?he.display:null;k.style.display=re==null||typeof re=="boolean"?"":(""+re).trim()}}catch(Ce){Ge(W,W.return,Ce)}}}else if(t.tag===6){if(i===null){W=t;try{W.stateNode.nodeValue=d?"":W.memoizedProps}catch(Ce){Ge(W,W.return,Ce)}}}else if(t.tag===18){if(i===null){W=t;try{var ae=W.stateNode;d?fd(ae,!0):fd(W.stateNode,!1)}catch(Ce){Ge(W,W.return,Ce)}}}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}s&4&&(s=e.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,Un(e,i))));break;case 19:Rt(t,e),Dt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Un(e,s)));break;case 30:break;case 21:break;default:Rt(t,e),Dt(e)}}function Dt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(vu(s)){i=s;break}s=s.return}if(i==null)throw Error(j(160));switch(i.tag){case 27:var d=i.stateNode,g=jl(e);Nn(e,g,d);break;case 5:var M=i.stateNode;i.flags&32&&(bs(M,""),i.flags&=-33);var k=jl(e);Nn(e,k,M);break;case 3:case 4:var W=i.stateNode.containerInfo,te=jl(e);Fl(e,te,W);break;default:throw Error(j(161))}}catch(le){Ge(e,e.return,le)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xu(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function wi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)mu(e,t.alternate,t),t=t.sibling}function fs(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ii(4,t,t.return),fs(t);break;case 1:li(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&fu(t,t.return,i),fs(t);break;case 27:jr(t.stateNode);case 26:case 5:li(t,t.return),fs(t);break;case 22:t.memoizedState===null&&fs(t);break;case 30:fs(t);break;default:fs(t)}e=e.sibling}}function xi(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,d=e,g=t,M=g.flags;switch(g.tag){case 0:case 11:case 15:xi(d,g,i),Tr(4,g);break;case 1:if(xi(d,g,i),s=g,d=s.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(te){Ge(s,s.return,te)}if(s=g,d=s.updateQueue,d!==null){var k=s.stateNode;try{var W=d.shared.hiddenCallbacks;if(W!==null)for(d.shared.hiddenCallbacks=null,d=0;d<W.length;d++)th(W[d],k)}catch(te){Ge(s,s.return,te)}}i&&M&64&&du(g),Br(g,g.return);break;case 27:gu(g);case 26:case 5:xi(d,g,i),i&&s===null&&M&4&&_u(g),Br(g,g.return);break;case 12:xi(d,g,i);break;case 31:xi(d,g,i),i&&M&4&&yu(d,g);break;case 13:xi(d,g,i),i&&M&4&&bu(d,g);break;case 22:g.memoizedState===null&&xi(d,g,i),Br(g,g.return);break;case 30:break;default:xi(d,g,i)}t=t.sibling}}function ql(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&&mr(i))}function Wl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&mr(e))}function ii(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Lu(e,t,i,s),t=t.sibling}function Lu(e,t,i,s){var d=t.flags;switch(t.tag){case 0:case 11:case 15:ii(e,t,i,s),d&2048&&Tr(9,t);break;case 1:ii(e,t,i,s);break;case 3:ii(e,t,i,s),d&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&mr(e)));break;case 12:if(d&2048){ii(e,t,i,s),e=t.stateNode;try{var g=t.memoizedProps,M=g.id,k=g.onPostCommit;typeof k=="function"&&k(M,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(W){Ge(t,t.return,W)}}else ii(e,t,i,s);break;case 31:ii(e,t,i,s);break;case 13:ii(e,t,i,s);break;case 23:break;case 22:g=t.stateNode,M=t.alternate,t.memoizedState!==null?g._visibility&2?ii(e,t,i,s):Or(e,t):g._visibility&2?ii(e,t,i,s):(g._visibility|=2,Fs(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),d&2048&&ql(M,t);break;case 24:ii(e,t,i,s),d&2048&&Wl(t.alternate,t);break;default:ii(e,t,i,s)}}function Fs(e,t,i,s,d){for(d=d&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var g=e,M=t,k=i,W=s,te=M.flags;switch(M.tag){case 0:case 11:case 15:Fs(g,M,k,W,d),Tr(8,M);break;case 23:break;case 22:var le=M.stateNode;M.memoizedState!==null?le._visibility&2?Fs(g,M,k,W,d):Or(g,M):(le._visibility|=2,Fs(g,M,k,W,d)),d&&te&2048&&ql(M.alternate,M);break;case 24:Fs(g,M,k,W,d),d&&te&2048&&Wl(M.alternate,M);break;default:Fs(g,M,k,W,d)}t=t.sibling}}function Or(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,d=s.flags;switch(s.tag){case 22:Or(i,s),d&2048&&ql(s.alternate,s);break;case 24:Or(i,s),d&2048&&Wl(s.alternate,s);break;default:Or(i,s)}t=t.sibling}}var kr=8192;function $s(e,t,i){if(e.subtreeFlags&kr)for(e=e.child;e!==null;)Eu(e,t,i),e=e.sibling}function Eu(e,t,i){switch(e.tag){case 26:$s(e,t,i),e.flags&kr&&e.memoizedState!==null&&mv(i,ti,e.memoizedState,e.memoizedProps);break;case 5:$s(e,t,i);break;case 3:case 4:var s=ti;ti=Zn(e.stateNode.containerInfo),$s(e,t,i),ti=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=kr,kr=16777216,$s(e,t,i),kr=s):$s(e,t,i));break;default:$s(e,t,i)}}function Mu(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 Hr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];pt=s,Ru(s,e)}Mu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Au(e),e=e.sibling}function Au(e){switch(e.tag){case 0:case 11:case 15:Hr(e),e.flags&2048&&Ii(9,e,e.return);break;case 3:Hr(e);break;case 12:Hr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,In(e)):Hr(e);break;default:Hr(e)}}function In(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];pt=s,Ru(s,e)}Mu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ii(8,t,t.return),In(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,In(t));break;default:In(t)}e=e.sibling}}function Ru(e,t){for(;pt!==null;){var i=pt;switch(i.tag){case 0:case 11:case 15:Ii(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:mr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,pt=s;else e:for(i=e;pt!==null;){s=pt;var d=s.sibling,g=s.return;if(Su(s),s===i){pt=null;break e}if(d!==null){d.return=g,pt=d;break e}pt=g}}}var O_={getCacheForType:function(e){var t=Ct(lt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Ct(lt).controller.signal}},k_=typeof WeakMap=="function"?WeakMap:Map,$e=0,Ke=null,ke=null,Ne=0,We=0,Ut=null,Pi=!1,qs=!1,Gl=!1,Li=0,rt=0,ji=0,_s=0,Xl=0,It=0,Ws=0,zr=null,Tt=null,Vl=!1,Pn=0,Du=0,jn=1/0,Fn=null,Fi=null,dt=0,$i=null,Gs=null,Ei=0,Yl=0,Kl=null,Tu=null,Nr=0,Ql=null;function Pt(){return($e&2)!==0&&Ne!==0?Ne&-Ne:N.T!==null?so():Xo()}function Bu(){if(It===0)if((Ne&536870912)===0||Pe){var e=si;si<<=1,(si&3932160)===0&&(si=262144),It=e}else It=536870912;return e=zt.current,e!==null&&(e.flags|=32),It}function Bt(e,t,i){(e===Ke&&(We===2||We===9)||e.cancelPendingCommit!==null)&&(Xs(e,0),qi(e,Ne,It,!1)),rr(e,i),(($e&2)===0||e!==Ke)&&(e===Ke&&(($e&2)===0&&(_s|=i),rt===4&&qi(e,Ne,It,!1)),oi(e))}function Ou(e,t,i){if(($e&6)!==0)throw Error(j(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||sr(e,t),d=s?N_(e,t):Jl(e,t,!0),g=s;do{if(d===0){qs&&!s&&qi(e,t,0,!1);break}else{if(i=e.current.alternate,g&&!H_(i)){d=Jl(e,t,!1),g=!1;continue}if(d===2){if(g=t,e.errorRecoveryDisabledLanes&g)var M=0;else M=e.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){t=M;e:{var k=e;d=zr;var W=k.current.memoizedState.isDehydrated;if(W&&(Xs(k,M).flags|=256),M=Jl(k,M,!1),M!==2){if(Gl&&!W){k.errorRecoveryDisabledLanes|=g,_s|=g,d=4;break e}g=Tt,Tt=d,g!==null&&(Tt===null?Tt=g:Tt.push.apply(Tt,g))}d=M}if(g=!1,d!==2)continue}}if(d===1){Xs(e,0),qi(e,t,0,!0);break}e:{switch(s=e,g=d,g){case 0:case 1:throw Error(j(345));case 4:if((t&4194048)!==t)break;case 6:qi(s,t,It,!Pi);break e;case 2:Tt=null;break;case 3:case 5:break;default:throw Error(j(329))}if((t&62914560)===t&&(d=Pn+300-ge(),10<d)){if(qi(s,t,It,!Pi),Qr(s,0,!0)!==0)break e;Ei=t,s.timeoutHandle=hd(ku.bind(null,s,i,Tt,Fn,Vl,t,It,_s,Ws,Pi,g,"Throttled",-0,0),d);break e}ku(s,i,Tt,Fn,Vl,t,It,_s,Ws,Pi,g,null,-0,0)}}break}while(!0);oi(e)}function ku(e,t,i,s,d,g,M,k,W,te,le,he,re,ae){if(e.timeoutHandle=-1,he=t.subtreeFlags,he&8192||(he&16785408)===16785408){he={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ui},Eu(t,g,he);var Ce=(g&62914560)===g?Pn-ge():(g&4194048)===g?Du-ge():0;if(Ce=Sv(he,Ce),Ce!==null){Ei=g,e.cancelPendingCommit=Ce(Fu.bind(null,e,t,g,i,s,d,M,k,W,le,he,null,re,ae)),qi(e,g,M,!te);return}}Fu(e,t,g,i,s,d,M,k,W)}function H_(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 s=0;s<i.length;s++){var d=i[s],g=d.getSnapshot;d=d.value;try{if(!kt(g(),d))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 qi(e,t,i,s){t&=~Xl,t&=~_s,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var d=t;0<d;){var g=31-ut(d),M=1<<g;s[g]=-1,d&=~M}i!==0&&qo(e,i,t)}function $n(){return($e&6)===0?(Ur(0),!1):!0}function Zl(){if(ke!==null){if(We===0)var e=ke.return;else e=ke,vi=ns=null,_l(e),Ns=null,Cr=0,e=ke;for(;e!==null;)uu(e.alternate,e),e=e.return;ke=null}}function Xs(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,tv(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Ei=0,Zl(),Ke=e,ke=i=fi(e.current,null),Ne=t,We=0,Ut=null,Pi=!1,qs=sr(e,t),Gl=!1,Ws=It=Xl=_s=ji=rt=0,Tt=zr=null,Vl=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var d=31-ut(s),g=1<<d;t|=e[d],s&=~g}return Li=t,hn(),i}function Hu(e,t){Te=null,N.H=Ar,t===zs||t===mn?(t=Qc(),We=3):t===il?(t=Qc(),We=4):We=t===Dl?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ut=t,ke===null&&(rt=1,Bn(e,Wt(t,e.current)))}function zu(){var e=zt.current;return e===null?!0:(Ne&4194048)===Ne?Yt===null:(Ne&62914560)===Ne||(Ne&536870912)!==0?e===Yt:!1}function Nu(){var e=N.H;return N.H=Ar,e===null?Ar:e}function Uu(){var e=N.A;return N.A=O_,e}function qn(){rt=4,Pi||(Ne&4194048)!==Ne&&zt.current!==null||(qs=!0),(ji&134217727)===0&&(_s&134217727)===0||Ke===null||qi(Ke,Ne,It,!1)}function Jl(e,t,i){var s=$e;$e|=2;var d=Nu(),g=Uu();(Ke!==e||Ne!==t)&&(Fn=null,Xs(e,t)),t=!1;var M=rt;e:do try{if(We!==0&&ke!==null){var k=ke,W=Ut;switch(We){case 8:Zl(),M=6;break e;case 3:case 2:case 9:case 6:zt.current===null&&(t=!0);var te=We;if(We=0,Ut=null,Vs(e,k,W,te),i&&qs){M=0;break e}break;default:te=We,We=0,Ut=null,Vs(e,k,W,te)}}z_(),M=rt;break}catch(le){Hu(e,le)}while(!0);return t&&e.shellSuspendCounter++,vi=ns=null,$e=s,N.H=d,N.A=g,ke===null&&(Ke=null,Ne=0,hn()),M}function z_(){for(;ke!==null;)Iu(ke)}function N_(e,t){var i=$e;$e|=2;var s=Nu(),d=Uu();Ke!==e||Ne!==t?(Fn=null,jn=ge()+500,Xs(e,t)):qs=sr(e,t);e:do try{if(We!==0&&ke!==null){t=ke;var g=Ut;t:switch(We){case 1:We=0,Ut=null,Vs(e,t,g,1);break;case 2:case 9:if(Yc(g)){We=0,Ut=null,Pu(t);break}t=function(){We!==2&&We!==9||Ke!==e||(We=7),oi(e)},g.then(t,t);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:Yc(g)?(We=0,Ut=null,Pu(t)):(We=0,Ut=null,Vs(e,t,g,7));break;case 5:var M=null;switch(ke.tag){case 26:M=ke.memoizedState;case 5:case 27:var k=ke;if(M?Ld(M):k.stateNode.complete){We=0,Ut=null;var W=k.sibling;if(W!==null)ke=W;else{var te=k.return;te!==null?(ke=te,Wn(te)):ke=null}break t}}We=0,Ut=null,Vs(e,t,g,5);break;case 6:We=0,Ut=null,Vs(e,t,g,6);break;case 8:Zl(),rt=6;break e;default:throw Error(j(462))}}U_();break}catch(le){Hu(e,le)}while(!0);return vi=ns=null,N.H=s,N.A=d,$e=i,ke!==null?0:(Ke=null,Ne=0,hn(),rt)}function U_(){for(;ke!==null&&!me();)Iu(ke)}function Iu(e){var t=cu(e.alternate,e,Li);e.memoizedProps=e.pendingProps,t===null?Wn(e):ke=t}function Pu(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=su(i,t,t.pendingProps,t.type,void 0,Ne);break;case 11:t=su(i,t,t.pendingProps,t.type.render,t.ref,Ne);break;case 5:_l(t);default:uu(i,t),t=ke=Uc(t,Li),t=cu(i,t,Li)}e.memoizedProps=e.pendingProps,t===null?Wn(e):ke=t}function Vs(e,t,i,s){vi=ns=null,_l(t),Ns=null,Cr=0;var d=t.return;try{if(E_(e,d,t,i,Ne)){rt=1,Bn(e,Wt(i,e.current)),ke=null;return}}catch(g){if(d!==null)throw ke=d,g;rt=1,Bn(e,Wt(i,e.current)),ke=null;return}t.flags&32768?(Pe||s===1?e=!0:qs||(Ne&536870912)!==0?e=!1:(Pi=e=!0,(s===2||s===9||s===3||s===6)&&(s=zt.current,s!==null&&s.tag===13&&(s.flags|=16384))),ju(t,e)):Wn(t)}function Wn(e){var t=e;do{if((t.flags&32768)!==0){ju(t,Pi);return}e=t.return;var i=R_(t.alternate,t,Li);if(i!==null){ke=i;return}if(t=t.sibling,t!==null){ke=t;return}ke=t=e}while(t!==null);rt===0&&(rt=5)}function ju(e,t){do{var i=D_(e.alternate,e);if(i!==null){i.flags&=32767,ke=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){ke=e;return}ke=e=i}while(e!==null);rt=6,ke=null}function Fu(e,t,i,s,d,g,M,k,W){e.cancelPendingCommit=null;do Gn();while(dt!==0);if(($e&6)!==0)throw Error(j(327));if(t!==null){if(t===e.current)throw Error(j(177));if(g=t.lanes|t.childLanes,g|=ja,pf(e,i,g,M,k,W),e===Ke&&(ke=Ke=null,Ne=0),Gs=t,$i=e,Ei=i,Yl=g,Kl=d,Tu=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,F_(Qe,function(){return Xu(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=N.T,N.T=null,d=I.p,I.p=2,M=$e,$e|=4;try{T_(e,t,i)}finally{$e=M,I.p=d,N.T=s}}dt=1,$u(),qu(),Wu()}}function $u(){if(dt===1){dt=0;var e=$i,t=Gs,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=N.T,N.T=null;var s=I.p;I.p=2;var d=$e;$e|=4;try{wu(t,e);var g=uo,M=Rc(e.containerInfo),k=g.focusedElem,W=g.selectionRange;if(M!==k&&k&&k.ownerDocument&&Ac(k.ownerDocument.documentElement,k)){if(W!==null&&za(k)){var te=W.start,le=W.end;if(le===void 0&&(le=te),"selectionStart"in k)k.selectionStart=te,k.selectionEnd=Math.min(le,k.value.length);else{var he=k.ownerDocument||document,re=he&&he.defaultView||window;if(re.getSelection){var ae=re.getSelection(),Ce=k.textContent.length,Ee=Math.min(W.start,Ce),Ye=W.end===void 0?Ee:Math.min(W.end,Ce);!ae.extend&&Ee>Ye&&(M=Ye,Ye=Ee,Ee=M);var J=Mc(k,Ee),Y=Mc(k,Ye);if(J&&Y&&(ae.rangeCount!==1||ae.anchorNode!==J.node||ae.anchorOffset!==J.offset||ae.focusNode!==Y.node||ae.focusOffset!==Y.offset)){var ee=he.createRange();ee.setStart(J.node,J.offset),ae.removeAllRanges(),Ee>Ye?(ae.addRange(ee),ae.extend(Y.node,Y.offset)):(ee.setEnd(Y.node,Y.offset),ae.addRange(ee))}}}}for(he=[],ae=k;ae=ae.parentNode;)ae.nodeType===1&&he.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<he.length;k++){var oe=he[k];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}ra=!!ho,uo=ho=null}finally{$e=d,I.p=s,N.T=i}}e.current=t,dt=2}}function qu(){if(dt===2){dt=0;var e=$i,t=Gs,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=N.T,N.T=null;var s=I.p;I.p=2;var d=$e;$e|=4;try{mu(e,t.alternate,t)}finally{$e=d,I.p=s,N.T=i}}dt=3}}function Wu(){if(dt===4||dt===3){dt=0,ce();var e=$i,t=Gs,i=Ei,s=Tu;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?dt=5:(dt=0,Gs=$i=null,Gu(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(Fi=null),pa(i),t=t.stateNode,tt&&typeof tt.onCommitFiberRoot=="function")try{tt.onCommitFiberRoot(xt,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=N.T,d=I.p,I.p=2,N.T=null;try{for(var g=e.onRecoverableError,M=0;M<s.length;M++){var k=s[M];g(k.value,{componentStack:k.stack})}}finally{N.T=t,I.p=d}}(Ei&3)!==0&&Gn(),oi(e),d=e.pendingLanes,(i&261930)!==0&&(d&42)!==0?e===Ql?Nr++:(Nr=0,Ql=e):Nr=0,Ur(0)}}function Gu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,mr(t)))}function Gn(){return $u(),qu(),Wu(),Xu()}function Xu(){if(dt!==5)return!1;var e=$i,t=Yl;Yl=0;var i=pa(Ei),s=N.T,d=I.p;try{I.p=32>i?32:i,N.T=null,i=Kl,Kl=null;var g=$i,M=Ei;if(dt=0,Gs=$i=null,Ei=0,($e&6)!==0)throw Error(j(331));var k=$e;if($e|=4,Au(g.current),Lu(g,g.current,M,i),$e=k,Ur(0,!1),tt&&typeof tt.onPostCommitFiberRoot=="function")try{tt.onPostCommitFiberRoot(xt,g)}catch{}return!0}finally{I.p=d,N.T=s,Gu(e,t)}}function Vu(e,t,i){t=Wt(i,t),t=Rl(e.stateNode,t,2),e=zi(e,t,2),e!==null&&(rr(e,2),oi(e))}function Ge(e,t,i){if(e.tag===3)Vu(e,e,i);else for(;t!==null;){if(t.tag===3){Vu(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Fi===null||!Fi.has(s))){e=Wt(i,e),i=Yh(2),s=zi(t,i,2),s!==null&&(Kh(i,s,t,e),rr(s,2),oi(s));break}}t=t.return}}function eo(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new k_;var d=new Set;s.set(t,d)}else d=s.get(t),d===void 0&&(d=new Set,s.set(t,d));d.has(i)||(Gl=!0,d.add(i),e=I_.bind(null,e,t,i),t.then(e,e))}function I_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ke===e&&(Ne&i)===i&&(rt===4||rt===3&&(Ne&62914560)===Ne&&300>ge()-Pn?($e&2)===0&&Xs(e,0):Xl|=i,Ws===Ne&&(Ws=0)),oi(e)}function Yu(e,t){t===0&&(t=$o()),e=is(e,t),e!==null&&(rr(e,t),oi(e))}function P_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Yu(e,i)}function j_(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,d=e.memoizedState;d!==null&&(i=d.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(j(314))}s!==null&&s.delete(t),Yu(e,i)}function F_(e,t){return Se(e,t)}var Xn=null,Ys=null,to=!1,Vn=!1,io=!1,Wi=0;function oi(e){e!==Ys&&e.next===null&&(Ys===null?Xn=Ys=e:Ys=Ys.next=e),Vn=!0,to||(to=!0,q_())}function Ur(e,t){if(!io&&Vn){io=!0;do for(var i=!1,s=Xn;s!==null;){if(e!==0){var d=s.pendingLanes;if(d===0)var g=0;else{var M=s.suspendedLanes,k=s.pingedLanes;g=(1<<31-ut(42|e)+1)-1,g&=d&~(M&~k),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(i=!0,Ju(s,g))}else g=Ne,g=Qr(s,s===Ke?g:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(g&3)===0||sr(s,g)||(i=!0,Ju(s,g));s=s.next}while(i);io=!1}}function $_(){Ku()}function Ku(){Vn=to=!1;var e=0;Wi!==0&&ev()&&(e=Wi);for(var t=ge(),i=null,s=Xn;s!==null;){var d=s.next,g=Qu(s,t);g===0?(s.next=null,i===null?Xn=d:i.next=d,d===null&&(Ys=i)):(i=s,(e!==0||(g&3)!==0)&&(Vn=!0)),s=d}dt!==0&&dt!==5||Ur(e),Wi!==0&&(Wi=0)}function Qu(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,d=e.expirationTimes,g=e.pendingLanes&-62914561;0<g;){var M=31-ut(g),k=1<<M,W=d[M];W===-1?((k&i)===0||(k&s)!==0)&&(d[M]=gf(k,t)):W<=t&&(e.expiredLanes|=k),g&=~k}if(t=Ke,i=Ne,i=Qr(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(We===2||We===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&pe(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||sr(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&pe(s),pa(i)){case 2:case 8:i=_t;break;case 32:i=Qe;break;case 268435456:i=Ie;break;default:i=Qe}return s=Zu.bind(null,e),i=Se(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&pe(s),e.callbackPriority=2,e.callbackNode=null,2}function Zu(e,t){if(dt!==0&&dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Gn()&&e.callbackNode!==i)return null;var s=Ne;return s=Qr(e,e===Ke?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Ou(e,s,t),Qu(e,ge()),e.callbackNode!=null&&e.callbackNode===i?Zu.bind(null,e):null)}function Ju(e,t){if(Gn())return null;Ou(e,t,!0)}function q_(){iv(function(){($e&6)!==0?Se(Re,$_):Ku()})}function so(){if(Wi===0){var e=ks;e===0&&(e=jt,jt<<=1,(jt&261888)===0&&(jt=256)),Wi=e}return Wi}function ed(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:tn(""+e)}function td(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 W_(e,t,i,s,d){if(t==="submit"&&i&&i.stateNode===d){var g=ed((d[Et]||null).action),M=s.submitter;M&&(t=(t=M[Et]||null)?ed(t.formAction):M.getAttribute("formAction"),t!==null&&(g=t,M=null));var k=new an("action","action",null,s,d);e.push({event:k,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Wi!==0){var W=M?td(d,M):new FormData(d);wl(i,{pending:!0,data:W,method:d.method,action:g},null,W)}}else typeof g=="function"&&(k.preventDefault(),W=M?td(d,M):new FormData(d),wl(i,{pending:!0,data:W,method:d.method,action:g},g,W))},currentTarget:d}]})}}for(var ro=0;ro<Pa.length;ro++){var no=Pa[ro],G_=no.toLowerCase(),X_=no[0].toUpperCase()+no.slice(1);ei(G_,"on"+X_)}ei(Bc,"onAnimationEnd"),ei(Oc,"onAnimationIteration"),ei(kc,"onAnimationStart"),ei("dblclick","onDoubleClick"),ei("focusin","onFocus"),ei("focusout","onBlur"),ei(c_,"onTransitionRun"),ei(h_,"onTransitionStart"),ei(u_,"onTransitionCancel"),ei(Hc,"onTransitionEnd"),Cs("onMouseEnter",["mouseout","mouseover"]),Cs("onMouseLeave",["mouseout","mouseover"]),Cs("onPointerEnter",["pointerout","pointerover"]),Cs("onPointerLeave",["pointerout","pointerover"]),Zi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Zi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Zi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Zi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Zi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Zi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ir="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(" "),V_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ir));function id(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],d=s.event;s=s.listeners;e:{var g=void 0;if(t)for(var M=s.length-1;0<=M;M--){var k=s[M],W=k.instance,te=k.currentTarget;if(k=k.listener,W!==g&&d.isPropagationStopped())break e;g=k,d.currentTarget=te;try{g(d)}catch(le){cn(le)}d.currentTarget=null,g=W}else for(M=0;M<s.length;M++){if(k=s[M],W=k.instance,te=k.currentTarget,k=k.listener,W!==g&&d.isPropagationStopped())break e;g=k,d.currentTarget=te;try{g(d)}catch(le){cn(le)}d.currentTarget=null,g=W}}}}function He(e,t){var i=t[ma];i===void 0&&(i=t[ma]=new Set);var s=e+"__bubble";i.has(s)||(sd(t,e,2,!1),i.add(s))}function ao(e,t,i){var s=0;t&&(s|=4),sd(i,e,s,t)}var Yn="_reactListening"+Math.random().toString(36).slice(2);function lo(e){if(!e[Yn]){e[Yn]=!0,Ko.forEach(function(i){i!=="selectionchange"&&(V_.has(i)||ao(i,!1,e),ao(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Yn]||(t[Yn]=!0,ao("selectionchange",!1,t))}}function sd(e,t,i,s){switch(Bd(t)){case 2:var d=bv;break;case 8:d=wv;break;default:d=wo}i=d.bind(null,t,i,e),d=void 0,!Ma||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(d=!0),s?d!==void 0?e.addEventListener(t,i,{capture:!0,passive:d}):e.addEventListener(t,i,!0):d!==void 0?e.addEventListener(t,i,{passive:d}):e.addEventListener(t,i,!1)}function oo(e,t,i,s,d){var g=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var M=s.tag;if(M===3||M===4){var k=s.stateNode.containerInfo;if(k===d)break;if(M===4)for(M=s.return;M!==null;){var W=M.tag;if((W===3||W===4)&&M.stateNode.containerInfo===d)return;M=M.return}for(;k!==null;){if(M=ps(k),M===null)return;if(W=M.tag,W===5||W===6||W===26||W===27){s=g=M;continue e}k=k.parentNode}}s=s.return}oc(function(){var te=g,le=La(i),he=[];e:{var re=zc.get(e);if(re!==void 0){var ae=an,Ce=e;switch(e){case"keypress":if(rn(i)===0)break e;case"keydown":case"keyup":ae=jf;break;case"focusin":Ce="focus",ae=Ta;break;case"focusout":Ce="blur",ae=Ta;break;case"beforeblur":case"afterblur":ae=Ta;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":ae=uc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=Rf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=qf;break;case Bc:case Oc:case kc:ae=Bf;break;case Hc:ae=Gf;break;case"scroll":case"scrollend":ae=Mf;break;case"wheel":ae=Vf;break;case"copy":case"cut":case"paste":ae=kf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=fc;break;case"toggle":case"beforetoggle":ae=Kf}var Ee=(t&4)!==0,Ye=!Ee&&(e==="scroll"||e==="scrollend"),J=Ee?re!==null?re+"Capture":null:re;Ee=[];for(var Y=te,ee;Y!==null;){var oe=Y;if(ee=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||ee===null||J===null||(oe=lr(Y,J),oe!=null&&Ee.push(Pr(Y,oe,ee))),Ye)break;Y=Y.return}0<Ee.length&&(re=new ae(re,Ce,null,i,le),he.push({event:re,listeners:Ee}))}}if((t&7)===0){e:{if(re=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",re&&i!==xa&&(Ce=i.relatedTarget||i.fromElement)&&(ps(Ce)||Ce[gs]))break e;if((ae||re)&&(re=le.window===le?le:(re=le.ownerDocument)?re.defaultView||re.parentWindow:window,ae?(Ce=i.relatedTarget||i.toElement,ae=te,Ce=Ce?ps(Ce):null,Ce!==null&&(Ye=ne(Ce),Ee=Ce.tag,Ce!==Ye||Ee!==5&&Ee!==27&&Ee!==6)&&(Ce=null)):(ae=null,Ce=te),ae!==Ce)){if(Ee=uc,oe="onMouseLeave",J="onMouseEnter",Y="mouse",(e==="pointerout"||e==="pointerover")&&(Ee=fc,oe="onPointerLeave",J="onPointerEnter",Y="pointer"),Ye=ae==null?re:ar(ae),ee=Ce==null?re:ar(Ce),re=new Ee(oe,Y+"leave",ae,i,le),re.target=Ye,re.relatedTarget=ee,oe=null,ps(le)===te&&(Ee=new Ee(J,Y+"enter",Ce,i,le),Ee.target=ee,Ee.relatedTarget=Ye,oe=Ee),Ye=oe,ae&&Ce)t:{for(Ee=Y_,J=ae,Y=Ce,ee=0,oe=J;oe;oe=Ee(oe))ee++;oe=0;for(var xe=Y;xe;xe=Ee(xe))oe++;for(;0<ee-oe;)J=Ee(J),ee--;for(;0<oe-ee;)Y=Ee(Y),oe--;for(;ee--;){if(J===Y||Y!==null&&J===Y.alternate){Ee=J;break t}J=Ee(J),Y=Ee(Y)}Ee=null}else Ee=null;ae!==null&&rd(he,re,ae,Ee,!1),Ce!==null&&Ye!==null&&rd(he,Ye,Ce,Ee,!0)}}e:{if(re=te?ar(te):window,ae=re.nodeName&&re.nodeName.toLowerCase(),ae==="select"||ae==="input"&&re.type==="file")var je=yc;else if(Sc(re))if(bc)je=a_;else{je=r_;var ye=s_}else ae=re.nodeName,!ae||ae.toLowerCase()!=="input"||re.type!=="checkbox"&&re.type!=="radio"?te&&wa(te.elementType)&&(je=yc):je=n_;if(je&&(je=je(e,te))){Cc(he,je,i,le);break e}ye&&ye(e,re,te),e==="focusout"&&te&&re.type==="number"&&te.memoizedProps.value!=null&&ba(re,"number",re.value)}switch(ye=te?ar(te):window,e){case"focusin":(Sc(ye)||ye.contentEditable==="true")&&(Es=ye,Na=te,vr=null);break;case"focusout":vr=Na=Es=null;break;case"mousedown":Ua=!0;break;case"contextmenu":case"mouseup":case"dragend":Ua=!1,Dc(he,i,le);break;case"selectionchange":if(o_)break;case"keydown":case"keyup":Dc(he,i,le)}var Be;if(Oa)e:{switch(e){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else Ls?pc(e,i)&&(Ue="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ue="onCompositionStart");Ue&&(_c&&i.locale!=="ko"&&(Ls||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Ls&&(Be=cc()):(Ri=le,Aa="value"in Ri?Ri.value:Ri.textContent,Ls=!0)),ye=Kn(te,Ue),0<ye.length&&(Ue=new dc(Ue,e,null,i,le),he.push({event:Ue,listeners:ye}),Be?Ue.data=Be:(Be=mc(i),Be!==null&&(Ue.data=Be)))),(Be=Zf?Jf(e,i):e_(e,i))&&(Ue=Kn(te,"onBeforeInput"),0<Ue.length&&(ye=new dc("onBeforeInput","beforeinput",null,i,le),he.push({event:ye,listeners:Ue}),ye.data=Be)),W_(he,e,te,i,le)}id(he,t)})}function Pr(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Kn(e,t){for(var i=t+"Capture",s=[];e!==null;){var d=e,g=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||g===null||(d=lr(e,i),d!=null&&s.unshift(Pr(e,d,g)),d=lr(e,t),d!=null&&s.push(Pr(e,d,g))),e.tag===3)return s;e=e.return}return[]}function Y_(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,s,d){for(var g=t._reactName,M=[];i!==null&&i!==s;){var k=i,W=k.alternate,te=k.stateNode;if(k=k.tag,W!==null&&W===s)break;k!==5&&k!==26&&k!==27||te===null||(W=te,d?(te=lr(i,g),te!=null&&M.unshift(Pr(i,te,W))):d||(te=lr(i,g),te!=null&&M.push(Pr(i,te,W)))),i=i.return}M.length!==0&&e.push({event:t,listeners:M})}var K_=/\r\n?/g,Q_=/\u0000|\uFFFD/g;function nd(e){return(typeof e=="string"?e:""+e).replace(K_,`
49
- `).replace(Q_,"")}function ad(e,t){return t=nd(t),nd(e)===t}function Ve(e,t,i,s,d,g){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||bs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&bs(e,""+s);break;case"className":Jr(e,"class",s);break;case"tabIndex":Jr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Jr(e,i,s);break;case"style":ac(e,s,g);break;case"data":if(t!=="object"){Jr(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=tn(""+s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="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 g=="function"&&(i==="formAction"?(t!=="input"&&Ve(e,t,"name",d.name,d,null),Ve(e,t,"formEncType",d.formEncType,d,null),Ve(e,t,"formMethod",d.formMethod,d,null),Ve(e,t,"formTarget",d.formTarget,d,null)):(Ve(e,t,"encType",d.encType,d,null),Ve(e,t,"method",d.method,d,null),Ve(e,t,"target",d.target,d,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=tn(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=ui);break;case"onScroll":s!=null&&He("scroll",e);break;case"onScrollEnd":s!=null&&He("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(j(61));if(i=s.__html,i!=null){if(d.children!=null)throw Error(j(60));e.innerHTML=i}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}i=tn(""+s),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":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":He("beforetoggle",e),He("toggle",e),Zr(e,"popover",s);break;case"xlinkActuate":hi(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":hi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":hi(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":hi(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":hi(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":hi(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":hi(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":hi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":hi(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Zr(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Lf.get(i)||i,Zr(e,i,s))}}function co(e,t,i,s,d,g){switch(i){case"style":ac(e,s,g);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(j(61));if(i=s.__html,i!=null){if(d.children!=null)throw Error(j(60));e.innerHTML=i}}break;case"children":typeof s=="string"?bs(e,s):(typeof s=="number"||typeof s=="bigint")&&bs(e,""+s);break;case"onScroll":s!=null&&He("scroll",e);break;case"onScrollEnd":s!=null&&He("scrollend",e);break;case"onClick":s!=null&&(e.onclick=ui);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Qo.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(d=i.endsWith("Capture"),t=i.slice(2,d?i.length-7:void 0),g=e[Et]||null,g=g!=null?g[i]:null,typeof g=="function"&&e.removeEventListener(t,g,d),typeof s=="function")){typeof g!="function"&&g!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,d);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Zr(e,i,s)}}}function bt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":He("error",e),He("load",e);var s=!1,d=!1,g;for(g in i)if(i.hasOwnProperty(g)){var M=i[g];if(M!=null)switch(g){case"src":s=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(j(137,t));default:Ve(e,t,g,M,i,null)}}d&&Ve(e,t,"srcSet",i.srcSet,i,null),s&&Ve(e,t,"src",i.src,i,null);return;case"input":He("invalid",e);var k=g=M=d=null,W=null,te=null;for(s in i)if(i.hasOwnProperty(s)){var le=i[s];if(le!=null)switch(s){case"name":d=le;break;case"type":M=le;break;case"checked":W=le;break;case"defaultChecked":te=le;break;case"value":g=le;break;case"defaultValue":k=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(j(137,t));break;default:Ve(e,t,s,le,i,null)}}ic(e,g,k,W,te,M,d,!1);return;case"select":He("invalid",e),s=M=g=null;for(d in i)if(i.hasOwnProperty(d)&&(k=i[d],k!=null))switch(d){case"value":g=k;break;case"defaultValue":M=k;break;case"multiple":s=k;default:Ve(e,t,d,k,i,null)}t=g,i=M,e.multiple=!!s,t!=null?ys(e,!!s,t,!1):i!=null&&ys(e,!!s,i,!0);return;case"textarea":He("invalid",e),g=d=s=null;for(M in i)if(i.hasOwnProperty(M)&&(k=i[M],k!=null))switch(M){case"value":s=k;break;case"defaultValue":d=k;break;case"children":g=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(j(91));break;default:Ve(e,t,M,k,i,null)}rc(e,s,d,g);return;case"option":for(W in i)if(i.hasOwnProperty(W)&&(s=i[W],s!=null))switch(W){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ve(e,t,W,s,i,null)}return;case"dialog":He("beforetoggle",e),He("toggle",e),He("cancel",e),He("close",e);break;case"iframe":case"object":He("load",e);break;case"video":case"audio":for(s=0;s<Ir.length;s++)He(Ir[s],e);break;case"image":He("error",e),He("load",e);break;case"details":He("toggle",e);break;case"embed":case"source":case"link":He("error",e),He("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(te in i)if(i.hasOwnProperty(te)&&(s=i[te],s!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(j(137,t));default:Ve(e,t,te,s,i,null)}return;default:if(wa(t)){for(le in i)i.hasOwnProperty(le)&&(s=i[le],s!==void 0&&co(e,t,le,s,i,void 0));return}}for(k in i)i.hasOwnProperty(k)&&(s=i[k],s!=null&&Ve(e,t,k,s,i,null))}function Z_(e,t,i,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,g=null,M=null,k=null,W=null,te=null,le=null;for(ae in i){var he=i[ae];if(i.hasOwnProperty(ae)&&he!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":W=he;default:s.hasOwnProperty(ae)||Ve(e,t,ae,null,s,he)}}for(var re in s){var ae=s[re];if(he=i[re],s.hasOwnProperty(re)&&(ae!=null||he!=null))switch(re){case"type":g=ae;break;case"name":d=ae;break;case"checked":te=ae;break;case"defaultChecked":le=ae;break;case"value":M=ae;break;case"defaultValue":k=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(j(137,t));break;default:ae!==he&&Ve(e,t,re,ae,s,he)}}ya(e,M,k,W,te,le,g,d);return;case"select":ae=M=k=re=null;for(g in i)if(W=i[g],i.hasOwnProperty(g)&&W!=null)switch(g){case"value":break;case"multiple":ae=W;default:s.hasOwnProperty(g)||Ve(e,t,g,null,s,W)}for(d in s)if(g=s[d],W=i[d],s.hasOwnProperty(d)&&(g!=null||W!=null))switch(d){case"value":re=g;break;case"defaultValue":k=g;break;case"multiple":M=g;default:g!==W&&Ve(e,t,d,g,s,W)}t=k,i=M,s=ae,re!=null?ys(e,!!i,re,!1):!!s!=!!i&&(t!=null?ys(e,!!i,t,!0):ys(e,!!i,i?[]:"",!1));return;case"textarea":ae=re=null;for(k in i)if(d=i[k],i.hasOwnProperty(k)&&d!=null&&!s.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:Ve(e,t,k,null,s,d)}for(M in s)if(d=s[M],g=i[M],s.hasOwnProperty(M)&&(d!=null||g!=null))switch(M){case"value":re=d;break;case"defaultValue":ae=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(j(91));break;default:d!==g&&Ve(e,t,M,d,s,g)}sc(e,re,ae);return;case"option":for(var Ce in i)if(re=i[Ce],i.hasOwnProperty(Ce)&&re!=null&&!s.hasOwnProperty(Ce))switch(Ce){case"selected":e.selected=!1;break;default:Ve(e,t,Ce,null,s,re)}for(W in s)if(re=s[W],ae=i[W],s.hasOwnProperty(W)&&re!==ae&&(re!=null||ae!=null))switch(W){case"selected":e.selected=re&&typeof re!="function"&&typeof re!="symbol";break;default:Ve(e,t,W,re,s,ae)}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 Ee in i)re=i[Ee],i.hasOwnProperty(Ee)&&re!=null&&!s.hasOwnProperty(Ee)&&Ve(e,t,Ee,null,s,re);for(te in s)if(re=s[te],ae=i[te],s.hasOwnProperty(te)&&re!==ae&&(re!=null||ae!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(j(137,t));break;default:Ve(e,t,te,re,s,ae)}return;default:if(wa(t)){for(var Ye in i)re=i[Ye],i.hasOwnProperty(Ye)&&re!==void 0&&!s.hasOwnProperty(Ye)&&co(e,t,Ye,void 0,s,re);for(le in s)re=s[le],ae=i[le],!s.hasOwnProperty(le)||re===ae||re===void 0&&ae===void 0||co(e,t,le,re,s,ae);return}}for(var J in i)re=i[J],i.hasOwnProperty(J)&&re!=null&&!s.hasOwnProperty(J)&&Ve(e,t,J,null,s,re);for(he in s)re=s[he],ae=i[he],!s.hasOwnProperty(he)||re===ae||re==null&&ae==null||Ve(e,t,he,re,s,ae)}function ld(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function J_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var d=i[s],g=d.transferSize,M=d.initiatorType,k=d.duration;if(g&&k&&ld(M)){for(M=0,k=d.responseEnd,s+=1;s<i.length;s++){var W=i[s],te=W.startTime;if(te>k)break;var le=W.transferSize,he=W.initiatorType;le&&ld(he)&&(W=W.responseEnd,M+=le*(W<k?1:(k-te)/(W-te)))}if(--s,t+=8*(g+M)/(d.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 ho=null,uo=null;function Qn(e){return e.nodeType===9?e:e.ownerDocument}function od(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 cd(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 fo(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 _o=null;function ev(){var e=window.event;return e&&e.type==="popstate"?e===_o?!1:(_o=e,!0):(_o=null,!1)}var hd=typeof setTimeout=="function"?setTimeout:void 0,tv=typeof clearTimeout=="function"?clearTimeout:void 0,ud=typeof Promise=="function"?Promise:void 0,iv=typeof queueMicrotask=="function"?queueMicrotask:typeof ud<"u"?function(e){return ud.resolve(null).then(e).catch(sv)}:hd;function sv(e){setTimeout(function(){throw e})}function Gi(e){return e==="head"}function dd(e,t){var i=t,s=0;do{var d=i.nextSibling;if(e.removeChild(i),d&&d.nodeType===8)if(i=d.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(d),Js(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")jr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,jr(i);for(var g=i.firstChild;g;){var M=g.nextSibling,k=g.nodeName;g[nr]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&g.rel.toLowerCase()==="stylesheet"||i.removeChild(g),g=M}}else i==="body"&&jr(e.ownerDocument.body);i=d}while(i);Js(t)}function fd(e,t){var i=e;e=0;do{var s=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||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function vo(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":vo(i),Sa(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function rv(e,t,i,s){for(;e.nodeType===1;){var d=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[nr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(g=e.getAttribute("rel"),g==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(g!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(g=e.getAttribute("src"),(g!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&g&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var g=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===g)return e}else return e;if(e=Kt(e.nextSibling),e===null)break}return null}function nv(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Kt(e.nextSibling),e===null))return null;return e}function _d(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Kt(e.nextSibling),e===null))return null;return e}function go(e){return e.data==="$?"||e.data==="$~"}function po(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function av(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Kt(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 mo=null;function vd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Kt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function gd(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 pd(e,t,i){switch(t=Qn(i),e){case"html":if(e=t.documentElement,!e)throw Error(j(452));return e;case"head":if(e=t.head,!e)throw Error(j(453));return e;case"body":if(e=t.body,!e)throw Error(j(454));return e;default:throw Error(j(451))}}function jr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Sa(e)}var Qt=new Map,md=new Set;function Zn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Mi=I.d;I.d={f:lv,r:ov,D:cv,C:hv,L:uv,m:dv,X:_v,S:fv,M:vv};function lv(){var e=Mi.f(),t=$n();return e||t}function ov(e){var t=ms(e);t!==null&&t.tag===5&&t.type==="form"?Hh(t):Mi.r(e)}var Ks=typeof document>"u"?null:document;function Sd(e,t,i){var s=Ks;if(s&&typeof t=="string"&&t){var d=$t(t);d='link[rel="'+e+'"][href="'+d+'"]',typeof i=="string"&&(d+='[crossorigin="'+i+'"]'),md.has(d)||(md.add(d),e={rel:e,crossOrigin:i,href:t},s.querySelector(d)===null&&(t=s.createElement("link"),bt(t,"link",e),gt(t),s.head.appendChild(t)))}}function cv(e){Mi.D(e),Sd("dns-prefetch",e,null)}function hv(e,t){Mi.C(e,t),Sd("preconnect",e,t)}function uv(e,t,i){Mi.L(e,t,i);var s=Ks;if(s&&e&&t){var d='link[rel="preload"][as="'+$t(t)+'"]';t==="image"&&i&&i.imageSrcSet?(d+='[imagesrcset="'+$t(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(d+='[imagesizes="'+$t(i.imageSizes)+'"]')):d+='[href="'+$t(e)+'"]';var g=d;switch(t){case"style":g=Qs(e);break;case"script":g=Zs(e)}Qt.has(g)||(e=a({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Qt.set(g,e),s.querySelector(d)!==null||t==="style"&&s.querySelector(Fr(g))||t==="script"&&s.querySelector($r(g))||(t=s.createElement("link"),bt(t,"link",e),gt(t),s.head.appendChild(t)))}}function dv(e,t){Mi.m(e,t);var i=Ks;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",d='link[rel="modulepreload"][as="'+$t(s)+'"][href="'+$t(e)+'"]',g=d;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Zs(e)}if(!Qt.has(g)&&(e=a({rel:"modulepreload",href:e},t),Qt.set(g,e),i.querySelector(d)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector($r(g)))return}s=i.createElement("link"),bt(s,"link",e),gt(s),i.head.appendChild(s)}}}function fv(e,t,i){Mi.S(e,t,i);var s=Ks;if(s&&e){var d=Ss(s).hoistableStyles,g=Qs(e);t=t||"default";var M=d.get(g);if(!M){var k={loading:0,preload:null};if(M=s.querySelector(Fr(g)))k.loading=5;else{e=a({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Qt.get(g))&&So(e,i);var W=M=s.createElement("link");gt(W),bt(W,"link",e),W._p=new Promise(function(te,le){W.onload=te,W.onerror=le}),W.addEventListener("load",function(){k.loading|=1}),W.addEventListener("error",function(){k.loading|=2}),k.loading|=4,Jn(M,t,s)}M={type:"stylesheet",instance:M,count:1,state:k},d.set(g,M)}}}function _v(e,t){Mi.X(e,t);var i=Ks;if(i&&e){var s=Ss(i).hoistableScripts,d=Zs(e),g=s.get(d);g||(g=i.querySelector($r(d)),g||(e=a({src:e,async:!0},t),(t=Qt.get(d))&&Co(e,t),g=i.createElement("script"),gt(g),bt(g,"link",e),i.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},s.set(d,g))}}function vv(e,t){Mi.M(e,t);var i=Ks;if(i&&e){var s=Ss(i).hoistableScripts,d=Zs(e),g=s.get(d);g||(g=i.querySelector($r(d)),g||(e=a({src:e,async:!0,type:"module"},t),(t=Qt.get(d))&&Co(e,t),g=i.createElement("script"),gt(g),bt(g,"link",e),i.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},s.set(d,g))}}function Cd(e,t,i,s){var d=(d=de.current)?Zn(d):null;if(!d)throw Error(j(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Qs(i.href),i=Ss(d).hoistableStyles,s=i.get(t),s||(s={type:"style",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Qs(i.href);var g=Ss(d).hoistableStyles,M=g.get(e);if(M||(d=d.ownerDocument||d,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(e,M),(g=d.querySelector(Fr(e)))&&!g._p&&(M.instance=g,M.state.loading=5),Qt.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},Qt.set(e,i),g||gv(d,e,i,M.state))),t&&s===null)throw Error(j(528,""));return M}if(t&&s!==null)throw Error(j(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Zs(i),i=Ss(d).hoistableScripts,s=i.get(t),s||(s={type:"script",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(j(444,e))}}function Qs(e){return'href="'+$t(e)+'"'}function Fr(e){return'link[rel="stylesheet"]['+e+"]"}function yd(e){return a({},e,{"data-precedence":e.precedence,precedence:null})}function gv(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),bt(t,"link",i),gt(t),e.head.appendChild(t))}function Zs(e){return'[src="'+$t(e)+'"]'}function $r(e){return"script[async]"+e}function bd(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+$t(i.href)+'"]');if(s)return t.instance=s,gt(s),s;var d=a({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),gt(s),bt(s,"style",d),Jn(s,i.precedence,e),t.instance=s;case"stylesheet":d=Qs(i.href);var g=e.querySelector(Fr(d));if(g)return t.state.loading|=4,t.instance=g,gt(g),g;s=yd(i),(d=Qt.get(d))&&So(s,d),g=(e.ownerDocument||e).createElement("link"),gt(g);var M=g;return M._p=new Promise(function(k,W){M.onload=k,M.onerror=W}),bt(g,"link",s),t.state.loading|=4,Jn(g,i.precedence,e),t.instance=g;case"script":return g=Zs(i.src),(d=e.querySelector($r(g)))?(t.instance=d,gt(d),d):(s=i,(d=Qt.get(g))&&(s=a({},i),Co(s,d)),e=e.ownerDocument||e,d=e.createElement("script"),gt(d),bt(d,"link",s),e.head.appendChild(d),t.instance=d);case"void":return null;default:throw Error(j(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Jn(s,i.precedence,e));return t.instance}function Jn(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=s.length?s[s.length-1]:null,g=d,M=0;M<s.length;M++){var k=s[M];if(k.dataset.precedence===t)g=k;else if(g!==d)break}g?g.parentNode.insertBefore(e,g.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function So(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Co(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ea=null;function wd(e,t,i){if(ea===null){var s=new Map,d=ea=new Map;d.set(i,s)}else d=ea,s=d.get(i),s||(s=new Map,d.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),d=0;d<i.length;d++){var g=i[d];if(!(g[nr]||g[mt]||e==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var M=g.getAttribute(t)||"";M=e+M;var k=s.get(M);k?k.push(g):s.set(M,[g])}}return s}function xd(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function pv(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 Ld(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function mv(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var d=Qs(s.href),g=t.querySelector(Fr(d));if(g){t=g._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ta.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=g,gt(g);return}g=t.ownerDocument||t,s=yd(s),(d=Qt.get(d))&&So(s,d),g=g.createElement("link"),gt(g);var M=g;M._p=new Promise(function(k,W){M.onload=k,M.onerror=W}),bt(g,"link",s),i.instance=g}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=ta.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var yo=0;function Sv(e,t){return e.stylesheets&&e.count===0&&sa(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&sa(e,e.stylesheets),e.unsuspend){var g=e.unsuspend;e.unsuspend=null,g()}},6e4+t);0<e.imgBytes&&yo===0&&(yo=62500*J_());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sa(e,e.stylesheets),e.unsuspend)){var g=e.unsuspend;e.unsuspend=null,g()}},(e.imgBytes>yo?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(d)}}:null}function ta(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sa(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ia=null;function sa(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ia=new Map,t.forEach(Cv,e),ia=null,ta.call(e))}function Cv(e,t){if(!(t.state.loading&4)){var i=ia.get(e);if(i)var s=i.get(null);else{i=new Map,ia.set(e,i);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<d.length;g++){var M=d[g];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(i.set(M.dataset.precedence,M),s=M)}s&&i.set(null,s)}d=t.instance,M=d.getAttribute("data-precedence"),g=i.get(M)||s,g===s&&i.set(null,d),i.set(M,d),this.count++,s=ta.bind(this),d.addEventListener("load",s),d.addEventListener("error",s),g?g.parentNode.insertBefore(d,g.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),t.state.loading|=4}}var qr={$$typeof:l,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function yv(e,t,i,s,d,g,M,k,W){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=va(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=va(0),this.hiddenUpdates=va(null),this.identifierPrefix=s,this.onUncaughtError=d,this.onCaughtError=g,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.incompleteTransitions=new Map}function Ed(e,t,i,s,d,g,M,k,W,te,le,he){return e=new yv(e,t,i,M,W,te,le,he,k),t=1,g===!0&&(t|=24),g=Ht(3,null,null,t),e.current=g,g.stateNode=e,t=Ja(),t.refCount++,e.pooledCache=t,t.refCount++,g.memoizedState={element:s,isDehydrated:i,cache:t},sl(g),e}function Md(e){return e?(e=Rs,e):Rs}function Ad(e,t,i,s,d,g){d=Md(d),s.context===null?s.context=d:s.pendingContext=d,s=Hi(t),s.payload={element:i},g=g===void 0?null:g,g!==null&&(s.callback=g),i=zi(e,s,t),i!==null&&(Bt(i,e,t),br(i,e,t))}function Rd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function bo(e,t){Rd(e,t),(e=e.alternate)&&Rd(e,t)}function Dd(e){if(e.tag===13||e.tag===31){var t=is(e,67108864);t!==null&&Bt(t,e,67108864),bo(e,67108864)}}function Td(e){if(e.tag===13||e.tag===31){var t=Pt();t=ga(t);var i=is(e,t);i!==null&&Bt(i,e,t),bo(e,t)}}var ra=!0;function bv(e,t,i,s){var d=N.T;N.T=null;var g=I.p;try{I.p=2,wo(e,t,i,s)}finally{I.p=g,N.T=d}}function wv(e,t,i,s){var d=N.T;N.T=null;var g=I.p;try{I.p=8,wo(e,t,i,s)}finally{I.p=g,N.T=d}}function wo(e,t,i,s){if(ra){var d=xo(s);if(d===null)oo(e,t,s,na,i),Od(e,s);else if(Lv(d,e,t,i,s))s.stopPropagation();else if(Od(e,s),t&4&&-1<xv.indexOf(e)){for(;d!==null;){var g=ms(d);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var M=Jt(g.pendingLanes);if(M!==0){var k=g;for(k.pendingLanes|=2,k.entangledLanes|=2;M;){var W=1<<31-ut(M);k.entanglements[1]|=W,M&=~W}oi(g),($e&6)===0&&(jn=ge()+500,Ur(0))}}break;case 31:case 13:k=is(g,2),k!==null&&Bt(k,g,2),$n(),bo(g,2)}if(g=xo(s),g===null&&oo(e,t,s,na,i),g===d)break;d=g}d!==null&&s.stopPropagation()}else oo(e,t,s,null,i)}}function xo(e){return e=La(e),Lo(e)}var na=null;function Lo(e){if(na=null,e=ps(e),e!==null){var t=ne(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=$(t),e!==null)return e;e=null}else if(i===31){if(e=n(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 na=e,null}function Bd(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(ze()){case Re:return 2;case _t:return 8;case Qe:case it:return 32;case Ie:return 268435456;default:return 32}default:return 32}}var Eo=!1,Xi=null,Vi=null,Yi=null,Wr=new Map,Gr=new Map,Ki=[],xv="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 Od(e,t){switch(e){case"focusin":case"focusout":Xi=null;break;case"dragenter":case"dragleave":Vi=null;break;case"mouseover":case"mouseout":Yi=null;break;case"pointerover":case"pointerout":Wr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gr.delete(t.pointerId)}}function Xr(e,t,i,s,d,g){return e===null||e.nativeEvent!==g?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:g,targetContainers:[d]},t!==null&&(t=ms(t),t!==null&&Dd(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,d!==null&&t.indexOf(d)===-1&&t.push(d),e)}function Lv(e,t,i,s,d){switch(t){case"focusin":return Xi=Xr(Xi,e,t,i,s,d),!0;case"dragenter":return Vi=Xr(Vi,e,t,i,s,d),!0;case"mouseover":return Yi=Xr(Yi,e,t,i,s,d),!0;case"pointerover":var g=d.pointerId;return Wr.set(g,Xr(Wr.get(g)||null,e,t,i,s,d)),!0;case"gotpointercapture":return g=d.pointerId,Gr.set(g,Xr(Gr.get(g)||null,e,t,i,s,d)),!0}return!1}function kd(e){var t=ps(e.target);if(t!==null){var i=ne(t);if(i!==null){if(t=i.tag,t===13){if(t=$(i),t!==null){e.blockedOn=t,Vo(e.priority,function(){Td(i)});return}}else if(t===31){if(t=n(i),t!==null){e.blockedOn=t,Vo(e.priority,function(){Td(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 aa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=xo(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);xa=s,i.target.dispatchEvent(s),xa=null}else return t=ms(i),t!==null&&Dd(t),e.blockedOn=i,!1;t.shift()}return!0}function Hd(e,t,i){aa(e)&&i.delete(t)}function Ev(){Eo=!1,Xi!==null&&aa(Xi)&&(Xi=null),Vi!==null&&aa(Vi)&&(Vi=null),Yi!==null&&aa(Yi)&&(Yi=null),Wr.forEach(Hd),Gr.forEach(Hd)}function la(e,t){e.blockedOn===t&&(e.blockedOn=null,Eo||(Eo=!0,U.unstable_scheduleCallback(U.unstable_NormalPriority,Ev)))}var oa=null;function zd(e){oa!==e&&(oa=e,U.unstable_scheduleCallback(U.unstable_NormalPriority,function(){oa===e&&(oa=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],d=e[t+2];if(typeof s!="function"){if(Lo(s||i)===null)continue;break}var g=ms(i);g!==null&&(e.splice(t,3),t-=3,wl(g,{pending:!0,data:d,method:i.method,action:s},s,d))}}))}function Js(e){function t(W){return la(W,e)}Xi!==null&&la(Xi,e),Vi!==null&&la(Vi,e),Yi!==null&&la(Yi,e),Wr.forEach(t),Gr.forEach(t);for(var i=0;i<Ki.length;i++){var s=Ki[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Ki.length&&(i=Ki[0],i.blockedOn===null);)kd(i),i.blockedOn===null&&Ki.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var d=i[s],g=i[s+1],M=d[Et]||null;if(typeof g=="function")M||zd(i);else if(M){var k=null;if(g&&g.hasAttribute("formAction")){if(d=g,M=g[Et]||null)k=M.formAction;else if(Lo(d)!==null)continue}else k=M.action;typeof k=="function"?i[s+1]=k:(i.splice(s,3),s-=3),zd(i)}}}function Nd(){function e(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(M){return d=M})},focusReset:"manual",scroll:"manual"})}function t(){d!==null&&(d(),d=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,d=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),d!==null&&(d(),d=null)}}}function Mo(e){this._internalRoot=e}ca.prototype.render=Mo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));var i=t.current,s=Pt();Ad(i,s,e,t,null,null)},ca.prototype.unmount=Mo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ad(e.current,2,null,e,null,null),$n(),t[gs]=null}};function ca(e){this._internalRoot=e}ca.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xo();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Ki.length&&t!==0&&t<Ki[i].priority;i++);Ki.splice(i,0,e),i===0&&kd(e)}};var Ud=G.version;if(Ud!=="19.2.4")throw Error(j(527,Ud,"19.2.4"));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(j(188)):(e=Object.keys(e).join(","),Error(j(268,e)));return e=f(t),e=e!==null?_(e):null,e=e===null?null:e.stateNode,e};var Mv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ha=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ha.isDisabled&&ha.supportsFiber)try{xt=ha.inject(Mv),tt=ha}catch{}}return Yr.createRoot=function(e,t){if(!Z(e))throw Error(j(299));var i=!1,s="",d=Wh,g=Gh,M=Xh;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(d=t.onUncaughtError),t.onCaughtError!==void 0&&(g=t.onCaughtError),t.onRecoverableError!==void 0&&(M=t.onRecoverableError)),t=Ed(e,1,!1,null,null,i,s,null,d,g,M,Nd),e[gs]=t.current,lo(e),new Mo(t)},Yr.hydrateRoot=function(e,t,i){if(!Z(e))throw Error(j(299));var s=!1,d="",g=Wh,M=Gh,k=Xh,W=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(g=i.onUncaughtError),i.onCaughtError!==void 0&&(M=i.onCaughtError),i.onRecoverableError!==void 0&&(k=i.onRecoverableError),i.formState!==void 0&&(W=i.formState)),t=Ed(e,1,!0,t,i??null,s,d,W,g,M,k,Nd),t.context=Md(null),i=t.current,s=Pt(),s=ga(s),d=Hi(s),d.callback=null,zi(i,d,s),i=s,t.current.lanes=i,rr(t,i),oi(t),e[gs]=t.current,lo(e),new ca(t)},Yr.version="19.2.4",Yr}var Vd;function Iv(){if(Vd)return Do.exports;Vd=1;function U(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(U)}catch(G){console.error(G)}}return U(),Do.exports=Uv(),Do.exports}var Pv=Iv();const jv=768,Fv=1e3;function Kr(){const G=window.location.pathname.match(/^(\/project\/[^/]+\/)/);return G?G[1]:"/"}function vs(U){const G=Kr(),X=U.startsWith("/")?U.slice(1):U;return G+X}function ci(){const U=localStorage.getItem("codev-web-key");return U?{Authorization:`Bearer ${U}`}:{}}async function $v(){const U=await fetch(vs("api/state"),{headers:ci()});if(!U.ok)throw new Error(`Failed to fetch state: ${U.status}`);return U.json()}async function qv(){const U=await fetch(vs("api/tabs/shell"),{method:"POST",headers:{"Content-Type":"application/json",...ci()}});if(!U.ok)throw new Error(await U.text());return U.json()}async function lf(U,G,X){const j=await fetch(vs("api/tabs/file"),{method:"POST",headers:{"Content-Type":"application/json",...ci()},body:JSON.stringify({path:U,line:G,terminalId:X})});if(!j.ok)throw new Error(await j.text());return j.json()}async function Wv(U){const G=await fetch(vs(`api/tabs/${U}`),{method:"DELETE",headers:ci()});if(!G.ok)throw new Error(await G.text())}async function Gv(){const U=await fetch(vs("api/files"),{headers:ci()});if(!U.ok)throw new Error(`Failed to fetch files: ${U.status}`);return U.json()}function Yd(U){return U.terminalId?`${Kr()}ws/terminal/${U.terminalId}`:null}async function Xv(){const U=await fetch(vs("api/git/status"),{headers:ci()});if(!U.ok)throw new Error(`Failed to fetch git status: ${U.status}`);return U.json()}async function Vv(){const U=await fetch(vs("api/files/recent"),{headers:ci()});if(!U.ok)throw new Error(`Failed to fetch recent files: ${U.status}`);return U.json()}const Kd={registered:!1,state:"error",uptime:null,towerId:null,towerName:null,serverUrl:null,accessUrl:null};async function Yv(){try{const U=await fetch("/api/tunnel/status",{headers:ci()});return U.status===404?null:U.ok?U.json():Kd}catch{return Kd}}async function Kv(){const U=await fetch("/api/tunnel/connect",{method:"POST",headers:ci()});if(!U.ok)throw new Error(`Connect failed: ${U.status}`)}async function Qv(){const U=await fetch("/api/tunnel/disconnect",{method:"POST",headers:ci()});if(!U.ok)throw new Error(`Disconnect failed: ${U.status}`)}function Zv(){const[U,G]=we.useState(null),[X,j]=we.useState(null),[Z,ne]=we.useState(null),$=we.useCallback(async()=>{try{const[n,u]=await Promise.all([$v(),Yv()]);G(n),j(u),ne(null)}catch(n){ne(n.message)}},[]);return we.useEffect(()=>{$();const n=setInterval($,Fv);return()=>clearInterval(n)},[$]),{state:U,tunnelStatus:X,error:Z,refresh:$}}function Jv(U){const G=[{id:"dashboard",type:"dashboard",label:"Dashboard",closable:!1}];U!=null&&U.architect&&G.push({id:"architect",type:"architect",label:"Architect",closable:!1,terminalId:U.architect.terminalId});for(const X of(U==null?void 0:U.builders)??[])G.push({id:X.id,type:"builder",label:X.name||`Builder ${X.id}`,closable:!0,projectId:X.id,terminalId:X.terminalId});for(const X of(U==null?void 0:U.utils)??[])!X.terminalId&&(!X.pid||X.pid===0)||G.push({id:X.id,type:"shell",label:X.name||`Shell ${X.id}`,closable:!0,utilId:X.id,terminalId:X.terminalId});for(const X of(U==null?void 0:U.annotations)??[]){const j=X.file.split("/").pop()??X.file;G.push({id:X.id,type:"file",label:j,closable:!0,annotationId:X.id,filePath:X.file})}return G}function eg(U){const[G,X]=we.useState("dashboard"),j=we.useRef(null),Z=we.useRef(!1),ne=Jv(U);we.useEffect(()=>{if(Z.current||U===null)return;const f=new URLSearchParams(window.location.search).get("tab");if(f){const _=ne.find(a=>a.id===f||a.type===f);if(_){X(_.id),Z.current=!0;const a=new URL(window.location.href);a.searchParams.delete("tab"),window.history.replaceState({},"",a.toString())}}else Z.current=!0},[ne,U]),we.useEffect(()=>{const u=new Set(ne.map(f=>f.id));if(j.current===null){U!==null&&(j.current=u);return}for(const f of ne)!j.current.has(f.id)&&f.type!=="architect"&&X(f.id);j.current=u},[ne.map(u=>u.id).join(","),U!==null]);const $=we.useCallback(u=>{X(u)},[]),n=ne.find(u=>u.id===G)??ne[0];return{tabs:ne,activeTab:n,activeTabId:G,selectTab:$}}function tg(U){const[G,X]=we.useState(()=>typeof window<"u"?window.matchMedia(U).matches:!1);return we.useEffect(()=>{const j=window.matchMedia(U),Z=ne=>X(ne.matches);return j.addEventListener("change",Z),X(j.matches),()=>j.removeEventListener("change",Z)},[U]),G}function ig({left:U,right:G,defaultSplit:X=50}){const[j,Z]=we.useState(X),ne=we.useRef(null),$=we.useRef(!1),n=we.useCallback(u=>{u.preventDefault(),$.current=!0;const f=a=>{if(!$.current||!ne.current)return;const p=ne.current.getBoundingClientRect(),b=(a.clientX-p.left)/p.width*100;Z(Math.max(20,Math.min(80,b)))},_=()=>{$.current=!1,document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",_)};document.addEventListener("mousemove",f),document.addEventListener("mouseup",_)},[]);return K.jsxs("div",{ref:ne,className:"split-pane",children:[K.jsx("div",{className:"split-left",style:{width:`${j}%`},children:U}),K.jsx("div",{className:"split-handle",onMouseDown:n,role:"separator","aria-label":"Resize panels"}),K.jsx("div",{className:"split-right",style:{width:`${100-j}%`},children:G})]})}function of({tabs:U,activeTabId:G,onSelectTab:X,onRefresh:j}){const Z=async(ne,$)=>{ne.stopPropagation();try{await Wv($.id),j()}catch(n){console.error("Failed to close tab:",n)}};return K.jsx("div",{className:"tab-bar",role:"tablist","aria-label":"Content tabs",children:U.map(ne=>K.jsxs("button",{role:"tab","aria-selected":ne.id===G,className:`tab ${ne.id===G?"tab-active":""}`,onClick:()=>X(ne.id),title:ne.label,children:[K.jsx("span",{className:"tab-label",children:ne.label}),ne.closable&&K.jsx("span",{className:"tab-close",onClick:$=>Z($,ne),role:"button","aria-label":`Close ${ne.label}`,tabIndex:0,onKeyDown:$=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),Z($,ne))},children:"×"})]},ne.id))})}var ko={exports:{}},Qd;function sg(){return Qd||(Qd=1,(function(U,G){(function(X,j){U.exports=j()})(globalThis,(()=>(()=>{var X={4567:function($,n,u){var f=this&&this.__decorate||function(o,l,S,x){var v,y=arguments.length,m=y<3?l:x===null?x=Object.getOwnPropertyDescriptor(l,S):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(o,l,S,x);else for(var C=o.length-1;C>=0;C--)(v=o[C])&&(m=(y<3?v(m):y>3?v(l,S,m):v(l,S))||m);return y>3&&m&&Object.defineProperty(l,S,m),m},_=this&&this.__param||function(o,l){return function(S,x){l(S,x,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.AccessibilityManager=void 0;const a=u(9042),p=u(9924),b=u(844),w=u(4725),c=u(2585),r=u(3656);let h=n.AccessibilityManager=class extends b.Disposable{constructor(o,l,S,x){super(),this._terminal=o,this._coreBrowserService=S,this._renderService=x,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 v=0;v<this._terminal.rows;v++)this._rowElements[v]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[v]);if(this._topBoundaryFocusListener=v=>this._handleBoundaryFocus(v,0),this._bottomBoundaryFocusListener=v=>this._handleBoundaryFocus(v,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 p.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((v=>this._handleResize(v.rows)))),this.register(this._terminal.onRender((v=>this._refreshRows(v.start,v.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((v=>this._handleChar(v)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
50
- `)))),this.register(this._terminal.onA11yTab((v=>this._handleTab(v)))),this.register(this._terminal.onKey((v=>this._handleKey(v.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,r.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,b.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(o){for(let l=0;l<o;l++)this._handleChar(" ")}_handleChar(o){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==o&&(this._charsToAnnounce+=o):this._charsToAnnounce+=o,o===`
51
- `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=a.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(o){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(o)||this._charsToConsume.push(o)}_refreshRows(o,l){this._liveRegionDebouncer.refresh(o,l,this._terminal.rows)}_renderRows(o,l){const S=this._terminal.buffer,x=S.lines.length.toString();for(let v=o;v<=l;v++){const y=S.lines.get(S.ydisp+v),m=[],C=(y==null?void 0:y.translateToString(!0,void 0,void 0,m))||"",L=(S.ydisp+v+1).toString(),A=this._rowElements[v];A&&(C.length===0?(A.innerText=" ",this._rowColumns.set(A,[0,1])):(A.textContent=C,this._rowColumns.set(A,m)),A.setAttribute("aria-posinset",L),A.setAttribute("aria-setsize",x))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(o,l){const S=o.target,x=this._rowElements[l===0?1:this._rowElements.length-2];if(S.getAttribute("aria-posinset")===(l===0?"1":`${this._terminal.buffer.lines.length}`)||o.relatedTarget!==x)return;let v,y;if(l===0?(v=S,y=this._rowElements.pop(),this._rowContainer.removeChild(y)):(v=this._rowElements.shift(),y=S,this._rowContainer.removeChild(v)),v.removeEventListener("focus",this._topBoundaryFocusListener),y.removeEventListener("focus",this._bottomBoundaryFocusListener),l===0){const m=this._createAccessibilityTreeNode();this._rowElements.unshift(m),this._rowContainer.insertAdjacentElement("afterbegin",m)}else{const m=this._createAccessibilityTreeNode();this._rowElements.push(m),this._rowContainer.appendChild(m)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(l===0?-1:1),this._rowElements[l===0?1:this._rowElements.length-2].focus(),o.preventDefault(),o.stopImmediatePropagation()}_handleSelectionChange(){var C;if(this._rowElements.length===0)return;const o=document.getSelection();if(!o)return;if(o.isCollapsed)return void(this._rowContainer.contains(o.anchorNode)&&this._terminal.clearSelection());if(!o.anchorNode||!o.focusNode)return void console.error("anchorNode and/or focusNode are null");let l={node:o.anchorNode,offset:o.anchorOffset},S={node:o.focusNode,offset:o.focusOffset};if((l.node.compareDocumentPosition(S.node)&Node.DOCUMENT_POSITION_PRECEDING||l.node===S.node&&l.offset>S.offset)&&([l,S]=[S,l]),l.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(l={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(l.node))return;const x=this._rowElements.slice(-1)[0];if(S.node.compareDocumentPosition(x)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(S={node:x,offset:((C=x.textContent)==null?void 0:C.length)??0}),!this._rowContainer.contains(S.node))return;const v=({node:L,offset:A})=>{const E=L instanceof Text?L.parentNode:L;let D=parseInt(E==null?void 0:E.getAttribute("aria-posinset"),10)-1;if(isNaN(D))return console.warn("row is invalid. Race condition?"),null;const O=this._rowColumns.get(E);if(!O)return console.warn("columns is null. Race condition?"),null;let F=A<O.length?O[A]:O.slice(-1)[0]+1;return F>=this._terminal.cols&&(++D,F=0),{row:D,column:F}},y=v(l),m=v(S);if(y&&m){if(y.row>m.row||y.row===m.row&&y.column>=m.column)throw new Error("invalid range");this._terminal.select(y.column,y.row,(m.row-y.row)*this._terminal.cols-y.column+m.column)}}_handleResize(o){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let l=this._rowContainer.children.length;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);for(;this._rowElements.length>o;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const o=this._coreBrowserService.mainDocument.createElement("div");return o.setAttribute("role","listitem"),o.tabIndex=-1,this._refreshRowDimensions(o),o}_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 o=0;o<this._terminal.rows;o++)this._refreshRowDimensions(this._rowElements[o])}}_refreshRowDimensions(o){o.style.height=`${this._renderService.dimensions.css.cell.height}px`}};n.AccessibilityManager=h=f([_(1,c.IInstantiationService),_(2,w.ICoreBrowserService),_(3,w.IRenderService)],h)},3614:($,n)=>{function u(p){return p.replace(/\r?\n/g,"\r")}function f(p,b){return b?"\x1B[200~"+p+"\x1B[201~":p}function _(p,b,w,c){p=f(p=u(p),w.decPrivateModes.bracketedPasteMode&&c.rawOptions.ignoreBracketedPasteMode!==!0),w.triggerDataEvent(p,!0),b.value=""}function a(p,b,w){const c=w.getBoundingClientRect(),r=p.clientX-c.left-10,h=p.clientY-c.top-10;b.style.width="20px",b.style.height="20px",b.style.left=`${r}px`,b.style.top=`${h}px`,b.style.zIndex="1000",b.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=u,n.bracketTextForPaste=f,n.copyHandler=function(p,b){p.clipboardData&&p.clipboardData.setData("text/plain",b.selectionText),p.preventDefault()},n.handlePasteEvent=function(p,b,w,c){p.stopPropagation(),p.clipboardData&&_(p.clipboardData.getData("text/plain"),b,w,c)},n.paste=_,n.moveTextAreaUnderMouseCursor=a,n.rightClickHandler=function(p,b,w,c,r){a(p,b,w),r&&c.rightClickSelect(p),b.value=c.selectionText,b.select()}},7239:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorContrastCache=void 0;const f=u(1505);n.ColorContrastCache=class{constructor(){this._color=new f.TwoKeyMap,this._css=new f.TwoKeyMap}setCss(_,a,p){this._css.set(_,a,p)}getCss(_,a){return this._css.get(_,a)}setColor(_,a,p){this._color.set(_,a,p)}getColor(_,a){return this._color.get(_,a)}clear(){this._color.clear(),this._css.clear()}}},3656:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(u,f,_,a){u.addEventListener(f,_,a);let p=!1;return{dispose:()=>{p||(p=!0,u.removeEventListener(f,_,a))}}}},3551:function($,n,u){var f=this&&this.__decorate||function(h,o,l,S){var x,v=arguments.length,y=v<3?o:S===null?S=Object.getOwnPropertyDescriptor(o,l):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(h,o,l,S);else for(var m=h.length-1;m>=0;m--)(x=h[m])&&(y=(v<3?x(y):v>3?x(o,l,y):x(o,l))||y);return v>3&&y&&Object.defineProperty(o,l,y),y},_=this&&this.__param||function(h,o){return function(l,S){o(l,S,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Linkifier=void 0;const a=u(3656),p=u(8460),b=u(844),w=u(2585),c=u(4725);let r=n.Linkifier=class extends b.Disposable{get currentLink(){return this._currentLink}constructor(h,o,l,S,x){super(),this._element=h,this._mouseService=o,this._renderService=l,this._bufferService=S,this._linkProviderService=x,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,b.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,b.toDisposable)((()=>{var v;this._lastMouseEvent=void 0,(v=this._activeProviderReplies)==null||v.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,a.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,a.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,a.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,a.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(h){this._lastMouseEvent=h;const o=this._positionFromMouseEvent(h,this._element,this._mouseService);if(!o)return;this._isMouseOut=!1;const l=h.composedPath();for(let S=0;S<l.length;S++){const x=l[S];if(x.classList.contains("xterm"))break;if(x.classList.contains("xterm-hover"))return}this._lastBufferCell&&o.x===this._lastBufferCell.x&&o.y===this._lastBufferCell.y||(this._handleHover(o),this._lastBufferCell=o)}_handleHover(h){if(this._activeLine!==h.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(h,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,h)||(this._clearCurrentLink(),this._askForLink(h,!0))}_askForLink(h,o){var S,x;this._activeProviderReplies&&o||((S=this._activeProviderReplies)==null||S.forEach((v=>{v==null||v.forEach((y=>{y.link.dispose&&y.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=h.y);let l=!1;for(const[v,y]of this._linkProviderService.linkProviders.entries())o?(x=this._activeProviderReplies)!=null&&x.get(v)&&(l=this._checkLinkProviderResult(v,h,l)):y.provideLinks(h.y,(m=>{var L,A;if(this._isMouseOut)return;const C=m==null?void 0:m.map((E=>({link:E})));(L=this._activeProviderReplies)==null||L.set(v,C),l=this._checkLinkProviderResult(v,h,l),((A=this._activeProviderReplies)==null?void 0:A.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(h.y,this._activeProviderReplies)}))}_removeIntersectingLinks(h,o){const l=new Set;for(let S=0;S<o.size;S++){const x=o.get(S);if(x)for(let v=0;v<x.length;v++){const y=x[v],m=y.link.range.start.y<h?0:y.link.range.start.x,C=y.link.range.end.y>h?this._bufferService.cols:y.link.range.end.x;for(let L=m;L<=C;L++){if(l.has(L)){x.splice(v--,1);break}l.add(L)}}}}_checkLinkProviderResult(h,o,l){var v;if(!this._activeProviderReplies)return l;const S=this._activeProviderReplies.get(h);let x=!1;for(let y=0;y<h;y++)this._activeProviderReplies.has(y)&&!this._activeProviderReplies.get(y)||(x=!0);if(!x&&S){const y=S.find((m=>this._linkAtPosition(m.link,o)));y&&(l=!0,this._handleNewLink(y))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!l)for(let y=0;y<this._activeProviderReplies.size;y++){const m=(v=this._activeProviderReplies.get(y))==null?void 0:v.find((C=>this._linkAtPosition(C.link,o)));if(m){l=!0,this._handleNewLink(m);break}}return l}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(h){if(!this._currentLink)return;const o=this._positionFromMouseEvent(h,this._element,this._mouseService);o&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,o)&&this._currentLink.link.activate(h,this._currentLink.link.text)}_clearCurrentLink(h,o){this._currentLink&&this._lastMouseEvent&&(!h||!o||this._currentLink.link.range.start.y>=h&&this._currentLink.link.range.end.y<=o)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,b.disposeArray)(this._linkCacheDisposables))}_handleNewLink(h){if(!this._lastMouseEvent)return;const o=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);o&&this._linkAtPosition(h.link,o)&&(this._currentLink=h,this._currentLink.state={decorations:{underline:h.link.decorations===void 0||h.link.decorations.underline,pointerCursor:h.link.decorations===void 0||h.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,h.link,this._lastMouseEvent),h.link.decorations={},Object.defineProperties(h.link.decorations,{pointerCursor:{get:()=>{var l,S;return(S=(l=this._currentLink)==null?void 0:l.state)==null?void 0:S.decorations.pointerCursor},set:l=>{var S;(S=this._currentLink)!=null&&S.state&&this._currentLink.state.decorations.pointerCursor!==l&&(this._currentLink.state.decorations.pointerCursor=l,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",l))}},underline:{get:()=>{var l,S;return(S=(l=this._currentLink)==null?void 0:l.state)==null?void 0:S.decorations.underline},set:l=>{var S,x,v;(S=this._currentLink)!=null&&S.state&&((v=(x=this._currentLink)==null?void 0:x.state)==null?void 0:v.decorations.underline)!==l&&(this._currentLink.state.decorations.underline=l,this._currentLink.state.isHovered&&this._fireUnderlineEvent(h.link,l))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((l=>{if(!this._currentLink)return;const S=l.start===0?0:l.start+1+this._bufferService.buffer.ydisp,x=this._bufferService.buffer.ydisp+1+l.end;if(this._currentLink.link.range.start.y>=S&&this._currentLink.link.range.end.y<=x&&(this._clearCurrentLink(S,x),this._lastMouseEvent)){const v=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);v&&this._askForLink(v,!1)}}))))}_linkHover(h,o,l){var S;(S=this._currentLink)!=null&&S.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!0),this._currentLink.state.decorations.pointerCursor&&h.classList.add("xterm-cursor-pointer")),o.hover&&o.hover(l,o.text)}_fireUnderlineEvent(h,o){const l=h.range,S=this._bufferService.buffer.ydisp,x=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-S-1,l.end.x,l.end.y-S-1,void 0);(o?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(x)}_linkLeave(h,o,l){var S;(S=this._currentLink)!=null&&S.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!1),this._currentLink.state.decorations.pointerCursor&&h.classList.remove("xterm-cursor-pointer")),o.leave&&o.leave(l,o.text)}_linkAtPosition(h,o){const l=h.range.start.y*this._bufferService.cols+h.range.start.x,S=h.range.end.y*this._bufferService.cols+h.range.end.x,x=o.y*this._bufferService.cols+o.x;return l<=x&&x<=S}_positionFromMouseEvent(h,o,l){const S=l.getCoords(h,o,this._bufferService.cols,this._bufferService.rows);if(S)return{x:S[0],y:S[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(h,o,l,S,x){return{x1:h,y1:o,x2:l,y2:S,cols:this._bufferService.cols,fg:x}}};n.Linkifier=r=f([_(1,c.IMouseService),_(2,c.IRenderService),_(3,w.IBufferService),_(4,c.ILinkProviderService)],r)},9042:($,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($,n,u){var f=this&&this.__decorate||function(c,r,h,o){var l,S=arguments.length,x=S<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,r,h,o);else for(var v=c.length-1;v>=0;v--)(l=c[v])&&(x=(S<3?l(x):S>3?l(r,h,x):l(r,h))||x);return S>3&&x&&Object.defineProperty(r,h,x),x},_=this&&this.__param||function(c,r){return function(h,o){r(h,o,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkProvider=void 0;const a=u(511),p=u(2585);let b=n.OscLinkProvider=class{constructor(c,r,h){this._bufferService=c,this._optionsService=r,this._oscLinkService=h}provideLinks(c,r){var C;const h=this._bufferService.buffer.lines.get(c-1);if(!h)return void r(void 0);const o=[],l=this._optionsService.rawOptions.linkHandler,S=new a.CellData,x=h.getTrimmedLength();let v=-1,y=-1,m=!1;for(let L=0;L<x;L++)if(y!==-1||h.hasContent(L)){if(h.loadCell(L,S),S.hasExtendedAttrs()&&S.extended.urlId){if(y===-1){y=L,v=S.extended.urlId;continue}m=S.extended.urlId!==v}else y!==-1&&(m=!0);if(m||y!==-1&&L===x-1){const A=(C=this._oscLinkService.getLinkData(v))==null?void 0:C.uri;if(A){const E={start:{x:y+1,y:c},end:{x:L+(m||L!==x-1?0:1),y:c}};let D=!1;if(!(l!=null&&l.allowNonHttpProtocols))try{const O=new URL(A);["http:","https:"].includes(O.protocol)||(D=!0)}catch{D=!0}D||o.push({text:A,range:E,activate:(O,F)=>l?l.activate(O,F,E):w(0,F),hover:(O,F)=>{var N;return(N=l==null?void 0:l.hover)==null?void 0:N.call(l,O,F,E)},leave:(O,F)=>{var N;return(N=l==null?void 0:l.leave)==null?void 0:N.call(l,O,F,E)}})}m=!1,S.hasExtendedAttrs()&&S.extended.urlId?(y=L,v=S.extended.urlId):(y=-1,v=-1)}}r(o)}};function w(c,r){if(confirm(`Do you want to navigate to ${r}?
48
+ `+s.stack}}var Ot=Object.prototype.hasOwnProperty,Se=U.unstable_scheduleCallback,pe=U.unstable_cancelCallback,me=U.unstable_shouldYield,ce=U.unstable_requestPaint,ge=U.unstable_now,ze=U.unstable_getCurrentPriorityLevel,Re=U.unstable_ImmediatePriority,_t=U.unstable_UserBlockingPriority,Qe=U.unstable_NormalPriority,it=U.unstable_LowPriority,Ie=U.unstable_IdlePriority,Ae=U.log,Le=U.unstable_setDisableYieldValue,xt=null,tt=null;function vt(e){if(typeof Ae=="function"&&Le(e),tt&&typeof tt.setStrictMode=="function")try{tt.setStrictMode(xt,e)}catch{}}var ut=Math.clz32?Math.clz32:ir,Zt=Math.log,tr=Math.LN2;function ir(e){return e>>>=0,e===0?32:31-(Zt(e)/tr|0)|0}var jt=256,si=262144,ri=4194304;function Jt(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 Qr(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var d=0,g=e.suspendedLanes,A=e.pingedLanes;e=e.warmLanes;var k=s&134217727;return k!==0?(s=k&~g,s!==0?d=Jt(s):(A&=k,A!==0?d=Jt(A):i||(i=k&~e,i!==0&&(d=Jt(i))))):(k=s&~g,k!==0?d=Jt(k):A!==0?d=Jt(A):i||(i=s&~e,i!==0&&(d=Jt(i)))),d===0?0:t!==0&&t!==d&&(t&g)===0&&(g=d&-d,i=t&-t,g>=i||g===32&&(i&4194048)!==0)?t:d}function sr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function gf(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 $o(){var e=ri;return ri<<=1,(ri&62914560)===0&&(ri=4194304),e}function va(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function rr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function pf(e,t,i,s,d,g){var A=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 k=e.entanglements,W=e.expirationTimes,te=e.hiddenUpdates;for(i=A&~i;0<i;){var le=31-ut(i),he=1<<le;k[le]=0,W[le]=-1;var re=te[le];if(re!==null)for(te[le]=null,le=0;le<re.length;le++){var ae=re[le];ae!==null&&(ae.lane&=-536870913)}i&=~he}s!==0&&qo(e,s,0),g!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=g&~(A&~t))}function qo(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-ut(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Wo(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-ut(i),d=1<<s;d&t|e[s]&t&&(e[s]|=t),i&=~d}}function Go(e,t){var i=t&-t;return i=(i&42)!==0?1:ga(i),(i&(e.suspendedLanes|t))!==0?0:i}function ga(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 pa(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Xo(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:Bd(e.type))}function Vo(e,t){var i=I.p;try{return I.p=e,t()}finally{I.p=i}}var Ai=Math.random().toString(36).slice(2),mt="__reactFiber$"+Ai,Et="__reactProps$"+Ai,gs="__reactContainer$"+Ai,ma="__reactEvents$"+Ai,mf="__reactListeners$"+Ai,Sf="__reactHandles$"+Ai,Yo="__reactResources$"+Ai,nr="__reactMarker$"+Ai;function Sa(e){delete e[mt],delete e[Et],delete e[ma],delete e[mf],delete e[Sf]}function ps(e){var t=e[mt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[gs]||i[mt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=gd(e);e!==null;){if(i=e[mt])return i;e=gd(e)}return t}e=i,i=e.parentNode}return null}function ms(e){if(e=e[mt]||e[gs]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ar(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(P(33))}function Ss(e){var t=e[Yo];return t||(t=e[Yo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function gt(e){e[nr]=!0}var Ko=new Set,Qo={};function Zi(e,t){Cs(e,t),Cs(e+"Capture",t)}function Cs(e,t){for(Qo[e]=t,e=0;e<t.length;e++)Ko.add(t[e])}var Cf=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]*$"),Zo={},Jo={};function yf(e){return Ot.call(Jo,e)?!0:Ot.call(Zo,e)?!1:Cf.test(e)?Jo[e]=!0:(Zo[e]=!0,!1)}function Zr(e,t,i){if(yf(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function Jr(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 hi(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+s)}}function Ft(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ec(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bf(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var d=s.get,g=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return d.call(this)},set:function(A){i=""+A,g.call(this,A)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(A){i=""+A},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ca(e){if(!e._valueTracker){var t=ec(e)?"checked":"value";e._valueTracker=bf(e,t,""+e[t])}}function tc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=ec(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function en(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 wf=/[\n"\\]/g;function $t(e){return e.replace(wf,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ya(e,t,i,s,d,g,A,k){e.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?e.type=A:e.removeAttribute("type"),t!=null?A==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ft(t)):e.value!==""+Ft(t)&&(e.value=""+Ft(t)):A!=="submit"&&A!=="reset"||e.removeAttribute("value"),t!=null?ba(e,A,Ft(t)):i!=null?ba(e,A,Ft(i)):s!=null&&e.removeAttribute("value"),d==null&&g!=null&&(e.defaultChecked=!!g),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?e.name=""+Ft(k):e.removeAttribute("name")}function ic(e,t,i,s,d,g,A,k){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.type=g),t!=null||i!=null){if(!(g!=="submit"&&g!=="reset"||t!=null)){Ca(e);return}i=i!=null?""+Ft(i):"",t=t!=null?""+Ft(t):i,k||t===e.value||(e.value=t),e.defaultValue=t}s=s??d,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=k?e.checked:!!s,e.defaultChecked=!!s,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(e.name=A),Ca(e)}function ba(e,t,i){t==="number"&&en(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function ys(e,t,i,s){if(e=e.options,t){t={};for(var d=0;d<i.length;d++)t["$"+i[d]]=!0;for(i=0;i<e.length;i++)d=t.hasOwnProperty("$"+e[i].value),e[i].selected!==d&&(e[i].selected=d),d&&s&&(e[i].defaultSelected=!0)}else{for(i=""+Ft(i),t=null,d=0;d<e.length;d++){if(e[d].value===i){e[d].selected=!0,s&&(e[d].defaultSelected=!0);return}t!==null||e[d].disabled||(t=e[d])}t!==null&&(t.selected=!0)}}function sc(e,t,i){if(t!=null&&(t=""+Ft(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Ft(i):""}function rc(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(P(92));if($(s)){if(1<s.length)throw Error(P(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=Ft(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),Ca(e)}function bs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var xf=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 nc(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||xf.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function ac(e,t,i){if(t!=null&&typeof t!="object")throw Error(P(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var d in t)s=t[d],t.hasOwnProperty(d)&&i[d]!==s&&nc(e,d,s)}else for(var g in t)t.hasOwnProperty(g)&&nc(e,g,t[g])}function wa(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 Lf=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"]]),Ef=/^[\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 tn(e){return Ef.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ui(){}var xa=null;function La(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ws=null,xs=null;function lc(e){var t=ms(e);if(t&&(e=t.stateNode)){var i=e[Et]||null;e:switch(e=t.stateNode,t.type){case"input":if(ya(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="'+$t(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var d=s[Et]||null;if(!d)throw Error(P(90));ya(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&tc(s)}break e;case"textarea":sc(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&ys(e,!!i.multiple,t,!1)}}}var Ea=!1;function oc(e,t,i){if(Ea)return e(t,i);Ea=!0;try{var s=e(t);return s}finally{if(Ea=!1,(ws!==null||xs!==null)&&($n(),ws&&(t=ws,e=xs,xs=ws=null,lc(t),e)))for(t=0;t<e.length;t++)lc(e[t])}}function lr(e,t){var i=e.stateNode;if(i===null)return null;var s=i[Et]||null;if(s===null)return null;i=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(P(231,t,typeof i));return i}var di=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ma=!1;if(di)try{var or={};Object.defineProperty(or,"passive",{get:function(){Ma=!0}}),window.addEventListener("test",or,or),window.removeEventListener("test",or,or)}catch{Ma=!1}var Ri=null,Aa=null,sn=null;function cc(){if(sn)return sn;var e,t=Aa,i=t.length,s,d="value"in Ri?Ri.value:Ri.textContent,g=d.length;for(e=0;e<i&&t[e]===d[e];e++);var A=i-e;for(s=1;s<=A&&t[i-s]===d[g-s];s++);return sn=d.slice(e,1<s?1-s:void 0)}function rn(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 nn(){return!0}function hc(){return!1}function Mt(e){function t(i,s,d,g,A){this._reactName=i,this._targetInst=d,this.type=s,this.nativeEvent=g,this.target=A,this.currentTarget=null;for(var k in e)e.hasOwnProperty(k)&&(i=e[k],this[k]=i?i(g):g[k]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?nn:hc,this.isPropagationStopped=hc,this}return a(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=nn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var Ji={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},an=Mt(Ji),cr=a({},Ji,{view:0,detail:0}),Mf=Mt(cr),Ra,Da,hr,ln=a({},cr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ba,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!==hr&&(hr&&e.type==="mousemove"?(Ra=e.screenX-hr.screenX,Da=e.screenY-hr.screenY):Da=Ra=0,hr=e),Ra)},movementY:function(e){return"movementY"in e?e.movementY:Da}}),uc=Mt(ln),Af=a({},ln,{dataTransfer:0}),Rf=Mt(Af),Df=a({},cr,{relatedTarget:0}),Ta=Mt(Df),Tf=a({},Ji,{animationName:0,elapsedTime:0,pseudoElement:0}),Bf=Mt(Tf),Of=a({},Ji,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kf=Mt(Of),Hf=a({},Ji,{data:0}),dc=Mt(Hf),zf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nf={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"},Uf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function If(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Uf[e])?!!t[e]:!1}function Ba(){return If}var Pf=a({},cr,{key:function(e){if(e.key){var t=zf[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=rn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Nf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ba,charCode:function(e){return e.type==="keypress"?rn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?rn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),jf=Mt(Pf),Ff=a({},ln,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fc=Mt(Ff),$f=a({},cr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ba}),qf=Mt($f),Wf=a({},Ji,{propertyName:0,elapsedTime:0,pseudoElement:0}),Gf=Mt(Wf),Xf=a({},ln,{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}),Vf=Mt(Xf),Yf=a({},Ji,{newState:0,oldState:0}),Kf=Mt(Yf),Qf=[9,13,27,32],Oa=di&&"CompositionEvent"in window,ur=null;di&&"documentMode"in document&&(ur=document.documentMode);var Zf=di&&"TextEvent"in window&&!ur,_c=di&&(!Oa||ur&&8<ur&&11>=ur),vc=" ",gc=!1;function pc(e,t){switch(e){case"keyup":return Qf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ls=!1;function Jf(e,t){switch(e){case"compositionend":return mc(t);case"keypress":return t.which!==32?null:(gc=!0,vc);case"textInput":return e=t.data,e===vc&&gc?null:e;default:return null}}function e_(e,t){if(Ls)return e==="compositionend"||!Oa&&pc(e,t)?(e=cc(),sn=Aa=Ri=null,Ls=!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 _c&&t.locale!=="ko"?null:t.data;default:return null}}var t_={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 Sc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!t_[e.type]:t==="textarea"}function Cc(e,t,i,s){ws?xs?xs.push(s):xs=[s]:ws=s,t=Kn(t,"onChange"),0<t.length&&(i=new an("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var dr=null,fr=null;function i_(e){id(e,0)}function on(e){var t=ar(e);if(tc(t))return e}function yc(e,t){if(e==="change")return t}var bc=!1;if(di){var ka;if(di){var Ha="oninput"in document;if(!Ha){var wc=document.createElement("div");wc.setAttribute("oninput","return;"),Ha=typeof wc.oninput=="function"}ka=Ha}else ka=!1;bc=ka&&(!document.documentMode||9<document.documentMode)}function xc(){dr&&(dr.detachEvent("onpropertychange",Lc),fr=dr=null)}function Lc(e){if(e.propertyName==="value"&&on(fr)){var t=[];Cc(t,fr,e,La(e)),oc(i_,t)}}function s_(e,t,i){e==="focusin"?(xc(),dr=t,fr=i,dr.attachEvent("onpropertychange",Lc)):e==="focusout"&&xc()}function r_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return on(fr)}function n_(e,t){if(e==="click")return on(t)}function a_(e,t){if(e==="input"||e==="change")return on(t)}function l_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:l_;function _r(e,t){if(kt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var d=i[s];if(!Ot.call(t,d)||!kt(e[d],t[d]))return!1}return!0}function Ec(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mc(e,t){var i=Ec(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Ec(i)}}function Ac(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ac(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=en(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=en(e.document)}return t}function za(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 o_=di&&"documentMode"in document&&11>=document.documentMode,Es=null,Na=null,vr=null,Ua=!1;function Dc(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ua||Es==null||Es!==en(s)||(s=Es,"selectionStart"in s&&za(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),vr&&_r(vr,s)||(vr=s,s=Kn(Na,"onSelect"),0<s.length&&(t=new an("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Es)))}function es(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Ms={animationend:es("Animation","AnimationEnd"),animationiteration:es("Animation","AnimationIteration"),animationstart:es("Animation","AnimationStart"),transitionrun:es("Transition","TransitionRun"),transitionstart:es("Transition","TransitionStart"),transitioncancel:es("Transition","TransitionCancel"),transitionend:es("Transition","TransitionEnd")},Ia={},Tc={};di&&(Tc=document.createElement("div").style,"AnimationEvent"in window||(delete Ms.animationend.animation,delete Ms.animationiteration.animation,delete Ms.animationstart.animation),"TransitionEvent"in window||delete Ms.transitionend.transition);function ts(e){if(Ia[e])return Ia[e];if(!Ms[e])return e;var t=Ms[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Tc)return Ia[e]=t[i];return e}var Bc=ts("animationend"),Oc=ts("animationiteration"),kc=ts("animationstart"),c_=ts("transitionrun"),h_=ts("transitionstart"),u_=ts("transitioncancel"),Hc=ts("transitionend"),zc=new Map,Pa="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(" ");Pa.push("scrollEnd");function ei(e,t){zc.set(e,t),Zi(t,[e])}var cn=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)},qt=[],As=0,ja=0;function hn(){for(var e=As,t=ja=As=0;t<e;){var i=qt[t];qt[t++]=null;var s=qt[t];qt[t++]=null;var d=qt[t];qt[t++]=null;var g=qt[t];if(qt[t++]=null,s!==null&&d!==null){var A=s.pending;A===null?d.next=d:(d.next=A.next,A.next=d),s.pending=d}g!==0&&Nc(i,d,g)}}function un(e,t,i,s){qt[As++]=e,qt[As++]=t,qt[As++]=i,qt[As++]=s,ja|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Fa(e,t,i,s){return un(e,t,i,s),dn(e)}function is(e,t){return un(e,null,null,t),dn(e)}function Nc(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var d=!1,g=e.return;g!==null;)g.childLanes|=i,s=g.alternate,s!==null&&(s.childLanes|=i),g.tag===22&&(e=g.stateNode,e===null||e._visibility&1||(d=!0)),e=g,g=g.return;return e.tag===3?(g=e.stateNode,d&&t!==null&&(d=31-ut(i),e=g.hiddenUpdates,s=e[d],s===null?e[d]=[t]:s.push(t),t.lane=i|536870912),g):null}function dn(e){if(50<Nr)throw Nr=0,Ql=null,Error(P(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Rs={};function d_(e,t,i,s){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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ht(e,t,i,s){return new d_(e,t,i,s)}function $a(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fi(e,t){var i=e.alternate;return i===null?(i=Ht(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 Uc(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 fn(e,t,i,s,d,g){var A=0;if(s=e,typeof e=="function")$a(e)&&(A=1);else if(typeof e=="string")A=pv(e,i,Q.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case C:return e=Ht(31,i,t,d),e.elementType=C,e.lanes=g,e;case o:return ss(i.children,d,g,t);case r:A=8,d|=24;break;case h:return e=Ht(12,i,t,d|2),e.elementType=h,e.lanes=g,e;case x:return e=Ht(13,i,t,d),e.elementType=x,e.lanes=g,e;case v:return e=Ht(19,i,t,d),e.elementType=v,e.lanes=g,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l:A=10;break e;case c:A=9;break e;case S:A=11;break e;case b:A=14;break e;case m:A=16,s=null;break e}A=29,i=Error(P(130,e===null?"null":typeof e,"")),s=null}return t=Ht(A,i,t,d),t.elementType=e,t.type=s,t.lanes=g,t}function ss(e,t,i,s){return e=Ht(7,e,s,t),e.lanes=i,e}function qa(e,t,i){return e=Ht(6,e,null,t),e.lanes=i,e}function Ic(e){var t=Ht(18,null,null,0);return t.stateNode=e,t}function Wa(e,t,i){return t=Ht(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Pc=new WeakMap;function Wt(e,t){if(typeof e=="object"&&e!==null){var i=Pc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:ft(t)},Pc.set(e,t),t)}return{value:e,source:t,stack:ft(t)}}var Ds=[],Ts=0,_n=null,gr=0,Gt=[],Xt=0,Di=null,ni=1,ai="";function _i(e,t){Ds[Ts++]=gr,Ds[Ts++]=_n,_n=e,gr=t}function jc(e,t,i){Gt[Xt++]=ni,Gt[Xt++]=ai,Gt[Xt++]=Di,Di=e;var s=ni;e=ai;var d=32-ut(s)-1;s&=~(1<<d),i+=1;var g=32-ut(t)+d;if(30<g){var A=d-d%5;g=(s&(1<<A)-1).toString(32),s>>=A,d-=A,ni=1<<32-ut(t)+d|i<<d|s,ai=g+e}else ni=1<<g|i<<d|s,ai=e}function Ga(e){e.return!==null&&(_i(e,1),jc(e,1,0))}function Xa(e){for(;e===_n;)_n=Ds[--Ts],Ds[Ts]=null,gr=Ds[--Ts],Ds[Ts]=null;for(;e===Di;)Di=Gt[--Xt],Gt[Xt]=null,ai=Gt[--Xt],Gt[Xt]=null,ni=Gt[--Xt],Gt[Xt]=null}function Fc(e,t){Gt[Xt++]=ni,Gt[Xt++]=ai,Gt[Xt++]=Di,ni=t.id,ai=t.overflow,Di=e}var St=null,Ze=null,Pe=!1,Ti=null,Vt=!1,Va=Error(P(519));function Bi(e){var t=Error(P(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw pr(Wt(t,e)),Va}function $c(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[mt]=e,t[Et]=s,i){case"dialog":He("cancel",t),He("close",t);break;case"iframe":case"object":case"embed":He("load",t);break;case"video":case"audio":for(i=0;i<Ir.length;i++)He(Ir[i],t);break;case"source":He("error",t);break;case"img":case"image":case"link":He("error",t),He("load",t);break;case"details":He("toggle",t);break;case"input":He("invalid",t),ic(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":He("invalid",t);break;case"textarea":He("invalid",t),rc(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||ad(t.textContent,i)?(s.popover!=null&&(He("beforetoggle",t),He("toggle",t)),s.onScroll!=null&&He("scroll",t),s.onScrollEnd!=null&&He("scrollend",t),s.onClick!=null&&(t.onclick=ui),t=!0):t=!1,t||Bi(e,!0)}function qc(e){for(St=e.return;St;)switch(St.tag){case 5:case 31:case 13:Vt=!1;return;case 27:case 3:Vt=!0;return;default:St=St.return}}function Bs(e){if(e!==St)return!1;if(!Pe)return qc(e),Pe=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||fo(e.type,e.memoizedProps)),i=!i),i&&Ze&&Bi(e),qc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));Ze=vd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));Ze=vd(e)}else t===27?(t=Ze,Gi(e.type)?(e=mo,mo=null,Ze=e):Ze=t):Ze=St?Kt(e.stateNode.nextSibling):null;return!0}function rs(){Ze=St=null,Pe=!1}function Ya(){var e=Ti;return e!==null&&(Tt===null?Tt=e:Tt.push.apply(Tt,e),Ti=null),e}function pr(e){Ti===null?Ti=[e]:Ti.push(e)}var Ka=T(null),ns=null,vi=null;function Oi(e,t,i){V(Ka,t._currentValue),t._currentValue=i}function gi(e){e._currentValue=Ka.current,H(Ka)}function Qa(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function Za(e,t,i,s){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var g=d.dependencies;if(g!==null){var A=d.child;g=g.firstContext;e:for(;g!==null;){var k=g;g=d;for(var W=0;W<t.length;W++)if(k.context===t[W]){g.lanes|=i,k=g.alternate,k!==null&&(k.lanes|=i),Qa(g.return,i,e),s||(A=null);break e}g=k.next}}else if(d.tag===18){if(A=d.return,A===null)throw Error(P(341));A.lanes|=i,g=A.alternate,g!==null&&(g.lanes|=i),Qa(A,i,e),A=null}else A=d.child;if(A!==null)A.return=d;else for(A=d;A!==null;){if(A===e){A=null;break}if(d=A.sibling,d!==null){d.return=A.return,A=d;break}A=A.return}d=A}}function Os(e,t,i,s){e=null;for(var d=t,g=!1;d!==null;){if(!g){if((d.flags&524288)!==0)g=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var A=d.alternate;if(A===null)throw Error(P(387));if(A=A.memoizedProps,A!==null){var k=d.type;kt(d.pendingProps.value,A.value)||(e!==null?e.push(k):e=[k])}}else if(d===q.current){if(A=d.alternate,A===null)throw Error(P(387));A.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(qr):e=[qr])}d=d.return}e!==null&&Za(t,e,i,s),t.flags|=262144}function vn(e){for(e=e.firstContext;e!==null;){if(!kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function as(e){ns=e,vi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ct(e){return Wc(ns,e)}function gn(e,t){return ns===null&&as(e),Wc(e,t)}function Wc(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},vi===null){if(e===null)throw Error(P(308));vi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else vi=vi.next=t;return i}var f_=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},__=U.unstable_scheduleCallback,v_=U.unstable_NormalPriority,lt={$$typeof:l,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ja(){return{controller:new f_,data:new Map,refCount:0}}function mr(e){e.refCount--,e.refCount===0&&__(v_,function(){e.controller.abort()})}var Sr=null,el=0,ks=0,Hs=null;function g_(e,t){if(Sr===null){var i=Sr=[];el=0,ks=so(),Hs={status:"pending",value:void 0,then:function(s){i.push(s)}}}return el++,t.then(Gc,Gc),t}function Gc(){if(--el===0&&Sr!==null){Hs!==null&&(Hs.status="fulfilled");var e=Sr;Sr=null,ks=0,Hs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function p_(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(d){i.push(d)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var d=0;d<i.length;d++)(0,i[d])(t)},function(d){for(s.status="rejected",s.reason=d,d=0;d<i.length;d++)(0,i[d])(void 0)}),s}var Xc=N.S;N.S=function(e,t){Du=ge(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&g_(e,t),Xc!==null&&Xc(e,t)};var ls=T(null);function tl(){var e=ls.current;return e!==null?e:Ke.pooledCache}function pn(e,t){t===null?V(ls,ls.current):V(ls,t.pool)}function Vc(){var e=tl();return e===null?null:{parent:lt._currentValue,pool:e}}var zs=Error(P(460)),il=Error(P(474)),mn=Error(P(542)),Sn={then:function(){}};function Yc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Kc(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(ui,ui),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Zc(e),e;default:if(typeof t.status=="string")t.then(ui,ui);else{if(e=Ke,e!==null&&100<e.shellSuspendCounter)throw Error(P(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var d=t;d.status="fulfilled",d.value=s}},function(s){if(t.status==="pending"){var d=t;d.status="rejected",d.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Zc(e),e}throw cs=t,zs}}function os(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(cs=i,zs):i}}var cs=null;function Qc(){if(cs===null)throw Error(P(459));var e=cs;return cs=null,e}function Zc(e){if(e===zs||e===mn)throw Error(P(483))}var Ns=null,Cr=0;function Cn(e){var t=Cr;return Cr+=1,Ns===null&&(Ns=[]),Kc(Ns,e,t)}function yr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function yn(e,t){throw t.$$typeof===p?Error(P(525)):(e=Object.prototype.toString.call(t),Error(P(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Jc(e){function t(J,Y){if(e){var ee=J.deletions;ee===null?(J.deletions=[Y],J.flags|=16):ee.push(Y)}}function i(J,Y){if(!e)return null;for(;Y!==null;)t(J,Y),Y=Y.sibling;return null}function s(J){for(var Y=new Map;J!==null;)J.key!==null?Y.set(J.key,J):Y.set(J.index,J),J=J.sibling;return Y}function d(J,Y){return J=fi(J,Y),J.index=0,J.sibling=null,J}function g(J,Y,ee){return J.index=ee,e?(ee=J.alternate,ee!==null?(ee=ee.index,ee<Y?(J.flags|=67108866,Y):ee):(J.flags|=67108866,Y)):(J.flags|=1048576,Y)}function A(J){return e&&J.alternate===null&&(J.flags|=67108866),J}function k(J,Y,ee,oe){return Y===null||Y.tag!==6?(Y=qa(ee,J.mode,oe),Y.return=J,Y):(Y=d(Y,ee),Y.return=J,Y)}function W(J,Y,ee,oe){var we=ee.type;return we===o?le(J,Y,ee.props.children,oe,ee.key):Y!==null&&(Y.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===m&&os(we)===Y.type)?(Y=d(Y,ee.props),yr(Y,ee),Y.return=J,Y):(Y=fn(ee.type,ee.key,ee.props,null,J.mode,oe),yr(Y,ee),Y.return=J,Y)}function te(J,Y,ee,oe){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==ee.containerInfo||Y.stateNode.implementation!==ee.implementation?(Y=Wa(ee,J.mode,oe),Y.return=J,Y):(Y=d(Y,ee.children||[]),Y.return=J,Y)}function le(J,Y,ee,oe,we){return Y===null||Y.tag!==7?(Y=ss(ee,J.mode,oe,we),Y.return=J,Y):(Y=d(Y,ee),Y.return=J,Y)}function he(J,Y,ee){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Y=qa(""+Y,J.mode,ee),Y.return=J,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case w:return ee=fn(Y.type,Y.key,Y.props,null,J.mode,ee),yr(ee,Y),ee.return=J,ee;case y:return Y=Wa(Y,J.mode,ee),Y.return=J,Y;case m:return Y=os(Y),he(J,Y,ee)}if($(Y)||E(Y))return Y=ss(Y,J.mode,ee,null),Y.return=J,Y;if(typeof Y.then=="function")return he(J,Cn(Y),ee);if(Y.$$typeof===l)return he(J,gn(J,Y),ee);yn(J,Y)}return null}function re(J,Y,ee,oe){var we=Y!==null?Y.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return we!==null?null:k(J,Y,""+ee,oe);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case w:return ee.key===we?W(J,Y,ee,oe):null;case y:return ee.key===we?te(J,Y,ee,oe):null;case m:return ee=os(ee),re(J,Y,ee,oe)}if($(ee)||E(ee))return we!==null?null:le(J,Y,ee,oe,null);if(typeof ee.then=="function")return re(J,Y,Cn(ee),oe);if(ee.$$typeof===l)return re(J,Y,gn(J,ee),oe);yn(J,ee)}return null}function ae(J,Y,ee,oe,we){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return J=J.get(ee)||null,k(Y,J,""+oe,we);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case w:return J=J.get(oe.key===null?ee:oe.key)||null,W(Y,J,oe,we);case y:return J=J.get(oe.key===null?ee:oe.key)||null,te(Y,J,oe,we);case m:return oe=os(oe),ae(J,Y,ee,oe,we)}if($(oe)||E(oe))return J=J.get(ee)||null,le(Y,J,oe,we,null);if(typeof oe.then=="function")return ae(J,Y,ee,Cn(oe),we);if(oe.$$typeof===l)return ae(J,Y,ee,gn(Y,oe),we);yn(Y,oe)}return null}function Ce(J,Y,ee,oe){for(var we=null,je=null,ye=Y,Be=Y=0,Ue=null;ye!==null&&Be<ee.length;Be++){ye.index>Be?(Ue=ye,ye=null):Ue=ye.sibling;var Fe=re(J,ye,ee[Be],oe);if(Fe===null){ye===null&&(ye=Ue);break}e&&ye&&Fe.alternate===null&&t(J,ye),Y=g(Fe,Y,Be),je===null?we=Fe:je.sibling=Fe,je=Fe,ye=Ue}if(Be===ee.length)return i(J,ye),Pe&&_i(J,Be),we;if(ye===null){for(;Be<ee.length;Be++)ye=he(J,ee[Be],oe),ye!==null&&(Y=g(ye,Y,Be),je===null?we=ye:je.sibling=ye,je=ye);return Pe&&_i(J,Be),we}for(ye=s(ye);Be<ee.length;Be++)Ue=ae(ye,J,Be,ee[Be],oe),Ue!==null&&(e&&Ue.alternate!==null&&ye.delete(Ue.key===null?Be:Ue.key),Y=g(Ue,Y,Be),je===null?we=Ue:je.sibling=Ue,je=Ue);return e&&ye.forEach(function(Qi){return t(J,Qi)}),Pe&&_i(J,Be),we}function Ee(J,Y,ee,oe){if(ee==null)throw Error(P(151));for(var we=null,je=null,ye=Y,Be=Y=0,Ue=null,Fe=ee.next();ye!==null&&!Fe.done;Be++,Fe=ee.next()){ye.index>Be?(Ue=ye,ye=null):Ue=ye.sibling;var Qi=re(J,ye,Fe.value,oe);if(Qi===null){ye===null&&(ye=Ue);break}e&&ye&&Qi.alternate===null&&t(J,ye),Y=g(Qi,Y,Be),je===null?we=Qi:je.sibling=Qi,je=Qi,ye=Ue}if(Fe.done)return i(J,ye),Pe&&_i(J,Be),we;if(ye===null){for(;!Fe.done;Be++,Fe=ee.next())Fe=he(J,Fe.value,oe),Fe!==null&&(Y=g(Fe,Y,Be),je===null?we=Fe:je.sibling=Fe,je=Fe);return Pe&&_i(J,Be),we}for(ye=s(ye);!Fe.done;Be++,Fe=ee.next())Fe=ae(ye,J,Be,Fe.value,oe),Fe!==null&&(e&&Fe.alternate!==null&&ye.delete(Fe.key===null?Be:Fe.key),Y=g(Fe,Y,Be),je===null?we=Fe:je.sibling=Fe,je=Fe);return e&&ye.forEach(function(Av){return t(J,Av)}),Pe&&_i(J,Be),we}function Ye(J,Y,ee,oe){if(typeof ee=="object"&&ee!==null&&ee.type===o&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case w:e:{for(var we=ee.key;Y!==null;){if(Y.key===we){if(we=ee.type,we===o){if(Y.tag===7){i(J,Y.sibling),oe=d(Y,ee.props.children),oe.return=J,J=oe;break e}}else if(Y.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===m&&os(we)===Y.type){i(J,Y.sibling),oe=d(Y,ee.props),yr(oe,ee),oe.return=J,J=oe;break e}i(J,Y);break}else t(J,Y);Y=Y.sibling}ee.type===o?(oe=ss(ee.props.children,J.mode,oe,ee.key),oe.return=J,J=oe):(oe=fn(ee.type,ee.key,ee.props,null,J.mode,oe),yr(oe,ee),oe.return=J,J=oe)}return A(J);case y:e:{for(we=ee.key;Y!==null;){if(Y.key===we)if(Y.tag===4&&Y.stateNode.containerInfo===ee.containerInfo&&Y.stateNode.implementation===ee.implementation){i(J,Y.sibling),oe=d(Y,ee.children||[]),oe.return=J,J=oe;break e}else{i(J,Y);break}else t(J,Y);Y=Y.sibling}oe=Wa(ee,J.mode,oe),oe.return=J,J=oe}return A(J);case m:return ee=os(ee),Ye(J,Y,ee,oe)}if($(ee))return Ce(J,Y,ee,oe);if(E(ee)){if(we=E(ee),typeof we!="function")throw Error(P(150));return ee=we.call(ee),Ee(J,Y,ee,oe)}if(typeof ee.then=="function")return Ye(J,Y,Cn(ee),oe);if(ee.$$typeof===l)return Ye(J,Y,gn(J,ee),oe);yn(J,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint"?(ee=""+ee,Y!==null&&Y.tag===6?(i(J,Y.sibling),oe=d(Y,ee),oe.return=J,J=oe):(i(J,Y),oe=qa(ee,J.mode,oe),oe.return=J,J=oe),A(J)):i(J,Y)}return function(J,Y,ee,oe){try{Cr=0;var we=Ye(J,Y,ee,oe);return Ns=null,we}catch(ye){if(ye===zs||ye===mn)throw ye;var je=Ht(29,ye,null,J.mode);return je.lanes=oe,je.return=J,je}finally{}}}var hs=Jc(!0),eh=Jc(!1),ki=!1;function sl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function rl(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 Hi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function zi(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,($e&2)!==0){var d=s.pending;return d===null?t.next=t:(t.next=d.next,d.next=t),s.pending=t,t=dn(e),Nc(e,null,i),t}return un(e,s,t,i),dn(e)}function br(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Wo(e,i)}}function nl(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var d=null,g=null;if(i=i.firstBaseUpdate,i!==null){do{var A={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};g===null?d=g=A:g=g.next=A,i=i.next}while(i!==null);g===null?d=g=t:g=g.next=t}else d=g=t;i={baseState:s.baseState,firstBaseUpdate:d,lastBaseUpdate:g,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var al=!1;function wr(){if(al){var e=Hs;if(e!==null)throw e}}function xr(e,t,i,s){al=!1;var d=e.updateQueue;ki=!1;var g=d.firstBaseUpdate,A=d.lastBaseUpdate,k=d.shared.pending;if(k!==null){d.shared.pending=null;var W=k,te=W.next;W.next=null,A===null?g=te:A.next=te,A=W;var le=e.alternate;le!==null&&(le=le.updateQueue,k=le.lastBaseUpdate,k!==A&&(k===null?le.firstBaseUpdate=te:k.next=te,le.lastBaseUpdate=W))}if(g!==null){var he=d.baseState;A=0,le=te=W=null,k=g;do{var re=k.lane&-536870913,ae=re!==k.lane;if(ae?(Ne&re)===re:(s&re)===re){re!==0&&re===ks&&(al=!0),le!==null&&(le=le.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Ce=e,Ee=k;re=t;var Ye=i;switch(Ee.tag){case 1:if(Ce=Ee.payload,typeof Ce=="function"){he=Ce.call(Ye,he,re);break e}he=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=Ee.payload,re=typeof Ce=="function"?Ce.call(Ye,he,re):Ce,re==null)break e;he=a({},he,re);break e;case 2:ki=!0}}re=k.callback,re!==null&&(e.flags|=64,ae&&(e.flags|=8192),ae=d.callbacks,ae===null?d.callbacks=[re]:ae.push(re))}else ae={lane:re,tag:k.tag,payload:k.payload,callback:k.callback,next:null},le===null?(te=le=ae,W=he):le=le.next=ae,A|=re;if(k=k.next,k===null){if(k=d.shared.pending,k===null)break;ae=k,k=ae.next,ae.next=null,d.lastBaseUpdate=ae,d.shared.pending=null}}while(!0);le===null&&(W=he),d.baseState=W,d.firstBaseUpdate=te,d.lastBaseUpdate=le,g===null&&(d.shared.lanes=0),ji|=A,e.lanes=A,e.memoizedState=he}}function th(e,t){if(typeof e!="function")throw Error(P(191,e));e.call(t)}function ih(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)th(i[e],t)}var Us=T(null),bn=T(0);function sh(e,t){e=Li,V(bn,e),V(Us,t),Li=e|t.baseLanes}function ll(){V(bn,Li),V(Us,Us.current)}function ol(){Li=bn.current,H(Us),H(bn)}var zt=T(null),Yt=null;function Ni(e){var t=e.alternate;V(nt,nt.current&1),V(zt,e),Yt===null&&(t===null||Us.current!==null||t.memoizedState!==null)&&(Yt=e)}function cl(e){V(nt,nt.current),V(zt,e),Yt===null&&(Yt=e)}function rh(e){e.tag===22?(V(nt,nt.current),V(zt,e),Yt===null&&(Yt=e)):Ui()}function Ui(){V(nt,nt.current),V(zt,zt.current)}function Nt(e){H(zt),Yt===e&&(Yt=null),H(nt)}var nt=T(0);function wn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||go(i)||po(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)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var pi=0,Te=null,Xe=null,ot=null,xn=!1,Is=!1,us=!1,Ln=0,Lr=0,Ps=null,m_=0;function st(){throw Error(P(321))}function hl(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!kt(e[i],t[i]))return!1;return!0}function ul(e,t,i,s,d,g){return pi=g,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?jh:El,us=!1,g=i(s,d),us=!1,Is&&(g=ah(t,i,s,d)),nh(e),g}function nh(e){N.H=Ar;var t=Xe!==null&&Xe.next!==null;if(pi=0,ot=Xe=Te=null,xn=!1,Lr=0,Ps=null,t)throw Error(P(300));e===null||ct||(e=e.dependencies,e!==null&&vn(e)&&(ct=!0))}function ah(e,t,i,s){Te=e;var d=0;do{if(Is&&(Ps=null),Lr=0,Is=!1,25<=d)throw Error(P(301));if(d+=1,ot=Xe=null,e.updateQueue!=null){var g=e.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}N.H=Fh,g=t(i,s)}while(Is);return g}function S_(){var e=N.H,t=e.useState()[0];return t=typeof t.then=="function"?Er(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(Te.flags|=1024),t}function dl(){var e=Ln!==0;return Ln=0,e}function fl(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function _l(e){if(xn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}xn=!1}pi=0,ot=Xe=Te=null,Is=!1,Lr=Ln=0,Ps=null}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?Te.memoizedState=ot=e:ot=ot.next=e,ot}function at(){if(Xe===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=ot===null?Te.memoizedState:ot.next;if(t!==null)ot=t,Xe=e;else{if(e===null)throw Te.alternate===null?Error(P(467)):Error(P(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ot===null?Te.memoizedState=ot=e:ot=ot.next=e}return ot}function En(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Er(e){var t=Lr;return Lr+=1,Ps===null&&(Ps=[]),e=Kc(Ps,e,t),t=Te,(ot===null?t.memoizedState:ot.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?jh:El),e}function Mn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Er(e);if(e.$$typeof===l)return Ct(e)}throw Error(P(438,String(e)))}function vl(e){var t=null,i=Te.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Te.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(d){return d.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=En(),Te.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=L;return t.index++,i}function mi(e,t){return typeof t=="function"?t(e):t}function An(e){var t=at();return gl(t,Xe,e)}function gl(e,t,i){var s=e.queue;if(s===null)throw Error(P(311));s.lastRenderedReducer=i;var d=e.baseQueue,g=s.pending;if(g!==null){if(d!==null){var A=d.next;d.next=g.next,g.next=A}t.baseQueue=d=g,s.pending=null}if(g=e.baseState,d===null)e.memoizedState=g;else{t=d.next;var k=A=null,W=null,te=t,le=!1;do{var he=te.lane&-536870913;if(he!==te.lane?(Ne&he)===he:(pi&he)===he){var re=te.revertLane;if(re===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),he===ks&&(le=!0);else if((pi&re)===re){te=te.next,re===ks&&(le=!0);continue}else he={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},W===null?(k=W=he,A=g):W=W.next=he,Te.lanes|=re,ji|=re;he=te.action,us&&i(g,he),g=te.hasEagerState?te.eagerState:i(g,he)}else re={lane:he,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},W===null?(k=W=re,A=g):W=W.next=re,Te.lanes|=he,ji|=he;te=te.next}while(te!==null&&te!==t);if(W===null?A=g:W.next=k,!kt(g,e.memoizedState)&&(ct=!0,le&&(i=Hs,i!==null)))throw i;e.memoizedState=g,e.baseState=A,e.baseQueue=W,s.lastRenderedState=g}return d===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function pl(e){var t=at(),i=t.queue;if(i===null)throw Error(P(311));i.lastRenderedReducer=e;var s=i.dispatch,d=i.pending,g=t.memoizedState;if(d!==null){i.pending=null;var A=d=d.next;do g=e(g,A.action),A=A.next;while(A!==d);kt(g,t.memoizedState)||(ct=!0),t.memoizedState=g,t.baseQueue===null&&(t.baseState=g),i.lastRenderedState=g}return[g,s]}function lh(e,t,i){var s=Te,d=at(),g=Pe;if(g){if(i===void 0)throw Error(P(407));i=i()}else i=t();var A=!kt((Xe||d).memoizedState,i);if(A&&(d.memoizedState=i,ct=!0),d=d.queue,Cl(hh.bind(null,s,d,e),[e]),d.getSnapshot!==t||A||ot!==null&&ot.memoizedState.tag&1){if(s.flags|=2048,js(9,{destroy:void 0},ch.bind(null,s,d,i,t),null),Ke===null)throw Error(P(349));g||(pi&127)!==0||oh(s,t,i)}return i}function oh(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Te.updateQueue,t===null?(t=En(),Te.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function ch(e,t,i,s){t.value=i,t.getSnapshot=s,uh(t)&&dh(e)}function hh(e,t,i){return i(function(){uh(t)&&dh(e)})}function uh(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!kt(e,i)}catch{return!0}}function dh(e){var t=is(e,2);t!==null&&Bt(t,e,2)}function ml(e){var t=Lt();if(typeof e=="function"){var i=e;if(e=i(),us){vt(!0);try{i()}finally{vt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mi,lastRenderedState:e},t}function fh(e,t,i,s){return e.baseState=i,gl(e,Xe,typeof s=="function"?s:mi)}function C_(e,t,i,s,d){if(Tn(e))throw Error(P(485));if(e=t.action,e!==null){var g={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){g.listeners.push(A)}};N.T!==null?i(!0):g.isTransition=!1,s(g),i=t.pending,i===null?(g.next=t.pending=g,_h(t,g)):(g.next=i.next,t.pending=i.next=g)}}function _h(e,t){var i=t.action,s=t.payload,d=e.state;if(t.isTransition){var g=N.T,A={};N.T=A;try{var k=i(d,s),W=N.S;W!==null&&W(A,k),vh(e,t,k)}catch(te){Sl(e,t,te)}finally{g!==null&&A.types!==null&&(g.types=A.types),N.T=g}}else try{g=i(d,s),vh(e,t,g)}catch(te){Sl(e,t,te)}}function vh(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){gh(e,t,s)},function(s){return Sl(e,t,s)}):gh(e,t,i)}function gh(e,t,i){t.status="fulfilled",t.value=i,ph(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,_h(e,i)))}function Sl(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,ph(t),t=t.next;while(t!==s)}e.action=null}function ph(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function mh(e,t){return t}function Sh(e,t){if(Pe){var i=Ke.formState;if(i!==null){e:{var s=Te;if(Pe){if(Ze){t:{for(var d=Ze,g=Vt;d.nodeType!==8;){if(!g){d=null;break t}if(d=Kt(d.nextSibling),d===null){d=null;break t}}g=d.data,d=g==="F!"||g==="F"?d:null}if(d){Ze=Kt(d.nextSibling),s=d.data==="F!";break e}}Bi(s)}s=!1}s&&(t=i[0])}}return i=Lt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mh,lastRenderedState:t},i.queue=s,i=Uh.bind(null,Te,s),s.dispatch=i,s=ml(!1),g=Ll.bind(null,Te,!1,s.queue),s=Lt(),d={state:t,dispatch:null,action:e,pending:null},s.queue=d,i=C_.bind(null,Te,d,g,i),d.dispatch=i,s.memoizedState=e,[t,i,!1]}function Ch(e){var t=at();return yh(t,Xe,e)}function yh(e,t,i){if(t=gl(e,t,mh)[0],e=An(mi)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Er(t)}catch(A){throw A===zs?mn:A}else s=t;t=at();var d=t.queue,g=d.dispatch;return i!==t.memoizedState&&(Te.flags|=2048,js(9,{destroy:void 0},y_.bind(null,d,i),null)),[s,g,e]}function y_(e,t){e.action=t}function bh(e){var t=at(),i=Xe;if(i!==null)return yh(t,i,e);at(),t=t.memoizedState,i=at();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function js(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Te.updateQueue,t===null&&(t=En(),Te.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function wh(){return at().memoizedState}function Rn(e,t,i,s){var d=Lt();Te.flags|=e,d.memoizedState=js(1|t,{destroy:void 0},i,s===void 0?null:s)}function Dn(e,t,i,s){var d=at();s=s===void 0?null:s;var g=d.memoizedState.inst;Xe!==null&&s!==null&&hl(s,Xe.memoizedState.deps)?d.memoizedState=js(t,g,i,s):(Te.flags|=e,d.memoizedState=js(1|t,g,i,s))}function xh(e,t){Rn(8390656,8,e,t)}function Cl(e,t){Dn(2048,8,e,t)}function b_(e){Te.flags|=4;var t=Te.updateQueue;if(t===null)t=En(),Te.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Lh(e){var t=at().memoizedState;return b_({ref:t,nextImpl:e}),function(){if(($e&2)!==0)throw Error(P(440));return t.impl.apply(void 0,arguments)}}function Eh(e,t){return Dn(4,2,e,t)}function Mh(e,t){return Dn(4,4,e,t)}function Ah(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 Rh(e,t,i){i=i!=null?i.concat([e]):null,Dn(4,4,Ah.bind(null,t,e),i)}function yl(){}function Dh(e,t){var i=at();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&hl(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Th(e,t){var i=at();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&hl(t,s[1]))return s[0];if(s=e(),us){vt(!0);try{e()}finally{vt(!1)}}return i.memoizedState=[s,t],s}function bl(e,t,i){return i===void 0||(pi&1073741824)!==0&&(Ne&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Bu(),Te.lanes|=e,ji|=e,i)}function Bh(e,t,i,s){return kt(i,t)?i:Us.current!==null?(e=bl(e,i,s),kt(e,t)||(ct=!0),e):(pi&42)===0||(pi&1073741824)!==0&&(Ne&261930)===0?(ct=!0,e.memoizedState=i):(e=Bu(),Te.lanes|=e,ji|=e,t)}function Oh(e,t,i,s,d){var g=I.p;I.p=g!==0&&8>g?g:8;var A=N.T,k={};N.T=k,Ll(e,!1,t,i);try{var W=d(),te=N.S;if(te!==null&&te(k,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var le=p_(W,s);Mr(e,t,le,Pt(e))}else Mr(e,t,s,Pt(e))}catch(he){Mr(e,t,{then:function(){},status:"rejected",reason:he},Pt())}finally{I.p=g,A!==null&&k.types!==null&&(A.types=k.types),N.T=A}}function w_(){}function wl(e,t,i,s){if(e.tag!==5)throw Error(P(476));var d=kh(e).queue;Oh(e,d,t,F,i===null?w_:function(){return Hh(e),i(s)})}function kh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mi,lastRenderedState:F},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:mi,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Hh(e){var t=kh(e);t.next===null&&(t=e.alternate.memoizedState),Mr(e,t.next.queue,{},Pt())}function xl(){return Ct(qr)}function zh(){return at().memoizedState}function Nh(){return at().memoizedState}function x_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Pt();e=Hi(i);var s=zi(t,e,i);s!==null&&(Bt(s,t,i),br(s,t,i)),t={cache:Ja()},e.payload=t;return}t=t.return}}function L_(e,t,i){var s=Pt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Tn(e)?Ih(t,i):(i=Fa(e,t,i,s),i!==null&&(Bt(i,e,s),Ph(i,t,s)))}function Uh(e,t,i){var s=Pt();Mr(e,t,i,s)}function Mr(e,t,i,s){var d={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Tn(e))Ih(t,d);else{var g=e.alternate;if(e.lanes===0&&(g===null||g.lanes===0)&&(g=t.lastRenderedReducer,g!==null))try{var A=t.lastRenderedState,k=g(A,i);if(d.hasEagerState=!0,d.eagerState=k,kt(k,A))return un(e,t,d,0),Ke===null&&hn(),!1}catch{}finally{}if(i=Fa(e,t,d,s),i!==null)return Bt(i,e,s),Ph(i,t,s),!0}return!1}function Ll(e,t,i,s){if(s={lane:2,revertLane:so(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Tn(e)){if(t)throw Error(P(479))}else t=Fa(e,i,s,2),t!==null&&Bt(t,e,2)}function Tn(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function Ih(e,t){Is=xn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Ph(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Wo(e,i)}}var Ar={readContext:Ct,use:Mn,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st};Ar.useEffectEvent=st;var jh={readContext:Ct,use:Mn,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:Ct,useEffect:xh,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Rn(4194308,4,Ah.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Rn(4194308,4,e,t)},useInsertionEffect:function(e,t){Rn(4,2,e,t)},useMemo:function(e,t){var i=Lt();t=t===void 0?null:t;var s=e();if(us){vt(!0);try{e()}finally{vt(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=Lt();if(i!==void 0){var d=i(t);if(us){vt(!0);try{i(t)}finally{vt(!1)}}}else d=t;return s.memoizedState=s.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},s.queue=e,e=e.dispatch=L_.bind(null,Te,e),[s.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:function(e){e=ml(e);var t=e.queue,i=Uh.bind(null,Te,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:yl,useDeferredValue:function(e,t){var i=Lt();return bl(i,e,t)},useTransition:function(){var e=ml(!1);return e=Oh.bind(null,Te,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Te,d=Lt();if(Pe){if(i===void 0)throw Error(P(407));i=i()}else{if(i=t(),Ke===null)throw Error(P(349));(Ne&127)!==0||oh(s,t,i)}d.memoizedState=i;var g={value:i,getSnapshot:t};return d.queue=g,xh(hh.bind(null,s,g,e),[e]),s.flags|=2048,js(9,{destroy:void 0},ch.bind(null,s,g,i,t),null),i},useId:function(){var e=Lt(),t=Ke.identifierPrefix;if(Pe){var i=ai,s=ni;i=(s&~(1<<32-ut(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Ln++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=m_++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:xl,useFormState:Sh,useActionState:Sh,useOptimistic:function(e){var t=Lt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Ll.bind(null,Te,!0,i),i.dispatch=t,[e,t]},useMemoCache:vl,useCacheRefresh:function(){return Lt().memoizedState=x_.bind(null,Te)},useEffectEvent:function(e){var t=Lt(),i={impl:e};return t.memoizedState=i,function(){if(($e&2)!==0)throw Error(P(440));return i.impl.apply(void 0,arguments)}}},El={readContext:Ct,use:Mn,useCallback:Dh,useContext:Ct,useEffect:Cl,useImperativeHandle:Rh,useInsertionEffect:Eh,useLayoutEffect:Mh,useMemo:Th,useReducer:An,useRef:wh,useState:function(){return An(mi)},useDebugValue:yl,useDeferredValue:function(e,t){var i=at();return Bh(i,Xe.memoizedState,e,t)},useTransition:function(){var e=An(mi)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Er(e),t]},useSyncExternalStore:lh,useId:zh,useHostTransitionStatus:xl,useFormState:Ch,useActionState:Ch,useOptimistic:function(e,t){var i=at();return fh(i,Xe,e,t)},useMemoCache:vl,useCacheRefresh:Nh};El.useEffectEvent=Lh;var Fh={readContext:Ct,use:Mn,useCallback:Dh,useContext:Ct,useEffect:Cl,useImperativeHandle:Rh,useInsertionEffect:Eh,useLayoutEffect:Mh,useMemo:Th,useReducer:pl,useRef:wh,useState:function(){return pl(mi)},useDebugValue:yl,useDeferredValue:function(e,t){var i=at();return Xe===null?bl(i,e,t):Bh(i,Xe.memoizedState,e,t)},useTransition:function(){var e=pl(mi)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Er(e),t]},useSyncExternalStore:lh,useId:zh,useHostTransitionStatus:xl,useFormState:bh,useActionState:bh,useOptimistic:function(e,t){var i=at();return Xe!==null?fh(i,Xe,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:vl,useCacheRefresh:Nh};Fh.useEffectEvent=Lh;function Ml(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:a({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Al={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Pt(),d=Hi(s);d.payload=t,i!=null&&(d.callback=i),t=zi(e,d,s),t!==null&&(Bt(t,e,s),br(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Pt(),d=Hi(s);d.tag=1,d.payload=t,i!=null&&(d.callback=i),t=zi(e,d,s),t!==null&&(Bt(t,e,s),br(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Pt(),s=Hi(i);s.tag=2,t!=null&&(s.callback=t),t=zi(e,s,i),t!==null&&(Bt(t,e,i),br(t,e,i))}};function $h(e,t,i,s,d,g,A){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,g,A):t.prototype&&t.prototype.isPureReactComponent?!_r(i,s)||!_r(d,g):!0}function qh(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&Al.enqueueReplaceState(t,t.state,null)}function ds(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=a({},i));for(var d in e)i[d]===void 0&&(i[d]=e[d])}return i}function Wh(e){cn(e)}function Gh(e){console.error(e)}function Xh(e){cn(e)}function Bn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Vh(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Rl(e,t,i){return i=Hi(i),i.tag=3,i.payload={element:null},i.callback=function(){Bn(e,t)},i}function Yh(e){return e=Hi(e),e.tag=3,e}function Kh(e,t,i,s){var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var g=s.value;e.payload=function(){return d(g)},e.callback=function(){Vh(t,i,s)}}var A=i.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(e.callback=function(){Vh(t,i,s),typeof d!="function"&&(Fi===null?Fi=new Set([this]):Fi.add(this));var k=s.stack;this.componentDidCatch(s.value,{componentStack:k!==null?k:""})})}function E_(e,t,i,s,d){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Os(t,i,d,!0),i=zt.current,i!==null){switch(i.tag){case 31:case 13:return Yt===null?qn():i.alternate===null&&rt===0&&(rt=3),i.flags&=-257,i.flags|=65536,i.lanes=d,s===Sn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),eo(e,s,d)),!1;case 22:return i.flags|=65536,s===Sn?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),eo(e,s,d)),!1}throw Error(P(435,i.tag))}return eo(e,s,d),qn(),!1}if(Pe)return t=zt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=d,s!==Va&&(e=Error(P(422),{cause:s}),pr(Wt(e,i)))):(s!==Va&&(t=Error(P(423),{cause:s}),pr(Wt(t,i))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,s=Wt(s,i),d=Rl(e.stateNode,s,d),nl(e,d),rt!==4&&(rt=2)),!1;var g=Error(P(520),{cause:s});if(g=Wt(g,i),zr===null?zr=[g]:zr.push(g),rt!==4&&(rt=2),t===null)return!0;s=Wt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=d&-d,i.lanes|=e,e=Rl(i.stateNode,s,e),nl(i,e),!1;case 1:if(t=i.type,g=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Fi===null||!Fi.has(g))))return i.flags|=65536,d&=-d,i.lanes|=d,d=Yh(d),Kh(d,e,i,s),nl(i,d),!1}i=i.return}while(i!==null);return!1}var Dl=Error(P(461)),ct=!1;function yt(e,t,i,s){t.child=e===null?eh(t,null,i,s):hs(t,e.child,i,s)}function Qh(e,t,i,s,d){i=i.render;var g=t.ref;if("ref"in s){var A={};for(var k in s)k!=="ref"&&(A[k]=s[k])}else A=s;return as(t),s=ul(e,t,i,A,g,d),k=dl(),e!==null&&!ct?(fl(e,t,d),Si(e,t,d)):(Pe&&k&&Ga(t),t.flags|=1,yt(e,t,s,d),t.child)}function Zh(e,t,i,s,d){if(e===null){var g=i.type;return typeof g=="function"&&!$a(g)&&g.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=g,Jh(e,t,g,s,d)):(e=fn(i.type,null,s,t,t.mode,d),e.ref=t.ref,e.return=t,t.child=e)}if(g=e.child,!Ul(e,d)){var A=g.memoizedProps;if(i=i.compare,i=i!==null?i:_r,i(A,s)&&e.ref===t.ref)return Si(e,t,d)}return t.flags|=1,e=fi(g,s),e.ref=t.ref,e.return=t,t.child=e}function Jh(e,t,i,s,d){if(e!==null){var g=e.memoizedProps;if(_r(g,s)&&e.ref===t.ref)if(ct=!1,t.pendingProps=s=g,Ul(e,d))(e.flags&131072)!==0&&(ct=!0);else return t.lanes=e.lanes,Si(e,t,d)}return Tl(e,t,i,s,d)}function eu(e,t,i,s){var d=s.children,g=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(g=g!==null?g.baseLanes|i:i,e!==null){for(s=t.child=e.child,d=0;s!==null;)d=d|s.lanes|s.childLanes,s=s.sibling;s=d&~g}else s=0,t.child=null;return tu(e,t,g,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&pn(t,g!==null?g.cachePool:null),g!==null?sh(t,g):ll(),rh(t);else return s=t.lanes=536870912,tu(e,t,g!==null?g.baseLanes|i:i,i,s)}else g!==null?(pn(t,g.cachePool),sh(t,g),Ui(),t.memoizedState=null):(e!==null&&pn(t,null),ll(),Ui());return yt(e,t,d,i),t.child}function Rr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function tu(e,t,i,s,d){var g=tl();return g=g===null?null:{parent:lt._currentValue,pool:g},t.memoizedState={baseLanes:i,cachePool:g},e!==null&&pn(t,null),ll(),rh(t),e!==null&&Os(e,t,s,!0),t.childLanes=d,null}function On(e,t){return t=Hn({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function iu(e,t,i){return hs(t,e.child,null,i),e=On(t,t.pendingProps),e.flags|=2,Nt(t),t.memoizedState=null,e}function M_(e,t,i){var s=t.pendingProps,d=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Pe){if(s.mode==="hidden")return e=On(t,s),t.lanes=536870912,Rr(null,e);if(cl(t),(e=Ze)?(e=_d(e,Vt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Di!==null?{id:ni,overflow:ai}:null,retryLane:536870912,hydrationErrors:null},i=Ic(e),i.return=t,t.child=i,St=t,Ze=null)):e=null,e===null)throw Bi(t);return t.lanes=536870912,null}return On(t,s)}var g=e.memoizedState;if(g!==null){var A=g.dehydrated;if(cl(t),d)if(t.flags&256)t.flags&=-257,t=iu(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(P(558));else if(ct||Os(e,t,i,!1),d=(i&e.childLanes)!==0,ct||d){if(s=Ke,s!==null&&(A=Go(s,i),A!==0&&A!==g.retryLane))throw g.retryLane=A,is(e,A),Bt(s,e,A),Dl;qn(),t=iu(e,t,i)}else e=g.treeContext,Ze=Kt(A.nextSibling),St=t,Pe=!0,Ti=null,Vt=!1,e!==null&&Fc(t,e),t=On(t,s),t.flags|=4096;return t}return e=fi(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function kn(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(P(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Tl(e,t,i,s,d){return as(t),i=ul(e,t,i,s,void 0,d),s=dl(),e!==null&&!ct?(fl(e,t,d),Si(e,t,d)):(Pe&&s&&Ga(t),t.flags|=1,yt(e,t,i,d),t.child)}function su(e,t,i,s,d,g){return as(t),t.updateQueue=null,i=ah(t,s,i,d),nh(e),s=dl(),e!==null&&!ct?(fl(e,t,g),Si(e,t,g)):(Pe&&s&&Ga(t),t.flags|=1,yt(e,t,i,g),t.child)}function ru(e,t,i,s,d){if(as(t),t.stateNode===null){var g=Rs,A=i.contextType;typeof A=="object"&&A!==null&&(g=Ct(A)),g=new i(s,g),t.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Al,t.stateNode=g,g._reactInternals=t,g=t.stateNode,g.props=s,g.state=t.memoizedState,g.refs={},sl(t),A=i.contextType,g.context=typeof A=="object"&&A!==null?Ct(A):Rs,g.state=t.memoizedState,A=i.getDerivedStateFromProps,typeof A=="function"&&(Ml(t,i,A,s),g.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(A=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),A!==g.state&&Al.enqueueReplaceState(g,g.state,null),xr(t,s,g,d),wr(),g.state=t.memoizedState),typeof g.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){g=t.stateNode;var k=t.memoizedProps,W=ds(i,k);g.props=W;var te=g.context,le=i.contextType;A=Rs,typeof le=="object"&&le!==null&&(A=Ct(le));var he=i.getDerivedStateFromProps;le=typeof he=="function"||typeof g.getSnapshotBeforeUpdate=="function",k=t.pendingProps!==k,le||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(k||te!==A)&&qh(t,g,s,A),ki=!1;var re=t.memoizedState;g.state=re,xr(t,s,g,d),wr(),te=t.memoizedState,k||re!==te||ki?(typeof he=="function"&&(Ml(t,i,he,s),te=t.memoizedState),(W=ki||$h(t,i,W,s,re,te,A))?(le||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(t.flags|=4194308)):(typeof g.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=te),g.props=s,g.state=te,g.context=A,s=W):(typeof g.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{g=t.stateNode,rl(e,t),A=t.memoizedProps,le=ds(i,A),g.props=le,he=t.pendingProps,re=g.context,te=i.contextType,W=Rs,typeof te=="object"&&te!==null&&(W=Ct(te)),k=i.getDerivedStateFromProps,(te=typeof k=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(A!==he||re!==W)&&qh(t,g,s,W),ki=!1,re=t.memoizedState,g.state=re,xr(t,s,g,d),wr();var ae=t.memoizedState;A!==he||re!==ae||ki||e!==null&&e.dependencies!==null&&vn(e.dependencies)?(typeof k=="function"&&(Ml(t,i,k,s),ae=t.memoizedState),(le=ki||$h(t,i,le,s,re,ae,W)||e!==null&&e.dependencies!==null&&vn(e.dependencies))?(te||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(s,ae,W),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(s,ae,W)),typeof g.componentDidUpdate=="function"&&(t.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof g.componentDidUpdate!="function"||A===e.memoizedProps&&re===e.memoizedState||(t.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||A===e.memoizedProps&&re===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=ae),g.props=s,g.state=ae,g.context=W,s=le):(typeof g.componentDidUpdate!="function"||A===e.memoizedProps&&re===e.memoizedState||(t.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||A===e.memoizedProps&&re===e.memoizedState||(t.flags|=1024),s=!1)}return g=s,kn(e,t),s=(t.flags&128)!==0,g||s?(g=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:g.render(),t.flags|=1,e!==null&&s?(t.child=hs(t,e.child,null,d),t.child=hs(t,null,i,d)):yt(e,t,i,d),t.memoizedState=g.state,e=t.child):e=Si(e,t,d),e}function nu(e,t,i,s){return rs(),t.flags|=256,yt(e,t,i,s),t.child}var Bl={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ol(e){return{baseLanes:e,cachePool:Vc()}}function kl(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=It),e}function au(e,t,i){var s=t.pendingProps,d=!1,g=(t.flags&128)!==0,A;if((A=g)||(A=e!==null&&e.memoizedState===null?!1:(nt.current&2)!==0),A&&(d=!0,t.flags&=-129),A=(t.flags&32)!==0,t.flags&=-33,e===null){if(Pe){if(d?Ni(t):Ui(),(e=Ze)?(e=_d(e,Vt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Di!==null?{id:ni,overflow:ai}:null,retryLane:536870912,hydrationErrors:null},i=Ic(e),i.return=t,t.child=i,St=t,Ze=null)):e=null,e===null)throw Bi(t);return po(e)?t.lanes=32:t.lanes=536870912,null}var k=s.children;return s=s.fallback,d?(Ui(),d=t.mode,k=Hn({mode:"hidden",children:k},d),s=ss(s,d,i,null),k.return=t,s.return=t,k.sibling=s,t.child=k,s=t.child,s.memoizedState=Ol(i),s.childLanes=kl(e,A,i),t.memoizedState=Bl,Rr(null,s)):(Ni(t),Hl(t,k))}var W=e.memoizedState;if(W!==null&&(k=W.dehydrated,k!==null)){if(g)t.flags&256?(Ni(t),t.flags&=-257,t=zl(e,t,i)):t.memoizedState!==null?(Ui(),t.child=e.child,t.flags|=128,t=null):(Ui(),k=s.fallback,d=t.mode,s=Hn({mode:"visible",children:s.children},d),k=ss(k,d,i,null),k.flags|=2,s.return=t,k.return=t,s.sibling=k,t.child=s,hs(t,e.child,null,i),s=t.child,s.memoizedState=Ol(i),s.childLanes=kl(e,A,i),t.memoizedState=Bl,t=Rr(null,s));else if(Ni(t),po(k)){if(A=k.nextSibling&&k.nextSibling.dataset,A)var te=A.dgst;A=te,s=Error(P(419)),s.stack="",s.digest=A,pr({value:s,source:null,stack:null}),t=zl(e,t,i)}else if(ct||Os(e,t,i,!1),A=(i&e.childLanes)!==0,ct||A){if(A=Ke,A!==null&&(s=Go(A,i),s!==0&&s!==W.retryLane))throw W.retryLane=s,is(e,s),Bt(A,e,s),Dl;go(k)||qn(),t=zl(e,t,i)}else go(k)?(t.flags|=192,t.child=e.child,t=null):(e=W.treeContext,Ze=Kt(k.nextSibling),St=t,Pe=!0,Ti=null,Vt=!1,e!==null&&Fc(t,e),t=Hl(t,s.children),t.flags|=4096);return t}return d?(Ui(),k=s.fallback,d=t.mode,W=e.child,te=W.sibling,s=fi(W,{mode:"hidden",children:s.children}),s.subtreeFlags=W.subtreeFlags&65011712,te!==null?k=fi(te,k):(k=ss(k,d,i,null),k.flags|=2),k.return=t,s.return=t,s.sibling=k,t.child=s,Rr(null,s),s=t.child,k=e.child.memoizedState,k===null?k=Ol(i):(d=k.cachePool,d!==null?(W=lt._currentValue,d=d.parent!==W?{parent:W,pool:W}:d):d=Vc(),k={baseLanes:k.baseLanes|i,cachePool:d}),s.memoizedState=k,s.childLanes=kl(e,A,i),t.memoizedState=Bl,Rr(e.child,s)):(Ni(t),i=e.child,e=i.sibling,i=fi(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(A=t.deletions,A===null?(t.deletions=[e],t.flags|=16):A.push(e)),t.child=i,t.memoizedState=null,i)}function Hl(e,t){return t=Hn({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Hn(e,t){return e=Ht(22,e,null,t),e.lanes=0,e}function zl(e,t,i){return hs(t,e.child,null,i),e=Hl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function lu(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Qa(e.return,t,i)}function Nl(e,t,i,s,d,g){var A=e.memoizedState;A===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:d,treeForkCount:g}:(A.isBackwards=t,A.rendering=null,A.renderingStartTime=0,A.last=s,A.tail=i,A.tailMode=d,A.treeForkCount=g)}function ou(e,t,i){var s=t.pendingProps,d=s.revealOrder,g=s.tail;s=s.children;var A=nt.current,k=(A&2)!==0;if(k?(A=A&1|2,t.flags|=128):A&=1,V(nt,A),yt(e,t,s,i),s=Pe?gr:0,!k&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&lu(e,i,t);else if(e.tag===19)lu(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(d){case"forwards":for(i=t.child,d=null;i!==null;)e=i.alternate,e!==null&&wn(e)===null&&(d=i),i=i.sibling;i=d,i===null?(d=t.child,t.child=null):(d=i.sibling,i.sibling=null),Nl(t,!1,d,i,g,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,d=t.child,t.child=null;d!==null;){if(e=d.alternate,e!==null&&wn(e)===null){t.child=d;break}e=d.sibling,d.sibling=i,i=d,d=e}Nl(t,!0,i,null,g,s);break;case"together":Nl(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Si(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),ji|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Os(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(P(153));if(t.child!==null){for(e=t.child,i=fi(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=fi(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Ul(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&vn(e)))}function A_(e,t,i){switch(t.tag){case 3:z(t,t.stateNode.containerInfo),Oi(t,lt,e.memoizedState.cache),rs();break;case 27:case 5:ie(t);break;case 4:z(t,t.stateNode.containerInfo);break;case 10:Oi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,cl(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Ni(t),t.flags|=128,null):(i&t.child.childLanes)!==0?au(e,t,i):(Ni(t),e=Si(e,t,i),e!==null?e.sibling:null);Ni(t);break;case 19:var d=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Os(e,t,i,!1),s=(i&t.childLanes)!==0),d){if(s)return ou(e,t,i);t.flags|=128}if(d=t.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),V(nt,nt.current),s)break;return null;case 22:return t.lanes=0,eu(e,t,i,t.pendingProps);case 24:Oi(t,lt,e.memoizedState.cache)}return Si(e,t,i)}function cu(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)ct=!0;else{if(!Ul(e,i)&&(t.flags&128)===0)return ct=!1,A_(e,t,i);ct=(e.flags&131072)!==0}else ct=!1,Pe&&(t.flags&1048576)!==0&&jc(t,gr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=os(t.elementType),t.type=e,typeof e=="function")$a(e)?(s=ds(e,s),t.tag=1,t=ru(null,t,e,s,i)):(t.tag=0,t=Tl(null,t,e,s,i));else{if(e!=null){var d=e.$$typeof;if(d===S){t.tag=11,t=Qh(null,t,e,s,i);break e}else if(d===b){t.tag=14,t=Zh(null,t,e,s,i);break e}}throw t=B(e)||e,Error(P(306,t,""))}}return t;case 0:return Tl(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,d=ds(s,t.pendingProps),ru(e,t,s,d,i);case 3:e:{if(z(t,t.stateNode.containerInfo),e===null)throw Error(P(387));s=t.pendingProps;var g=t.memoizedState;d=g.element,rl(e,t),xr(t,s,null,i);var A=t.memoizedState;if(s=A.cache,Oi(t,lt,s),s!==g.cache&&Za(t,[lt],i,!0),wr(),s=A.element,g.isDehydrated)if(g={element:s,isDehydrated:!1,cache:A.cache},t.updateQueue.baseState=g,t.memoizedState=g,t.flags&256){t=nu(e,t,s,i);break e}else if(s!==d){d=Wt(Error(P(424)),t),pr(d),t=nu(e,t,s,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(Ze=Kt(e.firstChild),St=t,Pe=!0,Ti=null,Vt=!0,i=eh(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(rs(),s===d){t=Si(e,t,i);break e}yt(e,t,s,i)}t=t.child}return t;case 26:return kn(e,t),e===null?(i=Cd(t.type,null,t.pendingProps,null))?t.memoizedState=i:Pe||(i=t.type,e=t.pendingProps,s=Qn(de.current).createElement(i),s[mt]=t,s[Et]=e,bt(s,i,e),gt(s),t.stateNode=s):t.memoizedState=Cd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ie(t),e===null&&Pe&&(s=t.stateNode=pd(t.type,t.pendingProps,de.current),St=t,Vt=!0,d=Ze,Gi(t.type)?(mo=d,Ze=Kt(s.firstChild)):Ze=d),yt(e,t,t.pendingProps.children,i),kn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Pe&&((d=s=Ze)&&(s=rv(s,t.type,t.pendingProps,Vt),s!==null?(t.stateNode=s,St=t,Ze=Kt(s.firstChild),Vt=!1,d=!0):d=!1),d||Bi(t)),ie(t),d=t.type,g=t.pendingProps,A=e!==null?e.memoizedProps:null,s=g.children,fo(d,g)?s=null:A!==null&&fo(d,A)&&(t.flags|=32),t.memoizedState!==null&&(d=ul(e,t,S_,null,null,i),qr._currentValue=d),kn(e,t),yt(e,t,s,i),t.child;case 6:return e===null&&Pe&&((e=i=Ze)&&(i=nv(i,t.pendingProps,Vt),i!==null?(t.stateNode=i,St=t,Ze=null,e=!0):e=!1),e||Bi(t)),null;case 13:return au(e,t,i);case 4:return z(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=hs(t,null,s,i):yt(e,t,s,i),t.child;case 11:return Qh(e,t,t.type,t.pendingProps,i);case 7:return yt(e,t,t.pendingProps,i),t.child;case 8:return yt(e,t,t.pendingProps.children,i),t.child;case 12:return yt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,Oi(t,t.type,s.value),yt(e,t,s.children,i),t.child;case 9:return d=t.type._context,s=t.pendingProps.children,as(t),d=Ct(d),s=s(d),t.flags|=1,yt(e,t,s,i),t.child;case 14:return Zh(e,t,t.type,t.pendingProps,i);case 15:return Jh(e,t,t.type,t.pendingProps,i);case 19:return ou(e,t,i);case 31:return M_(e,t,i);case 22:return eu(e,t,i,t.pendingProps);case 24:return as(t),s=Ct(lt),e===null?(d=tl(),d===null&&(d=Ke,g=Ja(),d.pooledCache=g,g.refCount++,g!==null&&(d.pooledCacheLanes|=i),d=g),t.memoizedState={parent:s,cache:d},sl(t),Oi(t,lt,d)):((e.lanes&i)!==0&&(rl(e,t),xr(t,null,null,i),wr()),d=e.memoizedState,g=t.memoizedState,d.parent!==s?(d={parent:s,cache:s},t.memoizedState=d,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=d),Oi(t,lt,s)):(s=g.cache,Oi(t,lt,s),s!==d.cache&&Za(t,[lt],i,!0))),yt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(P(156,t.tag))}function Ci(e){e.flags|=4}function Il(e,t,i,s,d){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(zu())e.flags|=8192;else throw cs=Sn,il}else e.flags&=-16777217}function hu(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ld(t))if(zu())e.flags|=8192;else throw cs=Sn,il}function zn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?$o():536870912,e.lanes|=t,Ws|=t)}function Dr(e,t){if(!Pe)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 s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var d=e.child;d!==null;)i|=d.lanes|d.childLanes,s|=d.subtreeFlags&65011712,s|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)i|=d.lanes|d.childLanes,s|=d.subtreeFlags,s|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function R_(e,t,i){var s=t.pendingProps;switch(Xa(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(t),null;case 1:return Je(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),gi(lt),se(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Bs(t)?Ci(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ya())),Je(t),null;case 26:var d=t.type,g=t.memoizedState;return e===null?(Ci(t),g!==null?(Je(t),hu(t,g)):(Je(t),Il(t,d,null,s,i))):g?g!==e.memoizedState?(Ci(t),Je(t),hu(t,g)):(Je(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Ci(t),Je(t),Il(t,d,e,s,i)),null;case 27:if(ve(t),i=de.current,d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Ci(t);else{if(!s){if(t.stateNode===null)throw Error(P(166));return Je(t),null}e=Q.current,Bs(t)?$c(t):(e=pd(d,s,i),t.stateNode=e,Ci(t))}return Je(t),null;case 5:if(ve(t),d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Ci(t);else{if(!s){if(t.stateNode===null)throw Error(P(166));return Je(t),null}if(g=Q.current,Bs(t))$c(t);else{var A=Qn(de.current);switch(g){case 1:g=A.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:g=A.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":g=A.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":g=A.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":g=A.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof s.is=="string"?A.createElement("select",{is:s.is}):A.createElement("select"),s.multiple?g.multiple=!0:s.size&&(g.size=s.size);break;default:g=typeof s.is=="string"?A.createElement(d,{is:s.is}):A.createElement(d)}}g[mt]=t,g[Et]=s;e:for(A=t.child;A!==null;){if(A.tag===5||A.tag===6)g.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===t)break e;for(;A.sibling===null;){if(A.return===null||A.return===t)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}t.stateNode=g;e:switch(bt(g,d,s),d){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Ci(t)}}return Je(t),Il(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Ci(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(P(166));if(e=de.current,Bs(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,d=St,d!==null)switch(d.tag){case 27:case 5:s=d.memoizedProps}e[mt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||ad(e.nodeValue,i)),e||Bi(t,!0)}else e=Qn(e).createTextNode(s),e[mt]=t,t.stateNode=e}return Je(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Bs(t),i!==null){if(e===null){if(!s)throw Error(P(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(557));e[mt]=t}else rs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Je(t),e=!1}else i=Ya(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Nt(t),t):(Nt(t),null);if((t.flags&128)!==0)throw Error(P(558))}return Je(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=Bs(t),s!==null&&s.dehydrated!==null){if(e===null){if(!d)throw Error(P(318));if(d=t.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(P(317));d[mt]=t}else rs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Je(t),d=!1}else d=Ya(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return t.flags&256?(Nt(t),t):(Nt(t),null)}return Nt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,d=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(d=s.alternate.memoizedState.cachePool.pool),g=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(g=s.memoizedState.cachePool.pool),g!==d&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),zn(t,t.updateQueue),Je(t),null);case 4:return se(),e===null&&lo(t.stateNode.containerInfo),Je(t),null;case 10:return gi(t.type),Je(t),null;case 19:if(H(nt),s=t.memoizedState,s===null)return Je(t),null;if(d=(t.flags&128)!==0,g=s.rendering,g===null)if(d)Dr(s,!1);else{if(rt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(g=wn(e),g!==null){for(t.flags|=128,Dr(s,!1),e=g.updateQueue,t.updateQueue=e,zn(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Uc(i,e),i=i.sibling;return V(nt,nt.current&1|2),Pe&&_i(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&ge()>jn&&(t.flags|=128,d=!0,Dr(s,!1),t.lanes=4194304)}else{if(!d)if(e=wn(g),e!==null){if(t.flags|=128,d=!0,e=e.updateQueue,t.updateQueue=e,zn(t,e),Dr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!g.alternate&&!Pe)return Je(t),null}else 2*ge()-s.renderingStartTime>jn&&i!==536870912&&(t.flags|=128,d=!0,Dr(s,!1),t.lanes=4194304);s.isBackwards?(g.sibling=t.child,t.child=g):(e=s.last,e!==null?e.sibling=g:t.child=g,s.last=g)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ge(),e.sibling=null,i=nt.current,V(nt,d?i&1|2:i&1),Pe&&_i(t,s.treeForkCount),e):(Je(t),null);case 22:case 23:return Nt(t),ol(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),i=t.updateQueue,i!==null&&zn(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&H(ls),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),gi(lt),Je(t),null;case 25:return null;case 30:return null}throw Error(P(156,t.tag))}function D_(e,t){switch(Xa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return gi(lt),se(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ve(t),null;case 31:if(t.memoizedState!==null){if(Nt(t),t.alternate===null)throw Error(P(340));rs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Nt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));rs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(nt),null;case 4:return se(),null;case 10:return gi(t.type),null;case 22:case 23:return Nt(t),ol(),e!==null&&H(ls),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return gi(lt),null;case 25:return null;default:return null}}function uu(e,t){switch(Xa(t),t.tag){case 3:gi(lt),se();break;case 26:case 27:case 5:ve(t);break;case 4:se();break;case 31:t.memoizedState!==null&&Nt(t);break;case 13:Nt(t);break;case 19:H(nt);break;case 10:gi(t.type);break;case 22:case 23:Nt(t),ol(),e!==null&&H(ls);break;case 24:gi(lt)}}function Tr(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var d=s.next;i=d;do{if((i.tag&e)===e){s=void 0;var g=i.create,A=i.inst;s=g(),A.destroy=s}i=i.next}while(i!==d)}}catch(k){Ge(t,t.return,k)}}function Ii(e,t,i){try{var s=t.updateQueue,d=s!==null?s.lastEffect:null;if(d!==null){var g=d.next;s=g;do{if((s.tag&e)===e){var A=s.inst,k=A.destroy;if(k!==void 0){A.destroy=void 0,d=t;var W=i,te=k;try{te()}catch(le){Ge(d,W,le)}}}s=s.next}while(s!==g)}}catch(le){Ge(t,t.return,le)}}function du(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{ih(t,i)}catch(s){Ge(e,e.return,s)}}}function fu(e,t,i){i.props=ds(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Ge(e,t,s)}}function Br(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(d){Ge(e,t,d)}}function li(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(d){Ge(e,t,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(d){Ge(e,t,d)}else i.current=null}function _u(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(d){Ge(e,e.return,d)}}function Pl(e,t,i){try{var s=e.stateNode;Z_(s,e.type,i,t),s[Et]=t}catch(d){Ge(e,e.return,d)}}function vu(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Gi(e.type)||e.tag===4}function jl(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vu(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&&Gi(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 Fl(e,t,i){var s=e.tag;if(s===5||s===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=ui));else if(s!==4&&(s===27&&Gi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Fl(e,t,i),e=e.sibling;e!==null;)Fl(e,t,i),e=e.sibling}function Nn(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(s===27&&Gi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Nn(e,t,i),e=e.sibling;e!==null;)Nn(e,t,i),e=e.sibling}function gu(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,d=t.attributes;d.length;)t.removeAttributeNode(d[0]);bt(t,s,i),t[mt]=e,t[Et]=i}catch(g){Ge(e,e.return,g)}}var yi=!1,ht=!1,$l=!1,pu=typeof WeakSet=="function"?WeakSet:Set,pt=null;function T_(e,t){if(e=e.containerInfo,ho=ra,e=Rc(e),za(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var d=s.anchorOffset,g=s.focusNode;s=s.focusOffset;try{i.nodeType,g.nodeType}catch{i=null;break e}var A=0,k=-1,W=-1,te=0,le=0,he=e,re=null;t:for(;;){for(var ae;he!==i||d!==0&&he.nodeType!==3||(k=A+d),he!==g||s!==0&&he.nodeType!==3||(W=A+s),he.nodeType===3&&(A+=he.nodeValue.length),(ae=he.firstChild)!==null;)re=he,he=ae;for(;;){if(he===e)break t;if(re===i&&++te===d&&(k=A),re===g&&++le===s&&(W=A),(ae=he.nextSibling)!==null)break;he=re,re=he.parentNode}he=ae}i=k===-1||W===-1?null:{start:k,end:W}}else i=null}i=i||{start:0,end:0}}else i=null;for(uo={focusedElem:e,selectionRange:i},ra=!1,pt=t;pt!==null;)if(t=pt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pt=e;else for(;pt!==null;){switch(t=pt,g=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)d=e[i],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&g!==null){e=void 0,i=t,d=g.memoizedProps,g=g.memoizedState,s=i.stateNode;try{var Ce=ds(i.type,d);e=s.getSnapshotBeforeUpdate(Ce,g),s.__reactInternalSnapshotBeforeUpdate=e}catch(Ee){Ge(i,i.return,Ee)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)vo(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":vo(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(P(163))}if(e=t.sibling,e!==null){e.return=t.return,pt=e;break}pt=t.return}}function mu(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:wi(e,i),s&4&&Tr(5,i);break;case 1:if(wi(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(A){Ge(i,i.return,A)}else{var d=ds(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(d,t,e.__reactInternalSnapshotBeforeUpdate)}catch(A){Ge(i,i.return,A)}}s&64&&du(i),s&512&&Br(i,i.return);break;case 3:if(wi(e,i),s&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{ih(e,t)}catch(A){Ge(i,i.return,A)}}break;case 27:t===null&&s&4&&gu(i);case 26:case 5:wi(e,i),t===null&&s&4&&_u(i),s&512&&Br(i,i.return);break;case 12:wi(e,i);break;case 31:wi(e,i),s&4&&yu(e,i);break;case 13:wi(e,i),s&4&&bu(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=P_.bind(null,i),av(e,i))));break;case 22:if(s=i.memoizedState!==null||yi,!s){t=t!==null&&t.memoizedState!==null||ht,d=yi;var g=ht;yi=s,(ht=t)&&!g?xi(e,i,(i.subtreeFlags&8772)!==0):wi(e,i),yi=d,ht=g}break;case 30:break;default:wi(e,i)}}function Su(e){var t=e.alternate;t!==null&&(e.alternate=null,Su(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Sa(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 et=null,At=!1;function bi(e,t,i){for(i=i.child;i!==null;)Cu(e,t,i),i=i.sibling}function Cu(e,t,i){if(tt&&typeof tt.onCommitFiberUnmount=="function")try{tt.onCommitFiberUnmount(xt,i)}catch{}switch(i.tag){case 26:ht||li(i,t),bi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ht||li(i,t);var s=et,d=At;Gi(i.type)&&(et=i.stateNode,At=!1),bi(e,t,i),jr(i.stateNode),et=s,At=d;break;case 5:ht||li(i,t);case 6:if(s=et,d=At,et=null,bi(e,t,i),et=s,At=d,et!==null)if(At)try{(et.nodeType===9?et.body:et.nodeName==="HTML"?et.ownerDocument.body:et).removeChild(i.stateNode)}catch(g){Ge(i,t,g)}else try{et.removeChild(i.stateNode)}catch(g){Ge(i,t,g)}break;case 18:et!==null&&(At?(e=et,dd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Js(e)):dd(et,i.stateNode));break;case 4:s=et,d=At,et=i.stateNode.containerInfo,At=!0,bi(e,t,i),et=s,At=d;break;case 0:case 11:case 14:case 15:Ii(2,i,t),ht||Ii(4,i,t),bi(e,t,i);break;case 1:ht||(li(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&fu(i,t,s)),bi(e,t,i);break;case 21:bi(e,t,i);break;case 22:ht=(s=ht)||i.memoizedState!==null,bi(e,t,i),ht=s;break;default:bi(e,t,i)}}function yu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Js(e)}catch(i){Ge(t,t.return,i)}}}function bu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Js(e)}catch(i){Ge(t,t.return,i)}}function B_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new pu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new pu),t;default:throw Error(P(435,e.tag))}}function Un(e,t){var i=B_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var d=j_.bind(null,e,s);s.then(d,d)}})}function Rt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var d=i[s],g=e,A=t,k=A;e:for(;k!==null;){switch(k.tag){case 27:if(Gi(k.type)){et=k.stateNode,At=!1;break e}break;case 5:et=k.stateNode,At=!1;break e;case 3:case 4:et=k.stateNode.containerInfo,At=!0;break e}k=k.return}if(et===null)throw Error(P(160));Cu(g,A,d),et=null,At=!1,g=d.alternate,g!==null&&(g.return=null),d.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wu(t,e),t=t.sibling}var ti=null;function wu(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Rt(t,e),Dt(e),s&4&&(Ii(3,e,e.return),Tr(3,e),Ii(5,e,e.return));break;case 1:Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),s&64&&yi&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var d=ti;if(Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),s&4){var g=i!==null?i.memoizedState:null;if(s=e.memoizedState,i===null)if(s===null)if(e.stateNode===null){e:{s=e.type,i=e.memoizedProps,d=d.ownerDocument||d;t:switch(s){case"title":g=d.getElementsByTagName("title")[0],(!g||g[nr]||g[mt]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=d.createElement(s),d.head.insertBefore(g,d.querySelector("head > title"))),bt(g,s,i),g[mt]=e,gt(g),s=g;break e;case"link":var A=wd("link","href",d).get(s+(i.href||""));if(A){for(var k=0;k<A.length;k++)if(g=A[k],g.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&g.getAttribute("rel")===(i.rel==null?null:i.rel)&&g.getAttribute("title")===(i.title==null?null:i.title)&&g.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){A.splice(k,1);break t}}g=d.createElement(s),bt(g,s,i),d.head.appendChild(g);break;case"meta":if(A=wd("meta","content",d).get(s+(i.content||""))){for(k=0;k<A.length;k++)if(g=A[k],g.getAttribute("content")===(i.content==null?null:""+i.content)&&g.getAttribute("name")===(i.name==null?null:i.name)&&g.getAttribute("property")===(i.property==null?null:i.property)&&g.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&g.getAttribute("charset")===(i.charSet==null?null:i.charSet)){A.splice(k,1);break t}}g=d.createElement(s),bt(g,s,i),d.head.appendChild(g);break;default:throw Error(P(468,s))}g[mt]=e,gt(g),s=g}e.stateNode=s}else xd(d,e.type,e.stateNode);else e.stateNode=bd(d,s,e.memoizedProps);else g!==s?(g===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):g.count--,s===null?xd(d,e.type,e.stateNode):bd(d,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Pl(e,e.memoizedProps,i.memoizedProps)}break;case 27:Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),i!==null&&s&4&&Pl(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),e.flags&32){d=e.stateNode;try{bs(d,"")}catch(Ce){Ge(e,e.return,Ce)}}s&4&&e.stateNode!=null&&(d=e.memoizedProps,Pl(e,d,i!==null?i.memoizedProps:d)),s&1024&&($l=!0);break;case 6:if(Rt(t,e),Dt(e),s&4){if(e.stateNode===null)throw Error(P(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(Ce){Ge(e,e.return,Ce)}}break;case 3:if(ea=null,d=ti,ti=Zn(t.containerInfo),Rt(t,e),ti=d,Dt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Js(t.containerInfo)}catch(Ce){Ge(e,e.return,Ce)}$l&&($l=!1,xu(e));break;case 4:s=ti,ti=Zn(e.stateNode.containerInfo),Rt(t,e),Dt(e),ti=s;break;case 12:Rt(t,e),Dt(e);break;case 31:Rt(t,e),Dt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Un(e,s)));break;case 13:Rt(t,e),Dt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Pn=ge()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Un(e,s)));break;case 22:d=e.memoizedState!==null;var W=i!==null&&i.memoizedState!==null,te=yi,le=ht;if(yi=te||d,ht=le||W,Rt(t,e),ht=le,yi=te,Dt(e),s&8192)e:for(t=e.stateNode,t._visibility=d?t._visibility&-2:t._visibility|1,d&&(i===null||W||yi||ht||fs(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){W=i=t;try{if(g=W.stateNode,d)A=g.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{k=W.stateNode;var he=W.memoizedProps.style,re=he!=null&&he.hasOwnProperty("display")?he.display:null;k.style.display=re==null||typeof re=="boolean"?"":(""+re).trim()}}catch(Ce){Ge(W,W.return,Ce)}}}else if(t.tag===6){if(i===null){W=t;try{W.stateNode.nodeValue=d?"":W.memoizedProps}catch(Ce){Ge(W,W.return,Ce)}}}else if(t.tag===18){if(i===null){W=t;try{var ae=W.stateNode;d?fd(ae,!0):fd(W.stateNode,!1)}catch(Ce){Ge(W,W.return,Ce)}}}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}s&4&&(s=e.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,Un(e,i))));break;case 19:Rt(t,e),Dt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Un(e,s)));break;case 30:break;case 21:break;default:Rt(t,e),Dt(e)}}function Dt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(vu(s)){i=s;break}s=s.return}if(i==null)throw Error(P(160));switch(i.tag){case 27:var d=i.stateNode,g=jl(e);Nn(e,g,d);break;case 5:var A=i.stateNode;i.flags&32&&(bs(A,""),i.flags&=-33);var k=jl(e);Nn(e,k,A);break;case 3:case 4:var W=i.stateNode.containerInfo,te=jl(e);Fl(e,te,W);break;default:throw Error(P(161))}}catch(le){Ge(e,e.return,le)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xu(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function wi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)mu(e,t.alternate,t),t=t.sibling}function fs(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ii(4,t,t.return),fs(t);break;case 1:li(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&fu(t,t.return,i),fs(t);break;case 27:jr(t.stateNode);case 26:case 5:li(t,t.return),fs(t);break;case 22:t.memoizedState===null&&fs(t);break;case 30:fs(t);break;default:fs(t)}e=e.sibling}}function xi(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,d=e,g=t,A=g.flags;switch(g.tag){case 0:case 11:case 15:xi(d,g,i),Tr(4,g);break;case 1:if(xi(d,g,i),s=g,d=s.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(te){Ge(s,s.return,te)}if(s=g,d=s.updateQueue,d!==null){var k=s.stateNode;try{var W=d.shared.hiddenCallbacks;if(W!==null)for(d.shared.hiddenCallbacks=null,d=0;d<W.length;d++)th(W[d],k)}catch(te){Ge(s,s.return,te)}}i&&A&64&&du(g),Br(g,g.return);break;case 27:gu(g);case 26:case 5:xi(d,g,i),i&&s===null&&A&4&&_u(g),Br(g,g.return);break;case 12:xi(d,g,i);break;case 31:xi(d,g,i),i&&A&4&&yu(d,g);break;case 13:xi(d,g,i),i&&A&4&&bu(d,g);break;case 22:g.memoizedState===null&&xi(d,g,i),Br(g,g.return);break;case 30:break;default:xi(d,g,i)}t=t.sibling}}function ql(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&&mr(i))}function Wl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&mr(e))}function ii(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Lu(e,t,i,s),t=t.sibling}function Lu(e,t,i,s){var d=t.flags;switch(t.tag){case 0:case 11:case 15:ii(e,t,i,s),d&2048&&Tr(9,t);break;case 1:ii(e,t,i,s);break;case 3:ii(e,t,i,s),d&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&mr(e)));break;case 12:if(d&2048){ii(e,t,i,s),e=t.stateNode;try{var g=t.memoizedProps,A=g.id,k=g.onPostCommit;typeof k=="function"&&k(A,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(W){Ge(t,t.return,W)}}else ii(e,t,i,s);break;case 31:ii(e,t,i,s);break;case 13:ii(e,t,i,s);break;case 23:break;case 22:g=t.stateNode,A=t.alternate,t.memoizedState!==null?g._visibility&2?ii(e,t,i,s):Or(e,t):g._visibility&2?ii(e,t,i,s):(g._visibility|=2,Fs(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),d&2048&&ql(A,t);break;case 24:ii(e,t,i,s),d&2048&&Wl(t.alternate,t);break;default:ii(e,t,i,s)}}function Fs(e,t,i,s,d){for(d=d&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var g=e,A=t,k=i,W=s,te=A.flags;switch(A.tag){case 0:case 11:case 15:Fs(g,A,k,W,d),Tr(8,A);break;case 23:break;case 22:var le=A.stateNode;A.memoizedState!==null?le._visibility&2?Fs(g,A,k,W,d):Or(g,A):(le._visibility|=2,Fs(g,A,k,W,d)),d&&te&2048&&ql(A.alternate,A);break;case 24:Fs(g,A,k,W,d),d&&te&2048&&Wl(A.alternate,A);break;default:Fs(g,A,k,W,d)}t=t.sibling}}function Or(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,d=s.flags;switch(s.tag){case 22:Or(i,s),d&2048&&ql(s.alternate,s);break;case 24:Or(i,s),d&2048&&Wl(s.alternate,s);break;default:Or(i,s)}t=t.sibling}}var kr=8192;function $s(e,t,i){if(e.subtreeFlags&kr)for(e=e.child;e!==null;)Eu(e,t,i),e=e.sibling}function Eu(e,t,i){switch(e.tag){case 26:$s(e,t,i),e.flags&kr&&e.memoizedState!==null&&mv(i,ti,e.memoizedState,e.memoizedProps);break;case 5:$s(e,t,i);break;case 3:case 4:var s=ti;ti=Zn(e.stateNode.containerInfo),$s(e,t,i),ti=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=kr,kr=16777216,$s(e,t,i),kr=s):$s(e,t,i));break;default:$s(e,t,i)}}function Mu(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 Hr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];pt=s,Ru(s,e)}Mu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Au(e),e=e.sibling}function Au(e){switch(e.tag){case 0:case 11:case 15:Hr(e),e.flags&2048&&Ii(9,e,e.return);break;case 3:Hr(e);break;case 12:Hr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,In(e)):Hr(e);break;default:Hr(e)}}function In(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];pt=s,Ru(s,e)}Mu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ii(8,t,t.return),In(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,In(t));break;default:In(t)}e=e.sibling}}function Ru(e,t){for(;pt!==null;){var i=pt;switch(i.tag){case 0:case 11:case 15:Ii(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:mr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,pt=s;else e:for(i=e;pt!==null;){s=pt;var d=s.sibling,g=s.return;if(Su(s),s===i){pt=null;break e}if(d!==null){d.return=g,pt=d;break e}pt=g}}}var O_={getCacheForType:function(e){var t=Ct(lt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Ct(lt).controller.signal}},k_=typeof WeakMap=="function"?WeakMap:Map,$e=0,Ke=null,ke=null,Ne=0,We=0,Ut=null,Pi=!1,qs=!1,Gl=!1,Li=0,rt=0,ji=0,_s=0,Xl=0,It=0,Ws=0,zr=null,Tt=null,Vl=!1,Pn=0,Du=0,jn=1/0,Fn=null,Fi=null,dt=0,$i=null,Gs=null,Ei=0,Yl=0,Kl=null,Tu=null,Nr=0,Ql=null;function Pt(){return($e&2)!==0&&Ne!==0?Ne&-Ne:N.T!==null?so():Xo()}function Bu(){if(It===0)if((Ne&536870912)===0||Pe){var e=si;si<<=1,(si&3932160)===0&&(si=262144),It=e}else It=536870912;return e=zt.current,e!==null&&(e.flags|=32),It}function Bt(e,t,i){(e===Ke&&(We===2||We===9)||e.cancelPendingCommit!==null)&&(Xs(e,0),qi(e,Ne,It,!1)),rr(e,i),(($e&2)===0||e!==Ke)&&(e===Ke&&(($e&2)===0&&(_s|=i),rt===4&&qi(e,Ne,It,!1)),oi(e))}function Ou(e,t,i){if(($e&6)!==0)throw Error(P(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||sr(e,t),d=s?N_(e,t):Jl(e,t,!0),g=s;do{if(d===0){qs&&!s&&qi(e,t,0,!1);break}else{if(i=e.current.alternate,g&&!H_(i)){d=Jl(e,t,!1),g=!1;continue}if(d===2){if(g=t,e.errorRecoveryDisabledLanes&g)var A=0;else A=e.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){t=A;e:{var k=e;d=zr;var W=k.current.memoizedState.isDehydrated;if(W&&(Xs(k,A).flags|=256),A=Jl(k,A,!1),A!==2){if(Gl&&!W){k.errorRecoveryDisabledLanes|=g,_s|=g,d=4;break e}g=Tt,Tt=d,g!==null&&(Tt===null?Tt=g:Tt.push.apply(Tt,g))}d=A}if(g=!1,d!==2)continue}}if(d===1){Xs(e,0),qi(e,t,0,!0);break}e:{switch(s=e,g=d,g){case 0:case 1:throw Error(P(345));case 4:if((t&4194048)!==t)break;case 6:qi(s,t,It,!Pi);break e;case 2:Tt=null;break;case 3:case 5:break;default:throw Error(P(329))}if((t&62914560)===t&&(d=Pn+300-ge(),10<d)){if(qi(s,t,It,!Pi),Qr(s,0,!0)!==0)break e;Ei=t,s.timeoutHandle=hd(ku.bind(null,s,i,Tt,Fn,Vl,t,It,_s,Ws,Pi,g,"Throttled",-0,0),d);break e}ku(s,i,Tt,Fn,Vl,t,It,_s,Ws,Pi,g,null,-0,0)}}break}while(!0);oi(e)}function ku(e,t,i,s,d,g,A,k,W,te,le,he,re,ae){if(e.timeoutHandle=-1,he=t.subtreeFlags,he&8192||(he&16785408)===16785408){he={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ui},Eu(t,g,he);var Ce=(g&62914560)===g?Pn-ge():(g&4194048)===g?Du-ge():0;if(Ce=Sv(he,Ce),Ce!==null){Ei=g,e.cancelPendingCommit=Ce(Fu.bind(null,e,t,g,i,s,d,A,k,W,le,he,null,re,ae)),qi(e,g,A,!te);return}}Fu(e,t,g,i,s,d,A,k,W)}function H_(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 s=0;s<i.length;s++){var d=i[s],g=d.getSnapshot;d=d.value;try{if(!kt(g(),d))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 qi(e,t,i,s){t&=~Xl,t&=~_s,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var d=t;0<d;){var g=31-ut(d),A=1<<g;s[g]=-1,d&=~A}i!==0&&qo(e,i,t)}function $n(){return($e&6)===0?(Ur(0),!1):!0}function Zl(){if(ke!==null){if(We===0)var e=ke.return;else e=ke,vi=ns=null,_l(e),Ns=null,Cr=0,e=ke;for(;e!==null;)uu(e.alternate,e),e=e.return;ke=null}}function Xs(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,tv(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Ei=0,Zl(),Ke=e,ke=i=fi(e.current,null),Ne=t,We=0,Ut=null,Pi=!1,qs=sr(e,t),Gl=!1,Ws=It=Xl=_s=ji=rt=0,Tt=zr=null,Vl=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var d=31-ut(s),g=1<<d;t|=e[d],s&=~g}return Li=t,hn(),i}function Hu(e,t){Te=null,N.H=Ar,t===zs||t===mn?(t=Qc(),We=3):t===il?(t=Qc(),We=4):We=t===Dl?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ut=t,ke===null&&(rt=1,Bn(e,Wt(t,e.current)))}function zu(){var e=zt.current;return e===null?!0:(Ne&4194048)===Ne?Yt===null:(Ne&62914560)===Ne||(Ne&536870912)!==0?e===Yt:!1}function Nu(){var e=N.H;return N.H=Ar,e===null?Ar:e}function Uu(){var e=N.A;return N.A=O_,e}function qn(){rt=4,Pi||(Ne&4194048)!==Ne&&zt.current!==null||(qs=!0),(ji&134217727)===0&&(_s&134217727)===0||Ke===null||qi(Ke,Ne,It,!1)}function Jl(e,t,i){var s=$e;$e|=2;var d=Nu(),g=Uu();(Ke!==e||Ne!==t)&&(Fn=null,Xs(e,t)),t=!1;var A=rt;e:do try{if(We!==0&&ke!==null){var k=ke,W=Ut;switch(We){case 8:Zl(),A=6;break e;case 3:case 2:case 9:case 6:zt.current===null&&(t=!0);var te=We;if(We=0,Ut=null,Vs(e,k,W,te),i&&qs){A=0;break e}break;default:te=We,We=0,Ut=null,Vs(e,k,W,te)}}z_(),A=rt;break}catch(le){Hu(e,le)}while(!0);return t&&e.shellSuspendCounter++,vi=ns=null,$e=s,N.H=d,N.A=g,ke===null&&(Ke=null,Ne=0,hn()),A}function z_(){for(;ke!==null;)Iu(ke)}function N_(e,t){var i=$e;$e|=2;var s=Nu(),d=Uu();Ke!==e||Ne!==t?(Fn=null,jn=ge()+500,Xs(e,t)):qs=sr(e,t);e:do try{if(We!==0&&ke!==null){t=ke;var g=Ut;t:switch(We){case 1:We=0,Ut=null,Vs(e,t,g,1);break;case 2:case 9:if(Yc(g)){We=0,Ut=null,Pu(t);break}t=function(){We!==2&&We!==9||Ke!==e||(We=7),oi(e)},g.then(t,t);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:Yc(g)?(We=0,Ut=null,Pu(t)):(We=0,Ut=null,Vs(e,t,g,7));break;case 5:var A=null;switch(ke.tag){case 26:A=ke.memoizedState;case 5:case 27:var k=ke;if(A?Ld(A):k.stateNode.complete){We=0,Ut=null;var W=k.sibling;if(W!==null)ke=W;else{var te=k.return;te!==null?(ke=te,Wn(te)):ke=null}break t}}We=0,Ut=null,Vs(e,t,g,5);break;case 6:We=0,Ut=null,Vs(e,t,g,6);break;case 8:Zl(),rt=6;break e;default:throw Error(P(462))}}U_();break}catch(le){Hu(e,le)}while(!0);return vi=ns=null,N.H=s,N.A=d,$e=i,ke!==null?0:(Ke=null,Ne=0,hn(),rt)}function U_(){for(;ke!==null&&!me();)Iu(ke)}function Iu(e){var t=cu(e.alternate,e,Li);e.memoizedProps=e.pendingProps,t===null?Wn(e):ke=t}function Pu(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=su(i,t,t.pendingProps,t.type,void 0,Ne);break;case 11:t=su(i,t,t.pendingProps,t.type.render,t.ref,Ne);break;case 5:_l(t);default:uu(i,t),t=ke=Uc(t,Li),t=cu(i,t,Li)}e.memoizedProps=e.pendingProps,t===null?Wn(e):ke=t}function Vs(e,t,i,s){vi=ns=null,_l(t),Ns=null,Cr=0;var d=t.return;try{if(E_(e,d,t,i,Ne)){rt=1,Bn(e,Wt(i,e.current)),ke=null;return}}catch(g){if(d!==null)throw ke=d,g;rt=1,Bn(e,Wt(i,e.current)),ke=null;return}t.flags&32768?(Pe||s===1?e=!0:qs||(Ne&536870912)!==0?e=!1:(Pi=e=!0,(s===2||s===9||s===3||s===6)&&(s=zt.current,s!==null&&s.tag===13&&(s.flags|=16384))),ju(t,e)):Wn(t)}function Wn(e){var t=e;do{if((t.flags&32768)!==0){ju(t,Pi);return}e=t.return;var i=R_(t.alternate,t,Li);if(i!==null){ke=i;return}if(t=t.sibling,t!==null){ke=t;return}ke=t=e}while(t!==null);rt===0&&(rt=5)}function ju(e,t){do{var i=D_(e.alternate,e);if(i!==null){i.flags&=32767,ke=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){ke=e;return}ke=e=i}while(e!==null);rt=6,ke=null}function Fu(e,t,i,s,d,g,A,k,W){e.cancelPendingCommit=null;do Gn();while(dt!==0);if(($e&6)!==0)throw Error(P(327));if(t!==null){if(t===e.current)throw Error(P(177));if(g=t.lanes|t.childLanes,g|=ja,pf(e,i,g,A,k,W),e===Ke&&(ke=Ke=null,Ne=0),Gs=t,$i=e,Ei=i,Yl=g,Kl=d,Tu=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,F_(Qe,function(){return Xu(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=N.T,N.T=null,d=I.p,I.p=2,A=$e,$e|=4;try{T_(e,t,i)}finally{$e=A,I.p=d,N.T=s}}dt=1,$u(),qu(),Wu()}}function $u(){if(dt===1){dt=0;var e=$i,t=Gs,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=N.T,N.T=null;var s=I.p;I.p=2;var d=$e;$e|=4;try{wu(t,e);var g=uo,A=Rc(e.containerInfo),k=g.focusedElem,W=g.selectionRange;if(A!==k&&k&&k.ownerDocument&&Ac(k.ownerDocument.documentElement,k)){if(W!==null&&za(k)){var te=W.start,le=W.end;if(le===void 0&&(le=te),"selectionStart"in k)k.selectionStart=te,k.selectionEnd=Math.min(le,k.value.length);else{var he=k.ownerDocument||document,re=he&&he.defaultView||window;if(re.getSelection){var ae=re.getSelection(),Ce=k.textContent.length,Ee=Math.min(W.start,Ce),Ye=W.end===void 0?Ee:Math.min(W.end,Ce);!ae.extend&&Ee>Ye&&(A=Ye,Ye=Ee,Ee=A);var J=Mc(k,Ee),Y=Mc(k,Ye);if(J&&Y&&(ae.rangeCount!==1||ae.anchorNode!==J.node||ae.anchorOffset!==J.offset||ae.focusNode!==Y.node||ae.focusOffset!==Y.offset)){var ee=he.createRange();ee.setStart(J.node,J.offset),ae.removeAllRanges(),Ee>Ye?(ae.addRange(ee),ae.extend(Y.node,Y.offset)):(ee.setEnd(Y.node,Y.offset),ae.addRange(ee))}}}}for(he=[],ae=k;ae=ae.parentNode;)ae.nodeType===1&&he.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<he.length;k++){var oe=he[k];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}ra=!!ho,uo=ho=null}finally{$e=d,I.p=s,N.T=i}}e.current=t,dt=2}}function qu(){if(dt===2){dt=0;var e=$i,t=Gs,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=N.T,N.T=null;var s=I.p;I.p=2;var d=$e;$e|=4;try{mu(e,t.alternate,t)}finally{$e=d,I.p=s,N.T=i}}dt=3}}function Wu(){if(dt===4||dt===3){dt=0,ce();var e=$i,t=Gs,i=Ei,s=Tu;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?dt=5:(dt=0,Gs=$i=null,Gu(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(Fi=null),pa(i),t=t.stateNode,tt&&typeof tt.onCommitFiberRoot=="function")try{tt.onCommitFiberRoot(xt,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=N.T,d=I.p,I.p=2,N.T=null;try{for(var g=e.onRecoverableError,A=0;A<s.length;A++){var k=s[A];g(k.value,{componentStack:k.stack})}}finally{N.T=t,I.p=d}}(Ei&3)!==0&&Gn(),oi(e),d=e.pendingLanes,(i&261930)!==0&&(d&42)!==0?e===Ql?Nr++:(Nr=0,Ql=e):Nr=0,Ur(0)}}function Gu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,mr(t)))}function Gn(){return $u(),qu(),Wu(),Xu()}function Xu(){if(dt!==5)return!1;var e=$i,t=Yl;Yl=0;var i=pa(Ei),s=N.T,d=I.p;try{I.p=32>i?32:i,N.T=null,i=Kl,Kl=null;var g=$i,A=Ei;if(dt=0,Gs=$i=null,Ei=0,($e&6)!==0)throw Error(P(331));var k=$e;if($e|=4,Au(g.current),Lu(g,g.current,A,i),$e=k,Ur(0,!1),tt&&typeof tt.onPostCommitFiberRoot=="function")try{tt.onPostCommitFiberRoot(xt,g)}catch{}return!0}finally{I.p=d,N.T=s,Gu(e,t)}}function Vu(e,t,i){t=Wt(i,t),t=Rl(e.stateNode,t,2),e=zi(e,t,2),e!==null&&(rr(e,2),oi(e))}function Ge(e,t,i){if(e.tag===3)Vu(e,e,i);else for(;t!==null;){if(t.tag===3){Vu(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Fi===null||!Fi.has(s))){e=Wt(i,e),i=Yh(2),s=zi(t,i,2),s!==null&&(Kh(i,s,t,e),rr(s,2),oi(s));break}}t=t.return}}function eo(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new k_;var d=new Set;s.set(t,d)}else d=s.get(t),d===void 0&&(d=new Set,s.set(t,d));d.has(i)||(Gl=!0,d.add(i),e=I_.bind(null,e,t,i),t.then(e,e))}function I_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ke===e&&(Ne&i)===i&&(rt===4||rt===3&&(Ne&62914560)===Ne&&300>ge()-Pn?($e&2)===0&&Xs(e,0):Xl|=i,Ws===Ne&&(Ws=0)),oi(e)}function Yu(e,t){t===0&&(t=$o()),e=is(e,t),e!==null&&(rr(e,t),oi(e))}function P_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Yu(e,i)}function j_(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,d=e.memoizedState;d!==null&&(i=d.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(P(314))}s!==null&&s.delete(t),Yu(e,i)}function F_(e,t){return Se(e,t)}var Xn=null,Ys=null,to=!1,Vn=!1,io=!1,Wi=0;function oi(e){e!==Ys&&e.next===null&&(Ys===null?Xn=Ys=e:Ys=Ys.next=e),Vn=!0,to||(to=!0,q_())}function Ur(e,t){if(!io&&Vn){io=!0;do for(var i=!1,s=Xn;s!==null;){if(e!==0){var d=s.pendingLanes;if(d===0)var g=0;else{var A=s.suspendedLanes,k=s.pingedLanes;g=(1<<31-ut(42|e)+1)-1,g&=d&~(A&~k),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(i=!0,Ju(s,g))}else g=Ne,g=Qr(s,s===Ke?g:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(g&3)===0||sr(s,g)||(i=!0,Ju(s,g));s=s.next}while(i);io=!1}}function $_(){Ku()}function Ku(){Vn=to=!1;var e=0;Wi!==0&&ev()&&(e=Wi);for(var t=ge(),i=null,s=Xn;s!==null;){var d=s.next,g=Qu(s,t);g===0?(s.next=null,i===null?Xn=d:i.next=d,d===null&&(Ys=i)):(i=s,(e!==0||(g&3)!==0)&&(Vn=!0)),s=d}dt!==0&&dt!==5||Ur(e),Wi!==0&&(Wi=0)}function Qu(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,d=e.expirationTimes,g=e.pendingLanes&-62914561;0<g;){var A=31-ut(g),k=1<<A,W=d[A];W===-1?((k&i)===0||(k&s)!==0)&&(d[A]=gf(k,t)):W<=t&&(e.expiredLanes|=k),g&=~k}if(t=Ke,i=Ne,i=Qr(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(We===2||We===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&pe(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||sr(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&pe(s),pa(i)){case 2:case 8:i=_t;break;case 32:i=Qe;break;case 268435456:i=Ie;break;default:i=Qe}return s=Zu.bind(null,e),i=Se(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&pe(s),e.callbackPriority=2,e.callbackNode=null,2}function Zu(e,t){if(dt!==0&&dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Gn()&&e.callbackNode!==i)return null;var s=Ne;return s=Qr(e,e===Ke?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Ou(e,s,t),Qu(e,ge()),e.callbackNode!=null&&e.callbackNode===i?Zu.bind(null,e):null)}function Ju(e,t){if(Gn())return null;Ou(e,t,!0)}function q_(){iv(function(){($e&6)!==0?Se(Re,$_):Ku()})}function so(){if(Wi===0){var e=ks;e===0&&(e=jt,jt<<=1,(jt&261888)===0&&(jt=256)),Wi=e}return Wi}function ed(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:tn(""+e)}function td(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 W_(e,t,i,s,d){if(t==="submit"&&i&&i.stateNode===d){var g=ed((d[Et]||null).action),A=s.submitter;A&&(t=(t=A[Et]||null)?ed(t.formAction):A.getAttribute("formAction"),t!==null&&(g=t,A=null));var k=new an("action","action",null,s,d);e.push({event:k,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Wi!==0){var W=A?td(d,A):new FormData(d);wl(i,{pending:!0,data:W,method:d.method,action:g},null,W)}}else typeof g=="function"&&(k.preventDefault(),W=A?td(d,A):new FormData(d),wl(i,{pending:!0,data:W,method:d.method,action:g},g,W))},currentTarget:d}]})}}for(var ro=0;ro<Pa.length;ro++){var no=Pa[ro],G_=no.toLowerCase(),X_=no[0].toUpperCase()+no.slice(1);ei(G_,"on"+X_)}ei(Bc,"onAnimationEnd"),ei(Oc,"onAnimationIteration"),ei(kc,"onAnimationStart"),ei("dblclick","onDoubleClick"),ei("focusin","onFocus"),ei("focusout","onBlur"),ei(c_,"onTransitionRun"),ei(h_,"onTransitionStart"),ei(u_,"onTransitionCancel"),ei(Hc,"onTransitionEnd"),Cs("onMouseEnter",["mouseout","mouseover"]),Cs("onMouseLeave",["mouseout","mouseover"]),Cs("onPointerEnter",["pointerout","pointerover"]),Cs("onPointerLeave",["pointerout","pointerover"]),Zi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Zi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Zi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Zi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Zi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Zi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ir="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(" "),V_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ir));function id(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],d=s.event;s=s.listeners;e:{var g=void 0;if(t)for(var A=s.length-1;0<=A;A--){var k=s[A],W=k.instance,te=k.currentTarget;if(k=k.listener,W!==g&&d.isPropagationStopped())break e;g=k,d.currentTarget=te;try{g(d)}catch(le){cn(le)}d.currentTarget=null,g=W}else for(A=0;A<s.length;A++){if(k=s[A],W=k.instance,te=k.currentTarget,k=k.listener,W!==g&&d.isPropagationStopped())break e;g=k,d.currentTarget=te;try{g(d)}catch(le){cn(le)}d.currentTarget=null,g=W}}}}function He(e,t){var i=t[ma];i===void 0&&(i=t[ma]=new Set);var s=e+"__bubble";i.has(s)||(sd(t,e,2,!1),i.add(s))}function ao(e,t,i){var s=0;t&&(s|=4),sd(i,e,s,t)}var Yn="_reactListening"+Math.random().toString(36).slice(2);function lo(e){if(!e[Yn]){e[Yn]=!0,Ko.forEach(function(i){i!=="selectionchange"&&(V_.has(i)||ao(i,!1,e),ao(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Yn]||(t[Yn]=!0,ao("selectionchange",!1,t))}}function sd(e,t,i,s){switch(Bd(t)){case 2:var d=bv;break;case 8:d=wv;break;default:d=wo}i=d.bind(null,t,i,e),d=void 0,!Ma||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(d=!0),s?d!==void 0?e.addEventListener(t,i,{capture:!0,passive:d}):e.addEventListener(t,i,!0):d!==void 0?e.addEventListener(t,i,{passive:d}):e.addEventListener(t,i,!1)}function oo(e,t,i,s,d){var g=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var A=s.tag;if(A===3||A===4){var k=s.stateNode.containerInfo;if(k===d)break;if(A===4)for(A=s.return;A!==null;){var W=A.tag;if((W===3||W===4)&&A.stateNode.containerInfo===d)return;A=A.return}for(;k!==null;){if(A=ps(k),A===null)return;if(W=A.tag,W===5||W===6||W===26||W===27){s=g=A;continue e}k=k.parentNode}}s=s.return}oc(function(){var te=g,le=La(i),he=[];e:{var re=zc.get(e);if(re!==void 0){var ae=an,Ce=e;switch(e){case"keypress":if(rn(i)===0)break e;case"keydown":case"keyup":ae=jf;break;case"focusin":Ce="focus",ae=Ta;break;case"focusout":Ce="blur",ae=Ta;break;case"beforeblur":case"afterblur":ae=Ta;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":ae=uc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=Rf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=qf;break;case Bc:case Oc:case kc:ae=Bf;break;case Hc:ae=Gf;break;case"scroll":case"scrollend":ae=Mf;break;case"wheel":ae=Vf;break;case"copy":case"cut":case"paste":ae=kf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=fc;break;case"toggle":case"beforetoggle":ae=Kf}var Ee=(t&4)!==0,Ye=!Ee&&(e==="scroll"||e==="scrollend"),J=Ee?re!==null?re+"Capture":null:re;Ee=[];for(var Y=te,ee;Y!==null;){var oe=Y;if(ee=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||ee===null||J===null||(oe=lr(Y,J),oe!=null&&Ee.push(Pr(Y,oe,ee))),Ye)break;Y=Y.return}0<Ee.length&&(re=new ae(re,Ce,null,i,le),he.push({event:re,listeners:Ee}))}}if((t&7)===0){e:{if(re=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",re&&i!==xa&&(Ce=i.relatedTarget||i.fromElement)&&(ps(Ce)||Ce[gs]))break e;if((ae||re)&&(re=le.window===le?le:(re=le.ownerDocument)?re.defaultView||re.parentWindow:window,ae?(Ce=i.relatedTarget||i.toElement,ae=te,Ce=Ce?ps(Ce):null,Ce!==null&&(Ye=ne(Ce),Ee=Ce.tag,Ce!==Ye||Ee!==5&&Ee!==27&&Ee!==6)&&(Ce=null)):(ae=null,Ce=te),ae!==Ce)){if(Ee=uc,oe="onMouseLeave",J="onMouseEnter",Y="mouse",(e==="pointerout"||e==="pointerover")&&(Ee=fc,oe="onPointerLeave",J="onPointerEnter",Y="pointer"),Ye=ae==null?re:ar(ae),ee=Ce==null?re:ar(Ce),re=new Ee(oe,Y+"leave",ae,i,le),re.target=Ye,re.relatedTarget=ee,oe=null,ps(le)===te&&(Ee=new Ee(J,Y+"enter",Ce,i,le),Ee.target=ee,Ee.relatedTarget=Ye,oe=Ee),Ye=oe,ae&&Ce)t:{for(Ee=Y_,J=ae,Y=Ce,ee=0,oe=J;oe;oe=Ee(oe))ee++;oe=0;for(var we=Y;we;we=Ee(we))oe++;for(;0<ee-oe;)J=Ee(J),ee--;for(;0<oe-ee;)Y=Ee(Y),oe--;for(;ee--;){if(J===Y||Y!==null&&J===Y.alternate){Ee=J;break t}J=Ee(J),Y=Ee(Y)}Ee=null}else Ee=null;ae!==null&&rd(he,re,ae,Ee,!1),Ce!==null&&Ye!==null&&rd(he,Ye,Ce,Ee,!0)}}e:{if(re=te?ar(te):window,ae=re.nodeName&&re.nodeName.toLowerCase(),ae==="select"||ae==="input"&&re.type==="file")var je=yc;else if(Sc(re))if(bc)je=a_;else{je=r_;var ye=s_}else ae=re.nodeName,!ae||ae.toLowerCase()!=="input"||re.type!=="checkbox"&&re.type!=="radio"?te&&wa(te.elementType)&&(je=yc):je=n_;if(je&&(je=je(e,te))){Cc(he,je,i,le);break e}ye&&ye(e,re,te),e==="focusout"&&te&&re.type==="number"&&te.memoizedProps.value!=null&&ba(re,"number",re.value)}switch(ye=te?ar(te):window,e){case"focusin":(Sc(ye)||ye.contentEditable==="true")&&(Es=ye,Na=te,vr=null);break;case"focusout":vr=Na=Es=null;break;case"mousedown":Ua=!0;break;case"contextmenu":case"mouseup":case"dragend":Ua=!1,Dc(he,i,le);break;case"selectionchange":if(o_)break;case"keydown":case"keyup":Dc(he,i,le)}var Be;if(Oa)e:{switch(e){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else Ls?pc(e,i)&&(Ue="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ue="onCompositionStart");Ue&&(_c&&i.locale!=="ko"&&(Ls||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Ls&&(Be=cc()):(Ri=le,Aa="value"in Ri?Ri.value:Ri.textContent,Ls=!0)),ye=Kn(te,Ue),0<ye.length&&(Ue=new dc(Ue,e,null,i,le),he.push({event:Ue,listeners:ye}),Be?Ue.data=Be:(Be=mc(i),Be!==null&&(Ue.data=Be)))),(Be=Zf?Jf(e,i):e_(e,i))&&(Ue=Kn(te,"onBeforeInput"),0<Ue.length&&(ye=new dc("onBeforeInput","beforeinput",null,i,le),he.push({event:ye,listeners:Ue}),ye.data=Be)),W_(he,e,te,i,le)}id(he,t)})}function Pr(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Kn(e,t){for(var i=t+"Capture",s=[];e!==null;){var d=e,g=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||g===null||(d=lr(e,i),d!=null&&s.unshift(Pr(e,d,g)),d=lr(e,t),d!=null&&s.push(Pr(e,d,g))),e.tag===3)return s;e=e.return}return[]}function Y_(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,s,d){for(var g=t._reactName,A=[];i!==null&&i!==s;){var k=i,W=k.alternate,te=k.stateNode;if(k=k.tag,W!==null&&W===s)break;k!==5&&k!==26&&k!==27||te===null||(W=te,d?(te=lr(i,g),te!=null&&A.unshift(Pr(i,te,W))):d||(te=lr(i,g),te!=null&&A.push(Pr(i,te,W)))),i=i.return}A.length!==0&&e.push({event:t,listeners:A})}var K_=/\r\n?/g,Q_=/\u0000|\uFFFD/g;function nd(e){return(typeof e=="string"?e:""+e).replace(K_,`
49
+ `).replace(Q_,"")}function ad(e,t){return t=nd(t),nd(e)===t}function Ve(e,t,i,s,d,g){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||bs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&bs(e,""+s);break;case"className":Jr(e,"class",s);break;case"tabIndex":Jr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Jr(e,i,s);break;case"style":ac(e,s,g);break;case"data":if(t!=="object"){Jr(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=tn(""+s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="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 g=="function"&&(i==="formAction"?(t!=="input"&&Ve(e,t,"name",d.name,d,null),Ve(e,t,"formEncType",d.formEncType,d,null),Ve(e,t,"formMethod",d.formMethod,d,null),Ve(e,t,"formTarget",d.formTarget,d,null)):(Ve(e,t,"encType",d.encType,d,null),Ve(e,t,"method",d.method,d,null),Ve(e,t,"target",d.target,d,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=tn(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=ui);break;case"onScroll":s!=null&&He("scroll",e);break;case"onScrollEnd":s!=null&&He("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(P(61));if(i=s.__html,i!=null){if(d.children!=null)throw Error(P(60));e.innerHTML=i}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}i=tn(""+s),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":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":He("beforetoggle",e),He("toggle",e),Zr(e,"popover",s);break;case"xlinkActuate":hi(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":hi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":hi(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":hi(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":hi(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":hi(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":hi(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":hi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":hi(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Zr(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Lf.get(i)||i,Zr(e,i,s))}}function co(e,t,i,s,d,g){switch(i){case"style":ac(e,s,g);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(P(61));if(i=s.__html,i!=null){if(d.children!=null)throw Error(P(60));e.innerHTML=i}}break;case"children":typeof s=="string"?bs(e,s):(typeof s=="number"||typeof s=="bigint")&&bs(e,""+s);break;case"onScroll":s!=null&&He("scroll",e);break;case"onScrollEnd":s!=null&&He("scrollend",e);break;case"onClick":s!=null&&(e.onclick=ui);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Qo.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(d=i.endsWith("Capture"),t=i.slice(2,d?i.length-7:void 0),g=e[Et]||null,g=g!=null?g[i]:null,typeof g=="function"&&e.removeEventListener(t,g,d),typeof s=="function")){typeof g!="function"&&g!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,d);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Zr(e,i,s)}}}function bt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":He("error",e),He("load",e);var s=!1,d=!1,g;for(g in i)if(i.hasOwnProperty(g)){var A=i[g];if(A!=null)switch(g){case"src":s=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(P(137,t));default:Ve(e,t,g,A,i,null)}}d&&Ve(e,t,"srcSet",i.srcSet,i,null),s&&Ve(e,t,"src",i.src,i,null);return;case"input":He("invalid",e);var k=g=A=d=null,W=null,te=null;for(s in i)if(i.hasOwnProperty(s)){var le=i[s];if(le!=null)switch(s){case"name":d=le;break;case"type":A=le;break;case"checked":W=le;break;case"defaultChecked":te=le;break;case"value":g=le;break;case"defaultValue":k=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(P(137,t));break;default:Ve(e,t,s,le,i,null)}}ic(e,g,k,W,te,A,d,!1);return;case"select":He("invalid",e),s=A=g=null;for(d in i)if(i.hasOwnProperty(d)&&(k=i[d],k!=null))switch(d){case"value":g=k;break;case"defaultValue":A=k;break;case"multiple":s=k;default:Ve(e,t,d,k,i,null)}t=g,i=A,e.multiple=!!s,t!=null?ys(e,!!s,t,!1):i!=null&&ys(e,!!s,i,!0);return;case"textarea":He("invalid",e),g=d=s=null;for(A in i)if(i.hasOwnProperty(A)&&(k=i[A],k!=null))switch(A){case"value":s=k;break;case"defaultValue":d=k;break;case"children":g=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(P(91));break;default:Ve(e,t,A,k,i,null)}rc(e,s,d,g);return;case"option":for(W in i)if(i.hasOwnProperty(W)&&(s=i[W],s!=null))switch(W){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ve(e,t,W,s,i,null)}return;case"dialog":He("beforetoggle",e),He("toggle",e),He("cancel",e),He("close",e);break;case"iframe":case"object":He("load",e);break;case"video":case"audio":for(s=0;s<Ir.length;s++)He(Ir[s],e);break;case"image":He("error",e),He("load",e);break;case"details":He("toggle",e);break;case"embed":case"source":case"link":He("error",e),He("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(te in i)if(i.hasOwnProperty(te)&&(s=i[te],s!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(P(137,t));default:Ve(e,t,te,s,i,null)}return;default:if(wa(t)){for(le in i)i.hasOwnProperty(le)&&(s=i[le],s!==void 0&&co(e,t,le,s,i,void 0));return}}for(k in i)i.hasOwnProperty(k)&&(s=i[k],s!=null&&Ve(e,t,k,s,i,null))}function Z_(e,t,i,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,g=null,A=null,k=null,W=null,te=null,le=null;for(ae in i){var he=i[ae];if(i.hasOwnProperty(ae)&&he!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":W=he;default:s.hasOwnProperty(ae)||Ve(e,t,ae,null,s,he)}}for(var re in s){var ae=s[re];if(he=i[re],s.hasOwnProperty(re)&&(ae!=null||he!=null))switch(re){case"type":g=ae;break;case"name":d=ae;break;case"checked":te=ae;break;case"defaultChecked":le=ae;break;case"value":A=ae;break;case"defaultValue":k=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(P(137,t));break;default:ae!==he&&Ve(e,t,re,ae,s,he)}}ya(e,A,k,W,te,le,g,d);return;case"select":ae=A=k=re=null;for(g in i)if(W=i[g],i.hasOwnProperty(g)&&W!=null)switch(g){case"value":break;case"multiple":ae=W;default:s.hasOwnProperty(g)||Ve(e,t,g,null,s,W)}for(d in s)if(g=s[d],W=i[d],s.hasOwnProperty(d)&&(g!=null||W!=null))switch(d){case"value":re=g;break;case"defaultValue":k=g;break;case"multiple":A=g;default:g!==W&&Ve(e,t,d,g,s,W)}t=k,i=A,s=ae,re!=null?ys(e,!!i,re,!1):!!s!=!!i&&(t!=null?ys(e,!!i,t,!0):ys(e,!!i,i?[]:"",!1));return;case"textarea":ae=re=null;for(k in i)if(d=i[k],i.hasOwnProperty(k)&&d!=null&&!s.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:Ve(e,t,k,null,s,d)}for(A in s)if(d=s[A],g=i[A],s.hasOwnProperty(A)&&(d!=null||g!=null))switch(A){case"value":re=d;break;case"defaultValue":ae=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(P(91));break;default:d!==g&&Ve(e,t,A,d,s,g)}sc(e,re,ae);return;case"option":for(var Ce in i)if(re=i[Ce],i.hasOwnProperty(Ce)&&re!=null&&!s.hasOwnProperty(Ce))switch(Ce){case"selected":e.selected=!1;break;default:Ve(e,t,Ce,null,s,re)}for(W in s)if(re=s[W],ae=i[W],s.hasOwnProperty(W)&&re!==ae&&(re!=null||ae!=null))switch(W){case"selected":e.selected=re&&typeof re!="function"&&typeof re!="symbol";break;default:Ve(e,t,W,re,s,ae)}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 Ee in i)re=i[Ee],i.hasOwnProperty(Ee)&&re!=null&&!s.hasOwnProperty(Ee)&&Ve(e,t,Ee,null,s,re);for(te in s)if(re=s[te],ae=i[te],s.hasOwnProperty(te)&&re!==ae&&(re!=null||ae!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(P(137,t));break;default:Ve(e,t,te,re,s,ae)}return;default:if(wa(t)){for(var Ye in i)re=i[Ye],i.hasOwnProperty(Ye)&&re!==void 0&&!s.hasOwnProperty(Ye)&&co(e,t,Ye,void 0,s,re);for(le in s)re=s[le],ae=i[le],!s.hasOwnProperty(le)||re===ae||re===void 0&&ae===void 0||co(e,t,le,re,s,ae);return}}for(var J in i)re=i[J],i.hasOwnProperty(J)&&re!=null&&!s.hasOwnProperty(J)&&Ve(e,t,J,null,s,re);for(he in s)re=s[he],ae=i[he],!s.hasOwnProperty(he)||re===ae||re==null&&ae==null||Ve(e,t,he,re,s,ae)}function ld(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function J_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var d=i[s],g=d.transferSize,A=d.initiatorType,k=d.duration;if(g&&k&&ld(A)){for(A=0,k=d.responseEnd,s+=1;s<i.length;s++){var W=i[s],te=W.startTime;if(te>k)break;var le=W.transferSize,he=W.initiatorType;le&&ld(he)&&(W=W.responseEnd,A+=le*(W<k?1:(k-te)/(W-te)))}if(--s,t+=8*(g+A)/(d.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 ho=null,uo=null;function Qn(e){return e.nodeType===9?e:e.ownerDocument}function od(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 cd(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 fo(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 _o=null;function ev(){var e=window.event;return e&&e.type==="popstate"?e===_o?!1:(_o=e,!0):(_o=null,!1)}var hd=typeof setTimeout=="function"?setTimeout:void 0,tv=typeof clearTimeout=="function"?clearTimeout:void 0,ud=typeof Promise=="function"?Promise:void 0,iv=typeof queueMicrotask=="function"?queueMicrotask:typeof ud<"u"?function(e){return ud.resolve(null).then(e).catch(sv)}:hd;function sv(e){setTimeout(function(){throw e})}function Gi(e){return e==="head"}function dd(e,t){var i=t,s=0;do{var d=i.nextSibling;if(e.removeChild(i),d&&d.nodeType===8)if(i=d.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(d),Js(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")jr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,jr(i);for(var g=i.firstChild;g;){var A=g.nextSibling,k=g.nodeName;g[nr]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&g.rel.toLowerCase()==="stylesheet"||i.removeChild(g),g=A}}else i==="body"&&jr(e.ownerDocument.body);i=d}while(i);Js(t)}function fd(e,t){var i=e;e=0;do{var s=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||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function vo(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":vo(i),Sa(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function rv(e,t,i,s){for(;e.nodeType===1;){var d=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[nr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(g=e.getAttribute("rel"),g==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(g!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(g=e.getAttribute("src"),(g!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&g&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var g=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===g)return e}else return e;if(e=Kt(e.nextSibling),e===null)break}return null}function nv(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Kt(e.nextSibling),e===null))return null;return e}function _d(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Kt(e.nextSibling),e===null))return null;return e}function go(e){return e.data==="$?"||e.data==="$~"}function po(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function av(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Kt(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 mo=null;function vd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Kt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function gd(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 pd(e,t,i){switch(t=Qn(i),e){case"html":if(e=t.documentElement,!e)throw Error(P(452));return e;case"head":if(e=t.head,!e)throw Error(P(453));return e;case"body":if(e=t.body,!e)throw Error(P(454));return e;default:throw Error(P(451))}}function jr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Sa(e)}var Qt=new Map,md=new Set;function Zn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Mi=I.d;I.d={f:lv,r:ov,D:cv,C:hv,L:uv,m:dv,X:_v,S:fv,M:vv};function lv(){var e=Mi.f(),t=$n();return e||t}function ov(e){var t=ms(e);t!==null&&t.tag===5&&t.type==="form"?Hh(t):Mi.r(e)}var Ks=typeof document>"u"?null:document;function Sd(e,t,i){var s=Ks;if(s&&typeof t=="string"&&t){var d=$t(t);d='link[rel="'+e+'"][href="'+d+'"]',typeof i=="string"&&(d+='[crossorigin="'+i+'"]'),md.has(d)||(md.add(d),e={rel:e,crossOrigin:i,href:t},s.querySelector(d)===null&&(t=s.createElement("link"),bt(t,"link",e),gt(t),s.head.appendChild(t)))}}function cv(e){Mi.D(e),Sd("dns-prefetch",e,null)}function hv(e,t){Mi.C(e,t),Sd("preconnect",e,t)}function uv(e,t,i){Mi.L(e,t,i);var s=Ks;if(s&&e&&t){var d='link[rel="preload"][as="'+$t(t)+'"]';t==="image"&&i&&i.imageSrcSet?(d+='[imagesrcset="'+$t(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(d+='[imagesizes="'+$t(i.imageSizes)+'"]')):d+='[href="'+$t(e)+'"]';var g=d;switch(t){case"style":g=Qs(e);break;case"script":g=Zs(e)}Qt.has(g)||(e=a({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Qt.set(g,e),s.querySelector(d)!==null||t==="style"&&s.querySelector(Fr(g))||t==="script"&&s.querySelector($r(g))||(t=s.createElement("link"),bt(t,"link",e),gt(t),s.head.appendChild(t)))}}function dv(e,t){Mi.m(e,t);var i=Ks;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",d='link[rel="modulepreload"][as="'+$t(s)+'"][href="'+$t(e)+'"]',g=d;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Zs(e)}if(!Qt.has(g)&&(e=a({rel:"modulepreload",href:e},t),Qt.set(g,e),i.querySelector(d)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector($r(g)))return}s=i.createElement("link"),bt(s,"link",e),gt(s),i.head.appendChild(s)}}}function fv(e,t,i){Mi.S(e,t,i);var s=Ks;if(s&&e){var d=Ss(s).hoistableStyles,g=Qs(e);t=t||"default";var A=d.get(g);if(!A){var k={loading:0,preload:null};if(A=s.querySelector(Fr(g)))k.loading=5;else{e=a({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Qt.get(g))&&So(e,i);var W=A=s.createElement("link");gt(W),bt(W,"link",e),W._p=new Promise(function(te,le){W.onload=te,W.onerror=le}),W.addEventListener("load",function(){k.loading|=1}),W.addEventListener("error",function(){k.loading|=2}),k.loading|=4,Jn(A,t,s)}A={type:"stylesheet",instance:A,count:1,state:k},d.set(g,A)}}}function _v(e,t){Mi.X(e,t);var i=Ks;if(i&&e){var s=Ss(i).hoistableScripts,d=Zs(e),g=s.get(d);g||(g=i.querySelector($r(d)),g||(e=a({src:e,async:!0},t),(t=Qt.get(d))&&Co(e,t),g=i.createElement("script"),gt(g),bt(g,"link",e),i.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},s.set(d,g))}}function vv(e,t){Mi.M(e,t);var i=Ks;if(i&&e){var s=Ss(i).hoistableScripts,d=Zs(e),g=s.get(d);g||(g=i.querySelector($r(d)),g||(e=a({src:e,async:!0,type:"module"},t),(t=Qt.get(d))&&Co(e,t),g=i.createElement("script"),gt(g),bt(g,"link",e),i.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},s.set(d,g))}}function Cd(e,t,i,s){var d=(d=de.current)?Zn(d):null;if(!d)throw Error(P(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Qs(i.href),i=Ss(d).hoistableStyles,s=i.get(t),s||(s={type:"style",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Qs(i.href);var g=Ss(d).hoistableStyles,A=g.get(e);if(A||(d=d.ownerDocument||d,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(e,A),(g=d.querySelector(Fr(e)))&&!g._p&&(A.instance=g,A.state.loading=5),Qt.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},Qt.set(e,i),g||gv(d,e,i,A.state))),t&&s===null)throw Error(P(528,""));return A}if(t&&s!==null)throw Error(P(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Zs(i),i=Ss(d).hoistableScripts,s=i.get(t),s||(s={type:"script",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(P(444,e))}}function Qs(e){return'href="'+$t(e)+'"'}function Fr(e){return'link[rel="stylesheet"]['+e+"]"}function yd(e){return a({},e,{"data-precedence":e.precedence,precedence:null})}function gv(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),bt(t,"link",i),gt(t),e.head.appendChild(t))}function Zs(e){return'[src="'+$t(e)+'"]'}function $r(e){return"script[async]"+e}function bd(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+$t(i.href)+'"]');if(s)return t.instance=s,gt(s),s;var d=a({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),gt(s),bt(s,"style",d),Jn(s,i.precedence,e),t.instance=s;case"stylesheet":d=Qs(i.href);var g=e.querySelector(Fr(d));if(g)return t.state.loading|=4,t.instance=g,gt(g),g;s=yd(i),(d=Qt.get(d))&&So(s,d),g=(e.ownerDocument||e).createElement("link"),gt(g);var A=g;return A._p=new Promise(function(k,W){A.onload=k,A.onerror=W}),bt(g,"link",s),t.state.loading|=4,Jn(g,i.precedence,e),t.instance=g;case"script":return g=Zs(i.src),(d=e.querySelector($r(g)))?(t.instance=d,gt(d),d):(s=i,(d=Qt.get(g))&&(s=a({},i),Co(s,d)),e=e.ownerDocument||e,d=e.createElement("script"),gt(d),bt(d,"link",s),e.head.appendChild(d),t.instance=d);case"void":return null;default:throw Error(P(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Jn(s,i.precedence,e));return t.instance}function Jn(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=s.length?s[s.length-1]:null,g=d,A=0;A<s.length;A++){var k=s[A];if(k.dataset.precedence===t)g=k;else if(g!==d)break}g?g.parentNode.insertBefore(e,g.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function So(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Co(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ea=null;function wd(e,t,i){if(ea===null){var s=new Map,d=ea=new Map;d.set(i,s)}else d=ea,s=d.get(i),s||(s=new Map,d.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),d=0;d<i.length;d++){var g=i[d];if(!(g[nr]||g[mt]||e==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var A=g.getAttribute(t)||"";A=e+A;var k=s.get(A);k?k.push(g):s.set(A,[g])}}return s}function xd(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function pv(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 Ld(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function mv(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var d=Qs(s.href),g=t.querySelector(Fr(d));if(g){t=g._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ta.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=g,gt(g);return}g=t.ownerDocument||t,s=yd(s),(d=Qt.get(d))&&So(s,d),g=g.createElement("link"),gt(g);var A=g;A._p=new Promise(function(k,W){A.onload=k,A.onerror=W}),bt(g,"link",s),i.instance=g}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=ta.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var yo=0;function Sv(e,t){return e.stylesheets&&e.count===0&&sa(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&sa(e,e.stylesheets),e.unsuspend){var g=e.unsuspend;e.unsuspend=null,g()}},6e4+t);0<e.imgBytes&&yo===0&&(yo=62500*J_());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sa(e,e.stylesheets),e.unsuspend)){var g=e.unsuspend;e.unsuspend=null,g()}},(e.imgBytes>yo?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(d)}}:null}function ta(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sa(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ia=null;function sa(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ia=new Map,t.forEach(Cv,e),ia=null,ta.call(e))}function Cv(e,t){if(!(t.state.loading&4)){var i=ia.get(e);if(i)var s=i.get(null);else{i=new Map,ia.set(e,i);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<d.length;g++){var A=d[g];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(i.set(A.dataset.precedence,A),s=A)}s&&i.set(null,s)}d=t.instance,A=d.getAttribute("data-precedence"),g=i.get(A)||s,g===s&&i.set(null,d),i.set(A,d),this.count++,s=ta.bind(this),d.addEventListener("load",s),d.addEventListener("error",s),g?g.parentNode.insertBefore(d,g.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),t.state.loading|=4}}var qr={$$typeof:l,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function yv(e,t,i,s,d,g,A,k,W){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=va(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=va(0),this.hiddenUpdates=va(null),this.identifierPrefix=s,this.onUncaughtError=d,this.onCaughtError=g,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.incompleteTransitions=new Map}function Ed(e,t,i,s,d,g,A,k,W,te,le,he){return e=new yv(e,t,i,A,W,te,le,he,k),t=1,g===!0&&(t|=24),g=Ht(3,null,null,t),e.current=g,g.stateNode=e,t=Ja(),t.refCount++,e.pooledCache=t,t.refCount++,g.memoizedState={element:s,isDehydrated:i,cache:t},sl(g),e}function Md(e){return e?(e=Rs,e):Rs}function Ad(e,t,i,s,d,g){d=Md(d),s.context===null?s.context=d:s.pendingContext=d,s=Hi(t),s.payload={element:i},g=g===void 0?null:g,g!==null&&(s.callback=g),i=zi(e,s,t),i!==null&&(Bt(i,e,t),br(i,e,t))}function Rd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function bo(e,t){Rd(e,t),(e=e.alternate)&&Rd(e,t)}function Dd(e){if(e.tag===13||e.tag===31){var t=is(e,67108864);t!==null&&Bt(t,e,67108864),bo(e,67108864)}}function Td(e){if(e.tag===13||e.tag===31){var t=Pt();t=ga(t);var i=is(e,t);i!==null&&Bt(i,e,t),bo(e,t)}}var ra=!0;function bv(e,t,i,s){var d=N.T;N.T=null;var g=I.p;try{I.p=2,wo(e,t,i,s)}finally{I.p=g,N.T=d}}function wv(e,t,i,s){var d=N.T;N.T=null;var g=I.p;try{I.p=8,wo(e,t,i,s)}finally{I.p=g,N.T=d}}function wo(e,t,i,s){if(ra){var d=xo(s);if(d===null)oo(e,t,s,na,i),Od(e,s);else if(Lv(d,e,t,i,s))s.stopPropagation();else if(Od(e,s),t&4&&-1<xv.indexOf(e)){for(;d!==null;){var g=ms(d);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var A=Jt(g.pendingLanes);if(A!==0){var k=g;for(k.pendingLanes|=2,k.entangledLanes|=2;A;){var W=1<<31-ut(A);k.entanglements[1]|=W,A&=~W}oi(g),($e&6)===0&&(jn=ge()+500,Ur(0))}}break;case 31:case 13:k=is(g,2),k!==null&&Bt(k,g,2),$n(),bo(g,2)}if(g=xo(s),g===null&&oo(e,t,s,na,i),g===d)break;d=g}d!==null&&s.stopPropagation()}else oo(e,t,s,null,i)}}function xo(e){return e=La(e),Lo(e)}var na=null;function Lo(e){if(na=null,e=ps(e),e!==null){var t=ne(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=j(t),e!==null)return e;e=null}else if(i===31){if(e=n(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 na=e,null}function Bd(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(ze()){case Re:return 2;case _t:return 8;case Qe:case it:return 32;case Ie:return 268435456;default:return 32}default:return 32}}var Eo=!1,Xi=null,Vi=null,Yi=null,Wr=new Map,Gr=new Map,Ki=[],xv="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 Od(e,t){switch(e){case"focusin":case"focusout":Xi=null;break;case"dragenter":case"dragleave":Vi=null;break;case"mouseover":case"mouseout":Yi=null;break;case"pointerover":case"pointerout":Wr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gr.delete(t.pointerId)}}function Xr(e,t,i,s,d,g){return e===null||e.nativeEvent!==g?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:g,targetContainers:[d]},t!==null&&(t=ms(t),t!==null&&Dd(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,d!==null&&t.indexOf(d)===-1&&t.push(d),e)}function Lv(e,t,i,s,d){switch(t){case"focusin":return Xi=Xr(Xi,e,t,i,s,d),!0;case"dragenter":return Vi=Xr(Vi,e,t,i,s,d),!0;case"mouseover":return Yi=Xr(Yi,e,t,i,s,d),!0;case"pointerover":var g=d.pointerId;return Wr.set(g,Xr(Wr.get(g)||null,e,t,i,s,d)),!0;case"gotpointercapture":return g=d.pointerId,Gr.set(g,Xr(Gr.get(g)||null,e,t,i,s,d)),!0}return!1}function kd(e){var t=ps(e.target);if(t!==null){var i=ne(t);if(i!==null){if(t=i.tag,t===13){if(t=j(i),t!==null){e.blockedOn=t,Vo(e.priority,function(){Td(i)});return}}else if(t===31){if(t=n(i),t!==null){e.blockedOn=t,Vo(e.priority,function(){Td(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 aa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=xo(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);xa=s,i.target.dispatchEvent(s),xa=null}else return t=ms(i),t!==null&&Dd(t),e.blockedOn=i,!1;t.shift()}return!0}function Hd(e,t,i){aa(e)&&i.delete(t)}function Ev(){Eo=!1,Xi!==null&&aa(Xi)&&(Xi=null),Vi!==null&&aa(Vi)&&(Vi=null),Yi!==null&&aa(Yi)&&(Yi=null),Wr.forEach(Hd),Gr.forEach(Hd)}function la(e,t){e.blockedOn===t&&(e.blockedOn=null,Eo||(Eo=!0,U.unstable_scheduleCallback(U.unstable_NormalPriority,Ev)))}var oa=null;function zd(e){oa!==e&&(oa=e,U.unstable_scheduleCallback(U.unstable_NormalPriority,function(){oa===e&&(oa=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],d=e[t+2];if(typeof s!="function"){if(Lo(s||i)===null)continue;break}var g=ms(i);g!==null&&(e.splice(t,3),t-=3,wl(g,{pending:!0,data:d,method:i.method,action:s},s,d))}}))}function Js(e){function t(W){return la(W,e)}Xi!==null&&la(Xi,e),Vi!==null&&la(Vi,e),Yi!==null&&la(Yi,e),Wr.forEach(t),Gr.forEach(t);for(var i=0;i<Ki.length;i++){var s=Ki[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Ki.length&&(i=Ki[0],i.blockedOn===null);)kd(i),i.blockedOn===null&&Ki.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var d=i[s],g=i[s+1],A=d[Et]||null;if(typeof g=="function")A||zd(i);else if(A){var k=null;if(g&&g.hasAttribute("formAction")){if(d=g,A=g[Et]||null)k=A.formAction;else if(Lo(d)!==null)continue}else k=A.action;typeof k=="function"?i[s+1]=k:(i.splice(s,3),s-=3),zd(i)}}}function Nd(){function e(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(A){return d=A})},focusReset:"manual",scroll:"manual"})}function t(){d!==null&&(d(),d=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,d=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),d!==null&&(d(),d=null)}}}function Mo(e){this._internalRoot=e}ca.prototype.render=Mo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(P(409));var i=t.current,s=Pt();Ad(i,s,e,t,null,null)},ca.prototype.unmount=Mo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ad(e.current,2,null,e,null,null),$n(),t[gs]=null}};function ca(e){this._internalRoot=e}ca.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xo();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Ki.length&&t!==0&&t<Ki[i].priority;i++);Ki.splice(i,0,e),i===0&&kd(e)}};var Ud=G.version;if(Ud!=="19.2.4")throw Error(P(527,Ud,"19.2.4"));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(P(188)):(e=Object.keys(e).join(","),Error(P(268,e)));return e=f(t),e=e!==null?_(e):null,e=e===null?null:e.stateNode,e};var Mv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ha=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ha.isDisabled&&ha.supportsFiber)try{xt=ha.inject(Mv),tt=ha}catch{}}return Yr.createRoot=function(e,t){if(!Z(e))throw Error(P(299));var i=!1,s="",d=Wh,g=Gh,A=Xh;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(d=t.onUncaughtError),t.onCaughtError!==void 0&&(g=t.onCaughtError),t.onRecoverableError!==void 0&&(A=t.onRecoverableError)),t=Ed(e,1,!1,null,null,i,s,null,d,g,A,Nd),e[gs]=t.current,lo(e),new Mo(t)},Yr.hydrateRoot=function(e,t,i){if(!Z(e))throw Error(P(299));var s=!1,d="",g=Wh,A=Gh,k=Xh,W=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(g=i.onUncaughtError),i.onCaughtError!==void 0&&(A=i.onCaughtError),i.onRecoverableError!==void 0&&(k=i.onRecoverableError),i.formState!==void 0&&(W=i.formState)),t=Ed(e,1,!0,t,i??null,s,d,W,g,A,k,Nd),t.context=Md(null),i=t.current,s=Pt(),s=ga(s),d=Hi(s),d.callback=null,zi(i,d,s),i=s,t.current.lanes=i,rr(t,i),oi(t),e[gs]=t.current,lo(e),new ca(t)},Yr.version="19.2.4",Yr}var Vd;function Iv(){if(Vd)return Do.exports;Vd=1;function U(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(U)}catch(G){console.error(G)}}return U(),Do.exports=Uv(),Do.exports}var Pv=Iv();const jv=768,Fv=1e3;function Kr(){const G=window.location.pathname.match(/^(\/project\/[^/]+\/)/);return G?G[1]:"/"}function vs(U){const G=Kr(),X=U.startsWith("/")?U.slice(1):U;return G+X}function ci(){const U=localStorage.getItem("codev-web-key");return U?{Authorization:`Bearer ${U}`}:{}}async function $v(){const U=await fetch(vs("api/state"),{headers:ci()});if(!U.ok)throw new Error(`Failed to fetch state: ${U.status}`);return U.json()}async function qv(){const U=await fetch(vs("api/tabs/shell"),{method:"POST",headers:{"Content-Type":"application/json",...ci()}});if(!U.ok)throw new Error(await U.text());return U.json()}async function lf(U,G,X){const P=await fetch(vs("api/tabs/file"),{method:"POST",headers:{"Content-Type":"application/json",...ci()},body:JSON.stringify({path:U,line:G,terminalId:X})});if(!P.ok)throw new Error(await P.text());return P.json()}async function Wv(U){const G=await fetch(vs(`api/tabs/${U}`),{method:"DELETE",headers:ci()});if(!G.ok)throw new Error(await G.text())}async function Gv(){const U=await fetch(vs("api/files"),{headers:ci()});if(!U.ok)throw new Error(`Failed to fetch files: ${U.status}`);return U.json()}function Yd(U){return U.terminalId?`${Kr()}ws/terminal/${U.terminalId}`:null}async function Xv(){const U=await fetch(vs("api/git/status"),{headers:ci()});if(!U.ok)throw new Error(`Failed to fetch git status: ${U.status}`);return U.json()}async function Vv(){const U=await fetch(vs("api/files/recent"),{headers:ci()});if(!U.ok)throw new Error(`Failed to fetch recent files: ${U.status}`);return U.json()}const Kd={registered:!1,state:"error",uptime:null,towerId:null,towerName:null,serverUrl:null,accessUrl:null};async function Yv(){try{const U=await fetch("/api/tunnel/status",{headers:ci()});return U.status===404?null:U.ok?U.json():Kd}catch{return Kd}}async function Kv(){const U=await fetch("/api/tunnel/connect",{method:"POST",headers:ci()});if(!U.ok)throw new Error(`Connect failed: ${U.status}`)}async function Qv(){const U=await fetch("/api/tunnel/disconnect",{method:"POST",headers:ci()});if(!U.ok)throw new Error(`Disconnect failed: ${U.status}`)}function Zv(){const[U,G]=xe.useState(null),[X,P]=xe.useState(null),[Z,ne]=xe.useState(null),j=xe.useCallback(async()=>{try{const[n,u]=await Promise.all([$v(),Yv()]);G(n),P(u),ne(null)}catch(n){ne(n.message)}},[]);return xe.useEffect(()=>{j();const n=setInterval(j,Fv);return()=>clearInterval(n)},[j]),{state:U,tunnelStatus:X,error:Z,refresh:j}}function Jv(U){const G=[{id:"dashboard",type:"dashboard",label:"Dashboard",closable:!1}];U!=null&&U.architect&&G.push({id:"architect",type:"architect",label:"Architect",closable:!1,terminalId:U.architect.terminalId});for(const X of(U==null?void 0:U.builders)??[])G.push({id:X.id,type:"builder",label:X.name||`Builder ${X.id}`,closable:!0,projectId:X.id,terminalId:X.terminalId});for(const X of(U==null?void 0:U.utils)??[])!X.terminalId&&(!X.pid||X.pid===0)||G.push({id:X.id,type:"shell",label:X.name||`Shell ${X.id}`,closable:!0,utilId:X.id,terminalId:X.terminalId});for(const X of(U==null?void 0:U.annotations)??[]){const P=X.file.split("/").pop()??X.file;G.push({id:X.id,type:"file",label:P,closable:!0,annotationId:X.id,filePath:X.file})}return G}function eg(U){const[G,X]=xe.useState("dashboard"),P=xe.useRef(null),Z=xe.useRef(!1),ne=Jv(U);xe.useEffect(()=>{if(Z.current||U===null)return;const f=new URLSearchParams(window.location.search).get("tab");if(f){const _=ne.find(a=>a.id===f||a.type===f);if(_){X(_.id),Z.current=!0;const a=new URL(window.location.href);a.searchParams.delete("tab"),window.history.replaceState({},"",a.toString())}}else Z.current=!0},[ne,U]),xe.useEffect(()=>{const u=new Set(ne.map(f=>f.id));if(P.current===null){U!==null&&(P.current=u);return}for(const f of ne)!P.current.has(f.id)&&f.type!=="architect"&&X(f.id);P.current=u},[ne.map(u=>u.id).join(","),U!==null]);const j=xe.useCallback(u=>{X(u)},[]),n=ne.find(u=>u.id===G)??ne[0];return{tabs:ne,activeTab:n,activeTabId:G,selectTab:j}}function tg(U){const[G,X]=xe.useState(()=>typeof window<"u"?window.matchMedia(U).matches:!1);return xe.useEffect(()=>{const P=window.matchMedia(U),Z=ne=>X(ne.matches);return P.addEventListener("change",Z),X(P.matches),()=>P.removeEventListener("change",Z)},[U]),G}function ig({left:U,right:G,defaultSplit:X=50}){const[P,Z]=xe.useState(X),ne=xe.useRef(null),j=xe.useRef(!1),n=xe.useCallback(u=>{u.preventDefault(),j.current=!0;const f=a=>{if(!j.current||!ne.current)return;const p=ne.current.getBoundingClientRect(),w=(a.clientX-p.left)/p.width*100;Z(Math.max(20,Math.min(80,w)))},_=()=>{j.current=!1,document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",_)};document.addEventListener("mousemove",f),document.addEventListener("mouseup",_)},[]);return K.jsxs("div",{ref:ne,className:"split-pane",children:[K.jsx("div",{className:"split-left",style:{width:`${P}%`},children:U}),K.jsx("div",{className:"split-handle",onMouseDown:n,role:"separator","aria-label":"Resize panels"}),K.jsx("div",{className:"split-right",style:{width:`${100-P}%`},children:G})]})}function of({tabs:U,activeTabId:G,onSelectTab:X,onRefresh:P}){const Z=async(ne,j)=>{ne.stopPropagation();try{await Wv(j.id),P()}catch(n){console.error("Failed to close tab:",n)}};return K.jsx("div",{className:"tab-bar",role:"tablist","aria-label":"Content tabs",children:U.map(ne=>K.jsxs("button",{role:"tab","aria-selected":ne.id===G,className:`tab ${ne.id===G?"tab-active":""}`,onClick:()=>X(ne.id),title:ne.label,children:[K.jsx("span",{className:"tab-label",children:ne.label}),ne.closable&&K.jsx("span",{className:"tab-close",onClick:j=>Z(j,ne),role:"button","aria-label":`Close ${ne.label}`,tabIndex:0,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),Z(j,ne))},children:"×"})]},ne.id))})}var ko={exports:{}},Qd;function sg(){return Qd||(Qd=1,(function(U,G){(function(X,P){U.exports=P()})(globalThis,(()=>(()=>{var X={4567:function(j,n,u){var f=this&&this.__decorate||function(c,l,S,x){var v,b=arguments.length,m=b<3?l:x===null?x=Object.getOwnPropertyDescriptor(l,S):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(c,l,S,x);else for(var C=c.length-1;C>=0;C--)(v=c[C])&&(m=(b<3?v(m):b>3?v(l,S,m):v(l,S))||m);return b>3&&m&&Object.defineProperty(l,S,m),m},_=this&&this.__param||function(c,l){return function(S,x){l(S,x,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.AccessibilityManager=void 0;const a=u(9042),p=u(9924),w=u(844),y=u(4725),o=u(2585),r=u(3656);let h=n.AccessibilityManager=class extends w.Disposable{constructor(c,l,S,x){super(),this._terminal=c,this._coreBrowserService=S,this._renderService=x,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 v=0;v<this._terminal.rows;v++)this._rowElements[v]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[v]);if(this._topBoundaryFocusListener=v=>this._handleBoundaryFocus(v,0),this._bottomBoundaryFocusListener=v=>this._handleBoundaryFocus(v,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 p.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((v=>this._handleResize(v.rows)))),this.register(this._terminal.onRender((v=>this._refreshRows(v.start,v.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((v=>this._handleChar(v)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
50
+ `)))),this.register(this._terminal.onA11yTab((v=>this._handleTab(v)))),this.register(this._terminal.onKey((v=>this._handleKey(v.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,r.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,w.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(c){for(let l=0;l<c;l++)this._handleChar(" ")}_handleChar(c){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==c&&(this._charsToAnnounce+=c):this._charsToAnnounce+=c,c===`
51
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=a.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(c){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(c)||this._charsToConsume.push(c)}_refreshRows(c,l){this._liveRegionDebouncer.refresh(c,l,this._terminal.rows)}_renderRows(c,l){const S=this._terminal.buffer,x=S.lines.length.toString();for(let v=c;v<=l;v++){const b=S.lines.get(S.ydisp+v),m=[],C=(b==null?void 0:b.translateToString(!0,void 0,void 0,m))||"",L=(S.ydisp+v+1).toString(),M=this._rowElements[v];M&&(C.length===0?(M.innerText=" ",this._rowColumns.set(M,[0,1])):(M.textContent=C,this._rowColumns.set(M,m)),M.setAttribute("aria-posinset",L),M.setAttribute("aria-setsize",x))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(c,l){const S=c.target,x=this._rowElements[l===0?1:this._rowElements.length-2];if(S.getAttribute("aria-posinset")===(l===0?"1":`${this._terminal.buffer.lines.length}`)||c.relatedTarget!==x)return;let v,b;if(l===0?(v=S,b=this._rowElements.pop(),this._rowContainer.removeChild(b)):(v=this._rowElements.shift(),b=S,this._rowContainer.removeChild(v)),v.removeEventListener("focus",this._topBoundaryFocusListener),b.removeEventListener("focus",this._bottomBoundaryFocusListener),l===0){const m=this._createAccessibilityTreeNode();this._rowElements.unshift(m),this._rowContainer.insertAdjacentElement("afterbegin",m)}else{const m=this._createAccessibilityTreeNode();this._rowElements.push(m),this._rowContainer.appendChild(m)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(l===0?-1:1),this._rowElements[l===0?1:this._rowElements.length-2].focus(),c.preventDefault(),c.stopImmediatePropagation()}_handleSelectionChange(){var C;if(this._rowElements.length===0)return;const c=document.getSelection();if(!c)return;if(c.isCollapsed)return void(this._rowContainer.contains(c.anchorNode)&&this._terminal.clearSelection());if(!c.anchorNode||!c.focusNode)return void console.error("anchorNode and/or focusNode are null");let l={node:c.anchorNode,offset:c.anchorOffset},S={node:c.focusNode,offset:c.focusOffset};if((l.node.compareDocumentPosition(S.node)&Node.DOCUMENT_POSITION_PRECEDING||l.node===S.node&&l.offset>S.offset)&&([l,S]=[S,l]),l.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(l={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(l.node))return;const x=this._rowElements.slice(-1)[0];if(S.node.compareDocumentPosition(x)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(S={node:x,offset:((C=x.textContent)==null?void 0:C.length)??0}),!this._rowContainer.contains(S.node))return;const v=({node:L,offset:M})=>{const E=L instanceof Text?L.parentNode:L;let R=parseInt(E==null?void 0:E.getAttribute("aria-posinset"),10)-1;if(isNaN(R))return console.warn("row is invalid. Race condition?"),null;const B=this._rowColumns.get(E);if(!B)return console.warn("columns is null. Race condition?"),null;let $=M<B.length?B[M]:B.slice(-1)[0]+1;return $>=this._terminal.cols&&(++R,$=0),{row:R,column:$}},b=v(l),m=v(S);if(b&&m){if(b.row>m.row||b.row===m.row&&b.column>=m.column)throw new Error("invalid range");this._terminal.select(b.column,b.row,(m.row-b.row)*this._terminal.cols-b.column+m.column)}}_handleResize(c){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let l=this._rowContainer.children.length;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);for(;this._rowElements.length>c;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const c=this._coreBrowserService.mainDocument.createElement("div");return c.setAttribute("role","listitem"),c.tabIndex=-1,this._refreshRowDimensions(c),c}_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 c=0;c<this._terminal.rows;c++)this._refreshRowDimensions(this._rowElements[c])}}_refreshRowDimensions(c){c.style.height=`${this._renderService.dimensions.css.cell.height}px`}};n.AccessibilityManager=h=f([_(1,o.IInstantiationService),_(2,y.ICoreBrowserService),_(3,y.IRenderService)],h)},3614:(j,n)=>{function u(p){return p.replace(/\r?\n/g,"\r")}function f(p,w){return w?"\x1B[200~"+p+"\x1B[201~":p}function _(p,w,y,o){p=f(p=u(p),y.decPrivateModes.bracketedPasteMode&&o.rawOptions.ignoreBracketedPasteMode!==!0),y.triggerDataEvent(p,!0),w.value=""}function a(p,w,y){const o=y.getBoundingClientRect(),r=p.clientX-o.left-10,h=p.clientY-o.top-10;w.style.width="20px",w.style.height="20px",w.style.left=`${r}px`,w.style.top=`${h}px`,w.style.zIndex="1000",w.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=u,n.bracketTextForPaste=f,n.copyHandler=function(p,w){p.clipboardData&&p.clipboardData.setData("text/plain",w.selectionText),p.preventDefault()},n.handlePasteEvent=function(p,w,y,o){p.stopPropagation(),p.clipboardData&&_(p.clipboardData.getData("text/plain"),w,y,o)},n.paste=_,n.moveTextAreaUnderMouseCursor=a,n.rightClickHandler=function(p,w,y,o,r){a(p,w,y),r&&o.rightClickSelect(p),w.value=o.selectionText,w.select()}},7239:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorContrastCache=void 0;const f=u(1505);n.ColorContrastCache=class{constructor(){this._color=new f.TwoKeyMap,this._css=new f.TwoKeyMap}setCss(_,a,p){this._css.set(_,a,p)}getCss(_,a){return this._css.get(_,a)}setColor(_,a,p){this._color.set(_,a,p)}getColor(_,a){return this._color.get(_,a)}clear(){this._color.clear(),this._css.clear()}}},3656:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(u,f,_,a){u.addEventListener(f,_,a);let p=!1;return{dispose:()=>{p||(p=!0,u.removeEventListener(f,_,a))}}}},3551:function(j,n,u){var f=this&&this.__decorate||function(h,c,l,S){var x,v=arguments.length,b=v<3?c:S===null?S=Object.getOwnPropertyDescriptor(c,l):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(h,c,l,S);else for(var m=h.length-1;m>=0;m--)(x=h[m])&&(b=(v<3?x(b):v>3?x(c,l,b):x(c,l))||b);return v>3&&b&&Object.defineProperty(c,l,b),b},_=this&&this.__param||function(h,c){return function(l,S){c(l,S,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Linkifier=void 0;const a=u(3656),p=u(8460),w=u(844),y=u(2585),o=u(4725);let r=n.Linkifier=class extends w.Disposable{get currentLink(){return this._currentLink}constructor(h,c,l,S,x){super(),this._element=h,this._mouseService=c,this._renderService=l,this._bufferService=S,this._linkProviderService=x,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,w.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,w.toDisposable)((()=>{var v;this._lastMouseEvent=void 0,(v=this._activeProviderReplies)==null||v.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,a.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,a.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,a.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,a.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(h){this._lastMouseEvent=h;const c=this._positionFromMouseEvent(h,this._element,this._mouseService);if(!c)return;this._isMouseOut=!1;const l=h.composedPath();for(let S=0;S<l.length;S++){const x=l[S];if(x.classList.contains("xterm"))break;if(x.classList.contains("xterm-hover"))return}this._lastBufferCell&&c.x===this._lastBufferCell.x&&c.y===this._lastBufferCell.y||(this._handleHover(c),this._lastBufferCell=c)}_handleHover(h){if(this._activeLine!==h.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(h,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,h)||(this._clearCurrentLink(),this._askForLink(h,!0))}_askForLink(h,c){var S,x;this._activeProviderReplies&&c||((S=this._activeProviderReplies)==null||S.forEach((v=>{v==null||v.forEach((b=>{b.link.dispose&&b.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=h.y);let l=!1;for(const[v,b]of this._linkProviderService.linkProviders.entries())c?(x=this._activeProviderReplies)!=null&&x.get(v)&&(l=this._checkLinkProviderResult(v,h,l)):b.provideLinks(h.y,(m=>{var L,M;if(this._isMouseOut)return;const C=m==null?void 0:m.map((E=>({link:E})));(L=this._activeProviderReplies)==null||L.set(v,C),l=this._checkLinkProviderResult(v,h,l),((M=this._activeProviderReplies)==null?void 0:M.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(h.y,this._activeProviderReplies)}))}_removeIntersectingLinks(h,c){const l=new Set;for(let S=0;S<c.size;S++){const x=c.get(S);if(x)for(let v=0;v<x.length;v++){const b=x[v],m=b.link.range.start.y<h?0:b.link.range.start.x,C=b.link.range.end.y>h?this._bufferService.cols:b.link.range.end.x;for(let L=m;L<=C;L++){if(l.has(L)){x.splice(v--,1);break}l.add(L)}}}}_checkLinkProviderResult(h,c,l){var v;if(!this._activeProviderReplies)return l;const S=this._activeProviderReplies.get(h);let x=!1;for(let b=0;b<h;b++)this._activeProviderReplies.has(b)&&!this._activeProviderReplies.get(b)||(x=!0);if(!x&&S){const b=S.find((m=>this._linkAtPosition(m.link,c)));b&&(l=!0,this._handleNewLink(b))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!l)for(let b=0;b<this._activeProviderReplies.size;b++){const m=(v=this._activeProviderReplies.get(b))==null?void 0:v.find((C=>this._linkAtPosition(C.link,c)));if(m){l=!0,this._handleNewLink(m);break}}return l}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(h){if(!this._currentLink)return;const c=this._positionFromMouseEvent(h,this._element,this._mouseService);c&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,c)&&this._currentLink.link.activate(h,this._currentLink.link.text)}_clearCurrentLink(h,c){this._currentLink&&this._lastMouseEvent&&(!h||!c||this._currentLink.link.range.start.y>=h&&this._currentLink.link.range.end.y<=c)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,w.disposeArray)(this._linkCacheDisposables))}_handleNewLink(h){if(!this._lastMouseEvent)return;const c=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);c&&this._linkAtPosition(h.link,c)&&(this._currentLink=h,this._currentLink.state={decorations:{underline:h.link.decorations===void 0||h.link.decorations.underline,pointerCursor:h.link.decorations===void 0||h.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,h.link,this._lastMouseEvent),h.link.decorations={},Object.defineProperties(h.link.decorations,{pointerCursor:{get:()=>{var l,S;return(S=(l=this._currentLink)==null?void 0:l.state)==null?void 0:S.decorations.pointerCursor},set:l=>{var S;(S=this._currentLink)!=null&&S.state&&this._currentLink.state.decorations.pointerCursor!==l&&(this._currentLink.state.decorations.pointerCursor=l,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",l))}},underline:{get:()=>{var l,S;return(S=(l=this._currentLink)==null?void 0:l.state)==null?void 0:S.decorations.underline},set:l=>{var S,x,v;(S=this._currentLink)!=null&&S.state&&((v=(x=this._currentLink)==null?void 0:x.state)==null?void 0:v.decorations.underline)!==l&&(this._currentLink.state.decorations.underline=l,this._currentLink.state.isHovered&&this._fireUnderlineEvent(h.link,l))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((l=>{if(!this._currentLink)return;const S=l.start===0?0:l.start+1+this._bufferService.buffer.ydisp,x=this._bufferService.buffer.ydisp+1+l.end;if(this._currentLink.link.range.start.y>=S&&this._currentLink.link.range.end.y<=x&&(this._clearCurrentLink(S,x),this._lastMouseEvent)){const v=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);v&&this._askForLink(v,!1)}}))))}_linkHover(h,c,l){var S;(S=this._currentLink)!=null&&S.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(c,!0),this._currentLink.state.decorations.pointerCursor&&h.classList.add("xterm-cursor-pointer")),c.hover&&c.hover(l,c.text)}_fireUnderlineEvent(h,c){const l=h.range,S=this._bufferService.buffer.ydisp,x=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-S-1,l.end.x,l.end.y-S-1,void 0);(c?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(x)}_linkLeave(h,c,l){var S;(S=this._currentLink)!=null&&S.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(c,!1),this._currentLink.state.decorations.pointerCursor&&h.classList.remove("xterm-cursor-pointer")),c.leave&&c.leave(l,c.text)}_linkAtPosition(h,c){const l=h.range.start.y*this._bufferService.cols+h.range.start.x,S=h.range.end.y*this._bufferService.cols+h.range.end.x,x=c.y*this._bufferService.cols+c.x;return l<=x&&x<=S}_positionFromMouseEvent(h,c,l){const S=l.getCoords(h,c,this._bufferService.cols,this._bufferService.rows);if(S)return{x:S[0],y:S[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(h,c,l,S,x){return{x1:h,y1:c,x2:l,y2:S,cols:this._bufferService.cols,fg:x}}};n.Linkifier=r=f([_(1,o.IMouseService),_(2,o.IRenderService),_(3,y.IBufferService),_(4,o.ILinkProviderService)],r)},9042:(j,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(j,n,u){var f=this&&this.__decorate||function(o,r,h,c){var l,S=arguments.length,x=S<3?r:c===null?c=Object.getOwnPropertyDescriptor(r,h):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(o,r,h,c);else for(var v=o.length-1;v>=0;v--)(l=o[v])&&(x=(S<3?l(x):S>3?l(r,h,x):l(r,h))||x);return S>3&&x&&Object.defineProperty(r,h,x),x},_=this&&this.__param||function(o,r){return function(h,c){r(h,c,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkProvider=void 0;const a=u(511),p=u(2585);let w=n.OscLinkProvider=class{constructor(o,r,h){this._bufferService=o,this._optionsService=r,this._oscLinkService=h}provideLinks(o,r){var C;const h=this._bufferService.buffer.lines.get(o-1);if(!h)return void r(void 0);const c=[],l=this._optionsService.rawOptions.linkHandler,S=new a.CellData,x=h.getTrimmedLength();let v=-1,b=-1,m=!1;for(let L=0;L<x;L++)if(b!==-1||h.hasContent(L)){if(h.loadCell(L,S),S.hasExtendedAttrs()&&S.extended.urlId){if(b===-1){b=L,v=S.extended.urlId;continue}m=S.extended.urlId!==v}else b!==-1&&(m=!0);if(m||b!==-1&&L===x-1){const M=(C=this._oscLinkService.getLinkData(v))==null?void 0:C.uri;if(M){const E={start:{x:b+1,y:o},end:{x:L+(m||L!==x-1?0:1),y:o}};let R=!1;if(!(l!=null&&l.allowNonHttpProtocols))try{const B=new URL(M);["http:","https:"].includes(B.protocol)||(R=!0)}catch{R=!0}R||c.push({text:M,range:E,activate:(B,$)=>l?l.activate(B,$,E):y(0,$),hover:(B,$)=>{var N;return(N=l==null?void 0:l.hover)==null?void 0:N.call(l,B,$,E)},leave:(B,$)=>{var N;return(N=l==null?void 0:l.leave)==null?void 0:N.call(l,B,$,E)}})}m=!1,S.hasExtendedAttrs()&&S.extended.urlId?(b=L,v=S.extended.urlId):(b=-1,v=-1)}}r(c)}};function y(o,r){if(confirm(`Do you want to navigate to ${r}?
52
52
 
53
- WARNING: This link could potentially be dangerous`)){const h=window.open();if(h){try{h.opener=null}catch{}h.location.href=r}else console.warn("Opening link blocked as opener could not be cleared")}}n.OscLinkProvider=b=f([_(0,p.IBufferService),_(1,p.IOptionsService),_(2,p.IOscLinkService)],b)},6193:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderDebouncer=void 0,n.RenderDebouncer=class{constructor(u,f){this._renderCallback=u,this._coreBrowserService=f,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(u,f,_){this._rowCount=_,u=u!==void 0?u:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const u=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,f),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Terminal=void 0;const f=u(3614),_=u(3656),a=u(3551),p=u(9042),b=u(3730),w=u(1680),c=u(3107),r=u(5744),h=u(2950),o=u(1296),l=u(428),S=u(4269),x=u(5114),v=u(8934),y=u(3230),m=u(9312),C=u(4725),L=u(6731),A=u(8055),E=u(8969),D=u(8460),O=u(844),F=u(6114),N=u(8437),I=u(2584),P=u(7399),R=u(5941),B=u(9074),T=u(2585),H=u(5435),V=u(4567),Q=u(779);class ue extends E.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(q={}){super(q),this.browser=F,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new O.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(B.DecorationService),this._instantiationService.setService(T.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(Q.LinkProviderService),this._instantiationService.setService(C.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(b.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((z,se)=>this.refresh(z,se)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((z=>this._reportWindowsOptions(z)))),this.register(this._inputHandler.onColor((z=>this._handleColorEvent(z)))),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((z=>this._afterResize(z.cols,z.rows)))),this.register((0,O.toDisposable)((()=>{var z,se;this._customKeyEventHandler=void 0,(se=(z=this.element)==null?void 0:z.parentNode)==null||se.removeChild(this.element)})))}_handleColorEvent(q){if(this._themeService)for(const z of q){let se,ie="";switch(z.index){case 256:se="foreground",ie="10";break;case 257:se="background",ie="11";break;case 258:se="cursor",ie="12";break;default:se="ansi",ie="4;"+z.index}switch(z.type){case 0:const ve=A.color.toColorRGB(se==="ansi"?this._themeService.colors.ansi[z.index]:this._themeService.colors[se]);this.coreService.triggerDataEvent(`${I.C0.ESC}]${ie};${(0,R.toRgbString)(ve)}${I.C1_ESCAPED.ST}`);break;case 1:if(se==="ansi")this._themeService.modifyColors((fe=>fe.ansi[z.index]=A.channels.toColor(...z.color)));else{const fe=se;this._themeService.modifyColors((Me=>Me[fe]=A.channels.toColor(...z.color)))}break;case 2:this._themeService.restoreColor(z.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(q){q?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(q){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(I.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var q;return(q=this.textarea)==null?void 0:q.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(I.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 q=this.buffer.ybase+this.buffer.y,z=this.buffer.lines.get(q);if(!z)return;const se=Math.min(this.buffer.x,this.cols-1),ie=this._renderService.dimensions.css.cell.height,ve=z.getWidth(se),fe=this._renderService.dimensions.css.cell.width*ve,Me=this.buffer.y*this._renderService.dimensions.css.cell.height,_e=se*this._renderService.dimensions.css.cell.width;this.textarea.style.left=_e+"px",this.textarea.style.top=Me+"px",this.textarea.style.width=fe+"px",this.textarea.style.height=ie+"px",this.textarea.style.lineHeight=ie+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,_.addDisposableDomListener)(this.element,"copy",(z=>{this.hasSelection()&&(0,f.copyHandler)(z,this._selectionService)})));const q=z=>(0,f.handlePasteEvent)(z,this.textarea,this.coreService,this.optionsService);this.register((0,_.addDisposableDomListener)(this.textarea,"paste",q)),this.register((0,_.addDisposableDomListener)(this.element,"paste",q)),F.isFirefox?this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(z=>{z.button===2&&(0,f.rightClickHandler)(z,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,_.addDisposableDomListener)(this.element,"contextmenu",(z=>{(0,f.rightClickHandler)(z,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),F.isLinux&&this.register((0,_.addDisposableDomListener)(this.element,"auxclick",(z=>{z.button===1&&(0,f.moveTextAreaUnderMouseCursor)(z,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,_.addDisposableDomListener)(this.textarea,"keyup",(q=>this._keyUp(q)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keydown",(q=>this._keyDown(q)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keypress",(q=>this._keyPress(q)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionupdate",(q=>this._compositionHelper.compositionupdate(q)))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,_.addDisposableDomListener)(this.textarea,"input",(q=>this._inputEvent(q)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(q){var se;if(!q)throw new Error("Terminal requires a parent element.");if(q.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((se=this.element)==null?void 0:se.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=q.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"),q.appendChild(this.element);const z=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),z.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,_.addDisposableDomListener)(this.screenElement,"mousemove",(ie=>this.updateCursorStyle(ie)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),z.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),F.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(x.CoreBrowserService,this.textarea,q.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(C.ICoreBrowserService,this._coreBrowserService),this.register((0,_.addDisposableDomListener)(this.textarea,"focus",(ie=>this._handleTextAreaFocus(ie)))),this.register((0,_.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(l.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(C.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(L.ThemeService),this._instantiationService.setService(C.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(S.CharacterJoinerService),this._instantiationService.setService(C.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(y.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(C.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ie=>this._onRender.fire(ie)))),this.onResize((ie=>this._renderService.resize(ie.cols,ie.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(h.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(v.MouseService),this._instantiationService.setService(C.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(a.Linkifier,this.screenElement)),this.element.appendChild(z);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(w.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ie=>this.scrollLines(ie.amount,ie.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(m.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(C.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ie=>this.scrollLines(ie.amount,ie.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ie=>this._renderService.handleSelectionChanged(ie.start,ie.end,ie.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ie=>{this.textarea.value=ie,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ie=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,_.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(c.BufferDecorationRenderer,this.screenElement)),this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(ie=>this._selectionService.handleMouseDown(ie)))),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(V.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ie=>this._handleScreenReaderModeOptionChange(ie)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ie=>{!this._overviewRulerRenderer&&ie&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(o.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const q=this,z=this.element;function se(fe){const Me=q._mouseService.getMouseReportCoords(fe,q.screenElement);if(!Me)return!1;let _e,Oe;switch(fe.overrideType||fe.type){case"mousemove":Oe=32,fe.buttons===void 0?(_e=3,fe.button!==void 0&&(_e=fe.button<3?fe.button:3)):_e=1&fe.buttons?0:4&fe.buttons?1:2&fe.buttons?2:3;break;case"mouseup":Oe=0,_e=fe.button<3?fe.button:3;break;case"mousedown":Oe=1,_e=fe.button<3?fe.button:3;break;case"wheel":if(q._customWheelEventHandler&&q._customWheelEventHandler(fe)===!1||q.viewport.getLinesScrolled(fe)===0)return!1;Oe=fe.deltaY<0?0:1,_e=4;break;default:return!1}return!(Oe===void 0||_e===void 0||_e>4)&&q.coreMouseService.triggerMouseEvent({col:Me.col,row:Me.row,x:Me.x,y:Me.y,button:_e,action:Oe,ctrl:fe.ctrlKey,alt:fe.altKey,shift:fe.shiftKey})}const ie={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ve={mouseup:fe=>(se(fe),fe.buttons||(this._document.removeEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.removeEventListener("mousemove",ie.mousedrag)),this.cancel(fe)),wheel:fe=>(se(fe),this.cancel(fe,!0)),mousedrag:fe=>{fe.buttons&&se(fe)},mousemove:fe=>{fe.buttons||se(fe)}};this.register(this.coreMouseService.onProtocolChange((fe=>{fe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(fe)),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&fe?ie.mousemove||(z.addEventListener("mousemove",ve.mousemove),ie.mousemove=ve.mousemove):(z.removeEventListener("mousemove",ie.mousemove),ie.mousemove=null),16&fe?ie.wheel||(z.addEventListener("wheel",ve.wheel,{passive:!1}),ie.wheel=ve.wheel):(z.removeEventListener("wheel",ie.wheel),ie.wheel=null),2&fe?ie.mouseup||(ie.mouseup=ve.mouseup):(this._document.removeEventListener("mouseup",ie.mouseup),ie.mouseup=null),4&fe?ie.mousedrag||(ie.mousedrag=ve.mousedrag):(this._document.removeEventListener("mousemove",ie.mousedrag),ie.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,_.addDisposableDomListener)(z,"mousedown",(fe=>{if(fe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(fe))return se(fe),ie.mouseup&&this._document.addEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.addEventListener("mousemove",ie.mousedrag),this.cancel(fe)}))),this.register((0,_.addDisposableDomListener)(z,"wheel",(fe=>{if(!ie.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(fe)===!1)return!1;if(!this.buffer.hasScrollback){const Me=this.viewport.getLinesScrolled(fe);if(Me===0)return;const _e=I.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(fe.deltaY<0?"A":"B");let Oe="";for(let qe=0;qe<Math.abs(Me);qe++)Oe+=_e;return this.coreService.triggerDataEvent(Oe,!0),this.cancel(fe,!0)}return this.viewport.handleWheel(fe)?this.cancel(fe):void 0}}),{passive:!1})),this.register((0,_.addDisposableDomListener)(z,"touchstart",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(fe),this.cancel(fe)}),{passive:!0})),this.register((0,_.addDisposableDomListener)(z,"touchmove",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(fe)?void 0:this.cancel(fe)}),{passive:!1}))}refresh(q,z){var se;(se=this._renderService)==null||se.refreshRows(q,z)}updateCursorStyle(q){var z;(z=this._selectionService)!=null&&z.shouldColumnSelect(q)?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(q,z,se=0){var ie;se===1?(super.scrollLines(q,z,se),this.refresh(0,this.rows-1)):(ie=this.viewport)==null||ie.scrollLines(q)}paste(q){(0,f.paste)(q,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(q){this._customKeyEventHandler=q}attachCustomWheelEventHandler(q){this._customWheelEventHandler=q}registerLinkProvider(q){return this._linkProviderService.registerLinkProvider(q)}registerCharacterJoiner(q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const z=this._characterJoinerService.register(q);return this.refresh(0,this.rows-1),z}deregisterCharacterJoiner(q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(q)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(q){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+q)}registerDecoration(q){return this._decorationService.registerDecoration(q)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(q,z,se){this._selectionService.setSelection(q,z,se)}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 q;(q=this._selectionService)==null||q.clearSelection()}selectAll(){var q;(q=this._selectionService)==null||q.selectAll()}selectLines(q,z){var se;(se=this._selectionService)==null||se.selectLines(q,z)}_keyDown(q){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1)return!1;const z=this.browser.isMac&&this.options.macOptionIsMeta&&q.altKey;if(!z&&!this._compositionHelper.keydown(q))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;z||q.key!=="Dead"&&q.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const se=(0,P.evaluateKeyboardEvent)(q,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(q),se.type===3||se.type===2){const ie=this.rows-1;return this.scrollLines(se.type===2?-ie:ie),this.cancel(q,!0)}return se.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,q)||(se.cancel&&this.cancel(q,!0),!se.key||!!(q.key&&!q.ctrlKey&&!q.altKey&&!q.metaKey&&q.key.length===1&&q.key.charCodeAt(0)>=65&&q.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(se.key!==I.C0.ETX&&se.key!==I.C0.CR||(this.textarea.value=""),this._onKey.fire({key:se.key,domEvent:q}),this._showCursor(),this.coreService.triggerDataEvent(se.key,!0),!this.optionsService.rawOptions.screenReaderMode||q.altKey||q.ctrlKey?this.cancel(q,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(q,z){const se=q.isMac&&!this.options.macOptionIsMeta&&z.altKey&&!z.ctrlKey&&!z.metaKey||q.isWindows&&z.altKey&&z.ctrlKey&&!z.metaKey||q.isWindows&&z.getModifierState("AltGraph");return z.type==="keypress"?se:se&&(!z.keyCode||z.keyCode>47)}_keyUp(q){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1||((function(z){return z.keyCode===16||z.keyCode===17||z.keyCode===18})(q)||this.focus(),this.updateCursorStyle(q),this._keyPressHandled=!1)}_keyPress(q){let z;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1)return!1;if(this.cancel(q),q.charCode)z=q.charCode;else if(q.which===null||q.which===void 0)z=q.keyCode;else{if(q.which===0||q.charCode===0)return!1;z=q.which}return!(!z||(q.altKey||q.ctrlKey||q.metaKey)&&!this._isThirdLevelShift(this.browser,q)||(z=String.fromCharCode(z),this._onKey.fire({key:z,domEvent:q}),this._showCursor(),this.coreService.triggerDataEvent(z,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(q){if(q.data&&q.inputType==="insertText"&&(!q.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const z=q.data;return this.coreService.triggerDataEvent(z,!0),this.cancel(q),!0}return!1}resize(q,z){q!==this.cols||z!==this.rows?super.resize(q,z):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(q,z){var se,ie;(se=this._charSizeService)==null||se.measure(),(ie=this.viewport)==null||ie.syncScrollArea(!0)}clear(){var q;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 z=1;z<this.rows;z++)this.buffer.lines.push(this.buffer.getBlankLine(N.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(q=this.viewport)==null||q.reset(),this.refresh(0,this.rows-1)}}reset(){var z,se;this.options.rows=this.rows,this.options.cols=this.cols;const q=this._customKeyEventHandler;this._setup(),super.reset(),(z=this._selectionService)==null||z.reset(),this._decorationService.reset(),(se=this.viewport)==null||se.reset(),this._customKeyEventHandler=q,this.refresh(0,this.rows-1)}clearTextureAtlas(){var q;(q=this._renderService)==null||q.clearTextureAtlas()}_reportFocus(){var q;(q=this.element)!=null&&q.classList.contains("focus")?this.coreService.triggerDataEvent(I.C0.ESC+"[I"):this.coreService.triggerDataEvent(I.C0.ESC+"[O")}_reportWindowsOptions(q){if(this._renderService)switch(q){case H.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const z=this._renderService.dimensions.css.canvas.width.toFixed(0),se=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${I.C0.ESC}[4;${se};${z}t`);break;case H.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ie=this._renderService.dimensions.css.cell.width.toFixed(0),ve=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${I.C0.ESC}[6;${ve};${ie}t`)}}cancel(q,z){if(this.options.cancelEvents||z)return q.preventDefault(),q.stopPropagation(),!1}}n.Terminal=ue},9924:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TimeBasedDebouncer=void 0,n.TimeBasedDebouncer=class{constructor(u,f=1e3){this._renderCallback=u,this._debounceThresholdMS=f,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,f,_){this._rowCount=_,u=u!==void 0?u:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f;const a=Date.now();if(a-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=a,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=a-this._lastRefreshMs,b=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),b)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const u=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,f)}}},1680:function($,n,u){var f=this&&this.__decorate||function(h,o,l,S){var x,v=arguments.length,y=v<3?o:S===null?S=Object.getOwnPropertyDescriptor(o,l):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(h,o,l,S);else for(var m=h.length-1;m>=0;m--)(x=h[m])&&(y=(v<3?x(y):v>3?x(o,l,y):x(o,l))||y);return v>3&&y&&Object.defineProperty(o,l,y),y},_=this&&this.__param||function(h,o){return function(l,S){o(l,S,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Viewport=void 0;const a=u(3656),p=u(4725),b=u(8460),w=u(844),c=u(2585);let r=n.Viewport=class extends w.Disposable{constructor(h,o,l,S,x,v,y,m){super(),this._viewportElement=h,this._scrollArea=o,this._bufferService=l,this._optionsService=S,this._charSizeService=x,this._renderService=v,this._coreBrowserService=y,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 b.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,a.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((C=>this._activeBuffer=C.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((C=>this._renderDimensions=C))),this._handleThemeChange(m.colors),this.register(m.onChangeColors((C=>this._handleThemeChange(C)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(h){this._viewportElement.style.backgroundColor=h.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(h){if(h)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 o=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==o&&(this._lastRecordedBufferHeight=o,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const h=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==h&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=h),this._refreshAnimationFrame=null}syncScrollArea(h=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(h);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(h)}_handleScroll(h){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 o=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:o,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const h=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(h*(this._smoothScrollState.target-this._smoothScrollState.origin)),h<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(h,o){const l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(o<0&&this._viewportElement.scrollTop!==0||o>0&&l<this._lastRecordedBufferHeight)||(h.cancelable&&h.preventDefault(),!1)}handleWheel(h){const o=this._getPixelsScrolled(h);return o!==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+o:this._smoothScrollState.target+=o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=o,this._bubbleScroll(h,o))}scrollLines(h){if(h!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const o=h*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:h,suppressScrollEvent:!1})}_getPixelsScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let o=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_LINE?o*=this._currentRowHeight:h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._currentRowHeight*this._bufferService.rows),o}getBufferElements(h,o){var m;let l,S="";const x=[],v=o??this._bufferService.buffer.lines.length,y=this._bufferService.buffer.lines;for(let C=h;C<v;C++){const L=y.get(C);if(!L)continue;const A=(m=y.get(C+1))==null?void 0:m.isWrapped;if(S+=L.translateToString(!A),!A||C===y.length-1){const E=document.createElement("div");E.textContent=S,x.push(E),S.length>0&&(l=E),S=""}}return{bufferElements:x,cursorElement:l}}getLinesScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let o=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(o/=this._currentRowHeight+0,this._wheelPartialScroll+=o,o=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._bufferService.rows),o}_applyScrollModifier(h,o){const l=this._optionsService.rawOptions.fastScrollModifier;return l==="alt"&&o.altKey||l==="ctrl"&&o.ctrlKey||l==="shift"&&o.shiftKey?h*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:h*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(h){this._lastTouchY=h.touches[0].pageY}handleTouchMove(h){const o=this._lastTouchY-h.touches[0].pageY;return this._lastTouchY=h.touches[0].pageY,o!==0&&(this._viewportElement.scrollTop+=o,this._bubbleScroll(h,o))}};n.Viewport=r=f([_(2,c.IBufferService),_(3,c.IOptionsService),_(4,p.ICharSizeService),_(5,p.IRenderService),_(6,p.ICoreBrowserService),_(7,p.IThemeService)],r)},3107:function($,n,u){var f=this&&this.__decorate||function(c,r,h,o){var l,S=arguments.length,x=S<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,r,h,o);else for(var v=c.length-1;v>=0;v--)(l=c[v])&&(x=(S<3?l(x):S>3?l(r,h,x):l(r,h))||x);return S>3&&x&&Object.defineProperty(r,h,x),x},_=this&&this.__param||function(c,r){return function(h,o){r(h,o,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferDecorationRenderer=void 0;const a=u(4725),p=u(844),b=u(2585);let w=n.BufferDecorationRenderer=class extends p.Disposable{constructor(c,r,h,o,l){super(),this._screenElement=c,this._bufferService=r,this._coreBrowserService=h,this._decorationService=o,this._renderService=l,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((S=>this._removeDecoration(S)))),this.register((0,p.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 c of this._decorationService.decorations)this._renderDecoration(c);this._dimensionsChanged=!1}_renderDecoration(c){this._refreshStyle(c),this._dimensionsChanged&&this._refreshXPosition(c)}_createElement(c){var o;const r=this._coreBrowserService.mainDocument.createElement("div");r.classList.add("xterm-decoration"),r.classList.toggle("xterm-decoration-top-layer",((o=c==null?void 0:c.options)==null?void 0:o.layer)==="top"),r.style.width=`${Math.round((c.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,r.style.height=(c.options.height||1)*this._renderService.dimensions.css.cell.height+"px",r.style.top=(c.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",r.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const h=c.options.x??0;return h&&h>this._bufferService.cols&&(r.style.display="none"),this._refreshXPosition(c,r),r}_refreshStyle(c){const r=c.marker.line-this._bufferService.buffers.active.ydisp;if(r<0||r>=this._bufferService.rows)c.element&&(c.element.style.display="none",c.onRenderEmitter.fire(c.element));else{let h=this._decorationElements.get(c);h||(h=this._createElement(c),c.element=h,this._decorationElements.set(c,h),this._container.appendChild(h),c.onDispose((()=>{this._decorationElements.delete(c),h.remove()}))),h.style.top=r*this._renderService.dimensions.css.cell.height+"px",h.style.display=this._altBufferIsActive?"none":"block",c.onRenderEmitter.fire(h)}}_refreshXPosition(c,r=c.element){if(!r)return;const h=c.options.x??0;(c.options.anchor||"left")==="right"?r.style.right=h?h*this._renderService.dimensions.css.cell.width+"px":"":r.style.left=h?h*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(c){var r;(r=this._decorationElements.get(c))==null||r.remove(),this._decorationElements.delete(c),c.dispose()}};n.BufferDecorationRenderer=w=f([_(1,b.IBufferService),_(2,a.ICoreBrowserService),_(3,b.IDecorationService),_(4,a.IRenderService)],w)},5871:($,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(u){if(u.options.overviewRulerOptions){for(const f of this._zones)if(f.color===u.options.overviewRulerOptions.color&&f.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(f,u.marker.line))return;if(this._lineAdjacentToZone(f,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(f,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,f){return f>=u.startBufferLine&&f<=u.endBufferLine}_lineAdjacentToZone(u,f,_){return f>=u.startBufferLine-this._linePadding[_||"full"]&&f<=u.endBufferLine+this._linePadding[_||"full"]}_addLineToZone(u,f){u.startBufferLine=Math.min(u.startBufferLine,f),u.endBufferLine=Math.max(u.endBufferLine,f)}}},5744:function($,n,u){var f=this&&this.__decorate||function(l,S,x,v){var y,m=arguments.length,C=m<3?S:v===null?v=Object.getOwnPropertyDescriptor(S,x):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(l,S,x,v);else for(var L=l.length-1;L>=0;L--)(y=l[L])&&(C=(m<3?y(C):m>3?y(S,x,C):y(S,x))||C);return m>3&&C&&Object.defineProperty(S,x,C),C},_=this&&this.__param||function(l,S){return function(x,v){S(x,v,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OverviewRulerRenderer=void 0;const a=u(5871),p=u(4725),b=u(844),w=u(2585),c={full:0,left:0,center:0,right:0},r={full:0,left:0,center:0,right:0},h={full:0,left:0,center:0,right:0};let o=n.OverviewRulerRenderer=class extends b.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(l,S,x,v,y,m,C){var A;super(),this._viewportElement=l,this._screenElement=S,this._bufferService=x,this._decorationService=v,this._renderService=y,this._optionsService=m,this._coreBrowserService=C,this._colorZoneStore=new a.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(),(A=this._viewportElement.parentElement)==null||A.insertBefore(this._canvas,this._viewportElement);const L=this._canvas.getContext("2d");if(!L)throw new Error("Ctx cannot be null");this._ctx=L,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,b.toDisposable)((()=>{var E;(E=this._canvas)==null||E.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 l=Math.floor(this._canvas.width/3),S=Math.ceil(this._canvas.width/3);r.full=this._canvas.width,r.left=l,r.center=S,r.right=l,this._refreshDrawHeightConstants(),h.full=0,h.left=0,h.center=r.left,h.right=r.left+r.center}_refreshDrawHeightConstants(){c.full=Math.round(2*this._coreBrowserService.dpr);const l=this._canvas.height/this._bufferService.buffer.lines.length,S=Math.round(Math.max(Math.min(l,12),6)*this._coreBrowserService.dpr);c.left=S,c.center=S,c.right=S}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*c.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 S of this._decorationService.decorations)this._colorZoneStore.addDecoration(S);this._ctx.lineWidth=1;const l=this._colorZoneStore.zones;for(const S of l)S.position!=="full"&&this._renderColorZone(S);for(const S of l)S.position==="full"&&this._renderColorZone(S);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(l){this._ctx.fillStyle=l.color,this._ctx.fillRect(h[l.position||"full"],Math.round((this._canvas.height-1)*(l.startBufferLine/this._bufferService.buffers.active.lines.length)-c[l.position||"full"]/2),r[l.position||"full"],Math.round((this._canvas.height-1)*((l.endBufferLine-l.startBufferLine)/this._bufferService.buffers.active.lines.length)+c[l.position||"full"]))}_queueRefresh(l,S){this._shouldUpdateDimensions=l||this._shouldUpdateDimensions,this._shouldUpdateAnchor=S||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};n.OverviewRulerRenderer=o=f([_(2,w.IBufferService),_(3,w.IDecorationService),_(4,p.IRenderService),_(5,w.IOptionsService),_(6,p.ICoreBrowserService)],o)},2950:function($,n,u){var f=this&&this.__decorate||function(c,r,h,o){var l,S=arguments.length,x=S<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,r,h,o);else for(var v=c.length-1;v>=0;v--)(l=c[v])&&(x=(S<3?l(x):S>3?l(r,h,x):l(r,h))||x);return S>3&&x&&Object.defineProperty(r,h,x),x},_=this&&this.__param||function(c,r){return function(h,o){r(h,o,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CompositionHelper=void 0;const a=u(4725),p=u(2585),b=u(2584);let w=n.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(c,r,h,o,l,S){this._textarea=c,this._compositionView=r,this._bufferService=h,this._optionsService=o,this._coreService=l,this._renderService=S,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(c){this._compositionView.textContent=c.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(c){if(this._isComposing||this._isSendingComposition){if(c.keyCode===229||c.keyCode===16||c.keyCode===17||c.keyCode===18)return!1;this._finalizeComposition(!1)}return c.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(c){if(this._compositionView.classList.remove("active"),this._isComposing=!1,c){const r={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let h;this._isSendingComposition=!1,r.start+=this._dataAlreadySent.length,h=this._isComposing?this._textarea.value.substring(r.start,r.end):this._textarea.value.substring(r.start),h.length>0&&this._coreService.triggerDataEvent(h,!0)}}),0)}else{this._isSendingComposition=!1;const r=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(r,!0)}}_handleAnyTextareaChanges(){const c=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const r=this._textarea.value,h=r.replace(c,"");this._dataAlreadySent=h,r.length>c.length?this._coreService.triggerDataEvent(h,!0):r.length<c.length?this._coreService.triggerDataEvent(`${b.C0.DEL}`,!0):r.length===c.length&&r!==c&&this._coreService.triggerDataEvent(r,!0)}}),0)}updateCompositionElements(c){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const r=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),h=this._renderService.dimensions.css.cell.height,o=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,l=r*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=l+"px",this._compositionView.style.top=o+"px",this._compositionView.style.height=h+"px",this._compositionView.style.lineHeight=h+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const S=this._compositionView.getBoundingClientRect();this._textarea.style.left=l+"px",this._textarea.style.top=o+"px",this._textarea.style.width=Math.max(S.width,1)+"px",this._textarea.style.height=Math.max(S.height,1)+"px",this._textarea.style.lineHeight=S.height+"px"}c||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};n.CompositionHelper=w=f([_(2,p.IBufferService),_(3,p.IOptionsService),_(4,p.ICoreService),_(5,a.IRenderService)],w)},9806:($,n)=>{function u(f,_,a){const p=a.getBoundingClientRect(),b=f.getComputedStyle(a),w=parseInt(b.getPropertyValue("padding-left")),c=parseInt(b.getPropertyValue("padding-top"));return[_.clientX-p.left-w,_.clientY-p.top-c]}Object.defineProperty(n,"__esModule",{value:!0}),n.getCoords=n.getCoordsRelativeToElement=void 0,n.getCoordsRelativeToElement=u,n.getCoords=function(f,_,a,p,b,w,c,r,h){if(!w)return;const o=u(f,_,a);return o?(o[0]=Math.ceil((o[0]+(h?c/2:0))/c),o[1]=Math.ceil(o[1]/r),o[0]=Math.min(Math.max(o[0],1),p+(h?1:0)),o[1]=Math.min(Math.max(o[1],1),b),o):void 0}},9504:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.moveToCellSequence=void 0;const f=u(2584);function _(r,h,o,l){const S=r-a(r,o),x=h-a(h,o),v=Math.abs(S-x)-(function(y,m,C){let L=0;const A=y-a(y,C),E=m-a(m,C);for(let D=0;D<Math.abs(A-E);D++){const O=p(y,m)==="A"?-1:1,F=C.buffer.lines.get(A+O*D);F!=null&&F.isWrapped&&L++}return L})(r,h,o);return c(v,w(p(r,h),l))}function a(r,h){let o=0,l=h.buffer.lines.get(r),S=l==null?void 0:l.isWrapped;for(;S&&r>=0&&r<h.rows;)o++,l=h.buffer.lines.get(--r),S=l==null?void 0:l.isWrapped;return o}function p(r,h){return r>h?"A":"B"}function b(r,h,o,l,S,x){let v=r,y=h,m="";for(;v!==o||y!==l;)v+=S?1:-1,S&&v>x.cols-1?(m+=x.buffer.translateBufferLineToString(y,!1,r,v),v=0,r=0,y++):!S&&v<0&&(m+=x.buffer.translateBufferLineToString(y,!1,0,r+1),v=x.cols-1,r=v,y--);return m+x.buffer.translateBufferLineToString(y,!1,r,v)}function w(r,h){const o=h?"O":"[";return f.C0.ESC+o+r}function c(r,h){r=Math.floor(r);let o="";for(let l=0;l<r;l++)o+=h;return o}n.moveToCellSequence=function(r,h,o,l){const S=o.buffer.x,x=o.buffer.y;if(!o.buffer.hasScrollback)return(function(m,C,L,A,E,D){return _(C,A,E,D).length===0?"":c(b(m,C,m,C-a(C,E),!1,E).length,w("D",D))})(S,x,0,h,o,l)+_(x,h,o,l)+(function(m,C,L,A,E,D){let O;O=_(C,A,E,D).length>0?A-a(A,E):C;const F=A,N=(function(I,P,R,B,T,H){let V;return V=_(R,B,T,H).length>0?B-a(B,T):P,I<R&&V<=B||I>=R&&V<B?"C":"D"})(m,C,L,A,E,D);return c(b(m,O,L,F,N==="C",E).length,w(N,D))})(S,x,r,h,o,l);let v;if(x===h)return v=S>r?"D":"C",c(Math.abs(S-r),w(v,l));v=x>h?"D":"C";const y=Math.abs(x-h);return c((function(m,C){return C.cols-m})(x>h?r:S,o)+(y-1)*o.cols+1+((x>h?S:r)-1),w(v,l))}},1296:function($,n,u){var f=this&&this.__decorate||function(D,O,F,N){var I,P=arguments.length,R=P<3?O:N===null?N=Object.getOwnPropertyDescriptor(O,F):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(D,O,F,N);else for(var B=D.length-1;B>=0;B--)(I=D[B])&&(R=(P<3?I(R):P>3?I(O,F,R):I(O,F))||R);return P>3&&R&&Object.defineProperty(O,F,R),R},_=this&&this.__param||function(D,O){return function(F,N){O(F,N,D)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRenderer=void 0;const a=u(3787),p=u(2550),b=u(2223),w=u(6171),c=u(6052),r=u(4725),h=u(8055),o=u(8460),l=u(844),S=u(2585),x="xterm-dom-renderer-owner-",v="xterm-rows",y="xterm-fg-",m="xterm-bg-",C="xterm-focus",L="xterm-selection";let A=1,E=n.DomRenderer=class extends l.Disposable{constructor(D,O,F,N,I,P,R,B,T,H,V,Q,ue){super(),this._terminal=D,this._document=O,this._element=F,this._screenElement=N,this._viewportElement=I,this._helperContainer=P,this._linkifier2=R,this._charSizeService=T,this._optionsService=H,this._bufferService=V,this._coreBrowserService=Q,this._themeService=ue,this._terminalClass=A++,this._rowElements=[],this._selectionRenderModel=(0,c.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new o.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(v),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(L),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,w.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((de=>this._injectCss(de)))),this._injectCss(this._themeService.colors),this._rowFactory=B.createInstance(a.DomRendererRowFactory,document),this._element.classList.add(x+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((de=>this._handleLinkHover(de)))),this.register(this._linkifier2.onHideLinkUnderline((de=>this._handleLinkLeave(de)))),this.register((0,l.toDisposable)((()=>{this._element.classList.remove(x+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.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 F of this._rowElements)F.style.width=`${this.dimensions.css.canvas.width}px`,F.style.height=`${this.dimensions.css.cell.height}px`,F.style.lineHeight=`${this.dimensions.css.cell.height}px`,F.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const O=`${this._terminalSelector} .${v} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=O,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 O=`${this._terminalSelector} .${v} { color: ${D.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;O+=`${this._terminalSelector} .${v} .xterm-dim { color: ${h.color.multiplyOpacity(D.foreground,.5).css};}`,O+=`${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 F=`blink_underline_${this._terminalClass}`,N=`blink_bar_${this._terminalClass}`,I=`blink_block_${this._terminalClass}`;O+=`@keyframes ${F} { 50% { border-bottom-style: hidden; }}`,O+=`@keyframes ${N} { 50% { box-shadow: none; }}`,O+=`@keyframes ${I} { 0% { background-color: ${D.cursor.css}; color: ${D.cursorAccent.css}; } 50% { background-color: inherit; color: ${D.cursor.css}; }}`,O+=`${this._terminalSelector} .${v}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${F} 1s step-end infinite;}${this._terminalSelector} .${v}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${N} 1s step-end infinite;}${this._terminalSelector} .${v}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${I} 1s step-end infinite;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-block { background-color: ${D.cursor.css}; color: ${D.cursorAccent.css};}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${D.cursor.css} !important; color: ${D.cursorAccent.css} !important;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${D.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${D.cursor.css} inset;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${D.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,O+=`${this._terminalSelector} .${L} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${L} div { position: absolute; background-color: ${D.selectionBackgroundOpaque.css};}${this._terminalSelector} .${L} div { position: absolute; background-color: ${D.selectionInactiveBackgroundOpaque.css};}`;for(const[P,R]of D.ansi.entries())O+=`${this._terminalSelector} .${y}${P} { color: ${R.css}; }${this._terminalSelector} .${y}${P}.xterm-dim { color: ${h.color.multiplyOpacity(R,.5).css}; }${this._terminalSelector} .${m}${P} { background-color: ${R.css}; }`;O+=`${this._terminalSelector} .${y}${b.INVERTED_DEFAULT_COLOR} { color: ${h.color.opaque(D.background).css}; }${this._terminalSelector} .${y}${b.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${h.color.multiplyOpacity(h.color.opaque(D.background),.5).css}; }${this._terminalSelector} .${m}${b.INVERTED_DEFAULT_COLOR} { background-color: ${D.foreground.css}; }`,this._themeStyleElement.textContent=O}_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,O){for(let F=this._rowElements.length;F<=O;F++){const N=this._document.createElement("div");this._rowContainer.appendChild(N),this._rowElements.push(N)}for(;this._rowElements.length>O;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(D,O){this._refreshRowElements(D,O),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(C),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(C),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(D,O,F){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(D,O,F),this.renderRows(0,this._bufferService.rows-1),!D||!O)return;this._selectionRenderModel.update(this._terminal,D,O,F);const N=this._selectionRenderModel.viewportStartRow,I=this._selectionRenderModel.viewportEndRow,P=this._selectionRenderModel.viewportCappedStartRow,R=this._selectionRenderModel.viewportCappedEndRow;if(P>=this._bufferService.rows||R<0)return;const B=this._document.createDocumentFragment();if(F){const T=D[0]>O[0];B.appendChild(this._createSelectionElement(P,T?O[0]:D[0],T?D[0]:O[0],R-P+1))}else{const T=N===P?D[0]:0,H=P===I?O[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(P,T,H));const V=R-P-1;if(B.appendChild(this._createSelectionElement(P+1,0,this._bufferService.cols,V)),P!==R){const Q=I===R?O[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(R,0,Q))}}this._selectionContainer.appendChild(B)}_createSelectionElement(D,O,F,N=1){const I=this._document.createElement("div"),P=O*this.dimensions.css.cell.width;let R=this.dimensions.css.cell.width*(F-O);return P+R>this.dimensions.css.canvas.width&&(R=this.dimensions.css.canvas.width-P),I.style.height=N*this.dimensions.css.cell.height+"px",I.style.top=D*this.dimensions.css.cell.height+"px",I.style.left=`${P}px`,I.style.width=`${R}px`,I}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,O){const F=this._bufferService.buffer,N=F.ybase+F.y,I=Math.min(F.x,this._bufferService.cols-1),P=this._optionsService.rawOptions.cursorBlink,R=this._optionsService.rawOptions.cursorStyle,B=this._optionsService.rawOptions.cursorInactiveStyle;for(let T=D;T<=O;T++){const H=T+F.ydisp,V=this._rowElements[T],Q=F.lines.get(H);if(!V||!Q)break;V.replaceChildren(...this._rowFactory.createRow(Q,H,H===N,R,B,I,P,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${x}${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,O,F,N,I,P){F<0&&(D=0),N<0&&(O=0);const R=this._bufferService.rows-1;F=Math.max(Math.min(F,R),0),N=Math.max(Math.min(N,R),0),I=Math.min(I,this._bufferService.cols);const B=this._bufferService.buffer,T=B.ybase+B.y,H=Math.min(B.x,I-1),V=this._optionsService.rawOptions.cursorBlink,Q=this._optionsService.rawOptions.cursorStyle,ue=this._optionsService.rawOptions.cursorInactiveStyle;for(let de=F;de<=N;++de){const q=de+B.ydisp,z=this._rowElements[de],se=B.lines.get(q);if(!z||!se)break;z.replaceChildren(...this._rowFactory.createRow(se,q,q===T,Q,ue,H,V,this.dimensions.css.cell.width,this._widthCache,P?de===F?D:0:-1,P?(de===N?O:I)-1:-1))}}};n.DomRenderer=E=f([_(7,S.IInstantiationService),_(8,r.ICharSizeService),_(9,S.IOptionsService),_(10,S.IBufferService),_(11,r.ICoreBrowserService),_(12,r.IThemeService)],E)},3787:function($,n,u){var f=this&&this.__decorate||function(v,y,m,C){var L,A=arguments.length,E=A<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,m):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,y,m,C);else for(var D=v.length-1;D>=0;D--)(L=v[D])&&(E=(A<3?L(E):A>3?L(y,m,E):L(y,m))||E);return A>3&&E&&Object.defineProperty(y,m,E),E},_=this&&this.__param||function(v,y){return function(m,C){y(m,C,v)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRendererRowFactory=void 0;const a=u(2223),p=u(643),b=u(511),w=u(2585),c=u(8055),r=u(4725),h=u(4269),o=u(6171),l=u(3734);let S=n.DomRendererRowFactory=class{constructor(v,y,m,C,L,A,E){this._document=v,this._characterJoinerService=y,this._optionsService=m,this._coreBrowserService=C,this._coreService=L,this._decorationService=A,this._themeService=E,this._workCell=new b.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(v,y,m){this._selectionStart=v,this._selectionEnd=y,this._columnSelectMode=m}createRow(v,y,m,C,L,A,E,D,O,F,N){const I=[],P=this._characterJoinerService.getJoinedCharacters(y),R=this._themeService.colors;let B,T=v.getNoBgTrimmedLength();m&&T<A+1&&(T=A+1);let H=0,V="",Q=0,ue=0,de=0,q=!1,z=0,se=!1,ie=0;const ve=[],fe=F!==-1&&N!==-1;for(let Me=0;Me<T;Me++){v.loadCell(Me,this._workCell);let _e=this._workCell.getWidth();if(_e===0)continue;let Oe=!1,qe=Me,be=this._workCell;if(P.length>0&&Me===P[0][0]){Oe=!0;const Le=P.shift();be=new h.JoinedCellData(this._workCell,v.translateToString(!0,Le[0],Le[1]),Le[1]-Le[0]),qe=Le[1]-1,_e=be.getWidth()}const ft=this._isCellInSelection(Me,y),Ot=m&&Me===A,Se=fe&&Me>=F&&Me<=N;let pe=!1;this._decorationService.forEachDecorationAtCell(Me,y,void 0,(Le=>{pe=!0}));let me=be.getChars()||p.WHITESPACE_CELL_CHAR;if(me===" "&&(be.isUnderline()||be.isOverline())&&(me=" "),ie=_e*D-O.get(me,be.isBold(),be.isItalic()),B){if(H&&(ft&&se||!ft&&!se&&be.bg===Q)&&(ft&&se&&R.selectionForeground||be.fg===ue)&&be.extended.ext===de&&Se===q&&ie===z&&!Ot&&!Oe&&!pe){be.isInvisible()?V+=p.WHITESPACE_CELL_CHAR:V+=me,H++;continue}H&&(B.textContent=V),B=this._document.createElement("span"),H=0,V=""}else B=this._document.createElement("span");if(Q=be.bg,ue=be.fg,de=be.extended.ext,q=Se,z=ie,se=ft,Oe&&A>=Me&&A<=qe&&(A=Me),!this._coreService.isCursorHidden&&Ot&&this._coreService.isCursorInitialized){if(ve.push("xterm-cursor"),this._coreBrowserService.isFocused)E&&ve.push("xterm-cursor-blink"),ve.push(C==="bar"?"xterm-cursor-bar":C==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(L)switch(L){case"outline":ve.push("xterm-cursor-outline");break;case"block":ve.push("xterm-cursor-block");break;case"bar":ve.push("xterm-cursor-bar");break;case"underline":ve.push("xterm-cursor-underline")}}if(be.isBold()&&ve.push("xterm-bold"),be.isItalic()&&ve.push("xterm-italic"),be.isDim()&&ve.push("xterm-dim"),V=be.isInvisible()?p.WHITESPACE_CELL_CHAR:be.getChars()||p.WHITESPACE_CELL_CHAR,be.isUnderline()&&(ve.push(`xterm-underline-${be.extended.underlineStyle}`),V===" "&&(V=" "),!be.isUnderlineColorDefault()))if(be.isUnderlineColorRGB())B.style.textDecorationColor=`rgb(${l.AttributeData.toColorRGB(be.getUnderlineColor()).join(",")})`;else{let Le=be.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&be.isBold()&&Le<8&&(Le+=8),B.style.textDecorationColor=R.ansi[Le].css}be.isOverline()&&(ve.push("xterm-overline"),V===" "&&(V=" ")),be.isStrikethrough()&&ve.push("xterm-strikethrough"),Se&&(B.style.textDecoration="underline");let ce=be.getFgColor(),ge=be.getFgColorMode(),ze=be.getBgColor(),Re=be.getBgColorMode();const _t=!!be.isInverse();if(_t){const Le=ce;ce=ze,ze=Le;const xt=ge;ge=Re,Re=xt}let Qe,it,Ie,Ae=!1;switch(this._decorationService.forEachDecorationAtCell(Me,y,void 0,(Le=>{Le.options.layer!=="top"&&Ae||(Le.backgroundColorRGB&&(Re=50331648,ze=Le.backgroundColorRGB.rgba>>8&16777215,Qe=Le.backgroundColorRGB),Le.foregroundColorRGB&&(ge=50331648,ce=Le.foregroundColorRGB.rgba>>8&16777215,it=Le.foregroundColorRGB),Ae=Le.options.layer==="top")})),!Ae&&ft&&(Qe=this._coreBrowserService.isFocused?R.selectionBackgroundOpaque:R.selectionInactiveBackgroundOpaque,ze=Qe.rgba>>8&16777215,Re=50331648,Ae=!0,R.selectionForeground&&(ge=50331648,ce=R.selectionForeground.rgba>>8&16777215,it=R.selectionForeground)),Ae&&ve.push("xterm-decoration-top"),Re){case 16777216:case 33554432:Ie=R.ansi[ze],ve.push(`xterm-bg-${ze}`);break;case 50331648:Ie=c.channels.toColor(ze>>16,ze>>8&255,255&ze),this._addStyle(B,`background-color:#${x((ze>>>0).toString(16),"0",6)}`);break;default:_t?(Ie=R.foreground,ve.push(`xterm-bg-${a.INVERTED_DEFAULT_COLOR}`)):Ie=R.background}switch(Qe||be.isDim()&&(Qe=c.color.multiplyOpacity(Ie,.5)),ge){case 16777216:case 33554432:be.isBold()&&ce<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ce+=8),this._applyMinimumContrast(B,Ie,R.ansi[ce],be,Qe,void 0)||ve.push(`xterm-fg-${ce}`);break;case 50331648:const Le=c.channels.toColor(ce>>16&255,ce>>8&255,255&ce);this._applyMinimumContrast(B,Ie,Le,be,Qe,it)||this._addStyle(B,`color:#${x(ce.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(B,Ie,R.foreground,be,Qe,it)||_t&&ve.push(`xterm-fg-${a.INVERTED_DEFAULT_COLOR}`)}ve.length&&(B.className=ve.join(" "),ve.length=0),Ot||Oe||pe?B.textContent=V:H++,ie!==this.defaultSpacing&&(B.style.letterSpacing=`${ie}px`),I.push(B),Me=qe}return B&&H&&(B.textContent=V),I}_applyMinimumContrast(v,y,m,C,L,A){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,o.treatGlyphAsBackgroundColor)(C.getCode()))return!1;const E=this._getContrastCache(C);let D;if(L||A||(D=E.getColor(y.rgba,m.rgba)),D===void 0){const O=this._optionsService.rawOptions.minimumContrastRatio/(C.isDim()?2:1);D=c.color.ensureContrastRatio(L||y,A||m,O),E.setColor((L||y).rgba,(A||m).rgba,D??null)}return!!D&&(this._addStyle(v,`color:${D.css}`),!0)}_getContrastCache(v){return v.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(v,y){v.setAttribute("style",`${v.getAttribute("style")||""}${y};`)}_isCellInSelection(v,y){const m=this._selectionStart,C=this._selectionEnd;return!(!m||!C)&&(this._columnSelectMode?m[0]<=C[0]?v>=m[0]&&y>=m[1]&&v<C[0]&&y<=C[1]:v<m[0]&&y>=m[1]&&v>=C[0]&&y<=C[1]:y>m[1]&&y<C[1]||m[1]===C[1]&&y===m[1]&&v>=m[0]&&v<C[0]||m[1]<C[1]&&y===C[1]&&v<C[0]||m[1]<C[1]&&y===m[1]&&v>=m[0])}};function x(v,y,m){for(;v.length<m;)v=y+v;return v}n.DomRendererRowFactory=S=f([_(1,r.ICharacterJoinerService),_(2,w.IOptionsService),_(3,r.ICoreBrowserService),_(4,w.ICoreService),_(5,w.IDecorationService),_(6,r.IThemeService)],S)},2550:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WidthCache=void 0,n.WidthCache=class{constructor(u,f){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const _=u.createElement("span");_.classList.add("xterm-char-measure-element");const a=u.createElement("span");a.classList.add("xterm-char-measure-element"),a.style.fontWeight="bold";const p=u.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const b=u.createElement("span");b.classList.add("xterm-char-measure-element"),b.style.fontWeight="bold",b.style.fontStyle="italic",this._measureElements=[_,a,p,b],this._container.appendChild(_),this._container.appendChild(a),this._container.appendChild(p),this._container.appendChild(b),f.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(u,f,_,a){u===this._font&&f===this._fontSize&&_===this._weight&&a===this._weightBold||(this._font=u,this._fontSize=f,this._weight=_,this._weightBold=a,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${_}`,this._measureElements[1].style.fontWeight=`${a}`,this._measureElements[2].style.fontWeight=`${_}`,this._measureElements[3].style.fontWeight=`${a}`,this.clear())}get(u,f,_){let a=0;if(!f&&!_&&u.length===1&&(a=u.charCodeAt(0))<256){if(this._flat[a]!==-9999)return this._flat[a];const w=this._measure(u,0);return w>0&&(this._flat[a]=w),w}let p=u;f&&(p+="B"),_&&(p+="I");let b=this._holey.get(p);if(b===void 0){let w=0;f&&(w|=1),_&&(w|=2),b=this._measure(u,w),b>0&&this._holey.set(p,b)}return b}_measure(u,f){const _=this._measureElements[f];return _.textContent=u.repeat(32),_.offsetWidth/32}}},2223:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const f=u(6114);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},6171:($,n)=>{function u(_){return 57508<=_&&_<=57558}function f(_){return _>=128512&&_<=128591||_>=127744&&_<=128511||_>=128640&&_<=128767||_>=9728&&_<=9983||_>=9984&&_<=10175||_>=65024&&_<=65039||_>=129280&&_<=129535||_>=127462&&_<=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(_){if(!_)throw new Error("value must not be falsy");return _},n.isPowerlineGlyph=u,n.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},n.isEmoji=f,n.allowRescaling=function(_,a,p,b){return a===1&&p>Math.ceil(1.5*b)&&_!==void 0&&_>255&&!f(_)&&!u(_)&&!(function(w){return 57344<=w&&w<=63743})(_)},n.treatGlyphAsBackgroundColor=function(_){return u(_)||(function(a){return 9472<=a&&a<=9631})(_)},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(_,a,p=0){return(_-(2*Math.round(a)-p))%(2*Math.round(a))}},6052:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(_,a,p,b=!1){if(this.selectionStart=a,this.selectionEnd=p,!a||!p||a[0]===p[0]&&a[1]===p[1])return void this.clear();const w=_.buffers.active.ydisp,c=a[1]-w,r=p[1]-w,h=Math.max(c,0),o=Math.min(r,_.rows-1);h>=_.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=b,this.viewportStartRow=c,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=o,this.startCol=a[0],this.endCol=p[0])}isCellSelected(_,a,p){return!!this.hasSelection&&(p-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?a>=this.startCol&&p>=this.viewportCappedStartRow&&a<this.endCol&&p<=this.viewportCappedEndRow:a<this.startCol&&p>=this.viewportCappedStartRow&&a>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol)}}n.createSelectionRenderModel=function(){return new u}},456:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionModel=void 0,n.SelectionModel=class{constructor(u){this._bufferService=u,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,f=this.selectionEnd;return!(!u||!f)&&(u[1]>f[1]||u[1]===f[1]&&u[0]>f[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function($,n,u){var f=this&&this.__decorate||function(o,l,S,x){var v,y=arguments.length,m=y<3?l:x===null?x=Object.getOwnPropertyDescriptor(l,S):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(o,l,S,x);else for(var C=o.length-1;C>=0;C--)(v=o[C])&&(m=(y<3?v(m):y>3?v(l,S,m):v(l,S))||m);return y>3&&m&&Object.defineProperty(l,S,m),m},_=this&&this.__param||function(o,l){return function(S,x){l(S,x,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharSizeService=void 0;const a=u(2585),p=u(8460),b=u(844);let w=n.CharSizeService=class extends b.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(o,l,S){super(),this._optionsService=S,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new h(this._optionsService))}catch{this._measureStrategy=this.register(new r(o,l,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const o=this._measureStrategy.measure();o.width===this.width&&o.height===this.height||(this.width=o.width,this.height=o.height,this._onCharSizeChange.fire())}};n.CharSizeService=w=f([_(2,a.IOptionsService)],w);class c extends b.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(l,S){l!==void 0&&l>0&&S!==void 0&&S>0&&(this._result.width=l,this._result.height=S)}}class r extends c{constructor(l,S,x){super(),this._document=l,this._parentElement=S,this._optionsService=x,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 h extends c{constructor(l){super(),this._optionsService=l,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const S=this._ctx.measureText("W");if(!("width"in S&&"fontBoundingBoxAscent"in S&&"fontBoundingBoxDescent"in S))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const l=this._ctx.measureText("W");return this._validateAndSet(l.width,l.fontBoundingBoxAscent+l.fontBoundingBoxDescent),this._result}}},4269:function($,n,u){var f=this&&this.__decorate||function(h,o,l,S){var x,v=arguments.length,y=v<3?o:S===null?S=Object.getOwnPropertyDescriptor(o,l):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(h,o,l,S);else for(var m=h.length-1;m>=0;m--)(x=h[m])&&(y=(v<3?x(y):v>3?x(o,l,y):x(o,l))||y);return v>3&&y&&Object.defineProperty(o,l,y),y},_=this&&this.__param||function(h,o){return function(l,S){o(l,S,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const a=u(3734),p=u(643),b=u(511),w=u(2585);class c extends a.AttributeData{constructor(o,l,S){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=l,this._width=S}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(o){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.JoinedCellData=c;let r=n.CharacterJoinerService=class cf{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new b.CellData}register(o){const l={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(l),l.id}deregister(o){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===o)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(o);if(!l||l.length===0)return[];const S=[],x=l.translateToString(!0);let v=0,y=0,m=0,C=l.getFg(0),L=l.getBg(0);for(let A=0;A<l.getTrimmedLength();A++)if(l.loadCell(A,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==C||this._workCell.bg!==L){if(A-v>1){const E=this._getJoinedRanges(x,m,y,l,v);for(let D=0;D<E.length;D++)S.push(E[D])}v=A,m=y,C=this._workCell.fg,L=this._workCell.bg}y+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-v>1){const A=this._getJoinedRanges(x,m,y,l,v);for(let E=0;E<A.length;E++)S.push(A[E])}return S}_getJoinedRanges(o,l,S,x,v){const y=o.substring(l,S);let m=[];try{m=this._characterJoiners[0].handler(y)}catch(C){console.error(C)}for(let C=1;C<this._characterJoiners.length;C++)try{const L=this._characterJoiners[C].handler(y);for(let A=0;A<L.length;A++)cf._mergeRanges(m,L[A])}catch(L){console.error(L)}return this._stringRangesToCellRanges(m,x,v),m}_stringRangesToCellRanges(o,l,S){let x=0,v=!1,y=0,m=o[x];if(m){for(let C=S;C<this._bufferService.cols;C++){const L=l.getWidth(C),A=l.getString(C).length||p.WHITESPACE_CELL_CHAR.length;if(L!==0){if(!v&&m[0]<=y&&(m[0]=C,v=!0),m[1]<=y){if(m[1]=C,m=o[++x],!m)break;m[0]<=y?(m[0]=C,v=!0):v=!1}y+=A}}m&&(m[1]=this._bufferService.cols)}}static _mergeRanges(o,l){let S=!1;for(let x=0;x<o.length;x++){const v=o[x];if(S){if(l[1]<=v[0])return o[x-1][1]=l[1],o;if(l[1]<=v[1])return o[x-1][1]=Math.max(l[1],v[1]),o.splice(x,1),o;o.splice(x,1),x--}else{if(l[1]<=v[0])return o.splice(x,0,l),o;if(l[1]<=v[1])return v[0]=Math.min(l[0],v[0]),o;l[0]<v[1]&&(v[0]=Math.min(l[0],v[0]),S=!0)}}return S?o[o.length-1][1]=l[1]:o.push(l),o}};n.CharacterJoinerService=r=f([_(0,w.IBufferService)],r)},5114:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreBrowserService=void 0;const f=u(844),_=u(8460),a=u(3656);class p extends f.Disposable{constructor(c,r,h){super(),this._textarea=c,this._window=r,this.mainDocument=h,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new b(this._window),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new _.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((o=>this._screenDprMonitor.setWindow(o)))),this.register((0,_.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(c){this._window!==c&&(this._window=c,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=p;class b extends f.Disposable{constructor(c){super(),this._parentWindow=c,this._windowResizeListener=this.register(new f.MutableDisposable),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,f.toDisposable)((()=>this.clearListener())))}setWindow(c){this._parentWindow=c,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,a.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var c;this._outerListener&&((c=this._resolutionMediaMatchList)==null||c.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:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkProviderService=void 0;const f=u(844);class _ extends f.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,f.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const b=this.linkProviders.indexOf(p);b!==-1&&this.linkProviders.splice(b,1)}}}}n.LinkProviderService=_},8934:function($,n,u){var f=this&&this.__decorate||function(w,c,r,h){var o,l=arguments.length,S=l<3?c:h===null?h=Object.getOwnPropertyDescriptor(c,r):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(w,c,r,h);else for(var x=w.length-1;x>=0;x--)(o=w[x])&&(S=(l<3?o(S):l>3?o(c,r,S):o(c,r))||S);return l>3&&S&&Object.defineProperty(c,r,S),S},_=this&&this.__param||function(w,c){return function(r,h){c(r,h,w)}};Object.defineProperty(n,"__esModule",{value:!0}),n.MouseService=void 0;const a=u(4725),p=u(9806);let b=n.MouseService=class{constructor(w,c){this._renderService=w,this._charSizeService=c}getCoords(w,c,r,h,o){return(0,p.getCoords)(window,w,c,r,h,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,o)}getMouseReportCoords(w,c){const r=(0,p.getCoordsRelativeToElement)(window,w,c);if(this._charSizeService.hasValidSize)return r[0]=Math.min(Math.max(r[0],0),this._renderService.dimensions.css.canvas.width-1),r[1]=Math.min(Math.max(r[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(r[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(r[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(r[0]),y:Math.floor(r[1])}}};n.MouseService=b=f([_(0,a.IRenderService),_(1,a.ICharSizeService)],b)},3230:function($,n,u){var f=this&&this.__decorate||function(o,l,S,x){var v,y=arguments.length,m=y<3?l:x===null?x=Object.getOwnPropertyDescriptor(l,S):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(o,l,S,x);else for(var C=o.length-1;C>=0;C--)(v=o[C])&&(m=(y<3?v(m):y>3?v(l,S,m):v(l,S))||m);return y>3&&m&&Object.defineProperty(l,S,m),m},_=this&&this.__param||function(o,l){return function(S,x){l(S,x,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.RenderService=void 0;const a=u(6193),p=u(4725),b=u(8460),w=u(844),c=u(7226),r=u(2585);let h=n.RenderService=class extends w.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(o,l,S,x,v,y,m,C){super(),this._rowCount=o,this._charSizeService=x,this._renderer=this.register(new w.MutableDisposable),this._pausedResizeTask=new c.DebouncedIdleTask,this._observerDisposable=this.register(new w.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 b.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new b.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new b.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new b.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new a.RenderDebouncer(((L,A)=>this._renderRows(L,A)),m),this.register(this._renderDebouncer),this.register(m.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(y.onResize((()=>this._fullRefresh()))),this.register(y.buffers.onBufferActivate((()=>{var L;return(L=this._renderer.value)==null?void 0:L.clear()}))),this.register(S.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(v.onDecorationRegistered((()=>this._fullRefresh()))),this.register(v.onDecorationRemoved((()=>this._fullRefresh()))),this.register(S.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(y.cols,y.rows),this._fullRefresh()}))),this.register(S.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(y.buffer.y,y.buffer.y,!0)))),this.register(C.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(m.window,l),this.register(m.onWindowChange((L=>this._registerIntersectionObserver(L,l))))}_registerIntersectionObserver(o,l){if("IntersectionObserver"in o){const S=new o.IntersectionObserver((x=>this._handleIntersectionChange(x[x.length-1])),{threshold:0});S.observe(l),this._observerDisposable.value=(0,w.toDisposable)((()=>S.disconnect()))}}_handleIntersectionChange(o){this._isPaused=o.isIntersecting===void 0?o.intersectionRatio===0:!o.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(o,l,S=!1){this._isPaused?this._needsFullRefresh=!0:(S||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(o,l,this._rowCount))}_renderRows(o,l){this._renderer.value&&(o=Math.min(o,this._rowCount-1),l=Math.min(l,this._rowCount-1),this._renderer.value.renderRows(o,l),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:o,end:l}),this._onRender.fire({start:o,end:l}),this._isNextRenderRedrawOnly=!0)}resize(o,l){this._rowCount=l,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(o){this._renderer.value=o,this._renderer.value&&(this._renderer.value.onRequestRedraw((l=>this.refreshRows(l.start,l.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(o){return this._renderDebouncer.addRefreshCallback(o)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var o,l;this._renderer.value&&((l=(o=this._renderer.value).clearTextureAtlas)==null||l.call(o),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(o,l){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var S;return(S=this._renderer.value)==null?void 0:S.handleResize(o,l)})):this._renderer.value.handleResize(o,l),this._fullRefresh())}handleCharSizeChanged(){var o;(o=this._renderer.value)==null||o.handleCharSizeChanged()}handleBlur(){var o;(o=this._renderer.value)==null||o.handleBlur()}handleFocus(){var o;(o=this._renderer.value)==null||o.handleFocus()}handleSelectionChanged(o,l,S){var x;this._selectionState.start=o,this._selectionState.end=l,this._selectionState.columnSelectMode=S,(x=this._renderer.value)==null||x.handleSelectionChanged(o,l,S)}handleCursorMove(){var o;(o=this._renderer.value)==null||o.handleCursorMove()}clear(){var o;(o=this._renderer.value)==null||o.clear()}};n.RenderService=h=f([_(2,r.IOptionsService),_(3,p.ICharSizeService),_(4,r.IDecorationService),_(5,r.IBufferService),_(6,p.ICoreBrowserService),_(7,p.IThemeService)],h)},9312:function($,n,u){var f=this&&this.__decorate||function(m,C,L,A){var E,D=arguments.length,O=D<3?C:A===null?A=Object.getOwnPropertyDescriptor(C,L):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(m,C,L,A);else for(var F=m.length-1;F>=0;F--)(E=m[F])&&(O=(D<3?E(O):D>3?E(C,L,O):E(C,L))||O);return D>3&&O&&Object.defineProperty(C,L,O),O},_=this&&this.__param||function(m,C){return function(L,A){C(L,A,m)}};Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionService=void 0;const a=u(9806),p=u(9504),b=u(456),w=u(4725),c=u(8460),r=u(844),h=u(6114),o=u(4841),l=u(511),S=u(2585),x=" ",v=new RegExp(x,"g");let y=n.SelectionService=class extends r.Disposable{constructor(m,C,L,A,E,D,O,F,N){super(),this._element=m,this._screenElement=C,this._linkifier=L,this._bufferService=A,this._coreService=E,this._mouseService=D,this._optionsService=O,this._renderService=F,this._coreBrowserService=N,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new l.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new c.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new c.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new c.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new c.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=I=>this._handleMouseMove(I),this._mouseUpListener=I=>this._handleMouseUp(I),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((I=>this._handleTrim(I))),this.register(this._bufferService.buffers.onBufferActivate((I=>this._handleBufferActivate(I)))),this.enable(),this._model=new b.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,r.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 m=this._model.finalSelectionStart,C=this._model.finalSelectionEnd;return!(!m||!C||m[0]===C[0]&&m[1]===C[1])}get selectionText(){const m=this._model.finalSelectionStart,C=this._model.finalSelectionEnd;if(!m||!C)return"";const L=this._bufferService.buffer,A=[];if(this._activeSelectionMode===3){if(m[0]===C[0])return"";const E=m[0]<C[0]?m[0]:C[0],D=m[0]<C[0]?C[0]:m[0];for(let O=m[1];O<=C[1];O++){const F=L.translateBufferLineToString(O,!0,E,D);A.push(F)}}else{const E=m[1]===C[1]?C[0]:void 0;A.push(L.translateBufferLineToString(m[1],!0,m[0],E));for(let D=m[1]+1;D<=C[1]-1;D++){const O=L.lines.get(D),F=L.translateBufferLineToString(D,!0);O!=null&&O.isWrapped?A[A.length-1]+=F:A.push(F)}if(m[1]!==C[1]){const D=L.lines.get(C[1]),O=L.translateBufferLineToString(C[1],!0,0,C[0]);D&&D.isWrapped?A[A.length-1]+=O:A.push(O)}}return A.map((E=>E.replace(v," "))).join(h.isWindows?`\r
53
+ WARNING: This link could potentially be dangerous`)){const h=window.open();if(h){try{h.opener=null}catch{}h.location.href=r}else console.warn("Opening link blocked as opener could not be cleared")}}n.OscLinkProvider=w=f([_(0,p.IBufferService),_(1,p.IOptionsService),_(2,p.IOscLinkService)],w)},6193:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderDebouncer=void 0,n.RenderDebouncer=class{constructor(u,f){this._renderCallback=u,this._coreBrowserService=f,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(u,f,_){this._rowCount=_,u=u!==void 0?u:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const u=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,f),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Terminal=void 0;const f=u(3614),_=u(3656),a=u(3551),p=u(9042),w=u(3730),y=u(1680),o=u(3107),r=u(5744),h=u(2950),c=u(1296),l=u(428),S=u(4269),x=u(5114),v=u(8934),b=u(3230),m=u(9312),C=u(4725),L=u(6731),M=u(8055),E=u(8969),R=u(8460),B=u(844),$=u(6114),N=u(8437),I=u(2584),F=u(7399),D=u(5941),O=u(9074),T=u(2585),H=u(5435),V=u(4567),Q=u(779);class ue extends E.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(q={}){super(q),this.browser=$,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new B.MutableDisposable),this._onCursorMove=this.register(new R.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new R.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new R.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new R.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new R.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new R.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new R.EventEmitter),this._onBlur=this.register(new R.EventEmitter),this._onA11yCharEmitter=this.register(new R.EventEmitter),this._onA11yTabEmitter=this.register(new R.EventEmitter),this._onWillOpen=this.register(new R.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(O.DecorationService),this._instantiationService.setService(T.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(Q.LinkProviderService),this._instantiationService.setService(C.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(w.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((z,se)=>this.refresh(z,se)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((z=>this._reportWindowsOptions(z)))),this.register(this._inputHandler.onColor((z=>this._handleColorEvent(z)))),this.register((0,R.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,R.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,R.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,R.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((z=>this._afterResize(z.cols,z.rows)))),this.register((0,B.toDisposable)((()=>{var z,se;this._customKeyEventHandler=void 0,(se=(z=this.element)==null?void 0:z.parentNode)==null||se.removeChild(this.element)})))}_handleColorEvent(q){if(this._themeService)for(const z of q){let se,ie="";switch(z.index){case 256:se="foreground",ie="10";break;case 257:se="background",ie="11";break;case 258:se="cursor",ie="12";break;default:se="ansi",ie="4;"+z.index}switch(z.type){case 0:const ve=M.color.toColorRGB(se==="ansi"?this._themeService.colors.ansi[z.index]:this._themeService.colors[se]);this.coreService.triggerDataEvent(`${I.C0.ESC}]${ie};${(0,D.toRgbString)(ve)}${I.C1_ESCAPED.ST}`);break;case 1:if(se==="ansi")this._themeService.modifyColors((fe=>fe.ansi[z.index]=M.channels.toColor(...z.color)));else{const fe=se;this._themeService.modifyColors((Me=>Me[fe]=M.channels.toColor(...z.color)))}break;case 2:this._themeService.restoreColor(z.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(q){q?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(q){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(I.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var q;return(q=this.textarea)==null?void 0:q.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(I.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 q=this.buffer.ybase+this.buffer.y,z=this.buffer.lines.get(q);if(!z)return;const se=Math.min(this.buffer.x,this.cols-1),ie=this._renderService.dimensions.css.cell.height,ve=z.getWidth(se),fe=this._renderService.dimensions.css.cell.width*ve,Me=this.buffer.y*this._renderService.dimensions.css.cell.height,_e=se*this._renderService.dimensions.css.cell.width;this.textarea.style.left=_e+"px",this.textarea.style.top=Me+"px",this.textarea.style.width=fe+"px",this.textarea.style.height=ie+"px",this.textarea.style.lineHeight=ie+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,_.addDisposableDomListener)(this.element,"copy",(z=>{this.hasSelection()&&(0,f.copyHandler)(z,this._selectionService)})));const q=z=>(0,f.handlePasteEvent)(z,this.textarea,this.coreService,this.optionsService);this.register((0,_.addDisposableDomListener)(this.textarea,"paste",q)),this.register((0,_.addDisposableDomListener)(this.element,"paste",q)),$.isFirefox?this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(z=>{z.button===2&&(0,f.rightClickHandler)(z,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,_.addDisposableDomListener)(this.element,"contextmenu",(z=>{(0,f.rightClickHandler)(z,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),$.isLinux&&this.register((0,_.addDisposableDomListener)(this.element,"auxclick",(z=>{z.button===1&&(0,f.moveTextAreaUnderMouseCursor)(z,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,_.addDisposableDomListener)(this.textarea,"keyup",(q=>this._keyUp(q)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keydown",(q=>this._keyDown(q)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keypress",(q=>this._keyPress(q)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionupdate",(q=>this._compositionHelper.compositionupdate(q)))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,_.addDisposableDomListener)(this.textarea,"input",(q=>this._inputEvent(q)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(q){var se;if(!q)throw new Error("Terminal requires a parent element.");if(q.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((se=this.element)==null?void 0:se.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=q.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"),q.appendChild(this.element);const z=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),z.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,_.addDisposableDomListener)(this.screenElement,"mousemove",(ie=>this.updateCursorStyle(ie)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),z.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),$.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(x.CoreBrowserService,this.textarea,q.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(C.ICoreBrowserService,this._coreBrowserService),this.register((0,_.addDisposableDomListener)(this.textarea,"focus",(ie=>this._handleTextAreaFocus(ie)))),this.register((0,_.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(l.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(C.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(L.ThemeService),this._instantiationService.setService(C.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(S.CharacterJoinerService),this._instantiationService.setService(C.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(b.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(C.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ie=>this._onRender.fire(ie)))),this.onResize((ie=>this._renderService.resize(ie.cols,ie.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(h.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(v.MouseService),this._instantiationService.setService(C.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(a.Linkifier,this.screenElement)),this.element.appendChild(z);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(y.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ie=>this.scrollLines(ie.amount,ie.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(m.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(C.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ie=>this.scrollLines(ie.amount,ie.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ie=>this._renderService.handleSelectionChanged(ie.start,ie.end,ie.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ie=>{this.textarea.value=ie,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ie=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,_.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(o.BufferDecorationRenderer,this.screenElement)),this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(ie=>this._selectionService.handleMouseDown(ie)))),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(V.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ie=>this._handleScreenReaderModeOptionChange(ie)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ie=>{!this._overviewRulerRenderer&&ie&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(c.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const q=this,z=this.element;function se(fe){const Me=q._mouseService.getMouseReportCoords(fe,q.screenElement);if(!Me)return!1;let _e,Oe;switch(fe.overrideType||fe.type){case"mousemove":Oe=32,fe.buttons===void 0?(_e=3,fe.button!==void 0&&(_e=fe.button<3?fe.button:3)):_e=1&fe.buttons?0:4&fe.buttons?1:2&fe.buttons?2:3;break;case"mouseup":Oe=0,_e=fe.button<3?fe.button:3;break;case"mousedown":Oe=1,_e=fe.button<3?fe.button:3;break;case"wheel":if(q._customWheelEventHandler&&q._customWheelEventHandler(fe)===!1||q.viewport.getLinesScrolled(fe)===0)return!1;Oe=fe.deltaY<0?0:1,_e=4;break;default:return!1}return!(Oe===void 0||_e===void 0||_e>4)&&q.coreMouseService.triggerMouseEvent({col:Me.col,row:Me.row,x:Me.x,y:Me.y,button:_e,action:Oe,ctrl:fe.ctrlKey,alt:fe.altKey,shift:fe.shiftKey})}const ie={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ve={mouseup:fe=>(se(fe),fe.buttons||(this._document.removeEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.removeEventListener("mousemove",ie.mousedrag)),this.cancel(fe)),wheel:fe=>(se(fe),this.cancel(fe,!0)),mousedrag:fe=>{fe.buttons&&se(fe)},mousemove:fe=>{fe.buttons||se(fe)}};this.register(this.coreMouseService.onProtocolChange((fe=>{fe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(fe)),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&fe?ie.mousemove||(z.addEventListener("mousemove",ve.mousemove),ie.mousemove=ve.mousemove):(z.removeEventListener("mousemove",ie.mousemove),ie.mousemove=null),16&fe?ie.wheel||(z.addEventListener("wheel",ve.wheel,{passive:!1}),ie.wheel=ve.wheel):(z.removeEventListener("wheel",ie.wheel),ie.wheel=null),2&fe?ie.mouseup||(ie.mouseup=ve.mouseup):(this._document.removeEventListener("mouseup",ie.mouseup),ie.mouseup=null),4&fe?ie.mousedrag||(ie.mousedrag=ve.mousedrag):(this._document.removeEventListener("mousemove",ie.mousedrag),ie.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,_.addDisposableDomListener)(z,"mousedown",(fe=>{if(fe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(fe))return se(fe),ie.mouseup&&this._document.addEventListener("mouseup",ie.mouseup),ie.mousedrag&&this._document.addEventListener("mousemove",ie.mousedrag),this.cancel(fe)}))),this.register((0,_.addDisposableDomListener)(z,"wheel",(fe=>{if(!ie.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(fe)===!1)return!1;if(!this.buffer.hasScrollback){const Me=this.viewport.getLinesScrolled(fe);if(Me===0)return;const _e=I.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(fe.deltaY<0?"A":"B");let Oe="";for(let qe=0;qe<Math.abs(Me);qe++)Oe+=_e;return this.coreService.triggerDataEvent(Oe,!0),this.cancel(fe,!0)}return this.viewport.handleWheel(fe)?this.cancel(fe):void 0}}),{passive:!1})),this.register((0,_.addDisposableDomListener)(z,"touchstart",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(fe),this.cancel(fe)}),{passive:!0})),this.register((0,_.addDisposableDomListener)(z,"touchmove",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(fe)?void 0:this.cancel(fe)}),{passive:!1}))}refresh(q,z){var se;(se=this._renderService)==null||se.refreshRows(q,z)}updateCursorStyle(q){var z;(z=this._selectionService)!=null&&z.shouldColumnSelect(q)?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(q,z,se=0){var ie;se===1?(super.scrollLines(q,z,se),this.refresh(0,this.rows-1)):(ie=this.viewport)==null||ie.scrollLines(q)}paste(q){(0,f.paste)(q,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(q){this._customKeyEventHandler=q}attachCustomWheelEventHandler(q){this._customWheelEventHandler=q}registerLinkProvider(q){return this._linkProviderService.registerLinkProvider(q)}registerCharacterJoiner(q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const z=this._characterJoinerService.register(q);return this.refresh(0,this.rows-1),z}deregisterCharacterJoiner(q){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(q)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(q){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+q)}registerDecoration(q){return this._decorationService.registerDecoration(q)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(q,z,se){this._selectionService.setSelection(q,z,se)}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 q;(q=this._selectionService)==null||q.clearSelection()}selectAll(){var q;(q=this._selectionService)==null||q.selectAll()}selectLines(q,z){var se;(se=this._selectionService)==null||se.selectLines(q,z)}_keyDown(q){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1)return!1;const z=this.browser.isMac&&this.options.macOptionIsMeta&&q.altKey;if(!z&&!this._compositionHelper.keydown(q))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;z||q.key!=="Dead"&&q.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const se=(0,F.evaluateKeyboardEvent)(q,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(q),se.type===3||se.type===2){const ie=this.rows-1;return this.scrollLines(se.type===2?-ie:ie),this.cancel(q,!0)}return se.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,q)||(se.cancel&&this.cancel(q,!0),!se.key||!!(q.key&&!q.ctrlKey&&!q.altKey&&!q.metaKey&&q.key.length===1&&q.key.charCodeAt(0)>=65&&q.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(se.key!==I.C0.ETX&&se.key!==I.C0.CR||(this.textarea.value=""),this._onKey.fire({key:se.key,domEvent:q}),this._showCursor(),this.coreService.triggerDataEvent(se.key,!0),!this.optionsService.rawOptions.screenReaderMode||q.altKey||q.ctrlKey?this.cancel(q,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(q,z){const se=q.isMac&&!this.options.macOptionIsMeta&&z.altKey&&!z.ctrlKey&&!z.metaKey||q.isWindows&&z.altKey&&z.ctrlKey&&!z.metaKey||q.isWindows&&z.getModifierState("AltGraph");return z.type==="keypress"?se:se&&(!z.keyCode||z.keyCode>47)}_keyUp(q){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1||((function(z){return z.keyCode===16||z.keyCode===17||z.keyCode===18})(q)||this.focus(),this.updateCursorStyle(q),this._keyPressHandled=!1)}_keyPress(q){let z;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(q)===!1)return!1;if(this.cancel(q),q.charCode)z=q.charCode;else if(q.which===null||q.which===void 0)z=q.keyCode;else{if(q.which===0||q.charCode===0)return!1;z=q.which}return!(!z||(q.altKey||q.ctrlKey||q.metaKey)&&!this._isThirdLevelShift(this.browser,q)||(z=String.fromCharCode(z),this._onKey.fire({key:z,domEvent:q}),this._showCursor(),this.coreService.triggerDataEvent(z,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(q){if(q.data&&q.inputType==="insertText"&&(!q.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const z=q.data;return this.coreService.triggerDataEvent(z,!0),this.cancel(q),!0}return!1}resize(q,z){q!==this.cols||z!==this.rows?super.resize(q,z):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(q,z){var se,ie;(se=this._charSizeService)==null||se.measure(),(ie=this.viewport)==null||ie.syncScrollArea(!0)}clear(){var q;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 z=1;z<this.rows;z++)this.buffer.lines.push(this.buffer.getBlankLine(N.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(q=this.viewport)==null||q.reset(),this.refresh(0,this.rows-1)}}reset(){var z,se;this.options.rows=this.rows,this.options.cols=this.cols;const q=this._customKeyEventHandler;this._setup(),super.reset(),(z=this._selectionService)==null||z.reset(),this._decorationService.reset(),(se=this.viewport)==null||se.reset(),this._customKeyEventHandler=q,this.refresh(0,this.rows-1)}clearTextureAtlas(){var q;(q=this._renderService)==null||q.clearTextureAtlas()}_reportFocus(){var q;(q=this.element)!=null&&q.classList.contains("focus")?this.coreService.triggerDataEvent(I.C0.ESC+"[I"):this.coreService.triggerDataEvent(I.C0.ESC+"[O")}_reportWindowsOptions(q){if(this._renderService)switch(q){case H.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const z=this._renderService.dimensions.css.canvas.width.toFixed(0),se=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${I.C0.ESC}[4;${se};${z}t`);break;case H.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ie=this._renderService.dimensions.css.cell.width.toFixed(0),ve=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${I.C0.ESC}[6;${ve};${ie}t`)}}cancel(q,z){if(this.options.cancelEvents||z)return q.preventDefault(),q.stopPropagation(),!1}}n.Terminal=ue},9924:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TimeBasedDebouncer=void 0,n.TimeBasedDebouncer=class{constructor(u,f=1e3){this._renderCallback=u,this._debounceThresholdMS=f,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,f,_){this._rowCount=_,u=u!==void 0?u:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f;const a=Date.now();if(a-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=a,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=a-this._lastRefreshMs,w=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),w)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const u=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,f)}}},1680:function(j,n,u){var f=this&&this.__decorate||function(h,c,l,S){var x,v=arguments.length,b=v<3?c:S===null?S=Object.getOwnPropertyDescriptor(c,l):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(h,c,l,S);else for(var m=h.length-1;m>=0;m--)(x=h[m])&&(b=(v<3?x(b):v>3?x(c,l,b):x(c,l))||b);return v>3&&b&&Object.defineProperty(c,l,b),b},_=this&&this.__param||function(h,c){return function(l,S){c(l,S,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Viewport=void 0;const a=u(3656),p=u(4725),w=u(8460),y=u(844),o=u(2585);let r=n.Viewport=class extends y.Disposable{constructor(h,c,l,S,x,v,b,m){super(),this._viewportElement=h,this._scrollArea=c,this._bufferService=l,this._optionsService=S,this._charSizeService=x,this._renderService=v,this._coreBrowserService=b,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 w.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,a.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((C=>this._activeBuffer=C.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((C=>this._renderDimensions=C))),this._handleThemeChange(m.colors),this.register(m.onChangeColors((C=>this._handleThemeChange(C)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(h){this._viewportElement.style.backgroundColor=h.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(h){if(h)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 c=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==c&&(this._lastRecordedBufferHeight=c,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const h=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==h&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=h),this._refreshAnimationFrame=null}syncScrollArea(h=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(h);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(h)}_handleScroll(h){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 c=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:c,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const h=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(h*(this._smoothScrollState.target-this._smoothScrollState.origin)),h<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(h,c){const l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(c<0&&this._viewportElement.scrollTop!==0||c>0&&l<this._lastRecordedBufferHeight)||(h.cancelable&&h.preventDefault(),!1)}handleWheel(h){const c=this._getPixelsScrolled(h);return c!==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+c:this._smoothScrollState.target+=c,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=c,this._bubbleScroll(h,c))}scrollLines(h){if(h!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const c=h*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+c,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:h,suppressScrollEvent:!1})}_getPixelsScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let c=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_LINE?c*=this._currentRowHeight:h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(c*=this._currentRowHeight*this._bufferService.rows),c}getBufferElements(h,c){var m;let l,S="";const x=[],v=c??this._bufferService.buffer.lines.length,b=this._bufferService.buffer.lines;for(let C=h;C<v;C++){const L=b.get(C);if(!L)continue;const M=(m=b.get(C+1))==null?void 0:m.isWrapped;if(S+=L.translateToString(!M),!M||C===b.length-1){const E=document.createElement("div");E.textContent=S,x.push(E),S.length>0&&(l=E),S=""}}return{bufferElements:x,cursorElement:l}}getLinesScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let c=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(c/=this._currentRowHeight+0,this._wheelPartialScroll+=c,c=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(c*=this._bufferService.rows),c}_applyScrollModifier(h,c){const l=this._optionsService.rawOptions.fastScrollModifier;return l==="alt"&&c.altKey||l==="ctrl"&&c.ctrlKey||l==="shift"&&c.shiftKey?h*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:h*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(h){this._lastTouchY=h.touches[0].pageY}handleTouchMove(h){const c=this._lastTouchY-h.touches[0].pageY;return this._lastTouchY=h.touches[0].pageY,c!==0&&(this._viewportElement.scrollTop+=c,this._bubbleScroll(h,c))}};n.Viewport=r=f([_(2,o.IBufferService),_(3,o.IOptionsService),_(4,p.ICharSizeService),_(5,p.IRenderService),_(6,p.ICoreBrowserService),_(7,p.IThemeService)],r)},3107:function(j,n,u){var f=this&&this.__decorate||function(o,r,h,c){var l,S=arguments.length,x=S<3?r:c===null?c=Object.getOwnPropertyDescriptor(r,h):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(o,r,h,c);else for(var v=o.length-1;v>=0;v--)(l=o[v])&&(x=(S<3?l(x):S>3?l(r,h,x):l(r,h))||x);return S>3&&x&&Object.defineProperty(r,h,x),x},_=this&&this.__param||function(o,r){return function(h,c){r(h,c,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferDecorationRenderer=void 0;const a=u(4725),p=u(844),w=u(2585);let y=n.BufferDecorationRenderer=class extends p.Disposable{constructor(o,r,h,c,l){super(),this._screenElement=o,this._bufferService=r,this._coreBrowserService=h,this._decorationService=c,this._renderService=l,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((S=>this._removeDecoration(S)))),this.register((0,p.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 o of this._decorationService.decorations)this._renderDecoration(o);this._dimensionsChanged=!1}_renderDecoration(o){this._refreshStyle(o),this._dimensionsChanged&&this._refreshXPosition(o)}_createElement(o){var c;const r=this._coreBrowserService.mainDocument.createElement("div");r.classList.add("xterm-decoration"),r.classList.toggle("xterm-decoration-top-layer",((c=o==null?void 0:o.options)==null?void 0:c.layer)==="top"),r.style.width=`${Math.round((o.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,r.style.height=(o.options.height||1)*this._renderService.dimensions.css.cell.height+"px",r.style.top=(o.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",r.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const h=o.options.x??0;return h&&h>this._bufferService.cols&&(r.style.display="none"),this._refreshXPosition(o,r),r}_refreshStyle(o){const r=o.marker.line-this._bufferService.buffers.active.ydisp;if(r<0||r>=this._bufferService.rows)o.element&&(o.element.style.display="none",o.onRenderEmitter.fire(o.element));else{let h=this._decorationElements.get(o);h||(h=this._createElement(o),o.element=h,this._decorationElements.set(o,h),this._container.appendChild(h),o.onDispose((()=>{this._decorationElements.delete(o),h.remove()}))),h.style.top=r*this._renderService.dimensions.css.cell.height+"px",h.style.display=this._altBufferIsActive?"none":"block",o.onRenderEmitter.fire(h)}}_refreshXPosition(o,r=o.element){if(!r)return;const h=o.options.x??0;(o.options.anchor||"left")==="right"?r.style.right=h?h*this._renderService.dimensions.css.cell.width+"px":"":r.style.left=h?h*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(o){var r;(r=this._decorationElements.get(o))==null||r.remove(),this._decorationElements.delete(o),o.dispose()}};n.BufferDecorationRenderer=y=f([_(1,w.IBufferService),_(2,a.ICoreBrowserService),_(3,w.IDecorationService),_(4,a.IRenderService)],y)},5871:(j,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(u){if(u.options.overviewRulerOptions){for(const f of this._zones)if(f.color===u.options.overviewRulerOptions.color&&f.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(f,u.marker.line))return;if(this._lineAdjacentToZone(f,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(f,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,f){return f>=u.startBufferLine&&f<=u.endBufferLine}_lineAdjacentToZone(u,f,_){return f>=u.startBufferLine-this._linePadding[_||"full"]&&f<=u.endBufferLine+this._linePadding[_||"full"]}_addLineToZone(u,f){u.startBufferLine=Math.min(u.startBufferLine,f),u.endBufferLine=Math.max(u.endBufferLine,f)}}},5744:function(j,n,u){var f=this&&this.__decorate||function(l,S,x,v){var b,m=arguments.length,C=m<3?S:v===null?v=Object.getOwnPropertyDescriptor(S,x):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(l,S,x,v);else for(var L=l.length-1;L>=0;L--)(b=l[L])&&(C=(m<3?b(C):m>3?b(S,x,C):b(S,x))||C);return m>3&&C&&Object.defineProperty(S,x,C),C},_=this&&this.__param||function(l,S){return function(x,v){S(x,v,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OverviewRulerRenderer=void 0;const a=u(5871),p=u(4725),w=u(844),y=u(2585),o={full:0,left:0,center:0,right:0},r={full:0,left:0,center:0,right:0},h={full:0,left:0,center:0,right:0};let c=n.OverviewRulerRenderer=class extends w.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(l,S,x,v,b,m,C){var M;super(),this._viewportElement=l,this._screenElement=S,this._bufferService=x,this._decorationService=v,this._renderService=b,this._optionsService=m,this._coreBrowserService=C,this._colorZoneStore=new a.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(),(M=this._viewportElement.parentElement)==null||M.insertBefore(this._canvas,this._viewportElement);const L=this._canvas.getContext("2d");if(!L)throw new Error("Ctx cannot be null");this._ctx=L,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,w.toDisposable)((()=>{var E;(E=this._canvas)==null||E.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 l=Math.floor(this._canvas.width/3),S=Math.ceil(this._canvas.width/3);r.full=this._canvas.width,r.left=l,r.center=S,r.right=l,this._refreshDrawHeightConstants(),h.full=0,h.left=0,h.center=r.left,h.right=r.left+r.center}_refreshDrawHeightConstants(){o.full=Math.round(2*this._coreBrowserService.dpr);const l=this._canvas.height/this._bufferService.buffer.lines.length,S=Math.round(Math.max(Math.min(l,12),6)*this._coreBrowserService.dpr);o.left=S,o.center=S,o.right=S}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*o.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*o.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*o.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*o.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 S of this._decorationService.decorations)this._colorZoneStore.addDecoration(S);this._ctx.lineWidth=1;const l=this._colorZoneStore.zones;for(const S of l)S.position!=="full"&&this._renderColorZone(S);for(const S of l)S.position==="full"&&this._renderColorZone(S);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(l){this._ctx.fillStyle=l.color,this._ctx.fillRect(h[l.position||"full"],Math.round((this._canvas.height-1)*(l.startBufferLine/this._bufferService.buffers.active.lines.length)-o[l.position||"full"]/2),r[l.position||"full"],Math.round((this._canvas.height-1)*((l.endBufferLine-l.startBufferLine)/this._bufferService.buffers.active.lines.length)+o[l.position||"full"]))}_queueRefresh(l,S){this._shouldUpdateDimensions=l||this._shouldUpdateDimensions,this._shouldUpdateAnchor=S||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};n.OverviewRulerRenderer=c=f([_(2,y.IBufferService),_(3,y.IDecorationService),_(4,p.IRenderService),_(5,y.IOptionsService),_(6,p.ICoreBrowserService)],c)},2950:function(j,n,u){var f=this&&this.__decorate||function(o,r,h,c){var l,S=arguments.length,x=S<3?r:c===null?c=Object.getOwnPropertyDescriptor(r,h):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(o,r,h,c);else for(var v=o.length-1;v>=0;v--)(l=o[v])&&(x=(S<3?l(x):S>3?l(r,h,x):l(r,h))||x);return S>3&&x&&Object.defineProperty(r,h,x),x},_=this&&this.__param||function(o,r){return function(h,c){r(h,c,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CompositionHelper=void 0;const a=u(4725),p=u(2585),w=u(2584);let y=n.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(o,r,h,c,l,S){this._textarea=o,this._compositionView=r,this._bufferService=h,this._optionsService=c,this._coreService=l,this._renderService=S,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(o){this._compositionView.textContent=o.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(o){if(this._isComposing||this._isSendingComposition){if(o.keyCode===229||o.keyCode===16||o.keyCode===17||o.keyCode===18)return!1;this._finalizeComposition(!1)}return o.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(o){if(this._compositionView.classList.remove("active"),this._isComposing=!1,o){const r={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let h;this._isSendingComposition=!1,r.start+=this._dataAlreadySent.length,h=this._isComposing?this._textarea.value.substring(r.start,r.end):this._textarea.value.substring(r.start),h.length>0&&this._coreService.triggerDataEvent(h,!0)}}),0)}else{this._isSendingComposition=!1;const r=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(r,!0)}}_handleAnyTextareaChanges(){const o=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const r=this._textarea.value,h=r.replace(o,"");this._dataAlreadySent=h,r.length>o.length?this._coreService.triggerDataEvent(h,!0):r.length<o.length?this._coreService.triggerDataEvent(`${w.C0.DEL}`,!0):r.length===o.length&&r!==o&&this._coreService.triggerDataEvent(r,!0)}}),0)}updateCompositionElements(o){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const r=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),h=this._renderService.dimensions.css.cell.height,c=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,l=r*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=l+"px",this._compositionView.style.top=c+"px",this._compositionView.style.height=h+"px",this._compositionView.style.lineHeight=h+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const S=this._compositionView.getBoundingClientRect();this._textarea.style.left=l+"px",this._textarea.style.top=c+"px",this._textarea.style.width=Math.max(S.width,1)+"px",this._textarea.style.height=Math.max(S.height,1)+"px",this._textarea.style.lineHeight=S.height+"px"}o||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};n.CompositionHelper=y=f([_(2,p.IBufferService),_(3,p.IOptionsService),_(4,p.ICoreService),_(5,a.IRenderService)],y)},9806:(j,n)=>{function u(f,_,a){const p=a.getBoundingClientRect(),w=f.getComputedStyle(a),y=parseInt(w.getPropertyValue("padding-left")),o=parseInt(w.getPropertyValue("padding-top"));return[_.clientX-p.left-y,_.clientY-p.top-o]}Object.defineProperty(n,"__esModule",{value:!0}),n.getCoords=n.getCoordsRelativeToElement=void 0,n.getCoordsRelativeToElement=u,n.getCoords=function(f,_,a,p,w,y,o,r,h){if(!y)return;const c=u(f,_,a);return c?(c[0]=Math.ceil((c[0]+(h?o/2:0))/o),c[1]=Math.ceil(c[1]/r),c[0]=Math.min(Math.max(c[0],1),p+(h?1:0)),c[1]=Math.min(Math.max(c[1],1),w),c):void 0}},9504:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.moveToCellSequence=void 0;const f=u(2584);function _(r,h,c,l){const S=r-a(r,c),x=h-a(h,c),v=Math.abs(S-x)-(function(b,m,C){let L=0;const M=b-a(b,C),E=m-a(m,C);for(let R=0;R<Math.abs(M-E);R++){const B=p(b,m)==="A"?-1:1,$=C.buffer.lines.get(M+B*R);$!=null&&$.isWrapped&&L++}return L})(r,h,c);return o(v,y(p(r,h),l))}function a(r,h){let c=0,l=h.buffer.lines.get(r),S=l==null?void 0:l.isWrapped;for(;S&&r>=0&&r<h.rows;)c++,l=h.buffer.lines.get(--r),S=l==null?void 0:l.isWrapped;return c}function p(r,h){return r>h?"A":"B"}function w(r,h,c,l,S,x){let v=r,b=h,m="";for(;v!==c||b!==l;)v+=S?1:-1,S&&v>x.cols-1?(m+=x.buffer.translateBufferLineToString(b,!1,r,v),v=0,r=0,b++):!S&&v<0&&(m+=x.buffer.translateBufferLineToString(b,!1,0,r+1),v=x.cols-1,r=v,b--);return m+x.buffer.translateBufferLineToString(b,!1,r,v)}function y(r,h){const c=h?"O":"[";return f.C0.ESC+c+r}function o(r,h){r=Math.floor(r);let c="";for(let l=0;l<r;l++)c+=h;return c}n.moveToCellSequence=function(r,h,c,l){const S=c.buffer.x,x=c.buffer.y;if(!c.buffer.hasScrollback)return(function(m,C,L,M,E,R){return _(C,M,E,R).length===0?"":o(w(m,C,m,C-a(C,E),!1,E).length,y("D",R))})(S,x,0,h,c,l)+_(x,h,c,l)+(function(m,C,L,M,E,R){let B;B=_(C,M,E,R).length>0?M-a(M,E):C;const $=M,N=(function(I,F,D,O,T,H){let V;return V=_(D,O,T,H).length>0?O-a(O,T):F,I<D&&V<=O||I>=D&&V<O?"C":"D"})(m,C,L,M,E,R);return o(w(m,B,L,$,N==="C",E).length,y(N,R))})(S,x,r,h,c,l);let v;if(x===h)return v=S>r?"D":"C",o(Math.abs(S-r),y(v,l));v=x>h?"D":"C";const b=Math.abs(x-h);return o((function(m,C){return C.cols-m})(x>h?r:S,c)+(b-1)*c.cols+1+((x>h?S:r)-1),y(v,l))}},1296:function(j,n,u){var f=this&&this.__decorate||function(R,B,$,N){var I,F=arguments.length,D=F<3?B:N===null?N=Object.getOwnPropertyDescriptor(B,$):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(R,B,$,N);else for(var O=R.length-1;O>=0;O--)(I=R[O])&&(D=(F<3?I(D):F>3?I(B,$,D):I(B,$))||D);return F>3&&D&&Object.defineProperty(B,$,D),D},_=this&&this.__param||function(R,B){return function($,N){B($,N,R)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRenderer=void 0;const a=u(3787),p=u(2550),w=u(2223),y=u(6171),o=u(6052),r=u(4725),h=u(8055),c=u(8460),l=u(844),S=u(2585),x="xterm-dom-renderer-owner-",v="xterm-rows",b="xterm-fg-",m="xterm-bg-",C="xterm-focus",L="xterm-selection";let M=1,E=n.DomRenderer=class extends l.Disposable{constructor(R,B,$,N,I,F,D,O,T,H,V,Q,ue){super(),this._terminal=R,this._document=B,this._element=$,this._screenElement=N,this._viewportElement=I,this._helperContainer=F,this._linkifier2=D,this._charSizeService=T,this._optionsService=H,this._bufferService=V,this._coreBrowserService=Q,this._themeService=ue,this._terminalClass=M++,this._rowElements=[],this._selectionRenderModel=(0,o.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new c.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(v),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(L),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,y.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((de=>this._injectCss(de)))),this._injectCss(this._themeService.colors),this._rowFactory=O.createInstance(a.DomRendererRowFactory,document),this._element.classList.add(x+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((de=>this._handleLinkHover(de)))),this.register(this._linkifier2.onHideLinkUnderline((de=>this._handleLinkLeave(de)))),this.register((0,l.toDisposable)((()=>{this._element.classList.remove(x+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.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 R=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*R,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*R),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/R),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/R),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 $ of this._rowElements)$.style.width=`${this.dimensions.css.canvas.width}px`,$.style.height=`${this.dimensions.css.cell.height}px`,$.style.lineHeight=`${this.dimensions.css.cell.height}px`,$.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const B=`${this._terminalSelector} .${v} 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(R){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let B=`${this._terminalSelector} .${v} { color: ${R.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;B+=`${this._terminalSelector} .${v} .xterm-dim { color: ${h.color.multiplyOpacity(R.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 $=`blink_underline_${this._terminalClass}`,N=`blink_bar_${this._terminalClass}`,I=`blink_block_${this._terminalClass}`;B+=`@keyframes ${$} { 50% { border-bottom-style: hidden; }}`,B+=`@keyframes ${N} { 50% { box-shadow: none; }}`,B+=`@keyframes ${I} { 0% { background-color: ${R.cursor.css}; color: ${R.cursorAccent.css}; } 50% { background-color: inherit; color: ${R.cursor.css}; }}`,B+=`${this._terminalSelector} .${v}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${$} 1s step-end infinite;}${this._terminalSelector} .${v}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${N} 1s step-end infinite;}${this._terminalSelector} .${v}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${I} 1s step-end infinite;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-block { background-color: ${R.cursor.css}; color: ${R.cursorAccent.css};}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${R.cursor.css} !important; color: ${R.cursorAccent.css} !important;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${R.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${R.cursor.css} inset;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${R.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,B+=`${this._terminalSelector} .${L} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${L} div { position: absolute; background-color: ${R.selectionBackgroundOpaque.css};}${this._terminalSelector} .${L} div { position: absolute; background-color: ${R.selectionInactiveBackgroundOpaque.css};}`;for(const[F,D]of R.ansi.entries())B+=`${this._terminalSelector} .${b}${F} { color: ${D.css}; }${this._terminalSelector} .${b}${F}.xterm-dim { color: ${h.color.multiplyOpacity(D,.5).css}; }${this._terminalSelector} .${m}${F} { background-color: ${D.css}; }`;B+=`${this._terminalSelector} .${b}${w.INVERTED_DEFAULT_COLOR} { color: ${h.color.opaque(R.background).css}; }${this._terminalSelector} .${b}${w.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${h.color.multiplyOpacity(h.color.opaque(R.background),.5).css}; }${this._terminalSelector} .${m}${w.INVERTED_DEFAULT_COLOR} { background-color: ${R.foreground.css}; }`,this._themeStyleElement.textContent=B}_setDefaultSpacing(){const R=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${R}px`,this._rowFactory.defaultSpacing=R}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(R,B){for(let $=this._rowElements.length;$<=B;$++){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(R,B){this._refreshRowElements(R,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(C),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(C),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(R,B,$){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(R,B,$),this.renderRows(0,this._bufferService.rows-1),!R||!B)return;this._selectionRenderModel.update(this._terminal,R,B,$);const N=this._selectionRenderModel.viewportStartRow,I=this._selectionRenderModel.viewportEndRow,F=this._selectionRenderModel.viewportCappedStartRow,D=this._selectionRenderModel.viewportCappedEndRow;if(F>=this._bufferService.rows||D<0)return;const O=this._document.createDocumentFragment();if($){const T=R[0]>B[0];O.appendChild(this._createSelectionElement(F,T?B[0]:R[0],T?R[0]:B[0],D-F+1))}else{const T=N===F?R[0]:0,H=F===I?B[0]:this._bufferService.cols;O.appendChild(this._createSelectionElement(F,T,H));const V=D-F-1;if(O.appendChild(this._createSelectionElement(F+1,0,this._bufferService.cols,V)),F!==D){const Q=I===D?B[0]:this._bufferService.cols;O.appendChild(this._createSelectionElement(D,0,Q))}}this._selectionContainer.appendChild(O)}_createSelectionElement(R,B,$,N=1){const I=this._document.createElement("div"),F=B*this.dimensions.css.cell.width;let D=this.dimensions.css.cell.width*($-B);return F+D>this.dimensions.css.canvas.width&&(D=this.dimensions.css.canvas.width-F),I.style.height=N*this.dimensions.css.cell.height+"px",I.style.top=R*this.dimensions.css.cell.height+"px",I.style.left=`${F}px`,I.style.width=`${D}px`,I}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 R of this._rowElements)R.replaceChildren()}renderRows(R,B){const $=this._bufferService.buffer,N=$.ybase+$.y,I=Math.min($.x,this._bufferService.cols-1),F=this._optionsService.rawOptions.cursorBlink,D=this._optionsService.rawOptions.cursorStyle,O=this._optionsService.rawOptions.cursorInactiveStyle;for(let T=R;T<=B;T++){const H=T+$.ydisp,V=this._rowElements[T],Q=$.lines.get(H);if(!V||!Q)break;V.replaceChildren(...this._rowFactory.createRow(Q,H,H===N,D,O,I,F,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${x}${this._terminalClass}`}_handleLinkHover(R){this._setCellUnderline(R.x1,R.x2,R.y1,R.y2,R.cols,!0)}_handleLinkLeave(R){this._setCellUnderline(R.x1,R.x2,R.y1,R.y2,R.cols,!1)}_setCellUnderline(R,B,$,N,I,F){$<0&&(R=0),N<0&&(B=0);const D=this._bufferService.rows-1;$=Math.max(Math.min($,D),0),N=Math.max(Math.min(N,D),0),I=Math.min(I,this._bufferService.cols);const O=this._bufferService.buffer,T=O.ybase+O.y,H=Math.min(O.x,I-1),V=this._optionsService.rawOptions.cursorBlink,Q=this._optionsService.rawOptions.cursorStyle,ue=this._optionsService.rawOptions.cursorInactiveStyle;for(let de=$;de<=N;++de){const q=de+O.ydisp,z=this._rowElements[de],se=O.lines.get(q);if(!z||!se)break;z.replaceChildren(...this._rowFactory.createRow(se,q,q===T,Q,ue,H,V,this.dimensions.css.cell.width,this._widthCache,F?de===$?R:0:-1,F?(de===N?B:I)-1:-1))}}};n.DomRenderer=E=f([_(7,S.IInstantiationService),_(8,r.ICharSizeService),_(9,S.IOptionsService),_(10,S.IBufferService),_(11,r.ICoreBrowserService),_(12,r.IThemeService)],E)},3787:function(j,n,u){var f=this&&this.__decorate||function(v,b,m,C){var L,M=arguments.length,E=M<3?b:C===null?C=Object.getOwnPropertyDescriptor(b,m):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,b,m,C);else for(var R=v.length-1;R>=0;R--)(L=v[R])&&(E=(M<3?L(E):M>3?L(b,m,E):L(b,m))||E);return M>3&&E&&Object.defineProperty(b,m,E),E},_=this&&this.__param||function(v,b){return function(m,C){b(m,C,v)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRendererRowFactory=void 0;const a=u(2223),p=u(643),w=u(511),y=u(2585),o=u(8055),r=u(4725),h=u(4269),c=u(6171),l=u(3734);let S=n.DomRendererRowFactory=class{constructor(v,b,m,C,L,M,E){this._document=v,this._characterJoinerService=b,this._optionsService=m,this._coreBrowserService=C,this._coreService=L,this._decorationService=M,this._themeService=E,this._workCell=new w.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(v,b,m){this._selectionStart=v,this._selectionEnd=b,this._columnSelectMode=m}createRow(v,b,m,C,L,M,E,R,B,$,N){const I=[],F=this._characterJoinerService.getJoinedCharacters(b),D=this._themeService.colors;let O,T=v.getNoBgTrimmedLength();m&&T<M+1&&(T=M+1);let H=0,V="",Q=0,ue=0,de=0,q=!1,z=0,se=!1,ie=0;const ve=[],fe=$!==-1&&N!==-1;for(let Me=0;Me<T;Me++){v.loadCell(Me,this._workCell);let _e=this._workCell.getWidth();if(_e===0)continue;let Oe=!1,qe=Me,be=this._workCell;if(F.length>0&&Me===F[0][0]){Oe=!0;const Le=F.shift();be=new h.JoinedCellData(this._workCell,v.translateToString(!0,Le[0],Le[1]),Le[1]-Le[0]),qe=Le[1]-1,_e=be.getWidth()}const ft=this._isCellInSelection(Me,b),Ot=m&&Me===M,Se=fe&&Me>=$&&Me<=N;let pe=!1;this._decorationService.forEachDecorationAtCell(Me,b,void 0,(Le=>{pe=!0}));let me=be.getChars()||p.WHITESPACE_CELL_CHAR;if(me===" "&&(be.isUnderline()||be.isOverline())&&(me=" "),ie=_e*R-B.get(me,be.isBold(),be.isItalic()),O){if(H&&(ft&&se||!ft&&!se&&be.bg===Q)&&(ft&&se&&D.selectionForeground||be.fg===ue)&&be.extended.ext===de&&Se===q&&ie===z&&!Ot&&!Oe&&!pe){be.isInvisible()?V+=p.WHITESPACE_CELL_CHAR:V+=me,H++;continue}H&&(O.textContent=V),O=this._document.createElement("span"),H=0,V=""}else O=this._document.createElement("span");if(Q=be.bg,ue=be.fg,de=be.extended.ext,q=Se,z=ie,se=ft,Oe&&M>=Me&&M<=qe&&(M=Me),!this._coreService.isCursorHidden&&Ot&&this._coreService.isCursorInitialized){if(ve.push("xterm-cursor"),this._coreBrowserService.isFocused)E&&ve.push("xterm-cursor-blink"),ve.push(C==="bar"?"xterm-cursor-bar":C==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(L)switch(L){case"outline":ve.push("xterm-cursor-outline");break;case"block":ve.push("xterm-cursor-block");break;case"bar":ve.push("xterm-cursor-bar");break;case"underline":ve.push("xterm-cursor-underline")}}if(be.isBold()&&ve.push("xterm-bold"),be.isItalic()&&ve.push("xterm-italic"),be.isDim()&&ve.push("xterm-dim"),V=be.isInvisible()?p.WHITESPACE_CELL_CHAR:be.getChars()||p.WHITESPACE_CELL_CHAR,be.isUnderline()&&(ve.push(`xterm-underline-${be.extended.underlineStyle}`),V===" "&&(V=" "),!be.isUnderlineColorDefault()))if(be.isUnderlineColorRGB())O.style.textDecorationColor=`rgb(${l.AttributeData.toColorRGB(be.getUnderlineColor()).join(",")})`;else{let Le=be.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&be.isBold()&&Le<8&&(Le+=8),O.style.textDecorationColor=D.ansi[Le].css}be.isOverline()&&(ve.push("xterm-overline"),V===" "&&(V=" ")),be.isStrikethrough()&&ve.push("xterm-strikethrough"),Se&&(O.style.textDecoration="underline");let ce=be.getFgColor(),ge=be.getFgColorMode(),ze=be.getBgColor(),Re=be.getBgColorMode();const _t=!!be.isInverse();if(_t){const Le=ce;ce=ze,ze=Le;const xt=ge;ge=Re,Re=xt}let Qe,it,Ie,Ae=!1;switch(this._decorationService.forEachDecorationAtCell(Me,b,void 0,(Le=>{Le.options.layer!=="top"&&Ae||(Le.backgroundColorRGB&&(Re=50331648,ze=Le.backgroundColorRGB.rgba>>8&16777215,Qe=Le.backgroundColorRGB),Le.foregroundColorRGB&&(ge=50331648,ce=Le.foregroundColorRGB.rgba>>8&16777215,it=Le.foregroundColorRGB),Ae=Le.options.layer==="top")})),!Ae&&ft&&(Qe=this._coreBrowserService.isFocused?D.selectionBackgroundOpaque:D.selectionInactiveBackgroundOpaque,ze=Qe.rgba>>8&16777215,Re=50331648,Ae=!0,D.selectionForeground&&(ge=50331648,ce=D.selectionForeground.rgba>>8&16777215,it=D.selectionForeground)),Ae&&ve.push("xterm-decoration-top"),Re){case 16777216:case 33554432:Ie=D.ansi[ze],ve.push(`xterm-bg-${ze}`);break;case 50331648:Ie=o.channels.toColor(ze>>16,ze>>8&255,255&ze),this._addStyle(O,`background-color:#${x((ze>>>0).toString(16),"0",6)}`);break;default:_t?(Ie=D.foreground,ve.push(`xterm-bg-${a.INVERTED_DEFAULT_COLOR}`)):Ie=D.background}switch(Qe||be.isDim()&&(Qe=o.color.multiplyOpacity(Ie,.5)),ge){case 16777216:case 33554432:be.isBold()&&ce<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ce+=8),this._applyMinimumContrast(O,Ie,D.ansi[ce],be,Qe,void 0)||ve.push(`xterm-fg-${ce}`);break;case 50331648:const Le=o.channels.toColor(ce>>16&255,ce>>8&255,255&ce);this._applyMinimumContrast(O,Ie,Le,be,Qe,it)||this._addStyle(O,`color:#${x(ce.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(O,Ie,D.foreground,be,Qe,it)||_t&&ve.push(`xterm-fg-${a.INVERTED_DEFAULT_COLOR}`)}ve.length&&(O.className=ve.join(" "),ve.length=0),Ot||Oe||pe?O.textContent=V:H++,ie!==this.defaultSpacing&&(O.style.letterSpacing=`${ie}px`),I.push(O),Me=qe}return O&&H&&(O.textContent=V),I}_applyMinimumContrast(v,b,m,C,L,M){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,c.treatGlyphAsBackgroundColor)(C.getCode()))return!1;const E=this._getContrastCache(C);let R;if(L||M||(R=E.getColor(b.rgba,m.rgba)),R===void 0){const B=this._optionsService.rawOptions.minimumContrastRatio/(C.isDim()?2:1);R=o.color.ensureContrastRatio(L||b,M||m,B),E.setColor((L||b).rgba,(M||m).rgba,R??null)}return!!R&&(this._addStyle(v,`color:${R.css}`),!0)}_getContrastCache(v){return v.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(v,b){v.setAttribute("style",`${v.getAttribute("style")||""}${b};`)}_isCellInSelection(v,b){const m=this._selectionStart,C=this._selectionEnd;return!(!m||!C)&&(this._columnSelectMode?m[0]<=C[0]?v>=m[0]&&b>=m[1]&&v<C[0]&&b<=C[1]:v<m[0]&&b>=m[1]&&v>=C[0]&&b<=C[1]:b>m[1]&&b<C[1]||m[1]===C[1]&&b===m[1]&&v>=m[0]&&v<C[0]||m[1]<C[1]&&b===C[1]&&v<C[0]||m[1]<C[1]&&b===m[1]&&v>=m[0])}};function x(v,b,m){for(;v.length<m;)v=b+v;return v}n.DomRendererRowFactory=S=f([_(1,r.ICharacterJoinerService),_(2,y.IOptionsService),_(3,r.ICoreBrowserService),_(4,y.ICoreService),_(5,y.IDecorationService),_(6,r.IThemeService)],S)},2550:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WidthCache=void 0,n.WidthCache=class{constructor(u,f){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const _=u.createElement("span");_.classList.add("xterm-char-measure-element");const a=u.createElement("span");a.classList.add("xterm-char-measure-element"),a.style.fontWeight="bold";const p=u.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const w=u.createElement("span");w.classList.add("xterm-char-measure-element"),w.style.fontWeight="bold",w.style.fontStyle="italic",this._measureElements=[_,a,p,w],this._container.appendChild(_),this._container.appendChild(a),this._container.appendChild(p),this._container.appendChild(w),f.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(u,f,_,a){u===this._font&&f===this._fontSize&&_===this._weight&&a===this._weightBold||(this._font=u,this._fontSize=f,this._weight=_,this._weightBold=a,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${_}`,this._measureElements[1].style.fontWeight=`${a}`,this._measureElements[2].style.fontWeight=`${_}`,this._measureElements[3].style.fontWeight=`${a}`,this.clear())}get(u,f,_){let a=0;if(!f&&!_&&u.length===1&&(a=u.charCodeAt(0))<256){if(this._flat[a]!==-9999)return this._flat[a];const y=this._measure(u,0);return y>0&&(this._flat[a]=y),y}let p=u;f&&(p+="B"),_&&(p+="I");let w=this._holey.get(p);if(w===void 0){let y=0;f&&(y|=1),_&&(y|=2),w=this._measure(u,y),w>0&&this._holey.set(p,w)}return w}_measure(u,f){const _=this._measureElements[f];return _.textContent=u.repeat(32),_.offsetWidth/32}}},2223:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const f=u(6114);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},6171:(j,n)=>{function u(_){return 57508<=_&&_<=57558}function f(_){return _>=128512&&_<=128591||_>=127744&&_<=128511||_>=128640&&_<=128767||_>=9728&&_<=9983||_>=9984&&_<=10175||_>=65024&&_<=65039||_>=129280&&_<=129535||_>=127462&&_<=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(_){if(!_)throw new Error("value must not be falsy");return _},n.isPowerlineGlyph=u,n.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},n.isEmoji=f,n.allowRescaling=function(_,a,p,w){return a===1&&p>Math.ceil(1.5*w)&&_!==void 0&&_>255&&!f(_)&&!u(_)&&!(function(y){return 57344<=y&&y<=63743})(_)},n.treatGlyphAsBackgroundColor=function(_){return u(_)||(function(a){return 9472<=a&&a<=9631})(_)},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(_,a,p=0){return(_-(2*Math.round(a)-p))%(2*Math.round(a))}},6052:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(_,a,p,w=!1){if(this.selectionStart=a,this.selectionEnd=p,!a||!p||a[0]===p[0]&&a[1]===p[1])return void this.clear();const y=_.buffers.active.ydisp,o=a[1]-y,r=p[1]-y,h=Math.max(o,0),c=Math.min(r,_.rows-1);h>=_.rows||c<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=o,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=c,this.startCol=a[0],this.endCol=p[0])}isCellSelected(_,a,p){return!!this.hasSelection&&(p-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?a>=this.startCol&&p>=this.viewportCappedStartRow&&a<this.endCol&&p<=this.viewportCappedEndRow:a<this.startCol&&p>=this.viewportCappedStartRow&&a>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol)}}n.createSelectionRenderModel=function(){return new u}},456:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionModel=void 0,n.SelectionModel=class{constructor(u){this._bufferService=u,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,f=this.selectionEnd;return!(!u||!f)&&(u[1]>f[1]||u[1]===f[1]&&u[0]>f[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(j,n,u){var f=this&&this.__decorate||function(c,l,S,x){var v,b=arguments.length,m=b<3?l:x===null?x=Object.getOwnPropertyDescriptor(l,S):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(c,l,S,x);else for(var C=c.length-1;C>=0;C--)(v=c[C])&&(m=(b<3?v(m):b>3?v(l,S,m):v(l,S))||m);return b>3&&m&&Object.defineProperty(l,S,m),m},_=this&&this.__param||function(c,l){return function(S,x){l(S,x,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharSizeService=void 0;const a=u(2585),p=u(8460),w=u(844);let y=n.CharSizeService=class extends w.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(c,l,S){super(),this._optionsService=S,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new h(this._optionsService))}catch{this._measureStrategy=this.register(new r(c,l,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const c=this._measureStrategy.measure();c.width===this.width&&c.height===this.height||(this.width=c.width,this.height=c.height,this._onCharSizeChange.fire())}};n.CharSizeService=y=f([_(2,a.IOptionsService)],y);class o extends w.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(l,S){l!==void 0&&l>0&&S!==void 0&&S>0&&(this._result.width=l,this._result.height=S)}}class r extends o{constructor(l,S,x){super(),this._document=l,this._parentElement=S,this._optionsService=x,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 h extends o{constructor(l){super(),this._optionsService=l,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const S=this._ctx.measureText("W");if(!("width"in S&&"fontBoundingBoxAscent"in S&&"fontBoundingBoxDescent"in S))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const l=this._ctx.measureText("W");return this._validateAndSet(l.width,l.fontBoundingBoxAscent+l.fontBoundingBoxDescent),this._result}}},4269:function(j,n,u){var f=this&&this.__decorate||function(h,c,l,S){var x,v=arguments.length,b=v<3?c:S===null?S=Object.getOwnPropertyDescriptor(c,l):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(h,c,l,S);else for(var m=h.length-1;m>=0;m--)(x=h[m])&&(b=(v<3?x(b):v>3?x(c,l,b):x(c,l))||b);return v>3&&b&&Object.defineProperty(c,l,b),b},_=this&&this.__param||function(h,c){return function(l,S){c(l,S,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const a=u(3734),p=u(643),w=u(511),y=u(2585);class o extends a.AttributeData{constructor(c,l,S){super(),this.content=0,this.combinedData="",this.fg=c.fg,this.bg=c.bg,this.combinedData=l,this._width=S}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(c){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.JoinedCellData=o;let r=n.CharacterJoinerService=class cf{constructor(c){this._bufferService=c,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(c){const l={id:this._nextCharacterJoinerId++,handler:c};return this._characterJoiners.push(l),l.id}deregister(c){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===c)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(c){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(c);if(!l||l.length===0)return[];const S=[],x=l.translateToString(!0);let v=0,b=0,m=0,C=l.getFg(0),L=l.getBg(0);for(let M=0;M<l.getTrimmedLength();M++)if(l.loadCell(M,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==C||this._workCell.bg!==L){if(M-v>1){const E=this._getJoinedRanges(x,m,b,l,v);for(let R=0;R<E.length;R++)S.push(E[R])}v=M,m=b,C=this._workCell.fg,L=this._workCell.bg}b+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-v>1){const M=this._getJoinedRanges(x,m,b,l,v);for(let E=0;E<M.length;E++)S.push(M[E])}return S}_getJoinedRanges(c,l,S,x,v){const b=c.substring(l,S);let m=[];try{m=this._characterJoiners[0].handler(b)}catch(C){console.error(C)}for(let C=1;C<this._characterJoiners.length;C++)try{const L=this._characterJoiners[C].handler(b);for(let M=0;M<L.length;M++)cf._mergeRanges(m,L[M])}catch(L){console.error(L)}return this._stringRangesToCellRanges(m,x,v),m}_stringRangesToCellRanges(c,l,S){let x=0,v=!1,b=0,m=c[x];if(m){for(let C=S;C<this._bufferService.cols;C++){const L=l.getWidth(C),M=l.getString(C).length||p.WHITESPACE_CELL_CHAR.length;if(L!==0){if(!v&&m[0]<=b&&(m[0]=C,v=!0),m[1]<=b){if(m[1]=C,m=c[++x],!m)break;m[0]<=b?(m[0]=C,v=!0):v=!1}b+=M}}m&&(m[1]=this._bufferService.cols)}}static _mergeRanges(c,l){let S=!1;for(let x=0;x<c.length;x++){const v=c[x];if(S){if(l[1]<=v[0])return c[x-1][1]=l[1],c;if(l[1]<=v[1])return c[x-1][1]=Math.max(l[1],v[1]),c.splice(x,1),c;c.splice(x,1),x--}else{if(l[1]<=v[0])return c.splice(x,0,l),c;if(l[1]<=v[1])return v[0]=Math.min(l[0],v[0]),c;l[0]<v[1]&&(v[0]=Math.min(l[0],v[0]),S=!0)}}return S?c[c.length-1][1]=l[1]:c.push(l),c}};n.CharacterJoinerService=r=f([_(0,y.IBufferService)],r)},5114:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreBrowserService=void 0;const f=u(844),_=u(8460),a=u(3656);class p extends f.Disposable{constructor(o,r,h){super(),this._textarea=o,this._window=r,this.mainDocument=h,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new w(this._window),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new _.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((c=>this._screenDprMonitor.setWindow(c)))),this.register((0,_.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(o){this._window!==o&&(this._window=o,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=p;class w extends f.Disposable{constructor(o){super(),this._parentWindow=o,this._windowResizeListener=this.register(new f.MutableDisposable),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,f.toDisposable)((()=>this.clearListener())))}setWindow(o){this._parentWindow=o,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,a.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var o;this._outerListener&&((o=this._resolutionMediaMatchList)==null||o.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:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkProviderService=void 0;const f=u(844);class _ extends f.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,f.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const w=this.linkProviders.indexOf(p);w!==-1&&this.linkProviders.splice(w,1)}}}}n.LinkProviderService=_},8934:function(j,n,u){var f=this&&this.__decorate||function(y,o,r,h){var c,l=arguments.length,S=l<3?o:h===null?h=Object.getOwnPropertyDescriptor(o,r):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(y,o,r,h);else for(var x=y.length-1;x>=0;x--)(c=y[x])&&(S=(l<3?c(S):l>3?c(o,r,S):c(o,r))||S);return l>3&&S&&Object.defineProperty(o,r,S),S},_=this&&this.__param||function(y,o){return function(r,h){o(r,h,y)}};Object.defineProperty(n,"__esModule",{value:!0}),n.MouseService=void 0;const a=u(4725),p=u(9806);let w=n.MouseService=class{constructor(y,o){this._renderService=y,this._charSizeService=o}getCoords(y,o,r,h,c){return(0,p.getCoords)(window,y,o,r,h,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,c)}getMouseReportCoords(y,o){const r=(0,p.getCoordsRelativeToElement)(window,y,o);if(this._charSizeService.hasValidSize)return r[0]=Math.min(Math.max(r[0],0),this._renderService.dimensions.css.canvas.width-1),r[1]=Math.min(Math.max(r[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(r[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(r[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(r[0]),y:Math.floor(r[1])}}};n.MouseService=w=f([_(0,a.IRenderService),_(1,a.ICharSizeService)],w)},3230:function(j,n,u){var f=this&&this.__decorate||function(c,l,S,x){var v,b=arguments.length,m=b<3?l:x===null?x=Object.getOwnPropertyDescriptor(l,S):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(c,l,S,x);else for(var C=c.length-1;C>=0;C--)(v=c[C])&&(m=(b<3?v(m):b>3?v(l,S,m):v(l,S))||m);return b>3&&m&&Object.defineProperty(l,S,m),m},_=this&&this.__param||function(c,l){return function(S,x){l(S,x,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.RenderService=void 0;const a=u(6193),p=u(4725),w=u(8460),y=u(844),o=u(7226),r=u(2585);let h=n.RenderService=class extends y.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(c,l,S,x,v,b,m,C){super(),this._rowCount=c,this._charSizeService=x,this._renderer=this.register(new y.MutableDisposable),this._pausedResizeTask=new o.DebouncedIdleTask,this._observerDisposable=this.register(new y.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 w.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new w.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new w.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new w.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new a.RenderDebouncer(((L,M)=>this._renderRows(L,M)),m),this.register(this._renderDebouncer),this.register(m.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(b.onResize((()=>this._fullRefresh()))),this.register(b.buffers.onBufferActivate((()=>{var L;return(L=this._renderer.value)==null?void 0:L.clear()}))),this.register(S.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(v.onDecorationRegistered((()=>this._fullRefresh()))),this.register(v.onDecorationRemoved((()=>this._fullRefresh()))),this.register(S.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(b.cols,b.rows),this._fullRefresh()}))),this.register(S.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(b.buffer.y,b.buffer.y,!0)))),this.register(C.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(m.window,l),this.register(m.onWindowChange((L=>this._registerIntersectionObserver(L,l))))}_registerIntersectionObserver(c,l){if("IntersectionObserver"in c){const S=new c.IntersectionObserver((x=>this._handleIntersectionChange(x[x.length-1])),{threshold:0});S.observe(l),this._observerDisposable.value=(0,y.toDisposable)((()=>S.disconnect()))}}_handleIntersectionChange(c){this._isPaused=c.isIntersecting===void 0?c.intersectionRatio===0:!c.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(c,l,S=!1){this._isPaused?this._needsFullRefresh=!0:(S||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(c,l,this._rowCount))}_renderRows(c,l){this._renderer.value&&(c=Math.min(c,this._rowCount-1),l=Math.min(l,this._rowCount-1),this._renderer.value.renderRows(c,l),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:c,end:l}),this._onRender.fire({start:c,end:l}),this._isNextRenderRedrawOnly=!0)}resize(c,l){this._rowCount=l,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(c){this._renderer.value=c,this._renderer.value&&(this._renderer.value.onRequestRedraw((l=>this.refreshRows(l.start,l.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(c){return this._renderDebouncer.addRefreshCallback(c)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var c,l;this._renderer.value&&((l=(c=this._renderer.value).clearTextureAtlas)==null||l.call(c),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(c,l){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var S;return(S=this._renderer.value)==null?void 0:S.handleResize(c,l)})):this._renderer.value.handleResize(c,l),this._fullRefresh())}handleCharSizeChanged(){var c;(c=this._renderer.value)==null||c.handleCharSizeChanged()}handleBlur(){var c;(c=this._renderer.value)==null||c.handleBlur()}handleFocus(){var c;(c=this._renderer.value)==null||c.handleFocus()}handleSelectionChanged(c,l,S){var x;this._selectionState.start=c,this._selectionState.end=l,this._selectionState.columnSelectMode=S,(x=this._renderer.value)==null||x.handleSelectionChanged(c,l,S)}handleCursorMove(){var c;(c=this._renderer.value)==null||c.handleCursorMove()}clear(){var c;(c=this._renderer.value)==null||c.clear()}};n.RenderService=h=f([_(2,r.IOptionsService),_(3,p.ICharSizeService),_(4,r.IDecorationService),_(5,r.IBufferService),_(6,p.ICoreBrowserService),_(7,p.IThemeService)],h)},9312:function(j,n,u){var f=this&&this.__decorate||function(m,C,L,M){var E,R=arguments.length,B=R<3?C:M===null?M=Object.getOwnPropertyDescriptor(C,L):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(m,C,L,M);else for(var $=m.length-1;$>=0;$--)(E=m[$])&&(B=(R<3?E(B):R>3?E(C,L,B):E(C,L))||B);return R>3&&B&&Object.defineProperty(C,L,B),B},_=this&&this.__param||function(m,C){return function(L,M){C(L,M,m)}};Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionService=void 0;const a=u(9806),p=u(9504),w=u(456),y=u(4725),o=u(8460),r=u(844),h=u(6114),c=u(4841),l=u(511),S=u(2585),x=" ",v=new RegExp(x,"g");let b=n.SelectionService=class extends r.Disposable{constructor(m,C,L,M,E,R,B,$,N){super(),this._element=m,this._screenElement=C,this._linkifier=L,this._bufferService=M,this._coreService=E,this._mouseService=R,this._optionsService=B,this._renderService=$,this._coreBrowserService=N,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new l.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new o.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new o.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new o.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new o.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=I=>this._handleMouseMove(I),this._mouseUpListener=I=>this._handleMouseUp(I),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((I=>this._handleTrim(I))),this.register(this._bufferService.buffers.onBufferActivate((I=>this._handleBufferActivate(I)))),this.enable(),this._model=new w.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,r.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 m=this._model.finalSelectionStart,C=this._model.finalSelectionEnd;return!(!m||!C||m[0]===C[0]&&m[1]===C[1])}get selectionText(){const m=this._model.finalSelectionStart,C=this._model.finalSelectionEnd;if(!m||!C)return"";const L=this._bufferService.buffer,M=[];if(this._activeSelectionMode===3){if(m[0]===C[0])return"";const E=m[0]<C[0]?m[0]:C[0],R=m[0]<C[0]?C[0]:m[0];for(let B=m[1];B<=C[1];B++){const $=L.translateBufferLineToString(B,!0,E,R);M.push($)}}else{const E=m[1]===C[1]?C[0]:void 0;M.push(L.translateBufferLineToString(m[1],!0,m[0],E));for(let R=m[1]+1;R<=C[1]-1;R++){const B=L.lines.get(R),$=L.translateBufferLineToString(R,!0);B!=null&&B.isWrapped?M[M.length-1]+=$:M.push($)}if(m[1]!==C[1]){const R=L.lines.get(C[1]),B=L.translateBufferLineToString(C[1],!0,0,C[0]);R&&R.isWrapped?M[M.length-1]+=B:M.push(B)}}return M.map((E=>E.replace(v," "))).join(h.isWindows?`\r
54
54
  `:`
55
- `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(m){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),h.isLinux&&m&&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(m){const C=this._getMouseBufferCoords(m),L=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;return!!(L&&A&&C)&&this._areCoordsInSelection(C,L,A)}isCellInSelection(m,C){const L=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;return!(!L||!A)&&this._areCoordsInSelection([m,C],L,A)}_areCoordsInSelection(m,C,L){return m[1]>C[1]&&m[1]<L[1]||C[1]===L[1]&&m[1]===C[1]&&m[0]>=C[0]&&m[0]<L[0]||C[1]<L[1]&&m[1]===L[1]&&m[0]<L[0]||C[1]<L[1]&&m[1]===C[1]&&m[0]>=C[0]}_selectWordAtCursor(m,C){var E,D;const L=(D=(E=this._linkifier.currentLink)==null?void 0:E.link)==null?void 0:D.range;if(L)return this._model.selectionStart=[L.start.x-1,L.start.y-1],this._model.selectionStartLength=(0,o.getRangeLength)(L,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const A=this._getMouseBufferCoords(m);return!!A&&(this._selectWordAt(A,C),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(m,C){this._model.clearSelection(),m=Math.max(m,0),C=Math.min(C,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,m],this._model.selectionEnd=[this._bufferService.cols,C],this.refresh(),this._onSelectionChange.fire()}_handleTrim(m){this._model.handleTrim(m)&&this.refresh()}_getMouseBufferCoords(m){const C=this._mouseService.getCoords(m,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(C)return C[0]--,C[1]--,C[1]+=this._bufferService.buffer.ydisp,C}_getMouseEventScrollAmount(m){let C=(0,a.getCoordsRelativeToElement)(this._coreBrowserService.window,m,this._screenElement)[1];const L=this._renderService.dimensions.css.canvas.height;return C>=0&&C<=L?0:(C>L&&(C-=L),C=Math.min(Math.max(C,-50),50),C/=50,C/Math.abs(C)+Math.round(14*C))}shouldForceSelection(m){return h.isMac?m.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:m.shiftKey}handleMouseDown(m){if(this._mouseDownTimeStamp=m.timeStamp,(m.button!==2||!this.hasSelection)&&m.button===0){if(!this._enabled){if(!this.shouldForceSelection(m))return;m.stopPropagation()}m.preventDefault(),this._dragScrollAmount=0,this._enabled&&m.shiftKey?this._handleIncrementalClick(m):m.detail===1?this._handleSingleClick(m):m.detail===2?this._handleDoubleClick(m):m.detail===3&&this._handleTripleClick(m),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(m){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(m))}_handleSingleClick(m){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(m)?3:0,this._model.selectionStart=this._getMouseBufferCoords(m),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const C=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);C&&C.length!==this._model.selectionStart[0]&&C.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(m){this._selectWordAtCursor(m,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(m){const C=this._getMouseBufferCoords(m);C&&(this._activeSelectionMode=2,this._selectLineAt(C[1]))}shouldColumnSelect(m){return m.altKey&&!(h.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(m){if(m.stopImmediatePropagation(),!this._model.selectionStart)return;const C=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(m),!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(m),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const L=this._bufferService.buffer;if(this._model.selectionEnd[1]<L.lines.length){const A=L.lines.get(this._model.selectionEnd[1]);A&&A.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}C&&C[0]===this._model.selectionEnd[0]&&C[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 m=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(m.ydisp+this._bufferService.rows,m.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=m.ydisp),this.refresh()}}_handleMouseUp(m){const C=m.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&C<500&&m.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const L=this._mouseService.getCoords(m,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(L&&L[0]!==void 0&&L[1]!==void 0){const A=(0,p.moveToCellSequence)(L[0]-1,L[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(A,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const m=this._model.finalSelectionStart,C=this._model.finalSelectionEnd,L=!(!m||!C||m[0]===C[0]&&m[1]===C[1]);L?m&&C&&(this._oldSelectionStart&&this._oldSelectionEnd&&m[0]===this._oldSelectionStart[0]&&m[1]===this._oldSelectionStart[1]&&C[0]===this._oldSelectionEnd[0]&&C[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(m,C,L)):this._oldHasSelection&&this._fireOnSelectionChange(m,C,L)}_fireOnSelectionChange(m,C,L){this._oldSelectionStart=m,this._oldSelectionEnd=C,this._oldHasSelection=L,this._onSelectionChange.fire()}_handleBufferActivate(m){this.clearSelection(),this._trimListener.dispose(),this._trimListener=m.activeBuffer.lines.onTrim((C=>this._handleTrim(C)))}_convertViewportColToCharacterIndex(m,C){let L=C;for(let A=0;C>=A;A++){const E=m.loadCell(A,this._workCell).getChars().length;this._workCell.getWidth()===0?L--:E>1&&C!==A&&(L+=E-1)}return L}setSelection(m,C,L){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[m,C],this._model.selectionStartLength=L,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(m){this._isClickInSelection(m)||(this._selectWordAtCursor(m,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(m,C,L=!0,A=!0){if(m[0]>=this._bufferService.cols)return;const E=this._bufferService.buffer,D=E.lines.get(m[1]);if(!D)return;const O=E.translateBufferLineToString(m[1],!1);let F=this._convertViewportColToCharacterIndex(D,m[0]),N=F;const I=m[0]-F;let P=0,R=0,B=0,T=0;if(O.charAt(F)===" "){for(;F>0&&O.charAt(F-1)===" ";)F--;for(;N<O.length&&O.charAt(N+1)===" ";)N++}else{let Q=m[0],ue=m[0];D.getWidth(Q)===0&&(P++,Q--),D.getWidth(ue)===2&&(R++,ue++);const de=D.getString(ue).length;for(de>1&&(T+=de-1,N+=de-1);Q>0&&F>0&&!this._isCharWordSeparator(D.loadCell(Q-1,this._workCell));){D.loadCell(Q-1,this._workCell);const q=this._workCell.getChars().length;this._workCell.getWidth()===0?(P++,Q--):q>1&&(B+=q-1,F-=q-1),F--,Q--}for(;ue<D.length&&N+1<O.length&&!this._isCharWordSeparator(D.loadCell(ue+1,this._workCell));){D.loadCell(ue+1,this._workCell);const q=this._workCell.getChars().length;this._workCell.getWidth()===2?(R++,ue++):q>1&&(T+=q-1,N+=q-1),N++,ue++}}N++;let H=F+I-P+B,V=Math.min(this._bufferService.cols,N-F+P+R-B-T);if(C||O.slice(F,N).trim()!==""){if(L&&H===0&&D.getCodePoint(0)!==32){const Q=E.lines.get(m[1]-1);if(Q&&D.isWrapped&&Q.getCodePoint(this._bufferService.cols-1)!==32){const ue=this._getWordAt([this._bufferService.cols-1,m[1]-1],!1,!0,!1);if(ue){const de=this._bufferService.cols-ue.start;H-=de,V+=de}}}if(A&&H+V===this._bufferService.cols&&D.getCodePoint(this._bufferService.cols-1)!==32){const Q=E.lines.get(m[1]+1);if(Q!=null&&Q.isWrapped&&Q.getCodePoint(0)!==32){const ue=this._getWordAt([0,m[1]+1],!1,!1,!0);ue&&(V+=ue.length)}}return{start:H,length:V}}}_selectWordAt(m,C){const L=this._getWordAt(m,C);if(L){for(;L.start<0;)L.start+=this._bufferService.cols,m[1]--;this._model.selectionStart=[L.start,m[1]],this._model.selectionStartLength=L.length}}_selectToWordAt(m){const C=this._getWordAt(m,!0);if(C){let L=m[1];for(;C.start<0;)C.start+=this._bufferService.cols,L--;if(!this._model.areSelectionValuesReversed())for(;C.start+C.length>this._bufferService.cols;)C.length-=this._bufferService.cols,L++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?C.start:C.start+C.length,L]}}_isCharWordSeparator(m){return m.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(m.getChars())>=0}_selectLineAt(m){const C=this._bufferService.buffer.getWrappedRangeForLine(m),L={start:{x:0,y:C.first},end:{x:this._bufferService.cols-1,y:C.last}};this._model.selectionStart=[0,C.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,o.getRangeLength)(L,this._bufferService.cols)}};n.SelectionService=y=f([_(3,S.IBufferService),_(4,S.ICoreService),_(5,w.IMouseService),_(6,S.IOptionsService),_(7,w.IRenderService),_(8,w.ICoreBrowserService)],y)},4725:($,n,u)=>{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 f=u(8343);n.ICharSizeService=(0,f.createDecorator)("CharSizeService"),n.ICoreBrowserService=(0,f.createDecorator)("CoreBrowserService"),n.IMouseService=(0,f.createDecorator)("MouseService"),n.IRenderService=(0,f.createDecorator)("RenderService"),n.ISelectionService=(0,f.createDecorator)("SelectionService"),n.ICharacterJoinerService=(0,f.createDecorator)("CharacterJoinerService"),n.IThemeService=(0,f.createDecorator)("ThemeService"),n.ILinkProviderService=(0,f.createDecorator)("LinkProviderService")},6731:function($,n,u){var f=this&&this.__decorate||function(y,m,C,L){var A,E=arguments.length,D=E<3?m:L===null?L=Object.getOwnPropertyDescriptor(m,C):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(y,m,C,L);else for(var O=y.length-1;O>=0;O--)(A=y[O])&&(D=(E<3?A(D):E>3?A(m,C,D):A(m,C))||D);return E>3&&D&&Object.defineProperty(m,C,D),D},_=this&&this.__param||function(y,m){return function(C,L){m(C,L,y)}};Object.defineProperty(n,"__esModule",{value:!0}),n.ThemeService=n.DEFAULT_ANSI_COLORS=void 0;const a=u(7239),p=u(8055),b=u(8460),w=u(844),c=u(2585),r=p.css.toColor("#ffffff"),h=p.css.toColor("#000000"),o=p.css.toColor("#ffffff"),l=p.css.toColor("#000000"),S={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};n.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const y=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],m=[0,95,135,175,215,255];for(let C=0;C<216;C++){const L=m[C/36%6|0],A=m[C/6%6|0],E=m[C%6];y.push({css:p.channels.toCss(L,A,E),rgba:p.channels.toRgba(L,A,E)})}for(let C=0;C<24;C++){const L=8+10*C;y.push({css:p.channels.toCss(L,L,L),rgba:p.channels.toRgba(L,L,L)})}return y})());let x=n.ThemeService=class extends w.Disposable{get colors(){return this._colors}constructor(y){super(),this._optionsService=y,this._contrastCache=new a.ColorContrastCache,this._halfContrastCache=new a.ColorContrastCache,this._onChangeColors=this.register(new b.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:r,background:h,cursor:o,cursorAccent:l,selectionForeground:void 0,selectionBackgroundTransparent:S,selectionBackgroundOpaque:p.color.blend(h,S),selectionInactiveBackgroundTransparent:S,selectionInactiveBackgroundOpaque:p.color.blend(h,S),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(y={}){const m=this._colors;if(m.foreground=v(y.foreground,r),m.background=v(y.background,h),m.cursor=v(y.cursor,o),m.cursorAccent=v(y.cursorAccent,l),m.selectionBackgroundTransparent=v(y.selectionBackground,S),m.selectionBackgroundOpaque=p.color.blend(m.background,m.selectionBackgroundTransparent),m.selectionInactiveBackgroundTransparent=v(y.selectionInactiveBackground,m.selectionBackgroundTransparent),m.selectionInactiveBackgroundOpaque=p.color.blend(m.background,m.selectionInactiveBackgroundTransparent),m.selectionForeground=y.selectionForeground?v(y.selectionForeground,p.NULL_COLOR):void 0,m.selectionForeground===p.NULL_COLOR&&(m.selectionForeground=void 0),p.color.isOpaque(m.selectionBackgroundTransparent)&&(m.selectionBackgroundTransparent=p.color.opacity(m.selectionBackgroundTransparent,.3)),p.color.isOpaque(m.selectionInactiveBackgroundTransparent)&&(m.selectionInactiveBackgroundTransparent=p.color.opacity(m.selectionInactiveBackgroundTransparent,.3)),m.ansi=n.DEFAULT_ANSI_COLORS.slice(),m.ansi[0]=v(y.black,n.DEFAULT_ANSI_COLORS[0]),m.ansi[1]=v(y.red,n.DEFAULT_ANSI_COLORS[1]),m.ansi[2]=v(y.green,n.DEFAULT_ANSI_COLORS[2]),m.ansi[3]=v(y.yellow,n.DEFAULT_ANSI_COLORS[3]),m.ansi[4]=v(y.blue,n.DEFAULT_ANSI_COLORS[4]),m.ansi[5]=v(y.magenta,n.DEFAULT_ANSI_COLORS[5]),m.ansi[6]=v(y.cyan,n.DEFAULT_ANSI_COLORS[6]),m.ansi[7]=v(y.white,n.DEFAULT_ANSI_COLORS[7]),m.ansi[8]=v(y.brightBlack,n.DEFAULT_ANSI_COLORS[8]),m.ansi[9]=v(y.brightRed,n.DEFAULT_ANSI_COLORS[9]),m.ansi[10]=v(y.brightGreen,n.DEFAULT_ANSI_COLORS[10]),m.ansi[11]=v(y.brightYellow,n.DEFAULT_ANSI_COLORS[11]),m.ansi[12]=v(y.brightBlue,n.DEFAULT_ANSI_COLORS[12]),m.ansi[13]=v(y.brightMagenta,n.DEFAULT_ANSI_COLORS[13]),m.ansi[14]=v(y.brightCyan,n.DEFAULT_ANSI_COLORS[14]),m.ansi[15]=v(y.brightWhite,n.DEFAULT_ANSI_COLORS[15]),y.extendedAnsi){const C=Math.min(m.ansi.length-16,y.extendedAnsi.length);for(let L=0;L<C;L++)m.ansi[L+16]=v(y.extendedAnsi[L],n.DEFAULT_ANSI_COLORS[L+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(y){this._restoreColor(y),this._onChangeColors.fire(this.colors)}_restoreColor(y){if(y!==void 0)switch(y){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[y]=this._restoreColors.ansi[y]}else for(let m=0;m<this._restoreColors.ansi.length;++m)this._colors.ansi[m]=this._restoreColors.ansi[m]}modifyColors(y){y(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 v(y,m){if(y!==void 0)try{return p.css.toColor(y)}catch{}return m}n.ThemeService=x=f([_(0,c.IOptionsService)],x)},6349:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CircularList=void 0;const f=u(8460),_=u(844);class a extends _.Disposable{constructor(b){super(),this._maxLength=b,this.onDeleteEmitter=this.register(new f.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new f.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new f.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(b){if(this._maxLength===b)return;const w=new Array(b);for(let c=0;c<Math.min(b,this.length);c++)w[c]=this._array[this._getCyclicIndex(c)];this._array=w,this._maxLength=b,this._startIndex=0}get length(){return this._length}set length(b){if(b>this._length)for(let w=this._length;w<b;w++)this._array[w]=void 0;this._length=b}get(b){return this._array[this._getCyclicIndex(b)]}set(b,w){this._array[this._getCyclicIndex(b)]=w}push(b){this._array[this._getCyclicIndex(this._length)]=b,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(b,w,...c){if(w){for(let r=b;r<this._length-w;r++)this._array[this._getCyclicIndex(r)]=this._array[this._getCyclicIndex(r+w)];this._length-=w,this.onDeleteEmitter.fire({index:b,amount:w})}for(let r=this._length-1;r>=b;r--)this._array[this._getCyclicIndex(r+c.length)]=this._array[this._getCyclicIndex(r)];for(let r=0;r<c.length;r++)this._array[this._getCyclicIndex(b+r)]=c[r];if(c.length&&this.onInsertEmitter.fire({index:b,amount:c.length}),this._length+c.length>this._maxLength){const r=this._length+c.length-this._maxLength;this._startIndex+=r,this._length=this._maxLength,this.onTrimEmitter.fire(r)}else this._length+=c.length}trimStart(b){b>this._length&&(b=this._length),this._startIndex+=b,this._length-=b,this.onTrimEmitter.fire(b)}shiftElements(b,w,c){if(!(w<=0)){if(b<0||b>=this._length)throw new Error("start argument out of range");if(b+c<0)throw new Error("Cannot shift elements in list beyond index 0");if(c>0){for(let h=w-1;h>=0;h--)this.set(b+h+c,this.get(b+h));const r=b+w+c-this._length;if(r>0)for(this._length+=r;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let r=0;r<w;r++)this.set(b+r+c,this.get(b+r))}}_getCyclicIndex(b){return(this._startIndex+b)%this._maxLength}}n.CircularList=a},1439:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.clone=void 0,n.clone=function u(f,_=5){if(typeof f!="object")return f;const a=Array.isArray(f)?[]:{};for(const p in f)a[p]=_<=1?f[p]:f[p]&&u(f[p],_-1);return a}},8055:($,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 u=0,f=0,_=0,a=0;var p,b,w,c,r;function h(l){const S=l.toString(16);return S.length<2?"0"+S:S}function o(l,S){return l<S?(S+.05)/(l+.05):(l+.05)/(S+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(S,x,v,y){return y!==void 0?`#${h(S)}${h(x)}${h(v)}${h(y)}`:`#${h(S)}${h(x)}${h(v)}`},l.toRgba=function(S,x,v,y=255){return(S<<24|x<<16|v<<8|y)>>>0},l.toColor=function(S,x,v,y){return{css:l.toCss(S,x,v,y),rgba:l.toRgba(S,x,v,y)}}})(p||(n.channels=p={})),(function(l){function S(x,v){return a=Math.round(255*v),[u,f,_]=r.toChannels(x.rgba),{css:p.toCss(u,f,_,a),rgba:p.toRgba(u,f,_,a)}}l.blend=function(x,v){if(a=(255&v.rgba)/255,a===1)return{css:v.css,rgba:v.rgba};const y=v.rgba>>24&255,m=v.rgba>>16&255,C=v.rgba>>8&255,L=x.rgba>>24&255,A=x.rgba>>16&255,E=x.rgba>>8&255;return u=L+Math.round((y-L)*a),f=A+Math.round((m-A)*a),_=E+Math.round((C-E)*a),{css:p.toCss(u,f,_),rgba:p.toRgba(u,f,_)}},l.isOpaque=function(x){return(255&x.rgba)==255},l.ensureContrastRatio=function(x,v,y){const m=r.ensureContrastRatio(x.rgba,v.rgba,y);if(m)return p.toColor(m>>24&255,m>>16&255,m>>8&255)},l.opaque=function(x){const v=(255|x.rgba)>>>0;return[u,f,_]=r.toChannels(v),{css:p.toCss(u,f,_),rgba:v}},l.opacity=S,l.multiplyOpacity=function(x,v){return a=255&x.rgba,S(x,a*v/255)},l.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(b||(n.color=b={})),(function(l){let S,x;try{const v=document.createElement("canvas");v.width=1,v.height=1;const y=v.getContext("2d",{willReadFrequently:!0});y&&(S=y,S.globalCompositeOperation="copy",x=S.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(v){if(v.match(/#[\da-f]{3,8}/i))switch(v.length){case 4:return u=parseInt(v.slice(1,2).repeat(2),16),f=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),p.toColor(u,f,_);case 5:return u=parseInt(v.slice(1,2).repeat(2),16),f=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),a=parseInt(v.slice(4,5).repeat(2),16),p.toColor(u,f,_,a);case 7:return{css:v,rgba:(parseInt(v.slice(1),16)<<8|255)>>>0};case 9:return{css:v,rgba:parseInt(v.slice(1),16)>>>0}}const y=v.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(y)return u=parseInt(y[1]),f=parseInt(y[2]),_=parseInt(y[3]),a=Math.round(255*(y[5]===void 0?1:parseFloat(y[5]))),p.toColor(u,f,_,a);if(!S||!x)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=x,S.fillStyle=v,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[u,f,_,a]=S.getImageData(0,0,1,1).data,a!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(u,f,_,a),css:v}}})(w||(n.css=w={})),(function(l){function S(x,v,y){const m=x/255,C=v/255,L=y/255;return .2126*(m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4))+.7152*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}l.relativeLuminance=function(x){return S(x>>16&255,x>>8&255,255&x)},l.relativeLuminance2=S})(c||(n.rgb=c={})),(function(l){function S(v,y,m){const C=v>>24&255,L=v>>16&255,A=v>>8&255;let E=y>>24&255,D=y>>16&255,O=y>>8&255,F=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));for(;F<m&&(E>0||D>0||O>0);)E-=Math.max(0,Math.ceil(.1*E)),D-=Math.max(0,Math.ceil(.1*D)),O-=Math.max(0,Math.ceil(.1*O)),F=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));return(E<<24|D<<16|O<<8|255)>>>0}function x(v,y,m){const C=v>>24&255,L=v>>16&255,A=v>>8&255;let E=y>>24&255,D=y>>16&255,O=y>>8&255,F=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));for(;F<m&&(E<255||D<255||O<255);)E=Math.min(255,E+Math.ceil(.1*(255-E))),D=Math.min(255,D+Math.ceil(.1*(255-D))),O=Math.min(255,O+Math.ceil(.1*(255-O))),F=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));return(E<<24|D<<16|O<<8|255)>>>0}l.blend=function(v,y){if(a=(255&y)/255,a===1)return y;const m=y>>24&255,C=y>>16&255,L=y>>8&255,A=v>>24&255,E=v>>16&255,D=v>>8&255;return u=A+Math.round((m-A)*a),f=E+Math.round((C-E)*a),_=D+Math.round((L-D)*a),p.toRgba(u,f,_)},l.ensureContrastRatio=function(v,y,m){const C=c.relativeLuminance(v>>8),L=c.relativeLuminance(y>>8);if(o(C,L)<m){if(L<C){const D=S(v,y,m),O=o(C,c.relativeLuminance(D>>8));if(O<m){const F=x(v,y,m);return O>o(C,c.relativeLuminance(F>>8))?D:F}return D}const A=x(v,y,m),E=o(C,c.relativeLuminance(A>>8));if(E<m){const D=S(v,y,m);return E>o(C,c.relativeLuminance(D>>8))?A:D}return A}},l.reduceLuminance=S,l.increaseLuminance=x,l.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=o},8969:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreTerminal=void 0;const f=u(844),_=u(2585),a=u(4348),p=u(7866),b=u(744),w=u(7302),c=u(6975),r=u(8460),h=u(1753),o=u(1480),l=u(7994),S=u(9282),x=u(5435),v=u(5981),y=u(2660);let m=!1;class C extends f.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new r.EventEmitter),this._onScroll.event((A=>{var E;(E=this._onScrollApi)==null||E.fire(A.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(A){for(const E in A)this.optionsService.options[E]=A[E]}constructor(A){super(),this._windowsWrappingHeuristics=this.register(new f.MutableDisposable),this._onBinary=this.register(new r.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new r.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new r.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new r.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new r.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new r.EventEmitter),this._instantiationService=new a.InstantiationService,this.optionsService=this.register(new w.OptionsService(A)),this._instantiationService.setService(_.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(b.BufferService)),this._instantiationService.setService(_.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(_.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(c.CoreService)),this._instantiationService.setService(_.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(h.CoreMouseService)),this._instantiationService.setService(_.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(o.UnicodeService)),this._instantiationService.setService(_.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(l.CharsetService),this._instantiationService.setService(_.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(y.OscLinkService),this._instantiationService.setService(_.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new x.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,r.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,r.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,r.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,r.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((E=>{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((E=>{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 v.WriteBuffer(((E,D)=>this._inputHandler.parse(E,D)))),this.register((0,r.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(A,E){this._writeBuffer.write(A,E)}writeSync(A,E){this._logService.logLevel<=_.LogLevelEnum.WARN&&!m&&(this._logService.warn("writeSync is unreliable and will be removed soon."),m=!0),this._writeBuffer.writeSync(A,E)}input(A,E=!0){this.coreService.triggerDataEvent(A,E)}resize(A,E){isNaN(A)||isNaN(E)||(A=Math.max(A,b.MINIMUM_COLS),E=Math.max(E,b.MINIMUM_ROWS),this._bufferService.resize(A,E))}scroll(A,E=!1){this._bufferService.scroll(A,E)}scrollLines(A,E,D){this._bufferService.scrollLines(A,E,D)}scrollPages(A){this.scrollLines(A*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(A){const E=A-this._bufferService.buffer.ydisp;E!==0&&this.scrollLines(E)}registerEscHandler(A,E){return this._inputHandler.registerEscHandler(A,E)}registerDcsHandler(A,E){return this._inputHandler.registerDcsHandler(A,E)}registerCsiHandler(A,E){return this._inputHandler.registerCsiHandler(A,E)}registerOscHandler(A,E){return this._inputHandler.registerOscHandler(A,E)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let A=!1;const E=this.optionsService.rawOptions.windowsPty;E&&E.buildNumber!==void 0&&E.buildNumber!==void 0?A=E.backend==="conpty"&&E.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(A=!0),A?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const A=[];A.push(this.onLineFeed(S.updateWindowsModeWrappedState.bind(null,this._bufferService))),A.push(this.registerCsiHandler({final:"H"},(()=>((0,S.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,f.toDisposable)((()=>{for(const E of A)E.dispose()}))}}}n.CoreTerminal=C},8460:($,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=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===u)return void this._listeners.splice(f,1)}}})),this._event}fire(u,f){const _=[];for(let a=0;a<this._listeners.length;a++)_.push(this._listeners[a]);for(let a=0;a<_.length;a++)_[a].call(void 0,u,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(u,f){return u((_=>f.fire(_)))},n.runAndSubscribe=function(u,f){return f(void 0),u((_=>f(_)))}},5435:function($,n,u){var f=this&&this.__decorate||function(P,R,B,T){var H,V=arguments.length,Q=V<3?R:T===null?T=Object.getOwnPropertyDescriptor(R,B):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Q=Reflect.decorate(P,R,B,T);else for(var ue=P.length-1;ue>=0;ue--)(H=P[ue])&&(Q=(V<3?H(Q):V>3?H(R,B,Q):H(R,B))||Q);return V>3&&Q&&Object.defineProperty(R,B,Q),Q},_=this&&this.__param||function(P,R){return function(B,T){R(B,T,P)}};Object.defineProperty(n,"__esModule",{value:!0}),n.InputHandler=n.WindowsOptionsReportType=void 0;const a=u(2584),p=u(7116),b=u(2015),w=u(844),c=u(482),r=u(8437),h=u(8460),o=u(643),l=u(511),S=u(3734),x=u(2585),v=u(1480),y=u(6242),m=u(6351),C=u(5941),L={"(":0,")":1,"*":2,"+":3,"-":1,".":2},A=131072;function E(P,R){if(P>24)return R.setWinLines||!1;switch(P){case 1:return!!R.restoreWin;case 2:return!!R.minimizeWin;case 3:return!!R.setWinPosition;case 4:return!!R.setWinSizePixels;case 5:return!!R.raiseWin;case 6:return!!R.lowerWin;case 7:return!!R.refreshWin;case 8:return!!R.setWinSizeChars;case 9:return!!R.maximizeWin;case 10:return!!R.fullscreenWin;case 11:return!!R.getWinState;case 13:return!!R.getWinPosition;case 14:return!!R.getWinSizePixels;case 15:return!!R.getScreenSizePixels;case 16:return!!R.getCellSizePixels;case 18:return!!R.getWinSizeChars;case 19:return!!R.getScreenSizeChars;case 20:return!!R.getIconTitle;case 21:return!!R.getWinTitle;case 22:return!!R.pushTitle;case 23:return!!R.popTitle;case 24:return!!R.setWinLines}return!1}var D;(function(P){P[P.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",P[P.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(D||(n.WindowsOptionsReportType=D={}));let O=0;class F extends w.Disposable{getAttrData(){return this._curAttrData}constructor(R,B,T,H,V,Q,ue,de,q=new b.EscapeSequenceParser){super(),this._bufferService=R,this._charsetService=B,this._coreService=T,this._logService=H,this._optionsService=V,this._oscLinkService=Q,this._coreMouseService=ue,this._unicodeService=de,this._parser=q,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new c.StringToUtf32,this._utf8Decoder=new c.Utf8ToUtf32,this._workCell=new l.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=r.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=r.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new h.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new h.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new h.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new h.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new h.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new h.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new h.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new h.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new h.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new h.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new h.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new h.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((z=>this._activeBuffer=z.activeBuffer))),this._parser.setCsiHandlerFallback(((z,se)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(z),params:se.toArray()})})),this._parser.setEscHandlerFallback((z=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(z)})})),this._parser.setExecuteHandlerFallback((z=>{this._logService.debug("Unknown EXECUTE code: ",{code:z})})),this._parser.setOscHandlerFallback(((z,se,ie)=>{this._logService.debug("Unknown OSC code: ",{identifier:z,action:se,data:ie})})),this._parser.setDcsHandlerFallback(((z,se,ie)=>{se==="HOOK"&&(ie=ie.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(z),action:se,payload:ie})})),this._parser.setPrintHandler(((z,se,ie)=>this.print(z,se,ie))),this._parser.registerCsiHandler({final:"@"},(z=>this.insertChars(z))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(z=>this.scrollLeft(z))),this._parser.registerCsiHandler({final:"A"},(z=>this.cursorUp(z))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(z=>this.scrollRight(z))),this._parser.registerCsiHandler({final:"B"},(z=>this.cursorDown(z))),this._parser.registerCsiHandler({final:"C"},(z=>this.cursorForward(z))),this._parser.registerCsiHandler({final:"D"},(z=>this.cursorBackward(z))),this._parser.registerCsiHandler({final:"E"},(z=>this.cursorNextLine(z))),this._parser.registerCsiHandler({final:"F"},(z=>this.cursorPrecedingLine(z))),this._parser.registerCsiHandler({final:"G"},(z=>this.cursorCharAbsolute(z))),this._parser.registerCsiHandler({final:"H"},(z=>this.cursorPosition(z))),this._parser.registerCsiHandler({final:"I"},(z=>this.cursorForwardTab(z))),this._parser.registerCsiHandler({final:"J"},(z=>this.eraseInDisplay(z,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(z=>this.eraseInDisplay(z,!0))),this._parser.registerCsiHandler({final:"K"},(z=>this.eraseInLine(z,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(z=>this.eraseInLine(z,!0))),this._parser.registerCsiHandler({final:"L"},(z=>this.insertLines(z))),this._parser.registerCsiHandler({final:"M"},(z=>this.deleteLines(z))),this._parser.registerCsiHandler({final:"P"},(z=>this.deleteChars(z))),this._parser.registerCsiHandler({final:"S"},(z=>this.scrollUp(z))),this._parser.registerCsiHandler({final:"T"},(z=>this.scrollDown(z))),this._parser.registerCsiHandler({final:"X"},(z=>this.eraseChars(z))),this._parser.registerCsiHandler({final:"Z"},(z=>this.cursorBackwardTab(z))),this._parser.registerCsiHandler({final:"`"},(z=>this.charPosAbsolute(z))),this._parser.registerCsiHandler({final:"a"},(z=>this.hPositionRelative(z))),this._parser.registerCsiHandler({final:"b"},(z=>this.repeatPrecedingCharacter(z))),this._parser.registerCsiHandler({final:"c"},(z=>this.sendDeviceAttributesPrimary(z))),this._parser.registerCsiHandler({prefix:">",final:"c"},(z=>this.sendDeviceAttributesSecondary(z))),this._parser.registerCsiHandler({final:"d"},(z=>this.linePosAbsolute(z))),this._parser.registerCsiHandler({final:"e"},(z=>this.vPositionRelative(z))),this._parser.registerCsiHandler({final:"f"},(z=>this.hVPosition(z))),this._parser.registerCsiHandler({final:"g"},(z=>this.tabClear(z))),this._parser.registerCsiHandler({final:"h"},(z=>this.setMode(z))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(z=>this.setModePrivate(z))),this._parser.registerCsiHandler({final:"l"},(z=>this.resetMode(z))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(z=>this.resetModePrivate(z))),this._parser.registerCsiHandler({final:"m"},(z=>this.charAttributes(z))),this._parser.registerCsiHandler({final:"n"},(z=>this.deviceStatus(z))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(z=>this.deviceStatusPrivate(z))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(z=>this.softReset(z))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(z=>this.setCursorStyle(z))),this._parser.registerCsiHandler({final:"r"},(z=>this.setScrollRegion(z))),this._parser.registerCsiHandler({final:"s"},(z=>this.saveCursor(z))),this._parser.registerCsiHandler({final:"t"},(z=>this.windowOptions(z))),this._parser.registerCsiHandler({final:"u"},(z=>this.restoreCursor(z))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(z=>this.insertColumns(z))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(z=>this.deleteColumns(z))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(z=>this.selectProtected(z))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(z=>this.requestMode(z,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(z=>this.requestMode(z,!1))),this._parser.setExecuteHandler(a.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(a.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(a.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(a.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(a.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(a.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(a.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(a.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(a.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(a.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(a.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(a.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new y.OscHandler((z=>(this.setTitle(z),this.setIconName(z),!0)))),this._parser.registerOscHandler(1,new y.OscHandler((z=>this.setIconName(z)))),this._parser.registerOscHandler(2,new y.OscHandler((z=>this.setTitle(z)))),this._parser.registerOscHandler(4,new y.OscHandler((z=>this.setOrReportIndexedColor(z)))),this._parser.registerOscHandler(8,new y.OscHandler((z=>this.setHyperlink(z)))),this._parser.registerOscHandler(10,new y.OscHandler((z=>this.setOrReportFgColor(z)))),this._parser.registerOscHandler(11,new y.OscHandler((z=>this.setOrReportBgColor(z)))),this._parser.registerOscHandler(12,new y.OscHandler((z=>this.setOrReportCursorColor(z)))),this._parser.registerOscHandler(104,new y.OscHandler((z=>this.restoreIndexedColor(z)))),this._parser.registerOscHandler(110,new y.OscHandler((z=>this.restoreFgColor(z)))),this._parser.registerOscHandler(111,new y.OscHandler((z=>this.restoreBgColor(z)))),this._parser.registerOscHandler(112,new y.OscHandler((z=>this.restoreCursorColor(z)))),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 z in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:z},(()=>this.selectCharset("("+z))),this._parser.registerEscHandler({intermediates:")",final:z},(()=>this.selectCharset(")"+z))),this._parser.registerEscHandler({intermediates:"*",final:z},(()=>this.selectCharset("*"+z))),this._parser.registerEscHandler({intermediates:"+",final:z},(()=>this.selectCharset("+"+z))),this._parser.registerEscHandler({intermediates:"-",final:z},(()=>this.selectCharset("-"+z))),this._parser.registerEscHandler({intermediates:".",final:z},(()=>this.selectCharset("."+z))),this._parser.registerEscHandler({intermediates:"/",final:z},(()=>this.selectCharset("/"+z)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((z=>(this._logService.error("Parsing error: ",z),z))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new m.DcsHandler(((z,se)=>this.requestStatusString(z,se))))}_preserveStack(R,B,T,H){this._parseStack.paused=!0,this._parseStack.cursorStartX=R,this._parseStack.cursorStartY=B,this._parseStack.decodedLength=T,this._parseStack.position=H}_logSlowResolvingAsync(R){this._logService.logLevel<=x.LogLevelEnum.WARN&&Promise.race([R,new Promise(((B,T)=>setTimeout((()=>T("#SLOW_TIMEOUT")),5e3)))]).catch((B=>{if(B!=="#SLOW_TIMEOUT")throw B;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(R,B){let T,H=this._activeBuffer.x,V=this._activeBuffer.y,Q=0;const ue=this._parseStack.paused;if(ue){if(T=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,B))return this._logSlowResolvingAsync(T),T;H=this._parseStack.cursorStartX,V=this._parseStack.cursorStartY,this._parseStack.paused=!1,R.length>A&&(Q=this._parseStack.position+A)}if(this._logService.logLevel<=x.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof R=="string"?` "${R}"`:` "${Array.prototype.map.call(R,(z=>String.fromCharCode(z))).join("")}"`),typeof R=="string"?R.split("").map((z=>z.charCodeAt(0))):R),this._parseBuffer.length<R.length&&this._parseBuffer.length<A&&(this._parseBuffer=new Uint32Array(Math.min(R.length,A))),ue||this._dirtyRowTracker.clearRange(),R.length>A)for(let z=Q;z<R.length;z+=A){const se=z+A<R.length?z+A:R.length,ie=typeof R=="string"?this._stringDecoder.decode(R.substring(z,se),this._parseBuffer):this._utf8Decoder.decode(R.subarray(z,se),this._parseBuffer);if(T=this._parser.parse(this._parseBuffer,ie))return this._preserveStack(H,V,ie,z),this._logSlowResolvingAsync(T),T}else if(!ue){const z=typeof R=="string"?this._stringDecoder.decode(R,this._parseBuffer):this._utf8Decoder.decode(R,this._parseBuffer);if(T=this._parser.parse(this._parseBuffer,z))return this._preserveStack(H,V,z,0),this._logSlowResolvingAsync(T),T}this._activeBuffer.x===H&&this._activeBuffer.y===V||this._onCursorMove.fire();const de=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),q=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);q<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(q,this._bufferService.rows-1),Math.min(de,this._bufferService.rows-1))}print(R,B,T){let H,V;const Q=this._charsetService.charset,ue=this._optionsService.rawOptions.screenReaderMode,de=this._bufferService.cols,q=this._coreService.decPrivateModes.wraparound,z=this._coreService.modes.insertMode,se=this._curAttrData;let ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&T-B>0&&ie.getWidth(this._activeBuffer.x-1)===2&&ie.setCellFromCodepoint(this._activeBuffer.x-1,0,1,se);let ve=this._parser.precedingJoinState;for(let fe=B;fe<T;++fe){if(H=R[fe],H<127&&Q){const qe=Q[String.fromCharCode(H)];qe&&(H=qe.charCodeAt(0))}const Me=this._unicodeService.charProperties(H,ve);V=v.UnicodeService.extractWidth(Me);const _e=v.UnicodeService.extractShouldJoin(Me),Oe=_e?v.UnicodeService.extractWidth(ve):0;if(ve=Me,ue&&this._onA11yChar.fire((0,c.stringFromCodePoint)(H)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+V-Oe>de){if(q){const qe=ie;let be=this._activeBuffer.x-Oe;for(this._activeBuffer.x=Oe,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Oe>0&&ie instanceof r.BufferLine&&ie.copyCellsFrom(qe,be,0,Oe,!1);be<de;)qe.setCellFromCodepoint(be++,0,1,se)}else if(this._activeBuffer.x=de-1,V===2)continue}if(_e&&this._activeBuffer.x){const qe=ie.getWidth(this._activeBuffer.x-1)?1:2;ie.addCodepointToCell(this._activeBuffer.x-qe,H,V);for(let be=V-Oe;--be>=0;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,se)}else if(z&&(ie.insertCells(this._activeBuffer.x,V-Oe,this._activeBuffer.getNullCell(se)),ie.getWidth(de-1)===2&&ie.setCellFromCodepoint(de-1,o.NULL_CELL_CODE,o.NULL_CELL_WIDTH,se)),ie.setCellFromCodepoint(this._activeBuffer.x++,H,V,se),V>0)for(;--V;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,se)}this._parser.precedingJoinState=ve,this._activeBuffer.x<de&&T-B>0&&ie.getWidth(this._activeBuffer.x)===0&&!ie.hasContent(this._activeBuffer.x)&&ie.setCellFromCodepoint(this._activeBuffer.x,0,1,se),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(R,B){return R.final!=="t"||R.prefix||R.intermediates?this._parser.registerCsiHandler(R,B):this._parser.registerCsiHandler(R,(T=>!E(T.params[0],this._optionsService.rawOptions.windowOptions)||B(T)))}registerDcsHandler(R,B){return this._parser.registerDcsHandler(R,new m.DcsHandler(B))}registerEscHandler(R,B){return this._parser.registerEscHandler(R,B)}registerOscHandler(R,B){return this._parser.registerOscHandler(R,new y.OscHandler(B))}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 R;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&&((R=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&R.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);B.hasWidth(this._activeBuffer.x)&&!B.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const R=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-R),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(R=this._bufferService.cols-1){this._activeBuffer.x=Math.min(R,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(R,B){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=R,this._activeBuffer.y=this._activeBuffer.scrollTop+B):(this._activeBuffer.x=R,this._activeBuffer.y=B),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(R,B){this._restrictCursor(),this._setCursor(this._activeBuffer.x+R,this._activeBuffer.y+B)}cursorUp(R){const B=this._activeBuffer.y-this._activeBuffer.scrollTop;return B>=0?this._moveCursor(0,-Math.min(B,R.params[0]||1)):this._moveCursor(0,-(R.params[0]||1)),!0}cursorDown(R){const B=this._activeBuffer.scrollBottom-this._activeBuffer.y;return B>=0?this._moveCursor(0,Math.min(B,R.params[0]||1)):this._moveCursor(0,R.params[0]||1),!0}cursorForward(R){return this._moveCursor(R.params[0]||1,0),!0}cursorBackward(R){return this._moveCursor(-(R.params[0]||1),0),!0}cursorNextLine(R){return this.cursorDown(R),this._activeBuffer.x=0,!0}cursorPrecedingLine(R){return this.cursorUp(R),this._activeBuffer.x=0,!0}cursorCharAbsolute(R){return this._setCursor((R.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(R){return this._setCursor(R.length>=2?(R.params[1]||1)-1:0,(R.params[0]||1)-1),!0}charPosAbsolute(R){return this._setCursor((R.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(R){return this._moveCursor(R.params[0]||1,0),!0}linePosAbsolute(R){return this._setCursor(this._activeBuffer.x,(R.params[0]||1)-1),!0}vPositionRelative(R){return this._moveCursor(0,R.params[0]||1),!0}hVPosition(R){return this.cursorPosition(R),!0}tabClear(R){const B=R.params[0];return B===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:B===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(R){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=R.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(R){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=R.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(R){const B=R.params[0];return B===1&&(this._curAttrData.bg|=536870912),B!==2&&B!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(R,B,T,H=!1,V=!1){const Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);Q.replaceCells(B,T,this._activeBuffer.getNullCell(this._eraseAttrData()),V),H&&(Q.isWrapped=!1)}_resetBufferLine(R,B=!1){const T=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);T&&(T.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),B),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+R),T.isWrapped=!1)}eraseInDisplay(R,B=!1){let T;switch(this._restrictCursor(this._bufferService.cols),R.params[0]){case 0:for(T=this._activeBuffer.y,this._dirtyRowTracker.markDirty(T),this._eraseInBufferLine(T++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,B);T<this._bufferService.rows;T++)this._resetBufferLine(T,B);this._dirtyRowTracker.markDirty(T);break;case 1:for(T=this._activeBuffer.y,this._dirtyRowTracker.markDirty(T),this._eraseInBufferLine(T,0,this._activeBuffer.x+1,!0,B),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(T+1).isWrapped=!1);T--;)this._resetBufferLine(T,B);this._dirtyRowTracker.markDirty(0);break;case 2:for(T=this._bufferService.rows,this._dirtyRowTracker.markDirty(T-1);T--;)this._resetBufferLine(T,B);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(R,B=!1){switch(this._restrictCursor(this._bufferService.cols),R.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,B);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,B);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,B)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(R){this._restrictCursor();let B=R.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const T=this._activeBuffer.ybase+this._activeBuffer.y,H=this._bufferService.rows-1-this._activeBuffer.scrollBottom,V=this._bufferService.rows-1+this._activeBuffer.ybase-H+1;for(;B--;)this._activeBuffer.lines.splice(V-1,1),this._activeBuffer.lines.splice(T,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(R){this._restrictCursor();let B=R.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const T=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;B--;)this._activeBuffer.lines.splice(T,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(R){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.insertCells(this._activeBuffer.x,R.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(R){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.deleteCells(this._activeBuffer.x,R.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(R){let B=R.params[0]||1;for(;B--;)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(R){let B=R.params[0]||1;for(;B--;)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(r.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=R.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);H.deleteCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=R.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);H.insertCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=R.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);H.insertCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=R.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);H.deleteCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(R){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(R.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(R){const B=this._parser.precedingJoinState;if(!B)return!0;const T=R.params[0]||1,H=v.UnicodeService.extractWidth(B),V=this._activeBuffer.x-H,Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(V),ue=new Uint32Array(Q.length*T);let de=0;for(let z=0;z<Q.length;){const se=Q.codePointAt(z)||0;ue[de++]=se,z+=se>65535?2:1}let q=de;for(let z=1;z<T;++z)ue.copyWithin(q,0,de),q+=de;return this.print(ue,0,q),!0}sendDeviceAttributesPrimary(R){return R.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(a.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(a.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(R){return R.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(a.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(a.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(R.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(a.C0.ESC+"[>83;40003;0c")),!0}_is(R){return(this._optionsService.rawOptions.termName+"").indexOf(R)===0}setMode(R){for(let B=0;B<R.length;B++)switch(R.params[B]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(R){for(let B=0;B<R.length;B++)switch(R.params[B]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.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(R){for(let B=0;B<R.length;B++)switch(R.params[B]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(R){for(let B=0;B<R.length;B++)switch(R.params[B]){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(),R.params[B]===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(R,B){const T=this._coreService.decPrivateModes,{activeProtocol:H,activeEncoding:V}=this._coreMouseService,Q=this._coreService,{buffers:ue,cols:de}=this._bufferService,{active:q,alt:z}=ue,se=this._optionsService.rawOptions,ie=_e=>_e?1:2,ve=R.params[0];return fe=ve,Me=B?ve===2?4:ve===4?ie(Q.modes.insertMode):ve===12?3:ve===20?ie(se.convertEol):0:ve===1?ie(T.applicationCursorKeys):ve===3?se.windowOptions.setWinLines?de===80?2:de===132?1:0:0:ve===6?ie(T.origin):ve===7?ie(T.wraparound):ve===8?3:ve===9?ie(H==="X10"):ve===12?ie(se.cursorBlink):ve===25?ie(!Q.isCursorHidden):ve===45?ie(T.reverseWraparound):ve===66?ie(T.applicationKeypad):ve===67?4:ve===1e3?ie(H==="VT200"):ve===1002?ie(H==="DRAG"):ve===1003?ie(H==="ANY"):ve===1004?ie(T.sendFocus):ve===1005?4:ve===1006?ie(V==="SGR"):ve===1015?4:ve===1016?ie(V==="SGR_PIXELS"):ve===1048?1:ve===47||ve===1047||ve===1049?ie(q===z):ve===2004?ie(T.bracketedPasteMode):0,Q.triggerDataEvent(`${a.C0.ESC}[${B?"":"?"}${fe};${Me}$y`),!0;var fe,Me}_updateAttrColor(R,B,T,H,V){return B===2?(R|=50331648,R&=-16777216,R|=S.AttributeData.fromColorRGB([T,H,V])):B===5&&(R&=-50331904,R|=33554432|255&T),R}_extractColor(R,B,T){const H=[0,0,-1,0,0,0];let V=0,Q=0;do{if(H[Q+V]=R.params[B+Q],R.hasSubParams(B+Q)){const ue=R.getSubParams(B+Q);let de=0;do H[1]===5&&(V=1),H[Q+de+1+V]=ue[de];while(++de<ue.length&&de+Q+1+V<H.length);break}if(H[1]===5&&Q+V>=2||H[1]===2&&Q+V>=5)break;H[1]&&(V=1)}while(++Q+B<R.length&&Q+V<H.length);for(let ue=2;ue<H.length;++ue)H[ue]===-1&&(H[ue]=0);switch(H[0]){case 38:T.fg=this._updateAttrColor(T.fg,H[1],H[3],H[4],H[5]);break;case 48:T.bg=this._updateAttrColor(T.bg,H[1],H[3],H[4],H[5]);break;case 58:T.extended=T.extended.clone(),T.extended.underlineColor=this._updateAttrColor(T.extended.underlineColor,H[1],H[3],H[4],H[5])}return Q}_processUnderline(R,B){B.extended=B.extended.clone(),(!~R||R>5)&&(R=1),B.extended.underlineStyle=R,B.fg|=268435456,R===0&&(B.fg&=-268435457),B.updateExtended()}_processSGR0(R){R.fg=r.DEFAULT_ATTR_DATA.fg,R.bg=r.DEFAULT_ATTR_DATA.bg,R.extended=R.extended.clone(),R.extended.underlineStyle=0,R.extended.underlineColor&=-67108864,R.updateExtended()}charAttributes(R){if(R.length===1&&R.params[0]===0)return this._processSGR0(this._curAttrData),!0;const B=R.length;let T;const H=this._curAttrData;for(let V=0;V<B;V++)T=R.params[V],T>=30&&T<=37?(H.fg&=-50331904,H.fg|=16777216|T-30):T>=40&&T<=47?(H.bg&=-50331904,H.bg|=16777216|T-40):T>=90&&T<=97?(H.fg&=-50331904,H.fg|=16777224|T-90):T>=100&&T<=107?(H.bg&=-50331904,H.bg|=16777224|T-100):T===0?this._processSGR0(H):T===1?H.fg|=134217728:T===3?H.bg|=67108864:T===4?(H.fg|=268435456,this._processUnderline(R.hasSubParams(V)?R.getSubParams(V)[0]:1,H)):T===5?H.fg|=536870912:T===7?H.fg|=67108864:T===8?H.fg|=1073741824:T===9?H.fg|=2147483648:T===2?H.bg|=134217728:T===21?this._processUnderline(2,H):T===22?(H.fg&=-134217729,H.bg&=-134217729):T===23?H.bg&=-67108865:T===24?(H.fg&=-268435457,this._processUnderline(0,H)):T===25?H.fg&=-536870913:T===27?H.fg&=-67108865:T===28?H.fg&=-1073741825:T===29?H.fg&=2147483647:T===39?(H.fg&=-67108864,H.fg|=16777215&r.DEFAULT_ATTR_DATA.fg):T===49?(H.bg&=-67108864,H.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):T===38||T===48||T===58?V+=this._extractColor(R,V,H):T===53?H.bg|=1073741824:T===55?H.bg&=-1073741825:T===59?(H.extended=H.extended.clone(),H.extended.underlineColor=-1,H.updateExtended()):T===100?(H.fg&=-67108864,H.fg|=16777215&r.DEFAULT_ATTR_DATA.fg,H.bg&=-67108864,H.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",T);return!0}deviceStatus(R){switch(R.params[0]){case 5:this._coreService.triggerDataEvent(`${a.C0.ESC}[0n`);break;case 6:const B=this._activeBuffer.y+1,T=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${a.C0.ESC}[${B};${T}R`)}return!0}deviceStatusPrivate(R){if(R.params[0]===6){const B=this._activeBuffer.y+1,T=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${a.C0.ESC}[?${B};${T}R`)}return!0}softReset(R){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=r.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(R){const B=R.params[0]||1;switch(B){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 T=B%2==1;return this._optionsService.options.cursorBlink=T,!0}setScrollRegion(R){const B=R.params[0]||1;let T;return(R.length<2||(T=R.params[1])>this._bufferService.rows||T===0)&&(T=this._bufferService.rows),T>B&&(this._activeBuffer.scrollTop=B-1,this._activeBuffer.scrollBottom=T-1,this._setCursor(0,0)),!0}windowOptions(R){if(!E(R.params[0],this._optionsService.rawOptions.windowOptions))return!0;const B=R.length>1?R.params[1]:0;switch(R.params[0]){case 14:B!==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(`${a.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:B!==0&&B!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),B!==0&&B!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:B!==0&&B!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),B!==0&&B!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(R){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(R){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(R){return this._windowTitle=R,this._onTitleChange.fire(R),!0}setIconName(R){return this._iconName=R,!0}setOrReportIndexedColor(R){const B=[],T=R.split(";");for(;T.length>1;){const H=T.shift(),V=T.shift();if(/^\d+$/.exec(H)){const Q=parseInt(H);if(I(Q))if(V==="?")B.push({type:0,index:Q});else{const ue=(0,C.parseColor)(V);ue&&B.push({type:1,index:Q,color:ue})}}}return B.length&&this._onColor.fire(B),!0}setHyperlink(R){const B=R.split(";");return!(B.length<2)&&(B[1]?this._createHyperlink(B[0],B[1]):!B[0]&&this._finishHyperlink())}_createHyperlink(R,B){this._getCurrentLinkId()&&this._finishHyperlink();const T=R.split(":");let H;const V=T.findIndex((Q=>Q.startsWith("id=")));return V!==-1&&(H=T[V].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:H,uri:B}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(R,B){const T=R.split(";");for(let H=0;H<T.length&&!(B>=this._specialColors.length);++H,++B)if(T[H]==="?")this._onColor.fire([{type:0,index:this._specialColors[B]}]);else{const V=(0,C.parseColor)(T[H]);V&&this._onColor.fire([{type:1,index:this._specialColors[B],color:V}])}return!0}setOrReportFgColor(R){return this._setOrReportSpecialColor(R,0)}setOrReportBgColor(R){return this._setOrReportSpecialColor(R,1)}setOrReportCursorColor(R){return this._setOrReportSpecialColor(R,2)}restoreIndexedColor(R){if(!R)return this._onColor.fire([{type:2}]),!0;const B=[],T=R.split(";");for(let H=0;H<T.length;++H)if(/^\d+$/.exec(T[H])){const V=parseInt(T[H]);I(V)&&B.push({type:2,index:V})}return B.length&&this._onColor.fire(B),!0}restoreFgColor(R){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(R){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(R){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,p.DEFAULT_CHARSET),!0}selectCharset(R){return R.length!==2?(this.selectDefaultCharset(),!0):(R[0]==="/"||this._charsetService.setgCharset(L[R[0]],p.CHARSETS[R[1]]||p.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 R=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,R,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=r.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=r.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(R){return this._charsetService.setgLevel(R),!0}screenAlignmentPattern(){const R=new l.CellData;R.content=4194373,R.fg=this._curAttrData.fg,R.bg=this._curAttrData.bg,this._setCursor(0,0);for(let B=0;B<this._bufferService.rows;++B){const T=this._activeBuffer.ybase+this._activeBuffer.y+B,H=this._activeBuffer.lines.get(T);H&&(H.fill(R),H.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(R,B){const T=this._bufferService.buffer,H=this._optionsService.rawOptions;return(V=>(this._coreService.triggerDataEvent(`${a.C0.ESC}${V}${a.C0.ESC}\\`),!0))(R==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:R==='"p'?'P1$r61;1"p':R==="r"?`P1$r${T.scrollTop+1};${T.scrollBottom+1}r`:R==="m"?"P1$r0m":R===" q"?`P1$r${{block:2,underline:4,bar:6}[H.cursorStyle]-(H.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(R,B){this._dirtyRowTracker.markRangeDirty(R,B)}}n.InputHandler=F;let N=class{constructor(P){this._bufferService=P,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(P){P<this.start?this.start=P:P>this.end&&(this.end=P)}markRangeDirty(P,R){P>R&&(O=P,P=R,R=O),P<this.start&&(this.start=P),R>this.end&&(this.end=R)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function I(P){return 0<=P&&P<256}N=f([_(0,x.IBufferService)],N)},844:($,n)=>{function u(f){for(const _ of f)_.dispose();f.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 f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const _=this._disposables.indexOf(f);_!==-1&&this._disposables.splice(_,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var _;this._isDisposed||f===this._value||((_=this._value)==null||_.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},n.toDisposable=function(f){return{dispose:f}},n.disposeArray=u,n.getDisposeArrayDisposable=function(f){return{dispose:()=>u(f)}}},1505:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(_,a,p){this._data[_]||(this._data[_]={}),this._data[_][a]=p}get(_,a){return this._data[_]?this._data[_][a]:void 0}clear(){this._data={}}}n.TwoKeyMap=u,n.FourKeyMap=class{constructor(){this._data=new u}set(f,_,a,p,b){this._data.get(f,_)||this._data.set(f,_,new u),this._data.get(f,_).set(a,p,b)}get(f,_,a,p){var b;return(b=this._data.get(f,_))==null?void 0:b.get(a,p)}clear(){this._data.clear()}}},6114:($,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 u=n.isNode?"node":navigator.userAgent,f=n.isNode?"node":navigator.platform;n.isFirefox=u.includes("Firefox"),n.isLegacyEdge=u.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(u),n.getSafariVersion=function(){if(!n.isSafari)return 0;const _=u.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),n.isIpad=f==="iPad",n.isIphone=f==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),n.isLinux=f.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(u)},6106:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SortedList=void 0;let u=0;n.SortedList=class{constructor(f){this._getKey=f,this._array=[]}clear(){this._array.length=0}insert(f){this._array.length!==0?(u=this._search(this._getKey(f)),this._array.splice(u,0,f)):this._array.push(f)}delete(f){if(this._array.length===0)return!1;const _=this._getKey(f);if(_===void 0||(u=this._search(_),u===-1)||this._getKey(this._array[u])!==_)return!1;do if(this._array[u]===f)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===_);return!1}*getKeyIterator(f){if(this._array.length!==0&&(u=this._search(f),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===f))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===f)}forEachByKey(f,_){if(this._array.length!==0&&(u=this._search(f),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===f))do _(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===f)}values(){return[...this._array].values()}_search(f){let _=0,a=this._array.length-1;for(;a>=_;){let p=_+a>>1;const b=this._getKey(this._array[p]);if(b>f)a=p-1;else{if(!(b<f)){for(;p>0&&this._getKey(this._array[p-1])===f;)p--;return p}_=p+1}}return _}}},7226:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const f=u(6114);class _{constructor(){this._tasks=[],this._i=0}enqueue(b){this._tasks.push(b),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(b){this._idleCallback=void 0;let w=0,c=0,r=b.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(w=Date.now(),this._tasks[this._i]()||this._i++,w=Math.max(1,Date.now()-w),c=Math.max(w,c),h=b.timeRemaining(),1.5*c>h)return r-w<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-w))}ms`),void this._start();r=h}this.clear()}}class a extends _{_requestCallback(b){return setTimeout((()=>b(this._createDeadline(16))))}_cancelCallback(b){clearTimeout(b)}_createDeadline(b){const w=Date.now()+b;return{timeRemaining:()=>Math.max(0,w-Date.now())}}}n.PriorityTaskQueue=a,n.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:a,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.updateWindowsModeWrappedState=void 0;const f=u(643);n.updateWindowsModeWrappedState=function(_){const a=_.buffer.lines.get(_.buffer.ybase+_.buffer.y-1),p=a==null?void 0:a.get(_.cols-1),b=_.buffer.lines.get(_.buffer.ybase+_.buffer.y);b&&p&&(b.isWrapped=p[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&p[f.CHAR_DATA_CODE_INDEX]!==f.WHITESPACE_CELL_CODE)}},3734:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(a){return[a>>>16&255,a>>>8&255,255&a]}static fromColorRGB(a){return(255&a[0])<<16|(255&a[1])<<8|255&a[2]}clone(){const a=new u;return a.fg=this.fg,a.bg=this.bg,a.extended=this.extended.clone(),a}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=u;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(a){this._ext=a}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(a){this._ext&=-469762049,this._ext|=a<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(a){this._ext&=-67108864,this._ext|=67108863&a}get urlId(){return this._urlId}set urlId(a){this._urlId=a}get underlineVariantOffset(){const a=(3758096384&this._ext)>>29;return a<0?4294967288^a:a}set underlineVariantOffset(a){this._ext&=536870911,this._ext|=a<<29&3758096384}constructor(a=0,p=0){this._ext=0,this._urlId=0,this._ext=a,this._urlId=p}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=f},9092:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Buffer=n.MAX_BUFFER_SIZE=void 0;const f=u(6349),_=u(7226),a=u(3734),p=u(8437),b=u(4634),w=u(511),c=u(643),r=u(4863),h=u(7116);n.MAX_BUFFER_SIZE=4294967295,n.Buffer=class{constructor(o,l,S){this._hasScrollback=o,this._optionsService=l,this._bufferService=S,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=h.DEFAULT_CHARSET,this.markers=[],this._nullCell=w.CellData.fromCharData([0,c.NULL_CELL_CHAR,c.NULL_CELL_WIDTH,c.NULL_CELL_CODE]),this._whitespaceCell=w.CellData.fromCharData([0,c.WHITESPACE_CELL_CHAR,c.WHITESPACE_CELL_WIDTH,c.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new _.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(o){return o?(this._nullCell.fg=o.fg,this._nullCell.bg=o.bg,this._nullCell.extended=o.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new a.ExtendedAttrs),this._nullCell}getWhitespaceCell(o){return o?(this._whitespaceCell.fg=o.fg,this._whitespaceCell.bg=o.bg,this._whitespaceCell.extended=o.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new a.ExtendedAttrs),this._whitespaceCell}getBlankLine(o,l){return new p.BufferLine(this._bufferService.cols,this.getNullCell(o),l)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const o=this.ybase+this.y-this.ydisp;return o>=0&&o<this._rows}_getCorrectBufferLength(o){if(!this._hasScrollback)return o;const l=o+this._optionsService.rawOptions.scrollback;return l>n.MAX_BUFFER_SIZE?n.MAX_BUFFER_SIZE:l}fillViewportRows(o){if(this.lines.length===0){o===void 0&&(o=p.DEFAULT_ATTR_DATA);let l=this._rows;for(;l--;)this.lines.push(this.getBlankLine(o))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(o,l){const S=this.getNullCell(p.DEFAULT_ATTR_DATA);let x=0;const v=this._getCorrectBufferLength(l);if(v>this.lines.maxLength&&(this.lines.maxLength=v),this.lines.length>0){if(this._cols<o)for(let m=0;m<this.lines.length;m++)x+=+this.lines.get(m).resize(o,S);let y=0;if(this._rows<l)for(let m=this._rows;m<l;m++)this.lines.length<l+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new p.BufferLine(o,S)):this.ybase>0&&this.lines.length<=this.ybase+this.y+y+1?(this.ybase--,y++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(o,S)));else for(let m=this._rows;m>l;m--)this.lines.length>l+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(v<this.lines.maxLength){const m=this.lines.length-v;m>0&&(this.lines.trimStart(m),this.ybase=Math.max(this.ybase-m,0),this.ydisp=Math.max(this.ydisp-m,0),this.savedY=Math.max(this.savedY-m,0)),this.lines.maxLength=v}this.x=Math.min(this.x,o-1),this.y=Math.min(this.y,l-1),y&&(this.y+=y),this.savedX=Math.min(this.savedX,o-1),this.scrollTop=0}if(this.scrollBottom=l-1,this._isReflowEnabled&&(this._reflow(o,l),this._cols>o))for(let y=0;y<this.lines.length;y++)x+=+this.lines.get(y).resize(o,S);this._cols=o,this._rows=l,this._memoryCleanupQueue.clear(),x>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let o=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,o=!1);let l=0;for(;this._memoryCleanupPosition<this.lines.length;)if(l+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),l>100)return!0;return o}get _isReflowEnabled(){const o=this._optionsService.rawOptions.windowsPty;return o&&o.buildNumber?this._hasScrollback&&o.backend==="conpty"&&o.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(o,l){this._cols!==o&&(o>this._cols?this._reflowLarger(o,l):this._reflowSmaller(o,l))}_reflowLarger(o,l){const S=(0,b.reflowLargerGetLinesToRemove)(this.lines,this._cols,o,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(S.length>0){const x=(0,b.reflowLargerCreateNewLayout)(this.lines,S);(0,b.reflowLargerApplyNewLayout)(this.lines,x.layout),this._reflowLargerAdjustViewport(o,l,x.countRemoved)}}_reflowLargerAdjustViewport(o,l,S){const x=this.getNullCell(p.DEFAULT_ATTR_DATA);let v=S;for(;v-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<l&&this.lines.push(new p.BufferLine(o,x))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-S,0)}_reflowSmaller(o,l){const S=this.getNullCell(p.DEFAULT_ATTR_DATA),x=[];let v=0;for(let y=this.lines.length-1;y>=0;y--){let m=this.lines.get(y);if(!m||!m.isWrapped&&m.getTrimmedLength()<=o)continue;const C=[m];for(;m.isWrapped&&y>0;)m=this.lines.get(--y),C.unshift(m);const L=this.ybase+this.y;if(L>=y&&L<y+C.length)continue;const A=C[C.length-1].getTrimmedLength(),E=(0,b.reflowSmallerGetNewLineLengths)(C,this._cols,o),D=E.length-C.length;let O;O=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 F=[];for(let T=0;T<D;T++){const H=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);F.push(H)}F.length>0&&(x.push({start:y+C.length+v,newLines:F}),v+=F.length),C.push(...F);let N=E.length-1,I=E[N];I===0&&(N--,I=E[N]);let P=C.length-D-1,R=A;for(;P>=0;){const T=Math.min(R,I);if(C[N]===void 0)break;if(C[N].copyCellsFrom(C[P],R-T,I-T,T,!0),I-=T,I===0&&(N--,I=E[N]),R-=T,R===0){P--;const H=Math.max(P,0);R=(0,b.getWrappedLineTrimmedLength)(C,H,this._cols)}}for(let T=0;T<C.length;T++)E[T]<o&&C[T].setCell(E[T],S);let B=D-O;for(;B-- >0;)this.ybase===0?this.y<l-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+v)-l&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+D,this.ybase+l-1)}if(x.length>0){const y=[],m=[];for(let N=0;N<this.lines.length;N++)m.push(this.lines.get(N));const C=this.lines.length;let L=C-1,A=0,E=x[A];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+v);let D=0;for(let N=Math.min(this.lines.maxLength-1,C+v-1);N>=0;N--)if(E&&E.start>L+D){for(let I=E.newLines.length-1;I>=0;I--)this.lines.set(N--,E.newLines[I]);N++,y.push({index:L+1,amount:E.newLines.length}),D+=E.newLines.length,E=x[++A]}else this.lines.set(N,m[L--]);let O=0;for(let N=y.length-1;N>=0;N--)y[N].index+=O,this.lines.onInsertEmitter.fire(y[N]),O+=y[N].amount;const F=Math.max(0,C+v-this.lines.maxLength);F>0&&this.lines.onTrimEmitter.fire(F)}}translateBufferLineToString(o,l,S=0,x){const v=this.lines.get(o);return v?v.translateToString(l,S,x):""}getWrappedRangeForLine(o){let l=o,S=o;for(;l>0&&this.lines.get(l).isWrapped;)l--;for(;S+1<this.lines.length&&this.lines.get(S+1).isWrapped;)S++;return{first:l,last:S}}setupTabStops(o){for(o!=null?this.tabs[o]||(o=this.prevStop(o)):(this.tabs={},o=0);o<this._cols;o+=this._optionsService.rawOptions.tabStopWidth)this.tabs[o]=!0}prevStop(o){for(o==null&&(o=this.x);!this.tabs[--o]&&o>0;);return o>=this._cols?this._cols-1:o<0?0:o}nextStop(o){for(o==null&&(o=this.x);!this.tabs[++o]&&o<this._cols;);return o>=this._cols?this._cols-1:o<0?0:o}clearMarkers(o){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].line===o&&(this.markers[l].dispose(),this.markers.splice(l--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let o=0;o<this.markers.length;o++)this.markers[o].dispose(),this.markers.splice(o--,1);this._isClearing=!1}addMarker(o){const l=new r.Marker(o);return this.markers.push(l),l.register(this.lines.onTrim((S=>{l.line-=S,l.line<0&&l.dispose()}))),l.register(this.lines.onInsert((S=>{l.line>=S.index&&(l.line+=S.amount)}))),l.register(this.lines.onDelete((S=>{l.line>=S.index&&l.line<S.index+S.amount&&l.dispose(),l.line>S.index&&(l.line-=S.amount)}))),l.register(l.onDispose((()=>this._removeMarker(l)))),l}_removeMarker(o){this._isClearing||this.markers.splice(this.markers.indexOf(o),1)}}},8437:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLine=n.DEFAULT_ATTR_DATA=void 0;const f=u(3734),_=u(511),a=u(643),p=u(482);n.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);let b=0;class w{constructor(r,h,o=!1){this.isWrapped=o,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*r);const l=h||_.CellData.fromCharData([0,a.NULL_CELL_CHAR,a.NULL_CELL_WIDTH,a.NULL_CELL_CODE]);for(let S=0;S<r;++S)this.setCell(S,l);this.length=r}get(r){const h=this._data[3*r+0],o=2097151&h;return[this._data[3*r+1],2097152&h?this._combined[r]:o?(0,p.stringFromCodePoint)(o):"",h>>22,2097152&h?this._combined[r].charCodeAt(this._combined[r].length-1):o]}set(r,h){this._data[3*r+1]=h[a.CHAR_DATA_ATTR_INDEX],h[a.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[r]=h[1],this._data[3*r+0]=2097152|r|h[a.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*r+0]=h[a.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|h[a.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(r){return this._data[3*r+0]>>22}hasWidth(r){return 12582912&this._data[3*r+0]}getFg(r){return this._data[3*r+1]}getBg(r){return this._data[3*r+2]}hasContent(r){return 4194303&this._data[3*r+0]}getCodePoint(r){const h=this._data[3*r+0];return 2097152&h?this._combined[r].charCodeAt(this._combined[r].length-1):2097151&h}isCombined(r){return 2097152&this._data[3*r+0]}getString(r){const h=this._data[3*r+0];return 2097152&h?this._combined[r]:2097151&h?(0,p.stringFromCodePoint)(2097151&h):""}isProtected(r){return 536870912&this._data[3*r+2]}loadCell(r,h){return b=3*r,h.content=this._data[b+0],h.fg=this._data[b+1],h.bg=this._data[b+2],2097152&h.content&&(h.combinedData=this._combined[r]),268435456&h.bg&&(h.extended=this._extendedAttrs[r]),h}setCell(r,h){2097152&h.content&&(this._combined[r]=h.combinedData),268435456&h.bg&&(this._extendedAttrs[r]=h.extended),this._data[3*r+0]=h.content,this._data[3*r+1]=h.fg,this._data[3*r+2]=h.bg}setCellFromCodepoint(r,h,o,l){268435456&l.bg&&(this._extendedAttrs[r]=l.extended),this._data[3*r+0]=h|o<<22,this._data[3*r+1]=l.fg,this._data[3*r+2]=l.bg}addCodepointToCell(r,h,o){let l=this._data[3*r+0];2097152&l?this._combined[r]+=(0,p.stringFromCodePoint)(h):2097151&l?(this._combined[r]=(0,p.stringFromCodePoint)(2097151&l)+(0,p.stringFromCodePoint)(h),l&=-2097152,l|=2097152):l=h|4194304,o&&(l&=-12582913,l|=o<<22),this._data[3*r+0]=l}insertCells(r,h,o){if((r%=this.length)&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,o),h<this.length-r){const l=new _.CellData;for(let S=this.length-r-h-1;S>=0;--S)this.setCell(r+h+S,this.loadCell(r+S,l));for(let S=0;S<h;++S)this.setCell(r+S,o)}else for(let l=r;l<this.length;++l)this.setCell(l,o);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,o)}deleteCells(r,h,o){if(r%=this.length,h<this.length-r){const l=new _.CellData;for(let S=0;S<this.length-r-h;++S)this.setCell(r+S,this.loadCell(r+h+S,l));for(let S=this.length-h;S<this.length;++S)this.setCell(S,o)}else for(let l=r;l<this.length;++l)this.setCell(l,o);r&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,o),this.getWidth(r)!==0||this.hasContent(r)||this.setCellFromCodepoint(r,0,1,o)}replaceCells(r,h,o,l=!1){if(l)for(r&&this.getWidth(r-1)===2&&!this.isProtected(r-1)&&this.setCellFromCodepoint(r-1,0,1,o),h<this.length&&this.getWidth(h-1)===2&&!this.isProtected(h)&&this.setCellFromCodepoint(h,0,1,o);r<h&&r<this.length;)this.isProtected(r)||this.setCell(r,o),r++;else for(r&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,o),h<this.length&&this.getWidth(h-1)===2&&this.setCellFromCodepoint(h,0,1,o);r<h&&r<this.length;)this.setCell(r++,o)}resize(r,h){if(r===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const o=3*r;if(r>this.length){if(this._data.buffer.byteLength>=4*o)this._data=new Uint32Array(this._data.buffer,0,o);else{const l=new Uint32Array(o);l.set(this._data),this._data=l}for(let l=this.length;l<r;++l)this.setCell(l,h)}else{this._data=this._data.subarray(0,o);const l=Object.keys(this._combined);for(let x=0;x<l.length;x++){const v=parseInt(l[x],10);v>=r&&delete this._combined[v]}const S=Object.keys(this._extendedAttrs);for(let x=0;x<S.length;x++){const v=parseInt(S[x],10);v>=r&&delete this._extendedAttrs[v]}}return this.length=r,4*o*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const r=new Uint32Array(this._data.length);return r.set(this._data),this._data=r,1}return 0}fill(r,h=!1){if(h)for(let o=0;o<this.length;++o)this.isProtected(o)||this.setCell(o,r);else{this._combined={},this._extendedAttrs={};for(let o=0;o<this.length;++o)this.setCell(o,r)}}copyFrom(r){this.length!==r.length?this._data=new Uint32Array(r._data):this._data.set(r._data),this.length=r.length,this._combined={};for(const h in r._combined)this._combined[h]=r._combined[h];this._extendedAttrs={};for(const h in r._extendedAttrs)this._extendedAttrs[h]=r._extendedAttrs[h];this.isWrapped=r.isWrapped}clone(){const r=new w(0);r._data=new Uint32Array(this._data),r.length=this.length;for(const h in this._combined)r._combined[h]=this._combined[h];for(const h in this._extendedAttrs)r._extendedAttrs[h]=this._extendedAttrs[h];return r.isWrapped=this.isWrapped,r}getTrimmedLength(){for(let r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0])return r+(this._data[3*r+0]>>22);return 0}getNoBgTrimmedLength(){for(let r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0]||50331648&this._data[3*r+2])return r+(this._data[3*r+0]>>22);return 0}copyCellsFrom(r,h,o,l,S){const x=r._data;if(S)for(let y=l-1;y>=0;y--){for(let m=0;m<3;m++)this._data[3*(o+y)+m]=x[3*(h+y)+m];268435456&x[3*(h+y)+2]&&(this._extendedAttrs[o+y]=r._extendedAttrs[h+y])}else for(let y=0;y<l;y++){for(let m=0;m<3;m++)this._data[3*(o+y)+m]=x[3*(h+y)+m];268435456&x[3*(h+y)+2]&&(this._extendedAttrs[o+y]=r._extendedAttrs[h+y])}const v=Object.keys(r._combined);for(let y=0;y<v.length;y++){const m=parseInt(v[y],10);m>=h&&(this._combined[m-h+o]=r._combined[m])}}translateToString(r,h,o,l){h=h??0,o=o??this.length,r&&(o=Math.min(o,this.getTrimmedLength())),l&&(l.length=0);let S="";for(;h<o;){const x=this._data[3*h+0],v=2097151&x,y=2097152&x?this._combined[h]:v?(0,p.stringFromCodePoint)(v):a.WHITESPACE_CELL_CHAR;if(S+=y,l)for(let m=0;m<y.length;++m)l.push(h);h+=x>>22||1}return l&&l.push(h),S}}n.BufferLine=w},4841:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.getRangeLength=void 0,n.getRangeLength=function(u,f){if(u.start.y>u.end.y)throw new Error(`Buffer range end (${u.end.x}, ${u.end.y}) cannot be before start (${u.start.x}, ${u.start.y})`);return f*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:($,n)=>{function u(f,_,a){if(_===f.length-1)return f[_].getTrimmedLength();const p=!f[_].hasContent(a-1)&&f[_].getWidth(a-1)===1,b=f[_+1].getWidth(0)===2;return p&&b?a-1:a}Object.defineProperty(n,"__esModule",{value:!0}),n.getWrappedLineTrimmedLength=n.reflowSmallerGetNewLineLengths=n.reflowLargerApplyNewLayout=n.reflowLargerCreateNewLayout=n.reflowLargerGetLinesToRemove=void 0,n.reflowLargerGetLinesToRemove=function(f,_,a,p,b){const w=[];for(let c=0;c<f.length-1;c++){let r=c,h=f.get(++r);if(!h.isWrapped)continue;const o=[f.get(c)];for(;r<f.length&&h.isWrapped;)o.push(h),h=f.get(++r);if(p>=c&&p<r){c+=o.length-1;continue}let l=0,S=u(o,l,_),x=1,v=0;for(;x<o.length;){const m=u(o,x,_),C=m-v,L=a-S,A=Math.min(C,L);o[l].copyCellsFrom(o[x],v,S,A,!1),S+=A,S===a&&(l++,S=0),v+=A,v===m&&(x++,v=0),S===0&&l!==0&&o[l-1].getWidth(a-1)===2&&(o[l].copyCellsFrom(o[l-1],a-1,S++,1,!1),o[l-1].setCell(a-1,b))}o[l].replaceCells(S,a,b);let y=0;for(let m=o.length-1;m>0&&(m>l||o[m].getTrimmedLength()===0);m--)y++;y>0&&(w.push(c+o.length-y),w.push(y)),c+=o.length-1}return w},n.reflowLargerCreateNewLayout=function(f,_){const a=[];let p=0,b=_[p],w=0;for(let c=0;c<f.length;c++)if(b===c){const r=_[++p];f.onDeleteEmitter.fire({index:c-w,amount:r}),c+=r-1,w+=r,b=_[++p]}else a.push(c);return{layout:a,countRemoved:w}},n.reflowLargerApplyNewLayout=function(f,_){const a=[];for(let p=0;p<_.length;p++)a.push(f.get(_[p]));for(let p=0;p<a.length;p++)f.set(p,a[p]);f.length=_.length},n.reflowSmallerGetNewLineLengths=function(f,_,a){const p=[],b=f.map(((h,o)=>u(f,o,_))).reduce(((h,o)=>h+o));let w=0,c=0,r=0;for(;r<b;){if(b-r<a){p.push(b-r);break}w+=a;const h=u(f,c,_);w>h&&(w-=h,c++);const o=f[c].getWidth(w-1)===2;o&&w--;const l=o?a-1:a;p.push(l),r+=l}return p},n.getWrappedLineTrimmedLength=u},5295:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferSet=void 0;const f=u(8460),_=u(844),a=u(9092);class p extends _.Disposable{constructor(w,c){super(),this._optionsService=w,this._bufferService=c,this._onBufferActivate=this.register(new f.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new a.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new a.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(w){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(w),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(w,c){this._normal.resize(w,c),this._alt.resize(w,c),this.setupTabStops(w)}setupTabStops(w){this._normal.setupTabStops(w),this._alt.setupTabStops(w)}}n.BufferSet=p},511:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const f=u(482),_=u(643),a=u(3734);class p extends a.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new a.ExtendedAttrs,this.combinedData=""}static fromCharData(w){const c=new p;return c.setFromCharData(w),c}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(w){this.fg=w[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let c=!1;if(w[_.CHAR_DATA_CHAR_INDEX].length>2)c=!0;else if(w[_.CHAR_DATA_CHAR_INDEX].length===2){const r=w[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=w[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|w[_.CHAR_DATA_WIDTH_INDEX]<<22:c=!0}else c=!0}else this.content=w[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[_.CHAR_DATA_WIDTH_INDEX]<<22;c&&(this.combinedData=w[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|w[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=p},643:($,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:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Marker=void 0;const f=u(8460),_=u(844);class a{get id(){return this._id}constructor(b){this.line=b,this.isDisposed=!1,this._disposables=[],this._id=a._nextId++,this._onDispose=this.register(new f.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,_.disposeArray)(this._disposables),this._disposables.length=0)}register(b){return this._disposables.push(b),b}}n.Marker=a,a._nextId=1},7116:($,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:($,n)=>{var u,f,_;Object.defineProperty(n,"__esModule",{value:!0}),n.C1_ESCAPED=n.C1=n.C0=void 0,(function(a){a.NUL="\0",a.SOH="",a.STX="",a.ETX="",a.EOT="",a.ENQ="",a.ACK="",a.BEL="\x07",a.BS="\b",a.HT=" ",a.LF=`
56
- `,a.VT="\v",a.FF="\f",a.CR="\r",a.SO="",a.SI="",a.DLE="",a.DC1="",a.DC2="",a.DC3="",a.DC4="",a.NAK="",a.SYN="",a.ETB="",a.CAN="",a.EM="",a.SUB="",a.ESC="\x1B",a.FS="",a.GS="",a.RS="",a.US="",a.SP=" ",a.DEL=""})(u||(n.C0=u={})),(function(a){a.PAD="€",a.HOP="",a.BPH="‚",a.NBH="ƒ",a.IND="„",a.NEL="…",a.SSA="†",a.ESA="‡",a.HTS="ˆ",a.HTJ="‰",a.VTS="Š",a.PLD="‹",a.PLU="Œ",a.RI="",a.SS2="Ž",a.SS3="",a.DCS="",a.PU1="‘",a.PU2="’",a.STS="“",a.CCH="”",a.MW="•",a.SPA="–",a.EPA="—",a.SOS="˜",a.SGCI="™",a.SCI="š",a.CSI="›",a.ST="œ",a.OSC="",a.PM="ž",a.APC="Ÿ"})(f||(n.C1=f={})),(function(a){a.ST=`${u.ESC}\\`})(_||(n.C1_ESCAPED=_={}))},7399:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.evaluateKeyboardEvent=void 0;const f=u(2584),_={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(a,p,b,w){const c={type:0,cancel:!1,key:void 0},r=(a.shiftKey?1:0)|(a.altKey?2:0)|(a.ctrlKey?4:0)|(a.metaKey?8:0);switch(a.keyCode){case 0:a.key==="UIKeyInputUpArrow"?c.key=p?f.C0.ESC+"OA":f.C0.ESC+"[A":a.key==="UIKeyInputLeftArrow"?c.key=p?f.C0.ESC+"OD":f.C0.ESC+"[D":a.key==="UIKeyInputRightArrow"?c.key=p?f.C0.ESC+"OC":f.C0.ESC+"[C":a.key==="UIKeyInputDownArrow"&&(c.key=p?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:c.key=a.ctrlKey?"\b":f.C0.DEL,a.altKey&&(c.key=f.C0.ESC+c.key);break;case 9:if(a.shiftKey){c.key=f.C0.ESC+"[Z";break}c.key=f.C0.HT,c.cancel=!0;break;case 13:c.key=a.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,c.cancel=!0;break;case 27:c.key=f.C0.ESC,a.altKey&&(c.key=f.C0.ESC+f.C0.ESC),c.cancel=!0;break;case 37:if(a.metaKey)break;r?(c.key=f.C0.ESC+"[1;"+(r+1)+"D",c.key===f.C0.ESC+"[1;3D"&&(c.key=f.C0.ESC+(b?"b":"[1;5D"))):c.key=p?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(a.metaKey)break;r?(c.key=f.C0.ESC+"[1;"+(r+1)+"C",c.key===f.C0.ESC+"[1;3C"&&(c.key=f.C0.ESC+(b?"f":"[1;5C"))):c.key=p?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(a.metaKey)break;r?(c.key=f.C0.ESC+"[1;"+(r+1)+"A",b||c.key!==f.C0.ESC+"[1;3A"||(c.key=f.C0.ESC+"[1;5A")):c.key=p?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(a.metaKey)break;r?(c.key=f.C0.ESC+"[1;"+(r+1)+"B",b||c.key!==f.C0.ESC+"[1;3B"||(c.key=f.C0.ESC+"[1;5B")):c.key=p?f.C0.ESC+"OB":f.C0.ESC+"[B";break;case 45:a.shiftKey||a.ctrlKey||(c.key=f.C0.ESC+"[2~");break;case 46:c.key=r?f.C0.ESC+"[3;"+(r+1)+"~":f.C0.ESC+"[3~";break;case 36:c.key=r?f.C0.ESC+"[1;"+(r+1)+"H":p?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:c.key=r?f.C0.ESC+"[1;"+(r+1)+"F":p?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:a.shiftKey?c.type=2:a.ctrlKey?c.key=f.C0.ESC+"[5;"+(r+1)+"~":c.key=f.C0.ESC+"[5~";break;case 34:a.shiftKey?c.type=3:a.ctrlKey?c.key=f.C0.ESC+"[6;"+(r+1)+"~":c.key=f.C0.ESC+"[6~";break;case 112:c.key=r?f.C0.ESC+"[1;"+(r+1)+"P":f.C0.ESC+"OP";break;case 113:c.key=r?f.C0.ESC+"[1;"+(r+1)+"Q":f.C0.ESC+"OQ";break;case 114:c.key=r?f.C0.ESC+"[1;"+(r+1)+"R":f.C0.ESC+"OR";break;case 115:c.key=r?f.C0.ESC+"[1;"+(r+1)+"S":f.C0.ESC+"OS";break;case 116:c.key=r?f.C0.ESC+"[15;"+(r+1)+"~":f.C0.ESC+"[15~";break;case 117:c.key=r?f.C0.ESC+"[17;"+(r+1)+"~":f.C0.ESC+"[17~";break;case 118:c.key=r?f.C0.ESC+"[18;"+(r+1)+"~":f.C0.ESC+"[18~";break;case 119:c.key=r?f.C0.ESC+"[19;"+(r+1)+"~":f.C0.ESC+"[19~";break;case 120:c.key=r?f.C0.ESC+"[20;"+(r+1)+"~":f.C0.ESC+"[20~";break;case 121:c.key=r?f.C0.ESC+"[21;"+(r+1)+"~":f.C0.ESC+"[21~";break;case 122:c.key=r?f.C0.ESC+"[23;"+(r+1)+"~":f.C0.ESC+"[23~";break;case 123:c.key=r?f.C0.ESC+"[24;"+(r+1)+"~":f.C0.ESC+"[24~";break;default:if(!a.ctrlKey||a.shiftKey||a.altKey||a.metaKey)if(b&&!w||!a.altKey||a.metaKey)!b||a.altKey||a.ctrlKey||a.shiftKey||!a.metaKey?a.key&&!a.ctrlKey&&!a.altKey&&!a.metaKey&&a.keyCode>=48&&a.key.length===1?c.key=a.key:a.key&&a.ctrlKey&&(a.key==="_"&&(c.key=f.C0.US),a.key==="@"&&(c.key=f.C0.NUL)):a.keyCode===65&&(c.type=1);else{const h=_[a.keyCode],o=h==null?void 0:h[a.shiftKey?1:0];if(o)c.key=f.C0.ESC+o;else if(a.keyCode>=65&&a.keyCode<=90){const l=a.ctrlKey?a.keyCode-64:a.keyCode+32;let S=String.fromCharCode(l);a.shiftKey&&(S=S.toUpperCase()),c.key=f.C0.ESC+S}else if(a.keyCode===32)c.key=f.C0.ESC+(a.ctrlKey?f.C0.NUL:" ");else if(a.key==="Dead"&&a.code.startsWith("Key")){let l=a.code.slice(3,4);a.shiftKey||(l=l.toLowerCase()),c.key=f.C0.ESC+l,c.cancel=!0}}else a.keyCode>=65&&a.keyCode<=90?c.key=String.fromCharCode(a.keyCode-64):a.keyCode===32?c.key=f.C0.NUL:a.keyCode>=51&&a.keyCode<=55?c.key=String.fromCharCode(a.keyCode-51+27):a.keyCode===56?c.key=f.C0.DEL:a.keyCode===219?c.key=f.C0.ESC:a.keyCode===220?c.key=f.C0.FS:a.keyCode===221&&(c.key=f.C0.GS)}return c}},482:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},n.utf32ToString=function(u,f=0,_=u.length){let a="";for(let p=f;p<_;++p){let b=u[p];b>65535?(b-=65536,a+=String.fromCharCode(55296+(b>>10))+String.fromCharCode(b%1024+56320)):a+=String.fromCharCode(b)}return a},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,f){const _=u.length;if(!_)return 0;let a=0,p=0;if(this._interim){const b=u.charCodeAt(p++);56320<=b&&b<=57343?f[a++]=1024*(this._interim-55296)+b-56320+65536:(f[a++]=this._interim,f[a++]=b),this._interim=0}for(let b=p;b<_;++b){const w=u.charCodeAt(b);if(55296<=w&&w<=56319){if(++b>=_)return this._interim=w,a;const c=u.charCodeAt(b);56320<=c&&c<=57343?f[a++]=1024*(w-55296)+c-56320+65536:(f[a++]=w,f[a++]=c)}else w!==65279&&(f[a++]=w)}return a}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,f){const _=u.length;if(!_)return 0;let a,p,b,w,c=0,r=0,h=0;if(this.interim[0]){let S=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let v,y=0;for(;(v=63&this.interim[++y])&&y<4;)x<<=6,x|=v;const m=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,C=m-y;for(;h<C;){if(h>=_)return 0;if(v=u[h++],(192&v)!=128){h--,S=!0;break}this.interim[y++]=v,x<<=6,x|=63&v}S||(m===2?x<128?h--:f[c++]=x:m===3?x<2048||x>=55296&&x<=57343||x===65279||(f[c++]=x):x<65536||x>1114111||(f[c++]=x)),this.interim.fill(0)}const o=_-4;let l=h;for(;l<_;){for(;!(!(l<o)||128&(a=u[l])||128&(p=u[l+1])||128&(b=u[l+2])||128&(w=u[l+3]));)f[c++]=a,f[c++]=p,f[c++]=b,f[c++]=w,l+=4;if(a=u[l++],a<128)f[c++]=a;else if((224&a)==192){if(l>=_)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(r=(31&a)<<6|63&p,r<128){l--;continue}f[c++]=r}else if((240&a)==224){if(l>=_)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,c;if(b=u[l++],(192&b)!=128){l--;continue}if(r=(15&a)<<12|(63&p)<<6|63&b,r<2048||r>=55296&&r<=57343||r===65279)continue;f[c++]=r}else if((248&a)==240){if(l>=_)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,c;if(b=u[l++],(192&b)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,this.interim[2]=b,c;if(w=u[l++],(192&w)!=128){l--;continue}if(r=(7&a)<<18|(63&p)<<12|(63&b)<<6|63&w,r<65536||r>1114111)continue;f[c++]=r}}return c}}},225:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeV6=void 0;const f=u(1480),_=[[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]],a=[[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 p;n.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let b=0;b<_.length;++b)p.fill(0,_[b][0],_[b][1]+1)}}wcwidth(b){return b<32?0:b<127?1:b<65536?p[b]:(function(w,c){let r,h=0,o=c.length-1;if(w<c[0][0]||w>c[o][1])return!1;for(;o>=h;)if(r=h+o>>1,w>c[r][1])h=r+1;else{if(!(w<c[r][0]))return!0;o=r-1}return!1})(b,a)?0:b>=131072&&b<=196605||b>=196608&&b<=262141?2:1}charProperties(b,w){let c=this.wcwidth(b),r=c===0&&w!==0;if(r){const h=f.UnicodeService.extractWidth(w);h===0?r=!1:h>c&&(c=h)}return f.UnicodeService.createPropertyValue(0,c,r)}}},5981:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WriteBuffer=void 0;const f=u(8460),_=u(844);class a extends _.Disposable{constructor(b){super(),this._action=b,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new f.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(b,w){if(w!==void 0&&this._syncCalls>w)return void(this._syncCalls=0);if(this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let c;for(this._isSyncWriting=!0;c=this._writeBuffer.shift();){this._action(c);const r=this._callbacks.shift();r&&r()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(b,w){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+=b.length,this._writeBuffer.push(b),this._callbacks.push(w),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(w)}_innerWrite(b=0,w=!0){const c=b||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const r=this._writeBuffer[this._bufferOffset],h=this._action(r,w);if(h){const l=S=>Date.now()-c>=12?setTimeout((()=>this._innerWrite(0,S))):this._innerWrite(c,S);return void h.catch((S=>(queueMicrotask((()=>{throw S})),Promise.resolve(!1)))).then(l)}const o=this._callbacks[this._bufferOffset];if(o&&o(),this._bufferOffset++,this._pendingData-=r.length,Date.now()-c>=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=a},5941:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.toRgbString=n.parseColor=void 0;const u=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,f=/^[\da-f]+$/;function _(a,p){const b=a.toString(16),w=b.length<2?"0"+b:b;switch(p){case 4:return b[0];case 8:return w;case 12:return(w+w).slice(0,3);default:return w+w}}n.parseColor=function(a){if(!a)return;let p=a.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const b=u.exec(p);if(b){const w=b[1]?15:b[4]?255:b[7]?4095:65535;return[Math.round(parseInt(b[1]||b[4]||b[7]||b[10],16)/w*255),Math.round(parseInt(b[2]||b[5]||b[8]||b[11],16)/w*255),Math.round(parseInt(b[3]||b[6]||b[9]||b[12],16)/w*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),f.exec(p)&&[3,6,9,12].includes(p.length))){const b=p.length/3,w=[0,0,0];for(let c=0;c<3;++c){const r=parseInt(p.slice(b*c,b*c+b),16);w[c]=b===1?r<<4:b===2?r:b===3?r>>4:r>>8}return w}},n.toRgbString=function(a,p=16){const[b,w,c]=a;return`rgb:${_(b,p)}/${_(w,p)}/${_(c,p)}`}},5770:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.PAYLOAD_LIMIT=void 0,n.PAYLOAD_LIMIT=1e7},6351:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DcsHandler=n.DcsParser=void 0;const f=u(482),_=u(8742),a=u(5770),p=[];n.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(w,c){this._handlers[w]===void 0&&(this._handlers[w]=[]);const r=this._handlers[w];return r.push(c),{dispose:()=>{const h=r.indexOf(c);h!==-1&&r.splice(h,1)}}}clearHandler(w){this._handlers[w]&&delete this._handlers[w]}setHandlerFallback(w){this._handlerFb=w}reset(){if(this._active.length)for(let w=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;w>=0;--w)this._active[w].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(w,c){if(this.reset(),this._ident=w,this._active=this._handlers[w]||p,this._active.length)for(let r=this._active.length-1;r>=0;r--)this._active[r].hook(c);else this._handlerFb(this._ident,"HOOK",c)}put(w,c,r){if(this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].put(w,c,r);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(w,c,r))}unhook(w,c=!0){if(this._active.length){let r=!1,h=this._active.length-1,o=!1;if(this._stack.paused&&(h=this._stack.loopPosition-1,r=c,o=this._stack.fallThrough,this._stack.paused=!1),!o&&r===!1){for(;h>=0&&(r=this._active[h].unhook(w),r!==!0);h--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!1,r;h--}for(;h>=0;h--)if(r=this._active[h].unhook(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!0,r}else this._handlerFb(this._ident,"UNHOOK",w);this._active=p,this._ident=0}};const b=new _.Params;b.addParam(0),n.DcsHandler=class{constructor(w){this._handler=w,this._data="",this._params=b,this._hitLimit=!1}hook(w){this._params=w.length>1||w.params[0]?w.clone():b,this._data="",this._hitLimit=!1}put(w,c,r){this._hitLimit||(this._data+=(0,f.utf32ToString)(w,c,r),this._data.length>a.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(w){let c=!1;if(this._hitLimit)c=!1;else if(w&&(c=this._handler(this._data,this._params),c instanceof Promise))return c.then((r=>(this._params=b,this._data="",this._hitLimit=!1,r)));return this._params=b,this._data="",this._hitLimit=!1,c}}},2015:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.EscapeSequenceParser=n.VT500_TRANSITION_TABLE=n.TransitionTable=void 0;const f=u(844),_=u(8742),a=u(6242),p=u(6351);class b{constructor(h){this.table=new Uint8Array(h)}setDefault(h,o){this.table.fill(h<<4|o)}add(h,o,l,S){this.table[o<<8|h]=l<<4|S}addMany(h,o,l,S){for(let x=0;x<h.length;x++)this.table[o<<8|h[x]]=l<<4|S}}n.TransitionTable=b;const w=160;n.VT500_TRANSITION_TABLE=(function(){const r=new b(4095),h=Array.apply(null,Array(256)).map(((y,m)=>m)),o=(y,m)=>h.slice(y,m),l=o(32,127),S=o(0,24);S.push(25),S.push.apply(S,o(28,32));const x=o(0,14);let v;for(v in r.setDefault(1,0),r.addMany(l,0,2,0),x)r.addMany([24,26,153,154],v,3,0),r.addMany(o(128,144),v,3,0),r.addMany(o(144,152),v,3,0),r.add(156,v,0,0),r.add(27,v,11,1),r.add(157,v,4,8),r.addMany([152,158,159],v,0,7),r.add(155,v,11,3),r.add(144,v,11,9);return r.addMany(S,0,3,0),r.addMany(S,1,3,1),r.add(127,1,0,1),r.addMany(S,8,0,8),r.addMany(S,3,3,3),r.add(127,3,0,3),r.addMany(S,4,3,4),r.add(127,4,0,4),r.addMany(S,6,3,6),r.addMany(S,5,3,5),r.add(127,5,0,5),r.addMany(S,2,3,2),r.add(127,2,0,2),r.add(93,1,4,8),r.addMany(l,8,5,8),r.add(127,8,5,8),r.addMany([156,27,24,26,7],8,6,0),r.addMany(o(28,32),8,0,8),r.addMany([88,94,95],1,0,7),r.addMany(l,7,0,7),r.addMany(S,7,0,7),r.add(156,7,0,0),r.add(127,7,0,7),r.add(91,1,11,3),r.addMany(o(64,127),3,7,0),r.addMany(o(48,60),3,8,4),r.addMany([60,61,62,63],3,9,4),r.addMany(o(48,60),4,8,4),r.addMany(o(64,127),4,7,0),r.addMany([60,61,62,63],4,0,6),r.addMany(o(32,64),6,0,6),r.add(127,6,0,6),r.addMany(o(64,127),6,0,0),r.addMany(o(32,48),3,9,5),r.addMany(o(32,48),5,9,5),r.addMany(o(48,64),5,0,6),r.addMany(o(64,127),5,7,0),r.addMany(o(32,48),4,9,5),r.addMany(o(32,48),1,9,2),r.addMany(o(32,48),2,9,2),r.addMany(o(48,127),2,10,0),r.addMany(o(48,80),1,10,0),r.addMany(o(81,88),1,10,0),r.addMany([89,90,92],1,10,0),r.addMany(o(96,127),1,10,0),r.add(80,1,11,9),r.addMany(S,9,0,9),r.add(127,9,0,9),r.addMany(o(28,32),9,0,9),r.addMany(o(32,48),9,9,12),r.addMany(o(48,60),9,8,10),r.addMany([60,61,62,63],9,9,10),r.addMany(S,11,0,11),r.addMany(o(32,128),11,0,11),r.addMany(o(28,32),11,0,11),r.addMany(S,10,0,10),r.add(127,10,0,10),r.addMany(o(28,32),10,0,10),r.addMany(o(48,60),10,8,10),r.addMany([60,61,62,63],10,0,11),r.addMany(o(32,48),10,9,12),r.addMany(S,12,0,12),r.add(127,12,0,12),r.addMany(o(28,32),12,0,12),r.addMany(o(32,48),12,9,12),r.addMany(o(48,64),12,0,11),r.addMany(o(64,127),12,12,13),r.addMany(o(64,127),10,12,13),r.addMany(o(64,127),9,12,13),r.addMany(S,13,13,13),r.addMany(l,13,13,13),r.add(127,13,0,13),r.addMany([27,156,24,26],13,14,0),r.add(w,0,2,0),r.add(w,8,5,8),r.add(w,6,0,6),r.add(w,11,0,11),r.add(w,13,13,13),r})();class c extends f.Disposable{constructor(h=n.VT500_TRANSITION_TABLE){super(),this._transitions=h,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new _.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(o,l,S)=>{},this._executeHandlerFb=o=>{},this._csiHandlerFb=(o,l)=>{},this._escHandlerFb=o=>{},this._errorHandlerFb=o=>o,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,f.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new a.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(h,o=[64,126]){let l=0;if(h.prefix){if(h.prefix.length>1)throw new Error("only one byte as prefix supported");if(l=h.prefix.charCodeAt(0),l&&60>l||l>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(h.intermediates){if(h.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let x=0;x<h.intermediates.length;++x){const v=h.intermediates.charCodeAt(x);if(32>v||v>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=v}}if(h.final.length!==1)throw new Error("final must be a single byte");const S=h.final.charCodeAt(0);if(o[0]>S||S>o[1])throw new Error(`final must be in range ${o[0]} .. ${o[1]}`);return l<<=8,l|=S,l}identToString(h){const o=[];for(;h;)o.push(String.fromCharCode(255&h)),h>>=8;return o.reverse().join("")}setPrintHandler(h){this._printHandler=h}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(h,o){const l=this._identifier(h,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);const S=this._escHandlers[l];return S.push(o),{dispose:()=>{const x=S.indexOf(o);x!==-1&&S.splice(x,1)}}}clearEscHandler(h){this._escHandlers[this._identifier(h,[48,126])]&&delete this._escHandlers[this._identifier(h,[48,126])]}setEscHandlerFallback(h){this._escHandlerFb=h}setExecuteHandler(h,o){this._executeHandlers[h.charCodeAt(0)]=o}clearExecuteHandler(h){this._executeHandlers[h.charCodeAt(0)]&&delete this._executeHandlers[h.charCodeAt(0)]}setExecuteHandlerFallback(h){this._executeHandlerFb=h}registerCsiHandler(h,o){const l=this._identifier(h);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);const S=this._csiHandlers[l];return S.push(o),{dispose:()=>{const x=S.indexOf(o);x!==-1&&S.splice(x,1)}}}clearCsiHandler(h){this._csiHandlers[this._identifier(h)]&&delete this._csiHandlers[this._identifier(h)]}setCsiHandlerFallback(h){this._csiHandlerFb=h}registerDcsHandler(h,o){return this._dcsParser.registerHandler(this._identifier(h),o)}clearDcsHandler(h){this._dcsParser.clearHandler(this._identifier(h))}setDcsHandlerFallback(h){this._dcsParser.setHandlerFallback(h)}registerOscHandler(h,o){return this._oscParser.registerHandler(h,o)}clearOscHandler(h){this._oscParser.clearHandler(h)}setOscHandlerFallback(h){this._oscParser.setHandlerFallback(h)}setErrorHandler(h){this._errorHandler=h}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(h,o,l,S,x){this._parseStack.state=h,this._parseStack.handlers=o,this._parseStack.handlerPos=l,this._parseStack.transition=S,this._parseStack.chunkPos=x}parse(h,o,l){let S,x=0,v=0,y=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,y=this._parseStack.chunkPos+1;else{if(l===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const m=this._parseStack.handlers;let C=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(l===!1&&C>-1){for(;C>=0&&(S=m[C](this._params),S!==!0);C--)if(S instanceof Promise)return this._parseStack.handlerPos=C,S}this._parseStack.handlers=[];break;case 4:if(l===!1&&C>-1){for(;C>=0&&(S=m[C](),S!==!0);C--)if(S instanceof Promise)return this._parseStack.handlerPos=C,S}this._parseStack.handlers=[];break;case 6:if(x=h[this._parseStack.chunkPos],S=this._dcsParser.unhook(x!==24&&x!==26,l),S)return S;x===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(x=h[this._parseStack.chunkPos],S=this._oscParser.end(x!==24&&x!==26,l),S)return S;x===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,y=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let m=y;m<o;++m){switch(x=h[m],v=this._transitions.table[this.currentState<<8|(x<160?x:w)],v>>4){case 2:for(let D=m+1;;++D){if(D>=o||(x=h[D])<32||x>126&&x<w){this._printHandler(h,m,D),m=D-1;break}if(++D>=o||(x=h[D])<32||x>126&&x<w){this._printHandler(h,m,D),m=D-1;break}if(++D>=o||(x=h[D])<32||x>126&&x<w){this._printHandler(h,m,D),m=D-1;break}if(++D>=o||(x=h[D])<32||x>126&&x<w){this._printHandler(h,m,D),m=D-1;break}}break;case 3:this._executeHandlers[x]?this._executeHandlers[x]():this._executeHandlerFb(x),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:m,code:x,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const C=this._csiHandlers[this._collect<<8|x];let L=C?C.length-1:-1;for(;L>=0&&(S=C[L](this._params),S!==!0);L--)if(S instanceof Promise)return this._preserveStack(3,C,L,v,m),S;L<0&&this._csiHandlerFb(this._collect<<8|x,this._params),this.precedingJoinState=0;break;case 8:do switch(x){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(x-48)}while(++m<o&&(x=h[m])>47&&x<60);m--;break;case 9:this._collect<<=8,this._collect|=x;break;case 10:const A=this._escHandlers[this._collect<<8|x];let E=A?A.length-1:-1;for(;E>=0&&(S=A[E](),S!==!0);E--)if(S instanceof Promise)return this._preserveStack(4,A,E,v,m),S;E<0&&this._escHandlerFb(this._collect<<8|x),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|x,this._params);break;case 13:for(let D=m+1;;++D)if(D>=o||(x=h[D])===24||x===26||x===27||x>127&&x<w){this._dcsParser.put(h,m,D),m=D-1;break}break;case 14:if(S=this._dcsParser.unhook(x!==24&&x!==26),S)return this._preserveStack(6,[],0,v,m),S;x===27&&(v|=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=m+1;;D++)if(D>=o||(x=h[D])<32||x>127&&x<w){this._oscParser.put(h,m,D),m=D-1;break}break;case 6:if(S=this._oscParser.end(x!==24&&x!==26),S)return this._preserveStack(5,[],0,v,m),S;x===27&&(v|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&v}}}n.EscapeSequenceParser=c},6242:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OscHandler=n.OscParser=void 0;const f=u(5770),_=u(482),a=[];n.OscParser=class{constructor(){this._state=0,this._active=a,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,b){this._handlers[p]===void 0&&(this._handlers[p]=[]);const w=this._handlers[p];return w.push(b),{dispose:()=>{const c=w.indexOf(b);c!==-1&&w.splice(c,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=a}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=a,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||a,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,b,w){if(this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].put(p,b,w);else this._handlerFb(this._id,"PUT",(0,_.utf32ToString)(p,b,w))}start(){this.reset(),this._state=1}put(p,b,w){if(this._state!==3){if(this._state===1)for(;b<w;){const c=p[b++];if(c===59){this._state=2,this._start();break}if(c<48||57<c)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+c-48}this._state===2&&w-b>0&&this._put(p,b,w)}}end(p,b=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let w=!1,c=this._active.length-1,r=!1;if(this._stack.paused&&(c=this._stack.loopPosition-1,w=b,r=this._stack.fallThrough,this._stack.paused=!1),!r&&w===!1){for(;c>=0&&(w=this._active[c].end(p),w!==!0);c--)if(w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!1,w;c--}for(;c>=0;c--)if(w=this._active[c].end(!1),w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!0,w}else this._handlerFb(this._id,"END",p);this._active=a,this._id=-1,this._state=0}}},n.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,b,w){this._hitLimit||(this._data+=(0,_.utf32ToString)(p,b,w),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let b=!1;if(this._hitLimit)b=!1;else if(p&&(b=this._handler(this._data),b instanceof Promise))return b.then((w=>(this._data="",this._hitLimit=!1,w)));return this._data="",this._hitLimit=!1,b}}},8742:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Params=void 0;const u=2147483647;class f{static fromArray(a){const p=new f;if(!a.length)return p;for(let b=Array.isArray(a[0])?1:0;b<a.length;++b){const w=a[b];if(Array.isArray(w))for(let c=0;c<w.length;++c)p.addSubParam(w[c]);else p.addParam(w)}return p}constructor(a=32,p=32){if(this.maxLength=a,this.maxSubParamsLength=p,p>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(a),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(a),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const a=new f(this.maxLength,this.maxSubParamsLength);return a.params.set(this.params),a.length=this.length,a._subParams.set(this._subParams),a._subParamsLength=this._subParamsLength,a._subParamsIdx.set(this._subParamsIdx),a._rejectDigits=this._rejectDigits,a._rejectSubDigits=this._rejectSubDigits,a._digitIsSub=this._digitIsSub,a}toArray(){const a=[];for(let p=0;p<this.length;++p){a.push(this.params[p]);const b=this._subParamsIdx[p]>>8,w=255&this._subParamsIdx[p];w-b>0&&a.push(Array.prototype.slice.call(this._subParams,b,w))}return a}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(a){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(a<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=a>u?u:a}}addSubParam(a){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(a<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=a>u?u:a,this._subParamsIdx[this.length-1]++}}hasSubParams(a){return(255&this._subParamsIdx[a])-(this._subParamsIdx[a]>>8)>0}getSubParams(a){const p=this._subParamsIdx[a]>>8,b=255&this._subParamsIdx[a];return b-p>0?this._subParams.subarray(p,b):null}getSubParamsAll(){const a={};for(let p=0;p<this.length;++p){const b=this._subParamsIdx[p]>>8,w=255&this._subParamsIdx[p];w-b>0&&(a[p]=this._subParams.slice(b,w))}return a}addDigit(a){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const b=this._digitIsSub?this._subParams:this.params,w=b[p-1];b[p-1]=~w?Math.min(10*w+a,u):a}}n.Params=f},5741:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.AddonManager=void 0,n.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,f){const _={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(_),f.dispose=()=>this._wrappedAddonDispose(_),f.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let f=-1;for(let _=0;_<this._addons.length;_++)if(this._addons[_]===u){f=_;break}if(f===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(f,1)}}},8771:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferApiView=void 0;const f=u(3785),_=u(511);n.BufferApiView=class{constructor(a,p){this._buffer=a,this.type=p}init(a){return this._buffer=a,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(a){const p=this._buffer.lines.get(a);if(p)return new f.BufferLineApiView(p)}getNullCell(){return new _.CellData}}},3785:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLineApiView=void 0;const f=u(511);n.BufferLineApiView=class{constructor(_){this._line=_}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(_,a){if(!(_<0||_>=this._line.length))return a?(this._line.loadCell(_,a),a):this._line.loadCell(_,new f.CellData)}translateToString(_,a,p){return this._line.translateToString(_,a,p)}}},8285:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferNamespaceApi=void 0;const f=u(8771),_=u(8460),a=u(844);class p extends a.Disposable{constructor(w){super(),this._core=w,this._onBufferChange=this.register(new _.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new f.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new f.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}n.BufferNamespaceApi=p},7975:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ParserApi=void 0,n.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,f){return this._core.registerCsiHandler(u,(_=>f(_.toArray())))}addCsiHandler(u,f){return this.registerCsiHandler(u,f)}registerDcsHandler(u,f){return this._core.registerDcsHandler(u,((_,a)=>f(_,a.toArray())))}addDcsHandler(u,f){return this.registerDcsHandler(u,f)}registerEscHandler(u,f){return this._core.registerEscHandler(u,f)}addEscHandler(u,f){return this.registerEscHandler(u,f)}registerOscHandler(u,f){return this._core.registerOscHandler(u,f)}addOscHandler(u,f){return this.registerOscHandler(u,f)}}},7090:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeApi=void 0,n.UnicodeApi=class{constructor(u){this._core=u}register(u){this._core.unicodeService.register(u)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(u){this._core.unicodeService.activeVersion=u}}},744:function($,n,u){var f=this&&this.__decorate||function(r,h,o,l){var S,x=arguments.length,v=x<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,h,o,l);else for(var y=r.length-1;y>=0;y--)(S=r[y])&&(v=(x<3?S(v):x>3?S(h,o,v):S(h,o))||v);return x>3&&v&&Object.defineProperty(h,o,v),v},_=this&&this.__param||function(r,h){return function(o,l){h(o,l,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferService=n.MINIMUM_ROWS=n.MINIMUM_COLS=void 0;const a=u(8460),p=u(844),b=u(5295),w=u(2585);n.MINIMUM_COLS=2,n.MINIMUM_ROWS=1;let c=n.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(r){super(),this.isUserScrolling=!1,this._onResize=this.register(new a.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new a.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(r.rawOptions.cols||0,n.MINIMUM_COLS),this.rows=Math.max(r.rawOptions.rows||0,n.MINIMUM_ROWS),this.buffers=this.register(new b.BufferSet(r,this))}resize(r,h){this.cols=r,this.rows=h,this.buffers.resize(r,h),this._onResize.fire({cols:r,rows:h})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(r,h=!1){const o=this.buffer;let l;l=this._cachedBlankLine,l&&l.length===this.cols&&l.getFg(0)===r.fg&&l.getBg(0)===r.bg||(l=o.getBlankLine(r,h),this._cachedBlankLine=l),l.isWrapped=h;const S=o.ybase+o.scrollTop,x=o.ybase+o.scrollBottom;if(o.scrollTop===0){const v=o.lines.isFull;x===o.lines.length-1?v?o.lines.recycle().copyFrom(l):o.lines.push(l.clone()):o.lines.splice(x+1,0,l.clone()),v?this.isUserScrolling&&(o.ydisp=Math.max(o.ydisp-1,0)):(o.ybase++,this.isUserScrolling||o.ydisp++)}else{const v=x-S+1;o.lines.shiftElements(S+1,v-1,-1),o.lines.set(x,l.clone())}this.isUserScrolling||(o.ydisp=o.ybase),this._onScroll.fire(o.ydisp)}scrollLines(r,h,o){const l=this.buffer;if(r<0){if(l.ydisp===0)return;this.isUserScrolling=!0}else r+l.ydisp>=l.ybase&&(this.isUserScrolling=!1);const S=l.ydisp;l.ydisp=Math.max(Math.min(l.ydisp+r,l.ybase),0),S!==l.ydisp&&(h||this._onScroll.fire(l.ydisp))}};n.BufferService=c=f([_(0,w.IOptionsService)],c)},7994:($,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(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,f){this._charsets[u]=f,this.glevel===u&&(this.charset=f)}}},1753:function($,n,u){var f=this&&this.__decorate||function(l,S,x,v){var y,m=arguments.length,C=m<3?S:v===null?v=Object.getOwnPropertyDescriptor(S,x):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(l,S,x,v);else for(var L=l.length-1;L>=0;L--)(y=l[L])&&(C=(m<3?y(C):m>3?y(S,x,C):y(S,x))||C);return m>3&&C&&Object.defineProperty(S,x,C),C},_=this&&this.__param||function(l,S){return function(x,v){S(x,v,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreMouseService=void 0;const a=u(2585),p=u(8460),b=u(844),w={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:l=>l.button!==4&&l.action===1&&(l.ctrl=!1,l.alt=!1,l.shift=!1,!0)},VT200:{events:19,restrict:l=>l.action!==32},DRAG:{events:23,restrict:l=>l.action!==32||l.button!==3},ANY:{events:31,restrict:l=>!0}};function c(l,S){let x=(l.ctrl?16:0)|(l.shift?4:0)|(l.alt?8:0);return l.button===4?(x|=64,x|=l.action):(x|=3&l.button,4&l.button&&(x|=64),8&l.button&&(x|=128),l.action===32?x|=32:l.action!==0||S||(x|=3)),x}const r=String.fromCharCode,h={DEFAULT:l=>{const S=[c(l,!1)+32,l.col+32,l.row+32];return S[0]>255||S[1]>255||S[2]>255?"":`\x1B[M${r(S[0])}${r(S[1])}${r(S[2])}`},SGR:l=>{const S=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${c(l,!0)};${l.col};${l.row}${S}`},SGR_PIXELS:l=>{const S=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${c(l,!0)};${l.x};${l.y}${S}`}};let o=n.CoreMouseService=class extends b.Disposable{constructor(l,S){super(),this._bufferService=l,this._coreService=S,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const x of Object.keys(w))this.addProtocol(x,w[x]);for(const x of Object.keys(h))this.addEncoding(x,h[x]);this.reset()}addProtocol(l,S){this._protocols[l]=S}addEncoding(l,S){this._encodings[l]=S}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(l){if(!this._protocols[l])throw new Error(`unknown protocol "${l}"`);this._activeProtocol=l,this._onProtocolChange.fire(this._protocols[l].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(l){if(!this._encodings[l])throw new Error(`unknown encoding "${l}"`);this._activeEncoding=l}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(l){if(l.col<0||l.col>=this._bufferService.cols||l.row<0||l.row>=this._bufferService.rows||l.button===4&&l.action===32||l.button===3&&l.action!==32||l.button!==4&&(l.action===2||l.action===3)||(l.col++,l.row++,l.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,l,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(l))return!1;const S=this._encodings[this._activeEncoding](l);return S&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(S):this._coreService.triggerDataEvent(S,!0)),this._lastEvent=l,!0}explainEvents(l){return{down:!!(1&l),up:!!(2&l),drag:!!(4&l),move:!!(8&l),wheel:!!(16&l)}}_equalEvents(l,S,x){if(x){if(l.x!==S.x||l.y!==S.y)return!1}else if(l.col!==S.col||l.row!==S.row)return!1;return l.button===S.button&&l.action===S.action&&l.ctrl===S.ctrl&&l.alt===S.alt&&l.shift===S.shift}};n.CoreMouseService=o=f([_(0,a.IBufferService),_(1,a.ICoreService)],o)},6975:function($,n,u){var f=this&&this.__decorate||function(o,l,S,x){var v,y=arguments.length,m=y<3?l:x===null?x=Object.getOwnPropertyDescriptor(l,S):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(o,l,S,x);else for(var C=o.length-1;C>=0;C--)(v=o[C])&&(m=(y<3?v(m):y>3?v(l,S,m):v(l,S))||m);return y>3&&m&&Object.defineProperty(l,S,m),m},_=this&&this.__param||function(o,l){return function(S,x){l(S,x,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreService=void 0;const a=u(1439),p=u(8460),b=u(844),w=u(2585),c=Object.freeze({insertMode:!1}),r=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let h=n.CoreService=class extends b.Disposable{constructor(o,l,S){super(),this._bufferService=o,this._logService=l,this._optionsService=S,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,a.clone)(c),this.decPrivateModes=(0,a.clone)(r)}reset(){this.modes=(0,a.clone)(c),this.decPrivateModes=(0,a.clone)(r)}triggerDataEvent(o,l=!1){if(this._optionsService.rawOptions.disableStdin)return;const S=this._bufferService.buffer;l&&this._optionsService.rawOptions.scrollOnUserInput&&S.ybase!==S.ydisp&&this._onRequestScrollToBottom.fire(),l&&this._onUserInput.fire(),this._logService.debug(`sending data "${o}"`,(()=>o.split("").map((x=>x.charCodeAt(0))))),this._onData.fire(o)}triggerBinaryEvent(o){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${o}"`,(()=>o.split("").map((l=>l.charCodeAt(0))))),this._onBinary.fire(o))}};n.CoreService=h=f([_(0,w.IBufferService),_(1,w.ILogService),_(2,w.IOptionsService)],h)},9074:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DecorationService=void 0;const f=u(8055),_=u(8460),a=u(844),p=u(6106);let b=0,w=0;class c extends a.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((o=>o==null?void 0:o.marker.line)),this._onDecorationRegistered=this.register(new _.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new _.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,a.toDisposable)((()=>this.reset())))}registerDecoration(o){if(o.marker.isDisposed)return;const l=new r(o);if(l){const S=l.marker.onDispose((()=>l.dispose()));l.onDispose((()=>{l&&(this._decorations.delete(l)&&this._onDecorationRemoved.fire(l),S.dispose())})),this._decorations.insert(l),this._onDecorationRegistered.fire(l)}return l}reset(){for(const o of this._decorations.values())o.dispose();this._decorations.clear()}*getDecorationsAtCell(o,l,S){let x=0,v=0;for(const y of this._decorations.getKeyIterator(l))x=y.options.x??0,v=x+(y.options.width??1),o>=x&&o<v&&(!S||(y.options.layer??"bottom")===S)&&(yield y)}forEachDecorationAtCell(o,l,S,x){this._decorations.forEachByKey(l,(v=>{b=v.options.x??0,w=b+(v.options.width??1),o>=b&&o<w&&(!S||(v.options.layer??"bottom")===S)&&x(v)}))}}n.DecorationService=c;class r extends a.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=f.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=f.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(o){super(),this.options=o,this.onRenderEmitter=this.register(new _.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new _.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=o.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.InstantiationService=n.ServiceCollection=void 0;const f=u(2585),_=u(8343);class a{constructor(...b){this._entries=new Map;for(const[w,c]of b)this.set(w,c)}set(b,w){const c=this._entries.get(b);return this._entries.set(b,w),c}forEach(b){for(const[w,c]of this._entries.entries())b(w,c)}has(b){return this._entries.has(b)}get(b){return this._entries.get(b)}}n.ServiceCollection=a,n.InstantiationService=class{constructor(){this._services=new a,this._services.set(f.IInstantiationService,this)}setService(p,b){this._services.set(p,b)}getService(p){return this._services.get(p)}createInstance(p,...b){const w=(0,_.getServiceDependencies)(p).sort(((h,o)=>h.index-o.index)),c=[];for(const h of w){const o=this._services.get(h.id);if(!o)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${h.id}.`);c.push(o)}const r=w.length>0?w[0].index:b.length;if(b.length!==r)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${r+1} conflicts with ${b.length} static arguments`);return new p(...b,...c)}}},7866:function($,n,u){var f=this&&this.__decorate||function(r,h,o,l){var S,x=arguments.length,v=x<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,h,o,l);else for(var y=r.length-1;y>=0;y--)(S=r[y])&&(v=(x<3?S(v):x>3?S(h,o,v):S(h,o))||v);return x>3&&v&&Object.defineProperty(h,o,v),v},_=this&&this.__param||function(r,h){return function(o,l){h(o,l,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const a=u(844),p=u(2585),b={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let w,c=n.LogService=class extends a.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),w=this}_updateLogLevel(){this._logLevel=b[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let h=0;h<r.length;h++)typeof r[h]=="function"&&(r[h]=r[h]())}_log(r,h,o){this._evalLazyOptionalParams(o),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...o)}trace(r,...h){var o;this._logLevel<=p.LogLevelEnum.TRACE&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var o;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var o;this._logLevel<=p.LogLevelEnum.INFO&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var o;this._logLevel<=p.LogLevelEnum.WARN&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var o;this._logLevel<=p.LogLevelEnum.ERROR&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.error.bind(this._optionsService.options.logger))??console.error,r,h)}};n.LogService=c=f([_(0,p.IOptionsService)],c),n.setTraceLogger=function(r){w=r},n.traceCall=function(r,h,o){if(typeof o.value!="function")throw new Error("not supported");const l=o.value;o.value=function(...S){if(w.logLevel!==p.LogLevelEnum.TRACE)return l.apply(this,S);w.trace(`GlyphRenderer#${l.name}(${S.map((v=>JSON.stringify(v))).join(", ")})`);const x=l.apply(this,S);return w.trace(`GlyphRenderer#${l.name} return`,x),x}}},7302:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OptionsService=n.DEFAULT_OPTIONS=void 0;const f=u(8460),_=u(844),a=u(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:a.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class b extends _.Disposable{constructor(c){super(),this._onOptionChange=this.register(new f.EventEmitter),this.onOptionChange=this._onOptionChange.event;const r={...n.DEFAULT_OPTIONS};for(const h in c)if(h in r)try{const o=c[h];r[h]=this._sanitizeAndValidateOption(h,o)}catch(o){console.error(o)}this.rawOptions=r,this.options={...r},this._setupOptions(),this.register((0,_.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(c,r){return this.onOptionChange((h=>{h===c&&r(this.rawOptions[c])}))}onMultipleOptionChange(c,r){return this.onOptionChange((h=>{c.indexOf(h)!==-1&&r()}))}_setupOptions(){const c=h=>{if(!(h in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);return this.rawOptions[h]},r=(h,o)=>{if(!(h in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);o=this._sanitizeAndValidateOption(h,o),this.rawOptions[h]!==o&&(this.rawOptions[h]=o,this._onOptionChange.fire(h))};for(const h in this.rawOptions){const o={get:c.bind(this,h),set:r.bind(this,h)};Object.defineProperty(this.options,h,o)}}_sanitizeAndValidateOption(c,r){switch(c){case"cursorStyle":if(r||(r=n.DEFAULT_OPTIONS[c]),!(function(h){return h==="block"||h==="underline"||h==="bar"})(r))throw new Error(`"${r}" is not a valid value for ${c}`);break;case"wordSeparator":r||(r=n.DEFAULT_OPTIONS[c]);break;case"fontWeight":case"fontWeightBold":if(typeof r=="number"&&1<=r&&r<=1e3)break;r=p.includes(r)?r:n.DEFAULT_OPTIONS[c];break;case"cursorWidth":r=Math.floor(r);case"lineHeight":case"tabStopWidth":if(r<1)throw new Error(`${c} cannot be less than 1, value: ${r}`);break;case"minimumContrastRatio":r=Math.max(1,Math.min(21,Math.round(10*r)/10));break;case"scrollback":if((r=Math.min(r,4294967295))<0)throw new Error(`${c} cannot be less than 0, value: ${r}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(r<=0)throw new Error(`${c} cannot be less than or equal to 0, value: ${r}`);break;case"rows":case"cols":if(!r&&r!==0)throw new Error(`${c} must be numeric, value: ${r}`);break;case"windowsPty":r=r??{}}return r}}n.OptionsService=b},2660:function($,n,u){var f=this&&this.__decorate||function(b,w,c,r){var h,o=arguments.length,l=o<3?w:r===null?r=Object.getOwnPropertyDescriptor(w,c):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(b,w,c,r);else for(var S=b.length-1;S>=0;S--)(h=b[S])&&(l=(o<3?h(l):o>3?h(w,c,l):h(w,c))||l);return o>3&&l&&Object.defineProperty(w,c,l),l},_=this&&this.__param||function(b,w){return function(c,r){w(c,r,b)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkService=void 0;const a=u(2585);let p=n.OscLinkService=class{constructor(b){this._bufferService=b,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(b){const w=this._bufferService.buffer;if(b.id===void 0){const S=w.addMarker(w.ybase+w.y),x={data:b,id:this._nextId++,lines:[S]};return S.onDispose((()=>this._removeMarkerFromLink(x,S))),this._dataByLinkId.set(x.id,x),x.id}const c=b,r=this._getEntryIdKey(c),h=this._entriesWithId.get(r);if(h)return this.addLineToLink(h.id,w.ybase+w.y),h.id;const o=w.addMarker(w.ybase+w.y),l={id:this._nextId++,key:this._getEntryIdKey(c),data:c,lines:[o]};return o.onDispose((()=>this._removeMarkerFromLink(l,o))),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(b,w){const c=this._dataByLinkId.get(b);if(c&&c.lines.every((r=>r.line!==w))){const r=this._bufferService.buffer.addMarker(w);c.lines.push(r),r.onDispose((()=>this._removeMarkerFromLink(c,r)))}}getLinkData(b){var w;return(w=this._dataByLinkId.get(b))==null?void 0:w.data}_getEntryIdKey(b){return`${b.id};;${b.uri}`}_removeMarkerFromLink(b,w){const c=b.lines.indexOf(w);c!==-1&&(b.lines.splice(c,1),b.lines.length===0&&(b.data.id!==void 0&&this._entriesWithId.delete(b.key),this._dataByLinkId.delete(b.id)))}};n.OscLinkService=p=f([_(0,a.IBufferService)],p)},8343:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const u="di$target",f="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(_){return _[f]||[]},n.createDecorator=function(_){if(n.serviceRegistry.has(_))return n.serviceRegistry.get(_);const a=function(p,b,w){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(c,r,h){r[u]===r?r[f].push({id:c,index:h}):(r[f]=[{id:c,index:h}],r[u]=r)})(a,p,w)};return a.toString=()=>_,n.serviceRegistry.set(_,a),a}},2585:($,n,u)=>{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 f=u(8343);var _;n.IBufferService=(0,f.createDecorator)("BufferService"),n.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),n.ICoreService=(0,f.createDecorator)("CoreService"),n.ICharsetService=(0,f.createDecorator)("CharsetService"),n.IInstantiationService=(0,f.createDecorator)("InstantiationService"),(function(a){a[a.TRACE=0]="TRACE",a[a.DEBUG=1]="DEBUG",a[a.INFO=2]="INFO",a[a.WARN=3]="WARN",a[a.ERROR=4]="ERROR",a[a.OFF=5]="OFF"})(_||(n.LogLevelEnum=_={})),n.ILogService=(0,f.createDecorator)("LogService"),n.IOptionsService=(0,f.createDecorator)("OptionsService"),n.IOscLinkService=(0,f.createDecorator)("OscLinkService"),n.IUnicodeService=(0,f.createDecorator)("UnicodeService"),n.IDecorationService=(0,f.createDecorator)("DecorationService")},1480:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeService=void 0;const f=u(8460),_=u(225);class a{static extractShouldJoin(b){return(1&b)!=0}static extractWidth(b){return b>>1&3}static extractCharKind(b){return b>>3}static createPropertyValue(b,w,c=!1){return(16777215&b)<<3|(3&w)<<1|(c?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new f.EventEmitter,this.onChange=this._onChange.event;const b=new _.UnicodeV6;this.register(b),this._active=b.version,this._activeProvider=b}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(b){if(!this._providers[b])throw new Error(`unknown Unicode version "${b}"`);this._active=b,this._activeProvider=this._providers[b],this._onChange.fire(b)}register(b){this._providers[b.version]=b}wcwidth(b){return this._activeProvider.wcwidth(b)}getStringCellWidth(b){let w=0,c=0;const r=b.length;for(let h=0;h<r;++h){let o=b.charCodeAt(h);if(55296<=o&&o<=56319){if(++h>=r)return w+this.wcwidth(o);const x=b.charCodeAt(h);56320<=x&&x<=57343?o=1024*(o-55296)+x-56320+65536:w+=this.wcwidth(x)}const l=this.charProperties(o,c);let S=a.extractWidth(l);a.extractShouldJoin(l)&&(S-=a.extractWidth(c)),w+=S,c=l}return w}charProperties(b,w){return this._activeProvider.charProperties(b,w)}}n.UnicodeService=a}},j={};function Z($){var n=j[$];if(n!==void 0)return n.exports;var u=j[$]={exports:{}};return X[$].call(u.exports,u,u.exports,Z),u.exports}var ne={};return(()=>{var $=ne;Object.defineProperty($,"__esModule",{value:!0}),$.Terminal=void 0;const n=Z(9042),u=Z(3236),f=Z(844),_=Z(5741),a=Z(8285),p=Z(7975),b=Z(7090),w=["cols","rows"];class c extends f.Disposable{constructor(h){super(),this._core=this.register(new u.Terminal(h)),this._addonManager=this.register(new _.AddonManager),this._publicOptions={...this._core.options};const o=S=>this._core.options[S],l=(S,x)=>{this._checkReadonlyOptions(S),this._core.options[S]=x};for(const S in this._core.options){const x={get:o.bind(this,S),set:l.bind(this,S)};Object.defineProperty(this._publicOptions,S,x)}}_checkReadonlyOptions(h){if(w.includes(h))throw new Error(`Option "${h}" 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 p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new b.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 a.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const h=this._core.coreService.decPrivateModes;let o="none";switch(this._core.coreMouseService.activeProtocol){case"X10":o="x10";break;case"VT200":o="vt200";break;case"DRAG":o="drag";break;case"ANY":o="any"}return{applicationCursorKeysMode:h.applicationCursorKeys,applicationKeypadMode:h.applicationKeypad,bracketedPasteMode:h.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:o,originMode:h.origin,reverseWraparoundMode:h.reverseWraparound,sendFocusMode:h.sendFocus,wraparoundMode:h.wraparound}}get options(){return this._publicOptions}set options(h){for(const o in h)this._publicOptions[o]=h[o]}blur(){this._core.blur()}focus(){this._core.focus()}input(h,o=!0){this._core.input(h,o)}resize(h,o){this._verifyIntegers(h,o),this._core.resize(h,o)}open(h){this._core.open(h)}attachCustomKeyEventHandler(h){this._core.attachCustomKeyEventHandler(h)}attachCustomWheelEventHandler(h){this._core.attachCustomWheelEventHandler(h)}registerLinkProvider(h){return this._core.registerLinkProvider(h)}registerCharacterJoiner(h){return this._checkProposedApi(),this._core.registerCharacterJoiner(h)}deregisterCharacterJoiner(h){this._checkProposedApi(),this._core.deregisterCharacterJoiner(h)}registerMarker(h=0){return this._verifyIntegers(h),this._core.registerMarker(h)}registerDecoration(h){return this._checkProposedApi(),this._verifyPositiveIntegers(h.x??0,h.width??0,h.height??0),this._core.registerDecoration(h)}hasSelection(){return this._core.hasSelection()}select(h,o,l){this._verifyIntegers(h,o,l),this._core.select(h,o,l)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(h,o){this._verifyIntegers(h,o),this._core.selectLines(h,o)}dispose(){super.dispose()}scrollLines(h){this._verifyIntegers(h),this._core.scrollLines(h)}scrollPages(h){this._verifyIntegers(h),this._core.scrollPages(h)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(h){this._verifyIntegers(h),this._core.scrollToLine(h)}clear(){this._core.clear()}write(h,o){this._core.write(h,o)}writeln(h,o){this._core.write(h),this._core.write(`\r
57
- `,o)}paste(h){this._core.paste(h)}refresh(h,o){this._verifyIntegers(h,o),this._core.refresh(h,o)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(h){this._addonManager.loadAddon(this,h)}static get strings(){return n}_verifyIntegers(...h){for(const o of h)if(o===1/0||isNaN(o)||o%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...h){for(const o of h)if(o&&(o===1/0||isNaN(o)||o%1!=0||o<0))throw new Error("This API only accepts positive integers")}}$.Terminal=c})(),ne})()))})(ko)),ko.exports}var rg=sg(),Ho={exports:{}},Zd;function ng(){return Zd||(Zd=1,(function(U,G){(function(X,j){U.exports=j()})(self,(()=>(()=>{var X={};return(()=>{var j=X;Object.defineProperty(j,"__esModule",{value:!0}),j.FitAddon=void 0,j.FitAddon=class{activate(Z){this._terminal=Z}dispose(){}fit(){const Z=this.proposeDimensions();if(!Z||!this._terminal||isNaN(Z.cols)||isNaN(Z.rows))return;const ne=this._terminal._core;this._terminal.rows===Z.rows&&this._terminal.cols===Z.cols||(ne._renderService.clear(),this._terminal.resize(Z.cols,Z.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const Z=this._terminal._core,ne=Z._renderService.dimensions;if(ne.css.cell.width===0||ne.css.cell.height===0)return;const $=this._terminal.options.scrollback===0?0:Z.viewport.scrollBarWidth,n=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(n.getPropertyValue("height")),f=Math.max(0,parseInt(n.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),a=u-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),p=f-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-$;return{cols:Math.max(2,Math.floor(p/ne.css.cell.width)),rows:Math.max(1,Math.floor(a/ne.css.cell.height))}}}})(),X})()))})(Ho)),Ho.exports}var ag=ng(),zo={exports:{}},Jd;function lg(){return Jd||(Jd=1,(function(U,G){(function(X,j){U.exports=j()})(self,(()=>(()=>{var X={965:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GlyphRenderer=void 0;const f=u(374),_=u(509),a=u(855),p=u(859),b=u(381),w=11,c=w*Float32Array.BYTES_PER_ELEMENT;let r,h=0,o=0,l=0;class S extends p.Disposable{constructor(v,y,m,C){super(),this._terminal=v,this._gl=y,this._dimensions=m,this._optionsService=C,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const L=this._gl;_.TextureAtlas.maxAtlasPages===void 0&&(_.TextureAtlas.maxAtlasPages=Math.min(32,(0,f.throwIfFalsy)(L.getParameter(L.MAX_TEXTURE_IMAGE_UNITS))),_.TextureAtlas.maxTextureSize=(0,f.throwIfFalsy)(L.getParameter(L.MAX_TEXTURE_SIZE))),this._program=(0,f.throwIfFalsy)((0,b.createProgram)(L,`#version 300 es
55
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(m){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),h.isLinux&&m&&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(m){const C=this._getMouseBufferCoords(m),L=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!!(L&&M&&C)&&this._areCoordsInSelection(C,L,M)}isCellInSelection(m,C){const L=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!L||!M)&&this._areCoordsInSelection([m,C],L,M)}_areCoordsInSelection(m,C,L){return m[1]>C[1]&&m[1]<L[1]||C[1]===L[1]&&m[1]===C[1]&&m[0]>=C[0]&&m[0]<L[0]||C[1]<L[1]&&m[1]===L[1]&&m[0]<L[0]||C[1]<L[1]&&m[1]===C[1]&&m[0]>=C[0]}_selectWordAtCursor(m,C){var E,R;const L=(R=(E=this._linkifier.currentLink)==null?void 0:E.link)==null?void 0:R.range;if(L)return this._model.selectionStart=[L.start.x-1,L.start.y-1],this._model.selectionStartLength=(0,c.getRangeLength)(L,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const M=this._getMouseBufferCoords(m);return!!M&&(this._selectWordAt(M,C),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(m,C){this._model.clearSelection(),m=Math.max(m,0),C=Math.min(C,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,m],this._model.selectionEnd=[this._bufferService.cols,C],this.refresh(),this._onSelectionChange.fire()}_handleTrim(m){this._model.handleTrim(m)&&this.refresh()}_getMouseBufferCoords(m){const C=this._mouseService.getCoords(m,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(C)return C[0]--,C[1]--,C[1]+=this._bufferService.buffer.ydisp,C}_getMouseEventScrollAmount(m){let C=(0,a.getCoordsRelativeToElement)(this._coreBrowserService.window,m,this._screenElement)[1];const L=this._renderService.dimensions.css.canvas.height;return C>=0&&C<=L?0:(C>L&&(C-=L),C=Math.min(Math.max(C,-50),50),C/=50,C/Math.abs(C)+Math.round(14*C))}shouldForceSelection(m){return h.isMac?m.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:m.shiftKey}handleMouseDown(m){if(this._mouseDownTimeStamp=m.timeStamp,(m.button!==2||!this.hasSelection)&&m.button===0){if(!this._enabled){if(!this.shouldForceSelection(m))return;m.stopPropagation()}m.preventDefault(),this._dragScrollAmount=0,this._enabled&&m.shiftKey?this._handleIncrementalClick(m):m.detail===1?this._handleSingleClick(m):m.detail===2?this._handleDoubleClick(m):m.detail===3&&this._handleTripleClick(m),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(m){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(m))}_handleSingleClick(m){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(m)?3:0,this._model.selectionStart=this._getMouseBufferCoords(m),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const C=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);C&&C.length!==this._model.selectionStart[0]&&C.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(m){this._selectWordAtCursor(m,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(m){const C=this._getMouseBufferCoords(m);C&&(this._activeSelectionMode=2,this._selectLineAt(C[1]))}shouldColumnSelect(m){return m.altKey&&!(h.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(m){if(m.stopImmediatePropagation(),!this._model.selectionStart)return;const C=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(m),!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(m),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const L=this._bufferService.buffer;if(this._model.selectionEnd[1]<L.lines.length){const M=L.lines.get(this._model.selectionEnd[1]);M&&M.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}C&&C[0]===this._model.selectionEnd[0]&&C[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 m=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(m.ydisp+this._bufferService.rows,m.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=m.ydisp),this.refresh()}}_handleMouseUp(m){const C=m.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&C<500&&m.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const L=this._mouseService.getCoords(m,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(L&&L[0]!==void 0&&L[1]!==void 0){const M=(0,p.moveToCellSequence)(L[0]-1,L[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(M,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const m=this._model.finalSelectionStart,C=this._model.finalSelectionEnd,L=!(!m||!C||m[0]===C[0]&&m[1]===C[1]);L?m&&C&&(this._oldSelectionStart&&this._oldSelectionEnd&&m[0]===this._oldSelectionStart[0]&&m[1]===this._oldSelectionStart[1]&&C[0]===this._oldSelectionEnd[0]&&C[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(m,C,L)):this._oldHasSelection&&this._fireOnSelectionChange(m,C,L)}_fireOnSelectionChange(m,C,L){this._oldSelectionStart=m,this._oldSelectionEnd=C,this._oldHasSelection=L,this._onSelectionChange.fire()}_handleBufferActivate(m){this.clearSelection(),this._trimListener.dispose(),this._trimListener=m.activeBuffer.lines.onTrim((C=>this._handleTrim(C)))}_convertViewportColToCharacterIndex(m,C){let L=C;for(let M=0;C>=M;M++){const E=m.loadCell(M,this._workCell).getChars().length;this._workCell.getWidth()===0?L--:E>1&&C!==M&&(L+=E-1)}return L}setSelection(m,C,L){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[m,C],this._model.selectionStartLength=L,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(m){this._isClickInSelection(m)||(this._selectWordAtCursor(m,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(m,C,L=!0,M=!0){if(m[0]>=this._bufferService.cols)return;const E=this._bufferService.buffer,R=E.lines.get(m[1]);if(!R)return;const B=E.translateBufferLineToString(m[1],!1);let $=this._convertViewportColToCharacterIndex(R,m[0]),N=$;const I=m[0]-$;let F=0,D=0,O=0,T=0;if(B.charAt($)===" "){for(;$>0&&B.charAt($-1)===" ";)$--;for(;N<B.length&&B.charAt(N+1)===" ";)N++}else{let Q=m[0],ue=m[0];R.getWidth(Q)===0&&(F++,Q--),R.getWidth(ue)===2&&(D++,ue++);const de=R.getString(ue).length;for(de>1&&(T+=de-1,N+=de-1);Q>0&&$>0&&!this._isCharWordSeparator(R.loadCell(Q-1,this._workCell));){R.loadCell(Q-1,this._workCell);const q=this._workCell.getChars().length;this._workCell.getWidth()===0?(F++,Q--):q>1&&(O+=q-1,$-=q-1),$--,Q--}for(;ue<R.length&&N+1<B.length&&!this._isCharWordSeparator(R.loadCell(ue+1,this._workCell));){R.loadCell(ue+1,this._workCell);const q=this._workCell.getChars().length;this._workCell.getWidth()===2?(D++,ue++):q>1&&(T+=q-1,N+=q-1),N++,ue++}}N++;let H=$+I-F+O,V=Math.min(this._bufferService.cols,N-$+F+D-O-T);if(C||B.slice($,N).trim()!==""){if(L&&H===0&&R.getCodePoint(0)!==32){const Q=E.lines.get(m[1]-1);if(Q&&R.isWrapped&&Q.getCodePoint(this._bufferService.cols-1)!==32){const ue=this._getWordAt([this._bufferService.cols-1,m[1]-1],!1,!0,!1);if(ue){const de=this._bufferService.cols-ue.start;H-=de,V+=de}}}if(M&&H+V===this._bufferService.cols&&R.getCodePoint(this._bufferService.cols-1)!==32){const Q=E.lines.get(m[1]+1);if(Q!=null&&Q.isWrapped&&Q.getCodePoint(0)!==32){const ue=this._getWordAt([0,m[1]+1],!1,!1,!0);ue&&(V+=ue.length)}}return{start:H,length:V}}}_selectWordAt(m,C){const L=this._getWordAt(m,C);if(L){for(;L.start<0;)L.start+=this._bufferService.cols,m[1]--;this._model.selectionStart=[L.start,m[1]],this._model.selectionStartLength=L.length}}_selectToWordAt(m){const C=this._getWordAt(m,!0);if(C){let L=m[1];for(;C.start<0;)C.start+=this._bufferService.cols,L--;if(!this._model.areSelectionValuesReversed())for(;C.start+C.length>this._bufferService.cols;)C.length-=this._bufferService.cols,L++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?C.start:C.start+C.length,L]}}_isCharWordSeparator(m){return m.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(m.getChars())>=0}_selectLineAt(m){const C=this._bufferService.buffer.getWrappedRangeForLine(m),L={start:{x:0,y:C.first},end:{x:this._bufferService.cols-1,y:C.last}};this._model.selectionStart=[0,C.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,c.getRangeLength)(L,this._bufferService.cols)}};n.SelectionService=b=f([_(3,S.IBufferService),_(4,S.ICoreService),_(5,y.IMouseService),_(6,S.IOptionsService),_(7,y.IRenderService),_(8,y.ICoreBrowserService)],b)},4725:(j,n,u)=>{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 f=u(8343);n.ICharSizeService=(0,f.createDecorator)("CharSizeService"),n.ICoreBrowserService=(0,f.createDecorator)("CoreBrowserService"),n.IMouseService=(0,f.createDecorator)("MouseService"),n.IRenderService=(0,f.createDecorator)("RenderService"),n.ISelectionService=(0,f.createDecorator)("SelectionService"),n.ICharacterJoinerService=(0,f.createDecorator)("CharacterJoinerService"),n.IThemeService=(0,f.createDecorator)("ThemeService"),n.ILinkProviderService=(0,f.createDecorator)("LinkProviderService")},6731:function(j,n,u){var f=this&&this.__decorate||function(b,m,C,L){var M,E=arguments.length,R=E<3?m:L===null?L=Object.getOwnPropertyDescriptor(m,C):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(b,m,C,L);else for(var B=b.length-1;B>=0;B--)(M=b[B])&&(R=(E<3?M(R):E>3?M(m,C,R):M(m,C))||R);return E>3&&R&&Object.defineProperty(m,C,R),R},_=this&&this.__param||function(b,m){return function(C,L){m(C,L,b)}};Object.defineProperty(n,"__esModule",{value:!0}),n.ThemeService=n.DEFAULT_ANSI_COLORS=void 0;const a=u(7239),p=u(8055),w=u(8460),y=u(844),o=u(2585),r=p.css.toColor("#ffffff"),h=p.css.toColor("#000000"),c=p.css.toColor("#ffffff"),l=p.css.toColor("#000000"),S={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};n.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const b=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],m=[0,95,135,175,215,255];for(let C=0;C<216;C++){const L=m[C/36%6|0],M=m[C/6%6|0],E=m[C%6];b.push({css:p.channels.toCss(L,M,E),rgba:p.channels.toRgba(L,M,E)})}for(let C=0;C<24;C++){const L=8+10*C;b.push({css:p.channels.toCss(L,L,L),rgba:p.channels.toRgba(L,L,L)})}return b})());let x=n.ThemeService=class extends y.Disposable{get colors(){return this._colors}constructor(b){super(),this._optionsService=b,this._contrastCache=new a.ColorContrastCache,this._halfContrastCache=new a.ColorContrastCache,this._onChangeColors=this.register(new w.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:r,background:h,cursor:c,cursorAccent:l,selectionForeground:void 0,selectionBackgroundTransparent:S,selectionBackgroundOpaque:p.color.blend(h,S),selectionInactiveBackgroundTransparent:S,selectionInactiveBackgroundOpaque:p.color.blend(h,S),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(b={}){const m=this._colors;if(m.foreground=v(b.foreground,r),m.background=v(b.background,h),m.cursor=v(b.cursor,c),m.cursorAccent=v(b.cursorAccent,l),m.selectionBackgroundTransparent=v(b.selectionBackground,S),m.selectionBackgroundOpaque=p.color.blend(m.background,m.selectionBackgroundTransparent),m.selectionInactiveBackgroundTransparent=v(b.selectionInactiveBackground,m.selectionBackgroundTransparent),m.selectionInactiveBackgroundOpaque=p.color.blend(m.background,m.selectionInactiveBackgroundTransparent),m.selectionForeground=b.selectionForeground?v(b.selectionForeground,p.NULL_COLOR):void 0,m.selectionForeground===p.NULL_COLOR&&(m.selectionForeground=void 0),p.color.isOpaque(m.selectionBackgroundTransparent)&&(m.selectionBackgroundTransparent=p.color.opacity(m.selectionBackgroundTransparent,.3)),p.color.isOpaque(m.selectionInactiveBackgroundTransparent)&&(m.selectionInactiveBackgroundTransparent=p.color.opacity(m.selectionInactiveBackgroundTransparent,.3)),m.ansi=n.DEFAULT_ANSI_COLORS.slice(),m.ansi[0]=v(b.black,n.DEFAULT_ANSI_COLORS[0]),m.ansi[1]=v(b.red,n.DEFAULT_ANSI_COLORS[1]),m.ansi[2]=v(b.green,n.DEFAULT_ANSI_COLORS[2]),m.ansi[3]=v(b.yellow,n.DEFAULT_ANSI_COLORS[3]),m.ansi[4]=v(b.blue,n.DEFAULT_ANSI_COLORS[4]),m.ansi[5]=v(b.magenta,n.DEFAULT_ANSI_COLORS[5]),m.ansi[6]=v(b.cyan,n.DEFAULT_ANSI_COLORS[6]),m.ansi[7]=v(b.white,n.DEFAULT_ANSI_COLORS[7]),m.ansi[8]=v(b.brightBlack,n.DEFAULT_ANSI_COLORS[8]),m.ansi[9]=v(b.brightRed,n.DEFAULT_ANSI_COLORS[9]),m.ansi[10]=v(b.brightGreen,n.DEFAULT_ANSI_COLORS[10]),m.ansi[11]=v(b.brightYellow,n.DEFAULT_ANSI_COLORS[11]),m.ansi[12]=v(b.brightBlue,n.DEFAULT_ANSI_COLORS[12]),m.ansi[13]=v(b.brightMagenta,n.DEFAULT_ANSI_COLORS[13]),m.ansi[14]=v(b.brightCyan,n.DEFAULT_ANSI_COLORS[14]),m.ansi[15]=v(b.brightWhite,n.DEFAULT_ANSI_COLORS[15]),b.extendedAnsi){const C=Math.min(m.ansi.length-16,b.extendedAnsi.length);for(let L=0;L<C;L++)m.ansi[L+16]=v(b.extendedAnsi[L],n.DEFAULT_ANSI_COLORS[L+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(b){this._restoreColor(b),this._onChangeColors.fire(this.colors)}_restoreColor(b){if(b!==void 0)switch(b){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[b]=this._restoreColors.ansi[b]}else for(let m=0;m<this._restoreColors.ansi.length;++m)this._colors.ansi[m]=this._restoreColors.ansi[m]}modifyColors(b){b(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 v(b,m){if(b!==void 0)try{return p.css.toColor(b)}catch{}return m}n.ThemeService=x=f([_(0,o.IOptionsService)],x)},6349:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CircularList=void 0;const f=u(8460),_=u(844);class a extends _.Disposable{constructor(w){super(),this._maxLength=w,this.onDeleteEmitter=this.register(new f.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new f.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new f.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(w){if(this._maxLength===w)return;const y=new Array(w);for(let o=0;o<Math.min(w,this.length);o++)y[o]=this._array[this._getCyclicIndex(o)];this._array=y,this._maxLength=w,this._startIndex=0}get length(){return this._length}set length(w){if(w>this._length)for(let y=this._length;y<w;y++)this._array[y]=void 0;this._length=w}get(w){return this._array[this._getCyclicIndex(w)]}set(w,y){this._array[this._getCyclicIndex(w)]=y}push(w){this._array[this._getCyclicIndex(this._length)]=w,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(w,y,...o){if(y){for(let r=w;r<this._length-y;r++)this._array[this._getCyclicIndex(r)]=this._array[this._getCyclicIndex(r+y)];this._length-=y,this.onDeleteEmitter.fire({index:w,amount:y})}for(let r=this._length-1;r>=w;r--)this._array[this._getCyclicIndex(r+o.length)]=this._array[this._getCyclicIndex(r)];for(let r=0;r<o.length;r++)this._array[this._getCyclicIndex(w+r)]=o[r];if(o.length&&this.onInsertEmitter.fire({index:w,amount:o.length}),this._length+o.length>this._maxLength){const r=this._length+o.length-this._maxLength;this._startIndex+=r,this._length=this._maxLength,this.onTrimEmitter.fire(r)}else this._length+=o.length}trimStart(w){w>this._length&&(w=this._length),this._startIndex+=w,this._length-=w,this.onTrimEmitter.fire(w)}shiftElements(w,y,o){if(!(y<=0)){if(w<0||w>=this._length)throw new Error("start argument out of range");if(w+o<0)throw new Error("Cannot shift elements in list beyond index 0");if(o>0){for(let h=y-1;h>=0;h--)this.set(w+h+o,this.get(w+h));const r=w+y+o-this._length;if(r>0)for(this._length+=r;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let r=0;r<y;r++)this.set(w+r+o,this.get(w+r))}}_getCyclicIndex(w){return(this._startIndex+w)%this._maxLength}}n.CircularList=a},1439:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.clone=void 0,n.clone=function u(f,_=5){if(typeof f!="object")return f;const a=Array.isArray(f)?[]:{};for(const p in f)a[p]=_<=1?f[p]:f[p]&&u(f[p],_-1);return a}},8055:(j,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 u=0,f=0,_=0,a=0;var p,w,y,o,r;function h(l){const S=l.toString(16);return S.length<2?"0"+S:S}function c(l,S){return l<S?(S+.05)/(l+.05):(l+.05)/(S+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(S,x,v,b){return b!==void 0?`#${h(S)}${h(x)}${h(v)}${h(b)}`:`#${h(S)}${h(x)}${h(v)}`},l.toRgba=function(S,x,v,b=255){return(S<<24|x<<16|v<<8|b)>>>0},l.toColor=function(S,x,v,b){return{css:l.toCss(S,x,v,b),rgba:l.toRgba(S,x,v,b)}}})(p||(n.channels=p={})),(function(l){function S(x,v){return a=Math.round(255*v),[u,f,_]=r.toChannels(x.rgba),{css:p.toCss(u,f,_,a),rgba:p.toRgba(u,f,_,a)}}l.blend=function(x,v){if(a=(255&v.rgba)/255,a===1)return{css:v.css,rgba:v.rgba};const b=v.rgba>>24&255,m=v.rgba>>16&255,C=v.rgba>>8&255,L=x.rgba>>24&255,M=x.rgba>>16&255,E=x.rgba>>8&255;return u=L+Math.round((b-L)*a),f=M+Math.round((m-M)*a),_=E+Math.round((C-E)*a),{css:p.toCss(u,f,_),rgba:p.toRgba(u,f,_)}},l.isOpaque=function(x){return(255&x.rgba)==255},l.ensureContrastRatio=function(x,v,b){const m=r.ensureContrastRatio(x.rgba,v.rgba,b);if(m)return p.toColor(m>>24&255,m>>16&255,m>>8&255)},l.opaque=function(x){const v=(255|x.rgba)>>>0;return[u,f,_]=r.toChannels(v),{css:p.toCss(u,f,_),rgba:v}},l.opacity=S,l.multiplyOpacity=function(x,v){return a=255&x.rgba,S(x,a*v/255)},l.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(w||(n.color=w={})),(function(l){let S,x;try{const v=document.createElement("canvas");v.width=1,v.height=1;const b=v.getContext("2d",{willReadFrequently:!0});b&&(S=b,S.globalCompositeOperation="copy",x=S.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(v){if(v.match(/#[\da-f]{3,8}/i))switch(v.length){case 4:return u=parseInt(v.slice(1,2).repeat(2),16),f=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),p.toColor(u,f,_);case 5:return u=parseInt(v.slice(1,2).repeat(2),16),f=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),a=parseInt(v.slice(4,5).repeat(2),16),p.toColor(u,f,_,a);case 7:return{css:v,rgba:(parseInt(v.slice(1),16)<<8|255)>>>0};case 9:return{css:v,rgba:parseInt(v.slice(1),16)>>>0}}const b=v.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(b)return u=parseInt(b[1]),f=parseInt(b[2]),_=parseInt(b[3]),a=Math.round(255*(b[5]===void 0?1:parseFloat(b[5]))),p.toColor(u,f,_,a);if(!S||!x)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=x,S.fillStyle=v,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[u,f,_,a]=S.getImageData(0,0,1,1).data,a!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(u,f,_,a),css:v}}})(y||(n.css=y={})),(function(l){function S(x,v,b){const m=x/255,C=v/255,L=b/255;return .2126*(m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4))+.7152*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}l.relativeLuminance=function(x){return S(x>>16&255,x>>8&255,255&x)},l.relativeLuminance2=S})(o||(n.rgb=o={})),(function(l){function S(v,b,m){const C=v>>24&255,L=v>>16&255,M=v>>8&255;let E=b>>24&255,R=b>>16&255,B=b>>8&255,$=c(o.relativeLuminance2(E,R,B),o.relativeLuminance2(C,L,M));for(;$<m&&(E>0||R>0||B>0);)E-=Math.max(0,Math.ceil(.1*E)),R-=Math.max(0,Math.ceil(.1*R)),B-=Math.max(0,Math.ceil(.1*B)),$=c(o.relativeLuminance2(E,R,B),o.relativeLuminance2(C,L,M));return(E<<24|R<<16|B<<8|255)>>>0}function x(v,b,m){const C=v>>24&255,L=v>>16&255,M=v>>8&255;let E=b>>24&255,R=b>>16&255,B=b>>8&255,$=c(o.relativeLuminance2(E,R,B),o.relativeLuminance2(C,L,M));for(;$<m&&(E<255||R<255||B<255);)E=Math.min(255,E+Math.ceil(.1*(255-E))),R=Math.min(255,R+Math.ceil(.1*(255-R))),B=Math.min(255,B+Math.ceil(.1*(255-B))),$=c(o.relativeLuminance2(E,R,B),o.relativeLuminance2(C,L,M));return(E<<24|R<<16|B<<8|255)>>>0}l.blend=function(v,b){if(a=(255&b)/255,a===1)return b;const m=b>>24&255,C=b>>16&255,L=b>>8&255,M=v>>24&255,E=v>>16&255,R=v>>8&255;return u=M+Math.round((m-M)*a),f=E+Math.round((C-E)*a),_=R+Math.round((L-R)*a),p.toRgba(u,f,_)},l.ensureContrastRatio=function(v,b,m){const C=o.relativeLuminance(v>>8),L=o.relativeLuminance(b>>8);if(c(C,L)<m){if(L<C){const R=S(v,b,m),B=c(C,o.relativeLuminance(R>>8));if(B<m){const $=x(v,b,m);return B>c(C,o.relativeLuminance($>>8))?R:$}return R}const M=x(v,b,m),E=c(C,o.relativeLuminance(M>>8));if(E<m){const R=S(v,b,m);return E>c(C,o.relativeLuminance(R>>8))?M:R}return M}},l.reduceLuminance=S,l.increaseLuminance=x,l.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=c},8969:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreTerminal=void 0;const f=u(844),_=u(2585),a=u(4348),p=u(7866),w=u(744),y=u(7302),o=u(6975),r=u(8460),h=u(1753),c=u(1480),l=u(7994),S=u(9282),x=u(5435),v=u(5981),b=u(2660);let m=!1;class C extends f.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new r.EventEmitter),this._onScroll.event((M=>{var E;(E=this._onScrollApi)==null||E.fire(M.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(M){for(const E in M)this.optionsService.options[E]=M[E]}constructor(M){super(),this._windowsWrappingHeuristics=this.register(new f.MutableDisposable),this._onBinary=this.register(new r.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new r.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new r.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new r.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new r.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new r.EventEmitter),this._instantiationService=new a.InstantiationService,this.optionsService=this.register(new y.OptionsService(M)),this._instantiationService.setService(_.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(w.BufferService)),this._instantiationService.setService(_.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(_.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(o.CoreService)),this._instantiationService.setService(_.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(h.CoreMouseService)),this._instantiationService.setService(_.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(c.UnicodeService)),this._instantiationService.setService(_.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(l.CharsetService),this._instantiationService.setService(_.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(b.OscLinkService),this._instantiationService.setService(_.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new x.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,r.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,r.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,r.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,r.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((E=>{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((E=>{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 v.WriteBuffer(((E,R)=>this._inputHandler.parse(E,R)))),this.register((0,r.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(M,E){this._writeBuffer.write(M,E)}writeSync(M,E){this._logService.logLevel<=_.LogLevelEnum.WARN&&!m&&(this._logService.warn("writeSync is unreliable and will be removed soon."),m=!0),this._writeBuffer.writeSync(M,E)}input(M,E=!0){this.coreService.triggerDataEvent(M,E)}resize(M,E){isNaN(M)||isNaN(E)||(M=Math.max(M,w.MINIMUM_COLS),E=Math.max(E,w.MINIMUM_ROWS),this._bufferService.resize(M,E))}scroll(M,E=!1){this._bufferService.scroll(M,E)}scrollLines(M,E,R){this._bufferService.scrollLines(M,E,R)}scrollPages(M){this.scrollLines(M*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(M){const E=M-this._bufferService.buffer.ydisp;E!==0&&this.scrollLines(E)}registerEscHandler(M,E){return this._inputHandler.registerEscHandler(M,E)}registerDcsHandler(M,E){return this._inputHandler.registerDcsHandler(M,E)}registerCsiHandler(M,E){return this._inputHandler.registerCsiHandler(M,E)}registerOscHandler(M,E){return this._inputHandler.registerOscHandler(M,E)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let M=!1;const E=this.optionsService.rawOptions.windowsPty;E&&E.buildNumber!==void 0&&E.buildNumber!==void 0?M=E.backend==="conpty"&&E.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(M=!0),M?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const M=[];M.push(this.onLineFeed(S.updateWindowsModeWrappedState.bind(null,this._bufferService))),M.push(this.registerCsiHandler({final:"H"},(()=>((0,S.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,f.toDisposable)((()=>{for(const E of M)E.dispose()}))}}}n.CoreTerminal=C},8460:(j,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=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===u)return void this._listeners.splice(f,1)}}})),this._event}fire(u,f){const _=[];for(let a=0;a<this._listeners.length;a++)_.push(this._listeners[a]);for(let a=0;a<_.length;a++)_[a].call(void 0,u,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(u,f){return u((_=>f.fire(_)))},n.runAndSubscribe=function(u,f){return f(void 0),u((_=>f(_)))}},5435:function(j,n,u){var f=this&&this.__decorate||function(F,D,O,T){var H,V=arguments.length,Q=V<3?D:T===null?T=Object.getOwnPropertyDescriptor(D,O):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Q=Reflect.decorate(F,D,O,T);else for(var ue=F.length-1;ue>=0;ue--)(H=F[ue])&&(Q=(V<3?H(Q):V>3?H(D,O,Q):H(D,O))||Q);return V>3&&Q&&Object.defineProperty(D,O,Q),Q},_=this&&this.__param||function(F,D){return function(O,T){D(O,T,F)}};Object.defineProperty(n,"__esModule",{value:!0}),n.InputHandler=n.WindowsOptionsReportType=void 0;const a=u(2584),p=u(7116),w=u(2015),y=u(844),o=u(482),r=u(8437),h=u(8460),c=u(643),l=u(511),S=u(3734),x=u(2585),v=u(1480),b=u(6242),m=u(6351),C=u(5941),L={"(":0,")":1,"*":2,"+":3,"-":1,".":2},M=131072;function E(F,D){if(F>24)return D.setWinLines||!1;switch(F){case 1:return!!D.restoreWin;case 2:return!!D.minimizeWin;case 3:return!!D.setWinPosition;case 4:return!!D.setWinSizePixels;case 5:return!!D.raiseWin;case 6:return!!D.lowerWin;case 7:return!!D.refreshWin;case 8:return!!D.setWinSizeChars;case 9:return!!D.maximizeWin;case 10:return!!D.fullscreenWin;case 11:return!!D.getWinState;case 13:return!!D.getWinPosition;case 14:return!!D.getWinSizePixels;case 15:return!!D.getScreenSizePixels;case 16:return!!D.getCellSizePixels;case 18:return!!D.getWinSizeChars;case 19:return!!D.getScreenSizeChars;case 20:return!!D.getIconTitle;case 21:return!!D.getWinTitle;case 22:return!!D.pushTitle;case 23:return!!D.popTitle;case 24:return!!D.setWinLines}return!1}var R;(function(F){F[F.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",F[F.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(R||(n.WindowsOptionsReportType=R={}));let B=0;class $ extends y.Disposable{getAttrData(){return this._curAttrData}constructor(D,O,T,H,V,Q,ue,de,q=new w.EscapeSequenceParser){super(),this._bufferService=D,this._charsetService=O,this._coreService=T,this._logService=H,this._optionsService=V,this._oscLinkService=Q,this._coreMouseService=ue,this._unicodeService=de,this._parser=q,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new o.StringToUtf32,this._utf8Decoder=new o.Utf8ToUtf32,this._workCell=new l.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=r.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=r.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new h.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new h.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new h.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new h.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new h.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new h.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new h.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new h.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new h.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new h.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new h.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new h.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((z=>this._activeBuffer=z.activeBuffer))),this._parser.setCsiHandlerFallback(((z,se)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(z),params:se.toArray()})})),this._parser.setEscHandlerFallback((z=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(z)})})),this._parser.setExecuteHandlerFallback((z=>{this._logService.debug("Unknown EXECUTE code: ",{code:z})})),this._parser.setOscHandlerFallback(((z,se,ie)=>{this._logService.debug("Unknown OSC code: ",{identifier:z,action:se,data:ie})})),this._parser.setDcsHandlerFallback(((z,se,ie)=>{se==="HOOK"&&(ie=ie.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(z),action:se,payload:ie})})),this._parser.setPrintHandler(((z,se,ie)=>this.print(z,se,ie))),this._parser.registerCsiHandler({final:"@"},(z=>this.insertChars(z))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(z=>this.scrollLeft(z))),this._parser.registerCsiHandler({final:"A"},(z=>this.cursorUp(z))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(z=>this.scrollRight(z))),this._parser.registerCsiHandler({final:"B"},(z=>this.cursorDown(z))),this._parser.registerCsiHandler({final:"C"},(z=>this.cursorForward(z))),this._parser.registerCsiHandler({final:"D"},(z=>this.cursorBackward(z))),this._parser.registerCsiHandler({final:"E"},(z=>this.cursorNextLine(z))),this._parser.registerCsiHandler({final:"F"},(z=>this.cursorPrecedingLine(z))),this._parser.registerCsiHandler({final:"G"},(z=>this.cursorCharAbsolute(z))),this._parser.registerCsiHandler({final:"H"},(z=>this.cursorPosition(z))),this._parser.registerCsiHandler({final:"I"},(z=>this.cursorForwardTab(z))),this._parser.registerCsiHandler({final:"J"},(z=>this.eraseInDisplay(z,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(z=>this.eraseInDisplay(z,!0))),this._parser.registerCsiHandler({final:"K"},(z=>this.eraseInLine(z,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(z=>this.eraseInLine(z,!0))),this._parser.registerCsiHandler({final:"L"},(z=>this.insertLines(z))),this._parser.registerCsiHandler({final:"M"},(z=>this.deleteLines(z))),this._parser.registerCsiHandler({final:"P"},(z=>this.deleteChars(z))),this._parser.registerCsiHandler({final:"S"},(z=>this.scrollUp(z))),this._parser.registerCsiHandler({final:"T"},(z=>this.scrollDown(z))),this._parser.registerCsiHandler({final:"X"},(z=>this.eraseChars(z))),this._parser.registerCsiHandler({final:"Z"},(z=>this.cursorBackwardTab(z))),this._parser.registerCsiHandler({final:"`"},(z=>this.charPosAbsolute(z))),this._parser.registerCsiHandler({final:"a"},(z=>this.hPositionRelative(z))),this._parser.registerCsiHandler({final:"b"},(z=>this.repeatPrecedingCharacter(z))),this._parser.registerCsiHandler({final:"c"},(z=>this.sendDeviceAttributesPrimary(z))),this._parser.registerCsiHandler({prefix:">",final:"c"},(z=>this.sendDeviceAttributesSecondary(z))),this._parser.registerCsiHandler({final:"d"},(z=>this.linePosAbsolute(z))),this._parser.registerCsiHandler({final:"e"},(z=>this.vPositionRelative(z))),this._parser.registerCsiHandler({final:"f"},(z=>this.hVPosition(z))),this._parser.registerCsiHandler({final:"g"},(z=>this.tabClear(z))),this._parser.registerCsiHandler({final:"h"},(z=>this.setMode(z))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(z=>this.setModePrivate(z))),this._parser.registerCsiHandler({final:"l"},(z=>this.resetMode(z))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(z=>this.resetModePrivate(z))),this._parser.registerCsiHandler({final:"m"},(z=>this.charAttributes(z))),this._parser.registerCsiHandler({final:"n"},(z=>this.deviceStatus(z))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(z=>this.deviceStatusPrivate(z))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(z=>this.softReset(z))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(z=>this.setCursorStyle(z))),this._parser.registerCsiHandler({final:"r"},(z=>this.setScrollRegion(z))),this._parser.registerCsiHandler({final:"s"},(z=>this.saveCursor(z))),this._parser.registerCsiHandler({final:"t"},(z=>this.windowOptions(z))),this._parser.registerCsiHandler({final:"u"},(z=>this.restoreCursor(z))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(z=>this.insertColumns(z))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(z=>this.deleteColumns(z))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(z=>this.selectProtected(z))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(z=>this.requestMode(z,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(z=>this.requestMode(z,!1))),this._parser.setExecuteHandler(a.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(a.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(a.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(a.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(a.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(a.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(a.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(a.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(a.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(a.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(a.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(a.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new b.OscHandler((z=>(this.setTitle(z),this.setIconName(z),!0)))),this._parser.registerOscHandler(1,new b.OscHandler((z=>this.setIconName(z)))),this._parser.registerOscHandler(2,new b.OscHandler((z=>this.setTitle(z)))),this._parser.registerOscHandler(4,new b.OscHandler((z=>this.setOrReportIndexedColor(z)))),this._parser.registerOscHandler(8,new b.OscHandler((z=>this.setHyperlink(z)))),this._parser.registerOscHandler(10,new b.OscHandler((z=>this.setOrReportFgColor(z)))),this._parser.registerOscHandler(11,new b.OscHandler((z=>this.setOrReportBgColor(z)))),this._parser.registerOscHandler(12,new b.OscHandler((z=>this.setOrReportCursorColor(z)))),this._parser.registerOscHandler(104,new b.OscHandler((z=>this.restoreIndexedColor(z)))),this._parser.registerOscHandler(110,new b.OscHandler((z=>this.restoreFgColor(z)))),this._parser.registerOscHandler(111,new b.OscHandler((z=>this.restoreBgColor(z)))),this._parser.registerOscHandler(112,new b.OscHandler((z=>this.restoreCursorColor(z)))),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 z in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:z},(()=>this.selectCharset("("+z))),this._parser.registerEscHandler({intermediates:")",final:z},(()=>this.selectCharset(")"+z))),this._parser.registerEscHandler({intermediates:"*",final:z},(()=>this.selectCharset("*"+z))),this._parser.registerEscHandler({intermediates:"+",final:z},(()=>this.selectCharset("+"+z))),this._parser.registerEscHandler({intermediates:"-",final:z},(()=>this.selectCharset("-"+z))),this._parser.registerEscHandler({intermediates:".",final:z},(()=>this.selectCharset("."+z))),this._parser.registerEscHandler({intermediates:"/",final:z},(()=>this.selectCharset("/"+z)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((z=>(this._logService.error("Parsing error: ",z),z))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new m.DcsHandler(((z,se)=>this.requestStatusString(z,se))))}_preserveStack(D,O,T,H){this._parseStack.paused=!0,this._parseStack.cursorStartX=D,this._parseStack.cursorStartY=O,this._parseStack.decodedLength=T,this._parseStack.position=H}_logSlowResolvingAsync(D){this._logService.logLevel<=x.LogLevelEnum.WARN&&Promise.race([D,new Promise(((O,T)=>setTimeout((()=>T("#SLOW_TIMEOUT")),5e3)))]).catch((O=>{if(O!=="#SLOW_TIMEOUT")throw O;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(D,O){let T,H=this._activeBuffer.x,V=this._activeBuffer.y,Q=0;const ue=this._parseStack.paused;if(ue){if(T=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,O))return this._logSlowResolvingAsync(T),T;H=this._parseStack.cursorStartX,V=this._parseStack.cursorStartY,this._parseStack.paused=!1,D.length>M&&(Q=this._parseStack.position+M)}if(this._logService.logLevel<=x.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof D=="string"?` "${D}"`:` "${Array.prototype.map.call(D,(z=>String.fromCharCode(z))).join("")}"`),typeof D=="string"?D.split("").map((z=>z.charCodeAt(0))):D),this._parseBuffer.length<D.length&&this._parseBuffer.length<M&&(this._parseBuffer=new Uint32Array(Math.min(D.length,M))),ue||this._dirtyRowTracker.clearRange(),D.length>M)for(let z=Q;z<D.length;z+=M){const se=z+M<D.length?z+M:D.length,ie=typeof D=="string"?this._stringDecoder.decode(D.substring(z,se),this._parseBuffer):this._utf8Decoder.decode(D.subarray(z,se),this._parseBuffer);if(T=this._parser.parse(this._parseBuffer,ie))return this._preserveStack(H,V,ie,z),this._logSlowResolvingAsync(T),T}else if(!ue){const z=typeof D=="string"?this._stringDecoder.decode(D,this._parseBuffer):this._utf8Decoder.decode(D,this._parseBuffer);if(T=this._parser.parse(this._parseBuffer,z))return this._preserveStack(H,V,z,0),this._logSlowResolvingAsync(T),T}this._activeBuffer.x===H&&this._activeBuffer.y===V||this._onCursorMove.fire();const de=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),q=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);q<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(q,this._bufferService.rows-1),Math.min(de,this._bufferService.rows-1))}print(D,O,T){let H,V;const Q=this._charsetService.charset,ue=this._optionsService.rawOptions.screenReaderMode,de=this._bufferService.cols,q=this._coreService.decPrivateModes.wraparound,z=this._coreService.modes.insertMode,se=this._curAttrData;let ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&T-O>0&&ie.getWidth(this._activeBuffer.x-1)===2&&ie.setCellFromCodepoint(this._activeBuffer.x-1,0,1,se);let ve=this._parser.precedingJoinState;for(let fe=O;fe<T;++fe){if(H=D[fe],H<127&&Q){const qe=Q[String.fromCharCode(H)];qe&&(H=qe.charCodeAt(0))}const Me=this._unicodeService.charProperties(H,ve);V=v.UnicodeService.extractWidth(Me);const _e=v.UnicodeService.extractShouldJoin(Me),Oe=_e?v.UnicodeService.extractWidth(ve):0;if(ve=Me,ue&&this._onA11yChar.fire((0,o.stringFromCodePoint)(H)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+V-Oe>de){if(q){const qe=ie;let be=this._activeBuffer.x-Oe;for(this._activeBuffer.x=Oe,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),ie=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Oe>0&&ie instanceof r.BufferLine&&ie.copyCellsFrom(qe,be,0,Oe,!1);be<de;)qe.setCellFromCodepoint(be++,0,1,se)}else if(this._activeBuffer.x=de-1,V===2)continue}if(_e&&this._activeBuffer.x){const qe=ie.getWidth(this._activeBuffer.x-1)?1:2;ie.addCodepointToCell(this._activeBuffer.x-qe,H,V);for(let be=V-Oe;--be>=0;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,se)}else if(z&&(ie.insertCells(this._activeBuffer.x,V-Oe,this._activeBuffer.getNullCell(se)),ie.getWidth(de-1)===2&&ie.setCellFromCodepoint(de-1,c.NULL_CELL_CODE,c.NULL_CELL_WIDTH,se)),ie.setCellFromCodepoint(this._activeBuffer.x++,H,V,se),V>0)for(;--V;)ie.setCellFromCodepoint(this._activeBuffer.x++,0,0,se)}this._parser.precedingJoinState=ve,this._activeBuffer.x<de&&T-O>0&&ie.getWidth(this._activeBuffer.x)===0&&!ie.hasContent(this._activeBuffer.x)&&ie.setCellFromCodepoint(this._activeBuffer.x,0,1,se),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(D,O){return D.final!=="t"||D.prefix||D.intermediates?this._parser.registerCsiHandler(D,O):this._parser.registerCsiHandler(D,(T=>!E(T.params[0],this._optionsService.rawOptions.windowOptions)||O(T)))}registerDcsHandler(D,O){return this._parser.registerDcsHandler(D,new m.DcsHandler(O))}registerEscHandler(D,O){return this._parser.registerEscHandler(D,O)}registerOscHandler(D,O){return this._parser.registerOscHandler(D,new b.OscHandler(O))}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 D;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&&((D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&D.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);O.hasWidth(this._activeBuffer.x)&&!O.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const D=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-D),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(D=this._bufferService.cols-1){this._activeBuffer.x=Math.min(D,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(D,O){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=D,this._activeBuffer.y=this._activeBuffer.scrollTop+O):(this._activeBuffer.x=D,this._activeBuffer.y=O),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(D,O){this._restrictCursor(),this._setCursor(this._activeBuffer.x+D,this._activeBuffer.y+O)}cursorUp(D){const O=this._activeBuffer.y-this._activeBuffer.scrollTop;return O>=0?this._moveCursor(0,-Math.min(O,D.params[0]||1)):this._moveCursor(0,-(D.params[0]||1)),!0}cursorDown(D){const O=this._activeBuffer.scrollBottom-this._activeBuffer.y;return O>=0?this._moveCursor(0,Math.min(O,D.params[0]||1)):this._moveCursor(0,D.params[0]||1),!0}cursorForward(D){return this._moveCursor(D.params[0]||1,0),!0}cursorBackward(D){return this._moveCursor(-(D.params[0]||1),0),!0}cursorNextLine(D){return this.cursorDown(D),this._activeBuffer.x=0,!0}cursorPrecedingLine(D){return this.cursorUp(D),this._activeBuffer.x=0,!0}cursorCharAbsolute(D){return this._setCursor((D.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(D){return this._setCursor(D.length>=2?(D.params[1]||1)-1:0,(D.params[0]||1)-1),!0}charPosAbsolute(D){return this._setCursor((D.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(D){return this._moveCursor(D.params[0]||1,0),!0}linePosAbsolute(D){return this._setCursor(this._activeBuffer.x,(D.params[0]||1)-1),!0}vPositionRelative(D){return this._moveCursor(0,D.params[0]||1),!0}hVPosition(D){return this.cursorPosition(D),!0}tabClear(D){const O=D.params[0];return O===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:O===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(D){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let O=D.params[0]||1;for(;O--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(D){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let O=D.params[0]||1;for(;O--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(D){const O=D.params[0];return O===1&&(this._curAttrData.bg|=536870912),O!==2&&O!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(D,O,T,H=!1,V=!1){const Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);Q.replaceCells(O,T,this._activeBuffer.getNullCell(this._eraseAttrData()),V),H&&(Q.isWrapped=!1)}_resetBufferLine(D,O=!1){const T=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);T&&(T.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),O),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+D),T.isWrapped=!1)}eraseInDisplay(D,O=!1){let T;switch(this._restrictCursor(this._bufferService.cols),D.params[0]){case 0:for(T=this._activeBuffer.y,this._dirtyRowTracker.markDirty(T),this._eraseInBufferLine(T++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,O);T<this._bufferService.rows;T++)this._resetBufferLine(T,O);this._dirtyRowTracker.markDirty(T);break;case 1:for(T=this._activeBuffer.y,this._dirtyRowTracker.markDirty(T),this._eraseInBufferLine(T,0,this._activeBuffer.x+1,!0,O),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(T+1).isWrapped=!1);T--;)this._resetBufferLine(T,O);this._dirtyRowTracker.markDirty(0);break;case 2:for(T=this._bufferService.rows,this._dirtyRowTracker.markDirty(T-1);T--;)this._resetBufferLine(T,O);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(D,O=!1){switch(this._restrictCursor(this._bufferService.cols),D.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,O);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,O);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,O)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(D){this._restrictCursor();let O=D.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const T=this._activeBuffer.ybase+this._activeBuffer.y,H=this._bufferService.rows-1-this._activeBuffer.scrollBottom,V=this._bufferService.rows-1+this._activeBuffer.ybase-H+1;for(;O--;)this._activeBuffer.lines.splice(V-1,1),this._activeBuffer.lines.splice(T,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(D){this._restrictCursor();let O=D.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const T=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;O--;)this._activeBuffer.lines.splice(T,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(D){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.insertCells(this._activeBuffer.x,D.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(D){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.deleteCells(this._activeBuffer.x,D.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(D){let O=D.params[0]||1;for(;O--;)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(D){let O=D.params[0]||1;for(;O--;)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(r.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(D){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=D.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);H.deleteCells(0,O,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(D){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=D.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);H.insertCells(0,O,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(D){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=D.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);H.insertCells(this._activeBuffer.x,O,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(D){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=D.params[0]||1;for(let T=this._activeBuffer.scrollTop;T<=this._activeBuffer.scrollBottom;++T){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);H.deleteCells(this._activeBuffer.x,O,this._activeBuffer.getNullCell(this._eraseAttrData())),H.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(D){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(D.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(D){const O=this._parser.precedingJoinState;if(!O)return!0;const T=D.params[0]||1,H=v.UnicodeService.extractWidth(O),V=this._activeBuffer.x-H,Q=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(V),ue=new Uint32Array(Q.length*T);let de=0;for(let z=0;z<Q.length;){const se=Q.codePointAt(z)||0;ue[de++]=se,z+=se>65535?2:1}let q=de;for(let z=1;z<T;++z)ue.copyWithin(q,0,de),q+=de;return this.print(ue,0,q),!0}sendDeviceAttributesPrimary(D){return D.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(a.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(a.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(D){return D.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(a.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(a.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(D.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(a.C0.ESC+"[>83;40003;0c")),!0}_is(D){return(this._optionsService.rawOptions.termName+"").indexOf(D)===0}setMode(D){for(let O=0;O<D.length;O++)switch(D.params[O]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(D){for(let O=0;O<D.length;O++)switch(D.params[O]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.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(D){for(let O=0;O<D.length;O++)switch(D.params[O]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(D){for(let O=0;O<D.length;O++)switch(D.params[O]){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(),D.params[O]===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(D,O){const T=this._coreService.decPrivateModes,{activeProtocol:H,activeEncoding:V}=this._coreMouseService,Q=this._coreService,{buffers:ue,cols:de}=this._bufferService,{active:q,alt:z}=ue,se=this._optionsService.rawOptions,ie=_e=>_e?1:2,ve=D.params[0];return fe=ve,Me=O?ve===2?4:ve===4?ie(Q.modes.insertMode):ve===12?3:ve===20?ie(se.convertEol):0:ve===1?ie(T.applicationCursorKeys):ve===3?se.windowOptions.setWinLines?de===80?2:de===132?1:0:0:ve===6?ie(T.origin):ve===7?ie(T.wraparound):ve===8?3:ve===9?ie(H==="X10"):ve===12?ie(se.cursorBlink):ve===25?ie(!Q.isCursorHidden):ve===45?ie(T.reverseWraparound):ve===66?ie(T.applicationKeypad):ve===67?4:ve===1e3?ie(H==="VT200"):ve===1002?ie(H==="DRAG"):ve===1003?ie(H==="ANY"):ve===1004?ie(T.sendFocus):ve===1005?4:ve===1006?ie(V==="SGR"):ve===1015?4:ve===1016?ie(V==="SGR_PIXELS"):ve===1048?1:ve===47||ve===1047||ve===1049?ie(q===z):ve===2004?ie(T.bracketedPasteMode):0,Q.triggerDataEvent(`${a.C0.ESC}[${O?"":"?"}${fe};${Me}$y`),!0;var fe,Me}_updateAttrColor(D,O,T,H,V){return O===2?(D|=50331648,D&=-16777216,D|=S.AttributeData.fromColorRGB([T,H,V])):O===5&&(D&=-50331904,D|=33554432|255&T),D}_extractColor(D,O,T){const H=[0,0,-1,0,0,0];let V=0,Q=0;do{if(H[Q+V]=D.params[O+Q],D.hasSubParams(O+Q)){const ue=D.getSubParams(O+Q);let de=0;do H[1]===5&&(V=1),H[Q+de+1+V]=ue[de];while(++de<ue.length&&de+Q+1+V<H.length);break}if(H[1]===5&&Q+V>=2||H[1]===2&&Q+V>=5)break;H[1]&&(V=1)}while(++Q+O<D.length&&Q+V<H.length);for(let ue=2;ue<H.length;++ue)H[ue]===-1&&(H[ue]=0);switch(H[0]){case 38:T.fg=this._updateAttrColor(T.fg,H[1],H[3],H[4],H[5]);break;case 48:T.bg=this._updateAttrColor(T.bg,H[1],H[3],H[4],H[5]);break;case 58:T.extended=T.extended.clone(),T.extended.underlineColor=this._updateAttrColor(T.extended.underlineColor,H[1],H[3],H[4],H[5])}return Q}_processUnderline(D,O){O.extended=O.extended.clone(),(!~D||D>5)&&(D=1),O.extended.underlineStyle=D,O.fg|=268435456,D===0&&(O.fg&=-268435457),O.updateExtended()}_processSGR0(D){D.fg=r.DEFAULT_ATTR_DATA.fg,D.bg=r.DEFAULT_ATTR_DATA.bg,D.extended=D.extended.clone(),D.extended.underlineStyle=0,D.extended.underlineColor&=-67108864,D.updateExtended()}charAttributes(D){if(D.length===1&&D.params[0]===0)return this._processSGR0(this._curAttrData),!0;const O=D.length;let T;const H=this._curAttrData;for(let V=0;V<O;V++)T=D.params[V],T>=30&&T<=37?(H.fg&=-50331904,H.fg|=16777216|T-30):T>=40&&T<=47?(H.bg&=-50331904,H.bg|=16777216|T-40):T>=90&&T<=97?(H.fg&=-50331904,H.fg|=16777224|T-90):T>=100&&T<=107?(H.bg&=-50331904,H.bg|=16777224|T-100):T===0?this._processSGR0(H):T===1?H.fg|=134217728:T===3?H.bg|=67108864:T===4?(H.fg|=268435456,this._processUnderline(D.hasSubParams(V)?D.getSubParams(V)[0]:1,H)):T===5?H.fg|=536870912:T===7?H.fg|=67108864:T===8?H.fg|=1073741824:T===9?H.fg|=2147483648:T===2?H.bg|=134217728:T===21?this._processUnderline(2,H):T===22?(H.fg&=-134217729,H.bg&=-134217729):T===23?H.bg&=-67108865:T===24?(H.fg&=-268435457,this._processUnderline(0,H)):T===25?H.fg&=-536870913:T===27?H.fg&=-67108865:T===28?H.fg&=-1073741825:T===29?H.fg&=2147483647:T===39?(H.fg&=-67108864,H.fg|=16777215&r.DEFAULT_ATTR_DATA.fg):T===49?(H.bg&=-67108864,H.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):T===38||T===48||T===58?V+=this._extractColor(D,V,H):T===53?H.bg|=1073741824:T===55?H.bg&=-1073741825:T===59?(H.extended=H.extended.clone(),H.extended.underlineColor=-1,H.updateExtended()):T===100?(H.fg&=-67108864,H.fg|=16777215&r.DEFAULT_ATTR_DATA.fg,H.bg&=-67108864,H.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",T);return!0}deviceStatus(D){switch(D.params[0]){case 5:this._coreService.triggerDataEvent(`${a.C0.ESC}[0n`);break;case 6:const O=this._activeBuffer.y+1,T=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${a.C0.ESC}[${O};${T}R`)}return!0}deviceStatusPrivate(D){if(D.params[0]===6){const O=this._activeBuffer.y+1,T=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${a.C0.ESC}[?${O};${T}R`)}return!0}softReset(D){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=r.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(D){const O=D.params[0]||1;switch(O){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 T=O%2==1;return this._optionsService.options.cursorBlink=T,!0}setScrollRegion(D){const O=D.params[0]||1;let T;return(D.length<2||(T=D.params[1])>this._bufferService.rows||T===0)&&(T=this._bufferService.rows),T>O&&(this._activeBuffer.scrollTop=O-1,this._activeBuffer.scrollBottom=T-1,this._setCursor(0,0)),!0}windowOptions(D){if(!E(D.params[0],this._optionsService.rawOptions.windowOptions))return!0;const O=D.length>1?D.params[1]:0;switch(D.params[0]){case 14:O!==2&&this._onRequestWindowsOptionsReport.fire(R.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(R.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${a.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:O!==0&&O!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),O!==0&&O!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:O!==0&&O!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),O!==0&&O!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(D){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(D){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(D){return this._windowTitle=D,this._onTitleChange.fire(D),!0}setIconName(D){return this._iconName=D,!0}setOrReportIndexedColor(D){const O=[],T=D.split(";");for(;T.length>1;){const H=T.shift(),V=T.shift();if(/^\d+$/.exec(H)){const Q=parseInt(H);if(I(Q))if(V==="?")O.push({type:0,index:Q});else{const ue=(0,C.parseColor)(V);ue&&O.push({type:1,index:Q,color:ue})}}}return O.length&&this._onColor.fire(O),!0}setHyperlink(D){const O=D.split(";");return!(O.length<2)&&(O[1]?this._createHyperlink(O[0],O[1]):!O[0]&&this._finishHyperlink())}_createHyperlink(D,O){this._getCurrentLinkId()&&this._finishHyperlink();const T=D.split(":");let H;const V=T.findIndex((Q=>Q.startsWith("id=")));return V!==-1&&(H=T[V].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:H,uri:O}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(D,O){const T=D.split(";");for(let H=0;H<T.length&&!(O>=this._specialColors.length);++H,++O)if(T[H]==="?")this._onColor.fire([{type:0,index:this._specialColors[O]}]);else{const V=(0,C.parseColor)(T[H]);V&&this._onColor.fire([{type:1,index:this._specialColors[O],color:V}])}return!0}setOrReportFgColor(D){return this._setOrReportSpecialColor(D,0)}setOrReportBgColor(D){return this._setOrReportSpecialColor(D,1)}setOrReportCursorColor(D){return this._setOrReportSpecialColor(D,2)}restoreIndexedColor(D){if(!D)return this._onColor.fire([{type:2}]),!0;const O=[],T=D.split(";");for(let H=0;H<T.length;++H)if(/^\d+$/.exec(T[H])){const V=parseInt(T[H]);I(V)&&O.push({type:2,index:V})}return O.length&&this._onColor.fire(O),!0}restoreFgColor(D){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(D){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(D){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,p.DEFAULT_CHARSET),!0}selectCharset(D){return D.length!==2?(this.selectDefaultCharset(),!0):(D[0]==="/"||this._charsetService.setgCharset(L[D[0]],p.CHARSETS[D[1]]||p.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 D=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,D,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=r.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=r.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(D){return this._charsetService.setgLevel(D),!0}screenAlignmentPattern(){const D=new l.CellData;D.content=4194373,D.fg=this._curAttrData.fg,D.bg=this._curAttrData.bg,this._setCursor(0,0);for(let O=0;O<this._bufferService.rows;++O){const T=this._activeBuffer.ybase+this._activeBuffer.y+O,H=this._activeBuffer.lines.get(T);H&&(H.fill(D),H.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(D,O){const T=this._bufferService.buffer,H=this._optionsService.rawOptions;return(V=>(this._coreService.triggerDataEvent(`${a.C0.ESC}${V}${a.C0.ESC}\\`),!0))(D==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:D==='"p'?'P1$r61;1"p':D==="r"?`P1$r${T.scrollTop+1};${T.scrollBottom+1}r`:D==="m"?"P1$r0m":D===" q"?`P1$r${{block:2,underline:4,bar:6}[H.cursorStyle]-(H.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(D,O){this._dirtyRowTracker.markRangeDirty(D,O)}}n.InputHandler=$;let N=class{constructor(F){this._bufferService=F,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(F){F<this.start?this.start=F:F>this.end&&(this.end=F)}markRangeDirty(F,D){F>D&&(B=F,F=D,D=B),F<this.start&&(this.start=F),D>this.end&&(this.end=D)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function I(F){return 0<=F&&F<256}N=f([_(0,x.IBufferService)],N)},844:(j,n)=>{function u(f){for(const _ of f)_.dispose();f.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 f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const _=this._disposables.indexOf(f);_!==-1&&this._disposables.splice(_,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var _;this._isDisposed||f===this._value||((_=this._value)==null||_.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},n.toDisposable=function(f){return{dispose:f}},n.disposeArray=u,n.getDisposeArrayDisposable=function(f){return{dispose:()=>u(f)}}},1505:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(_,a,p){this._data[_]||(this._data[_]={}),this._data[_][a]=p}get(_,a){return this._data[_]?this._data[_][a]:void 0}clear(){this._data={}}}n.TwoKeyMap=u,n.FourKeyMap=class{constructor(){this._data=new u}set(f,_,a,p,w){this._data.get(f,_)||this._data.set(f,_,new u),this._data.get(f,_).set(a,p,w)}get(f,_,a,p){var w;return(w=this._data.get(f,_))==null?void 0:w.get(a,p)}clear(){this._data.clear()}}},6114:(j,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 u=n.isNode?"node":navigator.userAgent,f=n.isNode?"node":navigator.platform;n.isFirefox=u.includes("Firefox"),n.isLegacyEdge=u.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(u),n.getSafariVersion=function(){if(!n.isSafari)return 0;const _=u.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),n.isIpad=f==="iPad",n.isIphone=f==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),n.isLinux=f.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(u)},6106:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SortedList=void 0;let u=0;n.SortedList=class{constructor(f){this._getKey=f,this._array=[]}clear(){this._array.length=0}insert(f){this._array.length!==0?(u=this._search(this._getKey(f)),this._array.splice(u,0,f)):this._array.push(f)}delete(f){if(this._array.length===0)return!1;const _=this._getKey(f);if(_===void 0||(u=this._search(_),u===-1)||this._getKey(this._array[u])!==_)return!1;do if(this._array[u]===f)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===_);return!1}*getKeyIterator(f){if(this._array.length!==0&&(u=this._search(f),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===f))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===f)}forEachByKey(f,_){if(this._array.length!==0&&(u=this._search(f),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===f))do _(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===f)}values(){return[...this._array].values()}_search(f){let _=0,a=this._array.length-1;for(;a>=_;){let p=_+a>>1;const w=this._getKey(this._array[p]);if(w>f)a=p-1;else{if(!(w<f)){for(;p>0&&this._getKey(this._array[p-1])===f;)p--;return p}_=p+1}}return _}}},7226:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const f=u(6114);class _{constructor(){this._tasks=[],this._i=0}enqueue(w){this._tasks.push(w),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(w){this._idleCallback=void 0;let y=0,o=0,r=w.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(y=Date.now(),this._tasks[this._i]()||this._i++,y=Math.max(1,Date.now()-y),o=Math.max(y,o),h=w.timeRemaining(),1.5*o>h)return r-y<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-y))}ms`),void this._start();r=h}this.clear()}}class a extends _{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const y=Date.now()+w;return{timeRemaining:()=>Math.max(0,y-Date.now())}}}n.PriorityTaskQueue=a,n.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:a,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.updateWindowsModeWrappedState=void 0;const f=u(643);n.updateWindowsModeWrappedState=function(_){const a=_.buffer.lines.get(_.buffer.ybase+_.buffer.y-1),p=a==null?void 0:a.get(_.cols-1),w=_.buffer.lines.get(_.buffer.ybase+_.buffer.y);w&&p&&(w.isWrapped=p[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&p[f.CHAR_DATA_CODE_INDEX]!==f.WHITESPACE_CELL_CODE)}},3734:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(a){return[a>>>16&255,a>>>8&255,255&a]}static fromColorRGB(a){return(255&a[0])<<16|(255&a[1])<<8|255&a[2]}clone(){const a=new u;return a.fg=this.fg,a.bg=this.bg,a.extended=this.extended.clone(),a}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=u;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(a){this._ext=a}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(a){this._ext&=-469762049,this._ext|=a<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(a){this._ext&=-67108864,this._ext|=67108863&a}get urlId(){return this._urlId}set urlId(a){this._urlId=a}get underlineVariantOffset(){const a=(3758096384&this._ext)>>29;return a<0?4294967288^a:a}set underlineVariantOffset(a){this._ext&=536870911,this._ext|=a<<29&3758096384}constructor(a=0,p=0){this._ext=0,this._urlId=0,this._ext=a,this._urlId=p}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=f},9092:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Buffer=n.MAX_BUFFER_SIZE=void 0;const f=u(6349),_=u(7226),a=u(3734),p=u(8437),w=u(4634),y=u(511),o=u(643),r=u(4863),h=u(7116);n.MAX_BUFFER_SIZE=4294967295,n.Buffer=class{constructor(c,l,S){this._hasScrollback=c,this._optionsService=l,this._bufferService=S,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=h.DEFAULT_CHARSET,this.markers=[],this._nullCell=y.CellData.fromCharData([0,o.NULL_CELL_CHAR,o.NULL_CELL_WIDTH,o.NULL_CELL_CODE]),this._whitespaceCell=y.CellData.fromCharData([0,o.WHITESPACE_CELL_CHAR,o.WHITESPACE_CELL_WIDTH,o.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new _.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(c){return c?(this._nullCell.fg=c.fg,this._nullCell.bg=c.bg,this._nullCell.extended=c.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new a.ExtendedAttrs),this._nullCell}getWhitespaceCell(c){return c?(this._whitespaceCell.fg=c.fg,this._whitespaceCell.bg=c.bg,this._whitespaceCell.extended=c.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new a.ExtendedAttrs),this._whitespaceCell}getBlankLine(c,l){return new p.BufferLine(this._bufferService.cols,this.getNullCell(c),l)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const c=this.ybase+this.y-this.ydisp;return c>=0&&c<this._rows}_getCorrectBufferLength(c){if(!this._hasScrollback)return c;const l=c+this._optionsService.rawOptions.scrollback;return l>n.MAX_BUFFER_SIZE?n.MAX_BUFFER_SIZE:l}fillViewportRows(c){if(this.lines.length===0){c===void 0&&(c=p.DEFAULT_ATTR_DATA);let l=this._rows;for(;l--;)this.lines.push(this.getBlankLine(c))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(c,l){const S=this.getNullCell(p.DEFAULT_ATTR_DATA);let x=0;const v=this._getCorrectBufferLength(l);if(v>this.lines.maxLength&&(this.lines.maxLength=v),this.lines.length>0){if(this._cols<c)for(let m=0;m<this.lines.length;m++)x+=+this.lines.get(m).resize(c,S);let b=0;if(this._rows<l)for(let m=this._rows;m<l;m++)this.lines.length<l+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new p.BufferLine(c,S)):this.ybase>0&&this.lines.length<=this.ybase+this.y+b+1?(this.ybase--,b++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(c,S)));else for(let m=this._rows;m>l;m--)this.lines.length>l+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(v<this.lines.maxLength){const m=this.lines.length-v;m>0&&(this.lines.trimStart(m),this.ybase=Math.max(this.ybase-m,0),this.ydisp=Math.max(this.ydisp-m,0),this.savedY=Math.max(this.savedY-m,0)),this.lines.maxLength=v}this.x=Math.min(this.x,c-1),this.y=Math.min(this.y,l-1),b&&(this.y+=b),this.savedX=Math.min(this.savedX,c-1),this.scrollTop=0}if(this.scrollBottom=l-1,this._isReflowEnabled&&(this._reflow(c,l),this._cols>c))for(let b=0;b<this.lines.length;b++)x+=+this.lines.get(b).resize(c,S);this._cols=c,this._rows=l,this._memoryCleanupQueue.clear(),x>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let c=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,c=!1);let l=0;for(;this._memoryCleanupPosition<this.lines.length;)if(l+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),l>100)return!0;return c}get _isReflowEnabled(){const c=this._optionsService.rawOptions.windowsPty;return c&&c.buildNumber?this._hasScrollback&&c.backend==="conpty"&&c.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(c,l){this._cols!==c&&(c>this._cols?this._reflowLarger(c,l):this._reflowSmaller(c,l))}_reflowLarger(c,l){const S=(0,w.reflowLargerGetLinesToRemove)(this.lines,this._cols,c,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(S.length>0){const x=(0,w.reflowLargerCreateNewLayout)(this.lines,S);(0,w.reflowLargerApplyNewLayout)(this.lines,x.layout),this._reflowLargerAdjustViewport(c,l,x.countRemoved)}}_reflowLargerAdjustViewport(c,l,S){const x=this.getNullCell(p.DEFAULT_ATTR_DATA);let v=S;for(;v-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<l&&this.lines.push(new p.BufferLine(c,x))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-S,0)}_reflowSmaller(c,l){const S=this.getNullCell(p.DEFAULT_ATTR_DATA),x=[];let v=0;for(let b=this.lines.length-1;b>=0;b--){let m=this.lines.get(b);if(!m||!m.isWrapped&&m.getTrimmedLength()<=c)continue;const C=[m];for(;m.isWrapped&&b>0;)m=this.lines.get(--b),C.unshift(m);const L=this.ybase+this.y;if(L>=b&&L<b+C.length)continue;const M=C[C.length-1].getTrimmedLength(),E=(0,w.reflowSmallerGetNewLineLengths)(C,this._cols,c),R=E.length-C.length;let B;B=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+R):Math.max(0,this.lines.length-this.lines.maxLength+R);const $=[];for(let T=0;T<R;T++){const H=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);$.push(H)}$.length>0&&(x.push({start:b+C.length+v,newLines:$}),v+=$.length),C.push(...$);let N=E.length-1,I=E[N];I===0&&(N--,I=E[N]);let F=C.length-R-1,D=M;for(;F>=0;){const T=Math.min(D,I);if(C[N]===void 0)break;if(C[N].copyCellsFrom(C[F],D-T,I-T,T,!0),I-=T,I===0&&(N--,I=E[N]),D-=T,D===0){F--;const H=Math.max(F,0);D=(0,w.getWrappedLineTrimmedLength)(C,H,this._cols)}}for(let T=0;T<C.length;T++)E[T]<c&&C[T].setCell(E[T],S);let O=R-B;for(;O-- >0;)this.ybase===0?this.y<l-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+v)-l&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+R,this.ybase+l-1)}if(x.length>0){const b=[],m=[];for(let N=0;N<this.lines.length;N++)m.push(this.lines.get(N));const C=this.lines.length;let L=C-1,M=0,E=x[M];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+v);let R=0;for(let N=Math.min(this.lines.maxLength-1,C+v-1);N>=0;N--)if(E&&E.start>L+R){for(let I=E.newLines.length-1;I>=0;I--)this.lines.set(N--,E.newLines[I]);N++,b.push({index:L+1,amount:E.newLines.length}),R+=E.newLines.length,E=x[++M]}else this.lines.set(N,m[L--]);let B=0;for(let N=b.length-1;N>=0;N--)b[N].index+=B,this.lines.onInsertEmitter.fire(b[N]),B+=b[N].amount;const $=Math.max(0,C+v-this.lines.maxLength);$>0&&this.lines.onTrimEmitter.fire($)}}translateBufferLineToString(c,l,S=0,x){const v=this.lines.get(c);return v?v.translateToString(l,S,x):""}getWrappedRangeForLine(c){let l=c,S=c;for(;l>0&&this.lines.get(l).isWrapped;)l--;for(;S+1<this.lines.length&&this.lines.get(S+1).isWrapped;)S++;return{first:l,last:S}}setupTabStops(c){for(c!=null?this.tabs[c]||(c=this.prevStop(c)):(this.tabs={},c=0);c<this._cols;c+=this._optionsService.rawOptions.tabStopWidth)this.tabs[c]=!0}prevStop(c){for(c==null&&(c=this.x);!this.tabs[--c]&&c>0;);return c>=this._cols?this._cols-1:c<0?0:c}nextStop(c){for(c==null&&(c=this.x);!this.tabs[++c]&&c<this._cols;);return c>=this._cols?this._cols-1:c<0?0:c}clearMarkers(c){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].line===c&&(this.markers[l].dispose(),this.markers.splice(l--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let c=0;c<this.markers.length;c++)this.markers[c].dispose(),this.markers.splice(c--,1);this._isClearing=!1}addMarker(c){const l=new r.Marker(c);return this.markers.push(l),l.register(this.lines.onTrim((S=>{l.line-=S,l.line<0&&l.dispose()}))),l.register(this.lines.onInsert((S=>{l.line>=S.index&&(l.line+=S.amount)}))),l.register(this.lines.onDelete((S=>{l.line>=S.index&&l.line<S.index+S.amount&&l.dispose(),l.line>S.index&&(l.line-=S.amount)}))),l.register(l.onDispose((()=>this._removeMarker(l)))),l}_removeMarker(c){this._isClearing||this.markers.splice(this.markers.indexOf(c),1)}}},8437:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLine=n.DEFAULT_ATTR_DATA=void 0;const f=u(3734),_=u(511),a=u(643),p=u(482);n.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);let w=0;class y{constructor(r,h,c=!1){this.isWrapped=c,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*r);const l=h||_.CellData.fromCharData([0,a.NULL_CELL_CHAR,a.NULL_CELL_WIDTH,a.NULL_CELL_CODE]);for(let S=0;S<r;++S)this.setCell(S,l);this.length=r}get(r){const h=this._data[3*r+0],c=2097151&h;return[this._data[3*r+1],2097152&h?this._combined[r]:c?(0,p.stringFromCodePoint)(c):"",h>>22,2097152&h?this._combined[r].charCodeAt(this._combined[r].length-1):c]}set(r,h){this._data[3*r+1]=h[a.CHAR_DATA_ATTR_INDEX],h[a.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[r]=h[1],this._data[3*r+0]=2097152|r|h[a.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*r+0]=h[a.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|h[a.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(r){return this._data[3*r+0]>>22}hasWidth(r){return 12582912&this._data[3*r+0]}getFg(r){return this._data[3*r+1]}getBg(r){return this._data[3*r+2]}hasContent(r){return 4194303&this._data[3*r+0]}getCodePoint(r){const h=this._data[3*r+0];return 2097152&h?this._combined[r].charCodeAt(this._combined[r].length-1):2097151&h}isCombined(r){return 2097152&this._data[3*r+0]}getString(r){const h=this._data[3*r+0];return 2097152&h?this._combined[r]:2097151&h?(0,p.stringFromCodePoint)(2097151&h):""}isProtected(r){return 536870912&this._data[3*r+2]}loadCell(r,h){return w=3*r,h.content=this._data[w+0],h.fg=this._data[w+1],h.bg=this._data[w+2],2097152&h.content&&(h.combinedData=this._combined[r]),268435456&h.bg&&(h.extended=this._extendedAttrs[r]),h}setCell(r,h){2097152&h.content&&(this._combined[r]=h.combinedData),268435456&h.bg&&(this._extendedAttrs[r]=h.extended),this._data[3*r+0]=h.content,this._data[3*r+1]=h.fg,this._data[3*r+2]=h.bg}setCellFromCodepoint(r,h,c,l){268435456&l.bg&&(this._extendedAttrs[r]=l.extended),this._data[3*r+0]=h|c<<22,this._data[3*r+1]=l.fg,this._data[3*r+2]=l.bg}addCodepointToCell(r,h,c){let l=this._data[3*r+0];2097152&l?this._combined[r]+=(0,p.stringFromCodePoint)(h):2097151&l?(this._combined[r]=(0,p.stringFromCodePoint)(2097151&l)+(0,p.stringFromCodePoint)(h),l&=-2097152,l|=2097152):l=h|4194304,c&&(l&=-12582913,l|=c<<22),this._data[3*r+0]=l}insertCells(r,h,c){if((r%=this.length)&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,c),h<this.length-r){const l=new _.CellData;for(let S=this.length-r-h-1;S>=0;--S)this.setCell(r+h+S,this.loadCell(r+S,l));for(let S=0;S<h;++S)this.setCell(r+S,c)}else for(let l=r;l<this.length;++l)this.setCell(l,c);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,c)}deleteCells(r,h,c){if(r%=this.length,h<this.length-r){const l=new _.CellData;for(let S=0;S<this.length-r-h;++S)this.setCell(r+S,this.loadCell(r+h+S,l));for(let S=this.length-h;S<this.length;++S)this.setCell(S,c)}else for(let l=r;l<this.length;++l)this.setCell(l,c);r&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,c),this.getWidth(r)!==0||this.hasContent(r)||this.setCellFromCodepoint(r,0,1,c)}replaceCells(r,h,c,l=!1){if(l)for(r&&this.getWidth(r-1)===2&&!this.isProtected(r-1)&&this.setCellFromCodepoint(r-1,0,1,c),h<this.length&&this.getWidth(h-1)===2&&!this.isProtected(h)&&this.setCellFromCodepoint(h,0,1,c);r<h&&r<this.length;)this.isProtected(r)||this.setCell(r,c),r++;else for(r&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,c),h<this.length&&this.getWidth(h-1)===2&&this.setCellFromCodepoint(h,0,1,c);r<h&&r<this.length;)this.setCell(r++,c)}resize(r,h){if(r===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const c=3*r;if(r>this.length){if(this._data.buffer.byteLength>=4*c)this._data=new Uint32Array(this._data.buffer,0,c);else{const l=new Uint32Array(c);l.set(this._data),this._data=l}for(let l=this.length;l<r;++l)this.setCell(l,h)}else{this._data=this._data.subarray(0,c);const l=Object.keys(this._combined);for(let x=0;x<l.length;x++){const v=parseInt(l[x],10);v>=r&&delete this._combined[v]}const S=Object.keys(this._extendedAttrs);for(let x=0;x<S.length;x++){const v=parseInt(S[x],10);v>=r&&delete this._extendedAttrs[v]}}return this.length=r,4*c*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const r=new Uint32Array(this._data.length);return r.set(this._data),this._data=r,1}return 0}fill(r,h=!1){if(h)for(let c=0;c<this.length;++c)this.isProtected(c)||this.setCell(c,r);else{this._combined={},this._extendedAttrs={};for(let c=0;c<this.length;++c)this.setCell(c,r)}}copyFrom(r){this.length!==r.length?this._data=new Uint32Array(r._data):this._data.set(r._data),this.length=r.length,this._combined={};for(const h in r._combined)this._combined[h]=r._combined[h];this._extendedAttrs={};for(const h in r._extendedAttrs)this._extendedAttrs[h]=r._extendedAttrs[h];this.isWrapped=r.isWrapped}clone(){const r=new y(0);r._data=new Uint32Array(this._data),r.length=this.length;for(const h in this._combined)r._combined[h]=this._combined[h];for(const h in this._extendedAttrs)r._extendedAttrs[h]=this._extendedAttrs[h];return r.isWrapped=this.isWrapped,r}getTrimmedLength(){for(let r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0])return r+(this._data[3*r+0]>>22);return 0}getNoBgTrimmedLength(){for(let r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0]||50331648&this._data[3*r+2])return r+(this._data[3*r+0]>>22);return 0}copyCellsFrom(r,h,c,l,S){const x=r._data;if(S)for(let b=l-1;b>=0;b--){for(let m=0;m<3;m++)this._data[3*(c+b)+m]=x[3*(h+b)+m];268435456&x[3*(h+b)+2]&&(this._extendedAttrs[c+b]=r._extendedAttrs[h+b])}else for(let b=0;b<l;b++){for(let m=0;m<3;m++)this._data[3*(c+b)+m]=x[3*(h+b)+m];268435456&x[3*(h+b)+2]&&(this._extendedAttrs[c+b]=r._extendedAttrs[h+b])}const v=Object.keys(r._combined);for(let b=0;b<v.length;b++){const m=parseInt(v[b],10);m>=h&&(this._combined[m-h+c]=r._combined[m])}}translateToString(r,h,c,l){h=h??0,c=c??this.length,r&&(c=Math.min(c,this.getTrimmedLength())),l&&(l.length=0);let S="";for(;h<c;){const x=this._data[3*h+0],v=2097151&x,b=2097152&x?this._combined[h]:v?(0,p.stringFromCodePoint)(v):a.WHITESPACE_CELL_CHAR;if(S+=b,l)for(let m=0;m<b.length;++m)l.push(h);h+=x>>22||1}return l&&l.push(h),S}}n.BufferLine=y},4841:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.getRangeLength=void 0,n.getRangeLength=function(u,f){if(u.start.y>u.end.y)throw new Error(`Buffer range end (${u.end.x}, ${u.end.y}) cannot be before start (${u.start.x}, ${u.start.y})`);return f*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(j,n)=>{function u(f,_,a){if(_===f.length-1)return f[_].getTrimmedLength();const p=!f[_].hasContent(a-1)&&f[_].getWidth(a-1)===1,w=f[_+1].getWidth(0)===2;return p&&w?a-1:a}Object.defineProperty(n,"__esModule",{value:!0}),n.getWrappedLineTrimmedLength=n.reflowSmallerGetNewLineLengths=n.reflowLargerApplyNewLayout=n.reflowLargerCreateNewLayout=n.reflowLargerGetLinesToRemove=void 0,n.reflowLargerGetLinesToRemove=function(f,_,a,p,w){const y=[];for(let o=0;o<f.length-1;o++){let r=o,h=f.get(++r);if(!h.isWrapped)continue;const c=[f.get(o)];for(;r<f.length&&h.isWrapped;)c.push(h),h=f.get(++r);if(p>=o&&p<r){o+=c.length-1;continue}let l=0,S=u(c,l,_),x=1,v=0;for(;x<c.length;){const m=u(c,x,_),C=m-v,L=a-S,M=Math.min(C,L);c[l].copyCellsFrom(c[x],v,S,M,!1),S+=M,S===a&&(l++,S=0),v+=M,v===m&&(x++,v=0),S===0&&l!==0&&c[l-1].getWidth(a-1)===2&&(c[l].copyCellsFrom(c[l-1],a-1,S++,1,!1),c[l-1].setCell(a-1,w))}c[l].replaceCells(S,a,w);let b=0;for(let m=c.length-1;m>0&&(m>l||c[m].getTrimmedLength()===0);m--)b++;b>0&&(y.push(o+c.length-b),y.push(b)),o+=c.length-1}return y},n.reflowLargerCreateNewLayout=function(f,_){const a=[];let p=0,w=_[p],y=0;for(let o=0;o<f.length;o++)if(w===o){const r=_[++p];f.onDeleteEmitter.fire({index:o-y,amount:r}),o+=r-1,y+=r,w=_[++p]}else a.push(o);return{layout:a,countRemoved:y}},n.reflowLargerApplyNewLayout=function(f,_){const a=[];for(let p=0;p<_.length;p++)a.push(f.get(_[p]));for(let p=0;p<a.length;p++)f.set(p,a[p]);f.length=_.length},n.reflowSmallerGetNewLineLengths=function(f,_,a){const p=[],w=f.map(((h,c)=>u(f,c,_))).reduce(((h,c)=>h+c));let y=0,o=0,r=0;for(;r<w;){if(w-r<a){p.push(w-r);break}y+=a;const h=u(f,o,_);y>h&&(y-=h,o++);const c=f[o].getWidth(y-1)===2;c&&y--;const l=c?a-1:a;p.push(l),r+=l}return p},n.getWrappedLineTrimmedLength=u},5295:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferSet=void 0;const f=u(8460),_=u(844),a=u(9092);class p extends _.Disposable{constructor(y,o){super(),this._optionsService=y,this._bufferService=o,this._onBufferActivate=this.register(new f.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new a.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new a.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(y){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(y),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(y,o){this._normal.resize(y,o),this._alt.resize(y,o),this.setupTabStops(y)}setupTabStops(y){this._normal.setupTabStops(y),this._alt.setupTabStops(y)}}n.BufferSet=p},511:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const f=u(482),_=u(643),a=u(3734);class p extends a.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new a.ExtendedAttrs,this.combinedData=""}static fromCharData(y){const o=new p;return o.setFromCharData(y),o}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(y){this.fg=y[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let o=!1;if(y[_.CHAR_DATA_CHAR_INDEX].length>2)o=!0;else if(y[_.CHAR_DATA_CHAR_INDEX].length===2){const r=y[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=y[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|y[_.CHAR_DATA_WIDTH_INDEX]<<22:o=!0}else o=!0}else this.content=y[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|y[_.CHAR_DATA_WIDTH_INDEX]<<22;o&&(this.combinedData=y[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|y[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=p},643:(j,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:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Marker=void 0;const f=u(8460),_=u(844);class a{get id(){return this._id}constructor(w){this.line=w,this.isDisposed=!1,this._disposables=[],this._id=a._nextId++,this._onDispose=this.register(new f.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,_.disposeArray)(this._disposables),this._disposables.length=0)}register(w){return this._disposables.push(w),w}}n.Marker=a,a._nextId=1},7116:(j,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:(j,n)=>{var u,f,_;Object.defineProperty(n,"__esModule",{value:!0}),n.C1_ESCAPED=n.C1=n.C0=void 0,(function(a){a.NUL="\0",a.SOH="",a.STX="",a.ETX="",a.EOT="",a.ENQ="",a.ACK="",a.BEL="\x07",a.BS="\b",a.HT=" ",a.LF=`
56
+ `,a.VT="\v",a.FF="\f",a.CR="\r",a.SO="",a.SI="",a.DLE="",a.DC1="",a.DC2="",a.DC3="",a.DC4="",a.NAK="",a.SYN="",a.ETB="",a.CAN="",a.EM="",a.SUB="",a.ESC="\x1B",a.FS="",a.GS="",a.RS="",a.US="",a.SP=" ",a.DEL=""})(u||(n.C0=u={})),(function(a){a.PAD="€",a.HOP="",a.BPH="‚",a.NBH="ƒ",a.IND="„",a.NEL="…",a.SSA="†",a.ESA="‡",a.HTS="ˆ",a.HTJ="‰",a.VTS="Š",a.PLD="‹",a.PLU="Œ",a.RI="",a.SS2="Ž",a.SS3="",a.DCS="",a.PU1="‘",a.PU2="’",a.STS="“",a.CCH="”",a.MW="•",a.SPA="–",a.EPA="—",a.SOS="˜",a.SGCI="™",a.SCI="š",a.CSI="›",a.ST="œ",a.OSC="",a.PM="ž",a.APC="Ÿ"})(f||(n.C1=f={})),(function(a){a.ST=`${u.ESC}\\`})(_||(n.C1_ESCAPED=_={}))},7399:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.evaluateKeyboardEvent=void 0;const f=u(2584),_={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(a,p,w,y){const o={type:0,cancel:!1,key:void 0},r=(a.shiftKey?1:0)|(a.altKey?2:0)|(a.ctrlKey?4:0)|(a.metaKey?8:0);switch(a.keyCode){case 0:a.key==="UIKeyInputUpArrow"?o.key=p?f.C0.ESC+"OA":f.C0.ESC+"[A":a.key==="UIKeyInputLeftArrow"?o.key=p?f.C0.ESC+"OD":f.C0.ESC+"[D":a.key==="UIKeyInputRightArrow"?o.key=p?f.C0.ESC+"OC":f.C0.ESC+"[C":a.key==="UIKeyInputDownArrow"&&(o.key=p?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:o.key=a.ctrlKey?"\b":f.C0.DEL,a.altKey&&(o.key=f.C0.ESC+o.key);break;case 9:if(a.shiftKey){o.key=f.C0.ESC+"[Z";break}o.key=f.C0.HT,o.cancel=!0;break;case 13:o.key=a.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,o.cancel=!0;break;case 27:o.key=f.C0.ESC,a.altKey&&(o.key=f.C0.ESC+f.C0.ESC),o.cancel=!0;break;case 37:if(a.metaKey)break;r?(o.key=f.C0.ESC+"[1;"+(r+1)+"D",o.key===f.C0.ESC+"[1;3D"&&(o.key=f.C0.ESC+(w?"b":"[1;5D"))):o.key=p?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(a.metaKey)break;r?(o.key=f.C0.ESC+"[1;"+(r+1)+"C",o.key===f.C0.ESC+"[1;3C"&&(o.key=f.C0.ESC+(w?"f":"[1;5C"))):o.key=p?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(a.metaKey)break;r?(o.key=f.C0.ESC+"[1;"+(r+1)+"A",w||o.key!==f.C0.ESC+"[1;3A"||(o.key=f.C0.ESC+"[1;5A")):o.key=p?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(a.metaKey)break;r?(o.key=f.C0.ESC+"[1;"+(r+1)+"B",w||o.key!==f.C0.ESC+"[1;3B"||(o.key=f.C0.ESC+"[1;5B")):o.key=p?f.C0.ESC+"OB":f.C0.ESC+"[B";break;case 45:a.shiftKey||a.ctrlKey||(o.key=f.C0.ESC+"[2~");break;case 46:o.key=r?f.C0.ESC+"[3;"+(r+1)+"~":f.C0.ESC+"[3~";break;case 36:o.key=r?f.C0.ESC+"[1;"+(r+1)+"H":p?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:o.key=r?f.C0.ESC+"[1;"+(r+1)+"F":p?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:a.shiftKey?o.type=2:a.ctrlKey?o.key=f.C0.ESC+"[5;"+(r+1)+"~":o.key=f.C0.ESC+"[5~";break;case 34:a.shiftKey?o.type=3:a.ctrlKey?o.key=f.C0.ESC+"[6;"+(r+1)+"~":o.key=f.C0.ESC+"[6~";break;case 112:o.key=r?f.C0.ESC+"[1;"+(r+1)+"P":f.C0.ESC+"OP";break;case 113:o.key=r?f.C0.ESC+"[1;"+(r+1)+"Q":f.C0.ESC+"OQ";break;case 114:o.key=r?f.C0.ESC+"[1;"+(r+1)+"R":f.C0.ESC+"OR";break;case 115:o.key=r?f.C0.ESC+"[1;"+(r+1)+"S":f.C0.ESC+"OS";break;case 116:o.key=r?f.C0.ESC+"[15;"+(r+1)+"~":f.C0.ESC+"[15~";break;case 117:o.key=r?f.C0.ESC+"[17;"+(r+1)+"~":f.C0.ESC+"[17~";break;case 118:o.key=r?f.C0.ESC+"[18;"+(r+1)+"~":f.C0.ESC+"[18~";break;case 119:o.key=r?f.C0.ESC+"[19;"+(r+1)+"~":f.C0.ESC+"[19~";break;case 120:o.key=r?f.C0.ESC+"[20;"+(r+1)+"~":f.C0.ESC+"[20~";break;case 121:o.key=r?f.C0.ESC+"[21;"+(r+1)+"~":f.C0.ESC+"[21~";break;case 122:o.key=r?f.C0.ESC+"[23;"+(r+1)+"~":f.C0.ESC+"[23~";break;case 123:o.key=r?f.C0.ESC+"[24;"+(r+1)+"~":f.C0.ESC+"[24~";break;default:if(!a.ctrlKey||a.shiftKey||a.altKey||a.metaKey)if(w&&!y||!a.altKey||a.metaKey)!w||a.altKey||a.ctrlKey||a.shiftKey||!a.metaKey?a.key&&!a.ctrlKey&&!a.altKey&&!a.metaKey&&a.keyCode>=48&&a.key.length===1?o.key=a.key:a.key&&a.ctrlKey&&(a.key==="_"&&(o.key=f.C0.US),a.key==="@"&&(o.key=f.C0.NUL)):a.keyCode===65&&(o.type=1);else{const h=_[a.keyCode],c=h==null?void 0:h[a.shiftKey?1:0];if(c)o.key=f.C0.ESC+c;else if(a.keyCode>=65&&a.keyCode<=90){const l=a.ctrlKey?a.keyCode-64:a.keyCode+32;let S=String.fromCharCode(l);a.shiftKey&&(S=S.toUpperCase()),o.key=f.C0.ESC+S}else if(a.keyCode===32)o.key=f.C0.ESC+(a.ctrlKey?f.C0.NUL:" ");else if(a.key==="Dead"&&a.code.startsWith("Key")){let l=a.code.slice(3,4);a.shiftKey||(l=l.toLowerCase()),o.key=f.C0.ESC+l,o.cancel=!0}}else a.keyCode>=65&&a.keyCode<=90?o.key=String.fromCharCode(a.keyCode-64):a.keyCode===32?o.key=f.C0.NUL:a.keyCode>=51&&a.keyCode<=55?o.key=String.fromCharCode(a.keyCode-51+27):a.keyCode===56?o.key=f.C0.DEL:a.keyCode===219?o.key=f.C0.ESC:a.keyCode===220?o.key=f.C0.FS:a.keyCode===221&&(o.key=f.C0.GS)}return o}},482:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},n.utf32ToString=function(u,f=0,_=u.length){let a="";for(let p=f;p<_;++p){let w=u[p];w>65535?(w-=65536,a+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):a+=String.fromCharCode(w)}return a},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,f){const _=u.length;if(!_)return 0;let a=0,p=0;if(this._interim){const w=u.charCodeAt(p++);56320<=w&&w<=57343?f[a++]=1024*(this._interim-55296)+w-56320+65536:(f[a++]=this._interim,f[a++]=w),this._interim=0}for(let w=p;w<_;++w){const y=u.charCodeAt(w);if(55296<=y&&y<=56319){if(++w>=_)return this._interim=y,a;const o=u.charCodeAt(w);56320<=o&&o<=57343?f[a++]=1024*(y-55296)+o-56320+65536:(f[a++]=y,f[a++]=o)}else y!==65279&&(f[a++]=y)}return a}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,f){const _=u.length;if(!_)return 0;let a,p,w,y,o=0,r=0,h=0;if(this.interim[0]){let S=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let v,b=0;for(;(v=63&this.interim[++b])&&b<4;)x<<=6,x|=v;const m=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,C=m-b;for(;h<C;){if(h>=_)return 0;if(v=u[h++],(192&v)!=128){h--,S=!0;break}this.interim[b++]=v,x<<=6,x|=63&v}S||(m===2?x<128?h--:f[o++]=x:m===3?x<2048||x>=55296&&x<=57343||x===65279||(f[o++]=x):x<65536||x>1114111||(f[o++]=x)),this.interim.fill(0)}const c=_-4;let l=h;for(;l<_;){for(;!(!(l<c)||128&(a=u[l])||128&(p=u[l+1])||128&(w=u[l+2])||128&(y=u[l+3]));)f[o++]=a,f[o++]=p,f[o++]=w,f[o++]=y,l+=4;if(a=u[l++],a<128)f[o++]=a;else if((224&a)==192){if(l>=_)return this.interim[0]=a,o;if(p=u[l++],(192&p)!=128){l--;continue}if(r=(31&a)<<6|63&p,r<128){l--;continue}f[o++]=r}else if((240&a)==224){if(l>=_)return this.interim[0]=a,o;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,o;if(w=u[l++],(192&w)!=128){l--;continue}if(r=(15&a)<<12|(63&p)<<6|63&w,r<2048||r>=55296&&r<=57343||r===65279)continue;f[o++]=r}else if((248&a)==240){if(l>=_)return this.interim[0]=a,o;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,o;if(w=u[l++],(192&w)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,this.interim[2]=w,o;if(y=u[l++],(192&y)!=128){l--;continue}if(r=(7&a)<<18|(63&p)<<12|(63&w)<<6|63&y,r<65536||r>1114111)continue;f[o++]=r}}return o}}},225:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeV6=void 0;const f=u(1480),_=[[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]],a=[[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 p;n.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let w=0;w<_.length;++w)p.fill(0,_[w][0],_[w][1]+1)}}wcwidth(w){return w<32?0:w<127?1:w<65536?p[w]:(function(y,o){let r,h=0,c=o.length-1;if(y<o[0][0]||y>o[c][1])return!1;for(;c>=h;)if(r=h+c>>1,y>o[r][1])h=r+1;else{if(!(y<o[r][0]))return!0;c=r-1}return!1})(w,a)?0:w>=131072&&w<=196605||w>=196608&&w<=262141?2:1}charProperties(w,y){let o=this.wcwidth(w),r=o===0&&y!==0;if(r){const h=f.UnicodeService.extractWidth(y);h===0?r=!1:h>o&&(o=h)}return f.UnicodeService.createPropertyValue(0,o,r)}}},5981:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WriteBuffer=void 0;const f=u(8460),_=u(844);class a extends _.Disposable{constructor(w){super(),this._action=w,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new f.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(w,y){if(y!==void 0&&this._syncCalls>y)return void(this._syncCalls=0);if(this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let o;for(this._isSyncWriting=!0;o=this._writeBuffer.shift();){this._action(o);const r=this._callbacks.shift();r&&r()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(w,y){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+=w.length,this._writeBuffer.push(w),this._callbacks.push(y),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(y)}_innerWrite(w=0,y=!0){const o=w||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const r=this._writeBuffer[this._bufferOffset],h=this._action(r,y);if(h){const l=S=>Date.now()-o>=12?setTimeout((()=>this._innerWrite(0,S))):this._innerWrite(o,S);return void h.catch((S=>(queueMicrotask((()=>{throw S})),Promise.resolve(!1)))).then(l)}const c=this._callbacks[this._bufferOffset];if(c&&c(),this._bufferOffset++,this._pendingData-=r.length,Date.now()-o>=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=a},5941:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.toRgbString=n.parseColor=void 0;const u=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,f=/^[\da-f]+$/;function _(a,p){const w=a.toString(16),y=w.length<2?"0"+w:w;switch(p){case 4:return w[0];case 8:return y;case 12:return(y+y).slice(0,3);default:return y+y}}n.parseColor=function(a){if(!a)return;let p=a.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const w=u.exec(p);if(w){const y=w[1]?15:w[4]?255:w[7]?4095:65535;return[Math.round(parseInt(w[1]||w[4]||w[7]||w[10],16)/y*255),Math.round(parseInt(w[2]||w[5]||w[8]||w[11],16)/y*255),Math.round(parseInt(w[3]||w[6]||w[9]||w[12],16)/y*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),f.exec(p)&&[3,6,9,12].includes(p.length))){const w=p.length/3,y=[0,0,0];for(let o=0;o<3;++o){const r=parseInt(p.slice(w*o,w*o+w),16);y[o]=w===1?r<<4:w===2?r:w===3?r>>4:r>>8}return y}},n.toRgbString=function(a,p=16){const[w,y,o]=a;return`rgb:${_(w,p)}/${_(y,p)}/${_(o,p)}`}},5770:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.PAYLOAD_LIMIT=void 0,n.PAYLOAD_LIMIT=1e7},6351:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DcsHandler=n.DcsParser=void 0;const f=u(482),_=u(8742),a=u(5770),p=[];n.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(y,o){this._handlers[y]===void 0&&(this._handlers[y]=[]);const r=this._handlers[y];return r.push(o),{dispose:()=>{const h=r.indexOf(o);h!==-1&&r.splice(h,1)}}}clearHandler(y){this._handlers[y]&&delete this._handlers[y]}setHandlerFallback(y){this._handlerFb=y}reset(){if(this._active.length)for(let y=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;y>=0;--y)this._active[y].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(y,o){if(this.reset(),this._ident=y,this._active=this._handlers[y]||p,this._active.length)for(let r=this._active.length-1;r>=0;r--)this._active[r].hook(o);else this._handlerFb(this._ident,"HOOK",o)}put(y,o,r){if(this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].put(y,o,r);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(y,o,r))}unhook(y,o=!0){if(this._active.length){let r=!1,h=this._active.length-1,c=!1;if(this._stack.paused&&(h=this._stack.loopPosition-1,r=o,c=this._stack.fallThrough,this._stack.paused=!1),!c&&r===!1){for(;h>=0&&(r=this._active[h].unhook(y),r!==!0);h--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!1,r;h--}for(;h>=0;h--)if(r=this._active[h].unhook(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!0,r}else this._handlerFb(this._ident,"UNHOOK",y);this._active=p,this._ident=0}};const w=new _.Params;w.addParam(0),n.DcsHandler=class{constructor(y){this._handler=y,this._data="",this._params=w,this._hitLimit=!1}hook(y){this._params=y.length>1||y.params[0]?y.clone():w,this._data="",this._hitLimit=!1}put(y,o,r){this._hitLimit||(this._data+=(0,f.utf32ToString)(y,o,r),this._data.length>a.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(y){let o=!1;if(this._hitLimit)o=!1;else if(y&&(o=this._handler(this._data,this._params),o instanceof Promise))return o.then((r=>(this._params=w,this._data="",this._hitLimit=!1,r)));return this._params=w,this._data="",this._hitLimit=!1,o}}},2015:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.EscapeSequenceParser=n.VT500_TRANSITION_TABLE=n.TransitionTable=void 0;const f=u(844),_=u(8742),a=u(6242),p=u(6351);class w{constructor(h){this.table=new Uint8Array(h)}setDefault(h,c){this.table.fill(h<<4|c)}add(h,c,l,S){this.table[c<<8|h]=l<<4|S}addMany(h,c,l,S){for(let x=0;x<h.length;x++)this.table[c<<8|h[x]]=l<<4|S}}n.TransitionTable=w;const y=160;n.VT500_TRANSITION_TABLE=(function(){const r=new w(4095),h=Array.apply(null,Array(256)).map(((b,m)=>m)),c=(b,m)=>h.slice(b,m),l=c(32,127),S=c(0,24);S.push(25),S.push.apply(S,c(28,32));const x=c(0,14);let v;for(v in r.setDefault(1,0),r.addMany(l,0,2,0),x)r.addMany([24,26,153,154],v,3,0),r.addMany(c(128,144),v,3,0),r.addMany(c(144,152),v,3,0),r.add(156,v,0,0),r.add(27,v,11,1),r.add(157,v,4,8),r.addMany([152,158,159],v,0,7),r.add(155,v,11,3),r.add(144,v,11,9);return r.addMany(S,0,3,0),r.addMany(S,1,3,1),r.add(127,1,0,1),r.addMany(S,8,0,8),r.addMany(S,3,3,3),r.add(127,3,0,3),r.addMany(S,4,3,4),r.add(127,4,0,4),r.addMany(S,6,3,6),r.addMany(S,5,3,5),r.add(127,5,0,5),r.addMany(S,2,3,2),r.add(127,2,0,2),r.add(93,1,4,8),r.addMany(l,8,5,8),r.add(127,8,5,8),r.addMany([156,27,24,26,7],8,6,0),r.addMany(c(28,32),8,0,8),r.addMany([88,94,95],1,0,7),r.addMany(l,7,0,7),r.addMany(S,7,0,7),r.add(156,7,0,0),r.add(127,7,0,7),r.add(91,1,11,3),r.addMany(c(64,127),3,7,0),r.addMany(c(48,60),3,8,4),r.addMany([60,61,62,63],3,9,4),r.addMany(c(48,60),4,8,4),r.addMany(c(64,127),4,7,0),r.addMany([60,61,62,63],4,0,6),r.addMany(c(32,64),6,0,6),r.add(127,6,0,6),r.addMany(c(64,127),6,0,0),r.addMany(c(32,48),3,9,5),r.addMany(c(32,48),5,9,5),r.addMany(c(48,64),5,0,6),r.addMany(c(64,127),5,7,0),r.addMany(c(32,48),4,9,5),r.addMany(c(32,48),1,9,2),r.addMany(c(32,48),2,9,2),r.addMany(c(48,127),2,10,0),r.addMany(c(48,80),1,10,0),r.addMany(c(81,88),1,10,0),r.addMany([89,90,92],1,10,0),r.addMany(c(96,127),1,10,0),r.add(80,1,11,9),r.addMany(S,9,0,9),r.add(127,9,0,9),r.addMany(c(28,32),9,0,9),r.addMany(c(32,48),9,9,12),r.addMany(c(48,60),9,8,10),r.addMany([60,61,62,63],9,9,10),r.addMany(S,11,0,11),r.addMany(c(32,128),11,0,11),r.addMany(c(28,32),11,0,11),r.addMany(S,10,0,10),r.add(127,10,0,10),r.addMany(c(28,32),10,0,10),r.addMany(c(48,60),10,8,10),r.addMany([60,61,62,63],10,0,11),r.addMany(c(32,48),10,9,12),r.addMany(S,12,0,12),r.add(127,12,0,12),r.addMany(c(28,32),12,0,12),r.addMany(c(32,48),12,9,12),r.addMany(c(48,64),12,0,11),r.addMany(c(64,127),12,12,13),r.addMany(c(64,127),10,12,13),r.addMany(c(64,127),9,12,13),r.addMany(S,13,13,13),r.addMany(l,13,13,13),r.add(127,13,0,13),r.addMany([27,156,24,26],13,14,0),r.add(y,0,2,0),r.add(y,8,5,8),r.add(y,6,0,6),r.add(y,11,0,11),r.add(y,13,13,13),r})();class o extends f.Disposable{constructor(h=n.VT500_TRANSITION_TABLE){super(),this._transitions=h,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new _.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(c,l,S)=>{},this._executeHandlerFb=c=>{},this._csiHandlerFb=(c,l)=>{},this._escHandlerFb=c=>{},this._errorHandlerFb=c=>c,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,f.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new a.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(h,c=[64,126]){let l=0;if(h.prefix){if(h.prefix.length>1)throw new Error("only one byte as prefix supported");if(l=h.prefix.charCodeAt(0),l&&60>l||l>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(h.intermediates){if(h.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let x=0;x<h.intermediates.length;++x){const v=h.intermediates.charCodeAt(x);if(32>v||v>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=v}}if(h.final.length!==1)throw new Error("final must be a single byte");const S=h.final.charCodeAt(0);if(c[0]>S||S>c[1])throw new Error(`final must be in range ${c[0]} .. ${c[1]}`);return l<<=8,l|=S,l}identToString(h){const c=[];for(;h;)c.push(String.fromCharCode(255&h)),h>>=8;return c.reverse().join("")}setPrintHandler(h){this._printHandler=h}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(h,c){const l=this._identifier(h,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);const S=this._escHandlers[l];return S.push(c),{dispose:()=>{const x=S.indexOf(c);x!==-1&&S.splice(x,1)}}}clearEscHandler(h){this._escHandlers[this._identifier(h,[48,126])]&&delete this._escHandlers[this._identifier(h,[48,126])]}setEscHandlerFallback(h){this._escHandlerFb=h}setExecuteHandler(h,c){this._executeHandlers[h.charCodeAt(0)]=c}clearExecuteHandler(h){this._executeHandlers[h.charCodeAt(0)]&&delete this._executeHandlers[h.charCodeAt(0)]}setExecuteHandlerFallback(h){this._executeHandlerFb=h}registerCsiHandler(h,c){const l=this._identifier(h);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);const S=this._csiHandlers[l];return S.push(c),{dispose:()=>{const x=S.indexOf(c);x!==-1&&S.splice(x,1)}}}clearCsiHandler(h){this._csiHandlers[this._identifier(h)]&&delete this._csiHandlers[this._identifier(h)]}setCsiHandlerFallback(h){this._csiHandlerFb=h}registerDcsHandler(h,c){return this._dcsParser.registerHandler(this._identifier(h),c)}clearDcsHandler(h){this._dcsParser.clearHandler(this._identifier(h))}setDcsHandlerFallback(h){this._dcsParser.setHandlerFallback(h)}registerOscHandler(h,c){return this._oscParser.registerHandler(h,c)}clearOscHandler(h){this._oscParser.clearHandler(h)}setOscHandlerFallback(h){this._oscParser.setHandlerFallback(h)}setErrorHandler(h){this._errorHandler=h}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(h,c,l,S,x){this._parseStack.state=h,this._parseStack.handlers=c,this._parseStack.handlerPos=l,this._parseStack.transition=S,this._parseStack.chunkPos=x}parse(h,c,l){let S,x=0,v=0,b=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,b=this._parseStack.chunkPos+1;else{if(l===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const m=this._parseStack.handlers;let C=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(l===!1&&C>-1){for(;C>=0&&(S=m[C](this._params),S!==!0);C--)if(S instanceof Promise)return this._parseStack.handlerPos=C,S}this._parseStack.handlers=[];break;case 4:if(l===!1&&C>-1){for(;C>=0&&(S=m[C](),S!==!0);C--)if(S instanceof Promise)return this._parseStack.handlerPos=C,S}this._parseStack.handlers=[];break;case 6:if(x=h[this._parseStack.chunkPos],S=this._dcsParser.unhook(x!==24&&x!==26,l),S)return S;x===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(x=h[this._parseStack.chunkPos],S=this._oscParser.end(x!==24&&x!==26,l),S)return S;x===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,b=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let m=b;m<c;++m){switch(x=h[m],v=this._transitions.table[this.currentState<<8|(x<160?x:y)],v>>4){case 2:for(let R=m+1;;++R){if(R>=c||(x=h[R])<32||x>126&&x<y){this._printHandler(h,m,R),m=R-1;break}if(++R>=c||(x=h[R])<32||x>126&&x<y){this._printHandler(h,m,R),m=R-1;break}if(++R>=c||(x=h[R])<32||x>126&&x<y){this._printHandler(h,m,R),m=R-1;break}if(++R>=c||(x=h[R])<32||x>126&&x<y){this._printHandler(h,m,R),m=R-1;break}}break;case 3:this._executeHandlers[x]?this._executeHandlers[x]():this._executeHandlerFb(x),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:m,code:x,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const C=this._csiHandlers[this._collect<<8|x];let L=C?C.length-1:-1;for(;L>=0&&(S=C[L](this._params),S!==!0);L--)if(S instanceof Promise)return this._preserveStack(3,C,L,v,m),S;L<0&&this._csiHandlerFb(this._collect<<8|x,this._params),this.precedingJoinState=0;break;case 8:do switch(x){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(x-48)}while(++m<c&&(x=h[m])>47&&x<60);m--;break;case 9:this._collect<<=8,this._collect|=x;break;case 10:const M=this._escHandlers[this._collect<<8|x];let E=M?M.length-1:-1;for(;E>=0&&(S=M[E](),S!==!0);E--)if(S instanceof Promise)return this._preserveStack(4,M,E,v,m),S;E<0&&this._escHandlerFb(this._collect<<8|x),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|x,this._params);break;case 13:for(let R=m+1;;++R)if(R>=c||(x=h[R])===24||x===26||x===27||x>127&&x<y){this._dcsParser.put(h,m,R),m=R-1;break}break;case 14:if(S=this._dcsParser.unhook(x!==24&&x!==26),S)return this._preserveStack(6,[],0,v,m),S;x===27&&(v|=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 R=m+1;;R++)if(R>=c||(x=h[R])<32||x>127&&x<y){this._oscParser.put(h,m,R),m=R-1;break}break;case 6:if(S=this._oscParser.end(x!==24&&x!==26),S)return this._preserveStack(5,[],0,v,m),S;x===27&&(v|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&v}}}n.EscapeSequenceParser=o},6242:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OscHandler=n.OscParser=void 0;const f=u(5770),_=u(482),a=[];n.OscParser=class{constructor(){this._state=0,this._active=a,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,w){this._handlers[p]===void 0&&(this._handlers[p]=[]);const y=this._handlers[p];return y.push(w),{dispose:()=>{const o=y.indexOf(w);o!==-1&&y.splice(o,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=a}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=a,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||a,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,w,y){if(this._active.length)for(let o=this._active.length-1;o>=0;o--)this._active[o].put(p,w,y);else this._handlerFb(this._id,"PUT",(0,_.utf32ToString)(p,w,y))}start(){this.reset(),this._state=1}put(p,w,y){if(this._state!==3){if(this._state===1)for(;w<y;){const o=p[w++];if(o===59){this._state=2,this._start();break}if(o<48||57<o)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+o-48}this._state===2&&y-w>0&&this._put(p,w,y)}}end(p,w=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let y=!1,o=this._active.length-1,r=!1;if(this._stack.paused&&(o=this._stack.loopPosition-1,y=w,r=this._stack.fallThrough,this._stack.paused=!1),!r&&y===!1){for(;o>=0&&(y=this._active[o].end(p),y!==!0);o--)if(y instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=o,this._stack.fallThrough=!1,y;o--}for(;o>=0;o--)if(y=this._active[o].end(!1),y instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=o,this._stack.fallThrough=!0,y}else this._handlerFb(this._id,"END",p);this._active=a,this._id=-1,this._state=0}}},n.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,w,y){this._hitLimit||(this._data+=(0,_.utf32ToString)(p,w,y),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let w=!1;if(this._hitLimit)w=!1;else if(p&&(w=this._handler(this._data),w instanceof Promise))return w.then((y=>(this._data="",this._hitLimit=!1,y)));return this._data="",this._hitLimit=!1,w}}},8742:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Params=void 0;const u=2147483647;class f{static fromArray(a){const p=new f;if(!a.length)return p;for(let w=Array.isArray(a[0])?1:0;w<a.length;++w){const y=a[w];if(Array.isArray(y))for(let o=0;o<y.length;++o)p.addSubParam(y[o]);else p.addParam(y)}return p}constructor(a=32,p=32){if(this.maxLength=a,this.maxSubParamsLength=p,p>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(a),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(a),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const a=new f(this.maxLength,this.maxSubParamsLength);return a.params.set(this.params),a.length=this.length,a._subParams.set(this._subParams),a._subParamsLength=this._subParamsLength,a._subParamsIdx.set(this._subParamsIdx),a._rejectDigits=this._rejectDigits,a._rejectSubDigits=this._rejectSubDigits,a._digitIsSub=this._digitIsSub,a}toArray(){const a=[];for(let p=0;p<this.length;++p){a.push(this.params[p]);const w=this._subParamsIdx[p]>>8,y=255&this._subParamsIdx[p];y-w>0&&a.push(Array.prototype.slice.call(this._subParams,w,y))}return a}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(a){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(a<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=a>u?u:a}}addSubParam(a){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(a<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=a>u?u:a,this._subParamsIdx[this.length-1]++}}hasSubParams(a){return(255&this._subParamsIdx[a])-(this._subParamsIdx[a]>>8)>0}getSubParams(a){const p=this._subParamsIdx[a]>>8,w=255&this._subParamsIdx[a];return w-p>0?this._subParams.subarray(p,w):null}getSubParamsAll(){const a={};for(let p=0;p<this.length;++p){const w=this._subParamsIdx[p]>>8,y=255&this._subParamsIdx[p];y-w>0&&(a[p]=this._subParams.slice(w,y))}return a}addDigit(a){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const w=this._digitIsSub?this._subParams:this.params,y=w[p-1];w[p-1]=~y?Math.min(10*y+a,u):a}}n.Params=f},5741:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.AddonManager=void 0,n.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,f){const _={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(_),f.dispose=()=>this._wrappedAddonDispose(_),f.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let f=-1;for(let _=0;_<this._addons.length;_++)if(this._addons[_]===u){f=_;break}if(f===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(f,1)}}},8771:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferApiView=void 0;const f=u(3785),_=u(511);n.BufferApiView=class{constructor(a,p){this._buffer=a,this.type=p}init(a){return this._buffer=a,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(a){const p=this._buffer.lines.get(a);if(p)return new f.BufferLineApiView(p)}getNullCell(){return new _.CellData}}},3785:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLineApiView=void 0;const f=u(511);n.BufferLineApiView=class{constructor(_){this._line=_}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(_,a){if(!(_<0||_>=this._line.length))return a?(this._line.loadCell(_,a),a):this._line.loadCell(_,new f.CellData)}translateToString(_,a,p){return this._line.translateToString(_,a,p)}}},8285:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferNamespaceApi=void 0;const f=u(8771),_=u(8460),a=u(844);class p extends a.Disposable{constructor(y){super(),this._core=y,this._onBufferChange=this.register(new _.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new f.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new f.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}n.BufferNamespaceApi=p},7975:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ParserApi=void 0,n.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,f){return this._core.registerCsiHandler(u,(_=>f(_.toArray())))}addCsiHandler(u,f){return this.registerCsiHandler(u,f)}registerDcsHandler(u,f){return this._core.registerDcsHandler(u,((_,a)=>f(_,a.toArray())))}addDcsHandler(u,f){return this.registerDcsHandler(u,f)}registerEscHandler(u,f){return this._core.registerEscHandler(u,f)}addEscHandler(u,f){return this.registerEscHandler(u,f)}registerOscHandler(u,f){return this._core.registerOscHandler(u,f)}addOscHandler(u,f){return this.registerOscHandler(u,f)}}},7090:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeApi=void 0,n.UnicodeApi=class{constructor(u){this._core=u}register(u){this._core.unicodeService.register(u)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(u){this._core.unicodeService.activeVersion=u}}},744:function(j,n,u){var f=this&&this.__decorate||function(r,h,c,l){var S,x=arguments.length,v=x<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,c):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,h,c,l);else for(var b=r.length-1;b>=0;b--)(S=r[b])&&(v=(x<3?S(v):x>3?S(h,c,v):S(h,c))||v);return x>3&&v&&Object.defineProperty(h,c,v),v},_=this&&this.__param||function(r,h){return function(c,l){h(c,l,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferService=n.MINIMUM_ROWS=n.MINIMUM_COLS=void 0;const a=u(8460),p=u(844),w=u(5295),y=u(2585);n.MINIMUM_COLS=2,n.MINIMUM_ROWS=1;let o=n.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(r){super(),this.isUserScrolling=!1,this._onResize=this.register(new a.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new a.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(r.rawOptions.cols||0,n.MINIMUM_COLS),this.rows=Math.max(r.rawOptions.rows||0,n.MINIMUM_ROWS),this.buffers=this.register(new w.BufferSet(r,this))}resize(r,h){this.cols=r,this.rows=h,this.buffers.resize(r,h),this._onResize.fire({cols:r,rows:h})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(r,h=!1){const c=this.buffer;let l;l=this._cachedBlankLine,l&&l.length===this.cols&&l.getFg(0)===r.fg&&l.getBg(0)===r.bg||(l=c.getBlankLine(r,h),this._cachedBlankLine=l),l.isWrapped=h;const S=c.ybase+c.scrollTop,x=c.ybase+c.scrollBottom;if(c.scrollTop===0){const v=c.lines.isFull;x===c.lines.length-1?v?c.lines.recycle().copyFrom(l):c.lines.push(l.clone()):c.lines.splice(x+1,0,l.clone()),v?this.isUserScrolling&&(c.ydisp=Math.max(c.ydisp-1,0)):(c.ybase++,this.isUserScrolling||c.ydisp++)}else{const v=x-S+1;c.lines.shiftElements(S+1,v-1,-1),c.lines.set(x,l.clone())}this.isUserScrolling||(c.ydisp=c.ybase),this._onScroll.fire(c.ydisp)}scrollLines(r,h,c){const l=this.buffer;if(r<0){if(l.ydisp===0)return;this.isUserScrolling=!0}else r+l.ydisp>=l.ybase&&(this.isUserScrolling=!1);const S=l.ydisp;l.ydisp=Math.max(Math.min(l.ydisp+r,l.ybase),0),S!==l.ydisp&&(h||this._onScroll.fire(l.ydisp))}};n.BufferService=o=f([_(0,y.IOptionsService)],o)},7994:(j,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(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,f){this._charsets[u]=f,this.glevel===u&&(this.charset=f)}}},1753:function(j,n,u){var f=this&&this.__decorate||function(l,S,x,v){var b,m=arguments.length,C=m<3?S:v===null?v=Object.getOwnPropertyDescriptor(S,x):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(l,S,x,v);else for(var L=l.length-1;L>=0;L--)(b=l[L])&&(C=(m<3?b(C):m>3?b(S,x,C):b(S,x))||C);return m>3&&C&&Object.defineProperty(S,x,C),C},_=this&&this.__param||function(l,S){return function(x,v){S(x,v,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreMouseService=void 0;const a=u(2585),p=u(8460),w=u(844),y={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:l=>l.button!==4&&l.action===1&&(l.ctrl=!1,l.alt=!1,l.shift=!1,!0)},VT200:{events:19,restrict:l=>l.action!==32},DRAG:{events:23,restrict:l=>l.action!==32||l.button!==3},ANY:{events:31,restrict:l=>!0}};function o(l,S){let x=(l.ctrl?16:0)|(l.shift?4:0)|(l.alt?8:0);return l.button===4?(x|=64,x|=l.action):(x|=3&l.button,4&l.button&&(x|=64),8&l.button&&(x|=128),l.action===32?x|=32:l.action!==0||S||(x|=3)),x}const r=String.fromCharCode,h={DEFAULT:l=>{const S=[o(l,!1)+32,l.col+32,l.row+32];return S[0]>255||S[1]>255||S[2]>255?"":`\x1B[M${r(S[0])}${r(S[1])}${r(S[2])}`},SGR:l=>{const S=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${o(l,!0)};${l.col};${l.row}${S}`},SGR_PIXELS:l=>{const S=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${o(l,!0)};${l.x};${l.y}${S}`}};let c=n.CoreMouseService=class extends w.Disposable{constructor(l,S){super(),this._bufferService=l,this._coreService=S,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const x of Object.keys(y))this.addProtocol(x,y[x]);for(const x of Object.keys(h))this.addEncoding(x,h[x]);this.reset()}addProtocol(l,S){this._protocols[l]=S}addEncoding(l,S){this._encodings[l]=S}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(l){if(!this._protocols[l])throw new Error(`unknown protocol "${l}"`);this._activeProtocol=l,this._onProtocolChange.fire(this._protocols[l].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(l){if(!this._encodings[l])throw new Error(`unknown encoding "${l}"`);this._activeEncoding=l}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(l){if(l.col<0||l.col>=this._bufferService.cols||l.row<0||l.row>=this._bufferService.rows||l.button===4&&l.action===32||l.button===3&&l.action!==32||l.button!==4&&(l.action===2||l.action===3)||(l.col++,l.row++,l.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,l,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(l))return!1;const S=this._encodings[this._activeEncoding](l);return S&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(S):this._coreService.triggerDataEvent(S,!0)),this._lastEvent=l,!0}explainEvents(l){return{down:!!(1&l),up:!!(2&l),drag:!!(4&l),move:!!(8&l),wheel:!!(16&l)}}_equalEvents(l,S,x){if(x){if(l.x!==S.x||l.y!==S.y)return!1}else if(l.col!==S.col||l.row!==S.row)return!1;return l.button===S.button&&l.action===S.action&&l.ctrl===S.ctrl&&l.alt===S.alt&&l.shift===S.shift}};n.CoreMouseService=c=f([_(0,a.IBufferService),_(1,a.ICoreService)],c)},6975:function(j,n,u){var f=this&&this.__decorate||function(c,l,S,x){var v,b=arguments.length,m=b<3?l:x===null?x=Object.getOwnPropertyDescriptor(l,S):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(c,l,S,x);else for(var C=c.length-1;C>=0;C--)(v=c[C])&&(m=(b<3?v(m):b>3?v(l,S,m):v(l,S))||m);return b>3&&m&&Object.defineProperty(l,S,m),m},_=this&&this.__param||function(c,l){return function(S,x){l(S,x,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreService=void 0;const a=u(1439),p=u(8460),w=u(844),y=u(2585),o=Object.freeze({insertMode:!1}),r=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let h=n.CoreService=class extends w.Disposable{constructor(c,l,S){super(),this._bufferService=c,this._logService=l,this._optionsService=S,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,a.clone)(o),this.decPrivateModes=(0,a.clone)(r)}reset(){this.modes=(0,a.clone)(o),this.decPrivateModes=(0,a.clone)(r)}triggerDataEvent(c,l=!1){if(this._optionsService.rawOptions.disableStdin)return;const S=this._bufferService.buffer;l&&this._optionsService.rawOptions.scrollOnUserInput&&S.ybase!==S.ydisp&&this._onRequestScrollToBottom.fire(),l&&this._onUserInput.fire(),this._logService.debug(`sending data "${c}"`,(()=>c.split("").map((x=>x.charCodeAt(0))))),this._onData.fire(c)}triggerBinaryEvent(c){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${c}"`,(()=>c.split("").map((l=>l.charCodeAt(0))))),this._onBinary.fire(c))}};n.CoreService=h=f([_(0,y.IBufferService),_(1,y.ILogService),_(2,y.IOptionsService)],h)},9074:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DecorationService=void 0;const f=u(8055),_=u(8460),a=u(844),p=u(6106);let w=0,y=0;class o extends a.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((c=>c==null?void 0:c.marker.line)),this._onDecorationRegistered=this.register(new _.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new _.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,a.toDisposable)((()=>this.reset())))}registerDecoration(c){if(c.marker.isDisposed)return;const l=new r(c);if(l){const S=l.marker.onDispose((()=>l.dispose()));l.onDispose((()=>{l&&(this._decorations.delete(l)&&this._onDecorationRemoved.fire(l),S.dispose())})),this._decorations.insert(l),this._onDecorationRegistered.fire(l)}return l}reset(){for(const c of this._decorations.values())c.dispose();this._decorations.clear()}*getDecorationsAtCell(c,l,S){let x=0,v=0;for(const b of this._decorations.getKeyIterator(l))x=b.options.x??0,v=x+(b.options.width??1),c>=x&&c<v&&(!S||(b.options.layer??"bottom")===S)&&(yield b)}forEachDecorationAtCell(c,l,S,x){this._decorations.forEachByKey(l,(v=>{w=v.options.x??0,y=w+(v.options.width??1),c>=w&&c<y&&(!S||(v.options.layer??"bottom")===S)&&x(v)}))}}n.DecorationService=o;class r extends a.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=f.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=f.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(c){super(),this.options=c,this.onRenderEmitter=this.register(new _.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new _.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=c.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.InstantiationService=n.ServiceCollection=void 0;const f=u(2585),_=u(8343);class a{constructor(...w){this._entries=new Map;for(const[y,o]of w)this.set(y,o)}set(w,y){const o=this._entries.get(w);return this._entries.set(w,y),o}forEach(w){for(const[y,o]of this._entries.entries())w(y,o)}has(w){return this._entries.has(w)}get(w){return this._entries.get(w)}}n.ServiceCollection=a,n.InstantiationService=class{constructor(){this._services=new a,this._services.set(f.IInstantiationService,this)}setService(p,w){this._services.set(p,w)}getService(p){return this._services.get(p)}createInstance(p,...w){const y=(0,_.getServiceDependencies)(p).sort(((h,c)=>h.index-c.index)),o=[];for(const h of y){const c=this._services.get(h.id);if(!c)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${h.id}.`);o.push(c)}const r=y.length>0?y[0].index:w.length;if(w.length!==r)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${r+1} conflicts with ${w.length} static arguments`);return new p(...w,...o)}}},7866:function(j,n,u){var f=this&&this.__decorate||function(r,h,c,l){var S,x=arguments.length,v=x<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,c):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,h,c,l);else for(var b=r.length-1;b>=0;b--)(S=r[b])&&(v=(x<3?S(v):x>3?S(h,c,v):S(h,c))||v);return x>3&&v&&Object.defineProperty(h,c,v),v},_=this&&this.__param||function(r,h){return function(c,l){h(c,l,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const a=u(844),p=u(2585),w={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let y,o=n.LogService=class extends a.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),y=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let h=0;h<r.length;h++)typeof r[h]=="function"&&(r[h]=r[h]())}_log(r,h,c){this._evalLazyOptionalParams(c),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...c)}trace(r,...h){var c;this._logLevel<=p.LogLevelEnum.TRACE&&this._log(((c=this._optionsService.options.logger)==null?void 0:c.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var c;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log(((c=this._optionsService.options.logger)==null?void 0:c.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var c;this._logLevel<=p.LogLevelEnum.INFO&&this._log(((c=this._optionsService.options.logger)==null?void 0:c.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var c;this._logLevel<=p.LogLevelEnum.WARN&&this._log(((c=this._optionsService.options.logger)==null?void 0:c.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var c;this._logLevel<=p.LogLevelEnum.ERROR&&this._log(((c=this._optionsService.options.logger)==null?void 0:c.error.bind(this._optionsService.options.logger))??console.error,r,h)}};n.LogService=o=f([_(0,p.IOptionsService)],o),n.setTraceLogger=function(r){y=r},n.traceCall=function(r,h,c){if(typeof c.value!="function")throw new Error("not supported");const l=c.value;c.value=function(...S){if(y.logLevel!==p.LogLevelEnum.TRACE)return l.apply(this,S);y.trace(`GlyphRenderer#${l.name}(${S.map((v=>JSON.stringify(v))).join(", ")})`);const x=l.apply(this,S);return y.trace(`GlyphRenderer#${l.name} return`,x),x}}},7302:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OptionsService=n.DEFAULT_OPTIONS=void 0;const f=u(8460),_=u(844),a=u(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:a.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class w extends _.Disposable{constructor(o){super(),this._onOptionChange=this.register(new f.EventEmitter),this.onOptionChange=this._onOptionChange.event;const r={...n.DEFAULT_OPTIONS};for(const h in o)if(h in r)try{const c=o[h];r[h]=this._sanitizeAndValidateOption(h,c)}catch(c){console.error(c)}this.rawOptions=r,this.options={...r},this._setupOptions(),this.register((0,_.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(o,r){return this.onOptionChange((h=>{h===o&&r(this.rawOptions[o])}))}onMultipleOptionChange(o,r){return this.onOptionChange((h=>{o.indexOf(h)!==-1&&r()}))}_setupOptions(){const o=h=>{if(!(h in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);return this.rawOptions[h]},r=(h,c)=>{if(!(h in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);c=this._sanitizeAndValidateOption(h,c),this.rawOptions[h]!==c&&(this.rawOptions[h]=c,this._onOptionChange.fire(h))};for(const h in this.rawOptions){const c={get:o.bind(this,h),set:r.bind(this,h)};Object.defineProperty(this.options,h,c)}}_sanitizeAndValidateOption(o,r){switch(o){case"cursorStyle":if(r||(r=n.DEFAULT_OPTIONS[o]),!(function(h){return h==="block"||h==="underline"||h==="bar"})(r))throw new Error(`"${r}" is not a valid value for ${o}`);break;case"wordSeparator":r||(r=n.DEFAULT_OPTIONS[o]);break;case"fontWeight":case"fontWeightBold":if(typeof r=="number"&&1<=r&&r<=1e3)break;r=p.includes(r)?r:n.DEFAULT_OPTIONS[o];break;case"cursorWidth":r=Math.floor(r);case"lineHeight":case"tabStopWidth":if(r<1)throw new Error(`${o} cannot be less than 1, value: ${r}`);break;case"minimumContrastRatio":r=Math.max(1,Math.min(21,Math.round(10*r)/10));break;case"scrollback":if((r=Math.min(r,4294967295))<0)throw new Error(`${o} cannot be less than 0, value: ${r}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(r<=0)throw new Error(`${o} cannot be less than or equal to 0, value: ${r}`);break;case"rows":case"cols":if(!r&&r!==0)throw new Error(`${o} must be numeric, value: ${r}`);break;case"windowsPty":r=r??{}}return r}}n.OptionsService=w},2660:function(j,n,u){var f=this&&this.__decorate||function(w,y,o,r){var h,c=arguments.length,l=c<3?y:r===null?r=Object.getOwnPropertyDescriptor(y,o):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(w,y,o,r);else for(var S=w.length-1;S>=0;S--)(h=w[S])&&(l=(c<3?h(l):c>3?h(y,o,l):h(y,o))||l);return c>3&&l&&Object.defineProperty(y,o,l),l},_=this&&this.__param||function(w,y){return function(o,r){y(o,r,w)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkService=void 0;const a=u(2585);let p=n.OscLinkService=class{constructor(w){this._bufferService=w,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(w){const y=this._bufferService.buffer;if(w.id===void 0){const S=y.addMarker(y.ybase+y.y),x={data:w,id:this._nextId++,lines:[S]};return S.onDispose((()=>this._removeMarkerFromLink(x,S))),this._dataByLinkId.set(x.id,x),x.id}const o=w,r=this._getEntryIdKey(o),h=this._entriesWithId.get(r);if(h)return this.addLineToLink(h.id,y.ybase+y.y),h.id;const c=y.addMarker(y.ybase+y.y),l={id:this._nextId++,key:this._getEntryIdKey(o),data:o,lines:[c]};return c.onDispose((()=>this._removeMarkerFromLink(l,c))),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(w,y){const o=this._dataByLinkId.get(w);if(o&&o.lines.every((r=>r.line!==y))){const r=this._bufferService.buffer.addMarker(y);o.lines.push(r),r.onDispose((()=>this._removeMarkerFromLink(o,r)))}}getLinkData(w){var y;return(y=this._dataByLinkId.get(w))==null?void 0:y.data}_getEntryIdKey(w){return`${w.id};;${w.uri}`}_removeMarkerFromLink(w,y){const o=w.lines.indexOf(y);o!==-1&&(w.lines.splice(o,1),w.lines.length===0&&(w.data.id!==void 0&&this._entriesWithId.delete(w.key),this._dataByLinkId.delete(w.id)))}};n.OscLinkService=p=f([_(0,a.IBufferService)],p)},8343:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const u="di$target",f="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(_){return _[f]||[]},n.createDecorator=function(_){if(n.serviceRegistry.has(_))return n.serviceRegistry.get(_);const a=function(p,w,y){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(o,r,h){r[u]===r?r[f].push({id:o,index:h}):(r[f]=[{id:o,index:h}],r[u]=r)})(a,p,y)};return a.toString=()=>_,n.serviceRegistry.set(_,a),a}},2585:(j,n,u)=>{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 f=u(8343);var _;n.IBufferService=(0,f.createDecorator)("BufferService"),n.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),n.ICoreService=(0,f.createDecorator)("CoreService"),n.ICharsetService=(0,f.createDecorator)("CharsetService"),n.IInstantiationService=(0,f.createDecorator)("InstantiationService"),(function(a){a[a.TRACE=0]="TRACE",a[a.DEBUG=1]="DEBUG",a[a.INFO=2]="INFO",a[a.WARN=3]="WARN",a[a.ERROR=4]="ERROR",a[a.OFF=5]="OFF"})(_||(n.LogLevelEnum=_={})),n.ILogService=(0,f.createDecorator)("LogService"),n.IOptionsService=(0,f.createDecorator)("OptionsService"),n.IOscLinkService=(0,f.createDecorator)("OscLinkService"),n.IUnicodeService=(0,f.createDecorator)("UnicodeService"),n.IDecorationService=(0,f.createDecorator)("DecorationService")},1480:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeService=void 0;const f=u(8460),_=u(225);class a{static extractShouldJoin(w){return(1&w)!=0}static extractWidth(w){return w>>1&3}static extractCharKind(w){return w>>3}static createPropertyValue(w,y,o=!1){return(16777215&w)<<3|(3&y)<<1|(o?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new f.EventEmitter,this.onChange=this._onChange.event;const w=new _.UnicodeV6;this.register(w),this._active=w.version,this._activeProvider=w}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(w){if(!this._providers[w])throw new Error(`unknown Unicode version "${w}"`);this._active=w,this._activeProvider=this._providers[w],this._onChange.fire(w)}register(w){this._providers[w.version]=w}wcwidth(w){return this._activeProvider.wcwidth(w)}getStringCellWidth(w){let y=0,o=0;const r=w.length;for(let h=0;h<r;++h){let c=w.charCodeAt(h);if(55296<=c&&c<=56319){if(++h>=r)return y+this.wcwidth(c);const x=w.charCodeAt(h);56320<=x&&x<=57343?c=1024*(c-55296)+x-56320+65536:y+=this.wcwidth(x)}const l=this.charProperties(c,o);let S=a.extractWidth(l);a.extractShouldJoin(l)&&(S-=a.extractWidth(o)),y+=S,o=l}return y}charProperties(w,y){return this._activeProvider.charProperties(w,y)}}n.UnicodeService=a}},P={};function Z(j){var n=P[j];if(n!==void 0)return n.exports;var u=P[j]={exports:{}};return X[j].call(u.exports,u,u.exports,Z),u.exports}var ne={};return(()=>{var j=ne;Object.defineProperty(j,"__esModule",{value:!0}),j.Terminal=void 0;const n=Z(9042),u=Z(3236),f=Z(844),_=Z(5741),a=Z(8285),p=Z(7975),w=Z(7090),y=["cols","rows"];class o extends f.Disposable{constructor(h){super(),this._core=this.register(new u.Terminal(h)),this._addonManager=this.register(new _.AddonManager),this._publicOptions={...this._core.options};const c=S=>this._core.options[S],l=(S,x)=>{this._checkReadonlyOptions(S),this._core.options[S]=x};for(const S in this._core.options){const x={get:c.bind(this,S),set:l.bind(this,S)};Object.defineProperty(this._publicOptions,S,x)}}_checkReadonlyOptions(h){if(y.includes(h))throw new Error(`Option "${h}" 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 p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new w.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 a.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const h=this._core.coreService.decPrivateModes;let c="none";switch(this._core.coreMouseService.activeProtocol){case"X10":c="x10";break;case"VT200":c="vt200";break;case"DRAG":c="drag";break;case"ANY":c="any"}return{applicationCursorKeysMode:h.applicationCursorKeys,applicationKeypadMode:h.applicationKeypad,bracketedPasteMode:h.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:c,originMode:h.origin,reverseWraparoundMode:h.reverseWraparound,sendFocusMode:h.sendFocus,wraparoundMode:h.wraparound}}get options(){return this._publicOptions}set options(h){for(const c in h)this._publicOptions[c]=h[c]}blur(){this._core.blur()}focus(){this._core.focus()}input(h,c=!0){this._core.input(h,c)}resize(h,c){this._verifyIntegers(h,c),this._core.resize(h,c)}open(h){this._core.open(h)}attachCustomKeyEventHandler(h){this._core.attachCustomKeyEventHandler(h)}attachCustomWheelEventHandler(h){this._core.attachCustomWheelEventHandler(h)}registerLinkProvider(h){return this._core.registerLinkProvider(h)}registerCharacterJoiner(h){return this._checkProposedApi(),this._core.registerCharacterJoiner(h)}deregisterCharacterJoiner(h){this._checkProposedApi(),this._core.deregisterCharacterJoiner(h)}registerMarker(h=0){return this._verifyIntegers(h),this._core.registerMarker(h)}registerDecoration(h){return this._checkProposedApi(),this._verifyPositiveIntegers(h.x??0,h.width??0,h.height??0),this._core.registerDecoration(h)}hasSelection(){return this._core.hasSelection()}select(h,c,l){this._verifyIntegers(h,c,l),this._core.select(h,c,l)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(h,c){this._verifyIntegers(h,c),this._core.selectLines(h,c)}dispose(){super.dispose()}scrollLines(h){this._verifyIntegers(h),this._core.scrollLines(h)}scrollPages(h){this._verifyIntegers(h),this._core.scrollPages(h)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(h){this._verifyIntegers(h),this._core.scrollToLine(h)}clear(){this._core.clear()}write(h,c){this._core.write(h,c)}writeln(h,c){this._core.write(h),this._core.write(`\r
57
+ `,c)}paste(h){this._core.paste(h)}refresh(h,c){this._verifyIntegers(h,c),this._core.refresh(h,c)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(h){this._addonManager.loadAddon(this,h)}static get strings(){return n}_verifyIntegers(...h){for(const c of h)if(c===1/0||isNaN(c)||c%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...h){for(const c of h)if(c&&(c===1/0||isNaN(c)||c%1!=0||c<0))throw new Error("This API only accepts positive integers")}}j.Terminal=o})(),ne})()))})(ko)),ko.exports}var rg=sg(),Ho={exports:{}},Zd;function ng(){return Zd||(Zd=1,(function(U,G){(function(X,P){U.exports=P()})(self,(()=>(()=>{var X={};return(()=>{var P=X;Object.defineProperty(P,"__esModule",{value:!0}),P.FitAddon=void 0,P.FitAddon=class{activate(Z){this._terminal=Z}dispose(){}fit(){const Z=this.proposeDimensions();if(!Z||!this._terminal||isNaN(Z.cols)||isNaN(Z.rows))return;const ne=this._terminal._core;this._terminal.rows===Z.rows&&this._terminal.cols===Z.cols||(ne._renderService.clear(),this._terminal.resize(Z.cols,Z.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const Z=this._terminal._core,ne=Z._renderService.dimensions;if(ne.css.cell.width===0||ne.css.cell.height===0)return;const j=this._terminal.options.scrollback===0?0:Z.viewport.scrollBarWidth,n=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(n.getPropertyValue("height")),f=Math.max(0,parseInt(n.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),a=u-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),p=f-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-j;return{cols:Math.max(2,Math.floor(p/ne.css.cell.width)),rows:Math.max(1,Math.floor(a/ne.css.cell.height))}}}})(),X})()))})(Ho)),Ho.exports}var ag=ng(),zo={exports:{}},Jd;function lg(){return Jd||(Jd=1,(function(U,G){(function(X,P){U.exports=P()})(self,(()=>(()=>{var X={965:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GlyphRenderer=void 0;const f=u(374),_=u(509),a=u(855),p=u(859),w=u(381),y=11,o=y*Float32Array.BYTES_PER_ELEMENT;let r,h=0,c=0,l=0;class S extends p.Disposable{constructor(v,b,m,C){super(),this._terminal=v,this._gl=b,this._dimensions=m,this._optionsService=C,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const L=this._gl;_.TextureAtlas.maxAtlasPages===void 0&&(_.TextureAtlas.maxAtlasPages=Math.min(32,(0,f.throwIfFalsy)(L.getParameter(L.MAX_TEXTURE_IMAGE_UNITS))),_.TextureAtlas.maxTextureSize=(0,f.throwIfFalsy)(L.getParameter(L.MAX_TEXTURE_SIZE))),this._program=(0,f.throwIfFalsy)((0,w.createProgram)(L,`#version 300 es
58
58
  layout (location = 0) in vec2 a_unitquad;
59
59
  layout (location = 1) in vec2 a_cellpos;
60
60
  layout (location = 2) in vec2 a_offset;
@@ -74,7 +74,7 @@ void main() {
74
74
  gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
75
75
  v_texpage = int(a_texpage);
76
76
  v_texcoord = a_texcoord + a_unitquad * a_texsize;
77
- }`,(function(N){let I="";for(let P=1;P<N;P++)I+=` else if (v_texpage == ${P}) { outColor = texture(u_texture[${P}], v_texcoord); }`;return`#version 300 es
77
+ }`,(function(N){let I="";for(let F=1;F<N;F++)I+=` else if (v_texpage == ${F}) { outColor = texture(u_texture[${F}], v_texcoord); }`;return`#version 300 es
78
78
  precision lowp float;
79
79
 
80
80
  in vec2 v_texcoord;
@@ -88,7 +88,7 @@ void main() {
88
88
  if (v_texpage == 0) {
89
89
  outColor = texture(u_texture[0], v_texcoord);
90
90
  } ${I}
91
- }`})(_.TextureAtlas.maxAtlasPages))),this.register((0,p.toDisposable)((()=>L.deleteProgram(this._program)))),this._projectionLocation=(0,f.throwIfFalsy)(L.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,f.throwIfFalsy)(L.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,f.throwIfFalsy)(L.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=L.createVertexArray(),L.bindVertexArray(this._vertexArrayObject);const A=new Float32Array([0,0,1,0,0,1,1,1]),E=L.createBuffer();this.register((0,p.toDisposable)((()=>L.deleteBuffer(E)))),L.bindBuffer(L.ARRAY_BUFFER,E),L.bufferData(L.ARRAY_BUFFER,A,L.STATIC_DRAW),L.enableVertexAttribArray(0),L.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const D=new Uint8Array([0,1,2,3]),O=L.createBuffer();this.register((0,p.toDisposable)((()=>L.deleteBuffer(O)))),L.bindBuffer(L.ELEMENT_ARRAY_BUFFER,O),L.bufferData(L.ELEMENT_ARRAY_BUFFER,D,L.STATIC_DRAW),this._attributesBuffer=(0,f.throwIfFalsy)(L.createBuffer()),this.register((0,p.toDisposable)((()=>L.deleteBuffer(this._attributesBuffer)))),L.bindBuffer(L.ARRAY_BUFFER,this._attributesBuffer),L.enableVertexAttribArray(2),L.vertexAttribPointer(2,2,L.FLOAT,!1,c,0),L.vertexAttribDivisor(2,1),L.enableVertexAttribArray(3),L.vertexAttribPointer(3,2,L.FLOAT,!1,c,2*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(3,1),L.enableVertexAttribArray(4),L.vertexAttribPointer(4,1,L.FLOAT,!1,c,4*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(4,1),L.enableVertexAttribArray(5),L.vertexAttribPointer(5,2,L.FLOAT,!1,c,5*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(5,1),L.enableVertexAttribArray(6),L.vertexAttribPointer(6,2,L.FLOAT,!1,c,7*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(6,1),L.enableVertexAttribArray(1),L.vertexAttribPointer(1,2,L.FLOAT,!1,c,9*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(1,1),L.useProgram(this._program);const F=new Int32Array(_.TextureAtlas.maxAtlasPages);for(let N=0;N<_.TextureAtlas.maxAtlasPages;N++)F[N]=N;L.uniform1iv(this._textureLocation,F),L.uniformMatrix4fv(this._projectionLocation,!1,b.PROJECTION_MATRIX),this._atlasTextures=[];for(let N=0;N<_.TextureAtlas.maxAtlasPages;N++){const I=new b.GLTexture((0,f.throwIfFalsy)(L.createTexture()));this.register((0,p.toDisposable)((()=>L.deleteTexture(I.texture)))),L.activeTexture(L.TEXTURE0+N),L.bindTexture(L.TEXTURE_2D,I.texture),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_S,L.CLAMP_TO_EDGE),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_T,L.CLAMP_TO_EDGE),L.texImage2D(L.TEXTURE_2D,0,L.RGBA,1,1,0,L.RGBA,L.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[N]=I}L.enable(L.BLEND),L.blendFunc(L.SRC_ALPHA,L.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(v,y,m,C,L,A,E,D,O){this._updateCell(this._vertices.attributes,v,y,m,C,L,A,E,D,O)}_updateCell(v,y,m,C,L,A,E,D,O,F){h=(m*this._terminal.cols+y)*w,C!==a.NULL_CELL_CODE&&C!==void 0?this._atlas&&(r=D&&D.length>1?this._atlas.getRasterizedGlyphCombinedChar(D,L,A,E,!1):this._atlas.getRasterizedGlyph(C,L,A,E,!1),o=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),L!==F&&r.offset.x>o?(l=r.offset.x-o,v[h]=-(r.offset.x-l)+this._dimensions.device.char.left,v[h+1]=-r.offset.y+this._dimensions.device.char.top,v[h+2]=(r.size.x-l)/this._dimensions.device.canvas.width,v[h+3]=r.size.y/this._dimensions.device.canvas.height,v[h+4]=r.texturePage,v[h+5]=r.texturePositionClipSpace.x+l/this._atlas.pages[r.texturePage].canvas.width,v[h+6]=r.texturePositionClipSpace.y,v[h+7]=r.sizeClipSpace.x-l/this._atlas.pages[r.texturePage].canvas.width,v[h+8]=r.sizeClipSpace.y):(v[h]=-r.offset.x+this._dimensions.device.char.left,v[h+1]=-r.offset.y+this._dimensions.device.char.top,v[h+2]=r.size.x/this._dimensions.device.canvas.width,v[h+3]=r.size.y/this._dimensions.device.canvas.height,v[h+4]=r.texturePage,v[h+5]=r.texturePositionClipSpace.x,v[h+6]=r.texturePositionClipSpace.y,v[h+7]=r.sizeClipSpace.x,v[h+8]=r.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,f.allowRescaling)(C,O,r.size.x,this._dimensions.device.cell.width)&&(v[h+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):v.fill(0,h,h+w-1-2)}clear(){const v=this._terminal,y=v.cols*v.rows*w;this._vertices.count!==y?this._vertices.attributes=new Float32Array(y):this._vertices.attributes.fill(0);let m=0;for(;m<this._vertices.attributesBuffers.length;m++)this._vertices.count!==y?this._vertices.attributesBuffers[m]=new Float32Array(y):this._vertices.attributesBuffers[m].fill(0);this._vertices.count=y,m=0;for(let C=0;C<v.rows;C++)for(let L=0;L<v.cols;L++)this._vertices.attributes[m+9]=L/v.cols,this._vertices.attributes[m+10]=C/v.rows,m+=w}handleResize(){const v=this._gl;v.useProgram(this._program),v.viewport(0,0,v.canvas.width,v.canvas.height),v.uniform2f(this._resolutionLocation,v.canvas.width,v.canvas.height),this.clear()}render(v){if(!this._atlas)return;const y=this._gl;y.useProgram(this._program),y.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const m=this._vertices.attributesBuffers[this._activeBuffer];let C=0;for(let L=0;L<v.lineLengths.length;L++){const A=L*this._terminal.cols*w,E=this._vertices.attributes.subarray(A,A+v.lineLengths[L]*w);m.set(E,C),C+=E.length}y.bindBuffer(y.ARRAY_BUFFER,this._attributesBuffer),y.bufferData(y.ARRAY_BUFFER,m.subarray(0,C),y.STREAM_DRAW);for(let L=0;L<this._atlas.pages.length;L++)this._atlas.pages[L].version!==this._atlasTextures[L].version&&this._bindAtlasPageTexture(y,this._atlas,L);y.drawElementsInstanced(y.TRIANGLE_STRIP,4,y.UNSIGNED_BYTE,0,C/w)}setAtlas(v){this._atlas=v;for(const y of this._atlasTextures)y.version=-1}_bindAtlasPageTexture(v,y,m){v.activeTexture(v.TEXTURE0+m),v.bindTexture(v.TEXTURE_2D,this._atlasTextures[m].texture),v.texParameteri(v.TEXTURE_2D,v.TEXTURE_WRAP_S,v.CLAMP_TO_EDGE),v.texParameteri(v.TEXTURE_2D,v.TEXTURE_WRAP_T,v.CLAMP_TO_EDGE),v.texImage2D(v.TEXTURE_2D,0,v.RGBA,v.RGBA,v.UNSIGNED_BYTE,y.pages[m].canvas),v.generateMipmap(v.TEXTURE_2D),this._atlasTextures[m].version=y.pages[m].version}setDimensions(v){this._dimensions=v}}n.GlyphRenderer=S},742:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RectangleRenderer=void 0;const f=u(374),_=u(859),a=u(310),p=u(381),b=8*Float32Array.BYTES_PER_ELEMENT;class w{constructor(){this.attributes=new Float32Array(160),this.count=0}}let c=0,r=0,h=0,o=0,l=0,S=0,x=0;class v extends _.Disposable{constructor(m,C,L,A){super(),this._terminal=m,this._gl=C,this._dimensions=L,this._themeService=A,this._vertices=new w,this._verticesCursor=new w;const E=this._gl;this._program=(0,f.throwIfFalsy)((0,p.createProgram)(E,`#version 300 es
91
+ }`})(_.TextureAtlas.maxAtlasPages))),this.register((0,p.toDisposable)((()=>L.deleteProgram(this._program)))),this._projectionLocation=(0,f.throwIfFalsy)(L.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,f.throwIfFalsy)(L.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,f.throwIfFalsy)(L.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=L.createVertexArray(),L.bindVertexArray(this._vertexArrayObject);const M=new Float32Array([0,0,1,0,0,1,1,1]),E=L.createBuffer();this.register((0,p.toDisposable)((()=>L.deleteBuffer(E)))),L.bindBuffer(L.ARRAY_BUFFER,E),L.bufferData(L.ARRAY_BUFFER,M,L.STATIC_DRAW),L.enableVertexAttribArray(0),L.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const R=new Uint8Array([0,1,2,3]),B=L.createBuffer();this.register((0,p.toDisposable)((()=>L.deleteBuffer(B)))),L.bindBuffer(L.ELEMENT_ARRAY_BUFFER,B),L.bufferData(L.ELEMENT_ARRAY_BUFFER,R,L.STATIC_DRAW),this._attributesBuffer=(0,f.throwIfFalsy)(L.createBuffer()),this.register((0,p.toDisposable)((()=>L.deleteBuffer(this._attributesBuffer)))),L.bindBuffer(L.ARRAY_BUFFER,this._attributesBuffer),L.enableVertexAttribArray(2),L.vertexAttribPointer(2,2,L.FLOAT,!1,o,0),L.vertexAttribDivisor(2,1),L.enableVertexAttribArray(3),L.vertexAttribPointer(3,2,L.FLOAT,!1,o,2*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(3,1),L.enableVertexAttribArray(4),L.vertexAttribPointer(4,1,L.FLOAT,!1,o,4*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(4,1),L.enableVertexAttribArray(5),L.vertexAttribPointer(5,2,L.FLOAT,!1,o,5*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(5,1),L.enableVertexAttribArray(6),L.vertexAttribPointer(6,2,L.FLOAT,!1,o,7*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(6,1),L.enableVertexAttribArray(1),L.vertexAttribPointer(1,2,L.FLOAT,!1,o,9*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(1,1),L.useProgram(this._program);const $=new Int32Array(_.TextureAtlas.maxAtlasPages);for(let N=0;N<_.TextureAtlas.maxAtlasPages;N++)$[N]=N;L.uniform1iv(this._textureLocation,$),L.uniformMatrix4fv(this._projectionLocation,!1,w.PROJECTION_MATRIX),this._atlasTextures=[];for(let N=0;N<_.TextureAtlas.maxAtlasPages;N++){const I=new w.GLTexture((0,f.throwIfFalsy)(L.createTexture()));this.register((0,p.toDisposable)((()=>L.deleteTexture(I.texture)))),L.activeTexture(L.TEXTURE0+N),L.bindTexture(L.TEXTURE_2D,I.texture),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_S,L.CLAMP_TO_EDGE),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_T,L.CLAMP_TO_EDGE),L.texImage2D(L.TEXTURE_2D,0,L.RGBA,1,1,0,L.RGBA,L.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[N]=I}L.enable(L.BLEND),L.blendFunc(L.SRC_ALPHA,L.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(v,b,m,C,L,M,E,R,B){this._updateCell(this._vertices.attributes,v,b,m,C,L,M,E,R,B)}_updateCell(v,b,m,C,L,M,E,R,B,$){h=(m*this._terminal.cols+b)*y,C!==a.NULL_CELL_CODE&&C!==void 0?this._atlas&&(r=R&&R.length>1?this._atlas.getRasterizedGlyphCombinedChar(R,L,M,E,!1):this._atlas.getRasterizedGlyph(C,L,M,E,!1),c=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),L!==$&&r.offset.x>c?(l=r.offset.x-c,v[h]=-(r.offset.x-l)+this._dimensions.device.char.left,v[h+1]=-r.offset.y+this._dimensions.device.char.top,v[h+2]=(r.size.x-l)/this._dimensions.device.canvas.width,v[h+3]=r.size.y/this._dimensions.device.canvas.height,v[h+4]=r.texturePage,v[h+5]=r.texturePositionClipSpace.x+l/this._atlas.pages[r.texturePage].canvas.width,v[h+6]=r.texturePositionClipSpace.y,v[h+7]=r.sizeClipSpace.x-l/this._atlas.pages[r.texturePage].canvas.width,v[h+8]=r.sizeClipSpace.y):(v[h]=-r.offset.x+this._dimensions.device.char.left,v[h+1]=-r.offset.y+this._dimensions.device.char.top,v[h+2]=r.size.x/this._dimensions.device.canvas.width,v[h+3]=r.size.y/this._dimensions.device.canvas.height,v[h+4]=r.texturePage,v[h+5]=r.texturePositionClipSpace.x,v[h+6]=r.texturePositionClipSpace.y,v[h+7]=r.sizeClipSpace.x,v[h+8]=r.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,f.allowRescaling)(C,B,r.size.x,this._dimensions.device.cell.width)&&(v[h+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):v.fill(0,h,h+y-1-2)}clear(){const v=this._terminal,b=v.cols*v.rows*y;this._vertices.count!==b?this._vertices.attributes=new Float32Array(b):this._vertices.attributes.fill(0);let m=0;for(;m<this._vertices.attributesBuffers.length;m++)this._vertices.count!==b?this._vertices.attributesBuffers[m]=new Float32Array(b):this._vertices.attributesBuffers[m].fill(0);this._vertices.count=b,m=0;for(let C=0;C<v.rows;C++)for(let L=0;L<v.cols;L++)this._vertices.attributes[m+9]=L/v.cols,this._vertices.attributes[m+10]=C/v.rows,m+=y}handleResize(){const v=this._gl;v.useProgram(this._program),v.viewport(0,0,v.canvas.width,v.canvas.height),v.uniform2f(this._resolutionLocation,v.canvas.width,v.canvas.height),this.clear()}render(v){if(!this._atlas)return;const b=this._gl;b.useProgram(this._program),b.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const m=this._vertices.attributesBuffers[this._activeBuffer];let C=0;for(let L=0;L<v.lineLengths.length;L++){const M=L*this._terminal.cols*y,E=this._vertices.attributes.subarray(M,M+v.lineLengths[L]*y);m.set(E,C),C+=E.length}b.bindBuffer(b.ARRAY_BUFFER,this._attributesBuffer),b.bufferData(b.ARRAY_BUFFER,m.subarray(0,C),b.STREAM_DRAW);for(let L=0;L<this._atlas.pages.length;L++)this._atlas.pages[L].version!==this._atlasTextures[L].version&&this._bindAtlasPageTexture(b,this._atlas,L);b.drawElementsInstanced(b.TRIANGLE_STRIP,4,b.UNSIGNED_BYTE,0,C/y)}setAtlas(v){this._atlas=v;for(const b of this._atlasTextures)b.version=-1}_bindAtlasPageTexture(v,b,m){v.activeTexture(v.TEXTURE0+m),v.bindTexture(v.TEXTURE_2D,this._atlasTextures[m].texture),v.texParameteri(v.TEXTURE_2D,v.TEXTURE_WRAP_S,v.CLAMP_TO_EDGE),v.texParameteri(v.TEXTURE_2D,v.TEXTURE_WRAP_T,v.CLAMP_TO_EDGE),v.texImage2D(v.TEXTURE_2D,0,v.RGBA,v.RGBA,v.UNSIGNED_BYTE,b.pages[m].canvas),v.generateMipmap(v.TEXTURE_2D),this._atlasTextures[m].version=b.pages[m].version}setDimensions(v){this._dimensions=v}}n.GlyphRenderer=S},742:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RectangleRenderer=void 0;const f=u(374),_=u(859),a=u(310),p=u(381),w=8*Float32Array.BYTES_PER_ELEMENT;class y{constructor(){this.attributes=new Float32Array(160),this.count=0}}let o=0,r=0,h=0,c=0,l=0,S=0,x=0;class v extends _.Disposable{constructor(m,C,L,M){super(),this._terminal=m,this._gl=C,this._dimensions=L,this._themeService=M,this._vertices=new y,this._verticesCursor=new y;const E=this._gl;this._program=(0,f.throwIfFalsy)((0,p.createProgram)(E,`#version 300 es
92
92
  layout (location = 0) in vec2 a_position;
93
93
  layout (location = 1) in vec2 a_size;
94
94
  layout (location = 2) in vec4 a_color;
@@ -111,7 +111,7 @@ out vec4 outColor;
111
111
 
112
112
  void main() {
113
113
  outColor = v_color;
114
- }`)),this.register((0,_.toDisposable)((()=>E.deleteProgram(this._program)))),this._projectionLocation=(0,f.throwIfFalsy)(E.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=E.createVertexArray(),E.bindVertexArray(this._vertexArrayObject);const D=new Float32Array([0,0,1,0,0,1,1,1]),O=E.createBuffer();this.register((0,_.toDisposable)((()=>E.deleteBuffer(O)))),E.bindBuffer(E.ARRAY_BUFFER,O),E.bufferData(E.ARRAY_BUFFER,D,E.STATIC_DRAW),E.enableVertexAttribArray(3),E.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const F=new Uint8Array([0,1,2,3]),N=E.createBuffer();this.register((0,_.toDisposable)((()=>E.deleteBuffer(N)))),E.bindBuffer(E.ELEMENT_ARRAY_BUFFER,N),E.bufferData(E.ELEMENT_ARRAY_BUFFER,F,E.STATIC_DRAW),this._attributesBuffer=(0,f.throwIfFalsy)(E.createBuffer()),this.register((0,_.toDisposable)((()=>E.deleteBuffer(this._attributesBuffer)))),E.bindBuffer(E.ARRAY_BUFFER,this._attributesBuffer),E.enableVertexAttribArray(0),E.vertexAttribPointer(0,2,E.FLOAT,!1,b,0),E.vertexAttribDivisor(0,1),E.enableVertexAttribArray(1),E.vertexAttribPointer(1,2,E.FLOAT,!1,b,2*Float32Array.BYTES_PER_ELEMENT),E.vertexAttribDivisor(1,1),E.enableVertexAttribArray(2),E.vertexAttribPointer(2,4,E.FLOAT,!1,b,4*Float32Array.BYTES_PER_ELEMENT),E.vertexAttribDivisor(2,1),this._updateCachedColors(A.colors),this.register(this._themeService.onChangeColors((I=>{this._updateCachedColors(I),this._updateViewportRectangle()})))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(m){const C=this._gl;C.useProgram(this._program),C.bindVertexArray(this._vertexArrayObject),C.uniformMatrix4fv(this._projectionLocation,!1,p.PROJECTION_MATRIX),C.bindBuffer(C.ARRAY_BUFFER,this._attributesBuffer),C.bufferData(C.ARRAY_BUFFER,m.attributes,C.DYNAMIC_DRAW),C.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,C.UNSIGNED_BYTE,0,m.count)}handleResize(){this._updateViewportRectangle()}setDimensions(m){this._dimensions=m}_updateCachedColors(m){this._bgFloat=this._colorToFloat32Array(m.background),this._cursorFloat=this._colorToFloat32Array(m.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(m){const C=this._terminal,L=this._vertices;let A,E,D,O,F,N,I,P,R,B,T,H=1;for(A=0;A<C.rows;A++){for(D=-1,O=0,F=0,N=!1,E=0;E<C.cols;E++)I=(A*C.cols+E)*a.RENDER_MODEL_INDICIES_PER_CELL,P=m.cells[I+a.RENDER_MODEL_BG_OFFSET],R=m.cells[I+a.RENDER_MODEL_FG_OFFSET],B=!!(67108864&R),(P!==O||R!==F&&(N||B))&&((O!==0||N&&F!==0)&&(T=8*H++,this._updateRectangle(L,T,F,O,D,E,A)),D=E,O=P,F=R,N=B);(O!==0||N&&F!==0)&&(T=8*H++,this._updateRectangle(L,T,F,O,D,C.cols,A))}L.count=H}updateCursor(m){const C=this._verticesCursor,L=m.cursor;if(!L||L.style==="block")return void(C.count=0);let A,E=0;L.style!=="bar"&&L.style!=="outline"||(A=8*E++,this._addRectangleFloat(C.attributes,A,L.x*this._dimensions.device.cell.width,L.y*this._dimensions.device.cell.height,L.style==="bar"?L.dpr*L.cursorWidth:L.dpr,this._dimensions.device.cell.height,this._cursorFloat)),L.style!=="underline"&&L.style!=="outline"||(A=8*E++,this._addRectangleFloat(C.attributes,A,L.x*this._dimensions.device.cell.width,(L.y+1)*this._dimensions.device.cell.height-L.dpr,L.width*this._dimensions.device.cell.width,L.dpr,this._cursorFloat)),L.style==="outline"&&(A=8*E++,this._addRectangleFloat(C.attributes,A,L.x*this._dimensions.device.cell.width,L.y*this._dimensions.device.cell.height,L.width*this._dimensions.device.cell.width,L.dpr,this._cursorFloat),A=8*E++,this._addRectangleFloat(C.attributes,A,(L.x+L.width)*this._dimensions.device.cell.width-L.dpr,L.y*this._dimensions.device.cell.height,L.dpr,this._dimensions.device.cell.height,this._cursorFloat)),C.count=E}_updateRectangle(m,C,L,A,E,D,O){if(67108864&L)switch(50331648&L){case 16777216:case 33554432:c=this._themeService.colors.ansi[255&L].rgba;break;case 50331648:c=(16777215&L)<<8;break;default:c=this._themeService.colors.foreground.rgba}else switch(50331648&A){case 16777216:case 33554432:c=this._themeService.colors.ansi[255&A].rgba;break;case 50331648:c=(16777215&A)<<8;break;default:c=this._themeService.colors.background.rgba}m.attributes.length<C+4&&(m.attributes=(0,p.expandFloat32Array)(m.attributes,this._terminal.rows*this._terminal.cols*8)),r=E*this._dimensions.device.cell.width,h=O*this._dimensions.device.cell.height,o=(c>>24&255)/255,l=(c>>16&255)/255,S=(c>>8&255)/255,x=1,this._addRectangle(m.attributes,C,r,h,(D-E)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,o,l,S,x)}_addRectangle(m,C,L,A,E,D,O,F,N,I){m[C]=L/this._dimensions.device.canvas.width,m[C+1]=A/this._dimensions.device.canvas.height,m[C+2]=E/this._dimensions.device.canvas.width,m[C+3]=D/this._dimensions.device.canvas.height,m[C+4]=O,m[C+5]=F,m[C+6]=N,m[C+7]=I}_addRectangleFloat(m,C,L,A,E,D,O){m[C]=L/this._dimensions.device.canvas.width,m[C+1]=A/this._dimensions.device.canvas.height,m[C+2]=E/this._dimensions.device.canvas.width,m[C+3]=D/this._dimensions.device.canvas.height,m[C+4]=O[0],m[C+5]=O[1],m[C+6]=O[2],m[C+7]=O[3]}_colorToFloat32Array(m){return new Float32Array([(m.rgba>>24&255)/255,(m.rgba>>16&255)/255,(m.rgba>>8&255)/255,(255&m.rgba)/255])}}n.RectangleRenderer=v},310:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderModel=n.COMBINED_CHAR_BIT_MASK=n.RENDER_MODEL_EXT_OFFSET=n.RENDER_MODEL_FG_OFFSET=n.RENDER_MODEL_BG_OFFSET=n.RENDER_MODEL_INDICIES_PER_CELL=void 0;const f=u(296);n.RENDER_MODEL_INDICIES_PER_CELL=4,n.RENDER_MODEL_BG_OFFSET=1,n.RENDER_MODEL_FG_OFFSET=2,n.RENDER_MODEL_EXT_OFFSET=3,n.COMBINED_CHAR_BIT_MASK=2147483648,n.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,f.createSelectionRenderModel)()}resize(_,a){const p=_*a*n.RENDER_MODEL_INDICIES_PER_CELL;p!==this.cells.length&&(this.cells=new Uint32Array(p),this.lineLengths=new Uint32Array(a))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.JoinedCellData=n.WebglRenderer=void 0;const f=u(820),_=u(274),a=u(627),p=u(457),b=u(56),w=u(374),c=u(345),r=u(859),h=u(147),o=u(782),l=u(855),S=u(965),x=u(742),v=u(310),y=u(733);class m extends r.Disposable{constructor(E,D,O,F,N,I,P,R,B){super(),this._terminal=E,this._characterJoinerService=D,this._charSizeService=O,this._coreBrowserService=F,this._coreService=N,this._decorationService=I,this._optionsService=P,this._themeService=R,this._cursorBlinkStateManager=new r.MutableDisposable,this._charAtlasDisposable=this.register(new r.MutableDisposable),this._observerDisposable=this.register(new r.MutableDisposable),this._model=new v.RenderModel,this._workCell=new o.CellData,this._workCell2=new o.CellData,this._rectangleRenderer=this.register(new r.MutableDisposable),this._glyphRenderer=this.register(new r.MutableDisposable),this._onChangeTextureAtlas=this.register(new c.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new c.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new c.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new c.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new c.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors((()=>this._handleColorChange()))),this._cellColorResolver=new _.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new y.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,P,this._themeService)],this.dimensions=(0,w.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(P.onOptionChange((()=>this._handleOptionsChanged()))),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const T={antialias:!1,depth:!1,preserveDrawingBuffer:B};if(this._gl=this._canvas.getContext("webgl2",T),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,f.addDisposableDomListener)(this._canvas,"webglcontextlost",(H=>{console.log("webglcontextlost event received"),H.preventDefault(),this._contextRestorationTimeout=setTimeout((()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(H)}),3e3)}))),this.register((0,f.addDisposableDomListener)(this._canvas,"webglcontextrestored",(H=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,a.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()}))),this._observerDisposable.value=(0,b.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,((H,V)=>this._setCanvasDevicePixelDimensions(H,V))),this.register(this._coreBrowserService.onWindowChange((H=>{this._observerDisposable.value=(0,b.observeDevicePixelDimensions)(this._canvas,H,((V,Q)=>this._setCanvasDevicePixelDimensions(V,Q)))}))),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,r.toDisposable)((()=>{var H;for(const V of this._renderLayers)V.dispose();(H=this._canvas.parentElement)==null||H.removeChild(this._canvas),(0,a.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){var E;return(E=this._charAtlas)==null?void 0:E.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(E,D){var O,F,N,I;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const P of this._renderLayers)P.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(O=this._rectangleRenderer.value)==null||O.setDimensions(this.dimensions),(F=this._rectangleRenderer.value)==null||F.handleResize(),(N=this._glyphRenderer.value)==null||N.setDimensions(this.dimensions),(I=this._glyphRenderer.value)==null||I.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var E;for(const D of this._renderLayers)D.handleBlur(this._terminal);(E=this._cursorBlinkStateManager.value)==null||E.pause(),this._requestRedrawViewport()}handleFocus(){var E;for(const D of this._renderLayers)D.handleFocus(this._terminal);(E=this._cursorBlinkStateManager.value)==null||E.resume(),this._requestRedrawViewport()}handleSelectionChanged(E,D,O){for(const F of this._renderLayers)F.handleSelectionChanged(this._terminal,E,D,O);this._model.selection.update(this._core,E,D,O),this._requestRedrawViewport()}handleCursorMove(){var E;for(const D of this._renderLayers)D.handleCursorMove(this._terminal);(E=this._cursorBlinkStateManager.value)==null||E.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new x.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new S.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var D;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const E=(0,a.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==E&&(this._onChangeTextureAtlas.fire(E.pages[0].canvas),this._charAtlasDisposable.value=(0,r.getDisposeArrayDisposable)([(0,c.forwardEvent)(E.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,c.forwardEvent)(E.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=E,this._charAtlas.warmUp(),(D=this._glyphRenderer.value)==null||D.setAtlas(this._charAtlas)}_clearModel(E){var D;this._model.clear(),E&&((D=this._glyphRenderer.value)==null||D.clear())}clearTextureAtlas(){var E;(E=this._charAtlas)==null||E.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var E;this._clearModel(!0);for(const D of this._renderLayers)D.reset(this._terminal);(E=this._cursorBlinkStateManager.value)==null||E.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(E){return-1}deregisterCharacterJoiner(E){return!1}renderRows(E,D){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const O of this._renderLayers)O.handleGridChanged(this._terminal,E,D);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(E,D),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new p.CursorBlinkStateManager((()=>{this._requestRedrawCursor()}),this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(E,D){const O=this._core;let F,N,I,P,R,B,T,H,V,Q,ue,de,q,z,se=this._workCell;E=L(E,O.rows-1,0),D=L(D,O.rows-1,0);const ie=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,ve=ie-O.buffer.ydisp,fe=Math.min(this._terminal.buffer.active.cursorX,O.cols-1);let Me=-1;const _e=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let Oe=!1;for(N=E;N<=D;N++)for(I=N+O.buffer.ydisp,P=O.buffer.lines.get(I),this._model.lineLengths[N]=0,R=this._characterJoinerService.getJoinedCharacters(I),q=0;q<O.cols;q++)if(F=this._cellColorResolver.result.bg,P.loadCell(q,se),q===0&&(F=this._cellColorResolver.result.bg),B=!1,T=q,R.length>0&&q===R[0][0]&&(B=!0,H=R.shift(),se=new C(se,P.translateToString(!0,H[0],H[1]),H[1]-H[0]),T=H[1]-1),V=se.getChars(),Q=se.getCode(),de=(N*O.cols+q)*v.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(se,q,I,this.dimensions.device.cell.width),_e&&I===ie&&(q===fe&&(this._model.cursor={x:fe,y:ve,width:se.getWidth(),style:this._coreBrowserService.isFocused?O.options.cursorStyle||"block":O.options.cursorInactiveStyle,cursorWidth:O.options.cursorWidth,dpr:this._devicePixelRatio},Me=fe+se.getWidth()-1),q>=fe&&q<=Me&&(this._coreBrowserService.isFocused&&(O.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&O.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),Q!==l.NULL_CELL_CODE&&(this._model.lineLengths[N]=q+1),(this._model.cells[de]!==Q||this._model.cells[de+v.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[de+v.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[de+v.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(Oe=!0,V.length>1&&(Q|=v.COMBINED_CHAR_BIT_MASK),this._model.cells[de]=Q,this._model.cells[de+v.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[de+v.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[de+v.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,ue=se.getWidth(),this._glyphRenderer.value.updateCell(q,N,Q,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,V,ue,F),B))for(se=this._workCell,q++;q<T;q++)z=(N*O.cols+q)*v.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(q,N,l.NULL_CELL_CODE,0,0,0,l.NULL_CELL_CHAR,0,0),this._model.cells[z]=l.NULL_CELL_CODE,this._model.cells[z+v.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[z+v.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[z+v.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;Oe&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),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._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(E,D){this._canvas.width===E&&this._canvas.height===D||(this._canvas.width=E,this._canvas.height=D,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const E=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:E,end:E})}}n.WebglRenderer=m;class C extends h.AttributeData{constructor(E,D,O){super(),this.content=0,this.combinedData="",this.fg=E.fg,this.bg=E.bg,this.combinedData=D,this._width=O}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(E){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function L(A,E,D=0){return Math.max(Math.min(A,E),D)}n.JoinedCellData=C},381:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GLTexture=n.expandFloat32Array=n.createShader=n.createProgram=n.PROJECTION_MATRIX=void 0;const f=u(374);function _(a,p,b){const w=(0,f.throwIfFalsy)(a.createShader(p));if(a.shaderSource(w,b),a.compileShader(w),a.getShaderParameter(w,a.COMPILE_STATUS))return w;console.error(a.getShaderInfoLog(w)),a.deleteShader(w)}n.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),n.createProgram=function(a,p,b){const w=(0,f.throwIfFalsy)(a.createProgram());if(a.attachShader(w,(0,f.throwIfFalsy)(_(a,a.VERTEX_SHADER,p))),a.attachShader(w,(0,f.throwIfFalsy)(_(a,a.FRAGMENT_SHADER,b))),a.linkProgram(w),a.getProgramParameter(w,a.LINK_STATUS))return w;console.error(a.getProgramInfoLog(w)),a.deleteProgram(w)},n.createShader=_,n.expandFloat32Array=function(a,p){const b=Math.min(2*a.length,p),w=new Float32Array(b);for(let c=0;c<a.length;c++)w[c]=a[c];return w},n.GLTexture=class{constructor(a){this.texture=a,this.version=-1}}},592:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BaseRenderLayer=void 0;const f=u(627),_=u(237),a=u(374),p=u(859);class b extends p.Disposable{constructor(c,r,h,o,l,S,x,v){super(),this._container=r,this._alpha=l,this._coreBrowserService=S,this._optionsService=x,this._themeService=v,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${h}-layer`),this._canvas.style.zIndex=o.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors((y=>{this._refreshCharAtlas(c,y),this.reset(c)}))),this.register((0,p.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,a.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(c){}handleFocus(c){}handleCursorMove(c){}handleGridChanged(c,r,h){}handleSelectionChanged(c,r,h,o=!1){}_setTransparency(c,r){if(r===this._alpha)return;const h=this._canvas;this._alpha=r,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,h),this._refreshCharAtlas(c,this._themeService.colors),this.handleGridChanged(c,0,c.rows-1)}_refreshCharAtlas(c,r){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,f.acquireTextureAtlas)(c,this._optionsService.rawOptions,r,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(c,r){this._deviceCellWidth=r.device.cell.width,this._deviceCellHeight=r.device.cell.height,this._deviceCharWidth=r.device.char.width,this._deviceCharHeight=r.device.char.height,this._deviceCharLeft=r.device.char.left,this._deviceCharTop=r.device.char.top,this._canvas.width=r.device.canvas.width,this._canvas.height=r.device.canvas.height,this._canvas.style.width=`${r.css.canvas.width}px`,this._canvas.style.height=`${r.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(c,this._themeService.colors)}_fillBottomLineAtCells(c,r,h=1){this._ctx.fillRect(c*this._deviceCellWidth,(r+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,h*this._deviceCellWidth,this._coreBrowserService.dpr)}_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(c,r,h,o){this._alpha?this._ctx.clearRect(c*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,o*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(c*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,o*this._deviceCellHeight))}_fillCharTrueColor(c,r,h,o){this._ctx.font=this._getFont(c,!1,!1),this._ctx.textBaseline=_.TEXT_BASELINE,this._clipCell(h,o,r.getWidth()),this._ctx.fillText(r.getChars(),h*this._deviceCellWidth+this._deviceCharLeft,o*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(c,r,h){this._ctx.beginPath(),this._ctx.rect(c*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(c,r,h){return`${h?"italic":""} ${r?c.options.fontWeightBold:c.options.fontWeight} ${c.options.fontSize*this._coreBrowserService.dpr}px ${c.options.fontFamily}`}}n.BaseRenderLayer=b},733:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkRenderLayer=void 0;const f=u(197),_=u(237),a=u(592);class p extends a.BaseRenderLayer{constructor(w,c,r,h,o,l,S){super(r,w,"link",c,!0,o,l,S),this.register(h.onShowLinkUnderline((x=>this._handleShowLinkUnderline(x)))),this.register(h.onHideLinkUnderline((x=>this._handleHideLinkUnderline(x))))}resize(w,c){super.resize(w,c),this._state=void 0}reset(w){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const w=this._state.y2-this._state.y1-1;w>0&&this._clearCells(0,this._state.y1+1,this._state.cols,w),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(w){if(w.fg===_.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:w.fg!==void 0&&(0,f.is256Color)(w.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[w.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,w.y1===w.y2)this._fillBottomLineAtCells(w.x1,w.y1,w.x2-w.x1);else{this._fillBottomLineAtCells(w.x1,w.y1,w.cols-w.x1);for(let c=w.y1+1;c<w.y2;c++)this._fillBottomLineAtCells(0,c,w.cols);this._fillBottomLineAtCells(0,w.y2,w.x2)}this._state=w}_handleHideLinkUnderline(w){this._clearCurrentLink()}}n.LinkRenderLayer=p},820:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(u,f,_,a){u.addEventListener(f,_,a);let p=!1;return{dispose:()=>{p||(p=!0,u.removeEventListener(f,_,a))}}}},274:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellColorResolver=void 0;const f=u(855),_=u(160),a=u(374);let p,b=0,w=0,c=!1,r=!1,h=!1,o=0;n.CellColorResolver=class{constructor(l,S,x,v,y,m){this._terminal=l,this._optionService=S,this._selectionRenderModel=x,this._decorationService=v,this._coreBrowserService=y,this._themeService=m,this.result={fg:0,bg:0,ext:0}}resolve(l,S,x,v){if(this.result.bg=l.bg,this.result.fg=l.fg,this.result.ext=268435456&l.bg?l.extended.ext:0,w=0,b=0,r=!1,c=!1,h=!1,p=this._themeService.colors,o=0,l.getCode()!==f.NULL_CELL_CODE&&l.extended.underlineStyle===4){const y=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));o=S*v%(2*Math.round(y))}if(this._decorationService.forEachDecorationAtCell(S,x,"bottom",(y=>{y.backgroundColorRGB&&(w=y.backgroundColorRGB.rgba>>8&16777215,r=!0),y.foregroundColorRGB&&(b=y.foregroundColorRGB.rgba>>8&16777215,c=!0)})),h=this._selectionRenderModel.isCellSelected(this._terminal,S,x),h){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:w=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:w=(16777215&this.result.fg)<<8|255;break;default:w=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:w=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:w=(16777215&this.result.bg)<<8|255}w=_.rgba.blend(w,4294967040&(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else w=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(r=!0,p.selectionForeground&&(b=p.selectionForeground.rgba>>8&16777215,c=!0),(0,a.treatGlyphAsBackgroundColor)(l.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)b=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:b=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:b=(16777215&this.result.fg)<<8|255;break;default:b=this._themeService.colors.foreground.rgba}b=_.rgba.blend(b,4294967040&(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}c=!0}}this._decorationService.forEachDecorationAtCell(S,x,"top",(y=>{y.backgroundColorRGB&&(w=y.backgroundColorRGB.rgba>>8&16777215,r=!0),y.foregroundColorRGB&&(b=y.foregroundColorRGB.rgba>>8&16777215,c=!0)})),r&&(w=h?-16777216&l.bg&-134217729|w|50331648:-16777216&l.bg|w|50331648),c&&(b=-16777216&l.fg&-67108865|b|50331648),67108864&this.result.fg&&(r&&!c&&(b=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&p.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,c=!0),!r&&c&&(w=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&p.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,r=!0)),p=void 0,this.result.bg=r?w:this.result.bg,this.result.fg=c?b:this.result.fg,this.result.ext&=536870911,this.result.ext|=o<<29&3758096384}}},627:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.removeTerminalFromCache=n.acquireTextureAtlas=void 0;const f=u(509),_=u(197),a=[];n.acquireTextureAtlas=function(p,b,w,c,r,h,o,l){const S=(0,_.generateConfig)(c,r,h,o,b,w,l);for(let y=0;y<a.length;y++){const m=a[y],C=m.ownedBy.indexOf(p);if(C>=0){if((0,_.configEquals)(m.config,S))return m.atlas;m.ownedBy.length===1?(m.atlas.dispose(),a.splice(y,1)):m.ownedBy.splice(C,1);break}}for(let y=0;y<a.length;y++){const m=a[y];if((0,_.configEquals)(m.config,S))return m.ownedBy.push(p),m.atlas}const x=p._core,v={atlas:new f.TextureAtlas(document,S,x.unicodeService),config:S,ownedBy:[p]};return a.push(v),v.atlas},n.removeTerminalFromCache=function(p){for(let b=0;b<a.length;b++){const w=a[b].ownedBy.indexOf(p);if(w!==-1){a[b].ownedBy.length===1?(a[b].atlas.dispose(),a.splice(b,1)):a[b].ownedBy.splice(w,1);break}}}},197:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.is256Color=n.configEquals=n.generateConfig=void 0;const f=u(160);n.generateConfig=function(_,a,p,b,w,c,r){const h={foreground:c.foreground,background:c.background,cursor:f.NULL_COLOR,cursorAccent:f.NULL_COLOR,selectionForeground:f.NULL_COLOR,selectionBackgroundTransparent:f.NULL_COLOR,selectionBackgroundOpaque:f.NULL_COLOR,selectionInactiveBackgroundTransparent:f.NULL_COLOR,selectionInactiveBackgroundOpaque:f.NULL_COLOR,ansi:c.ansi.slice(),contrastCache:c.contrastCache,halfContrastCache:c.halfContrastCache};return{customGlyphs:w.customGlyphs,devicePixelRatio:r,letterSpacing:w.letterSpacing,lineHeight:w.lineHeight,deviceCellWidth:_,deviceCellHeight:a,deviceCharWidth:p,deviceCharHeight:b,fontFamily:w.fontFamily,fontSize:w.fontSize,fontWeight:w.fontWeight,fontWeightBold:w.fontWeightBold,allowTransparency:w.allowTransparency,drawBoldTextInBrightColors:w.drawBoldTextInBrightColors,minimumContrastRatio:w.minimumContrastRatio,colors:h}},n.configEquals=function(_,a){for(let p=0;p<_.colors.ansi.length;p++)if(_.colors.ansi[p].rgba!==a.colors.ansi[p].rgba)return!1;return _.devicePixelRatio===a.devicePixelRatio&&_.customGlyphs===a.customGlyphs&&_.lineHeight===a.lineHeight&&_.letterSpacing===a.letterSpacing&&_.fontFamily===a.fontFamily&&_.fontSize===a.fontSize&&_.fontWeight===a.fontWeight&&_.fontWeightBold===a.fontWeightBold&&_.allowTransparency===a.allowTransparency&&_.deviceCharWidth===a.deviceCharWidth&&_.deviceCharHeight===a.deviceCharHeight&&_.drawBoldTextInBrightColors===a.drawBoldTextInBrightColors&&_.minimumContrastRatio===a.minimumContrastRatio&&_.colors.foreground.rgba===a.colors.foreground.rgba&&_.colors.background.rgba===a.colors.background.rgba},n.is256Color=function(_){return(50331648&_)==16777216||(50331648&_)==33554432}},237:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const f=u(399);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},457:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorBlinkStateManager=void 0,n.CursorBlinkStateManager=class{constructor(u,f){this._renderCallback=u,this._coreBrowserService=f,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(u=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const f=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,f>0)return void this._restartInterval(f)}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 f=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(f)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),u)}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:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tryDrawCustomChar=n.powerlineDefinitions=n.boxDrawingDefinitions=n.blockElementDefinitions=void 0;const f=u(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 _={"░":[[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:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"║":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╒":{1:(c,r)=>`M.5,1 L.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╓":{1:(c,r)=>`M${.5-c},1 L${.5-c},.5 L1,.5 M${.5+c},.5 L${.5+c},1`},"╔":{1:(c,r)=>`M1,${.5-r} L${.5-c},${.5-r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1`},"╕":{1:(c,r)=>`M0,${.5-r} L.5,${.5-r} L.5,1 M0,${.5+r} L.5,${.5+r}`},"╖":{1:(c,r)=>`M${.5+c},1 L${.5+c},.5 L0,.5 M${.5-c},.5 L${.5-c},1`},"╗":{1:(c,r)=>`M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M0,${.5-r} L${.5+c},${.5-r} L${.5+c},1`},"╘":{1:(c,r)=>`M.5,0 L.5,${.5+r} L1,${.5+r} M.5,${.5-r} L1,${.5-r}`},"╙":{1:(c,r)=>`M1,.5 L${.5-c},.5 L${.5-c},0 M${.5+c},.5 L${.5+c},0`},"╚":{1:(c,r)=>`M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0 M1,${.5+r} L${.5-c},${.5+r} L${.5-c},0`},"╛":{1:(c,r)=>`M0,${.5+r} L.5,${.5+r} L.5,0 M0,${.5-r} L.5,${.5-r}`},"╜":{1:(c,r)=>`M0,.5 L${.5+c},.5 L${.5+c},0 M${.5-c},.5 L${.5-c},0`},"╝":{1:(c,r)=>`M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M0,${.5+r} L${.5+c},${.5+r} L${.5+c},0`},"╞":{1:(c,r)=>`M.5,0 L.5,1 M.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╟":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1 M${.5+c},.5 L1,.5`},"╠":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0`},"╡":{1:(c,r)=>`M.5,0 L.5,1 M0,${.5-r} L.5,${.5-r} M0,${.5+r} L.5,${.5+r}`},"╢":{1:(c,r)=>`M0,.5 L${.5-c},.5 M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╣":{1:(c,r)=>`M${.5+c},0 L${.5+c},1 M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0`},"╤":{1:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r} M.5,${.5+r} L.5,1`},"╥":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},.5 L${.5-c},1 M${.5+c},.5 L${.5+c},1`},"╦":{1:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1`},"╧":{1:(c,r)=>`M.5,0 L.5,${.5-r} M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╨":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},.5 L${.5-c},0 M${.5+c},.5 L${.5+c},0`},"╩":{1:(c,r)=>`M0,${.5+r} L1,${.5+r} M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0`},"╪":{1:(c,r)=>`M.5,0 L.5,1 M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╫":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╬":{1:(c,r)=>`M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1 M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},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:(c,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,1,.5`},"╮":{1:(c,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,0,.5`},"╯":{1:(c,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,0,.5`},"╰":{1:(c,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.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(c,r,h,o,l,S,x,v){const y=n.blockElementDefinitions[r];if(y)return(function(A,E,D,O,F,N){for(let I=0;I<E.length;I++){const P=E[I],R=F/8,B=N/8;A.fillRect(D+P.x*R,O+P.y*B,P.w*R,P.h*B)}})(c,y,h,o,l,S),!0;const m=_[r];if(m)return(function(A,E,D,O,F,N){let I=a.get(E);I||(I=new Map,a.set(E,I));const P=A.fillStyle;if(typeof P!="string")throw new Error(`Unexpected fillStyle type "${P}"`);let R=I.get(P);if(!R){const B=E[0].length,T=E.length,H=A.canvas.ownerDocument.createElement("canvas");H.width=B,H.height=T;const V=(0,f.throwIfFalsy)(H.getContext("2d")),Q=new ImageData(B,T);let ue,de,q,z;if(P.startsWith("#"))ue=parseInt(P.slice(1,3),16),de=parseInt(P.slice(3,5),16),q=parseInt(P.slice(5,7),16),z=P.length>7&&parseInt(P.slice(7,9),16)||1;else{if(!P.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${P}" when drawing pattern glyph`);[ue,de,q,z]=P.substring(5,P.length-1).split(",").map((se=>parseFloat(se)))}for(let se=0;se<T;se++)for(let ie=0;ie<B;ie++)Q.data[4*(se*B+ie)]=ue,Q.data[4*(se*B+ie)+1]=de,Q.data[4*(se*B+ie)+2]=q,Q.data[4*(se*B+ie)+3]=E[se][ie]*(255*z);V.putImageData(Q,0,0),R=(0,f.throwIfFalsy)(A.createPattern(H,null)),I.set(P,R)}A.fillStyle=R,A.fillRect(D,O,F,N)})(c,m,h,o,l,S),!0;const C=n.boxDrawingDefinitions[r];if(C)return(function(A,E,D,O,F,N,I){A.strokeStyle=A.fillStyle;for(const[P,R]of Object.entries(E)){let B;A.beginPath(),A.lineWidth=I*Number.parseInt(P),B=typeof R=="function"?R(.15,.15/N*F):R;for(const T of B.split(" ")){const H=T[0],V=b[H];if(!V){console.error(`Could not find drawing instructions for "${H}"`);continue}const Q=T.substring(1).split(",");Q[0]&&Q[1]&&V(A,w(Q,F,N,D,O,!0,I))}A.stroke(),A.closePath()}})(c,C,h,o,l,S,v),!0;const L=n.powerlineDefinitions[r];return!!L&&((function(A,E,D,O,F,N,I,P){const R=new Path2D;R.rect(D,O,F,N),A.clip(R),A.beginPath();const B=I/12;A.lineWidth=P*B;for(const T of E.d.split(" ")){const H=T[0],V=b[H];if(!V){console.error(`Could not find drawing instructions for "${H}"`);continue}const Q=T.substring(1).split(",");Q[0]&&Q[1]&&V(A,w(Q,F,N,D,O,!1,P,(E.leftPadding??0)*(B/2),(E.rightPadding??0)*(B/2)))}E.type===1?(A.strokeStyle=A.fillStyle,A.stroke()):A.fill(),A.closePath()})(c,L,h,o,l,S,x,v),!0)};const a=new Map;function p(c,r,h=0){return Math.max(Math.min(c,r),h)}const b={C:(c,r)=>c.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]),L:(c,r)=>c.lineTo(r[0],r[1]),M:(c,r)=>c.moveTo(r[0],r[1])};function w(c,r,h,o,l,S,x,v=0,y=0){const m=c.map((C=>parseFloat(C)||parseInt(C)));if(m.length<2)throw new Error("Too few arguments for instruction");for(let C=0;C<m.length;C+=2)m[C]*=r-v*x-y*x,S&&m[C]!==0&&(m[C]=p(Math.round(m[C]+.5)-.5,r,0)),m[C]+=o+v*x;for(let C=1;C<m.length;C+=2)m[C]*=h,S&&m[C]!==0&&(m[C]=p(Math.round(m[C]+.5)-.5,h,0)),m[C]+=l;return m}},56:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.observeDevicePixelDimensions=void 0;const f=u(859);n.observeDevicePixelDimensions=function(_,a,p){let b=new a.ResizeObserver((w=>{const c=w.find((o=>o.target===_));if(!c)return;if(!("devicePixelContentBoxSize"in c))return b==null||b.disconnect(),void(b=void 0);const r=c.devicePixelContentBoxSize[0].inlineSize,h=c.devicePixelContentBoxSize[0].blockSize;r>0&&h>0&&p(r,h)}));try{b.observe(_,{box:["device-pixel-content-box"]})}catch{b.disconnect(),b=void 0}return(0,f.toDisposable)((()=>b==null?void 0:b.disconnect()))}},374:($,n)=>{function u(_){return 57508<=_&&_<=57558}function f(_){return _>=128512&&_<=128591||_>=127744&&_<=128511||_>=128640&&_<=128767||_>=9728&&_<=9983||_>=9984&&_<=10175||_>=65024&&_<=65039||_>=129280&&_<=129535||_>=127462&&_<=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(_){if(!_)throw new Error("value must not be falsy");return _},n.isPowerlineGlyph=u,n.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},n.isEmoji=f,n.allowRescaling=function(_,a,p,b){return a===1&&p>Math.ceil(1.5*b)&&_!==void 0&&_>255&&!f(_)&&!u(_)&&!(function(w){return 57344<=w&&w<=63743})(_)},n.treatGlyphAsBackgroundColor=function(_){return u(_)||(function(a){return 9472<=a&&a<=9631})(_)},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(_,a,p=0){return(_-(2*Math.round(a)-p))%(2*Math.round(a))}},296:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(_,a,p,b=!1){if(this.selectionStart=a,this.selectionEnd=p,!a||!p||a[0]===p[0]&&a[1]===p[1])return void this.clear();const w=_.buffers.active.ydisp,c=a[1]-w,r=p[1]-w,h=Math.max(c,0),o=Math.min(r,_.rows-1);h>=_.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=b,this.viewportStartRow=c,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=o,this.startCol=a[0],this.endCol=p[0])}isCellSelected(_,a,p){return!!this.hasSelection&&(p-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?a>=this.startCol&&p>=this.viewportCappedStartRow&&a<this.endCol&&p<=this.viewportCappedEndRow:a<this.startCol&&p>=this.viewportCappedStartRow&&a>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol)}}n.createSelectionRenderModel=function(){return new u}},509:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextureAtlas=void 0;const f=u(237),_=u(860),a=u(374),p=u(160),b=u(345),w=u(485),c=u(385),r=u(147),h=u(855),o={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 l;class S{get pages(){return this._pages}constructor(C,L,A){this._document=C,this._config=L,this._unicodeService=A,this._didWarmUp=!1,this._cacheMap=new w.FourKeyMap,this._cacheMapCombined=new w.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new r.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new b.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new b.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=y(C,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,a.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const C of this.pages)C.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const C=new c.IdleTaskQueue;for(let L=33;L<126;L++)C.enqueue((()=>{if(!this._cacheMap.get(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT)){const A=this._drawToCache(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT);this._cacheMap.set(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT,A)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const C of this._pages)C.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(S.maxAtlasPages&&this._pages.length>=Math.max(4,S.maxAtlasPages)){const L=this._pages.filter((I=>2*I.canvas.width<=(S.maxTextureSize||4096))).sort(((I,P)=>P.canvas.width!==I.canvas.width?P.canvas.width-I.canvas.width:P.percentageUsed-I.percentageUsed));let A=-1,E=0;for(let I=0;I<L.length;I++)if(L[I].canvas.width!==E)A=I,E=L[I].canvas.width;else if(I-A==3)break;const D=L.slice(A,A+4),O=D.map((I=>I.glyphs[0].texturePage)).sort(((I,P)=>I>P?1:-1)),F=this.pages.length-D.length,N=this._mergePages(D,F);N.version++;for(let I=O.length-1;I>=0;I--)this._deletePage(O[I]);this.pages.push(N),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(N.canvas)}const C=new x(this._document,this._textureSize);return this._pages.push(C),this._activePages.push(C),this._onAddTextureAtlasCanvas.fire(C.canvas),C}_mergePages(C,L){const A=2*C[0].canvas.width,E=new x(this._document,A,C);for(const[D,O]of C.entries()){const F=D*O.canvas.width%A,N=Math.floor(D/2)*O.canvas.height;E.ctx.drawImage(O.canvas,F,N);for(const P of O.glyphs)P.texturePage=L,P.sizeClipSpace.x=P.size.x/A,P.sizeClipSpace.y=P.size.y/A,P.texturePosition.x+=F,P.texturePosition.y+=N,P.texturePositionClipSpace.x=P.texturePosition.x/A,P.texturePositionClipSpace.y=P.texturePosition.y/A;this._onRemoveTextureAtlasCanvas.fire(O.canvas);const I=this._activePages.indexOf(O);I!==-1&&this._activePages.splice(I,1)}return E}_deletePage(C){this._pages.splice(C,1);for(let L=C;L<this._pages.length;L++){const A=this._pages[L];for(const E of A.glyphs)E.texturePage--;A.version++}}getRasterizedGlyphCombinedChar(C,L,A,E,D){return this._getFromCacheMap(this._cacheMapCombined,C,L,A,E,D)}getRasterizedGlyph(C,L,A,E,D){return this._getFromCacheMap(this._cacheMap,C,L,A,E,D)}_getFromCacheMap(C,L,A,E,D,O=!1){return l=C.get(L,A,E,D),l||(l=this._drawToCache(L,A,E,D,O),C.set(L,A,E,D,l)),l}_getColorFromAnsiIndex(C){if(C>=this._config.colors.ansi.length)throw new Error("No color found for idx "+C);return this._config.colors.ansi[C]}_getBackgroundColor(C,L,A,E){if(this._config.allowTransparency)return p.NULL_COLOR;let D;switch(C){case 16777216:case 33554432:D=this._getColorFromAnsiIndex(L);break;case 50331648:const O=r.AttributeData.toColorRGB(L);D=p.channels.toColor(O[0],O[1],O[2]);break;default:D=A?p.color.opaque(this._config.colors.foreground):this._config.colors.background}return D}_getForegroundColor(C,L,A,E,D,O,F,N,I,P){const R=this._getMinimumContrastColor(C,L,A,E,D,O,F,I,N,P);if(R)return R;let B;switch(D){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&I&&O<8&&(O+=8),B=this._getColorFromAnsiIndex(O);break;case 50331648:const T=r.AttributeData.toColorRGB(O);B=p.channels.toColor(T[0],T[1],T[2]);break;default:B=F?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(B=p.color.opaque(B)),N&&(B=p.color.multiplyOpacity(B,f.DIM_OPACITY)),B}_resolveBackgroundRgba(C,L,A){switch(C){case 16777216:case 33554432:return this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return A?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(C,L,A,E){switch(C){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&E&&L<8&&(L+=8),this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return A?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(C,L,A,E,D,O,F,N,I,P){if(this._config.minimumContrastRatio===1||P)return;const R=this._getContrastCache(I),B=R.getColor(C,E);if(B!==void 0)return B||void 0;const T=this._resolveBackgroundRgba(L,A,F),H=this._resolveForegroundRgba(D,O,F,N),V=p.rgba.ensureContrastRatio(T,H,this._config.minimumContrastRatio/(I?2:1));if(!V)return void R.setColor(C,E,null);const Q=p.channels.toColor(V>>24&255,V>>16&255,V>>8&255);return R.setColor(C,E,Q),Q}_getContrastCache(C){return C?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(C,L,A,E,D=!1){const O=typeof C=="number"?String.fromCharCode(C):C,F=Math.min(this._config.deviceCellWidth*Math.max(O.length,2)+4,this._textureSize);this._tmpCanvas.width<F&&(this._tmpCanvas.width=F);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=A,this._workAttributeData.bg=L,this._workAttributeData.extended.ext=E,this._workAttributeData.isInvisible())return o;const I=!!this._workAttributeData.isBold(),P=!!this._workAttributeData.isInverse(),R=!!this._workAttributeData.isDim(),B=!!this._workAttributeData.isItalic(),T=!!this._workAttributeData.isUnderline(),H=!!this._workAttributeData.isStrikethrough(),V=!!this._workAttributeData.isOverline();let Q=this._workAttributeData.getFgColor(),ue=this._workAttributeData.getFgColorMode(),de=this._workAttributeData.getBgColor(),q=this._workAttributeData.getBgColorMode();if(P){const ce=Q;Q=de,de=ce;const ge=ue;ue=q,q=ge}const z=this._getBackgroundColor(q,de,P,R);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const se=I?this._config.fontWeightBold:this._config.fontWeight,ie=B?"italic":"";this._tmpCtx.font=`${ie} ${se} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=f.TEXT_BASELINE;const ve=O.length===1&&(0,a.isPowerlineGlyph)(O.charCodeAt(0)),fe=O.length===1&&(0,a.isRestrictedPowerlineGlyph)(O.charCodeAt(0)),Me=this._getForegroundColor(L,q,de,A,ue,Q,P,R,I,(0,a.treatGlyphAsBackgroundColor)(O.charCodeAt(0)));this._tmpCtx.fillStyle=Me.css;const _e=fe?0:4;let Oe=!1;this._config.customGlyphs!==!1&&(Oe=(0,_.tryDrawCustomChar)(this._tmpCtx,O,_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let qe,be=!ve;if(qe=typeof C=="number"?this._unicodeService.wcwidth(C):this._unicodeService.getStringCellWidth(C),T){this._tmpCtx.save();const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=ce%2==1?.5:0;if(this._tmpCtx.lineWidth=ce,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())be=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{be=!1;let Ie=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Ie<8&&(Ie+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Ie).css}this._tmpCtx.beginPath();const ze=_e,Re=Math.ceil(_e+this._config.deviceCharHeight)-ge-(D?2*ce:0),_t=Re+ce,Qe=Re+2*ce;let it=this._workAttributeData.getUnderlineVariantOffset();for(let Ie=0;Ie<qe;Ie++){this._tmpCtx.save();const Ae=ze+Ie*this._config.deviceCellWidth,Le=ze+(Ie+1)*this._config.deviceCellWidth,xt=Ae+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Le,Re),this._tmpCtx.moveTo(Ae,Qe),this._tmpCtx.lineTo(Le,Qe);break;case 3:const tt=ce<=1?Qe:Math.ceil(_e+this._config.deviceCharHeight-ce/2)-ge,vt=ce<=1?Re:Math.ceil(_e+this._config.deviceCharHeight+ce/2)-ge,ut=new Path2D;ut.rect(Ae,Re,this._config.deviceCellWidth,Qe-Re),this._tmpCtx.clip(ut),this._tmpCtx.moveTo(Ae-this._config.deviceCellWidth/2,_t),this._tmpCtx.bezierCurveTo(Ae-this._config.deviceCellWidth/2,vt,Ae,vt,Ae,_t),this._tmpCtx.bezierCurveTo(Ae,tt,xt,tt,xt,_t),this._tmpCtx.bezierCurveTo(xt,vt,Le,vt,Le,_t),this._tmpCtx.bezierCurveTo(Le,tt,Le+this._config.deviceCellWidth/2,tt,Le+this._config.deviceCellWidth/2,_t);break;case 4:const Zt=it===0?0:it>=ce?2*ce-it:ce-it;it>=ce||Zt===0?(this._tmpCtx.setLineDash([Math.round(ce),Math.round(ce)]),this._tmpCtx.moveTo(Ae+Zt,Re),this._tmpCtx.lineTo(Le,Re)):(this._tmpCtx.setLineDash([Math.round(ce),Math.round(ce)]),this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Ae+Zt,Re),this._tmpCtx.moveTo(Ae+Zt+ce,Re),this._tmpCtx.lineTo(Le,Re)),it=(0,a.computeNextVariantOffset)(Le-Ae,ce,it);break;case 5:const tr=.6,ir=.3,jt=Le-Ae,si=Math.floor(tr*jt),ri=Math.floor(ir*jt),Jt=jt-si-ri;this._tmpCtx.setLineDash([si,ri,Jt]),this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Le,Re);break;default:this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Le,Re)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Oe&&this._config.fontSize>=12&&!this._config.allowTransparency&&O!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Ie=this._tmpCtx.measureText(O);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Ie&&Ie.actualBoundingBoxDescent>0){this._tmpCtx.save();const Ae=new Path2D;Ae.rect(ze,Re-Math.ceil(ce/2),this._config.deviceCellWidth*qe,Qe-Re+Math.ceil(ce/2)),this._tmpCtx.clip(Ae),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=z.css,this._tmpCtx.strokeText(O,_e,_e+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(V){const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=ce%2==1?.5:0;this._tmpCtx.lineWidth=ce,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(_e,_e+ge),this._tmpCtx.lineTo(_e+this._config.deviceCharWidth*qe,_e+ge),this._tmpCtx.stroke()}if(Oe||this._tmpCtx.fillText(O,_e,_e+this._config.deviceCharHeight),O==="_"&&!this._config.allowTransparency){let ce=v(this._tmpCtx.getImageData(_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Me,be);if(ce)for(let ge=1;ge<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(O,_e,_e+this._config.deviceCharHeight-ge),ce=v(this._tmpCtx.getImageData(_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Me,be),ce);ge++);}if(H){const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),ge=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=ce,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(_e,_e+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.lineTo(_e+this._config.deviceCharWidth*qe,_e+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.stroke()}this._tmpCtx.restore();const ft=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Ot;if(Ot=this._config.allowTransparency?(function(ce){for(let ge=0;ge<ce.data.length;ge+=4)if(ce.data[ge+3]>0)return!1;return!0})(ft):v(ft,z,Me,be),Ot)return o;const Se=this._findGlyphBoundingBox(ft,this._workBoundingBox,F,fe,Oe,_e);let pe,me;for(;;){if(this._activePages.length===0){const ce=this._createNewPage();pe=ce,me=ce.currentRow,me.height=Se.size.y;break}pe=this._activePages[this._activePages.length-1],me=pe.currentRow;for(const ce of this._activePages)Se.size.y<=ce.currentRow.height&&(pe=ce,me=ce.currentRow);for(let ce=this._activePages.length-1;ce>=0;ce--)for(const ge of this._activePages[ce].fixedRows)ge.height<=me.height&&Se.size.y<=ge.height&&(pe=this._activePages[ce],me=ge);if(me.y+Se.size.y>=pe.canvas.height||me.height>Se.size.y+2){let ce=!1;if(pe.currentRow.y+pe.currentRow.height+Se.size.y>=pe.canvas.height){let ge;for(const ze of this._activePages)if(ze.currentRow.y+ze.currentRow.height+Se.size.y<ze.canvas.height){ge=ze;break}if(ge)pe=ge;else if(S.maxAtlasPages&&this._pages.length>=S.maxAtlasPages&&me.y+Se.size.y<=pe.canvas.height&&me.height>=Se.size.y&&me.x+Se.size.x<=pe.canvas.width)ce=!0;else{const ze=this._createNewPage();pe=ze,me=ze.currentRow,me.height=Se.size.y,ce=!0}}ce||(pe.currentRow.height>0&&pe.fixedRows.push(pe.currentRow),me={x:0,y:pe.currentRow.y+pe.currentRow.height,height:Se.size.y},pe.fixedRows.push(me),pe.currentRow={x:0,y:me.y+me.height,height:0})}if(me.x+Se.size.x<=pe.canvas.width)break;me===pe.currentRow?(me.x=0,me.y+=me.height,me.height=0):pe.fixedRows.splice(pe.fixedRows.indexOf(me),1)}return Se.texturePage=this._pages.indexOf(pe),Se.texturePosition.x=me.x,Se.texturePosition.y=me.y,Se.texturePositionClipSpace.x=me.x/pe.canvas.width,Se.texturePositionClipSpace.y=me.y/pe.canvas.height,Se.sizeClipSpace.x/=pe.canvas.width,Se.sizeClipSpace.y/=pe.canvas.height,me.height=Math.max(me.height,Se.size.y),me.x+=Se.size.x,pe.ctx.putImageData(ft,Se.texturePosition.x-this._workBoundingBox.left,Se.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Se.size.x,Se.size.y),pe.addGlyph(Se),pe.version++,Se}_findGlyphBoundingBox(C,L,A,E,D,O){L.top=0;const F=E?this._config.deviceCellHeight:this._tmpCanvas.height,N=E?this._config.deviceCellWidth:A;let I=!1;for(let P=0;P<F;P++){for(let R=0;R<N;R++){const B=P*this._tmpCanvas.width*4+4*R+3;if(C.data[B]!==0){L.top=P,I=!0;break}}if(I)break}L.left=0,I=!1;for(let P=0;P<O+N;P++){for(let R=0;R<F;R++){const B=R*this._tmpCanvas.width*4+4*P+3;if(C.data[B]!==0){L.left=P,I=!0;break}}if(I)break}L.right=N,I=!1;for(let P=O+N-1;P>=O;P--){for(let R=0;R<F;R++){const B=R*this._tmpCanvas.width*4+4*P+3;if(C.data[B]!==0){L.right=P,I=!0;break}}if(I)break}L.bottom=F,I=!1;for(let P=F-1;P>=0;P--){for(let R=0;R<N;R++){const B=P*this._tmpCanvas.width*4+4*R+3;if(C.data[B]!==0){L.bottom=P,I=!0;break}}if(I)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:L.right-L.left+1,y:L.bottom-L.top+1},sizeClipSpace:{x:L.right-L.left+1,y:L.bottom-L.top+1},offset:{x:-L.left+O+(E||D?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-L.top+O+(E||D?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}n.TextureAtlas=S;class x{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(C){this._glyphs.push(C),this._usedPixels+=C.size.x*C.size.y}constructor(C,L,A){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],A)for(const E of A)this._glyphs.push(...E.glyphs),this._usedPixels+=E._usedPixels;this.canvas=y(C,L,L),this.ctx=(0,a.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 v(m,C,L,A){const E=C.rgba>>>24,D=C.rgba>>>16&255,O=C.rgba>>>8&255,F=L.rgba>>>24,N=L.rgba>>>16&255,I=L.rgba>>>8&255,P=Math.floor((Math.abs(E-F)+Math.abs(D-N)+Math.abs(O-I))/12);let R=!0;for(let B=0;B<m.data.length;B+=4)m.data[B]===E&&m.data[B+1]===D&&m.data[B+2]===O||A&&Math.abs(m.data[B]-E)+Math.abs(m.data[B+1]-D)+Math.abs(m.data[B+2]-O)<P?m.data[B+3]=0:R=!1;return R}function y(m,C,L){const A=m.createElement("canvas");return A.width=C,A.height=L,A}},160:($,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 u=0,f=0,_=0,a=0;var p,b,w,c,r;function h(l){const S=l.toString(16);return S.length<2?"0"+S:S}function o(l,S){return l<S?(S+.05)/(l+.05):(l+.05)/(S+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(S,x,v,y){return y!==void 0?`#${h(S)}${h(x)}${h(v)}${h(y)}`:`#${h(S)}${h(x)}${h(v)}`},l.toRgba=function(S,x,v,y=255){return(S<<24|x<<16|v<<8|y)>>>0},l.toColor=function(S,x,v,y){return{css:l.toCss(S,x,v,y),rgba:l.toRgba(S,x,v,y)}}})(p||(n.channels=p={})),(function(l){function S(x,v){return a=Math.round(255*v),[u,f,_]=r.toChannels(x.rgba),{css:p.toCss(u,f,_,a),rgba:p.toRgba(u,f,_,a)}}l.blend=function(x,v){if(a=(255&v.rgba)/255,a===1)return{css:v.css,rgba:v.rgba};const y=v.rgba>>24&255,m=v.rgba>>16&255,C=v.rgba>>8&255,L=x.rgba>>24&255,A=x.rgba>>16&255,E=x.rgba>>8&255;return u=L+Math.round((y-L)*a),f=A+Math.round((m-A)*a),_=E+Math.round((C-E)*a),{css:p.toCss(u,f,_),rgba:p.toRgba(u,f,_)}},l.isOpaque=function(x){return(255&x.rgba)==255},l.ensureContrastRatio=function(x,v,y){const m=r.ensureContrastRatio(x.rgba,v.rgba,y);if(m)return p.toColor(m>>24&255,m>>16&255,m>>8&255)},l.opaque=function(x){const v=(255|x.rgba)>>>0;return[u,f,_]=r.toChannels(v),{css:p.toCss(u,f,_),rgba:v}},l.opacity=S,l.multiplyOpacity=function(x,v){return a=255&x.rgba,S(x,a*v/255)},l.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(b||(n.color=b={})),(function(l){let S,x;try{const v=document.createElement("canvas");v.width=1,v.height=1;const y=v.getContext("2d",{willReadFrequently:!0});y&&(S=y,S.globalCompositeOperation="copy",x=S.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(v){if(v.match(/#[\da-f]{3,8}/i))switch(v.length){case 4:return u=parseInt(v.slice(1,2).repeat(2),16),f=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),p.toColor(u,f,_);case 5:return u=parseInt(v.slice(1,2).repeat(2),16),f=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),a=parseInt(v.slice(4,5).repeat(2),16),p.toColor(u,f,_,a);case 7:return{css:v,rgba:(parseInt(v.slice(1),16)<<8|255)>>>0};case 9:return{css:v,rgba:parseInt(v.slice(1),16)>>>0}}const y=v.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(y)return u=parseInt(y[1]),f=parseInt(y[2]),_=parseInt(y[3]),a=Math.round(255*(y[5]===void 0?1:parseFloat(y[5]))),p.toColor(u,f,_,a);if(!S||!x)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=x,S.fillStyle=v,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[u,f,_,a]=S.getImageData(0,0,1,1).data,a!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(u,f,_,a),css:v}}})(w||(n.css=w={})),(function(l){function S(x,v,y){const m=x/255,C=v/255,L=y/255;return .2126*(m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4))+.7152*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}l.relativeLuminance=function(x){return S(x>>16&255,x>>8&255,255&x)},l.relativeLuminance2=S})(c||(n.rgb=c={})),(function(l){function S(v,y,m){const C=v>>24&255,L=v>>16&255,A=v>>8&255;let E=y>>24&255,D=y>>16&255,O=y>>8&255,F=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));for(;F<m&&(E>0||D>0||O>0);)E-=Math.max(0,Math.ceil(.1*E)),D-=Math.max(0,Math.ceil(.1*D)),O-=Math.max(0,Math.ceil(.1*O)),F=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));return(E<<24|D<<16|O<<8|255)>>>0}function x(v,y,m){const C=v>>24&255,L=v>>16&255,A=v>>8&255;let E=y>>24&255,D=y>>16&255,O=y>>8&255,F=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));for(;F<m&&(E<255||D<255||O<255);)E=Math.min(255,E+Math.ceil(.1*(255-E))),D=Math.min(255,D+Math.ceil(.1*(255-D))),O=Math.min(255,O+Math.ceil(.1*(255-O))),F=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));return(E<<24|D<<16|O<<8|255)>>>0}l.blend=function(v,y){if(a=(255&y)/255,a===1)return y;const m=y>>24&255,C=y>>16&255,L=y>>8&255,A=v>>24&255,E=v>>16&255,D=v>>8&255;return u=A+Math.round((m-A)*a),f=E+Math.round((C-E)*a),_=D+Math.round((L-D)*a),p.toRgba(u,f,_)},l.ensureContrastRatio=function(v,y,m){const C=c.relativeLuminance(v>>8),L=c.relativeLuminance(y>>8);if(o(C,L)<m){if(L<C){const D=S(v,y,m),O=o(C,c.relativeLuminance(D>>8));if(O<m){const F=x(v,y,m);return O>o(C,c.relativeLuminance(F>>8))?D:F}return D}const A=x(v,y,m),E=o(C,c.relativeLuminance(A>>8));if(E<m){const D=S(v,y,m);return E>o(C,c.relativeLuminance(D>>8))?A:D}return A}},l.reduceLuminance=S,l.increaseLuminance=x,l.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=o},345:($,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=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===u)return void this._listeners.splice(f,1)}}})),this._event}fire(u,f){const _=[];for(let a=0;a<this._listeners.length;a++)_.push(this._listeners[a]);for(let a=0;a<_.length;a++)_[a].call(void 0,u,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(u,f){return u((_=>f.fire(_)))},n.runAndSubscribe=function(u,f){return f(void 0),u((_=>f(_)))}},859:($,n)=>{function u(f){for(const _ of f)_.dispose();f.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 f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const _=this._disposables.indexOf(f);_!==-1&&this._disposables.splice(_,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var _;this._isDisposed||f===this._value||((_=this._value)==null||_.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},n.toDisposable=function(f){return{dispose:f}},n.disposeArray=u,n.getDisposeArrayDisposable=function(f){return{dispose:()=>u(f)}}},485:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(_,a,p){this._data[_]||(this._data[_]={}),this._data[_][a]=p}get(_,a){return this._data[_]?this._data[_][a]:void 0}clear(){this._data={}}}n.TwoKeyMap=u,n.FourKeyMap=class{constructor(){this._data=new u}set(f,_,a,p,b){this._data.get(f,_)||this._data.set(f,_,new u),this._data.get(f,_).set(a,p,b)}get(f,_,a,p){var b;return(b=this._data.get(f,_))==null?void 0:b.get(a,p)}clear(){this._data.clear()}}},399:($,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 u=n.isNode?"node":navigator.userAgent,f=n.isNode?"node":navigator.platform;n.isFirefox=u.includes("Firefox"),n.isLegacyEdge=u.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(u),n.getSafariVersion=function(){if(!n.isSafari)return 0;const _=u.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),n.isIpad=f==="iPad",n.isIphone=f==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),n.isLinux=f.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(u)},385:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const f=u(399);class _{constructor(){this._tasks=[],this._i=0}enqueue(b){this._tasks.push(b),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(b){this._idleCallback=void 0;let w=0,c=0,r=b.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(w=Date.now(),this._tasks[this._i]()||this._i++,w=Math.max(1,Date.now()-w),c=Math.max(w,c),h=b.timeRemaining(),1.5*c>h)return r-w<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-w))}ms`),void this._start();r=h}this.clear()}}class a extends _{_requestCallback(b){return setTimeout((()=>b(this._createDeadline(16))))}_cancelCallback(b){clearTimeout(b)}_createDeadline(b){const w=Date.now()+b;return{timeRemaining:()=>Math.max(0,w-Date.now())}}}n.PriorityTaskQueue=a,n.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:a,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},147:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(a){return[a>>>16&255,a>>>8&255,255&a]}static fromColorRGB(a){return(255&a[0])<<16|(255&a[1])<<8|255&a[2]}clone(){const a=new u;return a.fg=this.fg,a.bg=this.bg,a.extended=this.extended.clone(),a}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=u;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(a){this._ext=a}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(a){this._ext&=-469762049,this._ext|=a<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(a){this._ext&=-67108864,this._ext|=67108863&a}get urlId(){return this._urlId}set urlId(a){this._urlId=a}get underlineVariantOffset(){const a=(3758096384&this._ext)>>29;return a<0?4294967288^a:a}set underlineVariantOffset(a){this._ext&=536870911,this._ext|=a<<29&3758096384}constructor(a=0,p=0){this._ext=0,this._urlId=0,this._ext=a,this._urlId=p}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=f},782:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const f=u(133),_=u(855),a=u(147);class p extends a.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new a.ExtendedAttrs,this.combinedData=""}static fromCharData(w){const c=new p;return c.setFromCharData(w),c}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(w){this.fg=w[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let c=!1;if(w[_.CHAR_DATA_CHAR_INDEX].length>2)c=!0;else if(w[_.CHAR_DATA_CHAR_INDEX].length===2){const r=w[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=w[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|w[_.CHAR_DATA_WIDTH_INDEX]<<22:c=!0}else c=!0}else this.content=w[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[_.CHAR_DATA_WIDTH_INDEX]<<22;c&&(this.combinedData=w[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|w[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=p},855:($,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:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},n.utf32ToString=function(u,f=0,_=u.length){let a="";for(let p=f;p<_;++p){let b=u[p];b>65535?(b-=65536,a+=String.fromCharCode(55296+(b>>10))+String.fromCharCode(b%1024+56320)):a+=String.fromCharCode(b)}return a},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,f){const _=u.length;if(!_)return 0;let a=0,p=0;if(this._interim){const b=u.charCodeAt(p++);56320<=b&&b<=57343?f[a++]=1024*(this._interim-55296)+b-56320+65536:(f[a++]=this._interim,f[a++]=b),this._interim=0}for(let b=p;b<_;++b){const w=u.charCodeAt(b);if(55296<=w&&w<=56319){if(++b>=_)return this._interim=w,a;const c=u.charCodeAt(b);56320<=c&&c<=57343?f[a++]=1024*(w-55296)+c-56320+65536:(f[a++]=w,f[a++]=c)}else w!==65279&&(f[a++]=w)}return a}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,f){const _=u.length;if(!_)return 0;let a,p,b,w,c=0,r=0,h=0;if(this.interim[0]){let S=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let v,y=0;for(;(v=63&this.interim[++y])&&y<4;)x<<=6,x|=v;const m=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,C=m-y;for(;h<C;){if(h>=_)return 0;if(v=u[h++],(192&v)!=128){h--,S=!0;break}this.interim[y++]=v,x<<=6,x|=63&v}S||(m===2?x<128?h--:f[c++]=x:m===3?x<2048||x>=55296&&x<=57343||x===65279||(f[c++]=x):x<65536||x>1114111||(f[c++]=x)),this.interim.fill(0)}const o=_-4;let l=h;for(;l<_;){for(;!(!(l<o)||128&(a=u[l])||128&(p=u[l+1])||128&(b=u[l+2])||128&(w=u[l+3]));)f[c++]=a,f[c++]=p,f[c++]=b,f[c++]=w,l+=4;if(a=u[l++],a<128)f[c++]=a;else if((224&a)==192){if(l>=_)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(r=(31&a)<<6|63&p,r<128){l--;continue}f[c++]=r}else if((240&a)==224){if(l>=_)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,c;if(b=u[l++],(192&b)!=128){l--;continue}if(r=(15&a)<<12|(63&p)<<6|63&b,r<2048||r>=55296&&r<=57343||r===65279)continue;f[c++]=r}else if((248&a)==240){if(l>=_)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,c;if(b=u[l++],(192&b)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,this.interim[2]=b,c;if(w=u[l++],(192&w)!=128){l--;continue}if(r=(7&a)<<18|(63&p)<<12|(63&b)<<6|63&w,r<65536||r>1114111)continue;f[c++]=r}}return c}}},776:function($,n,u){var f=this&&this.__decorate||function(r,h,o,l){var S,x=arguments.length,v=x<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,h,o,l);else for(var y=r.length-1;y>=0;y--)(S=r[y])&&(v=(x<3?S(v):x>3?S(h,o,v):S(h,o))||v);return x>3&&v&&Object.defineProperty(h,o,v),v},_=this&&this.__param||function(r,h){return function(o,l){h(o,l,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const a=u(859),p=u(97),b={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let w,c=n.LogService=class extends a.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),w=this}_updateLogLevel(){this._logLevel=b[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let h=0;h<r.length;h++)typeof r[h]=="function"&&(r[h]=r[h]())}_log(r,h,o){this._evalLazyOptionalParams(o),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...o)}trace(r,...h){var o;this._logLevel<=p.LogLevelEnum.TRACE&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var o;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var o;this._logLevel<=p.LogLevelEnum.INFO&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var o;this._logLevel<=p.LogLevelEnum.WARN&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var o;this._logLevel<=p.LogLevelEnum.ERROR&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.error.bind(this._optionsService.options.logger))??console.error,r,h)}};n.LogService=c=f([_(0,p.IOptionsService)],c),n.setTraceLogger=function(r){w=r},n.traceCall=function(r,h,o){if(typeof o.value!="function")throw new Error("not supported");const l=o.value;o.value=function(...S){if(w.logLevel!==p.LogLevelEnum.TRACE)return l.apply(this,S);w.trace(`GlyphRenderer#${l.name}(${S.map((v=>JSON.stringify(v))).join(", ")})`);const x=l.apply(this,S);return w.trace(`GlyphRenderer#${l.name} return`,x),x}}},726:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const u="di$target",f="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(_){return _[f]||[]},n.createDecorator=function(_){if(n.serviceRegistry.has(_))return n.serviceRegistry.get(_);const a=function(p,b,w){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(c,r,h){r[u]===r?r[f].push({id:c,index:h}):(r[f]=[{id:c,index:h}],r[u]=r)})(a,p,w)};return a.toString=()=>_,n.serviceRegistry.set(_,a),a}},97:($,n,u)=>{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 f=u(726);var _;n.IBufferService=(0,f.createDecorator)("BufferService"),n.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),n.ICoreService=(0,f.createDecorator)("CoreService"),n.ICharsetService=(0,f.createDecorator)("CharsetService"),n.IInstantiationService=(0,f.createDecorator)("InstantiationService"),(function(a){a[a.TRACE=0]="TRACE",a[a.DEBUG=1]="DEBUG",a[a.INFO=2]="INFO",a[a.WARN=3]="WARN",a[a.ERROR=4]="ERROR",a[a.OFF=5]="OFF"})(_||(n.LogLevelEnum=_={})),n.ILogService=(0,f.createDecorator)("LogService"),n.IOptionsService=(0,f.createDecorator)("OptionsService"),n.IOscLinkService=(0,f.createDecorator)("OscLinkService"),n.IUnicodeService=(0,f.createDecorator)("UnicodeService"),n.IDecorationService=(0,f.createDecorator)("DecorationService")}},j={};function Z($){var n=j[$];if(n!==void 0)return n.exports;var u=j[$]={exports:{}};return X[$].call(u.exports,u,u.exports,Z),u.exports}var ne={};return(()=>{var $=ne;Object.defineProperty($,"__esModule",{value:!0}),$.WebglAddon=void 0;const n=Z(345),u=Z(859),f=Z(399),_=Z(666),a=Z(776);class p extends u.Disposable{constructor(w){if(f.isSafari&&(0,f.getSafariVersion)()<16){const c={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",c))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=w,this._onChangeTextureAtlas=this.register(new n.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new n.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new n.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new n.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(w){const c=w._core;if(!w.element)return void this.register(c.onWillOpen((()=>this.activate(w))));this._terminal=w;const r=c.coreService,h=c.optionsService,o=c,l=o._renderService,S=o._characterJoinerService,x=o._charSizeService,v=o._coreBrowserService,y=o._decorationService,m=o._logService,C=o._themeService;(0,a.setTraceLogger)(m),this._renderer=this.register(new _.WebglRenderer(w,S,x,v,r,y,h,C,this._preserveDrawingBuffer)),this.register((0,n.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,n.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,n.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,n.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),l.setRenderer(this._renderer),this.register((0,u.toDisposable)((()=>{const L=this._terminal._core._renderService;L.setRenderer(this._terminal._core._createRenderer()),L.handleResize(w.cols,w.rows)})))}get textureAtlas(){var w;return(w=this._renderer)==null?void 0:w.textureAtlas}clearTextureAtlas(){var w;(w=this._renderer)==null||w.clearTextureAtlas()}}$.WebglAddon=p})(),ne})()))})(zo)),zo.exports}var og=lg(),No={exports:{}},ef;function cg(){return ef||(ef=1,(function(U,G){(function(X,j){U.exports=j()})(self,(()=>(()=>{var X={903:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BaseRenderLayer=void 0;const f=u(274),_=u(627),a=u(237),p=u(860),b=u(374),w=u(296),c=u(345),r=u(859),h=u(399),o=u(855);class l extends r.Disposable{get canvas(){return this._canvas}get cacheCanvas(){var v;return(v=this._charAtlas)==null?void 0:v.pages[0].canvas}constructor(v,y,m,C,L,A,E,D,O,F){super(),this._terminal=v,this._container=y,this._alpha=L,this._themeService=A,this._bufferService=E,this._optionsService=D,this._decorationService=O,this._coreBrowserService=F,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._selectionModel=(0,w.createSelectionRenderModel)(),this._bitmapGenerator=[],this._charAtlasDisposable=this.register(new r.MutableDisposable),this._onAddTextureAtlasCanvas=this.register(new c.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._cellColorResolver=new f.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-${m}-layer`),this._canvas.style.zIndex=C.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,r.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,b.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(){}handleFocus(){}handleCursorMove(){}handleGridChanged(v,y){}handleSelectionChanged(v,y,m=!1){this._selectionModel.update(this._terminal._core,v,y,m)}_setTransparency(v){if(v===this._alpha)return;const y=this._canvas;this._alpha=v,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,y),this._refreshCharAtlas(this._themeService.colors),this.handleGridChanged(0,this._bufferService.rows-1)}_refreshCharAtlas(v){if(!(this._deviceCharWidth<=0&&this._deviceCharHeight<=0)){this._charAtlas=(0,_.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,v,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlasDisposable.value=(0,c.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),this._charAtlas.warmUp();for(let y=0;y<this._charAtlas.pages.length;y++)this._bitmapGenerator[y]=new S(this._charAtlas.pages[y].canvas)}}resize(v){this._deviceCellWidth=v.device.cell.width,this._deviceCellHeight=v.device.cell.height,this._deviceCharWidth=v.device.char.width,this._deviceCharHeight=v.device.char.height,this._deviceCharLeft=v.device.char.left,this._deviceCharTop=v.device.char.top,this._canvas.width=v.device.canvas.width,this._canvas.height=v.device.canvas.height,this._canvas.style.width=`${v.css.canvas.width}px`,this._canvas.style.height=`${v.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(this._themeService.colors)}clearTextureAtlas(){var v;(v=this._charAtlas)==null||v.clearTexture()}_fillCells(v,y,m,C){this._ctx.fillRect(v*this._deviceCellWidth,y*this._deviceCellHeight,m*this._deviceCellWidth,C*this._deviceCellHeight)}_fillMiddleLineAtCells(v,y,m=1){const C=Math.ceil(.5*this._deviceCellHeight);this._ctx.fillRect(v*this._deviceCellWidth,(y+1)*this._deviceCellHeight-C-this._coreBrowserService.dpr,m*this._deviceCellWidth,this._coreBrowserService.dpr)}_fillBottomLineAtCells(v,y,m=1,C=0){this._ctx.fillRect(v*this._deviceCellWidth,(y+1)*this._deviceCellHeight+C-this._coreBrowserService.dpr-1,m*this._deviceCellWidth,this._coreBrowserService.dpr)}_curlyUnderlineAtCell(v,y,m=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const C=this._coreBrowserService.dpr;this._ctx.lineWidth=C;for(let L=0;L<m;L++){const A=(v+L)*this._deviceCellWidth,E=(v+L+.5)*this._deviceCellWidth,D=(v+L+1)*this._deviceCellWidth,O=(y+1)*this._deviceCellHeight-C-1,F=O-C,N=O+C;this._ctx.moveTo(A,O),this._ctx.bezierCurveTo(A,F,E,F,E,O),this._ctx.bezierCurveTo(E,N,D,N,D,O)}this._ctx.stroke(),this._ctx.restore()}_dottedUnderlineAtCell(v,y,m=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const C=this._coreBrowserService.dpr;this._ctx.lineWidth=C,this._ctx.setLineDash([2*C,C]);const L=v*this._deviceCellWidth,A=(y+1)*this._deviceCellHeight-C-1;this._ctx.moveTo(L,A);for(let E=0;E<m;E++){const D=(v+m+E)*this._deviceCellWidth;this._ctx.lineTo(D,A)}this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_dashedUnderlineAtCell(v,y,m=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const C=this._coreBrowserService.dpr;this._ctx.lineWidth=C,this._ctx.setLineDash([4*C,3*C]);const L=v*this._deviceCellWidth,A=(v+m)*this._deviceCellWidth,E=(y+1)*this._deviceCellHeight-C-1;this._ctx.moveTo(L,E),this._ctx.lineTo(A,E),this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_fillLeftLineAtCell(v,y,m){this._ctx.fillRect(v*this._deviceCellWidth,y*this._deviceCellHeight,this._coreBrowserService.dpr*m,this._deviceCellHeight)}_strokeRectAtCell(v,y,m,C){const L=this._coreBrowserService.dpr;this._ctx.lineWidth=L,this._ctx.strokeRect(v*this._deviceCellWidth+L/2,y*this._deviceCellHeight+L/2,m*this._deviceCellWidth-L,C*this._deviceCellHeight-L)}_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(v,y,m,C){this._alpha?this._ctx.clearRect(v*this._deviceCellWidth,y*this._deviceCellHeight,m*this._deviceCellWidth,C*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(v*this._deviceCellWidth,y*this._deviceCellHeight,m*this._deviceCellWidth,C*this._deviceCellHeight))}_fillCharTrueColor(v,y,m){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=a.TEXT_BASELINE,this._clipRow(m);let C=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(C=(0,p.tryDrawCustomChar)(this._ctx,v.getChars(),y*this._deviceCellWidth,m*this._deviceCellHeight,this._deviceCellWidth,this._deviceCellHeight,this._optionsService.rawOptions.fontSize,this._coreBrowserService.dpr)),C||this._ctx.fillText(v.getChars(),y*this._deviceCellWidth+this._deviceCharLeft,m*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_drawChars(v,y,m){var O,F,N,I;const C=v.getChars(),L=v.getCode(),A=v.getWidth();if(this._cellColorResolver.resolve(v,y,this._bufferService.buffer.ydisp+m,this._deviceCellWidth),!this._charAtlas)return;let E;if(E=C&&C.length>1?this._charAtlas.getRasterizedGlyphCombinedChar(C,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0):this._charAtlas.getRasterizedGlyph(v.getCode()||o.WHITESPACE_CELL_CODE,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0),!E.size.x||!E.size.y)return;this._ctx.save(),this._clipRow(m),this._bitmapGenerator[E.texturePage]&&this._charAtlas.pages[E.texturePage].canvas!==this._bitmapGenerator[E.texturePage].canvas&&((F=(O=this._bitmapGenerator[E.texturePage])==null?void 0:O.bitmap)==null||F.close(),delete this._bitmapGenerator[E.texturePage]),this._charAtlas.pages[E.texturePage].version!==((N=this._bitmapGenerator[E.texturePage])==null?void 0:N.version)&&(this._bitmapGenerator[E.texturePage]||(this._bitmapGenerator[E.texturePage]=new S(this._charAtlas.pages[E.texturePage].canvas)),this._bitmapGenerator[E.texturePage].refresh(),this._bitmapGenerator[E.texturePage].version=this._charAtlas.pages[E.texturePage].version);let D=E.size.x;this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,b.allowRescaling)(L,A,E.size.x,this._deviceCellWidth)&&(D=this._deviceCellWidth-1),this._ctx.drawImage(((I=this._bitmapGenerator[E.texturePage])==null?void 0:I.bitmap)||this._charAtlas.pages[E.texturePage].canvas,E.texturePosition.x,E.texturePosition.y,E.size.x,E.size.y,y*this._deviceCellWidth+this._deviceCharLeft-E.offset.x,m*this._deviceCellHeight+this._deviceCharTop-E.offset.y,D,E.size.y),this._ctx.restore()}_clipRow(v){this._ctx.beginPath(),this._ctx.rect(0,v*this._deviceCellHeight,this._bufferService.cols*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(v,y){return`${y?"italic":""} ${v?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize*this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`}}n.BaseRenderLayer=l;class S{get bitmap(){return this._bitmap}constructor(v){this.canvas=v,this._state=0,this._commitTimeout=void 0,this._bitmap=void 0,this.version=-1}refresh(){var v;(v=this._bitmap)==null||v.close(),this._bitmap=void 0,h.isSafari||(this._commitTimeout===void 0&&(this._commitTimeout=window.setTimeout((()=>this._generate()),100)),this._state===1&&(this._state=2))}_generate(){var v;this._state===0&&((v=this._bitmap)==null||v.close(),this._bitmap=void 0,this._state=1,window.createImageBitmap(this.canvas).then((y=>{this._state===2?this.refresh():this._bitmap=y,this._state=0})),this._commitTimeout&&(this._commitTimeout=void 0))}}},949:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CanvasRenderer=void 0;const f=u(627),_=u(56),a=u(374),p=u(345),b=u(859),w=u(873),c=u(43),r=u(630),h=u(744);class o extends b.Disposable{constructor(S,x,v,y,m,C,L,A,E,D,O){super(),this._terminal=S,this._screenElement=x,this._bufferService=y,this._charSizeService=m,this._optionsService=C,this._coreBrowserService=E,this._themeService=O,this._observerDisposable=this.register(new b.MutableDisposable),this._onRequestRedraw=this.register(new p.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onChangeTextureAtlas=this.register(new p.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new p.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;const F=this._optionsService.rawOptions.allowTransparency;this._renderLayers=[new h.TextRenderLayer(this._terminal,this._screenElement,0,F,this._bufferService,this._optionsService,L,D,this._coreBrowserService,O),new r.SelectionRenderLayer(this._terminal,this._screenElement,1,this._bufferService,this._coreBrowserService,D,this._optionsService,O),new c.LinkRenderLayer(this._terminal,this._screenElement,2,v,this._bufferService,this._optionsService,D,this._coreBrowserService,O),new w.CursorRenderLayer(this._terminal,this._screenElement,3,this._onRequestRedraw,this._bufferService,this._optionsService,A,this._coreBrowserService,D,O)];for(const N of this._renderLayers)(0,p.forwardEvent)(N.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas);this.dimensions=(0,a.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._observerDisposable.value=(0,_.observeDevicePixelDimensions)(this._renderLayers[0].canvas,this._coreBrowserService.window,((N,I)=>this._setCanvasDevicePixelDimensions(N,I))),this.register(this._coreBrowserService.onWindowChange((N=>{this._observerDisposable.value=(0,_.observeDevicePixelDimensions)(this._renderLayers[0].canvas,N,((I,P)=>this._setCanvasDevicePixelDimensions(I,P)))}))),this.register((0,b.toDisposable)((()=>{for(const N of this._renderLayers)N.dispose();(0,f.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(S,x){this._updateDimensions();for(const v of this._renderLayers)v.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((S=>S.handleBlur()))}handleFocus(){this._runOperation((S=>S.handleFocus()))}handleSelectionChanged(S,x,v=!1){this._runOperation((y=>y.handleSelectionChanged(S,x,v))),this._themeService.colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}handleCursorMove(){this._runOperation((S=>S.handleCursorMove()))}clear(){this._runOperation((S=>S.reset()))}_runOperation(S){for(const x of this._renderLayers)S(x)}renderRows(S,x){for(const v of this._renderLayers)v.handleGridChanged(S,x)}clearTextureAtlas(){for(const S of this._renderLayers)S.clearTextureAtlas()}_updateDimensions(){if(!this._charSizeService.hasValidSize)return;const S=this._coreBrowserService.dpr;this.dimensions.device.char.width=Math.floor(this._charSizeService.width*S),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*S),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/S),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/S),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(S,x){this.dimensions.device.canvas.height=x,this.dimensions.device.canvas.width=S;for(const v of this._renderLayers)v.resize(this.dimensions);this._requestRedrawViewport()}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}}n.CanvasRenderer=o},873:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorRenderLayer=void 0;const f=u(457),_=u(859),a=u(399),p=u(782),b=u(903);class w extends b.BaseRenderLayer{constructor(r,h,o,l,S,x,v,y,m,C){super(r,h,"cursor",o,!0,C,S,x,m,y),this._onRequestRedraw=l,this._coreService=v,this._cursorBlinkStateManager=this.register(new _.MutableDisposable),this._cell=new p.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(x.onOptionChange((()=>this._handleOptionsChanged()))),this._handleOptionsChanged()}resize(r){super.resize(r),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(){var r;this._clearCursor(),(r=this._cursorBlinkStateManager.value)==null||r.restartBlinkAnimation(),this._handleOptionsChanged()}handleBlur(){var r;(r=this._cursorBlinkStateManager.value)==null||r.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleFocus(){var r;(r=this._cursorBlinkStateManager.value)==null||r.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 f.CursorBlinkStateManager((()=>this._render(!0)),this._coreBrowserService)):this._cursorBlinkStateManager.clear(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleCursorMove(){var r;(r=this._cursorBlinkStateManager.value)==null||r.restartBlinkAnimation()}handleGridChanged(r,h){!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isPaused?this._render(!1):this._cursorBlinkStateManager.value.restartBlinkAnimation()}_render(r){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();const h=this._bufferService.buffer.ybase+this._bufferService.buffer.y,o=h-this._bufferService.buffer.ydisp;if(o<0||o>=this._bufferService.rows)return void this._clearCursor();const l=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(h).loadCell(l,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 S=this._optionsService.rawOptions.cursorStyle,x=this._optionsService.rawOptions.cursorInactiveStyle;return x&&x!=="none"&&this._cursorRenderers[x](l,o,this._cell),this._ctx.restore(),this._state.x=l,this._state.y=o,this._state.isFocused=!1,this._state.style=S,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible){if(this._state){if(this._state.x===l&&this._state.y===o&&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"](l,o,this._cell),this._ctx.restore(),this._state.x=l,this._state.y=o,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(a.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(r,h,o){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillLeftLineAtCell(r,h,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()}_renderBlockCursor(r,h,o){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillCells(r,h,o.getWidth(),1),this._ctx.fillStyle=this._themeService.colors.cursorAccent.css,this._fillCharTrueColor(o,r,h),this._ctx.restore()}_renderUnderlineCursor(r,h,o){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillBottomLineAtCells(r,h),this._ctx.restore()}_renderOutlineCursor(r,h,o){this._ctx.save(),this._ctx.strokeStyle=this._themeService.colors.cursor.css,this._strokeRectAtCell(r,h,o.getWidth(),1),this._ctx.restore()}}n.CursorRenderLayer=w},574:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GridCache=void 0,n.GridCache=class{constructor(){this.cache=[]}resize(u,f){for(let _=0;_<u;_++){this.cache.length<=_&&this.cache.push([]);for(let a=this.cache[_].length;a<f;a++)this.cache[_].push(void 0);this.cache[_].length=f}this.cache.length=u}clear(){for(let u=0;u<this.cache.length;u++)for(let f=0;f<this.cache[u].length;f++)this.cache[u][f]=void 0}}},43:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkRenderLayer=void 0;const f=u(197),_=u(237),a=u(903);class p extends a.BaseRenderLayer{constructor(w,c,r,h,o,l,S,x,v){super(w,c,"link",r,!0,v,o,l,S,x),this.register(h.onShowLinkUnderline((y=>this._handleShowLinkUnderline(y)))),this.register(h.onHideLinkUnderline((y=>this._handleHideLinkUnderline(y))))}resize(w){super.resize(w),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 w=this._state.y2-this._state.y1-1;w>0&&this._clearCells(0,this._state.y1+1,this._state.cols,w),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(w){if(w.fg===_.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:w.fg&&(0,f.is256Color)(w.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[w.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,w.y1===w.y2)this._fillBottomLineAtCells(w.x1,w.y1,w.x2-w.x1);else{this._fillBottomLineAtCells(w.x1,w.y1,w.cols-w.x1);for(let c=w.y1+1;c<w.y2;c++)this._fillBottomLineAtCells(0,c,w.cols);this._fillBottomLineAtCells(0,w.y2,w.x2)}this._state=w}_handleHideLinkUnderline(w){this._clearCurrentLink()}}n.LinkRenderLayer=p},630:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionRenderLayer=void 0;const f=u(903);class _ extends f.BaseRenderLayer{constructor(p,b,w,c,r,h,o,l){super(p,b,"selection",w,!0,l,c,o,h,r),this._clearState()}_clearState(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}}resize(p){super.resize(p),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(p,b,w){super.handleSelectionChanged(p,b,w),this._redrawSelection(p,b,w)}_redrawSelection(p,b,w){if(!this._didStateChange(p,b,w,this._bufferService.buffer.ydisp))return;if(this._clearAll(),!p||!b)return void this._clearState();const c=p[1]-this._bufferService.buffer.ydisp,r=b[1]-this._bufferService.buffer.ydisp,h=Math.max(c,0),o=Math.min(r,this._bufferService.rows-1);if(h>=this._bufferService.rows||o<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,w){const l=p[0],S=b[0]-l,x=o-h+1;this._fillCells(l,h,S,x)}else{const l=c===h?p[0]:0,S=h===r?b[0]:this._bufferService.cols;this._fillCells(l,h,S-l,1);const x=Math.max(o-h-1,0);if(this._fillCells(0,h+1,this._bufferService.cols,x),h!==o){const v=r===o?b[0]:this._bufferService.cols;this._fillCells(0,o,v,1)}}this._state.start=[p[0],p[1]],this._state.end=[b[0],b[1]],this._state.columnSelectMode=w,this._state.ydisp=this._bufferService.buffer.ydisp}}_didStateChange(p,b,w,c){return!this._areCoordinatesEqual(p,this._state.start)||!this._areCoordinatesEqual(b,this._state.end)||w!==this._state.columnSelectMode||c!==this._state.ydisp}_areCoordinatesEqual(p,b){return!(!p||!b)&&p[0]===b[0]&&p[1]===b[1]}}n.SelectionRenderLayer=_},744:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextRenderLayer=void 0;const f=u(577),_=u(147),a=u(782),p=u(855),b=u(903),w=u(574);class c extends b.BaseRenderLayer{constructor(h,o,l,S,x,v,y,m,C,L){super(h,o,"text",l,S,L,x,v,m,C),this._characterJoinerService=y,this._characterWidth=0,this._characterFont="",this._characterOverlapCache={},this._workCell=new a.CellData,this._state=new w.GridCache,this.register(v.onSpecificOptionChange("allowTransparency",(A=>this._setTransparency(A))))}resize(h){super.resize(h);const o=this._getFont(!1,!1);this._characterWidth===h.device.char.width&&this._characterFont===o||(this._characterWidth=h.device.char.width,this._characterFont=o,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)}reset(){this._state.clear(),this._clearAll()}_forEachCell(h,o,l){for(let S=h;S<=o;S++){const x=S+this._bufferService.buffer.ydisp,v=this._bufferService.buffer.lines.get(x),y=this._characterJoinerService.getJoinedCharacters(x);for(let m=0;m<this._bufferService.cols;m++){v.loadCell(m,this._workCell);let C=this._workCell,L=!1,A=m;if(C.getWidth()!==0){if(y.length>0&&m===y[0][0]){L=!0;const E=y.shift();C=new f.JoinedCellData(this._workCell,v.translateToString(!0,E[0],E[1]),E[1]-E[0]),A=E[1]-1}!L&&this._isOverlapping(C)&&A<v.length-1&&v.getCodePoint(A+1)===p.NULL_CELL_CODE&&(C.content&=-12582913,C.content|=8388608),l(C,m,S),m=A}}}}_drawBackground(h,o){const l=this._ctx,S=this._bufferService.cols;let x=0,v=0,y=null;l.save(),this._forEachCell(h,o,((m,C,L)=>{let A=null;m.isInverse()?A=m.isFgDefault()?this._themeService.colors.foreground.css:m.isFgRGB()?`rgb(${_.AttributeData.toColorRGB(m.getFgColor()).join(",")})`:this._themeService.colors.ansi[m.getFgColor()].css:m.isBgRGB()?A=`rgb(${_.AttributeData.toColorRGB(m.getBgColor()).join(",")})`:m.isBgPalette()&&(A=this._themeService.colors.ansi[m.getBgColor()].css);let E=!1;this._decorationService.forEachDecorationAtCell(C,this._bufferService.buffer.ydisp+L,void 0,(D=>{D.options.layer!=="top"&&E||(D.backgroundColorRGB&&(A=D.backgroundColorRGB.css),E=D.options.layer==="top")})),y===null&&(x=C,v=L),L!==v?(l.fillStyle=y||"",this._fillCells(x,v,S-x,1),x=C,v=L):y!==A&&(l.fillStyle=y||"",this._fillCells(x,v,C-x,1),x=C,v=L),y=A})),y!==null&&(l.fillStyle=y,this._fillCells(x,v,S-x,1)),l.restore()}_drawForeground(h,o){this._forEachCell(h,o,((l,S,x)=>this._drawChars(l,S,x)))}handleGridChanged(h,o){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,h,this._bufferService.cols,o-h+1),this._drawBackground(h,o),this._drawForeground(h,o))}_isOverlapping(h){if(h.getWidth()!==1||h.getCode()<256)return!1;const o=h.getChars();if(this._characterOverlapCache.hasOwnProperty(o))return this._characterOverlapCache[o];this._ctx.save(),this._ctx.font=this._characterFont;const l=Math.floor(this._ctx.measureText(o).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[o]=l,l}}n.TextRenderLayer=c},274:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellColorResolver=void 0;const f=u(855),_=u(160),a=u(374);let p,b=0,w=0,c=!1,r=!1,h=!1,o=0;n.CellColorResolver=class{constructor(l,S,x,v,y,m){this._terminal=l,this._optionService=S,this._selectionRenderModel=x,this._decorationService=v,this._coreBrowserService=y,this._themeService=m,this.result={fg:0,bg:0,ext:0}}resolve(l,S,x,v){if(this.result.bg=l.bg,this.result.fg=l.fg,this.result.ext=268435456&l.bg?l.extended.ext:0,w=0,b=0,r=!1,c=!1,h=!1,p=this._themeService.colors,o=0,l.getCode()!==f.NULL_CELL_CODE&&l.extended.underlineStyle===4){const y=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));o=S*v%(2*Math.round(y))}if(this._decorationService.forEachDecorationAtCell(S,x,"bottom",(y=>{y.backgroundColorRGB&&(w=y.backgroundColorRGB.rgba>>8&16777215,r=!0),y.foregroundColorRGB&&(b=y.foregroundColorRGB.rgba>>8&16777215,c=!0)})),h=this._selectionRenderModel.isCellSelected(this._terminal,S,x),h){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:w=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:w=(16777215&this.result.fg)<<8|255;break;default:w=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:w=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:w=(16777215&this.result.bg)<<8|255}w=_.rgba.blend(w,4294967040&(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else w=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(r=!0,p.selectionForeground&&(b=p.selectionForeground.rgba>>8&16777215,c=!0),(0,a.treatGlyphAsBackgroundColor)(l.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)b=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:b=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:b=(16777215&this.result.fg)<<8|255;break;default:b=this._themeService.colors.foreground.rgba}b=_.rgba.blend(b,4294967040&(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}c=!0}}this._decorationService.forEachDecorationAtCell(S,x,"top",(y=>{y.backgroundColorRGB&&(w=y.backgroundColorRGB.rgba>>8&16777215,r=!0),y.foregroundColorRGB&&(b=y.foregroundColorRGB.rgba>>8&16777215,c=!0)})),r&&(w=h?-16777216&l.bg&-134217729|w|50331648:-16777216&l.bg|w|50331648),c&&(b=-16777216&l.fg&-67108865|b|50331648),67108864&this.result.fg&&(r&&!c&&(b=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&p.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,c=!0),!r&&c&&(w=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&p.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,r=!0)),p=void 0,this.result.bg=r?w:this.result.bg,this.result.fg=c?b:this.result.fg,this.result.ext&=536870911,this.result.ext|=o<<29&3758096384}}},627:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.removeTerminalFromCache=n.acquireTextureAtlas=void 0;const f=u(509),_=u(197),a=[];n.acquireTextureAtlas=function(p,b,w,c,r,h,o,l){const S=(0,_.generateConfig)(c,r,h,o,b,w,l);for(let y=0;y<a.length;y++){const m=a[y],C=m.ownedBy.indexOf(p);if(C>=0){if((0,_.configEquals)(m.config,S))return m.atlas;m.ownedBy.length===1?(m.atlas.dispose(),a.splice(y,1)):m.ownedBy.splice(C,1);break}}for(let y=0;y<a.length;y++){const m=a[y];if((0,_.configEquals)(m.config,S))return m.ownedBy.push(p),m.atlas}const x=p._core,v={atlas:new f.TextureAtlas(document,S,x.unicodeService),config:S,ownedBy:[p]};return a.push(v),v.atlas},n.removeTerminalFromCache=function(p){for(let b=0;b<a.length;b++){const w=a[b].ownedBy.indexOf(p);if(w!==-1){a[b].ownedBy.length===1?(a[b].atlas.dispose(),a.splice(b,1)):a[b].ownedBy.splice(w,1);break}}}},197:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.is256Color=n.configEquals=n.generateConfig=void 0;const f=u(160);n.generateConfig=function(_,a,p,b,w,c,r){const h={foreground:c.foreground,background:c.background,cursor:f.NULL_COLOR,cursorAccent:f.NULL_COLOR,selectionForeground:f.NULL_COLOR,selectionBackgroundTransparent:f.NULL_COLOR,selectionBackgroundOpaque:f.NULL_COLOR,selectionInactiveBackgroundTransparent:f.NULL_COLOR,selectionInactiveBackgroundOpaque:f.NULL_COLOR,ansi:c.ansi.slice(),contrastCache:c.contrastCache,halfContrastCache:c.halfContrastCache};return{customGlyphs:w.customGlyphs,devicePixelRatio:r,letterSpacing:w.letterSpacing,lineHeight:w.lineHeight,deviceCellWidth:_,deviceCellHeight:a,deviceCharWidth:p,deviceCharHeight:b,fontFamily:w.fontFamily,fontSize:w.fontSize,fontWeight:w.fontWeight,fontWeightBold:w.fontWeightBold,allowTransparency:w.allowTransparency,drawBoldTextInBrightColors:w.drawBoldTextInBrightColors,minimumContrastRatio:w.minimumContrastRatio,colors:h}},n.configEquals=function(_,a){for(let p=0;p<_.colors.ansi.length;p++)if(_.colors.ansi[p].rgba!==a.colors.ansi[p].rgba)return!1;return _.devicePixelRatio===a.devicePixelRatio&&_.customGlyphs===a.customGlyphs&&_.lineHeight===a.lineHeight&&_.letterSpacing===a.letterSpacing&&_.fontFamily===a.fontFamily&&_.fontSize===a.fontSize&&_.fontWeight===a.fontWeight&&_.fontWeightBold===a.fontWeightBold&&_.allowTransparency===a.allowTransparency&&_.deviceCharWidth===a.deviceCharWidth&&_.deviceCharHeight===a.deviceCharHeight&&_.drawBoldTextInBrightColors===a.drawBoldTextInBrightColors&&_.minimumContrastRatio===a.minimumContrastRatio&&_.colors.foreground.rgba===a.colors.foreground.rgba&&_.colors.background.rgba===a.colors.background.rgba},n.is256Color=function(_){return(50331648&_)==16777216||(50331648&_)==33554432}},237:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const f=u(399);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},457:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorBlinkStateManager=void 0,n.CursorBlinkStateManager=class{constructor(u,f){this._renderCallback=u,this._coreBrowserService=f,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(u=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const f=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,f>0)return void this._restartInterval(f)}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 f=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(f)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),u)}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:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tryDrawCustomChar=n.powerlineDefinitions=n.boxDrawingDefinitions=n.blockElementDefinitions=void 0;const f=u(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 _={"░":[[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:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"║":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╒":{1:(c,r)=>`M.5,1 L.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╓":{1:(c,r)=>`M${.5-c},1 L${.5-c},.5 L1,.5 M${.5+c},.5 L${.5+c},1`},"╔":{1:(c,r)=>`M1,${.5-r} L${.5-c},${.5-r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1`},"╕":{1:(c,r)=>`M0,${.5-r} L.5,${.5-r} L.5,1 M0,${.5+r} L.5,${.5+r}`},"╖":{1:(c,r)=>`M${.5+c},1 L${.5+c},.5 L0,.5 M${.5-c},.5 L${.5-c},1`},"╗":{1:(c,r)=>`M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M0,${.5-r} L${.5+c},${.5-r} L${.5+c},1`},"╘":{1:(c,r)=>`M.5,0 L.5,${.5+r} L1,${.5+r} M.5,${.5-r} L1,${.5-r}`},"╙":{1:(c,r)=>`M1,.5 L${.5-c},.5 L${.5-c},0 M${.5+c},.5 L${.5+c},0`},"╚":{1:(c,r)=>`M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0 M1,${.5+r} L${.5-c},${.5+r} L${.5-c},0`},"╛":{1:(c,r)=>`M0,${.5+r} L.5,${.5+r} L.5,0 M0,${.5-r} L.5,${.5-r}`},"╜":{1:(c,r)=>`M0,.5 L${.5+c},.5 L${.5+c},0 M${.5-c},.5 L${.5-c},0`},"╝":{1:(c,r)=>`M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M0,${.5+r} L${.5+c},${.5+r} L${.5+c},0`},"╞":{1:(c,r)=>`M.5,0 L.5,1 M.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╟":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1 M${.5+c},.5 L1,.5`},"╠":{1:(c,r)=>`M${.5-c},0 L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0`},"╡":{1:(c,r)=>`M.5,0 L.5,1 M0,${.5-r} L.5,${.5-r} M0,${.5+r} L.5,${.5+r}`},"╢":{1:(c,r)=>`M0,.5 L${.5-c},.5 M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╣":{1:(c,r)=>`M${.5+c},0 L${.5+c},1 M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0`},"╤":{1:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r} M.5,${.5+r} L.5,1`},"╥":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},.5 L${.5-c},1 M${.5+c},.5 L${.5+c},1`},"╦":{1:(c,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1`},"╧":{1:(c,r)=>`M.5,0 L.5,${.5-r} M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╨":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},.5 L${.5-c},0 M${.5+c},.5 L${.5+c},0`},"╩":{1:(c,r)=>`M0,${.5+r} L1,${.5+r} M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},0`},"╪":{1:(c,r)=>`M.5,0 L.5,1 M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╫":{1:(c,r)=>`M0,.5 L1,.5 M${.5-c},0 L${.5-c},1 M${.5+c},0 L${.5+c},1`},"╬":{1:(c,r)=>`M0,${.5+r} L${.5-c},${.5+r} L${.5-c},1 M1,${.5+r} L${.5+c},${.5+r} L${.5+c},1 M0,${.5-r} L${.5-c},${.5-r} L${.5-c},0 M1,${.5-r} L${.5+c},${.5-r} L${.5+c},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:(c,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,1,.5`},"╮":{1:(c,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,0,.5`},"╯":{1:(c,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,0,.5`},"╰":{1:(c,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.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(c,r,h,o,l,S,x,v){const y=n.blockElementDefinitions[r];if(y)return(function(A,E,D,O,F,N){for(let I=0;I<E.length;I++){const P=E[I],R=F/8,B=N/8;A.fillRect(D+P.x*R,O+P.y*B,P.w*R,P.h*B)}})(c,y,h,o,l,S),!0;const m=_[r];if(m)return(function(A,E,D,O,F,N){let I=a.get(E);I||(I=new Map,a.set(E,I));const P=A.fillStyle;if(typeof P!="string")throw new Error(`Unexpected fillStyle type "${P}"`);let R=I.get(P);if(!R){const B=E[0].length,T=E.length,H=A.canvas.ownerDocument.createElement("canvas");H.width=B,H.height=T;const V=(0,f.throwIfFalsy)(H.getContext("2d")),Q=new ImageData(B,T);let ue,de,q,z;if(P.startsWith("#"))ue=parseInt(P.slice(1,3),16),de=parseInt(P.slice(3,5),16),q=parseInt(P.slice(5,7),16),z=P.length>7&&parseInt(P.slice(7,9),16)||1;else{if(!P.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${P}" when drawing pattern glyph`);[ue,de,q,z]=P.substring(5,P.length-1).split(",").map((se=>parseFloat(se)))}for(let se=0;se<T;se++)for(let ie=0;ie<B;ie++)Q.data[4*(se*B+ie)]=ue,Q.data[4*(se*B+ie)+1]=de,Q.data[4*(se*B+ie)+2]=q,Q.data[4*(se*B+ie)+3]=E[se][ie]*(255*z);V.putImageData(Q,0,0),R=(0,f.throwIfFalsy)(A.createPattern(H,null)),I.set(P,R)}A.fillStyle=R,A.fillRect(D,O,F,N)})(c,m,h,o,l,S),!0;const C=n.boxDrawingDefinitions[r];if(C)return(function(A,E,D,O,F,N,I){A.strokeStyle=A.fillStyle;for(const[P,R]of Object.entries(E)){let B;A.beginPath(),A.lineWidth=I*Number.parseInt(P),B=typeof R=="function"?R(.15,.15/N*F):R;for(const T of B.split(" ")){const H=T[0],V=b[H];if(!V){console.error(`Could not find drawing instructions for "${H}"`);continue}const Q=T.substring(1).split(",");Q[0]&&Q[1]&&V(A,w(Q,F,N,D,O,!0,I))}A.stroke(),A.closePath()}})(c,C,h,o,l,S,v),!0;const L=n.powerlineDefinitions[r];return!!L&&((function(A,E,D,O,F,N,I,P){const R=new Path2D;R.rect(D,O,F,N),A.clip(R),A.beginPath();const B=I/12;A.lineWidth=P*B;for(const T of E.d.split(" ")){const H=T[0],V=b[H];if(!V){console.error(`Could not find drawing instructions for "${H}"`);continue}const Q=T.substring(1).split(",");Q[0]&&Q[1]&&V(A,w(Q,F,N,D,O,!1,P,(E.leftPadding??0)*(B/2),(E.rightPadding??0)*(B/2)))}E.type===1?(A.strokeStyle=A.fillStyle,A.stroke()):A.fill(),A.closePath()})(c,L,h,o,l,S,x,v),!0)};const a=new Map;function p(c,r,h=0){return Math.max(Math.min(c,r),h)}const b={C:(c,r)=>c.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]),L:(c,r)=>c.lineTo(r[0],r[1]),M:(c,r)=>c.moveTo(r[0],r[1])};function w(c,r,h,o,l,S,x,v=0,y=0){const m=c.map((C=>parseFloat(C)||parseInt(C)));if(m.length<2)throw new Error("Too few arguments for instruction");for(let C=0;C<m.length;C+=2)m[C]*=r-v*x-y*x,S&&m[C]!==0&&(m[C]=p(Math.round(m[C]+.5)-.5,r,0)),m[C]+=o+v*x;for(let C=1;C<m.length;C+=2)m[C]*=h,S&&m[C]!==0&&(m[C]=p(Math.round(m[C]+.5)-.5,h,0)),m[C]+=l;return m}},56:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.observeDevicePixelDimensions=void 0;const f=u(859);n.observeDevicePixelDimensions=function(_,a,p){let b=new a.ResizeObserver((w=>{const c=w.find((o=>o.target===_));if(!c)return;if(!("devicePixelContentBoxSize"in c))return b==null||b.disconnect(),void(b=void 0);const r=c.devicePixelContentBoxSize[0].inlineSize,h=c.devicePixelContentBoxSize[0].blockSize;r>0&&h>0&&p(r,h)}));try{b.observe(_,{box:["device-pixel-content-box"]})}catch{b.disconnect(),b=void 0}return(0,f.toDisposable)((()=>b==null?void 0:b.disconnect()))}},374:($,n)=>{function u(_){return 57508<=_&&_<=57558}function f(_){return _>=128512&&_<=128591||_>=127744&&_<=128511||_>=128640&&_<=128767||_>=9728&&_<=9983||_>=9984&&_<=10175||_>=65024&&_<=65039||_>=129280&&_<=129535||_>=127462&&_<=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(_){if(!_)throw new Error("value must not be falsy");return _},n.isPowerlineGlyph=u,n.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},n.isEmoji=f,n.allowRescaling=function(_,a,p,b){return a===1&&p>Math.ceil(1.5*b)&&_!==void 0&&_>255&&!f(_)&&!u(_)&&!(function(w){return 57344<=w&&w<=63743})(_)},n.treatGlyphAsBackgroundColor=function(_){return u(_)||(function(a){return 9472<=a&&a<=9631})(_)},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(_,a,p=0){return(_-(2*Math.round(a)-p))%(2*Math.round(a))}},296:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(_,a,p,b=!1){if(this.selectionStart=a,this.selectionEnd=p,!a||!p||a[0]===p[0]&&a[1]===p[1])return void this.clear();const w=_.buffers.active.ydisp,c=a[1]-w,r=p[1]-w,h=Math.max(c,0),o=Math.min(r,_.rows-1);h>=_.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=b,this.viewportStartRow=c,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=o,this.startCol=a[0],this.endCol=p[0])}isCellSelected(_,a,p){return!!this.hasSelection&&(p-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?a>=this.startCol&&p>=this.viewportCappedStartRow&&a<this.endCol&&p<=this.viewportCappedEndRow:a<this.startCol&&p>=this.viewportCappedStartRow&&a>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol)}}n.createSelectionRenderModel=function(){return new u}},509:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextureAtlas=void 0;const f=u(237),_=u(860),a=u(374),p=u(160),b=u(345),w=u(485),c=u(385),r=u(147),h=u(855),o={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 l;class S{get pages(){return this._pages}constructor(C,L,A){this._document=C,this._config=L,this._unicodeService=A,this._didWarmUp=!1,this._cacheMap=new w.FourKeyMap,this._cacheMapCombined=new w.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new r.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new b.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new b.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=y(C,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,a.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const C of this.pages)C.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const C=new c.IdleTaskQueue;for(let L=33;L<126;L++)C.enqueue((()=>{if(!this._cacheMap.get(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT)){const A=this._drawToCache(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT);this._cacheMap.set(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT,A)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const C of this._pages)C.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(S.maxAtlasPages&&this._pages.length>=Math.max(4,S.maxAtlasPages)){const L=this._pages.filter((I=>2*I.canvas.width<=(S.maxTextureSize||4096))).sort(((I,P)=>P.canvas.width!==I.canvas.width?P.canvas.width-I.canvas.width:P.percentageUsed-I.percentageUsed));let A=-1,E=0;for(let I=0;I<L.length;I++)if(L[I].canvas.width!==E)A=I,E=L[I].canvas.width;else if(I-A==3)break;const D=L.slice(A,A+4),O=D.map((I=>I.glyphs[0].texturePage)).sort(((I,P)=>I>P?1:-1)),F=this.pages.length-D.length,N=this._mergePages(D,F);N.version++;for(let I=O.length-1;I>=0;I--)this._deletePage(O[I]);this.pages.push(N),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(N.canvas)}const C=new x(this._document,this._textureSize);return this._pages.push(C),this._activePages.push(C),this._onAddTextureAtlasCanvas.fire(C.canvas),C}_mergePages(C,L){const A=2*C[0].canvas.width,E=new x(this._document,A,C);for(const[D,O]of C.entries()){const F=D*O.canvas.width%A,N=Math.floor(D/2)*O.canvas.height;E.ctx.drawImage(O.canvas,F,N);for(const P of O.glyphs)P.texturePage=L,P.sizeClipSpace.x=P.size.x/A,P.sizeClipSpace.y=P.size.y/A,P.texturePosition.x+=F,P.texturePosition.y+=N,P.texturePositionClipSpace.x=P.texturePosition.x/A,P.texturePositionClipSpace.y=P.texturePosition.y/A;this._onRemoveTextureAtlasCanvas.fire(O.canvas);const I=this._activePages.indexOf(O);I!==-1&&this._activePages.splice(I,1)}return E}_deletePage(C){this._pages.splice(C,1);for(let L=C;L<this._pages.length;L++){const A=this._pages[L];for(const E of A.glyphs)E.texturePage--;A.version++}}getRasterizedGlyphCombinedChar(C,L,A,E,D){return this._getFromCacheMap(this._cacheMapCombined,C,L,A,E,D)}getRasterizedGlyph(C,L,A,E,D){return this._getFromCacheMap(this._cacheMap,C,L,A,E,D)}_getFromCacheMap(C,L,A,E,D,O=!1){return l=C.get(L,A,E,D),l||(l=this._drawToCache(L,A,E,D,O),C.set(L,A,E,D,l)),l}_getColorFromAnsiIndex(C){if(C>=this._config.colors.ansi.length)throw new Error("No color found for idx "+C);return this._config.colors.ansi[C]}_getBackgroundColor(C,L,A,E){if(this._config.allowTransparency)return p.NULL_COLOR;let D;switch(C){case 16777216:case 33554432:D=this._getColorFromAnsiIndex(L);break;case 50331648:const O=r.AttributeData.toColorRGB(L);D=p.channels.toColor(O[0],O[1],O[2]);break;default:D=A?p.color.opaque(this._config.colors.foreground):this._config.colors.background}return D}_getForegroundColor(C,L,A,E,D,O,F,N,I,P){const R=this._getMinimumContrastColor(C,L,A,E,D,O,F,I,N,P);if(R)return R;let B;switch(D){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&I&&O<8&&(O+=8),B=this._getColorFromAnsiIndex(O);break;case 50331648:const T=r.AttributeData.toColorRGB(O);B=p.channels.toColor(T[0],T[1],T[2]);break;default:B=F?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(B=p.color.opaque(B)),N&&(B=p.color.multiplyOpacity(B,f.DIM_OPACITY)),B}_resolveBackgroundRgba(C,L,A){switch(C){case 16777216:case 33554432:return this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return A?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(C,L,A,E){switch(C){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&E&&L<8&&(L+=8),this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return A?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(C,L,A,E,D,O,F,N,I,P){if(this._config.minimumContrastRatio===1||P)return;const R=this._getContrastCache(I),B=R.getColor(C,E);if(B!==void 0)return B||void 0;const T=this._resolveBackgroundRgba(L,A,F),H=this._resolveForegroundRgba(D,O,F,N),V=p.rgba.ensureContrastRatio(T,H,this._config.minimumContrastRatio/(I?2:1));if(!V)return void R.setColor(C,E,null);const Q=p.channels.toColor(V>>24&255,V>>16&255,V>>8&255);return R.setColor(C,E,Q),Q}_getContrastCache(C){return C?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(C,L,A,E,D=!1){const O=typeof C=="number"?String.fromCharCode(C):C,F=Math.min(this._config.deviceCellWidth*Math.max(O.length,2)+4,this._textureSize);this._tmpCanvas.width<F&&(this._tmpCanvas.width=F);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=A,this._workAttributeData.bg=L,this._workAttributeData.extended.ext=E,this._workAttributeData.isInvisible())return o;const I=!!this._workAttributeData.isBold(),P=!!this._workAttributeData.isInverse(),R=!!this._workAttributeData.isDim(),B=!!this._workAttributeData.isItalic(),T=!!this._workAttributeData.isUnderline(),H=!!this._workAttributeData.isStrikethrough(),V=!!this._workAttributeData.isOverline();let Q=this._workAttributeData.getFgColor(),ue=this._workAttributeData.getFgColorMode(),de=this._workAttributeData.getBgColor(),q=this._workAttributeData.getBgColorMode();if(P){const ce=Q;Q=de,de=ce;const ge=ue;ue=q,q=ge}const z=this._getBackgroundColor(q,de,P,R);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const se=I?this._config.fontWeightBold:this._config.fontWeight,ie=B?"italic":"";this._tmpCtx.font=`${ie} ${se} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=f.TEXT_BASELINE;const ve=O.length===1&&(0,a.isPowerlineGlyph)(O.charCodeAt(0)),fe=O.length===1&&(0,a.isRestrictedPowerlineGlyph)(O.charCodeAt(0)),Me=this._getForegroundColor(L,q,de,A,ue,Q,P,R,I,(0,a.treatGlyphAsBackgroundColor)(O.charCodeAt(0)));this._tmpCtx.fillStyle=Me.css;const _e=fe?0:4;let Oe=!1;this._config.customGlyphs!==!1&&(Oe=(0,_.tryDrawCustomChar)(this._tmpCtx,O,_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let qe,be=!ve;if(qe=typeof C=="number"?this._unicodeService.wcwidth(C):this._unicodeService.getStringCellWidth(C),T){this._tmpCtx.save();const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=ce%2==1?.5:0;if(this._tmpCtx.lineWidth=ce,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())be=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{be=!1;let Ie=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Ie<8&&(Ie+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Ie).css}this._tmpCtx.beginPath();const ze=_e,Re=Math.ceil(_e+this._config.deviceCharHeight)-ge-(D?2*ce:0),_t=Re+ce,Qe=Re+2*ce;let it=this._workAttributeData.getUnderlineVariantOffset();for(let Ie=0;Ie<qe;Ie++){this._tmpCtx.save();const Ae=ze+Ie*this._config.deviceCellWidth,Le=ze+(Ie+1)*this._config.deviceCellWidth,xt=Ae+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Le,Re),this._tmpCtx.moveTo(Ae,Qe),this._tmpCtx.lineTo(Le,Qe);break;case 3:const tt=ce<=1?Qe:Math.ceil(_e+this._config.deviceCharHeight-ce/2)-ge,vt=ce<=1?Re:Math.ceil(_e+this._config.deviceCharHeight+ce/2)-ge,ut=new Path2D;ut.rect(Ae,Re,this._config.deviceCellWidth,Qe-Re),this._tmpCtx.clip(ut),this._tmpCtx.moveTo(Ae-this._config.deviceCellWidth/2,_t),this._tmpCtx.bezierCurveTo(Ae-this._config.deviceCellWidth/2,vt,Ae,vt,Ae,_t),this._tmpCtx.bezierCurveTo(Ae,tt,xt,tt,xt,_t),this._tmpCtx.bezierCurveTo(xt,vt,Le,vt,Le,_t),this._tmpCtx.bezierCurveTo(Le,tt,Le+this._config.deviceCellWidth/2,tt,Le+this._config.deviceCellWidth/2,_t);break;case 4:const Zt=it===0?0:it>=ce?2*ce-it:ce-it;it>=ce||Zt===0?(this._tmpCtx.setLineDash([Math.round(ce),Math.round(ce)]),this._tmpCtx.moveTo(Ae+Zt,Re),this._tmpCtx.lineTo(Le,Re)):(this._tmpCtx.setLineDash([Math.round(ce),Math.round(ce)]),this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Ae+Zt,Re),this._tmpCtx.moveTo(Ae+Zt+ce,Re),this._tmpCtx.lineTo(Le,Re)),it=(0,a.computeNextVariantOffset)(Le-Ae,ce,it);break;case 5:const tr=.6,ir=.3,jt=Le-Ae,si=Math.floor(tr*jt),ri=Math.floor(ir*jt),Jt=jt-si-ri;this._tmpCtx.setLineDash([si,ri,Jt]),this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Le,Re);break;default:this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Le,Re)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Oe&&this._config.fontSize>=12&&!this._config.allowTransparency&&O!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Ie=this._tmpCtx.measureText(O);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Ie&&Ie.actualBoundingBoxDescent>0){this._tmpCtx.save();const Ae=new Path2D;Ae.rect(ze,Re-Math.ceil(ce/2),this._config.deviceCellWidth*qe,Qe-Re+Math.ceil(ce/2)),this._tmpCtx.clip(Ae),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=z.css,this._tmpCtx.strokeText(O,_e,_e+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(V){const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=ce%2==1?.5:0;this._tmpCtx.lineWidth=ce,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(_e,_e+ge),this._tmpCtx.lineTo(_e+this._config.deviceCharWidth*qe,_e+ge),this._tmpCtx.stroke()}if(Oe||this._tmpCtx.fillText(O,_e,_e+this._config.deviceCharHeight),O==="_"&&!this._config.allowTransparency){let ce=v(this._tmpCtx.getImageData(_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Me,be);if(ce)for(let ge=1;ge<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(O,_e,_e+this._config.deviceCharHeight-ge),ce=v(this._tmpCtx.getImageData(_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Me,be),ce);ge++);}if(H){const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),ge=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=ce,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(_e,_e+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.lineTo(_e+this._config.deviceCharWidth*qe,_e+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.stroke()}this._tmpCtx.restore();const ft=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Ot;if(Ot=this._config.allowTransparency?(function(ce){for(let ge=0;ge<ce.data.length;ge+=4)if(ce.data[ge+3]>0)return!1;return!0})(ft):v(ft,z,Me,be),Ot)return o;const Se=this._findGlyphBoundingBox(ft,this._workBoundingBox,F,fe,Oe,_e);let pe,me;for(;;){if(this._activePages.length===0){const ce=this._createNewPage();pe=ce,me=ce.currentRow,me.height=Se.size.y;break}pe=this._activePages[this._activePages.length-1],me=pe.currentRow;for(const ce of this._activePages)Se.size.y<=ce.currentRow.height&&(pe=ce,me=ce.currentRow);for(let ce=this._activePages.length-1;ce>=0;ce--)for(const ge of this._activePages[ce].fixedRows)ge.height<=me.height&&Se.size.y<=ge.height&&(pe=this._activePages[ce],me=ge);if(me.y+Se.size.y>=pe.canvas.height||me.height>Se.size.y+2){let ce=!1;if(pe.currentRow.y+pe.currentRow.height+Se.size.y>=pe.canvas.height){let ge;for(const ze of this._activePages)if(ze.currentRow.y+ze.currentRow.height+Se.size.y<ze.canvas.height){ge=ze;break}if(ge)pe=ge;else if(S.maxAtlasPages&&this._pages.length>=S.maxAtlasPages&&me.y+Se.size.y<=pe.canvas.height&&me.height>=Se.size.y&&me.x+Se.size.x<=pe.canvas.width)ce=!0;else{const ze=this._createNewPage();pe=ze,me=ze.currentRow,me.height=Se.size.y,ce=!0}}ce||(pe.currentRow.height>0&&pe.fixedRows.push(pe.currentRow),me={x:0,y:pe.currentRow.y+pe.currentRow.height,height:Se.size.y},pe.fixedRows.push(me),pe.currentRow={x:0,y:me.y+me.height,height:0})}if(me.x+Se.size.x<=pe.canvas.width)break;me===pe.currentRow?(me.x=0,me.y+=me.height,me.height=0):pe.fixedRows.splice(pe.fixedRows.indexOf(me),1)}return Se.texturePage=this._pages.indexOf(pe),Se.texturePosition.x=me.x,Se.texturePosition.y=me.y,Se.texturePositionClipSpace.x=me.x/pe.canvas.width,Se.texturePositionClipSpace.y=me.y/pe.canvas.height,Se.sizeClipSpace.x/=pe.canvas.width,Se.sizeClipSpace.y/=pe.canvas.height,me.height=Math.max(me.height,Se.size.y),me.x+=Se.size.x,pe.ctx.putImageData(ft,Se.texturePosition.x-this._workBoundingBox.left,Se.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Se.size.x,Se.size.y),pe.addGlyph(Se),pe.version++,Se}_findGlyphBoundingBox(C,L,A,E,D,O){L.top=0;const F=E?this._config.deviceCellHeight:this._tmpCanvas.height,N=E?this._config.deviceCellWidth:A;let I=!1;for(let P=0;P<F;P++){for(let R=0;R<N;R++){const B=P*this._tmpCanvas.width*4+4*R+3;if(C.data[B]!==0){L.top=P,I=!0;break}}if(I)break}L.left=0,I=!1;for(let P=0;P<O+N;P++){for(let R=0;R<F;R++){const B=R*this._tmpCanvas.width*4+4*P+3;if(C.data[B]!==0){L.left=P,I=!0;break}}if(I)break}L.right=N,I=!1;for(let P=O+N-1;P>=O;P--){for(let R=0;R<F;R++){const B=R*this._tmpCanvas.width*4+4*P+3;if(C.data[B]!==0){L.right=P,I=!0;break}}if(I)break}L.bottom=F,I=!1;for(let P=F-1;P>=0;P--){for(let R=0;R<N;R++){const B=P*this._tmpCanvas.width*4+4*R+3;if(C.data[B]!==0){L.bottom=P,I=!0;break}}if(I)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:L.right-L.left+1,y:L.bottom-L.top+1},sizeClipSpace:{x:L.right-L.left+1,y:L.bottom-L.top+1},offset:{x:-L.left+O+(E||D?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-L.top+O+(E||D?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}n.TextureAtlas=S;class x{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(C){this._glyphs.push(C),this._usedPixels+=C.size.x*C.size.y}constructor(C,L,A){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],A)for(const E of A)this._glyphs.push(...E.glyphs),this._usedPixels+=E._usedPixels;this.canvas=y(C,L,L),this.ctx=(0,a.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 v(m,C,L,A){const E=C.rgba>>>24,D=C.rgba>>>16&255,O=C.rgba>>>8&255,F=L.rgba>>>24,N=L.rgba>>>16&255,I=L.rgba>>>8&255,P=Math.floor((Math.abs(E-F)+Math.abs(D-N)+Math.abs(O-I))/12);let R=!0;for(let B=0;B<m.data.length;B+=4)m.data[B]===E&&m.data[B+1]===D&&m.data[B+2]===O||A&&Math.abs(m.data[B]-E)+Math.abs(m.data[B+1]-D)+Math.abs(m.data[B+2]-O)<P?m.data[B+3]=0:R=!1;return R}function y(m,C,L){const A=m.createElement("canvas");return A.width=C,A.height=L,A}},577:function($,n,u){var f=this&&this.__decorate||function(h,o,l,S){var x,v=arguments.length,y=v<3?o:S===null?S=Object.getOwnPropertyDescriptor(o,l):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(h,o,l,S);else for(var m=h.length-1;m>=0;m--)(x=h[m])&&(y=(v<3?x(y):v>3?x(o,l,y):x(o,l))||y);return v>3&&y&&Object.defineProperty(o,l,y),y},_=this&&this.__param||function(h,o){return function(l,S){o(l,S,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const a=u(147),p=u(855),b=u(782),w=u(97);class c extends a.AttributeData{constructor(o,l,S){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=l,this._width=S}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(o){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.JoinedCellData=c;let r=n.CharacterJoinerService=class hf{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new b.CellData}register(o){const l={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(l),l.id}deregister(o){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===o)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(o);if(!l||l.length===0)return[];const S=[],x=l.translateToString(!0);let v=0,y=0,m=0,C=l.getFg(0),L=l.getBg(0);for(let A=0;A<l.getTrimmedLength();A++)if(l.loadCell(A,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==C||this._workCell.bg!==L){if(A-v>1){const E=this._getJoinedRanges(x,m,y,l,v);for(let D=0;D<E.length;D++)S.push(E[D])}v=A,m=y,C=this._workCell.fg,L=this._workCell.bg}y+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-v>1){const A=this._getJoinedRanges(x,m,y,l,v);for(let E=0;E<A.length;E++)S.push(A[E])}return S}_getJoinedRanges(o,l,S,x,v){const y=o.substring(l,S);let m=[];try{m=this._characterJoiners[0].handler(y)}catch(C){console.error(C)}for(let C=1;C<this._characterJoiners.length;C++)try{const L=this._characterJoiners[C].handler(y);for(let A=0;A<L.length;A++)hf._mergeRanges(m,L[A])}catch(L){console.error(L)}return this._stringRangesToCellRanges(m,x,v),m}_stringRangesToCellRanges(o,l,S){let x=0,v=!1,y=0,m=o[x];if(m){for(let C=S;C<this._bufferService.cols;C++){const L=l.getWidth(C),A=l.getString(C).length||p.WHITESPACE_CELL_CHAR.length;if(L!==0){if(!v&&m[0]<=y&&(m[0]=C,v=!0),m[1]<=y){if(m[1]=C,m=o[++x],!m)break;m[0]<=y?(m[0]=C,v=!0):v=!1}y+=A}}m&&(m[1]=this._bufferService.cols)}}static _mergeRanges(o,l){let S=!1;for(let x=0;x<o.length;x++){const v=o[x];if(S){if(l[1]<=v[0])return o[x-1][1]=l[1],o;if(l[1]<=v[1])return o[x-1][1]=Math.max(l[1],v[1]),o.splice(x,1),o;o.splice(x,1),x--}else{if(l[1]<=v[0])return o.splice(x,0,l),o;if(l[1]<=v[1])return v[0]=Math.min(l[0],v[0]),o;l[0]<v[1]&&(v[0]=Math.min(l[0],v[0]),S=!0)}}return S?o[o.length-1][1]=l[1]:o.push(l),o}};n.CharacterJoinerService=r=f([_(0,w.IBufferService)],r)},160:($,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 u=0,f=0,_=0,a=0;var p,b,w,c,r;function h(l){const S=l.toString(16);return S.length<2?"0"+S:S}function o(l,S){return l<S?(S+.05)/(l+.05):(l+.05)/(S+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(S,x,v,y){return y!==void 0?`#${h(S)}${h(x)}${h(v)}${h(y)}`:`#${h(S)}${h(x)}${h(v)}`},l.toRgba=function(S,x,v,y=255){return(S<<24|x<<16|v<<8|y)>>>0},l.toColor=function(S,x,v,y){return{css:l.toCss(S,x,v,y),rgba:l.toRgba(S,x,v,y)}}})(p||(n.channels=p={})),(function(l){function S(x,v){return a=Math.round(255*v),[u,f,_]=r.toChannels(x.rgba),{css:p.toCss(u,f,_,a),rgba:p.toRgba(u,f,_,a)}}l.blend=function(x,v){if(a=(255&v.rgba)/255,a===1)return{css:v.css,rgba:v.rgba};const y=v.rgba>>24&255,m=v.rgba>>16&255,C=v.rgba>>8&255,L=x.rgba>>24&255,A=x.rgba>>16&255,E=x.rgba>>8&255;return u=L+Math.round((y-L)*a),f=A+Math.round((m-A)*a),_=E+Math.round((C-E)*a),{css:p.toCss(u,f,_),rgba:p.toRgba(u,f,_)}},l.isOpaque=function(x){return(255&x.rgba)==255},l.ensureContrastRatio=function(x,v,y){const m=r.ensureContrastRatio(x.rgba,v.rgba,y);if(m)return p.toColor(m>>24&255,m>>16&255,m>>8&255)},l.opaque=function(x){const v=(255|x.rgba)>>>0;return[u,f,_]=r.toChannels(v),{css:p.toCss(u,f,_),rgba:v}},l.opacity=S,l.multiplyOpacity=function(x,v){return a=255&x.rgba,S(x,a*v/255)},l.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(b||(n.color=b={})),(function(l){let S,x;try{const v=document.createElement("canvas");v.width=1,v.height=1;const y=v.getContext("2d",{willReadFrequently:!0});y&&(S=y,S.globalCompositeOperation="copy",x=S.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(v){if(v.match(/#[\da-f]{3,8}/i))switch(v.length){case 4:return u=parseInt(v.slice(1,2).repeat(2),16),f=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),p.toColor(u,f,_);case 5:return u=parseInt(v.slice(1,2).repeat(2),16),f=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),a=parseInt(v.slice(4,5).repeat(2),16),p.toColor(u,f,_,a);case 7:return{css:v,rgba:(parseInt(v.slice(1),16)<<8|255)>>>0};case 9:return{css:v,rgba:parseInt(v.slice(1),16)>>>0}}const y=v.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(y)return u=parseInt(y[1]),f=parseInt(y[2]),_=parseInt(y[3]),a=Math.round(255*(y[5]===void 0?1:parseFloat(y[5]))),p.toColor(u,f,_,a);if(!S||!x)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=x,S.fillStyle=v,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[u,f,_,a]=S.getImageData(0,0,1,1).data,a!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(u,f,_,a),css:v}}})(w||(n.css=w={})),(function(l){function S(x,v,y){const m=x/255,C=v/255,L=y/255;return .2126*(m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4))+.7152*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}l.relativeLuminance=function(x){return S(x>>16&255,x>>8&255,255&x)},l.relativeLuminance2=S})(c||(n.rgb=c={})),(function(l){function S(v,y,m){const C=v>>24&255,L=v>>16&255,A=v>>8&255;let E=y>>24&255,D=y>>16&255,O=y>>8&255,F=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));for(;F<m&&(E>0||D>0||O>0);)E-=Math.max(0,Math.ceil(.1*E)),D-=Math.max(0,Math.ceil(.1*D)),O-=Math.max(0,Math.ceil(.1*O)),F=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));return(E<<24|D<<16|O<<8|255)>>>0}function x(v,y,m){const C=v>>24&255,L=v>>16&255,A=v>>8&255;let E=y>>24&255,D=y>>16&255,O=y>>8&255,F=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));for(;F<m&&(E<255||D<255||O<255);)E=Math.min(255,E+Math.ceil(.1*(255-E))),D=Math.min(255,D+Math.ceil(.1*(255-D))),O=Math.min(255,O+Math.ceil(.1*(255-O))),F=o(c.relativeLuminance2(E,D,O),c.relativeLuminance2(C,L,A));return(E<<24|D<<16|O<<8|255)>>>0}l.blend=function(v,y){if(a=(255&y)/255,a===1)return y;const m=y>>24&255,C=y>>16&255,L=y>>8&255,A=v>>24&255,E=v>>16&255,D=v>>8&255;return u=A+Math.round((m-A)*a),f=E+Math.round((C-E)*a),_=D+Math.round((L-D)*a),p.toRgba(u,f,_)},l.ensureContrastRatio=function(v,y,m){const C=c.relativeLuminance(v>>8),L=c.relativeLuminance(y>>8);if(o(C,L)<m){if(L<C){const D=S(v,y,m),O=o(C,c.relativeLuminance(D>>8));if(O<m){const F=x(v,y,m);return O>o(C,c.relativeLuminance(F>>8))?D:F}return D}const A=x(v,y,m),E=o(C,c.relativeLuminance(A>>8));if(E<m){const D=S(v,y,m);return E>o(C,c.relativeLuminance(D>>8))?A:D}return A}},l.reduceLuminance=S,l.increaseLuminance=x,l.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=o},345:($,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=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===u)return void this._listeners.splice(f,1)}}})),this._event}fire(u,f){const _=[];for(let a=0;a<this._listeners.length;a++)_.push(this._listeners[a]);for(let a=0;a<_.length;a++)_[a].call(void 0,u,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(u,f){return u((_=>f.fire(_)))},n.runAndSubscribe=function(u,f){return f(void 0),u((_=>f(_)))}},859:($,n)=>{function u(f){for(const _ of f)_.dispose();f.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 f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const _=this._disposables.indexOf(f);_!==-1&&this._disposables.splice(_,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var _;this._isDisposed||f===this._value||((_=this._value)==null||_.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},n.toDisposable=function(f){return{dispose:f}},n.disposeArray=u,n.getDisposeArrayDisposable=function(f){return{dispose:()=>u(f)}}},485:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(_,a,p){this._data[_]||(this._data[_]={}),this._data[_][a]=p}get(_,a){return this._data[_]?this._data[_][a]:void 0}clear(){this._data={}}}n.TwoKeyMap=u,n.FourKeyMap=class{constructor(){this._data=new u}set(f,_,a,p,b){this._data.get(f,_)||this._data.set(f,_,new u),this._data.get(f,_).set(a,p,b)}get(f,_,a,p){var b;return(b=this._data.get(f,_))==null?void 0:b.get(a,p)}clear(){this._data.clear()}}},399:($,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 u=n.isNode?"node":navigator.userAgent,f=n.isNode?"node":navigator.platform;n.isFirefox=u.includes("Firefox"),n.isLegacyEdge=u.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(u),n.getSafariVersion=function(){if(!n.isSafari)return 0;const _=u.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),n.isIpad=f==="iPad",n.isIphone=f==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),n.isLinux=f.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(u)},385:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const f=u(399);class _{constructor(){this._tasks=[],this._i=0}enqueue(b){this._tasks.push(b),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(b){this._idleCallback=void 0;let w=0,c=0,r=b.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(w=Date.now(),this._tasks[this._i]()||this._i++,w=Math.max(1,Date.now()-w),c=Math.max(w,c),h=b.timeRemaining(),1.5*c>h)return r-w<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-w))}ms`),void this._start();r=h}this.clear()}}class a extends _{_requestCallback(b){return setTimeout((()=>b(this._createDeadline(16))))}_cancelCallback(b){clearTimeout(b)}_createDeadline(b){const w=Date.now()+b;return{timeRemaining:()=>Math.max(0,w-Date.now())}}}n.PriorityTaskQueue=a,n.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:a,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},147:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(a){return[a>>>16&255,a>>>8&255,255&a]}static fromColorRGB(a){return(255&a[0])<<16|(255&a[1])<<8|255&a[2]}clone(){const a=new u;return a.fg=this.fg,a.bg=this.bg,a.extended=this.extended.clone(),a}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=u;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(a){this._ext=a}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(a){this._ext&=-469762049,this._ext|=a<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(a){this._ext&=-67108864,this._ext|=67108863&a}get urlId(){return this._urlId}set urlId(a){this._urlId=a}get underlineVariantOffset(){const a=(3758096384&this._ext)>>29;return a<0?4294967288^a:a}set underlineVariantOffset(a){this._ext&=536870911,this._ext|=a<<29&3758096384}constructor(a=0,p=0){this._ext=0,this._urlId=0,this._ext=a,this._urlId=p}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=f},782:($,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const f=u(133),_=u(855),a=u(147);class p extends a.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new a.ExtendedAttrs,this.combinedData=""}static fromCharData(w){const c=new p;return c.setFromCharData(w),c}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(w){this.fg=w[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let c=!1;if(w[_.CHAR_DATA_CHAR_INDEX].length>2)c=!0;else if(w[_.CHAR_DATA_CHAR_INDEX].length===2){const r=w[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=w[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|w[_.CHAR_DATA_WIDTH_INDEX]<<22:c=!0}else c=!0}else this.content=w[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[_.CHAR_DATA_WIDTH_INDEX]<<22;c&&(this.combinedData=w[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|w[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=p},855:($,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:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},n.utf32ToString=function(u,f=0,_=u.length){let a="";for(let p=f;p<_;++p){let b=u[p];b>65535?(b-=65536,a+=String.fromCharCode(55296+(b>>10))+String.fromCharCode(b%1024+56320)):a+=String.fromCharCode(b)}return a},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,f){const _=u.length;if(!_)return 0;let a=0,p=0;if(this._interim){const b=u.charCodeAt(p++);56320<=b&&b<=57343?f[a++]=1024*(this._interim-55296)+b-56320+65536:(f[a++]=this._interim,f[a++]=b),this._interim=0}for(let b=p;b<_;++b){const w=u.charCodeAt(b);if(55296<=w&&w<=56319){if(++b>=_)return this._interim=w,a;const c=u.charCodeAt(b);56320<=c&&c<=57343?f[a++]=1024*(w-55296)+c-56320+65536:(f[a++]=w,f[a++]=c)}else w!==65279&&(f[a++]=w)}return a}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,f){const _=u.length;if(!_)return 0;let a,p,b,w,c=0,r=0,h=0;if(this.interim[0]){let S=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let v,y=0;for(;(v=63&this.interim[++y])&&y<4;)x<<=6,x|=v;const m=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,C=m-y;for(;h<C;){if(h>=_)return 0;if(v=u[h++],(192&v)!=128){h--,S=!0;break}this.interim[y++]=v,x<<=6,x|=63&v}S||(m===2?x<128?h--:f[c++]=x:m===3?x<2048||x>=55296&&x<=57343||x===65279||(f[c++]=x):x<65536||x>1114111||(f[c++]=x)),this.interim.fill(0)}const o=_-4;let l=h;for(;l<_;){for(;!(!(l<o)||128&(a=u[l])||128&(p=u[l+1])||128&(b=u[l+2])||128&(w=u[l+3]));)f[c++]=a,f[c++]=p,f[c++]=b,f[c++]=w,l+=4;if(a=u[l++],a<128)f[c++]=a;else if((224&a)==192){if(l>=_)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(r=(31&a)<<6|63&p,r<128){l--;continue}f[c++]=r}else if((240&a)==224){if(l>=_)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,c;if(b=u[l++],(192&b)!=128){l--;continue}if(r=(15&a)<<12|(63&p)<<6|63&b,r<2048||r>=55296&&r<=57343||r===65279)continue;f[c++]=r}else if((248&a)==240){if(l>=_)return this.interim[0]=a,c;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,c;if(b=u[l++],(192&b)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,this.interim[2]=b,c;if(w=u[l++],(192&w)!=128){l--;continue}if(r=(7&a)<<18|(63&p)<<12|(63&b)<<6|63&w,r<65536||r>1114111)continue;f[c++]=r}}return c}}},776:function($,n,u){var f=this&&this.__decorate||function(r,h,o,l){var S,x=arguments.length,v=x<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,o):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,h,o,l);else for(var y=r.length-1;y>=0;y--)(S=r[y])&&(v=(x<3?S(v):x>3?S(h,o,v):S(h,o))||v);return x>3&&v&&Object.defineProperty(h,o,v),v},_=this&&this.__param||function(r,h){return function(o,l){h(o,l,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const a=u(859),p=u(97),b={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let w,c=n.LogService=class extends a.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),w=this}_updateLogLevel(){this._logLevel=b[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let h=0;h<r.length;h++)typeof r[h]=="function"&&(r[h]=r[h]())}_log(r,h,o){this._evalLazyOptionalParams(o),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...o)}trace(r,...h){var o;this._logLevel<=p.LogLevelEnum.TRACE&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var o;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var o;this._logLevel<=p.LogLevelEnum.INFO&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var o;this._logLevel<=p.LogLevelEnum.WARN&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var o;this._logLevel<=p.LogLevelEnum.ERROR&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.error.bind(this._optionsService.options.logger))??console.error,r,h)}};n.LogService=c=f([_(0,p.IOptionsService)],c),n.setTraceLogger=function(r){w=r},n.traceCall=function(r,h,o){if(typeof o.value!="function")throw new Error("not supported");const l=o.value;o.value=function(...S){if(w.logLevel!==p.LogLevelEnum.TRACE)return l.apply(this,S);w.trace(`GlyphRenderer#${l.name}(${S.map((v=>JSON.stringify(v))).join(", ")})`);const x=l.apply(this,S);return w.trace(`GlyphRenderer#${l.name} return`,x),x}}},726:($,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const u="di$target",f="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(_){return _[f]||[]},n.createDecorator=function(_){if(n.serviceRegistry.has(_))return n.serviceRegistry.get(_);const a=function(p,b,w){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(c,r,h){r[u]===r?r[f].push({id:c,index:h}):(r[f]=[{id:c,index:h}],r[u]=r)})(a,p,w)};return a.toString=()=>_,n.serviceRegistry.set(_,a),a}},97:($,n,u)=>{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 f=u(726);var _;n.IBufferService=(0,f.createDecorator)("BufferService"),n.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),n.ICoreService=(0,f.createDecorator)("CoreService"),n.ICharsetService=(0,f.createDecorator)("CharsetService"),n.IInstantiationService=(0,f.createDecorator)("InstantiationService"),(function(a){a[a.TRACE=0]="TRACE",a[a.DEBUG=1]="DEBUG",a[a.INFO=2]="INFO",a[a.WARN=3]="WARN",a[a.ERROR=4]="ERROR",a[a.OFF=5]="OFF"})(_||(n.LogLevelEnum=_={})),n.ILogService=(0,f.createDecorator)("LogService"),n.IOptionsService=(0,f.createDecorator)("OptionsService"),n.IOscLinkService=(0,f.createDecorator)("OscLinkService"),n.IUnicodeService=(0,f.createDecorator)("UnicodeService"),n.IDecorationService=(0,f.createDecorator)("DecorationService")}},j={};function Z($){var n=j[$];if(n!==void 0)return n.exports;var u=j[$]={exports:{}};return X[$].call(u.exports,u,u.exports,Z),u.exports}var ne={};return(()=>{var $=ne;Object.defineProperty($,"__esModule",{value:!0}),$.CanvasAddon=void 0;const n=Z(345),u=Z(859),f=Z(776),_=Z(949);class a extends u.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 b;return(b=this._renderer)==null?void 0:b.textureAtlas}activate(b){const w=b._core;if(!b.element)return void this.register(w.onWillOpen((()=>this.activate(b))));this._terminal=b;const c=w.coreService,r=w.optionsService,h=w.screenElement,o=w.linkifier,l=w,S=l._bufferService,x=l._renderService,v=l._characterJoinerService,y=l._charSizeService,m=l._coreBrowserService,C=l._decorationService,L=l._logService,A=l._themeService;(0,f.setTraceLogger)(L),this._renderer=new _.CanvasRenderer(b,h,o,S,y,r,v,c,m,C,A),this.register((0,n.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,n.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),x.setRenderer(this._renderer),x.handleResize(S.cols,S.rows),this.register((0,u.toDisposable)((()=>{var E;x.setRenderer(this._terminal._core._createRenderer()),x.handleResize(b.cols,b.rows),(E=this._renderer)==null||E.dispose(),this._renderer=void 0})))}clearTextureAtlas(){var b;(b=this._renderer)==null||b.clearTextureAtlas()}}$.CanvasAddon=a})(),ne})()))})(No)),No.exports}var hg=cg();/**
114
+ }`)),this.register((0,_.toDisposable)((()=>E.deleteProgram(this._program)))),this._projectionLocation=(0,f.throwIfFalsy)(E.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=E.createVertexArray(),E.bindVertexArray(this._vertexArrayObject);const R=new Float32Array([0,0,1,0,0,1,1,1]),B=E.createBuffer();this.register((0,_.toDisposable)((()=>E.deleteBuffer(B)))),E.bindBuffer(E.ARRAY_BUFFER,B),E.bufferData(E.ARRAY_BUFFER,R,E.STATIC_DRAW),E.enableVertexAttribArray(3),E.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const $=new Uint8Array([0,1,2,3]),N=E.createBuffer();this.register((0,_.toDisposable)((()=>E.deleteBuffer(N)))),E.bindBuffer(E.ELEMENT_ARRAY_BUFFER,N),E.bufferData(E.ELEMENT_ARRAY_BUFFER,$,E.STATIC_DRAW),this._attributesBuffer=(0,f.throwIfFalsy)(E.createBuffer()),this.register((0,_.toDisposable)((()=>E.deleteBuffer(this._attributesBuffer)))),E.bindBuffer(E.ARRAY_BUFFER,this._attributesBuffer),E.enableVertexAttribArray(0),E.vertexAttribPointer(0,2,E.FLOAT,!1,w,0),E.vertexAttribDivisor(0,1),E.enableVertexAttribArray(1),E.vertexAttribPointer(1,2,E.FLOAT,!1,w,2*Float32Array.BYTES_PER_ELEMENT),E.vertexAttribDivisor(1,1),E.enableVertexAttribArray(2),E.vertexAttribPointer(2,4,E.FLOAT,!1,w,4*Float32Array.BYTES_PER_ELEMENT),E.vertexAttribDivisor(2,1),this._updateCachedColors(M.colors),this.register(this._themeService.onChangeColors((I=>{this._updateCachedColors(I),this._updateViewportRectangle()})))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(m){const C=this._gl;C.useProgram(this._program),C.bindVertexArray(this._vertexArrayObject),C.uniformMatrix4fv(this._projectionLocation,!1,p.PROJECTION_MATRIX),C.bindBuffer(C.ARRAY_BUFFER,this._attributesBuffer),C.bufferData(C.ARRAY_BUFFER,m.attributes,C.DYNAMIC_DRAW),C.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,C.UNSIGNED_BYTE,0,m.count)}handleResize(){this._updateViewportRectangle()}setDimensions(m){this._dimensions=m}_updateCachedColors(m){this._bgFloat=this._colorToFloat32Array(m.background),this._cursorFloat=this._colorToFloat32Array(m.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(m){const C=this._terminal,L=this._vertices;let M,E,R,B,$,N,I,F,D,O,T,H=1;for(M=0;M<C.rows;M++){for(R=-1,B=0,$=0,N=!1,E=0;E<C.cols;E++)I=(M*C.cols+E)*a.RENDER_MODEL_INDICIES_PER_CELL,F=m.cells[I+a.RENDER_MODEL_BG_OFFSET],D=m.cells[I+a.RENDER_MODEL_FG_OFFSET],O=!!(67108864&D),(F!==B||D!==$&&(N||O))&&((B!==0||N&&$!==0)&&(T=8*H++,this._updateRectangle(L,T,$,B,R,E,M)),R=E,B=F,$=D,N=O);(B!==0||N&&$!==0)&&(T=8*H++,this._updateRectangle(L,T,$,B,R,C.cols,M))}L.count=H}updateCursor(m){const C=this._verticesCursor,L=m.cursor;if(!L||L.style==="block")return void(C.count=0);let M,E=0;L.style!=="bar"&&L.style!=="outline"||(M=8*E++,this._addRectangleFloat(C.attributes,M,L.x*this._dimensions.device.cell.width,L.y*this._dimensions.device.cell.height,L.style==="bar"?L.dpr*L.cursorWidth:L.dpr,this._dimensions.device.cell.height,this._cursorFloat)),L.style!=="underline"&&L.style!=="outline"||(M=8*E++,this._addRectangleFloat(C.attributes,M,L.x*this._dimensions.device.cell.width,(L.y+1)*this._dimensions.device.cell.height-L.dpr,L.width*this._dimensions.device.cell.width,L.dpr,this._cursorFloat)),L.style==="outline"&&(M=8*E++,this._addRectangleFloat(C.attributes,M,L.x*this._dimensions.device.cell.width,L.y*this._dimensions.device.cell.height,L.width*this._dimensions.device.cell.width,L.dpr,this._cursorFloat),M=8*E++,this._addRectangleFloat(C.attributes,M,(L.x+L.width)*this._dimensions.device.cell.width-L.dpr,L.y*this._dimensions.device.cell.height,L.dpr,this._dimensions.device.cell.height,this._cursorFloat)),C.count=E}_updateRectangle(m,C,L,M,E,R,B){if(67108864&L)switch(50331648&L){case 16777216:case 33554432:o=this._themeService.colors.ansi[255&L].rgba;break;case 50331648:o=(16777215&L)<<8;break;default:o=this._themeService.colors.foreground.rgba}else switch(50331648&M){case 16777216:case 33554432:o=this._themeService.colors.ansi[255&M].rgba;break;case 50331648:o=(16777215&M)<<8;break;default:o=this._themeService.colors.background.rgba}m.attributes.length<C+4&&(m.attributes=(0,p.expandFloat32Array)(m.attributes,this._terminal.rows*this._terminal.cols*8)),r=E*this._dimensions.device.cell.width,h=B*this._dimensions.device.cell.height,c=(o>>24&255)/255,l=(o>>16&255)/255,S=(o>>8&255)/255,x=1,this._addRectangle(m.attributes,C,r,h,(R-E)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,c,l,S,x)}_addRectangle(m,C,L,M,E,R,B,$,N,I){m[C]=L/this._dimensions.device.canvas.width,m[C+1]=M/this._dimensions.device.canvas.height,m[C+2]=E/this._dimensions.device.canvas.width,m[C+3]=R/this._dimensions.device.canvas.height,m[C+4]=B,m[C+5]=$,m[C+6]=N,m[C+7]=I}_addRectangleFloat(m,C,L,M,E,R,B){m[C]=L/this._dimensions.device.canvas.width,m[C+1]=M/this._dimensions.device.canvas.height,m[C+2]=E/this._dimensions.device.canvas.width,m[C+3]=R/this._dimensions.device.canvas.height,m[C+4]=B[0],m[C+5]=B[1],m[C+6]=B[2],m[C+7]=B[3]}_colorToFloat32Array(m){return new Float32Array([(m.rgba>>24&255)/255,(m.rgba>>16&255)/255,(m.rgba>>8&255)/255,(255&m.rgba)/255])}}n.RectangleRenderer=v},310:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderModel=n.COMBINED_CHAR_BIT_MASK=n.RENDER_MODEL_EXT_OFFSET=n.RENDER_MODEL_FG_OFFSET=n.RENDER_MODEL_BG_OFFSET=n.RENDER_MODEL_INDICIES_PER_CELL=void 0;const f=u(296);n.RENDER_MODEL_INDICIES_PER_CELL=4,n.RENDER_MODEL_BG_OFFSET=1,n.RENDER_MODEL_FG_OFFSET=2,n.RENDER_MODEL_EXT_OFFSET=3,n.COMBINED_CHAR_BIT_MASK=2147483648,n.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,f.createSelectionRenderModel)()}resize(_,a){const p=_*a*n.RENDER_MODEL_INDICIES_PER_CELL;p!==this.cells.length&&(this.cells=new Uint32Array(p),this.lineLengths=new Uint32Array(a))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.JoinedCellData=n.WebglRenderer=void 0;const f=u(820),_=u(274),a=u(627),p=u(457),w=u(56),y=u(374),o=u(345),r=u(859),h=u(147),c=u(782),l=u(855),S=u(965),x=u(742),v=u(310),b=u(733);class m extends r.Disposable{constructor(E,R,B,$,N,I,F,D,O){super(),this._terminal=E,this._characterJoinerService=R,this._charSizeService=B,this._coreBrowserService=$,this._coreService=N,this._decorationService=I,this._optionsService=F,this._themeService=D,this._cursorBlinkStateManager=new r.MutableDisposable,this._charAtlasDisposable=this.register(new r.MutableDisposable),this._observerDisposable=this.register(new r.MutableDisposable),this._model=new v.RenderModel,this._workCell=new c.CellData,this._workCell2=new c.CellData,this._rectangleRenderer=this.register(new r.MutableDisposable),this._glyphRenderer=this.register(new r.MutableDisposable),this._onChangeTextureAtlas=this.register(new o.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new o.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new o.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new o.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new o.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors((()=>this._handleColorChange()))),this._cellColorResolver=new _.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new b.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,F,this._themeService)],this.dimensions=(0,y.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(F.onOptionChange((()=>this._handleOptionsChanged()))),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const T={antialias:!1,depth:!1,preserveDrawingBuffer:O};if(this._gl=this._canvas.getContext("webgl2",T),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,f.addDisposableDomListener)(this._canvas,"webglcontextlost",(H=>{console.log("webglcontextlost event received"),H.preventDefault(),this._contextRestorationTimeout=setTimeout((()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(H)}),3e3)}))),this.register((0,f.addDisposableDomListener)(this._canvas,"webglcontextrestored",(H=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,a.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()}))),this._observerDisposable.value=(0,w.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,((H,V)=>this._setCanvasDevicePixelDimensions(H,V))),this.register(this._coreBrowserService.onWindowChange((H=>{this._observerDisposable.value=(0,w.observeDevicePixelDimensions)(this._canvas,H,((V,Q)=>this._setCanvasDevicePixelDimensions(V,Q)))}))),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,r.toDisposable)((()=>{var H;for(const V of this._renderLayers)V.dispose();(H=this._canvas.parentElement)==null||H.removeChild(this._canvas),(0,a.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){var E;return(E=this._charAtlas)==null?void 0:E.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(E,R){var B,$,N,I;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const F of this._renderLayers)F.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(B=this._rectangleRenderer.value)==null||B.setDimensions(this.dimensions),($=this._rectangleRenderer.value)==null||$.handleResize(),(N=this._glyphRenderer.value)==null||N.setDimensions(this.dimensions),(I=this._glyphRenderer.value)==null||I.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var E;for(const R of this._renderLayers)R.handleBlur(this._terminal);(E=this._cursorBlinkStateManager.value)==null||E.pause(),this._requestRedrawViewport()}handleFocus(){var E;for(const R of this._renderLayers)R.handleFocus(this._terminal);(E=this._cursorBlinkStateManager.value)==null||E.resume(),this._requestRedrawViewport()}handleSelectionChanged(E,R,B){for(const $ of this._renderLayers)$.handleSelectionChanged(this._terminal,E,R,B);this._model.selection.update(this._core,E,R,B),this._requestRedrawViewport()}handleCursorMove(){var E;for(const R of this._renderLayers)R.handleCursorMove(this._terminal);(E=this._cursorBlinkStateManager.value)==null||E.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new x.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new S.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var R;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const E=(0,a.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==E&&(this._onChangeTextureAtlas.fire(E.pages[0].canvas),this._charAtlasDisposable.value=(0,r.getDisposeArrayDisposable)([(0,o.forwardEvent)(E.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,o.forwardEvent)(E.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=E,this._charAtlas.warmUp(),(R=this._glyphRenderer.value)==null||R.setAtlas(this._charAtlas)}_clearModel(E){var R;this._model.clear(),E&&((R=this._glyphRenderer.value)==null||R.clear())}clearTextureAtlas(){var E;(E=this._charAtlas)==null||E.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var E;this._clearModel(!0);for(const R of this._renderLayers)R.reset(this._terminal);(E=this._cursorBlinkStateManager.value)==null||E.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(E){return-1}deregisterCharacterJoiner(E){return!1}renderRows(E,R){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const B of this._renderLayers)B.handleGridChanged(this._terminal,E,R);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(E,R),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new p.CursorBlinkStateManager((()=>{this._requestRedrawCursor()}),this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(E,R){const B=this._core;let $,N,I,F,D,O,T,H,V,Q,ue,de,q,z,se=this._workCell;E=L(E,B.rows-1,0),R=L(R,B.rows-1,0);const ie=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,ve=ie-B.buffer.ydisp,fe=Math.min(this._terminal.buffer.active.cursorX,B.cols-1);let Me=-1;const _e=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let Oe=!1;for(N=E;N<=R;N++)for(I=N+B.buffer.ydisp,F=B.buffer.lines.get(I),this._model.lineLengths[N]=0,D=this._characterJoinerService.getJoinedCharacters(I),q=0;q<B.cols;q++)if($=this._cellColorResolver.result.bg,F.loadCell(q,se),q===0&&($=this._cellColorResolver.result.bg),O=!1,T=q,D.length>0&&q===D[0][0]&&(O=!0,H=D.shift(),se=new C(se,F.translateToString(!0,H[0],H[1]),H[1]-H[0]),T=H[1]-1),V=se.getChars(),Q=se.getCode(),de=(N*B.cols+q)*v.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(se,q,I,this.dimensions.device.cell.width),_e&&I===ie&&(q===fe&&(this._model.cursor={x:fe,y:ve,width:se.getWidth(),style:this._coreBrowserService.isFocused?B.options.cursorStyle||"block":B.options.cursorInactiveStyle,cursorWidth:B.options.cursorWidth,dpr:this._devicePixelRatio},Me=fe+se.getWidth()-1),q>=fe&&q<=Me&&(this._coreBrowserService.isFocused&&(B.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&B.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),Q!==l.NULL_CELL_CODE&&(this._model.lineLengths[N]=q+1),(this._model.cells[de]!==Q||this._model.cells[de+v.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[de+v.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[de+v.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(Oe=!0,V.length>1&&(Q|=v.COMBINED_CHAR_BIT_MASK),this._model.cells[de]=Q,this._model.cells[de+v.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[de+v.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[de+v.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,ue=se.getWidth(),this._glyphRenderer.value.updateCell(q,N,Q,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,V,ue,$),O))for(se=this._workCell,q++;q<T;q++)z=(N*B.cols+q)*v.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(q,N,l.NULL_CELL_CODE,0,0,0,l.NULL_CELL_CHAR,0,0),this._model.cells[z]=l.NULL_CELL_CODE,this._model.cells[z+v.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[z+v.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[z+v.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;Oe&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),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._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(E,R){this._canvas.width===E&&this._canvas.height===R||(this._canvas.width=E,this._canvas.height=R,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const E=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:E,end:E})}}n.WebglRenderer=m;class C extends h.AttributeData{constructor(E,R,B){super(),this.content=0,this.combinedData="",this.fg=E.fg,this.bg=E.bg,this.combinedData=R,this._width=B}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(E){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function L(M,E,R=0){return Math.max(Math.min(M,E),R)}n.JoinedCellData=C},381:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GLTexture=n.expandFloat32Array=n.createShader=n.createProgram=n.PROJECTION_MATRIX=void 0;const f=u(374);function _(a,p,w){const y=(0,f.throwIfFalsy)(a.createShader(p));if(a.shaderSource(y,w),a.compileShader(y),a.getShaderParameter(y,a.COMPILE_STATUS))return y;console.error(a.getShaderInfoLog(y)),a.deleteShader(y)}n.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),n.createProgram=function(a,p,w){const y=(0,f.throwIfFalsy)(a.createProgram());if(a.attachShader(y,(0,f.throwIfFalsy)(_(a,a.VERTEX_SHADER,p))),a.attachShader(y,(0,f.throwIfFalsy)(_(a,a.FRAGMENT_SHADER,w))),a.linkProgram(y),a.getProgramParameter(y,a.LINK_STATUS))return y;console.error(a.getProgramInfoLog(y)),a.deleteProgram(y)},n.createShader=_,n.expandFloat32Array=function(a,p){const w=Math.min(2*a.length,p),y=new Float32Array(w);for(let o=0;o<a.length;o++)y[o]=a[o];return y},n.GLTexture=class{constructor(a){this.texture=a,this.version=-1}}},592:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BaseRenderLayer=void 0;const f=u(627),_=u(237),a=u(374),p=u(859);class w extends p.Disposable{constructor(o,r,h,c,l,S,x,v){super(),this._container=r,this._alpha=l,this._coreBrowserService=S,this._optionsService=x,this._themeService=v,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${h}-layer`),this._canvas.style.zIndex=c.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors((b=>{this._refreshCharAtlas(o,b),this.reset(o)}))),this.register((0,p.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,a.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(o){}handleFocus(o){}handleCursorMove(o){}handleGridChanged(o,r,h){}handleSelectionChanged(o,r,h,c=!1){}_setTransparency(o,r){if(r===this._alpha)return;const h=this._canvas;this._alpha=r,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,h),this._refreshCharAtlas(o,this._themeService.colors),this.handleGridChanged(o,0,o.rows-1)}_refreshCharAtlas(o,r){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,f.acquireTextureAtlas)(o,this._optionsService.rawOptions,r,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(o,r){this._deviceCellWidth=r.device.cell.width,this._deviceCellHeight=r.device.cell.height,this._deviceCharWidth=r.device.char.width,this._deviceCharHeight=r.device.char.height,this._deviceCharLeft=r.device.char.left,this._deviceCharTop=r.device.char.top,this._canvas.width=r.device.canvas.width,this._canvas.height=r.device.canvas.height,this._canvas.style.width=`${r.css.canvas.width}px`,this._canvas.style.height=`${r.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(o,this._themeService.colors)}_fillBottomLineAtCells(o,r,h=1){this._ctx.fillRect(o*this._deviceCellWidth,(r+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,h*this._deviceCellWidth,this._coreBrowserService.dpr)}_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(o,r,h,c){this._alpha?this._ctx.clearRect(o*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,c*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(o*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,c*this._deviceCellHeight))}_fillCharTrueColor(o,r,h,c){this._ctx.font=this._getFont(o,!1,!1),this._ctx.textBaseline=_.TEXT_BASELINE,this._clipCell(h,c,r.getWidth()),this._ctx.fillText(r.getChars(),h*this._deviceCellWidth+this._deviceCharLeft,c*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(o,r,h){this._ctx.beginPath(),this._ctx.rect(o*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(o,r,h){return`${h?"italic":""} ${r?o.options.fontWeightBold:o.options.fontWeight} ${o.options.fontSize*this._coreBrowserService.dpr}px ${o.options.fontFamily}`}}n.BaseRenderLayer=w},733:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkRenderLayer=void 0;const f=u(197),_=u(237),a=u(592);class p extends a.BaseRenderLayer{constructor(y,o,r,h,c,l,S){super(r,y,"link",o,!0,c,l,S),this.register(h.onShowLinkUnderline((x=>this._handleShowLinkUnderline(x)))),this.register(h.onHideLinkUnderline((x=>this._handleHideLinkUnderline(x))))}resize(y,o){super.resize(y,o),this._state=void 0}reset(y){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const y=this._state.y2-this._state.y1-1;y>0&&this._clearCells(0,this._state.y1+1,this._state.cols,y),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(y){if(y.fg===_.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:y.fg!==void 0&&(0,f.is256Color)(y.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[y.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,y.y1===y.y2)this._fillBottomLineAtCells(y.x1,y.y1,y.x2-y.x1);else{this._fillBottomLineAtCells(y.x1,y.y1,y.cols-y.x1);for(let o=y.y1+1;o<y.y2;o++)this._fillBottomLineAtCells(0,o,y.cols);this._fillBottomLineAtCells(0,y.y2,y.x2)}this._state=y}_handleHideLinkUnderline(y){this._clearCurrentLink()}}n.LinkRenderLayer=p},820:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(u,f,_,a){u.addEventListener(f,_,a);let p=!1;return{dispose:()=>{p||(p=!0,u.removeEventListener(f,_,a))}}}},274:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellColorResolver=void 0;const f=u(855),_=u(160),a=u(374);let p,w=0,y=0,o=!1,r=!1,h=!1,c=0;n.CellColorResolver=class{constructor(l,S,x,v,b,m){this._terminal=l,this._optionService=S,this._selectionRenderModel=x,this._decorationService=v,this._coreBrowserService=b,this._themeService=m,this.result={fg:0,bg:0,ext:0}}resolve(l,S,x,v){if(this.result.bg=l.bg,this.result.fg=l.fg,this.result.ext=268435456&l.bg?l.extended.ext:0,y=0,w=0,r=!1,o=!1,h=!1,p=this._themeService.colors,c=0,l.getCode()!==f.NULL_CELL_CODE&&l.extended.underlineStyle===4){const b=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));c=S*v%(2*Math.round(b))}if(this._decorationService.forEachDecorationAtCell(S,x,"bottom",(b=>{b.backgroundColorRGB&&(y=b.backgroundColorRGB.rgba>>8&16777215,r=!0),b.foregroundColorRGB&&(w=b.foregroundColorRGB.rgba>>8&16777215,o=!0)})),h=this._selectionRenderModel.isCellSelected(this._terminal,S,x),h){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:y=(16777215&this.result.fg)<<8|255;break;default:y=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:y=(16777215&this.result.bg)<<8|255}y=_.rgba.blend(y,4294967040&(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else y=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(r=!0,p.selectionForeground&&(w=p.selectionForeground.rgba>>8&16777215,o=!0),(0,a.treatGlyphAsBackgroundColor)(l.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)w=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:w=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:w=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:w=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:w=(16777215&this.result.fg)<<8|255;break;default:w=this._themeService.colors.foreground.rgba}w=_.rgba.blend(w,4294967040&(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}o=!0}}this._decorationService.forEachDecorationAtCell(S,x,"top",(b=>{b.backgroundColorRGB&&(y=b.backgroundColorRGB.rgba>>8&16777215,r=!0),b.foregroundColorRGB&&(w=b.foregroundColorRGB.rgba>>8&16777215,o=!0)})),r&&(y=h?-16777216&l.bg&-134217729|y|50331648:-16777216&l.bg|y|50331648),o&&(w=-16777216&l.fg&-67108865|w|50331648),67108864&this.result.fg&&(r&&!o&&(w=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&p.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,o=!0),!r&&o&&(y=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&p.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,r=!0)),p=void 0,this.result.bg=r?y:this.result.bg,this.result.fg=o?w:this.result.fg,this.result.ext&=536870911,this.result.ext|=c<<29&3758096384}}},627:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.removeTerminalFromCache=n.acquireTextureAtlas=void 0;const f=u(509),_=u(197),a=[];n.acquireTextureAtlas=function(p,w,y,o,r,h,c,l){const S=(0,_.generateConfig)(o,r,h,c,w,y,l);for(let b=0;b<a.length;b++){const m=a[b],C=m.ownedBy.indexOf(p);if(C>=0){if((0,_.configEquals)(m.config,S))return m.atlas;m.ownedBy.length===1?(m.atlas.dispose(),a.splice(b,1)):m.ownedBy.splice(C,1);break}}for(let b=0;b<a.length;b++){const m=a[b];if((0,_.configEquals)(m.config,S))return m.ownedBy.push(p),m.atlas}const x=p._core,v={atlas:new f.TextureAtlas(document,S,x.unicodeService),config:S,ownedBy:[p]};return a.push(v),v.atlas},n.removeTerminalFromCache=function(p){for(let w=0;w<a.length;w++){const y=a[w].ownedBy.indexOf(p);if(y!==-1){a[w].ownedBy.length===1?(a[w].atlas.dispose(),a.splice(w,1)):a[w].ownedBy.splice(y,1);break}}}},197:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.is256Color=n.configEquals=n.generateConfig=void 0;const f=u(160);n.generateConfig=function(_,a,p,w,y,o,r){const h={foreground:o.foreground,background:o.background,cursor:f.NULL_COLOR,cursorAccent:f.NULL_COLOR,selectionForeground:f.NULL_COLOR,selectionBackgroundTransparent:f.NULL_COLOR,selectionBackgroundOpaque:f.NULL_COLOR,selectionInactiveBackgroundTransparent:f.NULL_COLOR,selectionInactiveBackgroundOpaque:f.NULL_COLOR,ansi:o.ansi.slice(),contrastCache:o.contrastCache,halfContrastCache:o.halfContrastCache};return{customGlyphs:y.customGlyphs,devicePixelRatio:r,letterSpacing:y.letterSpacing,lineHeight:y.lineHeight,deviceCellWidth:_,deviceCellHeight:a,deviceCharWidth:p,deviceCharHeight:w,fontFamily:y.fontFamily,fontSize:y.fontSize,fontWeight:y.fontWeight,fontWeightBold:y.fontWeightBold,allowTransparency:y.allowTransparency,drawBoldTextInBrightColors:y.drawBoldTextInBrightColors,minimumContrastRatio:y.minimumContrastRatio,colors:h}},n.configEquals=function(_,a){for(let p=0;p<_.colors.ansi.length;p++)if(_.colors.ansi[p].rgba!==a.colors.ansi[p].rgba)return!1;return _.devicePixelRatio===a.devicePixelRatio&&_.customGlyphs===a.customGlyphs&&_.lineHeight===a.lineHeight&&_.letterSpacing===a.letterSpacing&&_.fontFamily===a.fontFamily&&_.fontSize===a.fontSize&&_.fontWeight===a.fontWeight&&_.fontWeightBold===a.fontWeightBold&&_.allowTransparency===a.allowTransparency&&_.deviceCharWidth===a.deviceCharWidth&&_.deviceCharHeight===a.deviceCharHeight&&_.drawBoldTextInBrightColors===a.drawBoldTextInBrightColors&&_.minimumContrastRatio===a.minimumContrastRatio&&_.colors.foreground.rgba===a.colors.foreground.rgba&&_.colors.background.rgba===a.colors.background.rgba},n.is256Color=function(_){return(50331648&_)==16777216||(50331648&_)==33554432}},237:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const f=u(399);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},457:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorBlinkStateManager=void 0,n.CursorBlinkStateManager=class{constructor(u,f){this._renderCallback=u,this._coreBrowserService=f,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(u=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const f=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,f>0)return void this._restartInterval(f)}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 f=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(f)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),u)}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:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tryDrawCustomChar=n.powerlineDefinitions=n.boxDrawingDefinitions=n.blockElementDefinitions=void 0;const f=u(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 _={"░":[[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:(o,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"║":{1:(o,r)=>`M${.5-o},0 L${.5-o},1 M${.5+o},0 L${.5+o},1`},"╒":{1:(o,r)=>`M.5,1 L.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╓":{1:(o,r)=>`M${.5-o},1 L${.5-o},.5 L1,.5 M${.5+o},.5 L${.5+o},1`},"╔":{1:(o,r)=>`M1,${.5-r} L${.5-o},${.5-r} L${.5-o},1 M1,${.5+r} L${.5+o},${.5+r} L${.5+o},1`},"╕":{1:(o,r)=>`M0,${.5-r} L.5,${.5-r} L.5,1 M0,${.5+r} L.5,${.5+r}`},"╖":{1:(o,r)=>`M${.5+o},1 L${.5+o},.5 L0,.5 M${.5-o},.5 L${.5-o},1`},"╗":{1:(o,r)=>`M0,${.5+r} L${.5-o},${.5+r} L${.5-o},1 M0,${.5-r} L${.5+o},${.5-r} L${.5+o},1`},"╘":{1:(o,r)=>`M.5,0 L.5,${.5+r} L1,${.5+r} M.5,${.5-r} L1,${.5-r}`},"╙":{1:(o,r)=>`M1,.5 L${.5-o},.5 L${.5-o},0 M${.5+o},.5 L${.5+o},0`},"╚":{1:(o,r)=>`M1,${.5-r} L${.5+o},${.5-r} L${.5+o},0 M1,${.5+r} L${.5-o},${.5+r} L${.5-o},0`},"╛":{1:(o,r)=>`M0,${.5+r} L.5,${.5+r} L.5,0 M0,${.5-r} L.5,${.5-r}`},"╜":{1:(o,r)=>`M0,.5 L${.5+o},.5 L${.5+o},0 M${.5-o},.5 L${.5-o},0`},"╝":{1:(o,r)=>`M0,${.5-r} L${.5-o},${.5-r} L${.5-o},0 M0,${.5+r} L${.5+o},${.5+r} L${.5+o},0`},"╞":{1:(o,r)=>`M.5,0 L.5,1 M.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╟":{1:(o,r)=>`M${.5-o},0 L${.5-o},1 M${.5+o},0 L${.5+o},1 M${.5+o},.5 L1,.5`},"╠":{1:(o,r)=>`M${.5-o},0 L${.5-o},1 M1,${.5+r} L${.5+o},${.5+r} L${.5+o},1 M1,${.5-r} L${.5+o},${.5-r} L${.5+o},0`},"╡":{1:(o,r)=>`M.5,0 L.5,1 M0,${.5-r} L.5,${.5-r} M0,${.5+r} L.5,${.5+r}`},"╢":{1:(o,r)=>`M0,.5 L${.5-o},.5 M${.5-o},0 L${.5-o},1 M${.5+o},0 L${.5+o},1`},"╣":{1:(o,r)=>`M${.5+o},0 L${.5+o},1 M0,${.5+r} L${.5-o},${.5+r} L${.5-o},1 M0,${.5-r} L${.5-o},${.5-r} L${.5-o},0`},"╤":{1:(o,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r} M.5,${.5+r} L.5,1`},"╥":{1:(o,r)=>`M0,.5 L1,.5 M${.5-o},.5 L${.5-o},1 M${.5+o},.5 L${.5+o},1`},"╦":{1:(o,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L${.5-o},${.5+r} L${.5-o},1 M1,${.5+r} L${.5+o},${.5+r} L${.5+o},1`},"╧":{1:(o,r)=>`M.5,0 L.5,${.5-r} M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╨":{1:(o,r)=>`M0,.5 L1,.5 M${.5-o},.5 L${.5-o},0 M${.5+o},.5 L${.5+o},0`},"╩":{1:(o,r)=>`M0,${.5+r} L1,${.5+r} M0,${.5-r} L${.5-o},${.5-r} L${.5-o},0 M1,${.5-r} L${.5+o},${.5-r} L${.5+o},0`},"╪":{1:(o,r)=>`M.5,0 L.5,1 M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╫":{1:(o,r)=>`M0,.5 L1,.5 M${.5-o},0 L${.5-o},1 M${.5+o},0 L${.5+o},1`},"╬":{1:(o,r)=>`M0,${.5+r} L${.5-o},${.5+r} L${.5-o},1 M1,${.5+r} L${.5+o},${.5+r} L${.5+o},1 M0,${.5-r} L${.5-o},${.5-r} L${.5-o},0 M1,${.5-r} L${.5+o},${.5-r} L${.5+o},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:(o,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,1,.5`},"╮":{1:(o,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,0,.5`},"╯":{1:(o,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,0,.5`},"╰":{1:(o,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.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(o,r,h,c,l,S,x,v){const b=n.blockElementDefinitions[r];if(b)return(function(M,E,R,B,$,N){for(let I=0;I<E.length;I++){const F=E[I],D=$/8,O=N/8;M.fillRect(R+F.x*D,B+F.y*O,F.w*D,F.h*O)}})(o,b,h,c,l,S),!0;const m=_[r];if(m)return(function(M,E,R,B,$,N){let I=a.get(E);I||(I=new Map,a.set(E,I));const F=M.fillStyle;if(typeof F!="string")throw new Error(`Unexpected fillStyle type "${F}"`);let D=I.get(F);if(!D){const O=E[0].length,T=E.length,H=M.canvas.ownerDocument.createElement("canvas");H.width=O,H.height=T;const V=(0,f.throwIfFalsy)(H.getContext("2d")),Q=new ImageData(O,T);let ue,de,q,z;if(F.startsWith("#"))ue=parseInt(F.slice(1,3),16),de=parseInt(F.slice(3,5),16),q=parseInt(F.slice(5,7),16),z=F.length>7&&parseInt(F.slice(7,9),16)||1;else{if(!F.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${F}" when drawing pattern glyph`);[ue,de,q,z]=F.substring(5,F.length-1).split(",").map((se=>parseFloat(se)))}for(let se=0;se<T;se++)for(let ie=0;ie<O;ie++)Q.data[4*(se*O+ie)]=ue,Q.data[4*(se*O+ie)+1]=de,Q.data[4*(se*O+ie)+2]=q,Q.data[4*(se*O+ie)+3]=E[se][ie]*(255*z);V.putImageData(Q,0,0),D=(0,f.throwIfFalsy)(M.createPattern(H,null)),I.set(F,D)}M.fillStyle=D,M.fillRect(R,B,$,N)})(o,m,h,c,l,S),!0;const C=n.boxDrawingDefinitions[r];if(C)return(function(M,E,R,B,$,N,I){M.strokeStyle=M.fillStyle;for(const[F,D]of Object.entries(E)){let O;M.beginPath(),M.lineWidth=I*Number.parseInt(F),O=typeof D=="function"?D(.15,.15/N*$):D;for(const T of O.split(" ")){const H=T[0],V=w[H];if(!V){console.error(`Could not find drawing instructions for "${H}"`);continue}const Q=T.substring(1).split(",");Q[0]&&Q[1]&&V(M,y(Q,$,N,R,B,!0,I))}M.stroke(),M.closePath()}})(o,C,h,c,l,S,v),!0;const L=n.powerlineDefinitions[r];return!!L&&((function(M,E,R,B,$,N,I,F){const D=new Path2D;D.rect(R,B,$,N),M.clip(D),M.beginPath();const O=I/12;M.lineWidth=F*O;for(const T of E.d.split(" ")){const H=T[0],V=w[H];if(!V){console.error(`Could not find drawing instructions for "${H}"`);continue}const Q=T.substring(1).split(",");Q[0]&&Q[1]&&V(M,y(Q,$,N,R,B,!1,F,(E.leftPadding??0)*(O/2),(E.rightPadding??0)*(O/2)))}E.type===1?(M.strokeStyle=M.fillStyle,M.stroke()):M.fill(),M.closePath()})(o,L,h,c,l,S,x,v),!0)};const a=new Map;function p(o,r,h=0){return Math.max(Math.min(o,r),h)}const w={C:(o,r)=>o.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]),L:(o,r)=>o.lineTo(r[0],r[1]),M:(o,r)=>o.moveTo(r[0],r[1])};function y(o,r,h,c,l,S,x,v=0,b=0){const m=o.map((C=>parseFloat(C)||parseInt(C)));if(m.length<2)throw new Error("Too few arguments for instruction");for(let C=0;C<m.length;C+=2)m[C]*=r-v*x-b*x,S&&m[C]!==0&&(m[C]=p(Math.round(m[C]+.5)-.5,r,0)),m[C]+=c+v*x;for(let C=1;C<m.length;C+=2)m[C]*=h,S&&m[C]!==0&&(m[C]=p(Math.round(m[C]+.5)-.5,h,0)),m[C]+=l;return m}},56:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.observeDevicePixelDimensions=void 0;const f=u(859);n.observeDevicePixelDimensions=function(_,a,p){let w=new a.ResizeObserver((y=>{const o=y.find((c=>c.target===_));if(!o)return;if(!("devicePixelContentBoxSize"in o))return w==null||w.disconnect(),void(w=void 0);const r=o.devicePixelContentBoxSize[0].inlineSize,h=o.devicePixelContentBoxSize[0].blockSize;r>0&&h>0&&p(r,h)}));try{w.observe(_,{box:["device-pixel-content-box"]})}catch{w.disconnect(),w=void 0}return(0,f.toDisposable)((()=>w==null?void 0:w.disconnect()))}},374:(j,n)=>{function u(_){return 57508<=_&&_<=57558}function f(_){return _>=128512&&_<=128591||_>=127744&&_<=128511||_>=128640&&_<=128767||_>=9728&&_<=9983||_>=9984&&_<=10175||_>=65024&&_<=65039||_>=129280&&_<=129535||_>=127462&&_<=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(_){if(!_)throw new Error("value must not be falsy");return _},n.isPowerlineGlyph=u,n.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},n.isEmoji=f,n.allowRescaling=function(_,a,p,w){return a===1&&p>Math.ceil(1.5*w)&&_!==void 0&&_>255&&!f(_)&&!u(_)&&!(function(y){return 57344<=y&&y<=63743})(_)},n.treatGlyphAsBackgroundColor=function(_){return u(_)||(function(a){return 9472<=a&&a<=9631})(_)},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(_,a,p=0){return(_-(2*Math.round(a)-p))%(2*Math.round(a))}},296:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(_,a,p,w=!1){if(this.selectionStart=a,this.selectionEnd=p,!a||!p||a[0]===p[0]&&a[1]===p[1])return void this.clear();const y=_.buffers.active.ydisp,o=a[1]-y,r=p[1]-y,h=Math.max(o,0),c=Math.min(r,_.rows-1);h>=_.rows||c<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=o,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=c,this.startCol=a[0],this.endCol=p[0])}isCellSelected(_,a,p){return!!this.hasSelection&&(p-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?a>=this.startCol&&p>=this.viewportCappedStartRow&&a<this.endCol&&p<=this.viewportCappedEndRow:a<this.startCol&&p>=this.viewportCappedStartRow&&a>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol)}}n.createSelectionRenderModel=function(){return new u}},509:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextureAtlas=void 0;const f=u(237),_=u(860),a=u(374),p=u(160),w=u(345),y=u(485),o=u(385),r=u(147),h=u(855),c={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 l;class S{get pages(){return this._pages}constructor(C,L,M){this._document=C,this._config=L,this._unicodeService=M,this._didWarmUp=!1,this._cacheMap=new y.FourKeyMap,this._cacheMapCombined=new y.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new r.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new w.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new w.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=b(C,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,a.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const C of this.pages)C.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const C=new o.IdleTaskQueue;for(let L=33;L<126;L++)C.enqueue((()=>{if(!this._cacheMap.get(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT)){const M=this._drawToCache(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT);this._cacheMap.set(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT,M)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const C of this._pages)C.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(S.maxAtlasPages&&this._pages.length>=Math.max(4,S.maxAtlasPages)){const L=this._pages.filter((I=>2*I.canvas.width<=(S.maxTextureSize||4096))).sort(((I,F)=>F.canvas.width!==I.canvas.width?F.canvas.width-I.canvas.width:F.percentageUsed-I.percentageUsed));let M=-1,E=0;for(let I=0;I<L.length;I++)if(L[I].canvas.width!==E)M=I,E=L[I].canvas.width;else if(I-M==3)break;const R=L.slice(M,M+4),B=R.map((I=>I.glyphs[0].texturePage)).sort(((I,F)=>I>F?1:-1)),$=this.pages.length-R.length,N=this._mergePages(R,$);N.version++;for(let I=B.length-1;I>=0;I--)this._deletePage(B[I]);this.pages.push(N),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(N.canvas)}const C=new x(this._document,this._textureSize);return this._pages.push(C),this._activePages.push(C),this._onAddTextureAtlasCanvas.fire(C.canvas),C}_mergePages(C,L){const M=2*C[0].canvas.width,E=new x(this._document,M,C);for(const[R,B]of C.entries()){const $=R*B.canvas.width%M,N=Math.floor(R/2)*B.canvas.height;E.ctx.drawImage(B.canvas,$,N);for(const F of B.glyphs)F.texturePage=L,F.sizeClipSpace.x=F.size.x/M,F.sizeClipSpace.y=F.size.y/M,F.texturePosition.x+=$,F.texturePosition.y+=N,F.texturePositionClipSpace.x=F.texturePosition.x/M,F.texturePositionClipSpace.y=F.texturePosition.y/M;this._onRemoveTextureAtlasCanvas.fire(B.canvas);const I=this._activePages.indexOf(B);I!==-1&&this._activePages.splice(I,1)}return E}_deletePage(C){this._pages.splice(C,1);for(let L=C;L<this._pages.length;L++){const M=this._pages[L];for(const E of M.glyphs)E.texturePage--;M.version++}}getRasterizedGlyphCombinedChar(C,L,M,E,R){return this._getFromCacheMap(this._cacheMapCombined,C,L,M,E,R)}getRasterizedGlyph(C,L,M,E,R){return this._getFromCacheMap(this._cacheMap,C,L,M,E,R)}_getFromCacheMap(C,L,M,E,R,B=!1){return l=C.get(L,M,E,R),l||(l=this._drawToCache(L,M,E,R,B),C.set(L,M,E,R,l)),l}_getColorFromAnsiIndex(C){if(C>=this._config.colors.ansi.length)throw new Error("No color found for idx "+C);return this._config.colors.ansi[C]}_getBackgroundColor(C,L,M,E){if(this._config.allowTransparency)return p.NULL_COLOR;let R;switch(C){case 16777216:case 33554432:R=this._getColorFromAnsiIndex(L);break;case 50331648:const B=r.AttributeData.toColorRGB(L);R=p.channels.toColor(B[0],B[1],B[2]);break;default:R=M?p.color.opaque(this._config.colors.foreground):this._config.colors.background}return R}_getForegroundColor(C,L,M,E,R,B,$,N,I,F){const D=this._getMinimumContrastColor(C,L,M,E,R,B,$,I,N,F);if(D)return D;let O;switch(R){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&I&&B<8&&(B+=8),O=this._getColorFromAnsiIndex(B);break;case 50331648:const T=r.AttributeData.toColorRGB(B);O=p.channels.toColor(T[0],T[1],T[2]);break;default:O=$?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(O=p.color.opaque(O)),N&&(O=p.color.multiplyOpacity(O,f.DIM_OPACITY)),O}_resolveBackgroundRgba(C,L,M){switch(C){case 16777216:case 33554432:return this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return M?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(C,L,M,E){switch(C){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&E&&L<8&&(L+=8),this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return M?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(C,L,M,E,R,B,$,N,I,F){if(this._config.minimumContrastRatio===1||F)return;const D=this._getContrastCache(I),O=D.getColor(C,E);if(O!==void 0)return O||void 0;const T=this._resolveBackgroundRgba(L,M,$),H=this._resolveForegroundRgba(R,B,$,N),V=p.rgba.ensureContrastRatio(T,H,this._config.minimumContrastRatio/(I?2:1));if(!V)return void D.setColor(C,E,null);const Q=p.channels.toColor(V>>24&255,V>>16&255,V>>8&255);return D.setColor(C,E,Q),Q}_getContrastCache(C){return C?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(C,L,M,E,R=!1){const B=typeof C=="number"?String.fromCharCode(C):C,$=Math.min(this._config.deviceCellWidth*Math.max(B.length,2)+4,this._textureSize);this._tmpCanvas.width<$&&(this._tmpCanvas.width=$);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=M,this._workAttributeData.bg=L,this._workAttributeData.extended.ext=E,this._workAttributeData.isInvisible())return c;const I=!!this._workAttributeData.isBold(),F=!!this._workAttributeData.isInverse(),D=!!this._workAttributeData.isDim(),O=!!this._workAttributeData.isItalic(),T=!!this._workAttributeData.isUnderline(),H=!!this._workAttributeData.isStrikethrough(),V=!!this._workAttributeData.isOverline();let Q=this._workAttributeData.getFgColor(),ue=this._workAttributeData.getFgColorMode(),de=this._workAttributeData.getBgColor(),q=this._workAttributeData.getBgColorMode();if(F){const ce=Q;Q=de,de=ce;const ge=ue;ue=q,q=ge}const z=this._getBackgroundColor(q,de,F,D);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const se=I?this._config.fontWeightBold:this._config.fontWeight,ie=O?"italic":"";this._tmpCtx.font=`${ie} ${se} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=f.TEXT_BASELINE;const ve=B.length===1&&(0,a.isPowerlineGlyph)(B.charCodeAt(0)),fe=B.length===1&&(0,a.isRestrictedPowerlineGlyph)(B.charCodeAt(0)),Me=this._getForegroundColor(L,q,de,M,ue,Q,F,D,I,(0,a.treatGlyphAsBackgroundColor)(B.charCodeAt(0)));this._tmpCtx.fillStyle=Me.css;const _e=fe?0:4;let Oe=!1;this._config.customGlyphs!==!1&&(Oe=(0,_.tryDrawCustomChar)(this._tmpCtx,B,_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let qe,be=!ve;if(qe=typeof C=="number"?this._unicodeService.wcwidth(C):this._unicodeService.getStringCellWidth(C),T){this._tmpCtx.save();const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=ce%2==1?.5:0;if(this._tmpCtx.lineWidth=ce,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())be=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{be=!1;let Ie=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Ie<8&&(Ie+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Ie).css}this._tmpCtx.beginPath();const ze=_e,Re=Math.ceil(_e+this._config.deviceCharHeight)-ge-(R?2*ce:0),_t=Re+ce,Qe=Re+2*ce;let it=this._workAttributeData.getUnderlineVariantOffset();for(let Ie=0;Ie<qe;Ie++){this._tmpCtx.save();const Ae=ze+Ie*this._config.deviceCellWidth,Le=ze+(Ie+1)*this._config.deviceCellWidth,xt=Ae+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Le,Re),this._tmpCtx.moveTo(Ae,Qe),this._tmpCtx.lineTo(Le,Qe);break;case 3:const tt=ce<=1?Qe:Math.ceil(_e+this._config.deviceCharHeight-ce/2)-ge,vt=ce<=1?Re:Math.ceil(_e+this._config.deviceCharHeight+ce/2)-ge,ut=new Path2D;ut.rect(Ae,Re,this._config.deviceCellWidth,Qe-Re),this._tmpCtx.clip(ut),this._tmpCtx.moveTo(Ae-this._config.deviceCellWidth/2,_t),this._tmpCtx.bezierCurveTo(Ae-this._config.deviceCellWidth/2,vt,Ae,vt,Ae,_t),this._tmpCtx.bezierCurveTo(Ae,tt,xt,tt,xt,_t),this._tmpCtx.bezierCurveTo(xt,vt,Le,vt,Le,_t),this._tmpCtx.bezierCurveTo(Le,tt,Le+this._config.deviceCellWidth/2,tt,Le+this._config.deviceCellWidth/2,_t);break;case 4:const Zt=it===0?0:it>=ce?2*ce-it:ce-it;it>=ce||Zt===0?(this._tmpCtx.setLineDash([Math.round(ce),Math.round(ce)]),this._tmpCtx.moveTo(Ae+Zt,Re),this._tmpCtx.lineTo(Le,Re)):(this._tmpCtx.setLineDash([Math.round(ce),Math.round(ce)]),this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Ae+Zt,Re),this._tmpCtx.moveTo(Ae+Zt+ce,Re),this._tmpCtx.lineTo(Le,Re)),it=(0,a.computeNextVariantOffset)(Le-Ae,ce,it);break;case 5:const tr=.6,ir=.3,jt=Le-Ae,si=Math.floor(tr*jt),ri=Math.floor(ir*jt),Jt=jt-si-ri;this._tmpCtx.setLineDash([si,ri,Jt]),this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Le,Re);break;default:this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Le,Re)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Oe&&this._config.fontSize>=12&&!this._config.allowTransparency&&B!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Ie=this._tmpCtx.measureText(B);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Ie&&Ie.actualBoundingBoxDescent>0){this._tmpCtx.save();const Ae=new Path2D;Ae.rect(ze,Re-Math.ceil(ce/2),this._config.deviceCellWidth*qe,Qe-Re+Math.ceil(ce/2)),this._tmpCtx.clip(Ae),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=z.css,this._tmpCtx.strokeText(B,_e,_e+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(V){const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=ce%2==1?.5:0;this._tmpCtx.lineWidth=ce,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(_e,_e+ge),this._tmpCtx.lineTo(_e+this._config.deviceCharWidth*qe,_e+ge),this._tmpCtx.stroke()}if(Oe||this._tmpCtx.fillText(B,_e,_e+this._config.deviceCharHeight),B==="_"&&!this._config.allowTransparency){let ce=v(this._tmpCtx.getImageData(_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Me,be);if(ce)for(let ge=1;ge<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(B,_e,_e+this._config.deviceCharHeight-ge),ce=v(this._tmpCtx.getImageData(_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Me,be),ce);ge++);}if(H){const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),ge=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=ce,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(_e,_e+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.lineTo(_e+this._config.deviceCharWidth*qe,_e+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.stroke()}this._tmpCtx.restore();const ft=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Ot;if(Ot=this._config.allowTransparency?(function(ce){for(let ge=0;ge<ce.data.length;ge+=4)if(ce.data[ge+3]>0)return!1;return!0})(ft):v(ft,z,Me,be),Ot)return c;const Se=this._findGlyphBoundingBox(ft,this._workBoundingBox,$,fe,Oe,_e);let pe,me;for(;;){if(this._activePages.length===0){const ce=this._createNewPage();pe=ce,me=ce.currentRow,me.height=Se.size.y;break}pe=this._activePages[this._activePages.length-1],me=pe.currentRow;for(const ce of this._activePages)Se.size.y<=ce.currentRow.height&&(pe=ce,me=ce.currentRow);for(let ce=this._activePages.length-1;ce>=0;ce--)for(const ge of this._activePages[ce].fixedRows)ge.height<=me.height&&Se.size.y<=ge.height&&(pe=this._activePages[ce],me=ge);if(me.y+Se.size.y>=pe.canvas.height||me.height>Se.size.y+2){let ce=!1;if(pe.currentRow.y+pe.currentRow.height+Se.size.y>=pe.canvas.height){let ge;for(const ze of this._activePages)if(ze.currentRow.y+ze.currentRow.height+Se.size.y<ze.canvas.height){ge=ze;break}if(ge)pe=ge;else if(S.maxAtlasPages&&this._pages.length>=S.maxAtlasPages&&me.y+Se.size.y<=pe.canvas.height&&me.height>=Se.size.y&&me.x+Se.size.x<=pe.canvas.width)ce=!0;else{const ze=this._createNewPage();pe=ze,me=ze.currentRow,me.height=Se.size.y,ce=!0}}ce||(pe.currentRow.height>0&&pe.fixedRows.push(pe.currentRow),me={x:0,y:pe.currentRow.y+pe.currentRow.height,height:Se.size.y},pe.fixedRows.push(me),pe.currentRow={x:0,y:me.y+me.height,height:0})}if(me.x+Se.size.x<=pe.canvas.width)break;me===pe.currentRow?(me.x=0,me.y+=me.height,me.height=0):pe.fixedRows.splice(pe.fixedRows.indexOf(me),1)}return Se.texturePage=this._pages.indexOf(pe),Se.texturePosition.x=me.x,Se.texturePosition.y=me.y,Se.texturePositionClipSpace.x=me.x/pe.canvas.width,Se.texturePositionClipSpace.y=me.y/pe.canvas.height,Se.sizeClipSpace.x/=pe.canvas.width,Se.sizeClipSpace.y/=pe.canvas.height,me.height=Math.max(me.height,Se.size.y),me.x+=Se.size.x,pe.ctx.putImageData(ft,Se.texturePosition.x-this._workBoundingBox.left,Se.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Se.size.x,Se.size.y),pe.addGlyph(Se),pe.version++,Se}_findGlyphBoundingBox(C,L,M,E,R,B){L.top=0;const $=E?this._config.deviceCellHeight:this._tmpCanvas.height,N=E?this._config.deviceCellWidth:M;let I=!1;for(let F=0;F<$;F++){for(let D=0;D<N;D++){const O=F*this._tmpCanvas.width*4+4*D+3;if(C.data[O]!==0){L.top=F,I=!0;break}}if(I)break}L.left=0,I=!1;for(let F=0;F<B+N;F++){for(let D=0;D<$;D++){const O=D*this._tmpCanvas.width*4+4*F+3;if(C.data[O]!==0){L.left=F,I=!0;break}}if(I)break}L.right=N,I=!1;for(let F=B+N-1;F>=B;F--){for(let D=0;D<$;D++){const O=D*this._tmpCanvas.width*4+4*F+3;if(C.data[O]!==0){L.right=F,I=!0;break}}if(I)break}L.bottom=$,I=!1;for(let F=$-1;F>=0;F--){for(let D=0;D<N;D++){const O=F*this._tmpCanvas.width*4+4*D+3;if(C.data[O]!==0){L.bottom=F,I=!0;break}}if(I)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:L.right-L.left+1,y:L.bottom-L.top+1},sizeClipSpace:{x:L.right-L.left+1,y:L.bottom-L.top+1},offset:{x:-L.left+B+(E||R?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-L.top+B+(E||R?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}n.TextureAtlas=S;class x{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(C){this._glyphs.push(C),this._usedPixels+=C.size.x*C.size.y}constructor(C,L,M){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],M)for(const E of M)this._glyphs.push(...E.glyphs),this._usedPixels+=E._usedPixels;this.canvas=b(C,L,L),this.ctx=(0,a.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 v(m,C,L,M){const E=C.rgba>>>24,R=C.rgba>>>16&255,B=C.rgba>>>8&255,$=L.rgba>>>24,N=L.rgba>>>16&255,I=L.rgba>>>8&255,F=Math.floor((Math.abs(E-$)+Math.abs(R-N)+Math.abs(B-I))/12);let D=!0;for(let O=0;O<m.data.length;O+=4)m.data[O]===E&&m.data[O+1]===R&&m.data[O+2]===B||M&&Math.abs(m.data[O]-E)+Math.abs(m.data[O+1]-R)+Math.abs(m.data[O+2]-B)<F?m.data[O+3]=0:D=!1;return D}function b(m,C,L){const M=m.createElement("canvas");return M.width=C,M.height=L,M}},160:(j,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 u=0,f=0,_=0,a=0;var p,w,y,o,r;function h(l){const S=l.toString(16);return S.length<2?"0"+S:S}function c(l,S){return l<S?(S+.05)/(l+.05):(l+.05)/(S+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(S,x,v,b){return b!==void 0?`#${h(S)}${h(x)}${h(v)}${h(b)}`:`#${h(S)}${h(x)}${h(v)}`},l.toRgba=function(S,x,v,b=255){return(S<<24|x<<16|v<<8|b)>>>0},l.toColor=function(S,x,v,b){return{css:l.toCss(S,x,v,b),rgba:l.toRgba(S,x,v,b)}}})(p||(n.channels=p={})),(function(l){function S(x,v){return a=Math.round(255*v),[u,f,_]=r.toChannels(x.rgba),{css:p.toCss(u,f,_,a),rgba:p.toRgba(u,f,_,a)}}l.blend=function(x,v){if(a=(255&v.rgba)/255,a===1)return{css:v.css,rgba:v.rgba};const b=v.rgba>>24&255,m=v.rgba>>16&255,C=v.rgba>>8&255,L=x.rgba>>24&255,M=x.rgba>>16&255,E=x.rgba>>8&255;return u=L+Math.round((b-L)*a),f=M+Math.round((m-M)*a),_=E+Math.round((C-E)*a),{css:p.toCss(u,f,_),rgba:p.toRgba(u,f,_)}},l.isOpaque=function(x){return(255&x.rgba)==255},l.ensureContrastRatio=function(x,v,b){const m=r.ensureContrastRatio(x.rgba,v.rgba,b);if(m)return p.toColor(m>>24&255,m>>16&255,m>>8&255)},l.opaque=function(x){const v=(255|x.rgba)>>>0;return[u,f,_]=r.toChannels(v),{css:p.toCss(u,f,_),rgba:v}},l.opacity=S,l.multiplyOpacity=function(x,v){return a=255&x.rgba,S(x,a*v/255)},l.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(w||(n.color=w={})),(function(l){let S,x;try{const v=document.createElement("canvas");v.width=1,v.height=1;const b=v.getContext("2d",{willReadFrequently:!0});b&&(S=b,S.globalCompositeOperation="copy",x=S.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(v){if(v.match(/#[\da-f]{3,8}/i))switch(v.length){case 4:return u=parseInt(v.slice(1,2).repeat(2),16),f=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),p.toColor(u,f,_);case 5:return u=parseInt(v.slice(1,2).repeat(2),16),f=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),a=parseInt(v.slice(4,5).repeat(2),16),p.toColor(u,f,_,a);case 7:return{css:v,rgba:(parseInt(v.slice(1),16)<<8|255)>>>0};case 9:return{css:v,rgba:parseInt(v.slice(1),16)>>>0}}const b=v.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(b)return u=parseInt(b[1]),f=parseInt(b[2]),_=parseInt(b[3]),a=Math.round(255*(b[5]===void 0?1:parseFloat(b[5]))),p.toColor(u,f,_,a);if(!S||!x)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=x,S.fillStyle=v,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[u,f,_,a]=S.getImageData(0,0,1,1).data,a!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(u,f,_,a),css:v}}})(y||(n.css=y={})),(function(l){function S(x,v,b){const m=x/255,C=v/255,L=b/255;return .2126*(m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4))+.7152*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}l.relativeLuminance=function(x){return S(x>>16&255,x>>8&255,255&x)},l.relativeLuminance2=S})(o||(n.rgb=o={})),(function(l){function S(v,b,m){const C=v>>24&255,L=v>>16&255,M=v>>8&255;let E=b>>24&255,R=b>>16&255,B=b>>8&255,$=c(o.relativeLuminance2(E,R,B),o.relativeLuminance2(C,L,M));for(;$<m&&(E>0||R>0||B>0);)E-=Math.max(0,Math.ceil(.1*E)),R-=Math.max(0,Math.ceil(.1*R)),B-=Math.max(0,Math.ceil(.1*B)),$=c(o.relativeLuminance2(E,R,B),o.relativeLuminance2(C,L,M));return(E<<24|R<<16|B<<8|255)>>>0}function x(v,b,m){const C=v>>24&255,L=v>>16&255,M=v>>8&255;let E=b>>24&255,R=b>>16&255,B=b>>8&255,$=c(o.relativeLuminance2(E,R,B),o.relativeLuminance2(C,L,M));for(;$<m&&(E<255||R<255||B<255);)E=Math.min(255,E+Math.ceil(.1*(255-E))),R=Math.min(255,R+Math.ceil(.1*(255-R))),B=Math.min(255,B+Math.ceil(.1*(255-B))),$=c(o.relativeLuminance2(E,R,B),o.relativeLuminance2(C,L,M));return(E<<24|R<<16|B<<8|255)>>>0}l.blend=function(v,b){if(a=(255&b)/255,a===1)return b;const m=b>>24&255,C=b>>16&255,L=b>>8&255,M=v>>24&255,E=v>>16&255,R=v>>8&255;return u=M+Math.round((m-M)*a),f=E+Math.round((C-E)*a),_=R+Math.round((L-R)*a),p.toRgba(u,f,_)},l.ensureContrastRatio=function(v,b,m){const C=o.relativeLuminance(v>>8),L=o.relativeLuminance(b>>8);if(c(C,L)<m){if(L<C){const R=S(v,b,m),B=c(C,o.relativeLuminance(R>>8));if(B<m){const $=x(v,b,m);return B>c(C,o.relativeLuminance($>>8))?R:$}return R}const M=x(v,b,m),E=c(C,o.relativeLuminance(M>>8));if(E<m){const R=S(v,b,m);return E>c(C,o.relativeLuminance(R>>8))?M:R}return M}},l.reduceLuminance=S,l.increaseLuminance=x,l.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=c},345:(j,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=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===u)return void this._listeners.splice(f,1)}}})),this._event}fire(u,f){const _=[];for(let a=0;a<this._listeners.length;a++)_.push(this._listeners[a]);for(let a=0;a<_.length;a++)_[a].call(void 0,u,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(u,f){return u((_=>f.fire(_)))},n.runAndSubscribe=function(u,f){return f(void 0),u((_=>f(_)))}},859:(j,n)=>{function u(f){for(const _ of f)_.dispose();f.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 f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const _=this._disposables.indexOf(f);_!==-1&&this._disposables.splice(_,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var _;this._isDisposed||f===this._value||((_=this._value)==null||_.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},n.toDisposable=function(f){return{dispose:f}},n.disposeArray=u,n.getDisposeArrayDisposable=function(f){return{dispose:()=>u(f)}}},485:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(_,a,p){this._data[_]||(this._data[_]={}),this._data[_][a]=p}get(_,a){return this._data[_]?this._data[_][a]:void 0}clear(){this._data={}}}n.TwoKeyMap=u,n.FourKeyMap=class{constructor(){this._data=new u}set(f,_,a,p,w){this._data.get(f,_)||this._data.set(f,_,new u),this._data.get(f,_).set(a,p,w)}get(f,_,a,p){var w;return(w=this._data.get(f,_))==null?void 0:w.get(a,p)}clear(){this._data.clear()}}},399:(j,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 u=n.isNode?"node":navigator.userAgent,f=n.isNode?"node":navigator.platform;n.isFirefox=u.includes("Firefox"),n.isLegacyEdge=u.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(u),n.getSafariVersion=function(){if(!n.isSafari)return 0;const _=u.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),n.isIpad=f==="iPad",n.isIphone=f==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),n.isLinux=f.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(u)},385:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const f=u(399);class _{constructor(){this._tasks=[],this._i=0}enqueue(w){this._tasks.push(w),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(w){this._idleCallback=void 0;let y=0,o=0,r=w.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(y=Date.now(),this._tasks[this._i]()||this._i++,y=Math.max(1,Date.now()-y),o=Math.max(y,o),h=w.timeRemaining(),1.5*o>h)return r-y<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-y))}ms`),void this._start();r=h}this.clear()}}class a extends _{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const y=Date.now()+w;return{timeRemaining:()=>Math.max(0,y-Date.now())}}}n.PriorityTaskQueue=a,n.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:a,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},147:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(a){return[a>>>16&255,a>>>8&255,255&a]}static fromColorRGB(a){return(255&a[0])<<16|(255&a[1])<<8|255&a[2]}clone(){const a=new u;return a.fg=this.fg,a.bg=this.bg,a.extended=this.extended.clone(),a}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=u;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(a){this._ext=a}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(a){this._ext&=-469762049,this._ext|=a<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(a){this._ext&=-67108864,this._ext|=67108863&a}get urlId(){return this._urlId}set urlId(a){this._urlId=a}get underlineVariantOffset(){const a=(3758096384&this._ext)>>29;return a<0?4294967288^a:a}set underlineVariantOffset(a){this._ext&=536870911,this._ext|=a<<29&3758096384}constructor(a=0,p=0){this._ext=0,this._urlId=0,this._ext=a,this._urlId=p}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=f},782:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const f=u(133),_=u(855),a=u(147);class p extends a.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new a.ExtendedAttrs,this.combinedData=""}static fromCharData(y){const o=new p;return o.setFromCharData(y),o}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(y){this.fg=y[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let o=!1;if(y[_.CHAR_DATA_CHAR_INDEX].length>2)o=!0;else if(y[_.CHAR_DATA_CHAR_INDEX].length===2){const r=y[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=y[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|y[_.CHAR_DATA_WIDTH_INDEX]<<22:o=!0}else o=!0}else this.content=y[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|y[_.CHAR_DATA_WIDTH_INDEX]<<22;o&&(this.combinedData=y[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|y[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=p},855:(j,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:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},n.utf32ToString=function(u,f=0,_=u.length){let a="";for(let p=f;p<_;++p){let w=u[p];w>65535?(w-=65536,a+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):a+=String.fromCharCode(w)}return a},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,f){const _=u.length;if(!_)return 0;let a=0,p=0;if(this._interim){const w=u.charCodeAt(p++);56320<=w&&w<=57343?f[a++]=1024*(this._interim-55296)+w-56320+65536:(f[a++]=this._interim,f[a++]=w),this._interim=0}for(let w=p;w<_;++w){const y=u.charCodeAt(w);if(55296<=y&&y<=56319){if(++w>=_)return this._interim=y,a;const o=u.charCodeAt(w);56320<=o&&o<=57343?f[a++]=1024*(y-55296)+o-56320+65536:(f[a++]=y,f[a++]=o)}else y!==65279&&(f[a++]=y)}return a}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,f){const _=u.length;if(!_)return 0;let a,p,w,y,o=0,r=0,h=0;if(this.interim[0]){let S=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let v,b=0;for(;(v=63&this.interim[++b])&&b<4;)x<<=6,x|=v;const m=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,C=m-b;for(;h<C;){if(h>=_)return 0;if(v=u[h++],(192&v)!=128){h--,S=!0;break}this.interim[b++]=v,x<<=6,x|=63&v}S||(m===2?x<128?h--:f[o++]=x:m===3?x<2048||x>=55296&&x<=57343||x===65279||(f[o++]=x):x<65536||x>1114111||(f[o++]=x)),this.interim.fill(0)}const c=_-4;let l=h;for(;l<_;){for(;!(!(l<c)||128&(a=u[l])||128&(p=u[l+1])||128&(w=u[l+2])||128&(y=u[l+3]));)f[o++]=a,f[o++]=p,f[o++]=w,f[o++]=y,l+=4;if(a=u[l++],a<128)f[o++]=a;else if((224&a)==192){if(l>=_)return this.interim[0]=a,o;if(p=u[l++],(192&p)!=128){l--;continue}if(r=(31&a)<<6|63&p,r<128){l--;continue}f[o++]=r}else if((240&a)==224){if(l>=_)return this.interim[0]=a,o;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,o;if(w=u[l++],(192&w)!=128){l--;continue}if(r=(15&a)<<12|(63&p)<<6|63&w,r<2048||r>=55296&&r<=57343||r===65279)continue;f[o++]=r}else if((248&a)==240){if(l>=_)return this.interim[0]=a,o;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,o;if(w=u[l++],(192&w)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,this.interim[2]=w,o;if(y=u[l++],(192&y)!=128){l--;continue}if(r=(7&a)<<18|(63&p)<<12|(63&w)<<6|63&y,r<65536||r>1114111)continue;f[o++]=r}}return o}}},776:function(j,n,u){var f=this&&this.__decorate||function(r,h,c,l){var S,x=arguments.length,v=x<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,c):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,h,c,l);else for(var b=r.length-1;b>=0;b--)(S=r[b])&&(v=(x<3?S(v):x>3?S(h,c,v):S(h,c))||v);return x>3&&v&&Object.defineProperty(h,c,v),v},_=this&&this.__param||function(r,h){return function(c,l){h(c,l,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const a=u(859),p=u(97),w={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let y,o=n.LogService=class extends a.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),y=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let h=0;h<r.length;h++)typeof r[h]=="function"&&(r[h]=r[h]())}_log(r,h,c){this._evalLazyOptionalParams(c),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...c)}trace(r,...h){var c;this._logLevel<=p.LogLevelEnum.TRACE&&this._log(((c=this._optionsService.options.logger)==null?void 0:c.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var c;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log(((c=this._optionsService.options.logger)==null?void 0:c.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var c;this._logLevel<=p.LogLevelEnum.INFO&&this._log(((c=this._optionsService.options.logger)==null?void 0:c.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var c;this._logLevel<=p.LogLevelEnum.WARN&&this._log(((c=this._optionsService.options.logger)==null?void 0:c.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var c;this._logLevel<=p.LogLevelEnum.ERROR&&this._log(((c=this._optionsService.options.logger)==null?void 0:c.error.bind(this._optionsService.options.logger))??console.error,r,h)}};n.LogService=o=f([_(0,p.IOptionsService)],o),n.setTraceLogger=function(r){y=r},n.traceCall=function(r,h,c){if(typeof c.value!="function")throw new Error("not supported");const l=c.value;c.value=function(...S){if(y.logLevel!==p.LogLevelEnum.TRACE)return l.apply(this,S);y.trace(`GlyphRenderer#${l.name}(${S.map((v=>JSON.stringify(v))).join(", ")})`);const x=l.apply(this,S);return y.trace(`GlyphRenderer#${l.name} return`,x),x}}},726:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const u="di$target",f="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(_){return _[f]||[]},n.createDecorator=function(_){if(n.serviceRegistry.has(_))return n.serviceRegistry.get(_);const a=function(p,w,y){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(o,r,h){r[u]===r?r[f].push({id:o,index:h}):(r[f]=[{id:o,index:h}],r[u]=r)})(a,p,y)};return a.toString=()=>_,n.serviceRegistry.set(_,a),a}},97:(j,n,u)=>{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 f=u(726);var _;n.IBufferService=(0,f.createDecorator)("BufferService"),n.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),n.ICoreService=(0,f.createDecorator)("CoreService"),n.ICharsetService=(0,f.createDecorator)("CharsetService"),n.IInstantiationService=(0,f.createDecorator)("InstantiationService"),(function(a){a[a.TRACE=0]="TRACE",a[a.DEBUG=1]="DEBUG",a[a.INFO=2]="INFO",a[a.WARN=3]="WARN",a[a.ERROR=4]="ERROR",a[a.OFF=5]="OFF"})(_||(n.LogLevelEnum=_={})),n.ILogService=(0,f.createDecorator)("LogService"),n.IOptionsService=(0,f.createDecorator)("OptionsService"),n.IOscLinkService=(0,f.createDecorator)("OscLinkService"),n.IUnicodeService=(0,f.createDecorator)("UnicodeService"),n.IDecorationService=(0,f.createDecorator)("DecorationService")}},P={};function Z(j){var n=P[j];if(n!==void 0)return n.exports;var u=P[j]={exports:{}};return X[j].call(u.exports,u,u.exports,Z),u.exports}var ne={};return(()=>{var j=ne;Object.defineProperty(j,"__esModule",{value:!0}),j.WebglAddon=void 0;const n=Z(345),u=Z(859),f=Z(399),_=Z(666),a=Z(776);class p extends u.Disposable{constructor(y){if(f.isSafari&&(0,f.getSafariVersion)()<16){const o={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",o))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=y,this._onChangeTextureAtlas=this.register(new n.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new n.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new n.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new n.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(y){const o=y._core;if(!y.element)return void this.register(o.onWillOpen((()=>this.activate(y))));this._terminal=y;const r=o.coreService,h=o.optionsService,c=o,l=c._renderService,S=c._characterJoinerService,x=c._charSizeService,v=c._coreBrowserService,b=c._decorationService,m=c._logService,C=c._themeService;(0,a.setTraceLogger)(m),this._renderer=this.register(new _.WebglRenderer(y,S,x,v,r,b,h,C,this._preserveDrawingBuffer)),this.register((0,n.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,n.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,n.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,n.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),l.setRenderer(this._renderer),this.register((0,u.toDisposable)((()=>{const L=this._terminal._core._renderService;L.setRenderer(this._terminal._core._createRenderer()),L.handleResize(y.cols,y.rows)})))}get textureAtlas(){var y;return(y=this._renderer)==null?void 0:y.textureAtlas}clearTextureAtlas(){var y;(y=this._renderer)==null||y.clearTextureAtlas()}}j.WebglAddon=p})(),ne})()))})(zo)),zo.exports}var og=lg(),No={exports:{}},ef;function cg(){return ef||(ef=1,(function(U,G){(function(X,P){U.exports=P()})(self,(()=>(()=>{var X={903:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BaseRenderLayer=void 0;const f=u(274),_=u(627),a=u(237),p=u(860),w=u(374),y=u(296),o=u(345),r=u(859),h=u(399),c=u(855);class l extends r.Disposable{get canvas(){return this._canvas}get cacheCanvas(){var v;return(v=this._charAtlas)==null?void 0:v.pages[0].canvas}constructor(v,b,m,C,L,M,E,R,B,$){super(),this._terminal=v,this._container=b,this._alpha=L,this._themeService=M,this._bufferService=E,this._optionsService=R,this._decorationService=B,this._coreBrowserService=$,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._selectionModel=(0,y.createSelectionRenderModel)(),this._bitmapGenerator=[],this._charAtlasDisposable=this.register(new r.MutableDisposable),this._onAddTextureAtlasCanvas=this.register(new o.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._cellColorResolver=new f.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-${m}-layer`),this._canvas.style.zIndex=C.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,r.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,w.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(){}handleFocus(){}handleCursorMove(){}handleGridChanged(v,b){}handleSelectionChanged(v,b,m=!1){this._selectionModel.update(this._terminal._core,v,b,m)}_setTransparency(v){if(v===this._alpha)return;const b=this._canvas;this._alpha=v,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,b),this._refreshCharAtlas(this._themeService.colors),this.handleGridChanged(0,this._bufferService.rows-1)}_refreshCharAtlas(v){if(!(this._deviceCharWidth<=0&&this._deviceCharHeight<=0)){this._charAtlas=(0,_.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,v,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlasDisposable.value=(0,o.forwardEvent)(this._charAtlas.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),this._charAtlas.warmUp();for(let b=0;b<this._charAtlas.pages.length;b++)this._bitmapGenerator[b]=new S(this._charAtlas.pages[b].canvas)}}resize(v){this._deviceCellWidth=v.device.cell.width,this._deviceCellHeight=v.device.cell.height,this._deviceCharWidth=v.device.char.width,this._deviceCharHeight=v.device.char.height,this._deviceCharLeft=v.device.char.left,this._deviceCharTop=v.device.char.top,this._canvas.width=v.device.canvas.width,this._canvas.height=v.device.canvas.height,this._canvas.style.width=`${v.css.canvas.width}px`,this._canvas.style.height=`${v.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(this._themeService.colors)}clearTextureAtlas(){var v;(v=this._charAtlas)==null||v.clearTexture()}_fillCells(v,b,m,C){this._ctx.fillRect(v*this._deviceCellWidth,b*this._deviceCellHeight,m*this._deviceCellWidth,C*this._deviceCellHeight)}_fillMiddleLineAtCells(v,b,m=1){const C=Math.ceil(.5*this._deviceCellHeight);this._ctx.fillRect(v*this._deviceCellWidth,(b+1)*this._deviceCellHeight-C-this._coreBrowserService.dpr,m*this._deviceCellWidth,this._coreBrowserService.dpr)}_fillBottomLineAtCells(v,b,m=1,C=0){this._ctx.fillRect(v*this._deviceCellWidth,(b+1)*this._deviceCellHeight+C-this._coreBrowserService.dpr-1,m*this._deviceCellWidth,this._coreBrowserService.dpr)}_curlyUnderlineAtCell(v,b,m=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const C=this._coreBrowserService.dpr;this._ctx.lineWidth=C;for(let L=0;L<m;L++){const M=(v+L)*this._deviceCellWidth,E=(v+L+.5)*this._deviceCellWidth,R=(v+L+1)*this._deviceCellWidth,B=(b+1)*this._deviceCellHeight-C-1,$=B-C,N=B+C;this._ctx.moveTo(M,B),this._ctx.bezierCurveTo(M,$,E,$,E,B),this._ctx.bezierCurveTo(E,N,R,N,R,B)}this._ctx.stroke(),this._ctx.restore()}_dottedUnderlineAtCell(v,b,m=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const C=this._coreBrowserService.dpr;this._ctx.lineWidth=C,this._ctx.setLineDash([2*C,C]);const L=v*this._deviceCellWidth,M=(b+1)*this._deviceCellHeight-C-1;this._ctx.moveTo(L,M);for(let E=0;E<m;E++){const R=(v+m+E)*this._deviceCellWidth;this._ctx.lineTo(R,M)}this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_dashedUnderlineAtCell(v,b,m=1){this._ctx.save(),this._ctx.beginPath(),this._ctx.strokeStyle=this._ctx.fillStyle;const C=this._coreBrowserService.dpr;this._ctx.lineWidth=C,this._ctx.setLineDash([4*C,3*C]);const L=v*this._deviceCellWidth,M=(v+m)*this._deviceCellWidth,E=(b+1)*this._deviceCellHeight-C-1;this._ctx.moveTo(L,E),this._ctx.lineTo(M,E),this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_fillLeftLineAtCell(v,b,m){this._ctx.fillRect(v*this._deviceCellWidth,b*this._deviceCellHeight,this._coreBrowserService.dpr*m,this._deviceCellHeight)}_strokeRectAtCell(v,b,m,C){const L=this._coreBrowserService.dpr;this._ctx.lineWidth=L,this._ctx.strokeRect(v*this._deviceCellWidth+L/2,b*this._deviceCellHeight+L/2,m*this._deviceCellWidth-L,C*this._deviceCellHeight-L)}_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(v,b,m,C){this._alpha?this._ctx.clearRect(v*this._deviceCellWidth,b*this._deviceCellHeight,m*this._deviceCellWidth,C*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(v*this._deviceCellWidth,b*this._deviceCellHeight,m*this._deviceCellWidth,C*this._deviceCellHeight))}_fillCharTrueColor(v,b,m){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=a.TEXT_BASELINE,this._clipRow(m);let C=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(C=(0,p.tryDrawCustomChar)(this._ctx,v.getChars(),b*this._deviceCellWidth,m*this._deviceCellHeight,this._deviceCellWidth,this._deviceCellHeight,this._optionsService.rawOptions.fontSize,this._coreBrowserService.dpr)),C||this._ctx.fillText(v.getChars(),b*this._deviceCellWidth+this._deviceCharLeft,m*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_drawChars(v,b,m){var B,$,N,I;const C=v.getChars(),L=v.getCode(),M=v.getWidth();if(this._cellColorResolver.resolve(v,b,this._bufferService.buffer.ydisp+m,this._deviceCellWidth),!this._charAtlas)return;let E;if(E=C&&C.length>1?this._charAtlas.getRasterizedGlyphCombinedChar(C,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0):this._charAtlas.getRasterizedGlyph(v.getCode()||c.WHITESPACE_CELL_CODE,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,!0),!E.size.x||!E.size.y)return;this._ctx.save(),this._clipRow(m),this._bitmapGenerator[E.texturePage]&&this._charAtlas.pages[E.texturePage].canvas!==this._bitmapGenerator[E.texturePage].canvas&&(($=(B=this._bitmapGenerator[E.texturePage])==null?void 0:B.bitmap)==null||$.close(),delete this._bitmapGenerator[E.texturePage]),this._charAtlas.pages[E.texturePage].version!==((N=this._bitmapGenerator[E.texturePage])==null?void 0:N.version)&&(this._bitmapGenerator[E.texturePage]||(this._bitmapGenerator[E.texturePage]=new S(this._charAtlas.pages[E.texturePage].canvas)),this._bitmapGenerator[E.texturePage].refresh(),this._bitmapGenerator[E.texturePage].version=this._charAtlas.pages[E.texturePage].version);let R=E.size.x;this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,w.allowRescaling)(L,M,E.size.x,this._deviceCellWidth)&&(R=this._deviceCellWidth-1),this._ctx.drawImage(((I=this._bitmapGenerator[E.texturePage])==null?void 0:I.bitmap)||this._charAtlas.pages[E.texturePage].canvas,E.texturePosition.x,E.texturePosition.y,E.size.x,E.size.y,b*this._deviceCellWidth+this._deviceCharLeft-E.offset.x,m*this._deviceCellHeight+this._deviceCharTop-E.offset.y,R,E.size.y),this._ctx.restore()}_clipRow(v){this._ctx.beginPath(),this._ctx.rect(0,v*this._deviceCellHeight,this._bufferService.cols*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(v,b){return`${b?"italic":""} ${v?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize*this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`}}n.BaseRenderLayer=l;class S{get bitmap(){return this._bitmap}constructor(v){this.canvas=v,this._state=0,this._commitTimeout=void 0,this._bitmap=void 0,this.version=-1}refresh(){var v;(v=this._bitmap)==null||v.close(),this._bitmap=void 0,h.isSafari||(this._commitTimeout===void 0&&(this._commitTimeout=window.setTimeout((()=>this._generate()),100)),this._state===1&&(this._state=2))}_generate(){var v;this._state===0&&((v=this._bitmap)==null||v.close(),this._bitmap=void 0,this._state=1,window.createImageBitmap(this.canvas).then((b=>{this._state===2?this.refresh():this._bitmap=b,this._state=0})),this._commitTimeout&&(this._commitTimeout=void 0))}}},949:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CanvasRenderer=void 0;const f=u(627),_=u(56),a=u(374),p=u(345),w=u(859),y=u(873),o=u(43),r=u(630),h=u(744);class c extends w.Disposable{constructor(S,x,v,b,m,C,L,M,E,R,B){super(),this._terminal=S,this._screenElement=x,this._bufferService=b,this._charSizeService=m,this._optionsService=C,this._coreBrowserService=E,this._themeService=B,this._observerDisposable=this.register(new w.MutableDisposable),this._onRequestRedraw=this.register(new p.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onChangeTextureAtlas=this.register(new p.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new p.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;const $=this._optionsService.rawOptions.allowTransparency;this._renderLayers=[new h.TextRenderLayer(this._terminal,this._screenElement,0,$,this._bufferService,this._optionsService,L,R,this._coreBrowserService,B),new r.SelectionRenderLayer(this._terminal,this._screenElement,1,this._bufferService,this._coreBrowserService,R,this._optionsService,B),new o.LinkRenderLayer(this._terminal,this._screenElement,2,v,this._bufferService,this._optionsService,R,this._coreBrowserService,B),new y.CursorRenderLayer(this._terminal,this._screenElement,3,this._onRequestRedraw,this._bufferService,this._optionsService,M,this._coreBrowserService,R,B)];for(const N of this._renderLayers)(0,p.forwardEvent)(N.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas);this.dimensions=(0,a.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._observerDisposable.value=(0,_.observeDevicePixelDimensions)(this._renderLayers[0].canvas,this._coreBrowserService.window,((N,I)=>this._setCanvasDevicePixelDimensions(N,I))),this.register(this._coreBrowserService.onWindowChange((N=>{this._observerDisposable.value=(0,_.observeDevicePixelDimensions)(this._renderLayers[0].canvas,N,((I,F)=>this._setCanvasDevicePixelDimensions(I,F)))}))),this.register((0,w.toDisposable)((()=>{for(const N of this._renderLayers)N.dispose();(0,f.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(S,x){this._updateDimensions();for(const v of this._renderLayers)v.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((S=>S.handleBlur()))}handleFocus(){this._runOperation((S=>S.handleFocus()))}handleSelectionChanged(S,x,v=!1){this._runOperation((b=>b.handleSelectionChanged(S,x,v))),this._themeService.colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}handleCursorMove(){this._runOperation((S=>S.handleCursorMove()))}clear(){this._runOperation((S=>S.reset()))}_runOperation(S){for(const x of this._renderLayers)S(x)}renderRows(S,x){for(const v of this._renderLayers)v.handleGridChanged(S,x)}clearTextureAtlas(){for(const S of this._renderLayers)S.clearTextureAtlas()}_updateDimensions(){if(!this._charSizeService.hasValidSize)return;const S=this._coreBrowserService.dpr;this.dimensions.device.char.width=Math.floor(this._charSizeService.width*S),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*S),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/S),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/S),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(S,x){this.dimensions.device.canvas.height=x,this.dimensions.device.canvas.width=S;for(const v of this._renderLayers)v.resize(this.dimensions);this._requestRedrawViewport()}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}}n.CanvasRenderer=c},873:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorRenderLayer=void 0;const f=u(457),_=u(859),a=u(399),p=u(782),w=u(903);class y extends w.BaseRenderLayer{constructor(r,h,c,l,S,x,v,b,m,C){super(r,h,"cursor",c,!0,C,S,x,m,b),this._onRequestRedraw=l,this._coreService=v,this._cursorBlinkStateManager=this.register(new _.MutableDisposable),this._cell=new p.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(x.onOptionChange((()=>this._handleOptionsChanged()))),this._handleOptionsChanged()}resize(r){super.resize(r),this._state={x:0,y:0,isFocused:!1,style:"",width:0}}reset(){var r;this._clearCursor(),(r=this._cursorBlinkStateManager.value)==null||r.restartBlinkAnimation(),this._handleOptionsChanged()}handleBlur(){var r;(r=this._cursorBlinkStateManager.value)==null||r.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleFocus(){var r;(r=this._cursorBlinkStateManager.value)==null||r.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 f.CursorBlinkStateManager((()=>this._render(!0)),this._coreBrowserService)):this._cursorBlinkStateManager.clear(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})}handleCursorMove(){var r;(r=this._cursorBlinkStateManager.value)==null||r.restartBlinkAnimation()}handleGridChanged(r,h){!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isPaused?this._render(!1):this._cursorBlinkStateManager.value.restartBlinkAnimation()}_render(r){if(!this._coreService.isCursorInitialized||this._coreService.isCursorHidden)return void this._clearCursor();const h=this._bufferService.buffer.ybase+this._bufferService.buffer.y,c=h-this._bufferService.buffer.ydisp;if(c<0||c>=this._bufferService.rows)return void this._clearCursor();const l=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(h).loadCell(l,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 S=this._optionsService.rawOptions.cursorStyle,x=this._optionsService.rawOptions.cursorInactiveStyle;return x&&x!=="none"&&this._cursorRenderers[x](l,c,this._cell),this._ctx.restore(),this._state.x=l,this._state.y=c,this._state.isFocused=!1,this._state.style=S,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible){if(this._state){if(this._state.x===l&&this._state.y===c&&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"](l,c,this._cell),this._ctx.restore(),this._state.x=l,this._state.y=c,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(a.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(r,h,c){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillLeftLineAtCell(r,h,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()}_renderBlockCursor(r,h,c){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillCells(r,h,c.getWidth(),1),this._ctx.fillStyle=this._themeService.colors.cursorAccent.css,this._fillCharTrueColor(c,r,h),this._ctx.restore()}_renderUnderlineCursor(r,h,c){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillBottomLineAtCells(r,h),this._ctx.restore()}_renderOutlineCursor(r,h,c){this._ctx.save(),this._ctx.strokeStyle=this._themeService.colors.cursor.css,this._strokeRectAtCell(r,h,c.getWidth(),1),this._ctx.restore()}}n.CursorRenderLayer=y},574:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GridCache=void 0,n.GridCache=class{constructor(){this.cache=[]}resize(u,f){for(let _=0;_<u;_++){this.cache.length<=_&&this.cache.push([]);for(let a=this.cache[_].length;a<f;a++)this.cache[_].push(void 0);this.cache[_].length=f}this.cache.length=u}clear(){for(let u=0;u<this.cache.length;u++)for(let f=0;f<this.cache[u].length;f++)this.cache[u][f]=void 0}}},43:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkRenderLayer=void 0;const f=u(197),_=u(237),a=u(903);class p extends a.BaseRenderLayer{constructor(y,o,r,h,c,l,S,x,v){super(y,o,"link",r,!0,v,c,l,S,x),this.register(h.onShowLinkUnderline((b=>this._handleShowLinkUnderline(b)))),this.register(h.onHideLinkUnderline((b=>this._handleHideLinkUnderline(b))))}resize(y){super.resize(y),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 y=this._state.y2-this._state.y1-1;y>0&&this._clearCells(0,this._state.y1+1,this._state.cols,y),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(y){if(y.fg===_.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:y.fg&&(0,f.is256Color)(y.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[y.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,y.y1===y.y2)this._fillBottomLineAtCells(y.x1,y.y1,y.x2-y.x1);else{this._fillBottomLineAtCells(y.x1,y.y1,y.cols-y.x1);for(let o=y.y1+1;o<y.y2;o++)this._fillBottomLineAtCells(0,o,y.cols);this._fillBottomLineAtCells(0,y.y2,y.x2)}this._state=y}_handleHideLinkUnderline(y){this._clearCurrentLink()}}n.LinkRenderLayer=p},630:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionRenderLayer=void 0;const f=u(903);class _ extends f.BaseRenderLayer{constructor(p,w,y,o,r,h,c,l){super(p,w,"selection",y,!0,l,o,c,h,r),this._clearState()}_clearState(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}}resize(p){super.resize(p),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(p,w,y){super.handleSelectionChanged(p,w,y),this._redrawSelection(p,w,y)}_redrawSelection(p,w,y){if(!this._didStateChange(p,w,y,this._bufferService.buffer.ydisp))return;if(this._clearAll(),!p||!w)return void this._clearState();const o=p[1]-this._bufferService.buffer.ydisp,r=w[1]-this._bufferService.buffer.ydisp,h=Math.max(o,0),c=Math.min(r,this._bufferService.rows-1);if(h>=this._bufferService.rows||c<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,y){const l=p[0],S=w[0]-l,x=c-h+1;this._fillCells(l,h,S,x)}else{const l=o===h?p[0]:0,S=h===r?w[0]:this._bufferService.cols;this._fillCells(l,h,S-l,1);const x=Math.max(c-h-1,0);if(this._fillCells(0,h+1,this._bufferService.cols,x),h!==c){const v=r===c?w[0]:this._bufferService.cols;this._fillCells(0,c,v,1)}}this._state.start=[p[0],p[1]],this._state.end=[w[0],w[1]],this._state.columnSelectMode=y,this._state.ydisp=this._bufferService.buffer.ydisp}}_didStateChange(p,w,y,o){return!this._areCoordinatesEqual(p,this._state.start)||!this._areCoordinatesEqual(w,this._state.end)||y!==this._state.columnSelectMode||o!==this._state.ydisp}_areCoordinatesEqual(p,w){return!(!p||!w)&&p[0]===w[0]&&p[1]===w[1]}}n.SelectionRenderLayer=_},744:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextRenderLayer=void 0;const f=u(577),_=u(147),a=u(782),p=u(855),w=u(903),y=u(574);class o extends w.BaseRenderLayer{constructor(h,c,l,S,x,v,b,m,C,L){super(h,c,"text",l,S,L,x,v,m,C),this._characterJoinerService=b,this._characterWidth=0,this._characterFont="",this._characterOverlapCache={},this._workCell=new a.CellData,this._state=new y.GridCache,this.register(v.onSpecificOptionChange("allowTransparency",(M=>this._setTransparency(M))))}resize(h){super.resize(h);const c=this._getFont(!1,!1);this._characterWidth===h.device.char.width&&this._characterFont===c||(this._characterWidth=h.device.char.width,this._characterFont=c,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)}reset(){this._state.clear(),this._clearAll()}_forEachCell(h,c,l){for(let S=h;S<=c;S++){const x=S+this._bufferService.buffer.ydisp,v=this._bufferService.buffer.lines.get(x),b=this._characterJoinerService.getJoinedCharacters(x);for(let m=0;m<this._bufferService.cols;m++){v.loadCell(m,this._workCell);let C=this._workCell,L=!1,M=m;if(C.getWidth()!==0){if(b.length>0&&m===b[0][0]){L=!0;const E=b.shift();C=new f.JoinedCellData(this._workCell,v.translateToString(!0,E[0],E[1]),E[1]-E[0]),M=E[1]-1}!L&&this._isOverlapping(C)&&M<v.length-1&&v.getCodePoint(M+1)===p.NULL_CELL_CODE&&(C.content&=-12582913,C.content|=8388608),l(C,m,S),m=M}}}}_drawBackground(h,c){const l=this._ctx,S=this._bufferService.cols;let x=0,v=0,b=null;l.save(),this._forEachCell(h,c,((m,C,L)=>{let M=null;m.isInverse()?M=m.isFgDefault()?this._themeService.colors.foreground.css:m.isFgRGB()?`rgb(${_.AttributeData.toColorRGB(m.getFgColor()).join(",")})`:this._themeService.colors.ansi[m.getFgColor()].css:m.isBgRGB()?M=`rgb(${_.AttributeData.toColorRGB(m.getBgColor()).join(",")})`:m.isBgPalette()&&(M=this._themeService.colors.ansi[m.getBgColor()].css);let E=!1;this._decorationService.forEachDecorationAtCell(C,this._bufferService.buffer.ydisp+L,void 0,(R=>{R.options.layer!=="top"&&E||(R.backgroundColorRGB&&(M=R.backgroundColorRGB.css),E=R.options.layer==="top")})),b===null&&(x=C,v=L),L!==v?(l.fillStyle=b||"",this._fillCells(x,v,S-x,1),x=C,v=L):b!==M&&(l.fillStyle=b||"",this._fillCells(x,v,C-x,1),x=C,v=L),b=M})),b!==null&&(l.fillStyle=b,this._fillCells(x,v,S-x,1)),l.restore()}_drawForeground(h,c){this._forEachCell(h,c,((l,S,x)=>this._drawChars(l,S,x)))}handleGridChanged(h,c){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,h,this._bufferService.cols,c-h+1),this._drawBackground(h,c),this._drawForeground(h,c))}_isOverlapping(h){if(h.getWidth()!==1||h.getCode()<256)return!1;const c=h.getChars();if(this._characterOverlapCache.hasOwnProperty(c))return this._characterOverlapCache[c];this._ctx.save(),this._ctx.font=this._characterFont;const l=Math.floor(this._ctx.measureText(c).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[c]=l,l}}n.TextRenderLayer=o},274:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellColorResolver=void 0;const f=u(855),_=u(160),a=u(374);let p,w=0,y=0,o=!1,r=!1,h=!1,c=0;n.CellColorResolver=class{constructor(l,S,x,v,b,m){this._terminal=l,this._optionService=S,this._selectionRenderModel=x,this._decorationService=v,this._coreBrowserService=b,this._themeService=m,this.result={fg:0,bg:0,ext:0}}resolve(l,S,x,v){if(this.result.bg=l.bg,this.result.fg=l.fg,this.result.ext=268435456&l.bg?l.extended.ext:0,y=0,w=0,r=!1,o=!1,h=!1,p=this._themeService.colors,c=0,l.getCode()!==f.NULL_CELL_CODE&&l.extended.underlineStyle===4){const b=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));c=S*v%(2*Math.round(b))}if(this._decorationService.forEachDecorationAtCell(S,x,"bottom",(b=>{b.backgroundColorRGB&&(y=b.backgroundColorRGB.rgba>>8&16777215,r=!0),b.foregroundColorRGB&&(w=b.foregroundColorRGB.rgba>>8&16777215,o=!0)})),h=this._selectionRenderModel.isCellSelected(this._terminal,S,x),h){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:y=(16777215&this.result.fg)<<8|255;break;default:y=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:y=(16777215&this.result.bg)<<8|255}y=_.rgba.blend(y,4294967040&(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else y=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(r=!0,p.selectionForeground&&(w=p.selectionForeground.rgba>>8&16777215,o=!0),(0,a.treatGlyphAsBackgroundColor)(l.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)w=(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:w=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:w=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:w=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:w=(16777215&this.result.fg)<<8|255;break;default:w=this._themeService.colors.foreground.rgba}w=_.rgba.blend(w,4294967040&(this._coreBrowserService.isFocused?p.selectionBackgroundOpaque:p.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}o=!0}}this._decorationService.forEachDecorationAtCell(S,x,"top",(b=>{b.backgroundColorRGB&&(y=b.backgroundColorRGB.rgba>>8&16777215,r=!0),b.foregroundColorRGB&&(w=b.foregroundColorRGB.rgba>>8&16777215,o=!0)})),r&&(y=h?-16777216&l.bg&-134217729|y|50331648:-16777216&l.bg|y|50331648),o&&(w=-16777216&l.fg&-67108865|w|50331648),67108864&this.result.fg&&(r&&!o&&(w=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&p.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,o=!0),!r&&o&&(y=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&p.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,r=!0)),p=void 0,this.result.bg=r?y:this.result.bg,this.result.fg=o?w:this.result.fg,this.result.ext&=536870911,this.result.ext|=c<<29&3758096384}}},627:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.removeTerminalFromCache=n.acquireTextureAtlas=void 0;const f=u(509),_=u(197),a=[];n.acquireTextureAtlas=function(p,w,y,o,r,h,c,l){const S=(0,_.generateConfig)(o,r,h,c,w,y,l);for(let b=0;b<a.length;b++){const m=a[b],C=m.ownedBy.indexOf(p);if(C>=0){if((0,_.configEquals)(m.config,S))return m.atlas;m.ownedBy.length===1?(m.atlas.dispose(),a.splice(b,1)):m.ownedBy.splice(C,1);break}}for(let b=0;b<a.length;b++){const m=a[b];if((0,_.configEquals)(m.config,S))return m.ownedBy.push(p),m.atlas}const x=p._core,v={atlas:new f.TextureAtlas(document,S,x.unicodeService),config:S,ownedBy:[p]};return a.push(v),v.atlas},n.removeTerminalFromCache=function(p){for(let w=0;w<a.length;w++){const y=a[w].ownedBy.indexOf(p);if(y!==-1){a[w].ownedBy.length===1?(a[w].atlas.dispose(),a.splice(w,1)):a[w].ownedBy.splice(y,1);break}}}},197:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.is256Color=n.configEquals=n.generateConfig=void 0;const f=u(160);n.generateConfig=function(_,a,p,w,y,o,r){const h={foreground:o.foreground,background:o.background,cursor:f.NULL_COLOR,cursorAccent:f.NULL_COLOR,selectionForeground:f.NULL_COLOR,selectionBackgroundTransparent:f.NULL_COLOR,selectionBackgroundOpaque:f.NULL_COLOR,selectionInactiveBackgroundTransparent:f.NULL_COLOR,selectionInactiveBackgroundOpaque:f.NULL_COLOR,ansi:o.ansi.slice(),contrastCache:o.contrastCache,halfContrastCache:o.halfContrastCache};return{customGlyphs:y.customGlyphs,devicePixelRatio:r,letterSpacing:y.letterSpacing,lineHeight:y.lineHeight,deviceCellWidth:_,deviceCellHeight:a,deviceCharWidth:p,deviceCharHeight:w,fontFamily:y.fontFamily,fontSize:y.fontSize,fontWeight:y.fontWeight,fontWeightBold:y.fontWeightBold,allowTransparency:y.allowTransparency,drawBoldTextInBrightColors:y.drawBoldTextInBrightColors,minimumContrastRatio:y.minimumContrastRatio,colors:h}},n.configEquals=function(_,a){for(let p=0;p<_.colors.ansi.length;p++)if(_.colors.ansi[p].rgba!==a.colors.ansi[p].rgba)return!1;return _.devicePixelRatio===a.devicePixelRatio&&_.customGlyphs===a.customGlyphs&&_.lineHeight===a.lineHeight&&_.letterSpacing===a.letterSpacing&&_.fontFamily===a.fontFamily&&_.fontSize===a.fontSize&&_.fontWeight===a.fontWeight&&_.fontWeightBold===a.fontWeightBold&&_.allowTransparency===a.allowTransparency&&_.deviceCharWidth===a.deviceCharWidth&&_.deviceCharHeight===a.deviceCharHeight&&_.drawBoldTextInBrightColors===a.drawBoldTextInBrightColors&&_.minimumContrastRatio===a.minimumContrastRatio&&_.colors.foreground.rgba===a.colors.foreground.rgba&&_.colors.background.rgba===a.colors.background.rgba},n.is256Color=function(_){return(50331648&_)==16777216||(50331648&_)==33554432}},237:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const f=u(399);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},457:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorBlinkStateManager=void 0,n.CursorBlinkStateManager=class{constructor(u,f){this._renderCallback=u,this._coreBrowserService=f,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(u=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const f=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,f>0)return void this._restartInterval(f)}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 f=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(f)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),u)}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:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tryDrawCustomChar=n.powerlineDefinitions=n.boxDrawingDefinitions=n.blockElementDefinitions=void 0;const f=u(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 _={"░":[[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:(o,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"║":{1:(o,r)=>`M${.5-o},0 L${.5-o},1 M${.5+o},0 L${.5+o},1`},"╒":{1:(o,r)=>`M.5,1 L.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╓":{1:(o,r)=>`M${.5-o},1 L${.5-o},.5 L1,.5 M${.5+o},.5 L${.5+o},1`},"╔":{1:(o,r)=>`M1,${.5-r} L${.5-o},${.5-r} L${.5-o},1 M1,${.5+r} L${.5+o},${.5+r} L${.5+o},1`},"╕":{1:(o,r)=>`M0,${.5-r} L.5,${.5-r} L.5,1 M0,${.5+r} L.5,${.5+r}`},"╖":{1:(o,r)=>`M${.5+o},1 L${.5+o},.5 L0,.5 M${.5-o},.5 L${.5-o},1`},"╗":{1:(o,r)=>`M0,${.5+r} L${.5-o},${.5+r} L${.5-o},1 M0,${.5-r} L${.5+o},${.5-r} L${.5+o},1`},"╘":{1:(o,r)=>`M.5,0 L.5,${.5+r} L1,${.5+r} M.5,${.5-r} L1,${.5-r}`},"╙":{1:(o,r)=>`M1,.5 L${.5-o},.5 L${.5-o},0 M${.5+o},.5 L${.5+o},0`},"╚":{1:(o,r)=>`M1,${.5-r} L${.5+o},${.5-r} L${.5+o},0 M1,${.5+r} L${.5-o},${.5+r} L${.5-o},0`},"╛":{1:(o,r)=>`M0,${.5+r} L.5,${.5+r} L.5,0 M0,${.5-r} L.5,${.5-r}`},"╜":{1:(o,r)=>`M0,.5 L${.5+o},.5 L${.5+o},0 M${.5-o},.5 L${.5-o},0`},"╝":{1:(o,r)=>`M0,${.5-r} L${.5-o},${.5-r} L${.5-o},0 M0,${.5+r} L${.5+o},${.5+r} L${.5+o},0`},"╞":{1:(o,r)=>`M.5,0 L.5,1 M.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╟":{1:(o,r)=>`M${.5-o},0 L${.5-o},1 M${.5+o},0 L${.5+o},1 M${.5+o},.5 L1,.5`},"╠":{1:(o,r)=>`M${.5-o},0 L${.5-o},1 M1,${.5+r} L${.5+o},${.5+r} L${.5+o},1 M1,${.5-r} L${.5+o},${.5-r} L${.5+o},0`},"╡":{1:(o,r)=>`M.5,0 L.5,1 M0,${.5-r} L.5,${.5-r} M0,${.5+r} L.5,${.5+r}`},"╢":{1:(o,r)=>`M0,.5 L${.5-o},.5 M${.5-o},0 L${.5-o},1 M${.5+o},0 L${.5+o},1`},"╣":{1:(o,r)=>`M${.5+o},0 L${.5+o},1 M0,${.5+r} L${.5-o},${.5+r} L${.5-o},1 M0,${.5-r} L${.5-o},${.5-r} L${.5-o},0`},"╤":{1:(o,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r} M.5,${.5+r} L.5,1`},"╥":{1:(o,r)=>`M0,.5 L1,.5 M${.5-o},.5 L${.5-o},1 M${.5+o},.5 L${.5+o},1`},"╦":{1:(o,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L${.5-o},${.5+r} L${.5-o},1 M1,${.5+r} L${.5+o},${.5+r} L${.5+o},1`},"╧":{1:(o,r)=>`M.5,0 L.5,${.5-r} M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╨":{1:(o,r)=>`M0,.5 L1,.5 M${.5-o},.5 L${.5-o},0 M${.5+o},.5 L${.5+o},0`},"╩":{1:(o,r)=>`M0,${.5+r} L1,${.5+r} M0,${.5-r} L${.5-o},${.5-r} L${.5-o},0 M1,${.5-r} L${.5+o},${.5-r} L${.5+o},0`},"╪":{1:(o,r)=>`M.5,0 L.5,1 M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╫":{1:(o,r)=>`M0,.5 L1,.5 M${.5-o},0 L${.5-o},1 M${.5+o},0 L${.5+o},1`},"╬":{1:(o,r)=>`M0,${.5+r} L${.5-o},${.5+r} L${.5-o},1 M1,${.5+r} L${.5+o},${.5+r} L${.5+o},1 M0,${.5-r} L${.5-o},${.5-r} L${.5-o},0 M1,${.5-r} L${.5+o},${.5-r} L${.5+o},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:(o,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,1,.5`},"╮":{1:(o,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,0,.5`},"╯":{1:(o,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,0,.5`},"╰":{1:(o,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.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(o,r,h,c,l,S,x,v){const b=n.blockElementDefinitions[r];if(b)return(function(M,E,R,B,$,N){for(let I=0;I<E.length;I++){const F=E[I],D=$/8,O=N/8;M.fillRect(R+F.x*D,B+F.y*O,F.w*D,F.h*O)}})(o,b,h,c,l,S),!0;const m=_[r];if(m)return(function(M,E,R,B,$,N){let I=a.get(E);I||(I=new Map,a.set(E,I));const F=M.fillStyle;if(typeof F!="string")throw new Error(`Unexpected fillStyle type "${F}"`);let D=I.get(F);if(!D){const O=E[0].length,T=E.length,H=M.canvas.ownerDocument.createElement("canvas");H.width=O,H.height=T;const V=(0,f.throwIfFalsy)(H.getContext("2d")),Q=new ImageData(O,T);let ue,de,q,z;if(F.startsWith("#"))ue=parseInt(F.slice(1,3),16),de=parseInt(F.slice(3,5),16),q=parseInt(F.slice(5,7),16),z=F.length>7&&parseInt(F.slice(7,9),16)||1;else{if(!F.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${F}" when drawing pattern glyph`);[ue,de,q,z]=F.substring(5,F.length-1).split(",").map((se=>parseFloat(se)))}for(let se=0;se<T;se++)for(let ie=0;ie<O;ie++)Q.data[4*(se*O+ie)]=ue,Q.data[4*(se*O+ie)+1]=de,Q.data[4*(se*O+ie)+2]=q,Q.data[4*(se*O+ie)+3]=E[se][ie]*(255*z);V.putImageData(Q,0,0),D=(0,f.throwIfFalsy)(M.createPattern(H,null)),I.set(F,D)}M.fillStyle=D,M.fillRect(R,B,$,N)})(o,m,h,c,l,S),!0;const C=n.boxDrawingDefinitions[r];if(C)return(function(M,E,R,B,$,N,I){M.strokeStyle=M.fillStyle;for(const[F,D]of Object.entries(E)){let O;M.beginPath(),M.lineWidth=I*Number.parseInt(F),O=typeof D=="function"?D(.15,.15/N*$):D;for(const T of O.split(" ")){const H=T[0],V=w[H];if(!V){console.error(`Could not find drawing instructions for "${H}"`);continue}const Q=T.substring(1).split(",");Q[0]&&Q[1]&&V(M,y(Q,$,N,R,B,!0,I))}M.stroke(),M.closePath()}})(o,C,h,c,l,S,v),!0;const L=n.powerlineDefinitions[r];return!!L&&((function(M,E,R,B,$,N,I,F){const D=new Path2D;D.rect(R,B,$,N),M.clip(D),M.beginPath();const O=I/12;M.lineWidth=F*O;for(const T of E.d.split(" ")){const H=T[0],V=w[H];if(!V){console.error(`Could not find drawing instructions for "${H}"`);continue}const Q=T.substring(1).split(",");Q[0]&&Q[1]&&V(M,y(Q,$,N,R,B,!1,F,(E.leftPadding??0)*(O/2),(E.rightPadding??0)*(O/2)))}E.type===1?(M.strokeStyle=M.fillStyle,M.stroke()):M.fill(),M.closePath()})(o,L,h,c,l,S,x,v),!0)};const a=new Map;function p(o,r,h=0){return Math.max(Math.min(o,r),h)}const w={C:(o,r)=>o.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]),L:(o,r)=>o.lineTo(r[0],r[1]),M:(o,r)=>o.moveTo(r[0],r[1])};function y(o,r,h,c,l,S,x,v=0,b=0){const m=o.map((C=>parseFloat(C)||parseInt(C)));if(m.length<2)throw new Error("Too few arguments for instruction");for(let C=0;C<m.length;C+=2)m[C]*=r-v*x-b*x,S&&m[C]!==0&&(m[C]=p(Math.round(m[C]+.5)-.5,r,0)),m[C]+=c+v*x;for(let C=1;C<m.length;C+=2)m[C]*=h,S&&m[C]!==0&&(m[C]=p(Math.round(m[C]+.5)-.5,h,0)),m[C]+=l;return m}},56:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.observeDevicePixelDimensions=void 0;const f=u(859);n.observeDevicePixelDimensions=function(_,a,p){let w=new a.ResizeObserver((y=>{const o=y.find((c=>c.target===_));if(!o)return;if(!("devicePixelContentBoxSize"in o))return w==null||w.disconnect(),void(w=void 0);const r=o.devicePixelContentBoxSize[0].inlineSize,h=o.devicePixelContentBoxSize[0].blockSize;r>0&&h>0&&p(r,h)}));try{w.observe(_,{box:["device-pixel-content-box"]})}catch{w.disconnect(),w=void 0}return(0,f.toDisposable)((()=>w==null?void 0:w.disconnect()))}},374:(j,n)=>{function u(_){return 57508<=_&&_<=57558}function f(_){return _>=128512&&_<=128591||_>=127744&&_<=128511||_>=128640&&_<=128767||_>=9728&&_<=9983||_>=9984&&_<=10175||_>=65024&&_<=65039||_>=129280&&_<=129535||_>=127462&&_<=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(_){if(!_)throw new Error("value must not be falsy");return _},n.isPowerlineGlyph=u,n.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},n.isEmoji=f,n.allowRescaling=function(_,a,p,w){return a===1&&p>Math.ceil(1.5*w)&&_!==void 0&&_>255&&!f(_)&&!u(_)&&!(function(y){return 57344<=y&&y<=63743})(_)},n.treatGlyphAsBackgroundColor=function(_){return u(_)||(function(a){return 9472<=a&&a<=9631})(_)},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(_,a,p=0){return(_-(2*Math.round(a)-p))%(2*Math.round(a))}},296:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(_,a,p,w=!1){if(this.selectionStart=a,this.selectionEnd=p,!a||!p||a[0]===p[0]&&a[1]===p[1])return void this.clear();const y=_.buffers.active.ydisp,o=a[1]-y,r=p[1]-y,h=Math.max(o,0),c=Math.min(r,_.rows-1);h>=_.rows||c<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=o,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=c,this.startCol=a[0],this.endCol=p[0])}isCellSelected(_,a,p){return!!this.hasSelection&&(p-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?a>=this.startCol&&p>=this.viewportCappedStartRow&&a<this.endCol&&p<=this.viewportCappedEndRow:a<this.startCol&&p>=this.viewportCappedStartRow&&a>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&a>=this.startCol)}}n.createSelectionRenderModel=function(){return new u}},509:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextureAtlas=void 0;const f=u(237),_=u(860),a=u(374),p=u(160),w=u(345),y=u(485),o=u(385),r=u(147),h=u(855),c={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 l;class S{get pages(){return this._pages}constructor(C,L,M){this._document=C,this._config=L,this._unicodeService=M,this._didWarmUp=!1,this._cacheMap=new y.FourKeyMap,this._cacheMapCombined=new y.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new r.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new w.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new w.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=b(C,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,a.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const C of this.pages)C.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const C=new o.IdleTaskQueue;for(let L=33;L<126;L++)C.enqueue((()=>{if(!this._cacheMap.get(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT)){const M=this._drawToCache(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT);this._cacheMap.set(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT,M)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const C of this._pages)C.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(S.maxAtlasPages&&this._pages.length>=Math.max(4,S.maxAtlasPages)){const L=this._pages.filter((I=>2*I.canvas.width<=(S.maxTextureSize||4096))).sort(((I,F)=>F.canvas.width!==I.canvas.width?F.canvas.width-I.canvas.width:F.percentageUsed-I.percentageUsed));let M=-1,E=0;for(let I=0;I<L.length;I++)if(L[I].canvas.width!==E)M=I,E=L[I].canvas.width;else if(I-M==3)break;const R=L.slice(M,M+4),B=R.map((I=>I.glyphs[0].texturePage)).sort(((I,F)=>I>F?1:-1)),$=this.pages.length-R.length,N=this._mergePages(R,$);N.version++;for(let I=B.length-1;I>=0;I--)this._deletePage(B[I]);this.pages.push(N),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(N.canvas)}const C=new x(this._document,this._textureSize);return this._pages.push(C),this._activePages.push(C),this._onAddTextureAtlasCanvas.fire(C.canvas),C}_mergePages(C,L){const M=2*C[0].canvas.width,E=new x(this._document,M,C);for(const[R,B]of C.entries()){const $=R*B.canvas.width%M,N=Math.floor(R/2)*B.canvas.height;E.ctx.drawImage(B.canvas,$,N);for(const F of B.glyphs)F.texturePage=L,F.sizeClipSpace.x=F.size.x/M,F.sizeClipSpace.y=F.size.y/M,F.texturePosition.x+=$,F.texturePosition.y+=N,F.texturePositionClipSpace.x=F.texturePosition.x/M,F.texturePositionClipSpace.y=F.texturePosition.y/M;this._onRemoveTextureAtlasCanvas.fire(B.canvas);const I=this._activePages.indexOf(B);I!==-1&&this._activePages.splice(I,1)}return E}_deletePage(C){this._pages.splice(C,1);for(let L=C;L<this._pages.length;L++){const M=this._pages[L];for(const E of M.glyphs)E.texturePage--;M.version++}}getRasterizedGlyphCombinedChar(C,L,M,E,R){return this._getFromCacheMap(this._cacheMapCombined,C,L,M,E,R)}getRasterizedGlyph(C,L,M,E,R){return this._getFromCacheMap(this._cacheMap,C,L,M,E,R)}_getFromCacheMap(C,L,M,E,R,B=!1){return l=C.get(L,M,E,R),l||(l=this._drawToCache(L,M,E,R,B),C.set(L,M,E,R,l)),l}_getColorFromAnsiIndex(C){if(C>=this._config.colors.ansi.length)throw new Error("No color found for idx "+C);return this._config.colors.ansi[C]}_getBackgroundColor(C,L,M,E){if(this._config.allowTransparency)return p.NULL_COLOR;let R;switch(C){case 16777216:case 33554432:R=this._getColorFromAnsiIndex(L);break;case 50331648:const B=r.AttributeData.toColorRGB(L);R=p.channels.toColor(B[0],B[1],B[2]);break;default:R=M?p.color.opaque(this._config.colors.foreground):this._config.colors.background}return R}_getForegroundColor(C,L,M,E,R,B,$,N,I,F){const D=this._getMinimumContrastColor(C,L,M,E,R,B,$,I,N,F);if(D)return D;let O;switch(R){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&I&&B<8&&(B+=8),O=this._getColorFromAnsiIndex(B);break;case 50331648:const T=r.AttributeData.toColorRGB(B);O=p.channels.toColor(T[0],T[1],T[2]);break;default:O=$?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(O=p.color.opaque(O)),N&&(O=p.color.multiplyOpacity(O,f.DIM_OPACITY)),O}_resolveBackgroundRgba(C,L,M){switch(C){case 16777216:case 33554432:return this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return M?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(C,L,M,E){switch(C){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&E&&L<8&&(L+=8),this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return M?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(C,L,M,E,R,B,$,N,I,F){if(this._config.minimumContrastRatio===1||F)return;const D=this._getContrastCache(I),O=D.getColor(C,E);if(O!==void 0)return O||void 0;const T=this._resolveBackgroundRgba(L,M,$),H=this._resolveForegroundRgba(R,B,$,N),V=p.rgba.ensureContrastRatio(T,H,this._config.minimumContrastRatio/(I?2:1));if(!V)return void D.setColor(C,E,null);const Q=p.channels.toColor(V>>24&255,V>>16&255,V>>8&255);return D.setColor(C,E,Q),Q}_getContrastCache(C){return C?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(C,L,M,E,R=!1){const B=typeof C=="number"?String.fromCharCode(C):C,$=Math.min(this._config.deviceCellWidth*Math.max(B.length,2)+4,this._textureSize);this._tmpCanvas.width<$&&(this._tmpCanvas.width=$);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=M,this._workAttributeData.bg=L,this._workAttributeData.extended.ext=E,this._workAttributeData.isInvisible())return c;const I=!!this._workAttributeData.isBold(),F=!!this._workAttributeData.isInverse(),D=!!this._workAttributeData.isDim(),O=!!this._workAttributeData.isItalic(),T=!!this._workAttributeData.isUnderline(),H=!!this._workAttributeData.isStrikethrough(),V=!!this._workAttributeData.isOverline();let Q=this._workAttributeData.getFgColor(),ue=this._workAttributeData.getFgColorMode(),de=this._workAttributeData.getBgColor(),q=this._workAttributeData.getBgColorMode();if(F){const ce=Q;Q=de,de=ce;const ge=ue;ue=q,q=ge}const z=this._getBackgroundColor(q,de,F,D);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const se=I?this._config.fontWeightBold:this._config.fontWeight,ie=O?"italic":"";this._tmpCtx.font=`${ie} ${se} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=f.TEXT_BASELINE;const ve=B.length===1&&(0,a.isPowerlineGlyph)(B.charCodeAt(0)),fe=B.length===1&&(0,a.isRestrictedPowerlineGlyph)(B.charCodeAt(0)),Me=this._getForegroundColor(L,q,de,M,ue,Q,F,D,I,(0,a.treatGlyphAsBackgroundColor)(B.charCodeAt(0)));this._tmpCtx.fillStyle=Me.css;const _e=fe?0:4;let Oe=!1;this._config.customGlyphs!==!1&&(Oe=(0,_.tryDrawCustomChar)(this._tmpCtx,B,_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let qe,be=!ve;if(qe=typeof C=="number"?this._unicodeService.wcwidth(C):this._unicodeService.getStringCellWidth(C),T){this._tmpCtx.save();const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=ce%2==1?.5:0;if(this._tmpCtx.lineWidth=ce,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())be=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{be=!1;let Ie=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&Ie<8&&(Ie+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(Ie).css}this._tmpCtx.beginPath();const ze=_e,Re=Math.ceil(_e+this._config.deviceCharHeight)-ge-(R?2*ce:0),_t=Re+ce,Qe=Re+2*ce;let it=this._workAttributeData.getUnderlineVariantOffset();for(let Ie=0;Ie<qe;Ie++){this._tmpCtx.save();const Ae=ze+Ie*this._config.deviceCellWidth,Le=ze+(Ie+1)*this._config.deviceCellWidth,xt=Ae+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Le,Re),this._tmpCtx.moveTo(Ae,Qe),this._tmpCtx.lineTo(Le,Qe);break;case 3:const tt=ce<=1?Qe:Math.ceil(_e+this._config.deviceCharHeight-ce/2)-ge,vt=ce<=1?Re:Math.ceil(_e+this._config.deviceCharHeight+ce/2)-ge,ut=new Path2D;ut.rect(Ae,Re,this._config.deviceCellWidth,Qe-Re),this._tmpCtx.clip(ut),this._tmpCtx.moveTo(Ae-this._config.deviceCellWidth/2,_t),this._tmpCtx.bezierCurveTo(Ae-this._config.deviceCellWidth/2,vt,Ae,vt,Ae,_t),this._tmpCtx.bezierCurveTo(Ae,tt,xt,tt,xt,_t),this._tmpCtx.bezierCurveTo(xt,vt,Le,vt,Le,_t),this._tmpCtx.bezierCurveTo(Le,tt,Le+this._config.deviceCellWidth/2,tt,Le+this._config.deviceCellWidth/2,_t);break;case 4:const Zt=it===0?0:it>=ce?2*ce-it:ce-it;it>=ce||Zt===0?(this._tmpCtx.setLineDash([Math.round(ce),Math.round(ce)]),this._tmpCtx.moveTo(Ae+Zt,Re),this._tmpCtx.lineTo(Le,Re)):(this._tmpCtx.setLineDash([Math.round(ce),Math.round(ce)]),this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Ae+Zt,Re),this._tmpCtx.moveTo(Ae+Zt+ce,Re),this._tmpCtx.lineTo(Le,Re)),it=(0,a.computeNextVariantOffset)(Le-Ae,ce,it);break;case 5:const tr=.6,ir=.3,jt=Le-Ae,si=Math.floor(tr*jt),ri=Math.floor(ir*jt),Jt=jt-si-ri;this._tmpCtx.setLineDash([si,ri,Jt]),this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Le,Re);break;default:this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Le,Re)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Oe&&this._config.fontSize>=12&&!this._config.allowTransparency&&B!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Ie=this._tmpCtx.measureText(B);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Ie&&Ie.actualBoundingBoxDescent>0){this._tmpCtx.save();const Ae=new Path2D;Ae.rect(ze,Re-Math.ceil(ce/2),this._config.deviceCellWidth*qe,Qe-Re+Math.ceil(ce/2)),this._tmpCtx.clip(Ae),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=z.css,this._tmpCtx.strokeText(B,_e,_e+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(V){const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=ce%2==1?.5:0;this._tmpCtx.lineWidth=ce,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(_e,_e+ge),this._tmpCtx.lineTo(_e+this._config.deviceCharWidth*qe,_e+ge),this._tmpCtx.stroke()}if(Oe||this._tmpCtx.fillText(B,_e,_e+this._config.deviceCharHeight),B==="_"&&!this._config.allowTransparency){let ce=v(this._tmpCtx.getImageData(_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Me,be);if(ce)for(let ge=1;ge<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=z.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(B,_e,_e+this._config.deviceCharHeight-ge),ce=v(this._tmpCtx.getImageData(_e,_e,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Me,be),ce);ge++);}if(H){const ce=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),ge=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=ce,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(_e,_e+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.lineTo(_e+this._config.deviceCharWidth*qe,_e+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.stroke()}this._tmpCtx.restore();const ft=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let Ot;if(Ot=this._config.allowTransparency?(function(ce){for(let ge=0;ge<ce.data.length;ge+=4)if(ce.data[ge+3]>0)return!1;return!0})(ft):v(ft,z,Me,be),Ot)return c;const Se=this._findGlyphBoundingBox(ft,this._workBoundingBox,$,fe,Oe,_e);let pe,me;for(;;){if(this._activePages.length===0){const ce=this._createNewPage();pe=ce,me=ce.currentRow,me.height=Se.size.y;break}pe=this._activePages[this._activePages.length-1],me=pe.currentRow;for(const ce of this._activePages)Se.size.y<=ce.currentRow.height&&(pe=ce,me=ce.currentRow);for(let ce=this._activePages.length-1;ce>=0;ce--)for(const ge of this._activePages[ce].fixedRows)ge.height<=me.height&&Se.size.y<=ge.height&&(pe=this._activePages[ce],me=ge);if(me.y+Se.size.y>=pe.canvas.height||me.height>Se.size.y+2){let ce=!1;if(pe.currentRow.y+pe.currentRow.height+Se.size.y>=pe.canvas.height){let ge;for(const ze of this._activePages)if(ze.currentRow.y+ze.currentRow.height+Se.size.y<ze.canvas.height){ge=ze;break}if(ge)pe=ge;else if(S.maxAtlasPages&&this._pages.length>=S.maxAtlasPages&&me.y+Se.size.y<=pe.canvas.height&&me.height>=Se.size.y&&me.x+Se.size.x<=pe.canvas.width)ce=!0;else{const ze=this._createNewPage();pe=ze,me=ze.currentRow,me.height=Se.size.y,ce=!0}}ce||(pe.currentRow.height>0&&pe.fixedRows.push(pe.currentRow),me={x:0,y:pe.currentRow.y+pe.currentRow.height,height:Se.size.y},pe.fixedRows.push(me),pe.currentRow={x:0,y:me.y+me.height,height:0})}if(me.x+Se.size.x<=pe.canvas.width)break;me===pe.currentRow?(me.x=0,me.y+=me.height,me.height=0):pe.fixedRows.splice(pe.fixedRows.indexOf(me),1)}return Se.texturePage=this._pages.indexOf(pe),Se.texturePosition.x=me.x,Se.texturePosition.y=me.y,Se.texturePositionClipSpace.x=me.x/pe.canvas.width,Se.texturePositionClipSpace.y=me.y/pe.canvas.height,Se.sizeClipSpace.x/=pe.canvas.width,Se.sizeClipSpace.y/=pe.canvas.height,me.height=Math.max(me.height,Se.size.y),me.x+=Se.size.x,pe.ctx.putImageData(ft,Se.texturePosition.x-this._workBoundingBox.left,Se.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Se.size.x,Se.size.y),pe.addGlyph(Se),pe.version++,Se}_findGlyphBoundingBox(C,L,M,E,R,B){L.top=0;const $=E?this._config.deviceCellHeight:this._tmpCanvas.height,N=E?this._config.deviceCellWidth:M;let I=!1;for(let F=0;F<$;F++){for(let D=0;D<N;D++){const O=F*this._tmpCanvas.width*4+4*D+3;if(C.data[O]!==0){L.top=F,I=!0;break}}if(I)break}L.left=0,I=!1;for(let F=0;F<B+N;F++){for(let D=0;D<$;D++){const O=D*this._tmpCanvas.width*4+4*F+3;if(C.data[O]!==0){L.left=F,I=!0;break}}if(I)break}L.right=N,I=!1;for(let F=B+N-1;F>=B;F--){for(let D=0;D<$;D++){const O=D*this._tmpCanvas.width*4+4*F+3;if(C.data[O]!==0){L.right=F,I=!0;break}}if(I)break}L.bottom=$,I=!1;for(let F=$-1;F>=0;F--){for(let D=0;D<N;D++){const O=F*this._tmpCanvas.width*4+4*D+3;if(C.data[O]!==0){L.bottom=F,I=!0;break}}if(I)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:L.right-L.left+1,y:L.bottom-L.top+1},sizeClipSpace:{x:L.right-L.left+1,y:L.bottom-L.top+1},offset:{x:-L.left+B+(E||R?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-L.top+B+(E||R?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}n.TextureAtlas=S;class x{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(C){this._glyphs.push(C),this._usedPixels+=C.size.x*C.size.y}constructor(C,L,M){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],M)for(const E of M)this._glyphs.push(...E.glyphs),this._usedPixels+=E._usedPixels;this.canvas=b(C,L,L),this.ctx=(0,a.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 v(m,C,L,M){const E=C.rgba>>>24,R=C.rgba>>>16&255,B=C.rgba>>>8&255,$=L.rgba>>>24,N=L.rgba>>>16&255,I=L.rgba>>>8&255,F=Math.floor((Math.abs(E-$)+Math.abs(R-N)+Math.abs(B-I))/12);let D=!0;for(let O=0;O<m.data.length;O+=4)m.data[O]===E&&m.data[O+1]===R&&m.data[O+2]===B||M&&Math.abs(m.data[O]-E)+Math.abs(m.data[O+1]-R)+Math.abs(m.data[O+2]-B)<F?m.data[O+3]=0:D=!1;return D}function b(m,C,L){const M=m.createElement("canvas");return M.width=C,M.height=L,M}},577:function(j,n,u){var f=this&&this.__decorate||function(h,c,l,S){var x,v=arguments.length,b=v<3?c:S===null?S=Object.getOwnPropertyDescriptor(c,l):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(h,c,l,S);else for(var m=h.length-1;m>=0;m--)(x=h[m])&&(b=(v<3?x(b):v>3?x(c,l,b):x(c,l))||b);return v>3&&b&&Object.defineProperty(c,l,b),b},_=this&&this.__param||function(h,c){return function(l,S){c(l,S,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const a=u(147),p=u(855),w=u(782),y=u(97);class o extends a.AttributeData{constructor(c,l,S){super(),this.content=0,this.combinedData="",this.fg=c.fg,this.bg=c.bg,this.combinedData=l,this._width=S}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(c){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.JoinedCellData=o;let r=n.CharacterJoinerService=class hf{constructor(c){this._bufferService=c,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(c){const l={id:this._nextCharacterJoinerId++,handler:c};return this._characterJoiners.push(l),l.id}deregister(c){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===c)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(c){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(c);if(!l||l.length===0)return[];const S=[],x=l.translateToString(!0);let v=0,b=0,m=0,C=l.getFg(0),L=l.getBg(0);for(let M=0;M<l.getTrimmedLength();M++)if(l.loadCell(M,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==C||this._workCell.bg!==L){if(M-v>1){const E=this._getJoinedRanges(x,m,b,l,v);for(let R=0;R<E.length;R++)S.push(E[R])}v=M,m=b,C=this._workCell.fg,L=this._workCell.bg}b+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-v>1){const M=this._getJoinedRanges(x,m,b,l,v);for(let E=0;E<M.length;E++)S.push(M[E])}return S}_getJoinedRanges(c,l,S,x,v){const b=c.substring(l,S);let m=[];try{m=this._characterJoiners[0].handler(b)}catch(C){console.error(C)}for(let C=1;C<this._characterJoiners.length;C++)try{const L=this._characterJoiners[C].handler(b);for(let M=0;M<L.length;M++)hf._mergeRanges(m,L[M])}catch(L){console.error(L)}return this._stringRangesToCellRanges(m,x,v),m}_stringRangesToCellRanges(c,l,S){let x=0,v=!1,b=0,m=c[x];if(m){for(let C=S;C<this._bufferService.cols;C++){const L=l.getWidth(C),M=l.getString(C).length||p.WHITESPACE_CELL_CHAR.length;if(L!==0){if(!v&&m[0]<=b&&(m[0]=C,v=!0),m[1]<=b){if(m[1]=C,m=c[++x],!m)break;m[0]<=b?(m[0]=C,v=!0):v=!1}b+=M}}m&&(m[1]=this._bufferService.cols)}}static _mergeRanges(c,l){let S=!1;for(let x=0;x<c.length;x++){const v=c[x];if(S){if(l[1]<=v[0])return c[x-1][1]=l[1],c;if(l[1]<=v[1])return c[x-1][1]=Math.max(l[1],v[1]),c.splice(x,1),c;c.splice(x,1),x--}else{if(l[1]<=v[0])return c.splice(x,0,l),c;if(l[1]<=v[1])return v[0]=Math.min(l[0],v[0]),c;l[0]<v[1]&&(v[0]=Math.min(l[0],v[0]),S=!0)}}return S?c[c.length-1][1]=l[1]:c.push(l),c}};n.CharacterJoinerService=r=f([_(0,y.IBufferService)],r)},160:(j,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 u=0,f=0,_=0,a=0;var p,w,y,o,r;function h(l){const S=l.toString(16);return S.length<2?"0"+S:S}function c(l,S){return l<S?(S+.05)/(l+.05):(l+.05)/(S+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(S,x,v,b){return b!==void 0?`#${h(S)}${h(x)}${h(v)}${h(b)}`:`#${h(S)}${h(x)}${h(v)}`},l.toRgba=function(S,x,v,b=255){return(S<<24|x<<16|v<<8|b)>>>0},l.toColor=function(S,x,v,b){return{css:l.toCss(S,x,v,b),rgba:l.toRgba(S,x,v,b)}}})(p||(n.channels=p={})),(function(l){function S(x,v){return a=Math.round(255*v),[u,f,_]=r.toChannels(x.rgba),{css:p.toCss(u,f,_,a),rgba:p.toRgba(u,f,_,a)}}l.blend=function(x,v){if(a=(255&v.rgba)/255,a===1)return{css:v.css,rgba:v.rgba};const b=v.rgba>>24&255,m=v.rgba>>16&255,C=v.rgba>>8&255,L=x.rgba>>24&255,M=x.rgba>>16&255,E=x.rgba>>8&255;return u=L+Math.round((b-L)*a),f=M+Math.round((m-M)*a),_=E+Math.round((C-E)*a),{css:p.toCss(u,f,_),rgba:p.toRgba(u,f,_)}},l.isOpaque=function(x){return(255&x.rgba)==255},l.ensureContrastRatio=function(x,v,b){const m=r.ensureContrastRatio(x.rgba,v.rgba,b);if(m)return p.toColor(m>>24&255,m>>16&255,m>>8&255)},l.opaque=function(x){const v=(255|x.rgba)>>>0;return[u,f,_]=r.toChannels(v),{css:p.toCss(u,f,_),rgba:v}},l.opacity=S,l.multiplyOpacity=function(x,v){return a=255&x.rgba,S(x,a*v/255)},l.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(w||(n.color=w={})),(function(l){let S,x;try{const v=document.createElement("canvas");v.width=1,v.height=1;const b=v.getContext("2d",{willReadFrequently:!0});b&&(S=b,S.globalCompositeOperation="copy",x=S.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(v){if(v.match(/#[\da-f]{3,8}/i))switch(v.length){case 4:return u=parseInt(v.slice(1,2).repeat(2),16),f=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),p.toColor(u,f,_);case 5:return u=parseInt(v.slice(1,2).repeat(2),16),f=parseInt(v.slice(2,3).repeat(2),16),_=parseInt(v.slice(3,4).repeat(2),16),a=parseInt(v.slice(4,5).repeat(2),16),p.toColor(u,f,_,a);case 7:return{css:v,rgba:(parseInt(v.slice(1),16)<<8|255)>>>0};case 9:return{css:v,rgba:parseInt(v.slice(1),16)>>>0}}const b=v.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(b)return u=parseInt(b[1]),f=parseInt(b[2]),_=parseInt(b[3]),a=Math.round(255*(b[5]===void 0?1:parseFloat(b[5]))),p.toColor(u,f,_,a);if(!S||!x)throw new Error("css.toColor: Unsupported css format");if(S.fillStyle=x,S.fillStyle=v,typeof S.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(S.fillRect(0,0,1,1),[u,f,_,a]=S.getImageData(0,0,1,1).data,a!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(u,f,_,a),css:v}}})(y||(n.css=y={})),(function(l){function S(x,v,b){const m=x/255,C=v/255,L=b/255;return .2126*(m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4))+.7152*(C<=.03928?C/12.92:Math.pow((C+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}l.relativeLuminance=function(x){return S(x>>16&255,x>>8&255,255&x)},l.relativeLuminance2=S})(o||(n.rgb=o={})),(function(l){function S(v,b,m){const C=v>>24&255,L=v>>16&255,M=v>>8&255;let E=b>>24&255,R=b>>16&255,B=b>>8&255,$=c(o.relativeLuminance2(E,R,B),o.relativeLuminance2(C,L,M));for(;$<m&&(E>0||R>0||B>0);)E-=Math.max(0,Math.ceil(.1*E)),R-=Math.max(0,Math.ceil(.1*R)),B-=Math.max(0,Math.ceil(.1*B)),$=c(o.relativeLuminance2(E,R,B),o.relativeLuminance2(C,L,M));return(E<<24|R<<16|B<<8|255)>>>0}function x(v,b,m){const C=v>>24&255,L=v>>16&255,M=v>>8&255;let E=b>>24&255,R=b>>16&255,B=b>>8&255,$=c(o.relativeLuminance2(E,R,B),o.relativeLuminance2(C,L,M));for(;$<m&&(E<255||R<255||B<255);)E=Math.min(255,E+Math.ceil(.1*(255-E))),R=Math.min(255,R+Math.ceil(.1*(255-R))),B=Math.min(255,B+Math.ceil(.1*(255-B))),$=c(o.relativeLuminance2(E,R,B),o.relativeLuminance2(C,L,M));return(E<<24|R<<16|B<<8|255)>>>0}l.blend=function(v,b){if(a=(255&b)/255,a===1)return b;const m=b>>24&255,C=b>>16&255,L=b>>8&255,M=v>>24&255,E=v>>16&255,R=v>>8&255;return u=M+Math.round((m-M)*a),f=E+Math.round((C-E)*a),_=R+Math.round((L-R)*a),p.toRgba(u,f,_)},l.ensureContrastRatio=function(v,b,m){const C=o.relativeLuminance(v>>8),L=o.relativeLuminance(b>>8);if(c(C,L)<m){if(L<C){const R=S(v,b,m),B=c(C,o.relativeLuminance(R>>8));if(B<m){const $=x(v,b,m);return B>c(C,o.relativeLuminance($>>8))?R:$}return R}const M=x(v,b,m),E=c(C,o.relativeLuminance(M>>8));if(E<m){const R=S(v,b,m);return E>c(C,o.relativeLuminance(R>>8))?M:R}return M}},l.reduceLuminance=S,l.increaseLuminance=x,l.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=c},345:(j,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=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===u)return void this._listeners.splice(f,1)}}})),this._event}fire(u,f){const _=[];for(let a=0;a<this._listeners.length;a++)_.push(this._listeners[a]);for(let a=0;a<_.length;a++)_[a].call(void 0,u,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(u,f){return u((_=>f.fire(_)))},n.runAndSubscribe=function(u,f){return f(void 0),u((_=>f(_)))}},859:(j,n)=>{function u(f){for(const _ of f)_.dispose();f.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 f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const _=this._disposables.indexOf(f);_!==-1&&this._disposables.splice(_,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var _;this._isDisposed||f===this._value||((_=this._value)==null||_.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},n.toDisposable=function(f){return{dispose:f}},n.disposeArray=u,n.getDisposeArrayDisposable=function(f){return{dispose:()=>u(f)}}},485:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(_,a,p){this._data[_]||(this._data[_]={}),this._data[_][a]=p}get(_,a){return this._data[_]?this._data[_][a]:void 0}clear(){this._data={}}}n.TwoKeyMap=u,n.FourKeyMap=class{constructor(){this._data=new u}set(f,_,a,p,w){this._data.get(f,_)||this._data.set(f,_,new u),this._data.get(f,_).set(a,p,w)}get(f,_,a,p){var w;return(w=this._data.get(f,_))==null?void 0:w.get(a,p)}clear(){this._data.clear()}}},399:(j,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 u=n.isNode?"node":navigator.userAgent,f=n.isNode?"node":navigator.platform;n.isFirefox=u.includes("Firefox"),n.isLegacyEdge=u.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(u),n.getSafariVersion=function(){if(!n.isSafari)return 0;const _=u.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),n.isIpad=f==="iPad",n.isIphone=f==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),n.isLinux=f.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(u)},385:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const f=u(399);class _{constructor(){this._tasks=[],this._i=0}enqueue(w){this._tasks.push(w),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(w){this._idleCallback=void 0;let y=0,o=0,r=w.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(y=Date.now(),this._tasks[this._i]()||this._i++,y=Math.max(1,Date.now()-y),o=Math.max(y,o),h=w.timeRemaining(),1.5*o>h)return r-y<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-y))}ms`),void this._start();r=h}this.clear()}}class a extends _{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const y=Date.now()+w;return{timeRemaining:()=>Math.max(0,y-Date.now())}}}n.PriorityTaskQueue=a,n.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:a,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},147:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(a){return[a>>>16&255,a>>>8&255,255&a]}static fromColorRGB(a){return(255&a[0])<<16|(255&a[1])<<8|255&a[2]}clone(){const a=new u;return a.fg=this.fg,a.bg=this.bg,a.extended=this.extended.clone(),a}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=u;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(a){this._ext=a}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(a){this._ext&=-469762049,this._ext|=a<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(a){this._ext&=-67108864,this._ext|=67108863&a}get urlId(){return this._urlId}set urlId(a){this._urlId=a}get underlineVariantOffset(){const a=(3758096384&this._ext)>>29;return a<0?4294967288^a:a}set underlineVariantOffset(a){this._ext&=536870911,this._ext|=a<<29&3758096384}constructor(a=0,p=0){this._ext=0,this._urlId=0,this._ext=a,this._urlId=p}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=f},782:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const f=u(133),_=u(855),a=u(147);class p extends a.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new a.ExtendedAttrs,this.combinedData=""}static fromCharData(y){const o=new p;return o.setFromCharData(y),o}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(y){this.fg=y[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let o=!1;if(y[_.CHAR_DATA_CHAR_INDEX].length>2)o=!0;else if(y[_.CHAR_DATA_CHAR_INDEX].length===2){const r=y[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=y[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|y[_.CHAR_DATA_WIDTH_INDEX]<<22:o=!0}else o=!0}else this.content=y[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|y[_.CHAR_DATA_WIDTH_INDEX]<<22;o&&(this.combinedData=y[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|y[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=p},855:(j,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:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},n.utf32ToString=function(u,f=0,_=u.length){let a="";for(let p=f;p<_;++p){let w=u[p];w>65535?(w-=65536,a+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):a+=String.fromCharCode(w)}return a},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,f){const _=u.length;if(!_)return 0;let a=0,p=0;if(this._interim){const w=u.charCodeAt(p++);56320<=w&&w<=57343?f[a++]=1024*(this._interim-55296)+w-56320+65536:(f[a++]=this._interim,f[a++]=w),this._interim=0}for(let w=p;w<_;++w){const y=u.charCodeAt(w);if(55296<=y&&y<=56319){if(++w>=_)return this._interim=y,a;const o=u.charCodeAt(w);56320<=o&&o<=57343?f[a++]=1024*(y-55296)+o-56320+65536:(f[a++]=y,f[a++]=o)}else y!==65279&&(f[a++]=y)}return a}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,f){const _=u.length;if(!_)return 0;let a,p,w,y,o=0,r=0,h=0;if(this.interim[0]){let S=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let v,b=0;for(;(v=63&this.interim[++b])&&b<4;)x<<=6,x|=v;const m=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,C=m-b;for(;h<C;){if(h>=_)return 0;if(v=u[h++],(192&v)!=128){h--,S=!0;break}this.interim[b++]=v,x<<=6,x|=63&v}S||(m===2?x<128?h--:f[o++]=x:m===3?x<2048||x>=55296&&x<=57343||x===65279||(f[o++]=x):x<65536||x>1114111||(f[o++]=x)),this.interim.fill(0)}const c=_-4;let l=h;for(;l<_;){for(;!(!(l<c)||128&(a=u[l])||128&(p=u[l+1])||128&(w=u[l+2])||128&(y=u[l+3]));)f[o++]=a,f[o++]=p,f[o++]=w,f[o++]=y,l+=4;if(a=u[l++],a<128)f[o++]=a;else if((224&a)==192){if(l>=_)return this.interim[0]=a,o;if(p=u[l++],(192&p)!=128){l--;continue}if(r=(31&a)<<6|63&p,r<128){l--;continue}f[o++]=r}else if((240&a)==224){if(l>=_)return this.interim[0]=a,o;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,o;if(w=u[l++],(192&w)!=128){l--;continue}if(r=(15&a)<<12|(63&p)<<6|63&w,r<2048||r>=55296&&r<=57343||r===65279)continue;f[o++]=r}else if((248&a)==240){if(l>=_)return this.interim[0]=a,o;if(p=u[l++],(192&p)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,o;if(w=u[l++],(192&w)!=128){l--;continue}if(l>=_)return this.interim[0]=a,this.interim[1]=p,this.interim[2]=w,o;if(y=u[l++],(192&y)!=128){l--;continue}if(r=(7&a)<<18|(63&p)<<12|(63&w)<<6|63&y,r<65536||r>1114111)continue;f[o++]=r}}return o}}},776:function(j,n,u){var f=this&&this.__decorate||function(r,h,c,l){var S,x=arguments.length,v=x<3?h:l===null?l=Object.getOwnPropertyDescriptor(h,c):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,h,c,l);else for(var b=r.length-1;b>=0;b--)(S=r[b])&&(v=(x<3?S(v):x>3?S(h,c,v):S(h,c))||v);return x>3&&v&&Object.defineProperty(h,c,v),v},_=this&&this.__param||function(r,h){return function(c,l){h(c,l,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const a=u(859),p=u(97),w={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let y,o=n.LogService=class extends a.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),y=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let h=0;h<r.length;h++)typeof r[h]=="function"&&(r[h]=r[h]())}_log(r,h,c){this._evalLazyOptionalParams(c),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...c)}trace(r,...h){var c;this._logLevel<=p.LogLevelEnum.TRACE&&this._log(((c=this._optionsService.options.logger)==null?void 0:c.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var c;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log(((c=this._optionsService.options.logger)==null?void 0:c.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var c;this._logLevel<=p.LogLevelEnum.INFO&&this._log(((c=this._optionsService.options.logger)==null?void 0:c.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var c;this._logLevel<=p.LogLevelEnum.WARN&&this._log(((c=this._optionsService.options.logger)==null?void 0:c.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var c;this._logLevel<=p.LogLevelEnum.ERROR&&this._log(((c=this._optionsService.options.logger)==null?void 0:c.error.bind(this._optionsService.options.logger))??console.error,r,h)}};n.LogService=o=f([_(0,p.IOptionsService)],o),n.setTraceLogger=function(r){y=r},n.traceCall=function(r,h,c){if(typeof c.value!="function")throw new Error("not supported");const l=c.value;c.value=function(...S){if(y.logLevel!==p.LogLevelEnum.TRACE)return l.apply(this,S);y.trace(`GlyphRenderer#${l.name}(${S.map((v=>JSON.stringify(v))).join(", ")})`);const x=l.apply(this,S);return y.trace(`GlyphRenderer#${l.name} return`,x),x}}},726:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const u="di$target",f="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(_){return _[f]||[]},n.createDecorator=function(_){if(n.serviceRegistry.has(_))return n.serviceRegistry.get(_);const a=function(p,w,y){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(o,r,h){r[u]===r?r[f].push({id:o,index:h}):(r[f]=[{id:o,index:h}],r[u]=r)})(a,p,y)};return a.toString=()=>_,n.serviceRegistry.set(_,a),a}},97:(j,n,u)=>{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 f=u(726);var _;n.IBufferService=(0,f.createDecorator)("BufferService"),n.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),n.ICoreService=(0,f.createDecorator)("CoreService"),n.ICharsetService=(0,f.createDecorator)("CharsetService"),n.IInstantiationService=(0,f.createDecorator)("InstantiationService"),(function(a){a[a.TRACE=0]="TRACE",a[a.DEBUG=1]="DEBUG",a[a.INFO=2]="INFO",a[a.WARN=3]="WARN",a[a.ERROR=4]="ERROR",a[a.OFF=5]="OFF"})(_||(n.LogLevelEnum=_={})),n.ILogService=(0,f.createDecorator)("LogService"),n.IOptionsService=(0,f.createDecorator)("OptionsService"),n.IOscLinkService=(0,f.createDecorator)("OscLinkService"),n.IUnicodeService=(0,f.createDecorator)("UnicodeService"),n.IDecorationService=(0,f.createDecorator)("DecorationService")}},P={};function Z(j){var n=P[j];if(n!==void 0)return n.exports;var u=P[j]={exports:{}};return X[j].call(u.exports,u,u.exports,Z),u.exports}var ne={};return(()=>{var j=ne;Object.defineProperty(j,"__esModule",{value:!0}),j.CanvasAddon=void 0;const n=Z(345),u=Z(859),f=Z(776),_=Z(949);class a extends u.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 w;return(w=this._renderer)==null?void 0:w.textureAtlas}activate(w){const y=w._core;if(!w.element)return void this.register(y.onWillOpen((()=>this.activate(w))));this._terminal=w;const o=y.coreService,r=y.optionsService,h=y.screenElement,c=y.linkifier,l=y,S=l._bufferService,x=l._renderService,v=l._characterJoinerService,b=l._charSizeService,m=l._coreBrowserService,C=l._decorationService,L=l._logService,M=l._themeService;(0,f.setTraceLogger)(L),this._renderer=new _.CanvasRenderer(w,h,c,S,b,r,v,o,m,C,M),this.register((0,n.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,n.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),x.setRenderer(this._renderer),x.handleResize(S.cols,S.rows),this.register((0,u.toDisposable)((()=>{var E;x.setRenderer(this._terminal._core._createRenderer()),x.handleResize(w.cols,w.rows),(E=this._renderer)==null||E.dispose(),this._renderer=void 0})))}clearTextureAtlas(){var w;(w=this._renderer)==null||w.clearTextureAtlas()}}j.CanvasAddon=a})(),ne})()))})(No)),No.exports}var hg=cg();/**
115
115
  * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
116
116
  * @license MIT
117
117
  *
@@ -122,10 +122,10 @@ void main() {
122
122
  * Fabrice Bellard's javascript vt100 for jslinux:
123
123
  * http://bellard.org/jslinux/
124
124
  * Copyright (c) 2011 Fabrice Bellard
125
- */var ug=class{constructor(U,G,X,j={}){this._terminal=U,this._regex=G,this._handler=X,this._options=j}provideLinks(U,G){let X=fg.computeLink(U,this._regex,this._terminal,this._handler);G(this._addCallbacks(X))}_addCallbacks(U){return U.map(G=>(G.leave=this._options.leave,G.hover=(X,j)=>{if(this._options.hover){let{range:Z}=G;this._options.hover(X,j,Z)}},G))}};function dg(U){try{let G=new URL(U),X=G.password&&G.username?`${G.protocol}//${G.username}:${G.password}@${G.host}`:G.username?`${G.protocol}//${G.username}@${G.host}`:`${G.protocol}//${G.host}`;return U.toLocaleLowerCase().startsWith(X.toLocaleLowerCase())}catch{return!1}}var fg=class da{static computeLink(G,X,j,Z){let ne=new RegExp(X.source,(X.flags||"")+"g"),[$,n]=da._getWindowedLineStrings(G-1,j),u=$.join(""),f,_=[];for(;f=ne.exec(u);){let a=f[0];if(!dg(a))continue;let[p,b]=da._mapStrIdx(j,n,0,f.index),[w,c]=da._mapStrIdx(j,p,b,a.length);if(p===-1||b===-1||w===-1||c===-1)continue;let r={start:{x:b+1,y:p+1},end:{x:c,y:w+1}};_.push({range:r,text:a,activate:Z})}return _}static _getWindowedLineStrings(G,X){let j,Z=G,ne=G,$=0,n="",u=[];if(j=X.buffer.active.getLine(G)){let f=j.translateToString(!0);if(j.isWrapped&&f[0]!==" "){for($=0;(j=X.buffer.active.getLine(--Z))&&$<2048&&(n=j.translateToString(!0),$+=n.length,u.push(n),!(!j.isWrapped||n.indexOf(" ")!==-1)););u.reverse()}for(u.push(f),$=0;(j=X.buffer.active.getLine(++ne))&&j.isWrapped&&$<2048&&(n=j.translateToString(!0),$+=n.length,u.push(n),n.indexOf(" ")===-1););}return[u,Z]}static _mapStrIdx(G,X,j,Z){let ne=G.buffer.active,$=ne.getNullCell(),n=j;for(;Z;){let u=ne.getLine(X);if(!u)return[-1,-1];for(let f=n;f<u.length;++f){u.getCell(f,$);let _=$.getChars();if($.getWidth()&&(Z-=_.length||1,f===u.length-1&&_==="")){let a=ne.getLine(X+1);a&&a.isWrapped&&(a.getCell(0,$),$.getWidth()===2&&(Z+=1))}if(Z<0)return[X,f]}X++,n=0}return[X,n]}},_g=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function vg(U,G){let X=window.open();if(X){try{X.opener=null}catch{}X.location.href=G}else console.warn("Opening link blocked as opener could not be cleared")}var gg=class{constructor(U=vg,G={}){this._handler=U,this._options=G}activate(U){this._terminal=U;let G=this._options,X=G.urlRegex||_g;this._linkProvider=this._terminal.registerLinkProvider(new ug(this._terminal,X,this._handler,G))}dispose(){var U;(U=this._linkProvider)==null||U.dispose()}};const fa=new RegExp("(?<![a-zA-Z]:\\/\\/)(?:^|[\\s\"'`(\\[{])([./]?[\\w./-]+\\.[a-zA-Z]{1,10})(?::(\\d+)(?::(\\d+))?|\\((\\d+),(\\d+)\\))?","g");function uf(U){return!(!/\.[a-zA-Z]{1,10}(?::\d+(?::\d+)?|\(\d+,\d+\))?$/.test(U)||/^https?:\/\//i.test(U)||/^[a-z0-9-]+\.(com|org|net|io|dev|app|co)$/i.test(U))}const pg=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC");class mg{constructor(G,X,j,Z){this.terminal=G,this.onFileOpen=X,this.terminalId=j,this.decorationManager=Z}provideLinks(G,X){const j=this.terminal.buffer.active.getLine(G-1);if(!j){X(void 0);return}const Z=j.translateToString(),ne=new RegExp(fa.source,fa.flags),$=[];let n;for(;(n=ne.exec(Z))!==null;){const u=n[1];if(!u||!uf(u))continue;const f=n[2]?parseInt(n[2],10):n[4]?parseInt(n[4],10):void 0,_=n[3]?parseInt(n[3],10):n[5]?parseInt(n[5],10):void 0,a=n[0],p=a.indexOf(u),b=n.index+p,w=n.index+a.length,c=b,r=G-1;$.push({range:{start:{x:b+1,y:G},end:{x:w,y:G}},text:a.substring(p),decorations:{pointerCursor:!0,underline:!1},activate:(h,o)=>{(pg?!h.metaKey:!h.ctrlKey)||this.onFileOpen(u,f,_,this.terminalId)},hover:()=>{var h;(h=this.decorationManager)==null||h.highlightAt(r,c)},leave:()=>{var h;(h=this.decorationManager)==null||h.unhighlightAll()}})}X($.length>0?$:void 0)}}class Sg{constructor(G){ua(this,"disposables",[]);ua(this,"entries",[]);ua(this,"lastScannedLine",-1);this.terminal=G,this.disposables.push(G.onWriteParsed(()=>this.scanNewLines()))}highlightAt(G,X){for(const j of this.entries)j.marker.line===G&&j.x===X&&j.element&&j.element.classList.add("file-path-decoration-hover")}unhighlightAll(){var G;for(const X of this.entries)(G=X.element)==null||G.classList.remove("file-path-decoration-hover")}scanNewLines(){const G=this.terminal.buffer.active,X=G.baseY+G.cursorY;for(let j=this.lastScannedLine+1;j<=X;j++)this.decorateLine(j);this.lastScannedLine=X}decorateLine(G){const X=this.terminal.buffer.active,j=X.getLine(G);if(!j)return;const Z=j.translateToString(),ne=new RegExp(fa.source,fa.flags);let $;for(;($=ne.exec(Z))!==null;){const n=$[1];if(!n||!uf(n))continue;const u=$[0],f=u.indexOf(n),_=$.index+f,a=u.length-f,p=X.baseY+X.cursorY,b=G-p,w=this.terminal.registerMarker(b);if(!w||w.line===-1)continue;const c={marker:w,x:_},r=this.terminal.registerDecoration({marker:w,x:_,width:a});r&&(r.onRender(h=>{h.classList.add("file-path-decoration"),c.element=h}),this.disposables.push(r)),this.entries.push(c),this.disposables.push(w)}}dispose(){for(const G of this.disposables)G.dispose();this.disposables=[],this.entries=[],this.lastScannedLine=-1}}const Cg=0,df=1;function tf({wsPath:U,onFileOpen:G}){const X=we.useRef(null),j=we.useRef(null),Z=we.useRef(null),ne=we.useRef(null),$=we.useRef("");return we.useEffect(()=>{if(!X.current)return;const n=new rg.Terminal({cursorBlink:!0,fontSize:13,lineHeight:1,fontFamily:'Menlo, Monaco, "Courier New", monospace',customGlyphs:!0,theme:{background:"#1a1a1a",foreground:"#e0e0e0",cursor:"#ffffff"},allowProposedApi:!0});j.current=n;const u=new ag.FitAddon;ne.current=u,n.loadAddon(u),n.open(X.current);const f=()=>{try{n.loadAddon(new hg.CanvasAddon)}catch{}};try{const F=new og.WebglAddon;F.onContextLoss(()=>{F.dispose(),f()}),n.loadAddon(F)}catch{f()}const _=new gg((F,N)=>{F.preventDefault(),window.open(N,"_blank")});n.loadAddon(_);const a=U.split("/").pop();let p=null,b=null;if(G){b=new Sg(n);const F=new mg(n,(N,I,P,R)=>{G(N,I,P,R)},a,b);p=n.registerLinkProvider(F)}const w=navigator.platform.toUpperCase().includes("MAC"),c=n.onSelectionChange(()=>{const F=n.getSelection();F&&($.current=F)}),r=X.current,h=()=>{const F=$.current;F&&(navigator.clipboard.writeText(F).catch(()=>{}),$.current="")};r.addEventListener("mouseup",h),n.attachCustomKeyEventHandler(F=>{var I;return F.type!=="keydown"||!(w?F.metaKey:F.ctrlKey&&F.shiftKey)?!0:F.key==="v"||F.key==="V"?(F.preventDefault(),(I=navigator.clipboard)==null||I.readText().then(P=>{P&&n.paste(P)}).catch(()=>{}),!1):!0});let o=null;const l=()=>{o&&clearTimeout(o),o=setTimeout(()=>{o=null,u.fit()},150)};u.fit();const S=setTimeout(l,300),v=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}${U}`,y=new WebSocket(v);y.binaryType="arraybuffer",Z.current=y;let m="",C=!0,L=null;const A=F=>(F=F.replace(/\x1b\[[\?>][\d;]*c/g,""),F=F.replace(/\[[\?>][\d;]*c/g,""),F),E=()=>{if(C=!1,L=null,m){const F=A(m);F&&n.write(F),m=""}l()};y.onopen=()=>{sf(y,"resize",{cols:n.cols,rows:n.rows})},y.onmessage=F=>{const N=new Uint8Array(F.data);if(N.length===0)return;const I=N[0],P=N.subarray(1);if(I===df){const R=new TextDecoder().decode(P);if(C)m+=R,L||(L=setTimeout(E,500));else{const B=A(R);B&&n.write(B)}}},y.onclose=()=>{n.write(`\r
125
+ */var ug=class{constructor(U,G,X,P={}){this._terminal=U,this._regex=G,this._handler=X,this._options=P}provideLinks(U,G){let X=fg.computeLink(U,this._regex,this._terminal,this._handler);G(this._addCallbacks(X))}_addCallbacks(U){return U.map(G=>(G.leave=this._options.leave,G.hover=(X,P)=>{if(this._options.hover){let{range:Z}=G;this._options.hover(X,P,Z)}},G))}};function dg(U){try{let G=new URL(U),X=G.password&&G.username?`${G.protocol}//${G.username}:${G.password}@${G.host}`:G.username?`${G.protocol}//${G.username}@${G.host}`:`${G.protocol}//${G.host}`;return U.toLocaleLowerCase().startsWith(X.toLocaleLowerCase())}catch{return!1}}var fg=class da{static computeLink(G,X,P,Z){let ne=new RegExp(X.source,(X.flags||"")+"g"),[j,n]=da._getWindowedLineStrings(G-1,P),u=j.join(""),f,_=[];for(;f=ne.exec(u);){let a=f[0];if(!dg(a))continue;let[p,w]=da._mapStrIdx(P,n,0,f.index),[y,o]=da._mapStrIdx(P,p,w,a.length);if(p===-1||w===-1||y===-1||o===-1)continue;let r={start:{x:w+1,y:p+1},end:{x:o,y:y+1}};_.push({range:r,text:a,activate:Z})}return _}static _getWindowedLineStrings(G,X){let P,Z=G,ne=G,j=0,n="",u=[];if(P=X.buffer.active.getLine(G)){let f=P.translateToString(!0);if(P.isWrapped&&f[0]!==" "){for(j=0;(P=X.buffer.active.getLine(--Z))&&j<2048&&(n=P.translateToString(!0),j+=n.length,u.push(n),!(!P.isWrapped||n.indexOf(" ")!==-1)););u.reverse()}for(u.push(f),j=0;(P=X.buffer.active.getLine(++ne))&&P.isWrapped&&j<2048&&(n=P.translateToString(!0),j+=n.length,u.push(n),n.indexOf(" ")===-1););}return[u,Z]}static _mapStrIdx(G,X,P,Z){let ne=G.buffer.active,j=ne.getNullCell(),n=P;for(;Z;){let u=ne.getLine(X);if(!u)return[-1,-1];for(let f=n;f<u.length;++f){u.getCell(f,j);let _=j.getChars();if(j.getWidth()&&(Z-=_.length||1,f===u.length-1&&_==="")){let a=ne.getLine(X+1);a&&a.isWrapped&&(a.getCell(0,j),j.getWidth()===2&&(Z+=1))}if(Z<0)return[X,f]}X++,n=0}return[X,n]}},_g=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function vg(U,G){let X=window.open();if(X){try{X.opener=null}catch{}X.location.href=G}else console.warn("Opening link blocked as opener could not be cleared")}var gg=class{constructor(U=vg,G={}){this._handler=U,this._options=G}activate(U){this._terminal=U;let G=this._options,X=G.urlRegex||_g;this._linkProvider=this._terminal.registerLinkProvider(new ug(this._terminal,X,this._handler,G))}dispose(){var U;(U=this._linkProvider)==null||U.dispose()}};const fa=new RegExp("(?<![a-zA-Z]:\\/\\/)(?:^|[\\s\"'`(\\[{])([./]?[\\w./-]+\\.[a-zA-Z]{1,10})(?::(\\d+)(?::(\\d+))?|\\((\\d+),(\\d+)\\))?","g");function uf(U){return!(!/\.[a-zA-Z]{1,10}(?::\d+(?::\d+)?|\(\d+,\d+\))?$/.test(U)||/^https?:\/\//i.test(U)||/^[a-z0-9-]+\.(com|org|net|io|dev|app|co)$/i.test(U))}const pg=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC");class mg{constructor(G,X,P,Z){this.terminal=G,this.onFileOpen=X,this.terminalId=P,this.decorationManager=Z}provideLinks(G,X){const P=this.terminal.buffer.active.getLine(G-1);if(!P){X(void 0);return}const Z=P.translateToString(),ne=new RegExp(fa.source,fa.flags),j=[];let n;for(;(n=ne.exec(Z))!==null;){const u=n[1];if(!u||!uf(u))continue;const f=n[2]?parseInt(n[2],10):n[4]?parseInt(n[4],10):void 0,_=n[3]?parseInt(n[3],10):n[5]?parseInt(n[5],10):void 0,a=n[0],p=a.indexOf(u),w=n.index+p,y=n.index+a.length,o=w,r=G-1;j.push({range:{start:{x:w+1,y:G},end:{x:y,y:G}},text:a.substring(p),decorations:{pointerCursor:!0,underline:!1},activate:(h,c)=>{(pg?!h.metaKey:!h.ctrlKey)||this.onFileOpen(u,f,_,this.terminalId)},hover:()=>{var h;(h=this.decorationManager)==null||h.highlightAt(r,o)},leave:()=>{var h;(h=this.decorationManager)==null||h.unhighlightAll()}})}X(j.length>0?j:void 0)}}class Sg{constructor(G){ua(this,"disposables",[]);ua(this,"entries",[]);ua(this,"lastScannedLine",-1);this.terminal=G,this.disposables.push(G.onWriteParsed(()=>this.scanNewLines()))}highlightAt(G,X){for(const P of this.entries)P.marker.line===G&&P.x===X&&P.element&&P.element.classList.add("file-path-decoration-hover")}unhighlightAll(){var G;for(const X of this.entries)(G=X.element)==null||G.classList.remove("file-path-decoration-hover")}scanNewLines(){const G=this.terminal.buffer.active,X=G.baseY+G.cursorY;for(let P=this.lastScannedLine+1;P<=X;P++)this.decorateLine(P);this.lastScannedLine=X}decorateLine(G){const X=this.terminal.buffer.active,P=X.getLine(G);if(!P)return;const Z=P.translateToString(),ne=new RegExp(fa.source,fa.flags);let j;for(;(j=ne.exec(Z))!==null;){const n=j[1];if(!n||!uf(n))continue;const u=j[0],f=u.indexOf(n),_=j.index+f,a=u.length-f,p=X.baseY+X.cursorY,w=G-p,y=this.terminal.registerMarker(w);if(!y||y.line===-1)continue;const o={marker:y,x:_},r=this.terminal.registerDecoration({marker:y,x:_,width:a});r&&(r.onRender(h=>{h.classList.add("file-path-decoration"),o.element=h}),this.disposables.push(r)),this.entries.push(o),this.disposables.push(y)}}dispose(){for(const G of this.disposables)G.dispose();this.disposables=[],this.entries=[],this.lastScannedLine=-1}}const Cg=0,df=1;function tf({wsPath:U,onFileOpen:G}){const X=xe.useRef(null),P=xe.useRef(null),Z=xe.useRef(null),ne=xe.useRef(null);return xe.useEffect(()=>{if(!X.current)return;const j=new rg.Terminal({cursorBlink:!0,fontSize:13,lineHeight:1,fontFamily:'Menlo, Monaco, "Courier New", monospace',customGlyphs:!0,theme:{background:"#1a1a1a",foreground:"#e0e0e0",cursor:"#ffffff"},allowProposedApi:!0});P.current=j;const n=new ag.FitAddon;ne.current=n,j.loadAddon(n),j.open(X.current);const u=()=>{try{j.loadAddon(new hg.CanvasAddon)}catch{}};try{const M=new og.WebglAddon;M.onContextLoss(()=>{M.dispose(),u()}),j.loadAddon(M)}catch{u()}const f=new gg((M,E)=>{M.preventDefault(),window.open(E,"_blank")});j.loadAddon(f);const _=U.split("/").pop();let a=null,p=null;if(G){p=new Sg(j);const M=new mg(j,(E,R,B,$)=>{G(E,R,B,$)},_,p);a=j.registerLinkProvider(M)}const w=navigator.platform.toUpperCase().includes("MAC");j.attachCustomKeyEventHandler(M=>{var R;if(M.type!=="keydown"||!(w?M.metaKey:M.ctrlKey&&M.shiftKey))return!0;if(M.key==="c"||M.key==="C"){const B=j.getSelection();return B?(M.preventDefault(),navigator.clipboard.writeText(B).catch(()=>{}),!1):!0}return M.key==="v"||M.key==="V"?(M.preventDefault(),(R=navigator.clipboard)==null||R.readText().then(B=>{B&&j.paste(B)}).catch(()=>{}),!1):!0});let y=null;const o=()=>{y&&clearTimeout(y),y=setTimeout(()=>{y=null,n.fit()},150)};n.fit();const r=setTimeout(o,300),c=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}${U}`,l=new WebSocket(c);l.binaryType="arraybuffer",Z.current=l;let S="",x=!0,v=null;const b=M=>(M=M.replace(/\x1b\[[\?>][\d;]*c/g,""),M=M.replace(/\[[\?>][\d;]*c/g,""),M),m=()=>{if(x=!1,v=null,S){const M=b(S);M&&j.write(M),S=""}o()};l.onopen=()=>{sf(l,"resize",{cols:j.cols,rows:j.rows})},l.onmessage=M=>{const E=new Uint8Array(M.data);if(E.length===0)return;const R=E[0],B=E.subarray(1);if(R===df){const $=new TextDecoder().decode(B);if(x)S+=$,v||(v=setTimeout(m,500));else{const N=b($);N&&j.write(N)}}},l.onclose=()=>{j.write(`\r
126
126
  \x1B[90m[Terminal disconnected]\x1B[0m\r
127
- `)},y.onerror=()=>{n.write(`\r
127
+ `)},l.onerror=()=>{j.write(`\r
128
128
  \x1B[31m[WebSocket error]\x1B[0m\r
129
- `)},n.onData(F=>{y.readyState===WebSocket.OPEN&&yg(y,F)}),n.onResize(({cols:F,rows:N})=>{y.readyState===WebSocket.OPEN&&sf(y,"resize",{cols:F,rows:N})});const D=new ResizeObserver(l);D.observe(X.current);const O=()=>{document.hidden||l()};return document.addEventListener("visibilitychange",O),()=>{clearTimeout(S),o&&clearTimeout(o),L&&clearTimeout(L),b==null||b.dispose(),p==null||p.dispose(),c.dispose(),r.removeEventListener("mouseup",h),D.disconnect(),document.removeEventListener("visibilitychange",O),y.close(),n.dispose(),j.current=null,Z.current=null,ne.current=null}},[U]),K.jsx("div",{ref:X,className:"terminal-container",style:{width:"100%",height:"100%",backgroundColor:"#1a1a1a"}})}function yg(U,G){const X=new TextEncoder().encode(G),j=new Uint8Array(1+X.length);j[0]=df,j.set(X,1),U.send(j.buffer)}function sf(U,G,X){const j=JSON.stringify({type:G,payload:X}),Z=new TextEncoder().encode(j),ne=new Uint8Array(1+Z.length);ne[0]=Cg,ne.set(Z,1),U.send(ne.buffer)}function bg(U,G){const X=U.replace(/^\//,"");return G.staged.some(j=>X.endsWith(j)||j.endsWith(X))?{indicator:"A",className:"git-staged"}:G.modified.some(j=>X.endsWith(j)||j.endsWith(X))?{indicator:"M",className:"git-modified"}:G.untracked.some(j=>X.endsWith(j)||j.endsWith(X))?{indicator:"?",className:"git-untracked"}:null}function ff({entry:U,expanded:G,gitStatus:X,onToggle:j,onOpen:Z,depth:ne=0}){var f;const $=U.type==="directory",n=G.has(U.path),u=$?null:bg(U.path,X);return K.jsxs(K.Fragment,{children:[K.jsxs("div",{className:`file-node ${$?"directory":"file"}`,style:{paddingLeft:`${ne*16+8}px`},onClick:()=>$?j(U.path):Z(U.path),role:"treeitem","aria-expanded":$?n:void 0,tabIndex:0,onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),$?j(U.path):Z(U.path))},children:[K.jsx("span",{className:"file-icon",children:$?n?"📂":"📁":"📄"}),K.jsx("span",{className:"file-name",children:U.name}),u&&K.jsx("span",{className:`git-indicator ${u.className}`,children:u.indicator})]}),$&&n&&((f=U.children)==null?void 0:f.map(_=>K.jsx(ff,{entry:_,expanded:G,gitStatus:X,onToggle:j,onOpen:Z,depth:ne+1},_.path)))]})}function _f(U,G=[]){for(const X of U)X.type==="file"&&G.push(X),X.children&&_f(X.children,G);return G}function wg({onRefresh:U}){const[G,X]=we.useState([]),[j,Z]=we.useState(new Set),[ne,$]=we.useState(null),[n,u]=we.useState(!1),[f,_]=we.useState({modified:[],staged:[],untracked:[]}),[a,p]=we.useState([]),[b,w]=we.useState(""),[c,r]=we.useState(!1),h=we.useRef(null),o=we.useCallback(async()=>{try{const E=await Gv();X(E),$(null),u(!0)}catch(E){$(E.message)}},[]),l=we.useCallback(async()=>{try{const E=await Xv();_(E)}catch(E){console.error("Failed to load git status:",E)}},[]),S=we.useCallback(async()=>{try{const E=await Vv();p(E)}catch(E){console.error("Failed to load recent files:",E)}},[]);we.useEffect(()=>{n||(o(),l(),S())},[n,o,l,S]),we.useEffect(()=>{const E=setInterval(()=>{o(),l()},5e3);return()=>clearInterval(E)},[o,l]);const x=E=>{Z(D=>{const O=new Set(D);return O.has(E)?O.delete(E):O.add(E),O})},v=async E=>{try{await lf(E),U(),S()}catch(D){console.error("Failed to open file:",D)}},y=we.useMemo(()=>_f(G),[G]),m=we.useMemo(()=>{if(!b.trim())return[];const E=b.toLowerCase();return y.filter(D=>D.name.toLowerCase().includes(E)||D.path.toLowerCase().includes(E)).slice(0,10)},[y,b]),C=E=>{w(E.target.value),r(!0)},L=E=>{E.key==="Escape"?(r(!1),w("")):E.key==="Enter"&&m.length>0&&(v(m[0].path),w(""),r(!1))},A=E=>{v(E),w(""),r(!1)};return ne?K.jsxs("div",{className:"file-tree-error",children:["Error: ",ne]}):n?K.jsxs("div",{className:"file-tree-container",children:[K.jsxs("div",{className:"file-search",children:[K.jsx("input",{ref:h,type:"text",className:"file-search-input",placeholder:"Search files...",value:b,onChange:C,onKeyDown:L,onFocus:()=>r(!0),onBlur:()=>setTimeout(()=>r(!1),200)}),c&&m.length>0&&K.jsx("div",{className:"file-search-suggestions",children:m.map(E=>K.jsxs("div",{className:"file-search-suggestion",onMouseDown:()=>A(E.path),children:[K.jsx("span",{className:"suggestion-name",children:E.name}),K.jsx("span",{className:"suggestion-path",children:E.path})]},E.path))})]}),a.length>0&&K.jsxs("div",{className:"file-tree-section",children:[K.jsx("div",{className:"file-tree-section-header",children:"Recent"}),a.map(E=>K.jsxs("div",{className:"file-node file recent-file",style:{paddingLeft:"8px"},onClick:()=>v(E.path),role:"treeitem",tabIndex:0,onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),v(E.path))},children:[K.jsx("span",{className:"file-icon",children:"🕐"}),K.jsx("span",{className:"file-name",children:E.name}),K.jsx("span",{className:"file-path-hint",children:E.relativePath})]},E.id))]}),K.jsxs("div",{className:"file-tree-section",children:[K.jsx("div",{className:"file-tree-section-header",children:"Files"}),K.jsx("div",{className:"file-tree",role:"tree","aria-label":"Project files",children:G.map(E=>K.jsx(ff,{entry:E,expanded:j,gitStatus:f,onToggle:x,onOpen:v},E.path))})]})]}):K.jsx("div",{className:"file-tree-loading",children:"Loading files..."})}function Uo({title:U,className:G,defaultOpen:X=!0,actions:j,children:Z}){const[ne,$]=we.useState(X);return K.jsxs("div",{className:`dashboard-section${ne?"":" collapsed"}${G?" "+G:""}`,children:[K.jsxs("div",{className:"dashboard-section-header",onClick:()=>$(!ne),children:[K.jsxs("h3",{children:[K.jsx("span",{className:"collapse-icon",children:"▼"})," ",U]}),j&&K.jsx("div",{className:"header-actions",onClick:n=>n.stopPropagation(),children:j})]}),ne&&K.jsx("div",{className:"dashboard-section-content",children:Z})]})}function xg(U){const G={},X=U.split(`
130
- `);for(const j of X){const Z=j.match(/^\s*-?\s*(\w+):\s*(.*)$/);if(!Z)continue;const[,ne,$]=Z;let n=$.trim();if((n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))&&(n=n.slice(1,-1)),ne==="files"){G.files={};continue}if(ne==="spec"||ne==="plan"||ne==="review"){G.files||(G.files={}),G.files[ne]=n==="null"?null:n;continue}if(ne==="timestamps"){G.timestamps={};continue}if(["conceived_at","specified_at","planned_at","implementing_at","implemented_at","committed_at","integrated_at"].includes(ne)){G.timestamps||(G.timestamps={}),G.timestamps[ne]=n==="null"?null:n;continue}if(ne==="dependencies"||ne==="tags"||ne==="ticks"){if(n.startsWith("[")&&n.endsWith("]")){const f=n.slice(1,-1).trim();G[ne]=f===""?[]:f.split(",").map(_=>_.trim().replace(/^["']|["']$/g,""))}else G[ne]=[];continue}n!=="null"&&(G[ne]=n)}return G}const Lg=new Set(["conceived","specified","planned","implementing","implemented","committed","integrated","abandoned","on-hold"]);function Eg(U){return!(!U.id||U.id==="NNNN"||!/^\d{4}$/.test(U.id)||!U.status||!Lg.has(U.status)||!U.title||U.tags&&U.tags.includes("example"))}function Mg(U){const G=[],X=/```yaml\n([\s\S]*?)```/g;let j;for(;(j=X.exec(U))!==null;){const ne=j[1].split(/\n(?=\s*- id:)/);for(const $ of ne){if(!$.trim()||!$.includes("id:"))continue;const n=xg($);n&&Eg(n)&&G.push(n)}}return G}const Po=["conceived","specified","planned","implementing","implemented","committed","integrated"],Ag=["CONC'D","SPEC'D","PLANNED","IMPL'ING","IMPL'D","CMTD","INTGR'D"],Rg=new Set(["conceived","specified","planned","implementing","implemented","committed"]),vf=new Set(["abandoned","on-hold"]);function jo(U){var j;if(U.status!=="integrated")return!1;const G=(j=U.timestamps)==null?void 0:j.integrated_at;if(!G)return!1;const X=new Date(G);return isNaN(X.getTime())?!1:(Date.now()-X.getTime())/(1e3*60*60)<=72}function _a(U){const G=Po.indexOf(U);return G>=0?G:-1}function rf(U,G){var X,j,Z;switch(G){case"specified":return(X=U.files)!=null&&X.spec?{label:"Spec",link:U.files.spec}:{label:"",link:null};case"planned":return(j=U.files)!=null&&j.plan?{label:"Plan",link:U.files.plan}:{label:"",link:null};case"implemented":return(Z=U.files)!=null&&Z.review?{label:"Revw",link:U.files.review}:{label:"",link:null};case"committed":{if(U.notes){const ne=U.notes.match(/PR\s*#?(\d+)/i);if(ne)return{label:"PR",link:`https://github.com/cluesmith/codev/pull/${ne[1]}`,external:!0}}return{label:"",link:null}}default:return{label:"",link:null}}}function Dg({project:U,stage:G}){const X=_a(U.status),j=_a(G);if(j<X){const Z=rf(U,G);return K.jsxs("td",{className:"project-stage",children:[K.jsx("span",{className:"checkmark",children:"✓"}),Z.label&&Z.link&&(Z.external?K.jsxs(K.Fragment,{children:[" ",K.jsx("a",{href:Z.link,target:"_blank",rel:"noreferrer",children:Z.label})]}):K.jsxs(K.Fragment,{children:[" ",K.jsx("a",{href:"#",onClick:ne=>{ne.preventDefault(),er(Z.link)},children:Z.label})]}))]})}if(j===X){if(G==="integrated"&&jo(U))return K.jsx("td",{className:"project-stage",children:K.jsx("span",{className:"celebration",children:"🎉"})});const Z=rf(U,G);return K.jsxs("td",{className:"project-stage",children:[K.jsx("span",{className:"current-indicator"}),Z.label&&Z.link&&(Z.external?K.jsxs(K.Fragment,{children:[" ",K.jsx("a",{href:Z.link,target:"_blank",rel:"noreferrer",children:Z.label})]}):K.jsxs(K.Fragment,{children:[" ",K.jsx("a",{href:"#",onClick:ne=>{ne.preventDefault(),er(Z.link)},children:Z.label})]}))]})}return K.jsx("td",{className:"project-stage"})}async function er(U){try{const G=Kr();await fetch(`${G}api/tabs/file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:U})})}catch{}}function Tg({project:U}){const G=vf.has(U.status);return K.jsxs("tr",{className:`project-row status-${U.status}`,children:[K.jsxs("td",{className:"project-cell",children:[K.jsx("span",{className:"project-id",children:U.id}),K.jsxs("span",{className:"project-title",children:[U.title,G&&K.jsxs("span",{className:"project-terminal-status",children:[" (",U.status,")"]})]})]}),G?Po.map(X=>K.jsx("td",{className:"project-stage"},X)):Po.map(X=>K.jsx(Dg,{project:U,stage:X},X))]})}function Io({projects:U}){return U.length===0?K.jsx("p",{style:{color:"var(--text-muted)",textAlign:"center",padding:20},children:"No projects"}):K.jsxs("table",{className:"project-table",children:[K.jsx("thead",{children:K.jsxs("tr",{children:[K.jsx("th",{style:{textAlign:"left"},children:"Project"}),Ag.map(G=>K.jsx("th",{className:"stage-header",children:G},G))]})}),K.jsx("tbody",{children:U.map(G=>K.jsx(Tg,{project:G},G.id))})]})}function Bg({projects:U}){const G=U.filter(Z=>Rg.has(Z.status)||jo(Z));G.sort((Z,ne)=>{const $=_a(Z.status),n=_a(ne.status);return n!==$?n-$:Z.id.localeCompare(ne.id)});const X=U.filter(Z=>Z.status==="integrated"&&!jo(Z)),j=U.filter(Z=>vf.has(Z.status));return K.jsxs(K.Fragment,{children:[(G.length>0||X.length===0)&&K.jsxs("details",{className:"project-section",open:!0,children:[K.jsxs("summary",{children:["Active ",K.jsxs("span",{className:"section-count",children:["(",G.length,")"]})]}),K.jsx(Io,{projects:G})]}),X.length>0&&K.jsxs("details",{className:"project-section",children:[K.jsxs("summary",{children:["Completed ",K.jsxs("span",{className:"section-count",children:["(",X.length,")"]})]}),K.jsx(Io,{projects:X})]}),j.length>0&&K.jsxs("details",{className:"project-section",children:[K.jsxs("summary",{children:["Terminal ",K.jsxs("span",{className:"section-count",children:["(",j.length,")"]})]}),K.jsx(Io,{projects:j})]})]})}function Og({state:U,onRefresh:G,onSelectTab:X}){const[j,Z]=we.useState([]),[ne,$]=we.useState(null);if(we.useEffect(()=>{let a="";const p=()=>{const w=Kr();fetch(`${w}file?path=codev/projectlist.md`).then(async c=>{if(!c.ok){if(c.status===404){Z([]);return}throw new Error(`HTTP ${c.status}`)}const r=await c.text(),h=r.length+":"+r.slice(0,100);h!==a&&(a=h,Z(Mg(r)),$(null))}).catch(c=>$(c.message))};p();const b=setInterval(p,5e3);return()=>clearInterval(b)},[]),!U)return K.jsx("div",{className:"dashboard-container",children:K.jsx("p",{style:{color:"var(--text-muted)",padding:16},children:"Loading..."})});const n=async()=>{try{await qv(),G()}catch(a){console.error("Failed to create shell:",a)}},u=U.builders??[],f=(U.utils??[]).filter(a=>a.terminalId||a.pid&&a.pid!==0),_=U.annotations??[];return K.jsxs("div",{className:"dashboard-container",children:[K.jsxs("div",{className:"projects-info",children:[K.jsx("h1",{style:{fontSize:20,marginBottom:12,color:"var(--text-primary)"},children:"Agent Farm Dashboard"}),K.jsxs("p",{children:["Coordinate AI builders working on your codebase. The left panel shows the Architect terminal – tell it what you want to build. ",K.jsx("strong",{children:"Tabs"})," shows open terminals (Architect, Builders, utility shells)."," ",K.jsx("strong",{children:"Files"})," lets you browse and open project files. ",K.jsx("strong",{children:"Projects"})," tracks work as it moves from conception to integration."]}),K.jsxs("p",{children:["Docs:"," ",K.jsx("a",{href:"#",onClick:a=>{a.preventDefault(),er("codev/resources/cheatsheet.md")},children:"Cheatsheet"})," ·"," ",K.jsx("a",{href:"#",onClick:a=>{a.preventDefault(),er("codev/resources/lifecycle.md")},children:"Lifecycle"})," ·"," ",K.jsx("a",{href:"#",onClick:a=>{a.preventDefault(),er("codev/resources/commands/overview.md")},children:"CLI Reference"})," ·"," ",K.jsx("a",{href:"#",onClick:a=>{a.preventDefault(),er("codev/protocols/spir/protocol.md")},children:"SPIR Protocol"})," ·"," ",K.jsx("a",{href:"https://github.com/cluesmith/codev#readme",target:"_blank",rel:"noreferrer",children:"README"})," ·"," ",K.jsx("a",{href:"https://discord.gg/mJ92DhDa6n",target:"_blank",rel:"noreferrer",children:"Discord"})]})]}),K.jsxs("div",{className:"dashboard-header",children:[K.jsx(Uo,{title:"Tabs",className:"section-tabs",actions:K.jsx("button",{onClick:n,children:"+ Shell"}),children:K.jsxs("div",{className:"dashboard-tabs-list",children:[U.architect&&K.jsxs("div",{className:"dashboard-tab-item",onClick:()=>X==null?void 0:X("architect"),children:[K.jsx("span",{className:"tab-icon",children:"🏗️"}),K.jsx("span",{className:"tab-name",children:"Architect"})]}),u.map(a=>K.jsxs("div",{className:"dashboard-tab-item",onClick:()=>X==null?void 0:X(a.id),children:[K.jsx("span",{className:"tab-icon",children:"🔨"}),K.jsx("span",{className:"tab-name",children:a.name}),K.jsx("span",{className:`status-dot status-${a.status}`})]},a.id)),f.map(a=>K.jsxs("div",{className:"dashboard-tab-item",onClick:()=>X==null?void 0:X(a.id),children:[K.jsx("span",{className:"tab-icon",children:"💻"}),K.jsx("span",{className:"tab-name",children:a.name})]},a.id)),_.map(a=>K.jsxs("div",{className:"dashboard-tab-item",onClick:()=>X==null?void 0:X(a.id),children:[K.jsx("span",{className:"tab-icon",children:"📄"}),K.jsx("span",{className:"tab-name",children:a.file.split("/").pop()})]},a.id)),!U.architect&&u.length===0&&f.length===0&&_.length===0&&K.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic",fontSize:12,padding:"4px 8px"},children:"No tabs open"})]})}),K.jsx(Uo,{title:"Files",className:"section-files",children:K.jsx(wg,{onRefresh:G})})]}),K.jsx(Uo,{title:"Projects",className:"section-projects",children:ne?K.jsxs("div",{className:"projects-error",children:[K.jsx("span",{children:ne}),K.jsx("button",{onClick:()=>window.location.reload(),children:"Retry"})]}):j.length===0?K.jsx("div",{className:"projects-welcome",children:K.jsx("p",{children:"No projects yet. Ask the Architect to create your first project."})}):K.jsx(Bg,{projects:j})})]})}function kg({tabs:U,activeTabId:G,onSelectTab:X,onRefresh:j,children:Z}){return K.jsxs("div",{className:"mobile-layout",children:[K.jsx(of,{tabs:U,activeTabId:G,onSelectTab:X,onRefresh:j}),K.jsx("div",{className:"mobile-content",children:Z})]})}function Hg({tabId:U,initialLine:G}){let j=`${Kr()}api/annotate/${U}/`;return G&&(j+=`?line=${G}`),K.jsx("div",{className:"file-viewer",style:{width:"100%",height:"100%"},children:K.jsx("iframe",{src:j,style:{width:"100%",height:"100%",border:"none"},title:"File Annotator"})})}function zg(U){if(U<0)return"0m";const G=Math.floor(U/6e4);if(G<60)return`${G}m`;const X=Math.floor(G/60),j=G%60;return j>0?`${X}h ${j}m`:`${X}h`}function nf({gateStatus:U}){const[G,X]=we.useState(Date.now());if(we.useEffect(()=>{if(!(U!=null&&U.hasGate)||!U.requestedAt)return;const u=setInterval(()=>X(Date.now()),3e4);return()=>clearInterval(u)},[U==null?void 0:U.hasGate,U==null?void 0:U.requestedAt]),!(U!=null&&U.hasGate))return null;const{gateName:j,builderId:Z,requestedAt:ne}=U,$=`porch approve ${Z} ${j}`;let n=null;if(ne){const u=G-Date.parse(ne);n=zg(u)}return K.jsxs("div",{className:"gate-banner",role:"alert",children:[K.jsxs("span",{className:"gate-banner-message",children:[K.jsx("span",{className:"gate-banner-icon","aria-hidden":"true",children:"⚠"})," ","Builder ",Z," blocked on ",K.jsx("strong",{children:j})]}),n!==null&&K.jsxs("span",{className:"gate-banner-wait",children:["waiting ",n]}),K.jsx("code",{className:"gate-banner-cmd",children:$})]})}function Ng(U){const G=Math.floor(U/1e3);if(G<60)return`${G}s`;if(G<3600)return`${Math.floor(G/60)}m ${G%60}s`;const X=Math.floor(G/3600),j=Math.floor(G%3600/60);return`${X}h ${j}m`}function af({tunnelStatus:U,onRefresh:G}){const[X,j]=we.useState(!1),Z=we.useCallback(async()=>{j(!0);try{await Kv(),G()}catch{}finally{j(!1)}},[G]),ne=we.useCallback(async()=>{j(!0);try{await Qv(),G()}catch{}finally{j(!1)}},[G]);if(!U)return K.jsxs("span",{className:"cloud-status cloud-status--none","data-testid":"cloud-status",children:[K.jsx("span",{className:"cloud-dot cloud-dot--gray"}),"Cloud: not registered"]});if(U.state==="error")return K.jsxs("span",{className:"cloud-status cloud-status--error","data-testid":"cloud-status",children:[K.jsx("span",{className:"cloud-dot cloud-dot--red"}),"Cloud: error"]});if(!U.registered)return K.jsxs("span",{className:"cloud-status cloud-status--none","data-testid":"cloud-status",children:[K.jsx("span",{className:"cloud-dot cloud-dot--gray"}),"Cloud: not registered"]});const{state:$,towerName:n,accessUrl:u,uptime:f}=U;return $==="auth_failed"?K.jsxs("span",{className:"cloud-status cloud-status--error","data-testid":"cloud-status",children:[K.jsx("span",{className:"cloud-dot cloud-dot--red"}),"Cloud: auth failed",K.jsx("span",{className:"cloud-hint",children:"Run --reauth"})]}):$==="connecting"?K.jsxs("span",{className:"cloud-status cloud-status--connecting","data-testid":"cloud-status",children:[K.jsx("span",{className:"cloud-dot cloud-dot--yellow"}),"Cloud: connecting..."]}):$==="connected"?K.jsxs("span",{className:"cloud-status cloud-status--connected","data-testid":"cloud-status",children:[K.jsx("span",{className:"cloud-dot cloud-dot--green"}),"Cloud: ",n,f!==null&&K.jsx("span",{className:"cloud-uptime",children:Ng(f)}),u&&K.jsx("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"cloud-link",children:"Open"}),K.jsx("button",{className:"cloud-btn",onClick:ne,disabled:X,"data-testid":"cloud-disconnect-btn",children:"Disconnect"})]}):K.jsxs("span",{className:"cloud-status cloud-status--disconnected","data-testid":"cloud-status",children:[K.jsx("span",{className:"cloud-dot cloud-dot--gray"}),"Cloud: disconnected",K.jsx("button",{className:"cloud-btn",onClick:Z,disabled:X,"data-testid":"cloud-connect-btn",children:"Connect"})]})}function Ug(){var l,S,x,v;const{state:U,tunnelStatus:G,refresh:X}=Zv(),{tabs:j,activeTab:Z,activeTabId:ne,selectTab:$}=eg(U),n=tg(`(max-width: ${jv}px)`),[u,f]=we.useState(new Set),_=we.useRef(new Map),a=we.useCallback(async(y,m,C,L)=>{try{const A=await lf(y,m,L);m&&m>0&&_.current.set(A.id,m),X()}catch(A){console.error("Failed to open file:",A)}},[X]);we.useEffect(()=>{U!=null&&U.projectName?document.title=`${U.projectName} Agent Farm`:document.title="Agent Farm"},[U==null?void 0:U.projectName]);const[p,b]=we.useState(!1);we.useEffect(()=>{const y=new URLSearchParams(window.location.search);b(y.get("fullscreen")==="1")},[]),we.useEffect(()=>{if(!Z)return;(Z.type==="architect"||Z.type==="builder"||Z.type==="shell")&&f(m=>{if(m.has(Z.id))return m;const C=new Set(m);return C.add(Z.id),C})},[Z==null?void 0:Z.id,Z==null?void 0:Z.type]);const w=y=>{const m=Yd(y);return m?K.jsx(tf,{wsPath:m,onFileOpen:a}):K.jsx("div",{className:"no-terminal",children:"No terminal session"})},c=y=>{if(!y.annotationId||!U)return K.jsx("div",{className:"no-terminal",children:"No file viewer"});if(!U.annotations.find(L=>L.id===y.annotationId))return K.jsx("div",{className:"no-terminal",children:"Annotation not found"});const C=_.current.get(y.annotationId);return C!==void 0&&_.current.delete(y.annotationId),K.jsx(Hg,{tabId:y.annotationId,initialLine:C??y.initialLine})},r=y=>{const m=j.filter(C=>y.includes(C.type)&&u.has(C.id));return K.jsxs(K.Fragment,{children:[m.map(C=>{const L=Yd(C);return K.jsx("div",{className:"terminal-tab-pane",style:{display:ne===C.id?void 0:"none"},children:L?K.jsx(tf,{wsPath:L,onFileOpen:a}):K.jsx("div",{className:"no-terminal",children:"No terminal session"})},C.id)}),(Z==null?void 0:Z.type)==="dashboard"&&K.jsx(Og,{state:U,onRefresh:X,onSelectTab:$}),(Z==null?void 0:Z.type)==="file"&&c(Z)]})};if(p&&Z&&(Z.type==="architect"||Z.type==="builder"||Z.type==="shell"))return K.jsx("div",{className:"fullscreen-terminal",children:w(Z)});if(n)return K.jsxs("div",{className:"mobile-wrapper",children:[K.jsx("div",{className:"mobile-header",children:K.jsx(af,{tunnelStatus:G,onRefresh:X})}),K.jsx(nf,{gateStatus:U==null?void 0:U.gateStatus}),K.jsx(kg,{tabs:j,activeTabId:ne,onSelectTab:$,onRefresh:X,children:r(["architect","builder","shell"])})]});const h=j.find(y=>y.type==="architect"),o=h?w(h):K.jsx("div",{className:"no-architect",children:"No architect terminal"});return K.jsxs("div",{className:"app",children:[K.jsxs("header",{className:"app-header",children:[K.jsx("h1",{className:"app-title",children:"Agent Farm"}),K.jsxs("div",{className:"header-meta",children:[K.jsx(af,{tunnelStatus:G,onRefresh:X}),K.jsxs("span",{className:"builder-count",children:[((l=U==null?void 0:U.builders)==null?void 0:l.length)??0," builder(s)"]})]})]}),K.jsx(nf,{gateStatus:U==null?void 0:U.gateStatus}),K.jsx("div",{className:"app-body",children:K.jsx(ig,{left:o,right:K.jsxs("div",{className:"right-panel",children:[K.jsx(of,{tabs:j.filter(y=>y.type!=="architect"),activeTabId:ne,onSelectTab:$,onRefresh:X}),K.jsx("div",{className:"tab-content",role:"tabpanel",children:r(["builder","shell"])})]})})}),K.jsxs("footer",{className:"status-bar",children:[K.jsxs("span",{children:[((S=U==null?void 0:U.builders)==null?void 0:S.length)??0," builders"]}),K.jsxs("span",{children:[((x=U==null?void 0:U.utils)==null?void 0:x.length)??0," shells"]}),K.jsxs("span",{children:[((v=U==null?void 0:U.annotations)==null?void 0:v.length)??0," files"]})]})]})}Pv.createRoot(document.getElementById("root")).render(K.jsx(we.StrictMode,{children:K.jsx(Ug,{})}));
131
- //# sourceMappingURL=index-D6VqWAaI.js.map
129
+ `)},j.onData(M=>{l.readyState===WebSocket.OPEN&&yg(l,M)}),j.onResize(({cols:M,rows:E})=>{l.readyState===WebSocket.OPEN&&sf(l,"resize",{cols:M,rows:E})});const C=new ResizeObserver(o);C.observe(X.current);const L=()=>{document.hidden||o()};return document.addEventListener("visibilitychange",L),()=>{clearTimeout(r),y&&clearTimeout(y),v&&clearTimeout(v),p==null||p.dispose(),a==null||a.dispose(),C.disconnect(),document.removeEventListener("visibilitychange",L),l.close(),j.dispose(),P.current=null,Z.current=null,ne.current=null}},[U]),K.jsx("div",{ref:X,className:"terminal-container",style:{width:"100%",height:"100%",backgroundColor:"#1a1a1a"}})}function yg(U,G){const X=new TextEncoder().encode(G),P=new Uint8Array(1+X.length);P[0]=df,P.set(X,1),U.send(P.buffer)}function sf(U,G,X){const P=JSON.stringify({type:G,payload:X}),Z=new TextEncoder().encode(P),ne=new Uint8Array(1+Z.length);ne[0]=Cg,ne.set(Z,1),U.send(ne.buffer)}function bg(U,G){const X=U.replace(/^\//,"");return G.staged.some(P=>X.endsWith(P)||P.endsWith(X))?{indicator:"A",className:"git-staged"}:G.modified.some(P=>X.endsWith(P)||P.endsWith(X))?{indicator:"M",className:"git-modified"}:G.untracked.some(P=>X.endsWith(P)||P.endsWith(X))?{indicator:"?",className:"git-untracked"}:null}function ff({entry:U,expanded:G,gitStatus:X,onToggle:P,onOpen:Z,depth:ne=0}){var f;const j=U.type==="directory",n=G.has(U.path),u=j?null:bg(U.path,X);return K.jsxs(K.Fragment,{children:[K.jsxs("div",{className:`file-node ${j?"directory":"file"}`,style:{paddingLeft:`${ne*16+8}px`},onClick:()=>j?P(U.path):Z(U.path),role:"treeitem","aria-expanded":j?n:void 0,tabIndex:0,onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),j?P(U.path):Z(U.path))},children:[K.jsx("span",{className:"file-icon",children:j?n?"📂":"📁":"📄"}),K.jsx("span",{className:"file-name",children:U.name}),u&&K.jsx("span",{className:`git-indicator ${u.className}`,children:u.indicator})]}),j&&n&&((f=U.children)==null?void 0:f.map(_=>K.jsx(ff,{entry:_,expanded:G,gitStatus:X,onToggle:P,onOpen:Z,depth:ne+1},_.path)))]})}function _f(U,G=[]){for(const X of U)X.type==="file"&&G.push(X),X.children&&_f(X.children,G);return G}function wg({onRefresh:U}){const[G,X]=xe.useState([]),[P,Z]=xe.useState(new Set),[ne,j]=xe.useState(null),[n,u]=xe.useState(!1),[f,_]=xe.useState({modified:[],staged:[],untracked:[]}),[a,p]=xe.useState([]),[w,y]=xe.useState(""),[o,r]=xe.useState(!1),h=xe.useRef(null),c=xe.useCallback(async()=>{try{const E=await Gv();X(E),j(null),u(!0)}catch(E){j(E.message)}},[]),l=xe.useCallback(async()=>{try{const E=await Xv();_(E)}catch(E){console.error("Failed to load git status:",E)}},[]),S=xe.useCallback(async()=>{try{const E=await Vv();p(E)}catch(E){console.error("Failed to load recent files:",E)}},[]);xe.useEffect(()=>{n||(c(),l(),S())},[n,c,l,S]),xe.useEffect(()=>{const E=setInterval(()=>{c(),l()},5e3);return()=>clearInterval(E)},[c,l]);const x=E=>{Z(R=>{const B=new Set(R);return B.has(E)?B.delete(E):B.add(E),B})},v=async E=>{try{await lf(E),U(),S()}catch(R){console.error("Failed to open file:",R)}},b=xe.useMemo(()=>_f(G),[G]),m=xe.useMemo(()=>{if(!w.trim())return[];const E=w.toLowerCase();return b.filter(R=>R.name.toLowerCase().includes(E)||R.path.toLowerCase().includes(E)).slice(0,10)},[b,w]),C=E=>{y(E.target.value),r(!0)},L=E=>{E.key==="Escape"?(r(!1),y("")):E.key==="Enter"&&m.length>0&&(v(m[0].path),y(""),r(!1))},M=E=>{v(E),y(""),r(!1)};return ne?K.jsxs("div",{className:"file-tree-error",children:["Error: ",ne]}):n?K.jsxs("div",{className:"file-tree-container",children:[K.jsxs("div",{className:"file-search",children:[K.jsx("input",{ref:h,type:"text",className:"file-search-input",placeholder:"Search files...",value:w,onChange:C,onKeyDown:L,onFocus:()=>r(!0),onBlur:()=>setTimeout(()=>r(!1),200)}),o&&m.length>0&&K.jsx("div",{className:"file-search-suggestions",children:m.map(E=>K.jsxs("div",{className:"file-search-suggestion",onMouseDown:()=>M(E.path),children:[K.jsx("span",{className:"suggestion-name",children:E.name}),K.jsx("span",{className:"suggestion-path",children:E.path})]},E.path))})]}),a.length>0&&K.jsxs("div",{className:"file-tree-section",children:[K.jsx("div",{className:"file-tree-section-header",children:"Recent"}),a.map(E=>K.jsxs("div",{className:"file-node file recent-file",style:{paddingLeft:"8px"},onClick:()=>v(E.path),role:"treeitem",tabIndex:0,onKeyDown:R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),v(E.path))},children:[K.jsx("span",{className:"file-icon",children:"🕐"}),K.jsx("span",{className:"file-name",children:E.name}),K.jsx("span",{className:"file-path-hint",children:E.relativePath})]},E.id))]}),K.jsxs("div",{className:"file-tree-section",children:[K.jsx("div",{className:"file-tree-section-header",children:"Files"}),K.jsx("div",{className:"file-tree",role:"tree","aria-label":"Project files",children:G.map(E=>K.jsx(ff,{entry:E,expanded:P,gitStatus:f,onToggle:x,onOpen:v},E.path))})]})]}):K.jsx("div",{className:"file-tree-loading",children:"Loading files..."})}function Uo({title:U,className:G,defaultOpen:X=!0,actions:P,children:Z}){const[ne,j]=xe.useState(X);return K.jsxs("div",{className:`dashboard-section${ne?"":" collapsed"}${G?" "+G:""}`,children:[K.jsxs("div",{className:"dashboard-section-header",onClick:()=>j(!ne),children:[K.jsxs("h3",{children:[K.jsx("span",{className:"collapse-icon",children:"▼"})," ",U]}),P&&K.jsx("div",{className:"header-actions",onClick:n=>n.stopPropagation(),children:P})]}),ne&&K.jsx("div",{className:"dashboard-section-content",children:Z})]})}function xg(U){const G={},X=U.split(`
130
+ `);for(const P of X){const Z=P.match(/^\s*-?\s*(\w+):\s*(.*)$/);if(!Z)continue;const[,ne,j]=Z;let n=j.trim();if((n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))&&(n=n.slice(1,-1)),ne==="files"){G.files={};continue}if(ne==="spec"||ne==="plan"||ne==="review"){G.files||(G.files={}),G.files[ne]=n==="null"?null:n;continue}if(ne==="timestamps"){G.timestamps={};continue}if(["conceived_at","specified_at","planned_at","implementing_at","implemented_at","committed_at","integrated_at"].includes(ne)){G.timestamps||(G.timestamps={}),G.timestamps[ne]=n==="null"?null:n;continue}if(ne==="dependencies"||ne==="tags"||ne==="ticks"){if(n.startsWith("[")&&n.endsWith("]")){const f=n.slice(1,-1).trim();G[ne]=f===""?[]:f.split(",").map(_=>_.trim().replace(/^["']|["']$/g,""))}else G[ne]=[];continue}n!=="null"&&(G[ne]=n)}return G}const Lg=new Set(["conceived","specified","planned","implementing","implemented","committed","integrated","abandoned","on-hold"]);function Eg(U){return!(!U.id||U.id==="NNNN"||!/^\d{4}$/.test(U.id)||!U.status||!Lg.has(U.status)||!U.title||U.tags&&U.tags.includes("example"))}function Mg(U){const G=[],X=/```yaml\n([\s\S]*?)```/g;let P;for(;(P=X.exec(U))!==null;){const ne=P[1].split(/\n(?=\s*- id:)/);for(const j of ne){if(!j.trim()||!j.includes("id:"))continue;const n=xg(j);n&&Eg(n)&&G.push(n)}}return G}const Po=["conceived","specified","planned","implementing","implemented","committed","integrated"],Ag=["CONC'D","SPEC'D","PLANNED","IMPL'ING","IMPL'D","CMTD","INTGR'D"],Rg=new Set(["conceived","specified","planned","implementing","implemented","committed"]),vf=new Set(["abandoned","on-hold"]);function jo(U){var P;if(U.status!=="integrated")return!1;const G=(P=U.timestamps)==null?void 0:P.integrated_at;if(!G)return!1;const X=new Date(G);return isNaN(X.getTime())?!1:(Date.now()-X.getTime())/(1e3*60*60)<=72}function _a(U){const G=Po.indexOf(U);return G>=0?G:-1}function rf(U,G){var X,P,Z;switch(G){case"specified":return(X=U.files)!=null&&X.spec?{label:"Spec",link:U.files.spec}:{label:"",link:null};case"planned":return(P=U.files)!=null&&P.plan?{label:"Plan",link:U.files.plan}:{label:"",link:null};case"implemented":return(Z=U.files)!=null&&Z.review?{label:"Revw",link:U.files.review}:{label:"",link:null};case"committed":{if(U.notes){const ne=U.notes.match(/PR\s*#?(\d+)/i);if(ne)return{label:"PR",link:`https://github.com/cluesmith/codev/pull/${ne[1]}`,external:!0}}return{label:"",link:null}}default:return{label:"",link:null}}}function Dg({project:U,stage:G}){const X=_a(U.status),P=_a(G);if(P<X){const Z=rf(U,G);return K.jsxs("td",{className:"project-stage",children:[K.jsx("span",{className:"checkmark",children:"✓"}),Z.label&&Z.link&&(Z.external?K.jsxs(K.Fragment,{children:[" ",K.jsx("a",{href:Z.link,target:"_blank",rel:"noreferrer",children:Z.label})]}):K.jsxs(K.Fragment,{children:[" ",K.jsx("a",{href:"#",onClick:ne=>{ne.preventDefault(),er(Z.link)},children:Z.label})]}))]})}if(P===X){if(G==="integrated"&&jo(U))return K.jsx("td",{className:"project-stage",children:K.jsx("span",{className:"celebration",children:"🎉"})});const Z=rf(U,G);return K.jsxs("td",{className:"project-stage",children:[K.jsx("span",{className:"current-indicator"}),Z.label&&Z.link&&(Z.external?K.jsxs(K.Fragment,{children:[" ",K.jsx("a",{href:Z.link,target:"_blank",rel:"noreferrer",children:Z.label})]}):K.jsxs(K.Fragment,{children:[" ",K.jsx("a",{href:"#",onClick:ne=>{ne.preventDefault(),er(Z.link)},children:Z.label})]}))]})}return K.jsx("td",{className:"project-stage"})}async function er(U){try{const G=Kr();await fetch(`${G}api/tabs/file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:U})})}catch{}}function Tg({project:U}){const G=vf.has(U.status);return K.jsxs("tr",{className:`project-row status-${U.status}`,children:[K.jsxs("td",{className:"project-cell",children:[K.jsx("span",{className:"project-id",children:U.id}),K.jsxs("span",{className:"project-title",children:[U.title,G&&K.jsxs("span",{className:"project-terminal-status",children:[" (",U.status,")"]})]})]}),G?Po.map(X=>K.jsx("td",{className:"project-stage"},X)):Po.map(X=>K.jsx(Dg,{project:U,stage:X},X))]})}function Io({projects:U}){return U.length===0?K.jsx("p",{style:{color:"var(--text-muted)",textAlign:"center",padding:20},children:"No projects"}):K.jsxs("table",{className:"project-table",children:[K.jsx("thead",{children:K.jsxs("tr",{children:[K.jsx("th",{style:{textAlign:"left"},children:"Project"}),Ag.map(G=>K.jsx("th",{className:"stage-header",children:G},G))]})}),K.jsx("tbody",{children:U.map(G=>K.jsx(Tg,{project:G},G.id))})]})}function Bg({projects:U}){const G=U.filter(Z=>Rg.has(Z.status)||jo(Z));G.sort((Z,ne)=>{const j=_a(Z.status),n=_a(ne.status);return n!==j?n-j:Z.id.localeCompare(ne.id)});const X=U.filter(Z=>Z.status==="integrated"&&!jo(Z)),P=U.filter(Z=>vf.has(Z.status));return K.jsxs(K.Fragment,{children:[(G.length>0||X.length===0)&&K.jsxs("details",{className:"project-section",open:!0,children:[K.jsxs("summary",{children:["Active ",K.jsxs("span",{className:"section-count",children:["(",G.length,")"]})]}),K.jsx(Io,{projects:G})]}),X.length>0&&K.jsxs("details",{className:"project-section",children:[K.jsxs("summary",{children:["Completed ",K.jsxs("span",{className:"section-count",children:["(",X.length,")"]})]}),K.jsx(Io,{projects:X})]}),P.length>0&&K.jsxs("details",{className:"project-section",children:[K.jsxs("summary",{children:["Terminal ",K.jsxs("span",{className:"section-count",children:["(",P.length,")"]})]}),K.jsx(Io,{projects:P})]})]})}function Og({state:U,onRefresh:G,onSelectTab:X}){const[P,Z]=xe.useState([]),[ne,j]=xe.useState(null);if(xe.useEffect(()=>{let a="";const p=()=>{const y=Kr();fetch(`${y}file?path=codev/projectlist.md`).then(async o=>{if(!o.ok){if(o.status===404){Z([]);return}throw new Error(`HTTP ${o.status}`)}const r=await o.text(),h=r.length+":"+r.slice(0,100);h!==a&&(a=h,Z(Mg(r)),j(null))}).catch(o=>j(o.message))};p();const w=setInterval(p,5e3);return()=>clearInterval(w)},[]),!U)return K.jsx("div",{className:"dashboard-container",children:K.jsx("p",{style:{color:"var(--text-muted)",padding:16},children:"Loading..."})});const n=async()=>{try{await qv(),G()}catch(a){console.error("Failed to create shell:",a)}},u=U.builders??[],f=(U.utils??[]).filter(a=>a.terminalId||a.pid&&a.pid!==0),_=U.annotations??[];return K.jsxs("div",{className:"dashboard-container",children:[K.jsxs("div",{className:"projects-info",children:[K.jsx("h1",{style:{fontSize:20,marginBottom:12,color:"var(--text-primary)"},children:"Agent Farm Dashboard"}),K.jsxs("p",{children:["Coordinate AI builders working on your codebase. The left panel shows the Architect terminal – tell it what you want to build. ",K.jsx("strong",{children:"Tabs"})," shows open terminals (Architect, Builders, utility shells)."," ",K.jsx("strong",{children:"Files"})," lets you browse and open project files. ",K.jsx("strong",{children:"Projects"})," tracks work as it moves from conception to integration."]}),K.jsxs("p",{children:["Docs:"," ",K.jsx("a",{href:"#",onClick:a=>{a.preventDefault(),er("codev/resources/cheatsheet.md")},children:"Cheatsheet"})," ·"," ",K.jsx("a",{href:"#",onClick:a=>{a.preventDefault(),er("codev/resources/lifecycle.md")},children:"Lifecycle"})," ·"," ",K.jsx("a",{href:"#",onClick:a=>{a.preventDefault(),er("codev/resources/commands/overview.md")},children:"CLI Reference"})," ·"," ",K.jsx("a",{href:"#",onClick:a=>{a.preventDefault(),er("codev/protocols/spir/protocol.md")},children:"SPIR Protocol"})," ·"," ",K.jsx("a",{href:"https://github.com/cluesmith/codev#readme",target:"_blank",rel:"noreferrer",children:"README"})," ·"," ",K.jsx("a",{href:"https://discord.gg/mJ92DhDa6n",target:"_blank",rel:"noreferrer",children:"Discord"})]})]}),K.jsxs("div",{className:"dashboard-header",children:[K.jsx(Uo,{title:"Tabs",className:"section-tabs",actions:K.jsx("button",{onClick:n,children:"+ Shell"}),children:K.jsxs("div",{className:"dashboard-tabs-list",children:[U.architect&&K.jsxs("div",{className:"dashboard-tab-item",onClick:()=>X==null?void 0:X("architect"),children:[K.jsx("span",{className:"tab-icon",children:"🏗️"}),K.jsx("span",{className:"tab-name",children:"Architect"})]}),u.map(a=>K.jsxs("div",{className:"dashboard-tab-item",onClick:()=>X==null?void 0:X(a.id),children:[K.jsx("span",{className:"tab-icon",children:"🔨"}),K.jsx("span",{className:"tab-name",children:a.name}),K.jsx("span",{className:`status-dot status-${a.status}`})]},a.id)),f.map(a=>K.jsxs("div",{className:"dashboard-tab-item",onClick:()=>X==null?void 0:X(a.id),children:[K.jsx("span",{className:"tab-icon",children:"💻"}),K.jsx("span",{className:"tab-name",children:a.name})]},a.id)),_.map(a=>K.jsxs("div",{className:"dashboard-tab-item",onClick:()=>X==null?void 0:X(a.id),children:[K.jsx("span",{className:"tab-icon",children:"📄"}),K.jsx("span",{className:"tab-name",children:a.file.split("/").pop()})]},a.id)),!U.architect&&u.length===0&&f.length===0&&_.length===0&&K.jsx("p",{style:{color:"var(--text-muted)",fontStyle:"italic",fontSize:12,padding:"4px 8px"},children:"No tabs open"})]})}),K.jsx(Uo,{title:"Files",className:"section-files",children:K.jsx(wg,{onRefresh:G})})]}),K.jsx(Uo,{title:"Projects",className:"section-projects",children:ne?K.jsxs("div",{className:"projects-error",children:[K.jsx("span",{children:ne}),K.jsx("button",{onClick:()=>window.location.reload(),children:"Retry"})]}):P.length===0?K.jsx("div",{className:"projects-welcome",children:K.jsx("p",{children:"No projects yet. Ask the Architect to create your first project."})}):K.jsx(Bg,{projects:P})})]})}function kg({tabs:U,activeTabId:G,onSelectTab:X,onRefresh:P,children:Z}){return K.jsxs("div",{className:"mobile-layout",children:[K.jsx(of,{tabs:U,activeTabId:G,onSelectTab:X,onRefresh:P}),K.jsx("div",{className:"mobile-content",children:Z})]})}function Hg({tabId:U,initialLine:G}){let P=`${Kr()}api/annotate/${U}/`;return G&&(P+=`?line=${G}`),K.jsx("div",{className:"file-viewer",style:{width:"100%",height:"100%"},children:K.jsx("iframe",{src:P,style:{width:"100%",height:"100%",border:"none"},title:"File Annotator"})})}function zg(U){if(U<0)return"0m";const G=Math.floor(U/6e4);if(G<60)return`${G}m`;const X=Math.floor(G/60),P=G%60;return P>0?`${X}h ${P}m`:`${X}h`}function nf({gateStatus:U}){const[G,X]=xe.useState(Date.now());if(xe.useEffect(()=>{if(!(U!=null&&U.hasGate)||!U.requestedAt)return;const u=setInterval(()=>X(Date.now()),3e4);return()=>clearInterval(u)},[U==null?void 0:U.hasGate,U==null?void 0:U.requestedAt]),!(U!=null&&U.hasGate))return null;const{gateName:P,builderId:Z,requestedAt:ne}=U,j=`porch approve ${Z} ${P}`;let n=null;if(ne){const u=G-Date.parse(ne);n=zg(u)}return K.jsxs("div",{className:"gate-banner",role:"alert",children:[K.jsxs("span",{className:"gate-banner-message",children:[K.jsx("span",{className:"gate-banner-icon","aria-hidden":"true",children:"⚠"})," ","Builder ",Z," blocked on ",K.jsx("strong",{children:P})]}),n!==null&&K.jsxs("span",{className:"gate-banner-wait",children:["waiting ",n]}),K.jsx("code",{className:"gate-banner-cmd",children:j})]})}function Ng(U){const G=Math.floor(U/1e3);if(G<60)return`${G}s`;if(G<3600)return`${Math.floor(G/60)}m ${G%60}s`;const X=Math.floor(G/3600),P=Math.floor(G%3600/60);return`${X}h ${P}m`}function af({tunnelStatus:U,onRefresh:G}){const[X,P]=xe.useState(!1),Z=xe.useCallback(async()=>{P(!0);try{await Kv(),G()}catch{}finally{P(!1)}},[G]),ne=xe.useCallback(async()=>{P(!0);try{await Qv(),G()}catch{}finally{P(!1)}},[G]);if(!U)return K.jsxs("span",{className:"cloud-status cloud-status--none","data-testid":"cloud-status",children:[K.jsx("span",{className:"cloud-dot cloud-dot--gray"}),"Cloud: not registered"]});if(U.state==="error")return K.jsxs("span",{className:"cloud-status cloud-status--error","data-testid":"cloud-status",children:[K.jsx("span",{className:"cloud-dot cloud-dot--red"}),"Cloud: error"]});if(!U.registered)return K.jsxs("span",{className:"cloud-status cloud-status--none","data-testid":"cloud-status",children:[K.jsx("span",{className:"cloud-dot cloud-dot--gray"}),"Cloud: not registered"]});const{state:j,towerName:n,accessUrl:u,uptime:f}=U;return j==="auth_failed"?K.jsxs("span",{className:"cloud-status cloud-status--error","data-testid":"cloud-status",children:[K.jsx("span",{className:"cloud-dot cloud-dot--red"}),"Cloud: auth failed",K.jsx("span",{className:"cloud-hint",children:"Run --reauth"})]}):j==="connecting"?K.jsxs("span",{className:"cloud-status cloud-status--connecting","data-testid":"cloud-status",children:[K.jsx("span",{className:"cloud-dot cloud-dot--yellow"}),"Cloud: connecting..."]}):j==="connected"?K.jsxs("span",{className:"cloud-status cloud-status--connected","data-testid":"cloud-status",children:[K.jsx("span",{className:"cloud-dot cloud-dot--green"}),"Cloud: ",n,f!==null&&K.jsx("span",{className:"cloud-uptime",children:Ng(f)}),u&&K.jsx("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"cloud-link",children:"Open"}),K.jsx("button",{className:"cloud-btn",onClick:ne,disabled:X,"data-testid":"cloud-disconnect-btn",children:"Disconnect"})]}):K.jsxs("span",{className:"cloud-status cloud-status--disconnected","data-testid":"cloud-status",children:[K.jsx("span",{className:"cloud-dot cloud-dot--gray"}),"Cloud: disconnected",K.jsx("button",{className:"cloud-btn",onClick:Z,disabled:X,"data-testid":"cloud-connect-btn",children:"Connect"})]})}function Ug(){var l,S,x,v;const{state:U,tunnelStatus:G,refresh:X}=Zv(),{tabs:P,activeTab:Z,activeTabId:ne,selectTab:j}=eg(U),n=tg(`(max-width: ${jv}px)`),[u,f]=xe.useState(new Set),_=xe.useRef(new Map),a=xe.useCallback(async(b,m,C,L)=>{try{const M=await lf(b,m,L);m&&m>0&&_.current.set(M.id,m),X()}catch(M){console.error("Failed to open file:",M)}},[X]);xe.useEffect(()=>{U!=null&&U.projectName?document.title=`${U.projectName} Agent Farm`:document.title="Agent Farm"},[U==null?void 0:U.projectName]);const[p,w]=xe.useState(!1);xe.useEffect(()=>{const b=new URLSearchParams(window.location.search);w(b.get("fullscreen")==="1")},[]),xe.useEffect(()=>{if(!Z)return;(Z.type==="architect"||Z.type==="builder"||Z.type==="shell")&&f(m=>{if(m.has(Z.id))return m;const C=new Set(m);return C.add(Z.id),C})},[Z==null?void 0:Z.id,Z==null?void 0:Z.type]);const y=b=>{const m=Yd(b);return m?K.jsx(tf,{wsPath:m,onFileOpen:a}):K.jsx("div",{className:"no-terminal",children:"No terminal session"})},o=b=>{if(!b.annotationId||!U)return K.jsx("div",{className:"no-terminal",children:"No file viewer"});if(!U.annotations.find(L=>L.id===b.annotationId))return K.jsx("div",{className:"no-terminal",children:"Annotation not found"});const C=_.current.get(b.annotationId);return C!==void 0&&_.current.delete(b.annotationId),K.jsx(Hg,{tabId:b.annotationId,initialLine:C??b.initialLine})},r=b=>{const m=P.filter(C=>b.includes(C.type)&&u.has(C.id));return K.jsxs(K.Fragment,{children:[m.map(C=>{const L=Yd(C);return K.jsx("div",{className:"terminal-tab-pane",style:{display:ne===C.id?void 0:"none"},children:L?K.jsx(tf,{wsPath:L,onFileOpen:a}):K.jsx("div",{className:"no-terminal",children:"No terminal session"})},C.id)}),(Z==null?void 0:Z.type)==="dashboard"&&K.jsx(Og,{state:U,onRefresh:X,onSelectTab:j}),(Z==null?void 0:Z.type)==="file"&&o(Z)]})};if(p&&Z&&(Z.type==="architect"||Z.type==="builder"||Z.type==="shell"))return K.jsx("div",{className:"fullscreen-terminal",children:y(Z)});if(n)return K.jsxs("div",{className:"mobile-wrapper",children:[K.jsx("div",{className:"mobile-header",children:K.jsx(af,{tunnelStatus:G,onRefresh:X})}),K.jsx(nf,{gateStatus:U==null?void 0:U.gateStatus}),K.jsx(kg,{tabs:P,activeTabId:ne,onSelectTab:j,onRefresh:X,children:r(["architect","builder","shell"])})]});const h=P.find(b=>b.type==="architect"),c=h?y(h):K.jsx("div",{className:"no-architect",children:"No architect terminal"});return K.jsxs("div",{className:"app",children:[K.jsxs("header",{className:"app-header",children:[K.jsx("h1",{className:"app-title",children:"Agent Farm"}),K.jsxs("div",{className:"header-meta",children:[K.jsx(af,{tunnelStatus:G,onRefresh:X}),K.jsxs("span",{className:"builder-count",children:[((l=U==null?void 0:U.builders)==null?void 0:l.length)??0," builder(s)"]})]})]}),K.jsx(nf,{gateStatus:U==null?void 0:U.gateStatus}),K.jsx("div",{className:"app-body",children:K.jsx(ig,{left:c,right:K.jsxs("div",{className:"right-panel",children:[K.jsx(of,{tabs:P.filter(b=>b.type!=="architect"),activeTabId:ne,onSelectTab:j,onRefresh:X}),K.jsx("div",{className:"tab-content",role:"tabpanel",children:r(["builder","shell"])})]})})}),K.jsxs("footer",{className:"status-bar",children:[K.jsxs("span",{children:[((S=U==null?void 0:U.builders)==null?void 0:S.length)??0," builders"]}),K.jsxs("span",{children:[((x=U==null?void 0:U.utils)==null?void 0:x.length)??0," shells"]}),K.jsxs("span",{children:[((v=U==null?void 0:U.annotations)==null?void 0:v.length)??0," files"]})]})]})}Pv.createRoot(document.getElementById("root")).render(K.jsx(xe.StrictMode,{children:K.jsx(Ug,{})}));
131
+ //# sourceMappingURL=index-DZuzzh0T.js.map