@cluesmith/codev 2.0.13 → 2.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard/dist/assets/index-CioZsJfL.js +134 -0
- package/dashboard/dist/assets/{index-8O8nCk_X.js.map → index-CioZsJfL.js.map} +1 -1
- package/dashboard/dist/assets/index-DShepNcO.css +32 -0
- package/dashboard/dist/index.html +2 -2
- package/dist/agent-farm/cli.d.ts.map +1 -1
- package/dist/agent-farm/cli.js +33 -0
- package/dist/agent-farm/cli.js.map +1 -1
- package/dist/agent-farm/commands/bench.d.ts +49 -0
- package/dist/agent-farm/commands/bench.d.ts.map +1 -0
- package/dist/agent-farm/commands/bench.js +262 -0
- package/dist/agent-farm/commands/bench.js.map +1 -0
- package/dist/agent-farm/servers/tower-websocket.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-websocket.js +14 -1
- package/dist/agent-farm/servers/tower-websocket.js.map +1 -1
- package/dist/commands/consult/index.d.ts.map +1 -1
- package/dist/commands/consult/index.js +14 -6
- package/dist/commands/consult/index.js.map +1 -1
- package/dist/terminal/ws-protocol.d.ts +1 -1
- package/dist/terminal/ws-protocol.d.ts.map +1 -1
- package/package.json +1 -1
- package/dashboard/dist/assets/index-8O8nCk_X.js +0 -135
- package/dashboard/dist/assets/index-DCQyWOPv.css +0 -32
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
var Av=Object.defineProperty;var Rv=(I,X,G)=>X in I?Av(I,X,{enumerable:!0,configurable:!0,writable:!0,value:G}):I[X]=G;var ha=(I,X,G)=>Rv(I,typeof X!="symbol"?X+"":X,G);(function(){const X=document.createElement("link").relList;if(X&&X.supports&&X.supports("modulepreload"))return;for(const ee of document.querySelectorAll('link[rel="modulepreload"]'))B(ee);new MutationObserver(ee=>{for(const ne of ee)if(ne.type==="childList")for(const j of ne.addedNodes)j.tagName==="LINK"&&j.rel==="modulepreload"&&B(j)}).observe(document,{childList:!0,subtree:!0});function G(ee){const ne={};return ee.integrity&&(ne.integrity=ee.integrity),ee.referrerPolicy&&(ne.referrerPolicy=ee.referrerPolicy),ee.crossOrigin==="use-credentials"?ne.credentials="include":ee.crossOrigin==="anonymous"?ne.credentials="omit":ne.credentials="same-origin",ne}function B(ee){if(ee.ep)return;ee.ep=!0;const ne=G(ee);fetch(ee.href,ne)}})();var Ml={exports:{}},Yr={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var zd;function Dv(){if(zd)return Yr;zd=1;var I=Symbol.for("react.transitional.element"),X=Symbol.for("react.fragment");function G(B,ee,ne){var j=null;if(ne!==void 0&&(j=""+ne),ee.key!==void 0&&(j=""+ee.key),"key"in ee){ne={};for(var n in ee)n!=="key"&&(ne[n]=ee[n])}else ne=ee;return ee=ne.ref,{$$typeof:I,type:B,key:j,ref:ee!==void 0?ee:null,props:ne}}return Yr.Fragment=X,Yr.jsx=G,Yr.jsxs=G,Yr}var Ud;function Tv(){return Ud||(Ud=1,Ml.exports=Dv()),Ml.exports}var Q=Tv(),Al={exports:{}},De={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Id;function Bv(){if(Id)return De;Id=1;var I=Symbol.for("react.transitional.element"),X=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),ee=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"),g=Symbol.iterator;function b(M){return M===null||typeof M!="object"?null:(M=g&&M[g]||M["@@iterator"],typeof M=="function"?M:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},c=Object.assign,r={};function h(M,H,$){this.props=M,this.context=H,this.refs=r,this.updater=$||y}h.prototype.isReactComponent={},h.prototype.setState=function(M,H){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,H,"setState")},h.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function l(){}l.prototype=h.prototype;function o(M,H,$){this.props=M,this.context=H,this.refs=r,this.updater=$||y}var m=o.prototype=new l;m.constructor=o,c(m,h.prototype),m.isPureReactComponent=!0;var x=Array.isArray;function v(){}var w={H:null,A:null,T:null,S:null},S=Object.prototype.hasOwnProperty;function C(M,H,$){var K=$.ref;return{$$typeof:I,type:M,key:H,ref:K!==void 0?K:null,props:$}}function L(M,H){return C(M.type,H,M.props)}function R(M){return typeof M=="object"&&M!==null&&M.$$typeof===I}function E(M){var H={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function($){return H[$]})}var T=/\/+/g;function k(M,H){return typeof M=="object"&&M!==null&&M.key!=null?E(""+M.key):H.toString(36)}function W(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(v,v):(M.status="pending",M.then(function(H){M.status==="pending"&&(M.status="fulfilled",M.value=H)},function(H){M.status==="pending"&&(M.status="rejected",M.reason=H)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function U(M,H,$,K,ce){var oe=typeof M;(oe==="undefined"||oe==="boolean")&&(M=null);var q=!1;if(M===null)q=!0;else switch(oe){case"bigint":case"string":case"number":q=!0;break;case"object":switch(M.$$typeof){case I:case X:q=!0;break;case _:return q=M._init,U(q(M._payload),H,$,K,ce)}}if(q)return ce=ce(M),q=K===""?"."+k(M,0):K,x(ce)?($="",q!=null&&($=q.replace(T,"$&/")+"/"),U(ce,H,$,"",function(J){return J})):ce!=null&&(R(ce)&&(ce=L(ce,$+(ce.key==null||M&&M.key===ce.key?"":(""+ce.key).replace(T,"$&/")+"/")+q)),H.push(ce)),1;q=0;var z=K===""?".":K+":";if(x(M))for(var te=0;te<M.length;te++)K=M[te],oe=z+k(K,te),q+=U(K,H,$,oe,ce);else if(te=b(M),typeof te=="function")for(M=te.call(M),te=0;!(K=M.next()).done;)K=K.value,oe=z+k(K,te++),q+=U(K,H,$,oe,ce);else if(oe==="object"){if(typeof M.then=="function")return U(W(M),H,$,K,ce);throw H=String(M),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return q}function P(M,H,$){if(M==null)return M;var K=[],ce=0;return U(M,K,"","",function(oe){return H.call($,oe,ce++)}),K}function F(M){if(M._status===-1){var H=M._result;H=H(),H.then(function($){(M._status===0||M._status===-1)&&(M._status=1,M._result=$)},function($){(M._status===0||M._status===-1)&&(M._status=2,M._result=$)}),M._status===-1&&(M._status=0,M._result=H)}if(M._status===1)return M._result.default;throw M._result}var D=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},O={map:P,forEach:function(M,H,$){P(M,function(){H.apply(this,arguments)},$)},count:function(M){var H=0;return P(M,function(){H++}),H},toArray:function(M){return P(M,function(H){return H})||[]},only:function(M){if(!R(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return De.Activity=a,De.Children=O,De.Component=h,De.Fragment=G,De.Profiler=ee,De.PureComponent=o,De.StrictMode=B,De.Suspense=u,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,De.__COMPILER_RUNTIME={__proto__:null,c:function(M){return w.H.useMemoCache(M)}},De.cache=function(M){return function(){return M.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(M,H,$){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var K=c({},M.props),ce=M.key;if(H!=null)for(oe in H.key!==void 0&&(ce=""+H.key),H)!S.call(H,oe)||oe==="key"||oe==="__self"||oe==="__source"||oe==="ref"&&H.ref===void 0||(K[oe]=H[oe]);var oe=arguments.length-2;if(oe===1)K.children=$;else if(1<oe){for(var q=Array(oe),z=0;z<oe;z++)q[z]=arguments[z+2];K.children=q}return C(M.type,ce,K)},De.createContext=function(M){return M={$$typeof:j,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:ne,_context:M},M},De.createElement=function(M,H,$){var K,ce={},oe=null;if(H!=null)for(K in H.key!==void 0&&(oe=""+H.key),H)S.call(H,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(ce[K]=H[K]);var q=arguments.length-2;if(q===1)ce.children=$;else if(1<q){for(var z=Array(q),te=0;te<q;te++)z[te]=arguments[te+2];ce.children=z}if(M&&M.defaultProps)for(K in q=M.defaultProps,q)ce[K]===void 0&&(ce[K]=q[K]);return C(M,oe,ce)},De.createRef=function(){return{current:null}},De.forwardRef=function(M){return{$$typeof:n,render:M}},De.isValidElement=R,De.lazy=function(M){return{$$typeof:_,_payload:{_status:-1,_result:M},_init:F}},De.memo=function(M,H){return{$$typeof:f,type:M,compare:H===void 0?null:H}},De.startTransition=function(M){var H=w.T,$={};w.T=$;try{var K=M(),ce=w.S;ce!==null&&ce($,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(v,D)}catch(oe){D(oe)}finally{H!==null&&$.types!==null&&(H.types=$.types),w.T=H}},De.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},De.use=function(M){return w.H.use(M)},De.useActionState=function(M,H,$){return w.H.useActionState(M,H,$)},De.useCallback=function(M,H){return w.H.useCallback(M,H)},De.useContext=function(M){return w.H.useContext(M)},De.useDebugValue=function(){},De.useDeferredValue=function(M,H){return w.H.useDeferredValue(M,H)},De.useEffect=function(M,H){return w.H.useEffect(M,H)},De.useEffectEvent=function(M){return w.H.useEffectEvent(M)},De.useId=function(){return w.H.useId()},De.useImperativeHandle=function(M,H,$){return w.H.useImperativeHandle(M,H,$)},De.useInsertionEffect=function(M,H){return w.H.useInsertionEffect(M,H)},De.useLayoutEffect=function(M,H){return w.H.useLayoutEffect(M,H)},De.useMemo=function(M,H){return w.H.useMemo(M,H)},De.useOptimistic=function(M,H){return w.H.useOptimistic(M,H)},De.useReducer=function(M,H,$){return w.H.useReducer(M,H,$)},De.useRef=function(M){return w.H.useRef(M)},De.useState=function(M){return w.H.useState(M)},De.useSyncExternalStore=function(M,H,$){return w.H.useSyncExternalStore(M,H,$)},De.useTransition=function(){return w.H.useTransition()},De.version="19.2.4",De}var Pd;function Il(){return Pd||(Pd=1,Al.exports=Bv()),Al.exports}var ye=Il(),Rl={exports:{}},Vr={},Dl={exports:{}},Tl={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Fd;function Ov(){return Fd||(Fd=1,(function(I){function X(U,P){var F=U.length;U.push(P);e:for(;0<F;){var D=F-1>>>1,O=U[D];if(0<ee(O,P))U[D]=P,U[F]=O,F=D;else break e}}function G(U){return U.length===0?null:U[0]}function B(U){if(U.length===0)return null;var P=U[0],F=U.pop();if(F!==P){U[0]=F;e:for(var D=0,O=U.length,M=O>>>1;D<M;){var H=2*(D+1)-1,$=U[H],K=H+1,ce=U[K];if(0>ee($,F))K<O&&0>ee(ce,$)?(U[D]=ce,U[K]=F,D=K):(U[D]=$,U[H]=F,D=H);else if(K<O&&0>ee(ce,F))U[D]=ce,U[K]=F,D=K;else break e}}return P}function ee(U,P){var F=U.sortIndex-P.sortIndex;return F!==0?F:U.id-P.id}if(I.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var ne=performance;I.unstable_now=function(){return ne.now()}}else{var j=Date,n=j.now();I.unstable_now=function(){return j.now()-n}}var u=[],f=[],_=1,a=null,g=3,b=!1,y=!1,c=!1,r=!1,h=typeof setTimeout=="function"?setTimeout:null,l=typeof clearTimeout=="function"?clearTimeout:null,o=typeof setImmediate<"u"?setImmediate:null;function m(U){for(var P=G(f);P!==null;){if(P.callback===null)B(f);else if(P.startTime<=U)B(f),P.sortIndex=P.expirationTime,X(u,P);else break;P=G(f)}}function x(U){if(c=!1,m(U),!y)if(G(u)!==null)y=!0,v||(v=!0,E());else{var P=G(f);P!==null&&W(x,P.startTime-U)}}var v=!1,w=-1,S=5,C=-1;function L(){return r?!0:!(I.unstable_now()-C<S)}function R(){if(r=!1,v){var U=I.unstable_now();C=U;var P=!0;try{e:{y=!1,c&&(c=!1,l(w),w=-1),b=!0;var F=g;try{t:{for(m(U),a=G(u);a!==null&&!(a.expirationTime>U&&L());){var D=a.callback;if(typeof D=="function"){a.callback=null,g=a.priorityLevel;var O=D(a.expirationTime<=U);if(U=I.unstable_now(),typeof O=="function"){a.callback=O,m(U),P=!0;break t}a===G(u)&&B(u),m(U)}else B(u);a=G(u)}if(a!==null)P=!0;else{var M=G(f);M!==null&&W(x,M.startTime-U),P=!1}}break e}finally{a=null,g=F,b=!1}P=void 0}}finally{P?E():v=!1}}}var E;if(typeof o=="function")E=function(){o(R)};else if(typeof MessageChannel<"u"){var T=new MessageChannel,k=T.port2;T.port1.onmessage=R,E=function(){k.postMessage(null)}}else E=function(){h(R,0)};function W(U,P){w=h(function(){U(I.unstable_now())},P)}I.unstable_IdlePriority=5,I.unstable_ImmediatePriority=1,I.unstable_LowPriority=4,I.unstable_NormalPriority=3,I.unstable_Profiling=null,I.unstable_UserBlockingPriority=2,I.unstable_cancelCallback=function(U){U.callback=null},I.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):S=0<U?Math.floor(1e3/U):5},I.unstable_getCurrentPriorityLevel=function(){return g},I.unstable_next=function(U){switch(g){case 1:case 2:case 3:var P=3;break;default:P=g}var F=g;g=P;try{return U()}finally{g=F}},I.unstable_requestPaint=function(){r=!0},I.unstable_runWithPriority=function(U,P){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var F=g;g=U;try{return P()}finally{g=F}},I.unstable_scheduleCallback=function(U,P,F){var D=I.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?D+F:D):F=D,U){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,U={id:_++,callback:P,priorityLevel:U,startTime:F,expirationTime:O,sortIndex:-1},F>D?(U.sortIndex=F,X(f,U),G(u)===null&&U===G(f)&&(c?(l(w),w=-1):c=!0,W(x,F-D))):(U.sortIndex=O,X(u,U),y||b||(y=!0,v||(v=!0,E()))),U},I.unstable_shouldYield=L,I.unstable_wrapCallback=function(U){var P=g;return function(){var F=g;g=P;try{return U.apply(this,arguments)}finally{g=F}}}})(Tl)),Tl}var jd;function kv(){return jd||(jd=1,Dl.exports=Ov()),Dl.exports}var Bl={exports:{}},wt={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var $d;function Hv(){if($d)return wt;$d=1;var I=Il();function X(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 G(){}var B={d:{f:G,r:function(){throw Error(X(522))},D:G,C:G,L:G,m:G,X:G,S:G,M:G},p:0,findDOMNode:null},ee=Symbol.for("react.portal");function ne(u,f,_){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ee,key:a==null?null:""+a,children:u,containerInfo:f,implementation:_}}var j=I.__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=B,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(X(299));return ne(u,f,null,_)},wt.flushSync=function(u){var f=j.T,_=B.p;try{if(j.T=null,B.p=2,u)return u()}finally{j.T=f,B.p=_,B.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,B.d.C(u,f))},wt.prefetchDNS=function(u){typeof u=="string"&&B.d.D(u)},wt.preinit=function(u,f){if(typeof u=="string"&&f&&typeof f.as=="string"){var _=f.as,a=n(_,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,b=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;_==="style"?B.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:a,integrity:g,fetchPriority:b}):_==="script"&&B.d.X(u,{crossOrigin:a,integrity:g,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);B.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&&B.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);B.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);B.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 B.d.m(u)},wt.requestFormReset=function(u){B.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 qd;function Nv(){if(qd)return Bl.exports;qd=1;function I(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(I)}catch(X){console.error(X)}}return I(),Bl.exports=Hv(),Bl.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Wd;function zv(){if(Wd)return Vr;Wd=1;var I=kv(),X=Il(),G=Nv();function B(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 ee(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(B(188))}function f(e){var t=e.alternate;if(!t){if(t=ne(e),t===null)throw Error(B(188));return t!==e?null:e}for(var i=e,s=t;;){var d=i.return;if(d===null)break;var p=d.alternate;if(p===null){if(s=d.return,s!==null){i=s;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===i)return u(d),e;if(p===s)return u(d),t;p=p.sibling}throw Error(B(188))}if(i.return!==s.return)i=d,s=p;else{for(var A=!1,N=d.child;N;){if(N===i){A=!0,i=d,s=p;break}if(N===s){A=!0,s=d,i=p;break}N=N.sibling}if(!A){for(N=p.child;N;){if(N===i){A=!0,i=p,s=d;break}if(N===s){A=!0,s=p,i=d;break}N=N.sibling}if(!A)throw Error(B(189))}}if(i.alternate!==s)throw Error(B(190))}if(i.tag!==3)throw Error(B(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,g=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),o=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),C=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),R=Symbol.iterator;function E(e){return e===null||typeof e!="object"?null:(e=R&&e[R]||e["@@iterator"],typeof e=="function"?e:null)}var T=Symbol.for("react.client.reference");function k(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===T?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 y:return"Portal";case o:return e.displayName||"Context";case l:return(e._context.displayName||"Context")+".Consumer";case m:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case w:return t=e.displayName||null,t!==null?t:k(e.type)||"Memo";case S:t=e._payload,e=e._init;try{return k(e(t))}catch{}}return null}var W=Array.isArray,U=X.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=G.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},D=[],O=-1;function M(e){return{current:e}}function H(e){0>O||(e.current=D[O],D[O]=null,O--)}function $(e,t){O++,D[O]=e.current,e.current=t}var K=M(null),ce=M(null),oe=M(null),q=M(null);function z(e,t){switch($(oe,t),$(ce,e),$(K,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ad(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ad(t),e=od(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(K),$(K,e)}function te(){H(K),H(ce),H(oe)}function J(e){e.memoizedState!==null&&$(q,e);var t=K.current,i=od(t,e.type);t!==i&&($(ce,e),$(K,i))}function _e(e){ce.current===e&&(H(K),H(ce)),q.current===e&&(H(q),qr._currentValue=F)}var fe,Me;function ve(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
|
+
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 de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(ae){var re=ae}Reflect.construct(e,[],de)}else{try{de.call()}catch(ae){re=ae}e.call(de.prototype)}}else{try{throw Error()}catch(ae){re=ae}(de=e())&&typeof de.catch=="function"&&de.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 p=s.DetermineComponentFrameRoot(),A=p[0],N=p[1];if(A&&N){var Y=A.split(`
|
|
44
|
+
`),se=N.split(`
|
|
45
|
+
`);for(d=s=0;s<Y.length&&!Y[s].includes("DetermineComponentFrameRoot");)s++;for(;d<se.length&&!se[d].includes("DetermineComponentFrameRoot");)d++;if(s===Y.length||d===se.length)for(s=Y.length-1,d=se.length-1;1<=s&&0<=d&&Y[s]!==se[d];)d--;for(;1<=s&&0<=d;s--,d--)if(Y[s]!==se[d]){if(s!==1||d!==1)do if(s--,d--,0>d||Y[s]!==se[d]){var le=`
|
|
46
|
+
`+Y[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:"")?ve(i):""}function we(e,t){switch(e.tag){case 26:case 27:case 5:return ve(e.type);case 16:return ve("Lazy");case 13:return e.child!==t&&t!==null?ve("Suspense Fallback"):ve("Suspense");case 19:return ve("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 ve("Activity");default:return""}}function ft(e){try{var t="",i=null;do t+=we(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
|
|
47
|
+
Error generating stack: `+s.message+`
|
|
48
|
+
`+s.stack}}var Ot=Object.prototype.hasOwnProperty,Se=I.unstable_scheduleCallback,pe=I.unstable_cancelCallback,me=I.unstable_shouldYield,ue=I.unstable_requestPaint,ge=I.unstable_now,Ne=I.unstable_getCurrentPriorityLevel,Re=I.unstable_ImmediatePriority,_t=I.unstable_UserBlockingPriority,Qe=I.unstable_NormalPriority,it=I.unstable_LowPriority,Ie=I.unstable_IdlePriority,Ae=I.log,Le=I.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 Ft=256,ri=262144,ni=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 Kr(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var d=0,p=e.suspendedLanes,A=e.pingedLanes;e=e.warmLanes;var N=s&134217727;return N!==0?(s=N&~p,s!==0?d=Jt(s):(A&=N,A!==0?d=Jt(A):i||(i=N&~e,i!==0&&(d=Jt(i))))):(N=s&~p,N!==0?d=Jt(N):A!==0?d=Jt(A):i||(i=s&~e,i!==0&&(d=Jt(i)))),d===0?0:t!==0&&t!==d&&(t&p)===0&&(p=d&-d,i=t&-t,p>=i||p===32&&(i&4194048)!==0)?t:d}function sr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function vf(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 Fl(){var e=ni;return ni<<=1,(ni&62914560)===0&&(ni=4194304),e}function _a(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 gf(e,t,i,s,d,p){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 N=e.entanglements,Y=e.expirationTimes,se=e.hiddenUpdates;for(i=A&~i;0<i;){var le=31-ut(i),de=1<<le;N[le]=0,Y[le]=-1;var re=se[le];if(re!==null)for(se[le]=null,le=0;le<re.length;le++){var ae=re[le];ae!==null&&(ae.lane&=-536870913)}i&=~de}s!==0&&jl(e,s,0),p!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=p&~(A&~t))}function jl(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 $l(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 ql(e,t){var i=t&-t;return i=(i&42)!==0?1:va(i),(i&(e.suspendedLanes|t))!==0?0:i}function va(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 ga(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Wl(){var e=P.p;return e!==0?e:(e=window.event,e===void 0?32:Dd(e.type))}function Gl(e,t){var i=P.p;try{return P.p=e,t()}finally{P.p=i}}var Ri=Math.random().toString(36).slice(2),mt="__reactFiber$"+Ri,Et="__reactProps$"+Ri,gs="__reactContainer$"+Ri,pa="__reactEvents$"+Ri,pf="__reactListeners$"+Ri,mf="__reactHandles$"+Ri,Xl="__reactResources$"+Ri,nr="__reactMarker$"+Ri;function ma(e){delete e[mt],delete e[Et],delete e[pa],delete e[pf],delete e[mf]}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=_d(e);e!==null;){if(i=e[mt])return i;e=_d(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(B(33))}function Ss(e){var t=e[Xl];return t||(t=e[Xl]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function gt(e){e[nr]=!0}var Yl=new Set,Vl={};function Ji(e,t){Cs(e,t),Cs(e+"Capture",t)}function Cs(e,t){for(Vl[e]=t,e=0;e<t.length;e++)Yl.add(t[e])}var Sf=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]*$"),Kl={},Ql={};function Cf(e){return Ot.call(Ql,e)?!0:Ot.call(Kl,e)?!1:Sf.test(e)?Ql[e]=!0:(Kl[e]=!0,!1)}function Qr(e,t,i){if(Cf(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 Zr(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 ui(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 jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Zl(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function yf(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,p=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return d.call(this)},set:function(A){i=""+A,p.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 Sa(e){if(!e._valueTracker){var t=Zl(e)?"checked":"value";e._valueTracker=yf(e,t,""+e[t])}}function Jl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Zl(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function Jr(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 bf=/[\n"\\]/g;function $t(e){return e.replace(bf,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ca(e,t,i,s,d,p,A,N){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=""+jt(t)):e.value!==""+jt(t)&&(e.value=""+jt(t)):A!=="submit"&&A!=="reset"||e.removeAttribute("value"),t!=null?ya(e,A,jt(t)):i!=null?ya(e,A,jt(i)):s!=null&&e.removeAttribute("value"),d==null&&p!=null&&(e.defaultChecked=!!p),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?e.name=""+jt(N):e.removeAttribute("name")}function ec(e,t,i,s,d,p,A,N){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.type=p),t!=null||i!=null){if(!(p!=="submit"&&p!=="reset"||t!=null)){Sa(e);return}i=i!=null?""+jt(i):"",t=t!=null?""+jt(t):i,N||t===e.value||(e.value=t),e.defaultValue=t}s=s??d,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=N?e.checked:!!s,e.defaultChecked=!!s,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(e.name=A),Sa(e)}function ya(e,t,i){t==="number"&&Jr(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=""+jt(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 tc(e,t,i){if(t!=null&&(t=""+jt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+jt(i):""}function ic(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(B(92));if(W(s)){if(1<s.length)throw Error(B(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=jt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),Sa(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 wf=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 sc(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||wf.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function rc(e,t,i){if(t!=null&&typeof t!="object")throw Error(B(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&&sc(e,d,s)}else for(var p in t)t.hasOwnProperty(p)&&sc(e,p,t[p])}function ba(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 xf=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"]]),Lf=/^[\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 en(e){return Lf.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function di(){}var wa=null;function xa(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 nc(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(Ca(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(B(90));Ca(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&&Jl(s)}break e;case"textarea":tc(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&ys(e,!!i.multiple,t,!1)}}}var La=!1;function ac(e,t,i){if(La)return e(t,i);La=!0;try{var s=e(t);return s}finally{if(La=!1,(ws!==null||xs!==null)&&(jn(),ws&&(t=ws,e=xs,xs=ws=null,nc(t),e)))for(t=0;t<e.length;t++)nc(e[t])}}function or(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(B(231,t,typeof i));return i}var fi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ea=!1;if(fi)try{var lr={};Object.defineProperty(lr,"passive",{get:function(){Ea=!0}}),window.addEventListener("test",lr,lr),window.removeEventListener("test",lr,lr)}catch{Ea=!1}var Di=null,Ma=null,tn=null;function oc(){if(tn)return tn;var e,t=Ma,i=t.length,s,d="value"in Di?Di.value:Di.textContent,p=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[p-s];s++);return tn=d.slice(e,1<s?1-s:void 0)}function sn(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 rn(){return!0}function lc(){return!1}function Mt(e){function t(i,s,d,p,A){this._reactName=i,this._targetInst=d,this.type=s,this.nativeEvent=p,this.target=A,this.currentTarget=null;for(var N in e)e.hasOwnProperty(N)&&(i=e[N],this[N]=i?i(p):p[N]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?rn:lc,this.isPropagationStopped=lc,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=rn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=rn)},persist:function(){},isPersistent:rn}),t}var es={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nn=Mt(es),cr=a({},es,{view:0,detail:0}),Ef=Mt(cr),Aa,Ra,hr,an=a({},cr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ta,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"?(Aa=e.screenX-hr.screenX,Ra=e.screenY-hr.screenY):Ra=Aa=0,hr=e),Aa)},movementY:function(e){return"movementY"in e?e.movementY:Ra}}),cc=Mt(an),Mf=a({},an,{dataTransfer:0}),Af=Mt(Mf),Rf=a({},cr,{relatedTarget:0}),Da=Mt(Rf),Df=a({},es,{animationName:0,elapsedTime:0,pseudoElement:0}),Tf=Mt(Df),Bf=a({},es,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Of=Mt(Bf),kf=a({},es,{data:0}),hc=Mt(kf),Hf={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"},zf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Uf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=zf[e])?!!t[e]:!1}function Ta(){return Uf}var If=a({},cr,{key:function(e){if(e.key){var t=Hf[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=sn(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:Ta,charCode:function(e){return e.type==="keypress"?sn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?sn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Pf=Mt(If),Ff=a({},an,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uc=Mt(Ff),jf=a({},cr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ta}),$f=Mt(jf),qf=a({},es,{propertyName:0,elapsedTime:0,pseudoElement:0}),Wf=Mt(qf),Gf=a({},an,{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}),Xf=Mt(Gf),Yf=a({},es,{newState:0,oldState:0}),Vf=Mt(Yf),Kf=[9,13,27,32],Ba=fi&&"CompositionEvent"in window,ur=null;fi&&"documentMode"in document&&(ur=document.documentMode);var Qf=fi&&"TextEvent"in window&&!ur,dc=fi&&(!Ba||ur&&8<ur&&11>=ur),fc=" ",_c=!1;function vc(e,t){switch(e){case"keyup":return Kf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ls=!1;function Zf(e,t){switch(e){case"compositionend":return gc(t);case"keypress":return t.which!==32?null:(_c=!0,fc);case"textInput":return e=t.data,e===fc&&_c?null:e;default:return null}}function Jf(e,t){if(Ls)return e==="compositionend"||!Ba&&vc(e,t)?(e=oc(),tn=Ma=Di=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 dc&&t.locale!=="ko"?null:t.data;default:return null}}var e_={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 pc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!e_[e.type]:t==="textarea"}function mc(e,t,i,s){ws?xs?xs.push(s):xs=[s]:ws=s,t=Vn(t,"onChange"),0<t.length&&(i=new nn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var dr=null,fr=null;function t_(e){ed(e,0)}function on(e){var t=ar(e);if(Jl(t))return e}function Sc(e,t){if(e==="change")return t}var Cc=!1;if(fi){var Oa;if(fi){var ka="oninput"in document;if(!ka){var yc=document.createElement("div");yc.setAttribute("oninput","return;"),ka=typeof yc.oninput=="function"}Oa=ka}else Oa=!1;Cc=Oa&&(!document.documentMode||9<document.documentMode)}function bc(){dr&&(dr.detachEvent("onpropertychange",wc),fr=dr=null)}function wc(e){if(e.propertyName==="value"&&on(fr)){var t=[];mc(t,fr,e,xa(e)),ac(t_,t)}}function i_(e,t,i){e==="focusin"?(bc(),dr=t,fr=i,dr.attachEvent("onpropertychange",wc)):e==="focusout"&&bc()}function s_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return on(fr)}function r_(e,t){if(e==="click")return on(t)}function n_(e,t){if(e==="input"||e==="change")return on(t)}function a_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:a_;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 xc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lc(e,t){var i=xc(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=xc(i)}}function Ec(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ec(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Jr(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=Jr(e.document)}return t}function Ha(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_=fi&&"documentMode"in document&&11>=document.documentMode,Es=null,Na=null,vr=null,za=!1;function Ac(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;za||Es==null||Es!==Jr(s)||(s=Es,"selectionStart"in s&&Ha(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=Vn(Na,"onSelect"),0<s.length&&(t=new nn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Es)))}function ts(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Ms={animationend:ts("Animation","AnimationEnd"),animationiteration:ts("Animation","AnimationIteration"),animationstart:ts("Animation","AnimationStart"),transitionrun:ts("Transition","TransitionRun"),transitionstart:ts("Transition","TransitionStart"),transitioncancel:ts("Transition","TransitionCancel"),transitionend:ts("Transition","TransitionEnd")},Ua={},Rc={};fi&&(Rc=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 is(e){if(Ua[e])return Ua[e];if(!Ms[e])return e;var t=Ms[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Rc)return Ua[e]=t[i];return e}var Dc=is("animationend"),Tc=is("animationiteration"),Bc=is("animationstart"),l_=is("transitionrun"),c_=is("transitionstart"),h_=is("transitioncancel"),Oc=is("transitionend"),kc=new Map,Ia="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(" ");Ia.push("scrollEnd");function ei(e,t){kc.set(e,t),Ji(t,[e])}var ln=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,Pa=0;function cn(){for(var e=As,t=Pa=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 p=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}p!==0&&Hc(i,d,p)}}function hn(e,t,i,s){qt[As++]=e,qt[As++]=t,qt[As++]=i,qt[As++]=s,Pa|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Fa(e,t,i,s){return hn(e,t,i,s),un(e)}function ss(e,t){return hn(e,null,null,t),un(e)}function Hc(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var d=!1,p=e.return;p!==null;)p.childLanes|=i,s=p.alternate,s!==null&&(s.childLanes|=i),p.tag===22&&(e=p.stateNode,e===null||e._visibility&1||(d=!0)),e=p,p=p.return;return e.tag===3?(p=e.stateNode,d&&t!==null&&(d=31-ut(i),e=p.hiddenUpdates,s=e[d],s===null?e[d]=[t]:s.push(t),t.lane=i|536870912),p):null}function un(e){if(50<zr)throw zr=0,Qo=null,Error(B(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Rs={};function u_(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 u_(e,t,i,s)}function ja(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _i(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 Nc(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 dn(e,t,i,s,d,p){var A=0;if(s=e,typeof e=="function")ja(e)&&(A=1);else if(typeof e=="string")A=gv(e,i,K.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=p,e;case c:return rs(i.children,d,p,t);case r:A=8,d|=24;break;case h:return e=Ht(12,i,t,d|2),e.elementType=h,e.lanes=p,e;case x:return e=Ht(13,i,t,d),e.elementType=x,e.lanes=p,e;case v:return e=Ht(19,i,t,d),e.elementType=v,e.lanes=p,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case o:A=10;break e;case l:A=9;break e;case m:A=11;break e;case w:A=14;break e;case S:A=16,s=null;break e}A=29,i=Error(B(130,e===null?"null":typeof e,"")),s=null}return t=Ht(A,i,t,d),t.elementType=e,t.type=s,t.lanes=p,t}function rs(e,t,i,s){return e=Ht(7,e,s,t),e.lanes=i,e}function $a(e,t,i){return e=Ht(6,e,null,t),e.lanes=i,e}function zc(e){var t=Ht(18,null,null,0);return t.stateNode=e,t}function qa(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 Uc=new WeakMap;function Wt(e,t){if(typeof e=="object"&&e!==null){var i=Uc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:ft(t)},Uc.set(e,t),t)}return{value:e,source:t,stack:ft(t)}}var Ds=[],Ts=0,fn=null,gr=0,Gt=[],Xt=0,Ti=null,ai=1,oi="";function vi(e,t){Ds[Ts++]=gr,Ds[Ts++]=fn,fn=e,gr=t}function Ic(e,t,i){Gt[Xt++]=ai,Gt[Xt++]=oi,Gt[Xt++]=Ti,Ti=e;var s=ai;e=oi;var d=32-ut(s)-1;s&=~(1<<d),i+=1;var p=32-ut(t)+d;if(30<p){var A=d-d%5;p=(s&(1<<A)-1).toString(32),s>>=A,d-=A,ai=1<<32-ut(t)+d|i<<d|s,oi=p+e}else ai=1<<p|i<<d|s,oi=e}function Wa(e){e.return!==null&&(vi(e,1),Ic(e,1,0))}function Ga(e){for(;e===fn;)fn=Ds[--Ts],Ds[Ts]=null,gr=Ds[--Ts],Ds[Ts]=null;for(;e===Ti;)Ti=Gt[--Xt],Gt[Xt]=null,oi=Gt[--Xt],Gt[Xt]=null,ai=Gt[--Xt],Gt[Xt]=null}function Pc(e,t){Gt[Xt++]=ai,Gt[Xt++]=oi,Gt[Xt++]=Ti,ai=t.id,oi=t.overflow,Ti=e}var St=null,Ze=null,Pe=!1,Bi=null,Yt=!1,Xa=Error(B(519));function Oi(e){var t=Error(B(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw pr(Wt(t,e)),Xa}function Fc(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),ec(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),ic(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||rd(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=di),t=!0):t=!1,t||Oi(e,!0)}function jc(e){for(St=e.return;St;)switch(St.tag){case 5:case 31:case 13:Yt=!1;return;case 27:case 3:Yt=!0;return;default:St=St.return}}function Bs(e){if(e!==St)return!1;if(!Pe)return jc(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")||dl(e.type,e.memoizedProps)),i=!i),i&&Ze&&Oi(e),jc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(317));Ze=fd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(317));Ze=fd(e)}else t===27?(t=Ze,Xi(e.type)?(e=pl,pl=null,Ze=e):Ze=t):Ze=St?Kt(e.stateNode.nextSibling):null;return!0}function ns(){Ze=St=null,Pe=!1}function Ya(){var e=Bi;return e!==null&&(Tt===null?Tt=e:Tt.push.apply(Tt,e),Bi=null),e}function pr(e){Bi===null?Bi=[e]:Bi.push(e)}var Va=M(null),as=null,gi=null;function ki(e,t,i){$(Va,t._currentValue),t._currentValue=i}function pi(e){e._currentValue=Va.current,H(Va)}function Ka(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 Qa(e,t,i,s){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var p=d.dependencies;if(p!==null){var A=d.child;p=p.firstContext;e:for(;p!==null;){var N=p;p=d;for(var Y=0;Y<t.length;Y++)if(N.context===t[Y]){p.lanes|=i,N=p.alternate,N!==null&&(N.lanes|=i),Ka(p.return,i,e),s||(A=null);break e}p=N.next}}else if(d.tag===18){if(A=d.return,A===null)throw Error(B(341));A.lanes|=i,p=A.alternate,p!==null&&(p.lanes|=i),Ka(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,p=!1;d!==null;){if(!p){if((d.flags&524288)!==0)p=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var A=d.alternate;if(A===null)throw Error(B(387));if(A=A.memoizedProps,A!==null){var N=d.type;kt(d.pendingProps.value,A.value)||(e!==null?e.push(N):e=[N])}}else if(d===q.current){if(A=d.alternate,A===null)throw Error(B(387));A.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(qr):e=[qr])}d=d.return}e!==null&&Qa(t,e,i,s),t.flags|=262144}function _n(e){for(e=e.firstContext;e!==null;){if(!kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function os(e){as=e,gi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ct(e){return $c(as,e)}function vn(e,t){return as===null&&os(e),$c(e,t)}function $c(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},gi===null){if(e===null)throw Error(B(308));gi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else gi=gi.next=t;return i}var d_=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()})}},f_=I.unstable_scheduleCallback,__=I.unstable_NormalPriority,ot={$$typeof:o,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Za(){return{controller:new d_,data:new Map,refCount:0}}function mr(e){e.refCount--,e.refCount===0&&f_(__,function(){e.controller.abort()})}var Sr=null,Ja=0,ks=0,Hs=null;function v_(e,t){if(Sr===null){var i=Sr=[];Ja=0,ks=sl(),Hs={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Ja++,t.then(qc,qc),t}function qc(){if(--Ja===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 g_(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 Wc=U.S;U.S=function(e,t){Au=ge(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&v_(e,t),Wc!==null&&Wc(e,t)};var ls=M(null);function eo(){var e=ls.current;return e!==null?e:Ke.pooledCache}function gn(e,t){t===null?$(ls,ls.current):$(ls,t.pool)}function Gc(){var e=eo();return e===null?null:{parent:ot._currentValue,pool:e}}var Ns=Error(B(460)),to=Error(B(474)),pn=Error(B(542)),mn={then:function(){}};function Xc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Yc(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(di,di),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Kc(e),e;default:if(typeof t.status=="string")t.then(di,di);else{if(e=Ke,e!==null&&100<e.shellSuspendCounter)throw Error(B(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,Kc(e),e}throw hs=t,Ns}}function cs(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(hs=i,Ns):i}}var hs=null;function Vc(){if(hs===null)throw Error(B(459));var e=hs;return hs=null,e}function Kc(e){if(e===Ns||e===pn)throw Error(B(483))}var zs=null,Cr=0;function Sn(e){var t=Cr;return Cr+=1,zs===null&&(zs=[]),Yc(zs,e,t)}function yr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Cn(e,t){throw t.$$typeof===g?Error(B(525)):(e=Object.prototype.toString.call(t),Error(B(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Qc(e){function t(Z,V){if(e){var ie=Z.deletions;ie===null?(Z.deletions=[V],Z.flags|=16):ie.push(V)}}function i(Z,V){if(!e)return null;for(;V!==null;)t(Z,V),V=V.sibling;return null}function s(Z){for(var V=new Map;Z!==null;)Z.key!==null?V.set(Z.key,Z):V.set(Z.index,Z),Z=Z.sibling;return V}function d(Z,V){return Z=_i(Z,V),Z.index=0,Z.sibling=null,Z}function p(Z,V,ie){return Z.index=ie,e?(ie=Z.alternate,ie!==null?(ie=ie.index,ie<V?(Z.flags|=67108866,V):ie):(Z.flags|=67108866,V)):(Z.flags|=1048576,V)}function A(Z){return e&&Z.alternate===null&&(Z.flags|=67108866),Z}function N(Z,V,ie,he){return V===null||V.tag!==6?(V=$a(ie,Z.mode,he),V.return=Z,V):(V=d(V,ie),V.return=Z,V)}function Y(Z,V,ie,he){var xe=ie.type;return xe===c?le(Z,V,ie.props.children,he,ie.key):V!==null&&(V.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===S&&cs(xe)===V.type)?(V=d(V,ie.props),yr(V,ie),V.return=Z,V):(V=dn(ie.type,ie.key,ie.props,null,Z.mode,he),yr(V,ie),V.return=Z,V)}function se(Z,V,ie,he){return V===null||V.tag!==4||V.stateNode.containerInfo!==ie.containerInfo||V.stateNode.implementation!==ie.implementation?(V=qa(ie,Z.mode,he),V.return=Z,V):(V=d(V,ie.children||[]),V.return=Z,V)}function le(Z,V,ie,he,xe){return V===null||V.tag!==7?(V=rs(ie,Z.mode,he,xe),V.return=Z,V):(V=d(V,ie),V.return=Z,V)}function de(Z,V,ie){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=$a(""+V,Z.mode,ie),V.return=Z,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case b:return ie=dn(V.type,V.key,V.props,null,Z.mode,ie),yr(ie,V),ie.return=Z,ie;case y:return V=qa(V,Z.mode,ie),V.return=Z,V;case S:return V=cs(V),de(Z,V,ie)}if(W(V)||E(V))return V=rs(V,Z.mode,ie,null),V.return=Z,V;if(typeof V.then=="function")return de(Z,Sn(V),ie);if(V.$$typeof===o)return de(Z,vn(Z,V),ie);Cn(Z,V)}return null}function re(Z,V,ie,he){var xe=V!==null?V.key:null;if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return xe!==null?null:N(Z,V,""+ie,he);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case b:return ie.key===xe?Y(Z,V,ie,he):null;case y:return ie.key===xe?se(Z,V,ie,he):null;case S:return ie=cs(ie),re(Z,V,ie,he)}if(W(ie)||E(ie))return xe!==null?null:le(Z,V,ie,he,null);if(typeof ie.then=="function")return re(Z,V,Sn(ie),he);if(ie.$$typeof===o)return re(Z,V,vn(Z,ie),he);Cn(Z,ie)}return null}function ae(Z,V,ie,he,xe){if(typeof he=="string"&&he!==""||typeof he=="number"||typeof he=="bigint")return Z=Z.get(ie)||null,N(V,Z,""+he,xe);if(typeof he=="object"&&he!==null){switch(he.$$typeof){case b:return Z=Z.get(he.key===null?ie:he.key)||null,Y(V,Z,he,xe);case y:return Z=Z.get(he.key===null?ie:he.key)||null,se(V,Z,he,xe);case S:return he=cs(he),ae(Z,V,ie,he,xe)}if(W(he)||E(he))return Z=Z.get(ie)||null,le(V,Z,he,xe,null);if(typeof he.then=="function")return ae(Z,V,ie,Sn(he),xe);if(he.$$typeof===o)return ae(Z,V,ie,vn(V,he),xe);Cn(V,he)}return null}function Ce(Z,V,ie,he){for(var xe=null,Fe=null,be=V,Be=V=0,Ue=null;be!==null&&Be<ie.length;Be++){be.index>Be?(Ue=be,be=null):Ue=be.sibling;var je=re(Z,be,ie[Be],he);if(je===null){be===null&&(be=Ue);break}e&&be&&je.alternate===null&&t(Z,be),V=p(je,V,Be),Fe===null?xe=je:Fe.sibling=je,Fe=je,be=Ue}if(Be===ie.length)return i(Z,be),Pe&&vi(Z,Be),xe;if(be===null){for(;Be<ie.length;Be++)be=de(Z,ie[Be],he),be!==null&&(V=p(be,V,Be),Fe===null?xe=be:Fe.sibling=be,Fe=be);return Pe&&vi(Z,Be),xe}for(be=s(be);Be<ie.length;Be++)Ue=ae(be,Z,Be,ie[Be],he),Ue!==null&&(e&&Ue.alternate!==null&&be.delete(Ue.key===null?Be:Ue.key),V=p(Ue,V,Be),Fe===null?xe=Ue:Fe.sibling=Ue,Fe=Ue);return e&&be.forEach(function(Zi){return t(Z,Zi)}),Pe&&vi(Z,Be),xe}function Ee(Z,V,ie,he){if(ie==null)throw Error(B(151));for(var xe=null,Fe=null,be=V,Be=V=0,Ue=null,je=ie.next();be!==null&&!je.done;Be++,je=ie.next()){be.index>Be?(Ue=be,be=null):Ue=be.sibling;var Zi=re(Z,be,je.value,he);if(Zi===null){be===null&&(be=Ue);break}e&&be&&Zi.alternate===null&&t(Z,be),V=p(Zi,V,Be),Fe===null?xe=Zi:Fe.sibling=Zi,Fe=Zi,be=Ue}if(je.done)return i(Z,be),Pe&&vi(Z,Be),xe;if(be===null){for(;!je.done;Be++,je=ie.next())je=de(Z,je.value,he),je!==null&&(V=p(je,V,Be),Fe===null?xe=je:Fe.sibling=je,Fe=je);return Pe&&vi(Z,Be),xe}for(be=s(be);!je.done;Be++,je=ie.next())je=ae(be,Z,Be,je.value,he),je!==null&&(e&&je.alternate!==null&&be.delete(je.key===null?Be:je.key),V=p(je,V,Be),Fe===null?xe=je:Fe.sibling=je,Fe=je);return e&&be.forEach(function(Mv){return t(Z,Mv)}),Pe&&vi(Z,Be),xe}function Ve(Z,V,ie,he){if(typeof ie=="object"&&ie!==null&&ie.type===c&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case b:e:{for(var xe=ie.key;V!==null;){if(V.key===xe){if(xe=ie.type,xe===c){if(V.tag===7){i(Z,V.sibling),he=d(V,ie.props.children),he.return=Z,Z=he;break e}}else if(V.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===S&&cs(xe)===V.type){i(Z,V.sibling),he=d(V,ie.props),yr(he,ie),he.return=Z,Z=he;break e}i(Z,V);break}else t(Z,V);V=V.sibling}ie.type===c?(he=rs(ie.props.children,Z.mode,he,ie.key),he.return=Z,Z=he):(he=dn(ie.type,ie.key,ie.props,null,Z.mode,he),yr(he,ie),he.return=Z,Z=he)}return A(Z);case y:e:{for(xe=ie.key;V!==null;){if(V.key===xe)if(V.tag===4&&V.stateNode.containerInfo===ie.containerInfo&&V.stateNode.implementation===ie.implementation){i(Z,V.sibling),he=d(V,ie.children||[]),he.return=Z,Z=he;break e}else{i(Z,V);break}else t(Z,V);V=V.sibling}he=qa(ie,Z.mode,he),he.return=Z,Z=he}return A(Z);case S:return ie=cs(ie),Ve(Z,V,ie,he)}if(W(ie))return Ce(Z,V,ie,he);if(E(ie)){if(xe=E(ie),typeof xe!="function")throw Error(B(150));return ie=xe.call(ie),Ee(Z,V,ie,he)}if(typeof ie.then=="function")return Ve(Z,V,Sn(ie),he);if(ie.$$typeof===o)return Ve(Z,V,vn(Z,ie),he);Cn(Z,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint"?(ie=""+ie,V!==null&&V.tag===6?(i(Z,V.sibling),he=d(V,ie),he.return=Z,Z=he):(i(Z,V),he=$a(ie,Z.mode,he),he.return=Z,Z=he),A(Z)):i(Z,V)}return function(Z,V,ie,he){try{Cr=0;var xe=Ve(Z,V,ie,he);return zs=null,xe}catch(be){if(be===Ns||be===pn)throw be;var Fe=Ht(29,be,null,Z.mode);return Fe.lanes=he,Fe.return=Z,Fe}finally{}}}var us=Qc(!0),Zc=Qc(!1),Hi=!1;function io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function so(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 Ni(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=un(e),Hc(e,null,i),t}return hn(e,s,t,i),un(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,$l(e,i)}}function ro(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var d=null,p=null;if(i=i.firstBaseUpdate,i!==null){do{var A={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};p===null?d=p=A:p=p.next=A,i=i.next}while(i!==null);p===null?d=p=t:p=p.next=t}else d=p=t;i={baseState:s.baseState,firstBaseUpdate:d,lastBaseUpdate:p,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 no=!1;function wr(){if(no){var e=Hs;if(e!==null)throw e}}function xr(e,t,i,s){no=!1;var d=e.updateQueue;Hi=!1;var p=d.firstBaseUpdate,A=d.lastBaseUpdate,N=d.shared.pending;if(N!==null){d.shared.pending=null;var Y=N,se=Y.next;Y.next=null,A===null?p=se:A.next=se,A=Y;var le=e.alternate;le!==null&&(le=le.updateQueue,N=le.lastBaseUpdate,N!==A&&(N===null?le.firstBaseUpdate=se:N.next=se,le.lastBaseUpdate=Y))}if(p!==null){var de=d.baseState;A=0,le=se=Y=null,N=p;do{var re=N.lane&-536870913,ae=re!==N.lane;if(ae?(ze&re)===re:(s&re)===re){re!==0&&re===ks&&(no=!0),le!==null&&(le=le.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var Ce=e,Ee=N;re=t;var Ve=i;switch(Ee.tag){case 1:if(Ce=Ee.payload,typeof Ce=="function"){de=Ce.call(Ve,de,re);break e}de=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=Ee.payload,re=typeof Ce=="function"?Ce.call(Ve,de,re):Ce,re==null)break e;de=a({},de,re);break e;case 2:Hi=!0}}re=N.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:N.tag,payload:N.payload,callback:N.callback,next:null},le===null?(se=le=ae,Y=de):le=le.next=ae,A|=re;if(N=N.next,N===null){if(N=d.shared.pending,N===null)break;ae=N,N=ae.next,ae.next=null,d.lastBaseUpdate=ae,d.shared.pending=null}}while(!0);le===null&&(Y=de),d.baseState=Y,d.firstBaseUpdate=se,d.lastBaseUpdate=le,p===null&&(d.shared.lanes=0),ji|=A,e.lanes=A,e.memoizedState=de}}function Jc(e,t){if(typeof e!="function")throw Error(B(191,e));e.call(t)}function eh(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Jc(i[e],t)}var Us=M(null),yn=M(0);function th(e,t){e=Ei,$(yn,e),$(Us,t),Ei=e|t.baseLanes}function ao(){$(yn,Ei),$(Us,Us.current)}function oo(){Ei=yn.current,H(Us),H(yn)}var Nt=M(null),Vt=null;function Ui(e){var t=e.alternate;$(nt,nt.current&1),$(Nt,e),Vt===null&&(t===null||Us.current!==null||t.memoizedState!==null)&&(Vt=e)}function lo(e){$(nt,nt.current),$(Nt,e),Vt===null&&(Vt=e)}function ih(e){e.tag===22?($(nt,nt.current),$(Nt,e),Vt===null&&(Vt=e)):Ii()}function Ii(){$(nt,nt.current),$(Nt,Nt.current)}function zt(e){H(Nt),Vt===e&&(Vt=null),H(nt)}var nt=M(0);function bn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||vl(i)||gl(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 mi=0,Te=null,Xe=null,lt=null,wn=!1,Is=!1,ds=!1,xn=0,Lr=0,Ps=null,p_=0;function st(){throw Error(B(321))}function co(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 ho(e,t,i,s,d,p){return mi=p,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?Ih:Eo,ds=!1,p=i(s,d),ds=!1,Is&&(p=rh(t,i,s,d)),sh(e),p}function sh(e){U.H=Ar;var t=Xe!==null&&Xe.next!==null;if(mi=0,lt=Xe=Te=null,wn=!1,Lr=0,Ps=null,t)throw Error(B(300));e===null||ct||(e=e.dependencies,e!==null&&_n(e)&&(ct=!0))}function rh(e,t,i,s){Te=e;var d=0;do{if(Is&&(Ps=null),Lr=0,Is=!1,25<=d)throw Error(B(301));if(d+=1,lt=Xe=null,e.updateQueue!=null){var p=e.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}U.H=Ph,p=t(i,s)}while(Is);return p}function m_(){var e=U.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 uo(){var e=xn!==0;return xn=0,e}function fo(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function _o(e){if(wn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}wn=!1}mi=0,lt=Xe=Te=null,Is=!1,Lr=xn=0,Ps=null}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?Te.memoizedState=lt=e:lt=lt.next=e,lt}function at(){if(Xe===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=lt===null?Te.memoizedState:lt.next;if(t!==null)lt=t,Xe=e;else{if(e===null)throw Te.alternate===null?Error(B(467)):Error(B(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},lt===null?Te.memoizedState=lt=e:lt=lt.next=e}return lt}function Ln(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Er(e){var t=Lr;return Lr+=1,Ps===null&&(Ps=[]),e=Yc(Ps,e,t),t=Te,(lt===null?t.memoizedState:lt.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?Ih:Eo),e}function En(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Er(e);if(e.$$typeof===o)return Ct(e)}throw Error(B(438,String(e)))}function vo(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=Ln(),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 Si(e,t){return typeof t=="function"?t(e):t}function Mn(e){var t=at();return go(t,Xe,e)}function go(e,t,i){var s=e.queue;if(s===null)throw Error(B(311));s.lastRenderedReducer=i;var d=e.baseQueue,p=s.pending;if(p!==null){if(d!==null){var A=d.next;d.next=p.next,p.next=A}t.baseQueue=d=p,s.pending=null}if(p=e.baseState,d===null)e.memoizedState=p;else{t=d.next;var N=A=null,Y=null,se=t,le=!1;do{var de=se.lane&-536870913;if(de!==se.lane?(ze&de)===de:(mi&de)===de){var re=se.revertLane;if(re===0)Y!==null&&(Y=Y.next={lane:0,revertLane:0,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),de===ks&&(le=!0);else if((mi&re)===re){se=se.next,re===ks&&(le=!0);continue}else de={lane:0,revertLane:se.revertLane,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},Y===null?(N=Y=de,A=p):Y=Y.next=de,Te.lanes|=re,ji|=re;de=se.action,ds&&i(p,de),p=se.hasEagerState?se.eagerState:i(p,de)}else re={lane:de,revertLane:se.revertLane,gesture:se.gesture,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},Y===null?(N=Y=re,A=p):Y=Y.next=re,Te.lanes|=de,ji|=de;se=se.next}while(se!==null&&se!==t);if(Y===null?A=p:Y.next=N,!kt(p,e.memoizedState)&&(ct=!0,le&&(i=Hs,i!==null)))throw i;e.memoizedState=p,e.baseState=A,e.baseQueue=Y,s.lastRenderedState=p}return d===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function po(e){var t=at(),i=t.queue;if(i===null)throw Error(B(311));i.lastRenderedReducer=e;var s=i.dispatch,d=i.pending,p=t.memoizedState;if(d!==null){i.pending=null;var A=d=d.next;do p=e(p,A.action),A=A.next;while(A!==d);kt(p,t.memoizedState)||(ct=!0),t.memoizedState=p,t.baseQueue===null&&(t.baseState=p),i.lastRenderedState=p}return[p,s]}function nh(e,t,i){var s=Te,d=at(),p=Pe;if(p){if(i===void 0)throw Error(B(407));i=i()}else i=t();var A=!kt((Xe||d).memoizedState,i);if(A&&(d.memoizedState=i,ct=!0),d=d.queue,Co(lh.bind(null,s,d,e),[e]),d.getSnapshot!==t||A||lt!==null&<.memoizedState.tag&1){if(s.flags|=2048,Fs(9,{destroy:void 0},oh.bind(null,s,d,i,t),null),Ke===null)throw Error(B(349));p||(mi&127)!==0||ah(s,t,i)}return i}function ah(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Te.updateQueue,t===null?(t=Ln(),Te.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function oh(e,t,i,s){t.value=i,t.getSnapshot=s,ch(t)&&hh(e)}function lh(e,t,i){return i(function(){ch(t)&&hh(e)})}function ch(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!kt(e,i)}catch{return!0}}function hh(e){var t=ss(e,2);t!==null&&Bt(t,e,2)}function mo(e){var t=Lt();if(typeof e=="function"){var i=e;if(e=i(),ds){vt(!0);try{i()}finally{vt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Si,lastRenderedState:e},t}function uh(e,t,i,s){return e.baseState=i,go(e,Xe,typeof s=="function"?s:Si)}function S_(e,t,i,s,d){if(Dn(e))throw Error(B(485));if(e=t.action,e!==null){var p={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){p.listeners.push(A)}};U.T!==null?i(!0):p.isTransition=!1,s(p),i=t.pending,i===null?(p.next=t.pending=p,dh(t,p)):(p.next=i.next,t.pending=i.next=p)}}function dh(e,t){var i=t.action,s=t.payload,d=e.state;if(t.isTransition){var p=U.T,A={};U.T=A;try{var N=i(d,s),Y=U.S;Y!==null&&Y(A,N),fh(e,t,N)}catch(se){So(e,t,se)}finally{p!==null&&A.types!==null&&(p.types=A.types),U.T=p}}else try{p=i(d,s),fh(e,t,p)}catch(se){So(e,t,se)}}function fh(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){_h(e,t,s)},function(s){return So(e,t,s)}):_h(e,t,i)}function _h(e,t,i){t.status="fulfilled",t.value=i,vh(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,dh(e,i)))}function So(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,vh(t),t=t.next;while(t!==s)}e.action=null}function vh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function gh(e,t){return t}function ph(e,t){if(Pe){var i=Ke.formState;if(i!==null){e:{var s=Te;if(Pe){if(Ze){t:{for(var d=Ze,p=Yt;d.nodeType!==8;){if(!p){d=null;break t}if(d=Kt(d.nextSibling),d===null){d=null;break t}}p=d.data,d=p==="F!"||p==="F"?d:null}if(d){Ze=Kt(d.nextSibling),s=d.data==="F!";break e}}Oi(s)}s=!1}s&&(t=i[0])}}return i=Lt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gh,lastRenderedState:t},i.queue=s,i=Nh.bind(null,Te,s),s.dispatch=i,s=mo(!1),p=Lo.bind(null,Te,!1,s.queue),s=Lt(),d={state:t,dispatch:null,action:e,pending:null},s.queue=d,i=S_.bind(null,Te,d,p,i),d.dispatch=i,s.memoizedState=e,[t,i,!1]}function mh(e){var t=at();return Sh(t,Xe,e)}function Sh(e,t,i){if(t=go(e,t,gh)[0],e=Mn(Si)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Er(t)}catch(A){throw A===Ns?pn:A}else s=t;t=at();var d=t.queue,p=d.dispatch;return i!==t.memoizedState&&(Te.flags|=2048,Fs(9,{destroy:void 0},C_.bind(null,d,i),null)),[s,p,e]}function C_(e,t){e.action=t}function Ch(e){var t=at(),i=Xe;if(i!==null)return Sh(t,i,e);at(),t=t.memoizedState,i=at();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Fs(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Te.updateQueue,t===null&&(t=Ln(),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 yh(){return at().memoizedState}function An(e,t,i,s){var d=Lt();Te.flags|=e,d.memoizedState=Fs(1|t,{destroy:void 0},i,s===void 0?null:s)}function Rn(e,t,i,s){var d=at();s=s===void 0?null:s;var p=d.memoizedState.inst;Xe!==null&&s!==null&&co(s,Xe.memoizedState.deps)?d.memoizedState=Fs(t,p,i,s):(Te.flags|=e,d.memoizedState=Fs(1|t,p,i,s))}function bh(e,t){An(8390656,8,e,t)}function Co(e,t){Rn(2048,8,e,t)}function y_(e){Te.flags|=4;var t=Te.updateQueue;if(t===null)t=Ln(),Te.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function wh(e){var t=at().memoizedState;return y_({ref:t,nextImpl:e}),function(){if(($e&2)!==0)throw Error(B(440));return t.impl.apply(void 0,arguments)}}function xh(e,t){return Rn(4,2,e,t)}function Lh(e,t){return Rn(4,4,e,t)}function Eh(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 Mh(e,t,i){i=i!=null?i.concat([e]):null,Rn(4,4,Eh.bind(null,t,e),i)}function yo(){}function Ah(e,t){var i=at();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&co(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Rh(e,t){var i=at();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&co(t,s[1]))return s[0];if(s=e(),ds){vt(!0);try{e()}finally{vt(!1)}}return i.memoizedState=[s,t],s}function bo(e,t,i){return i===void 0||(mi&1073741824)!==0&&(ze&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Du(),Te.lanes|=e,ji|=e,i)}function Dh(e,t,i,s){return kt(i,t)?i:Us.current!==null?(e=bo(e,i,s),kt(e,t)||(ct=!0),e):(mi&42)===0||(mi&1073741824)!==0&&(ze&261930)===0?(ct=!0,e.memoizedState=i):(e=Du(),Te.lanes|=e,ji|=e,t)}function Th(e,t,i,s,d){var p=P.p;P.p=p!==0&&8>p?p:8;var A=U.T,N={};U.T=N,Lo(e,!1,t,i);try{var Y=d(),se=U.S;if(se!==null&&se(N,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var le=g_(Y,s);Mr(e,t,le,Pt(e))}else Mr(e,t,s,Pt(e))}catch(de){Mr(e,t,{then:function(){},status:"rejected",reason:de},Pt())}finally{P.p=p,A!==null&&N.types!==null&&(A.types=N.types),U.T=A}}function b_(){}function wo(e,t,i,s){if(e.tag!==5)throw Error(B(476));var d=Bh(e).queue;Th(e,d,t,F,i===null?b_:function(){return Oh(e),i(s)})}function Bh(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:Si,lastRenderedState:F},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Si,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Oh(e){var t=Bh(e);t.next===null&&(t=e.alternate.memoizedState),Mr(e,t.next.queue,{},Pt())}function xo(){return Ct(qr)}function kh(){return at().memoizedState}function Hh(){return at().memoizedState}function w_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Pt();e=Ni(i);var s=zi(t,e,i);s!==null&&(Bt(s,t,i),br(s,t,i)),t={cache:Za()},e.payload=t;return}t=t.return}}function x_(e,t,i){var s=Pt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Dn(e)?zh(t,i):(i=Fa(e,t,i,s),i!==null&&(Bt(i,e,s),Uh(i,t,s)))}function Nh(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(Dn(e))zh(t,d);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=t.lastRenderedReducer,p!==null))try{var A=t.lastRenderedState,N=p(A,i);if(d.hasEagerState=!0,d.eagerState=N,kt(N,A))return hn(e,t,d,0),Ke===null&&cn(),!1}catch{}finally{}if(i=Fa(e,t,d,s),i!==null)return Bt(i,e,s),Uh(i,t,s),!0}return!1}function Lo(e,t,i,s){if(s={lane:2,revertLane:sl(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Dn(e)){if(t)throw Error(B(479))}else t=Fa(e,i,s,2),t!==null&&Bt(t,e,2)}function Dn(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function zh(e,t){Is=wn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Uh(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,$l(e,i)}}var Ar={readContext:Ct,use:En,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 Ih={readContext:Ct,use:En,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:Ct,useEffect:bh,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,An(4194308,4,Eh.bind(null,t,e),i)},useLayoutEffect:function(e,t){return An(4194308,4,e,t)},useInsertionEffect:function(e,t){An(4,2,e,t)},useMemo:function(e,t){var i=Lt();t=t===void 0?null:t;var s=e();if(ds){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(ds){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=x_.bind(null,Te,e),[s.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:function(e){e=mo(e);var t=e.queue,i=Nh.bind(null,Te,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:yo,useDeferredValue:function(e,t){var i=Lt();return bo(i,e,t)},useTransition:function(){var e=mo(!1);return e=Th.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(B(407));i=i()}else{if(i=t(),Ke===null)throw Error(B(349));(ze&127)!==0||ah(s,t,i)}d.memoizedState=i;var p={value:i,getSnapshot:t};return d.queue=p,bh(lh.bind(null,s,p,e),[e]),s.flags|=2048,Fs(9,{destroy:void 0},oh.bind(null,s,p,i,t),null),i},useId:function(){var e=Lt(),t=Ke.identifierPrefix;if(Pe){var i=oi,s=ai;i=(s&~(1<<32-ut(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=xn++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=p_++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:xo,useFormState:ph,useActionState:ph,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=Lo.bind(null,Te,!0,i),i.dispatch=t,[e,t]},useMemoCache:vo,useCacheRefresh:function(){return Lt().memoizedState=w_.bind(null,Te)},useEffectEvent:function(e){var t=Lt(),i={impl:e};return t.memoizedState=i,function(){if(($e&2)!==0)throw Error(B(440));return i.impl.apply(void 0,arguments)}}},Eo={readContext:Ct,use:En,useCallback:Ah,useContext:Ct,useEffect:Co,useImperativeHandle:Mh,useInsertionEffect:xh,useLayoutEffect:Lh,useMemo:Rh,useReducer:Mn,useRef:yh,useState:function(){return Mn(Si)},useDebugValue:yo,useDeferredValue:function(e,t){var i=at();return Dh(i,Xe.memoizedState,e,t)},useTransition:function(){var e=Mn(Si)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Er(e),t]},useSyncExternalStore:nh,useId:kh,useHostTransitionStatus:xo,useFormState:mh,useActionState:mh,useOptimistic:function(e,t){var i=at();return uh(i,Xe,e,t)},useMemoCache:vo,useCacheRefresh:Hh};Eo.useEffectEvent=wh;var Ph={readContext:Ct,use:En,useCallback:Ah,useContext:Ct,useEffect:Co,useImperativeHandle:Mh,useInsertionEffect:xh,useLayoutEffect:Lh,useMemo:Rh,useReducer:po,useRef:yh,useState:function(){return po(Si)},useDebugValue:yo,useDeferredValue:function(e,t){var i=at();return Xe===null?bo(i,e,t):Dh(i,Xe.memoizedState,e,t)},useTransition:function(){var e=po(Si)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Er(e),t]},useSyncExternalStore:nh,useId:kh,useHostTransitionStatus:xo,useFormState:Ch,useActionState:Ch,useOptimistic:function(e,t){var i=at();return Xe!==null?uh(i,Xe,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:vo,useCacheRefresh:Hh};Ph.useEffectEvent=wh;function Mo(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 Ao={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Pt(),d=Ni(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=Ni(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=Ni(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 Fh(e,t,i,s,d,p,A){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,p,A):t.prototype&&t.prototype.isPureReactComponent?!_r(i,s)||!_r(d,p):!0}function jh(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&&Ao.enqueueReplaceState(t,t.state,null)}function fs(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 $h(e){ln(e)}function qh(e){console.error(e)}function Wh(e){ln(e)}function Tn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Gh(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 Ro(e,t,i){return i=Ni(i),i.tag=3,i.payload={element:null},i.callback=function(){Tn(e,t)},i}function Xh(e){return e=Ni(e),e.tag=3,e}function Yh(e,t,i,s){var d=i.type.getDerivedStateFromError;if(typeof d=="function"){var p=s.value;e.payload=function(){return d(p)},e.callback=function(){Gh(t,i,s)}}var A=i.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(e.callback=function(){Gh(t,i,s),typeof d!="function"&&($i===null?$i=new Set([this]):$i.add(this));var N=s.stack;this.componentDidCatch(s.value,{componentStack:N!==null?N:""})})}function L_(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=Nt.current,i!==null){switch(i.tag){case 31:case 13:return Vt===null?$n():i.alternate===null&&rt===0&&(rt=3),i.flags&=-257,i.flags|=65536,i.lanes=d,s===mn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),el(e,s,d)),!1;case 22:return i.flags|=65536,s===mn?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)),el(e,s,d)),!1}throw Error(B(435,i.tag))}return el(e,s,d),$n(),!1}if(Pe)return t=Nt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=d,s!==Xa&&(e=Error(B(422),{cause:s}),pr(Wt(e,i)))):(s!==Xa&&(t=Error(B(423),{cause:s}),pr(Wt(t,i))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,s=Wt(s,i),d=Ro(e.stateNode,s,d),ro(e,d),rt!==4&&(rt=2)),!1;var p=Error(B(520),{cause:s});if(p=Wt(p,i),Nr===null?Nr=[p]:Nr.push(p),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=Ro(i.stateNode,s,e),ro(i,e),!1;case 1:if(t=i.type,p=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&($i===null||!$i.has(p))))return i.flags|=65536,d&=-d,i.lanes|=d,d=Xh(d),Yh(d,e,i,s),ro(i,d),!1}i=i.return}while(i!==null);return!1}var Do=Error(B(461)),ct=!1;function yt(e,t,i,s){t.child=e===null?Zc(t,null,i,s):us(t,e.child,i,s)}function Vh(e,t,i,s,d){i=i.render;var p=t.ref;if("ref"in s){var A={};for(var N in s)N!=="ref"&&(A[N]=s[N])}else A=s;return os(t),s=ho(e,t,i,A,p,d),N=uo(),e!==null&&!ct?(fo(e,t,d),Ci(e,t,d)):(Pe&&N&&Wa(t),t.flags|=1,yt(e,t,s,d),t.child)}function Kh(e,t,i,s,d){if(e===null){var p=i.type;return typeof p=="function"&&!ja(p)&&p.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=p,Qh(e,t,p,s,d)):(e=dn(i.type,null,s,t,t.mode,d),e.ref=t.ref,e.return=t,t.child=e)}if(p=e.child,!Uo(e,d)){var A=p.memoizedProps;if(i=i.compare,i=i!==null?i:_r,i(A,s)&&e.ref===t.ref)return Ci(e,t,d)}return t.flags|=1,e=_i(p,s),e.ref=t.ref,e.return=t,t.child=e}function Qh(e,t,i,s,d){if(e!==null){var p=e.memoizedProps;if(_r(p,s)&&e.ref===t.ref)if(ct=!1,t.pendingProps=s=p,Uo(e,d))(e.flags&131072)!==0&&(ct=!0);else return t.lanes=e.lanes,Ci(e,t,d)}return To(e,t,i,s,d)}function Zh(e,t,i,s){var d=s.children,p=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(p=p!==null?p.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&~p}else s=0,t.child=null;return Jh(e,t,p,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&gn(t,p!==null?p.cachePool:null),p!==null?th(t,p):ao(),ih(t);else return s=t.lanes=536870912,Jh(e,t,p!==null?p.baseLanes|i:i,i,s)}else p!==null?(gn(t,p.cachePool),th(t,p),Ii(),t.memoizedState=null):(e!==null&&gn(t,null),ao(),Ii());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 Jh(e,t,i,s,d){var p=eo();return p=p===null?null:{parent:ot._currentValue,pool:p},t.memoizedState={baseLanes:i,cachePool:p},e!==null&&gn(t,null),ao(),ih(t),e!==null&&Os(e,t,s,!0),t.childLanes=d,null}function Bn(e,t){return t=kn({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function eu(e,t,i){return us(t,e.child,null,i),e=Bn(t,t.pendingProps),e.flags|=2,zt(t),t.memoizedState=null,e}function E_(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=Bn(t,s),t.lanes=536870912,Rr(null,e);if(lo(t),(e=Ze)?(e=dd(e,Yt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ti!==null?{id:ai,overflow:oi}:null,retryLane:536870912,hydrationErrors:null},i=zc(e),i.return=t,t.child=i,St=t,Ze=null)):e=null,e===null)throw Oi(t);return t.lanes=536870912,null}return Bn(t,s)}var p=e.memoizedState;if(p!==null){var A=p.dehydrated;if(lo(t),d)if(t.flags&256)t.flags&=-257,t=eu(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(B(558));else if(ct||Os(e,t,i,!1),d=(i&e.childLanes)!==0,ct||d){if(s=Ke,s!==null&&(A=ql(s,i),A!==0&&A!==p.retryLane))throw p.retryLane=A,ss(e,A),Bt(s,e,A),Do;$n(),t=eu(e,t,i)}else e=p.treeContext,Ze=Kt(A.nextSibling),St=t,Pe=!0,Bi=null,Yt=!1,e!==null&&Pc(t,e),t=Bn(t,s),t.flags|=4096;return t}return e=_i(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function On(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(B(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function To(e,t,i,s,d){return os(t),i=ho(e,t,i,s,void 0,d),s=uo(),e!==null&&!ct?(fo(e,t,d),Ci(e,t,d)):(Pe&&s&&Wa(t),t.flags|=1,yt(e,t,i,d),t.child)}function tu(e,t,i,s,d,p){return os(t),t.updateQueue=null,i=rh(t,s,i,d),sh(e),s=uo(),e!==null&&!ct?(fo(e,t,p),Ci(e,t,p)):(Pe&&s&&Wa(t),t.flags|=1,yt(e,t,i,p),t.child)}function iu(e,t,i,s,d){if(os(t),t.stateNode===null){var p=Rs,A=i.contextType;typeof A=="object"&&A!==null&&(p=Ct(A)),p=new i(s,p),t.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Ao,t.stateNode=p,p._reactInternals=t,p=t.stateNode,p.props=s,p.state=t.memoizedState,p.refs={},io(t),A=i.contextType,p.context=typeof A=="object"&&A!==null?Ct(A):Rs,p.state=t.memoizedState,A=i.getDerivedStateFromProps,typeof A=="function"&&(Mo(t,i,A,s),p.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(A=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),A!==p.state&&Ao.enqueueReplaceState(p,p.state,null),xr(t,s,p,d),wr(),p.state=t.memoizedState),typeof p.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){p=t.stateNode;var N=t.memoizedProps,Y=fs(i,N);p.props=Y;var se=p.context,le=i.contextType;A=Rs,typeof le=="object"&&le!==null&&(A=Ct(le));var de=i.getDerivedStateFromProps;le=typeof de=="function"||typeof p.getSnapshotBeforeUpdate=="function",N=t.pendingProps!==N,le||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(N||se!==A)&&jh(t,p,s,A),Hi=!1;var re=t.memoizedState;p.state=re,xr(t,s,p,d),wr(),se=t.memoizedState,N||re!==se||Hi?(typeof de=="function"&&(Mo(t,i,de,s),se=t.memoizedState),(Y=Hi||Fh(t,i,Y,s,re,se,A))?(le||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(t.flags|=4194308)):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=se),p.props=s,p.state=se,p.context=A,s=Y):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{p=t.stateNode,so(e,t),A=t.memoizedProps,le=fs(i,A),p.props=le,de=t.pendingProps,re=p.context,se=i.contextType,Y=Rs,typeof se=="object"&&se!==null&&(Y=Ct(se)),N=i.getDerivedStateFromProps,(se=typeof N=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(A!==de||re!==Y)&&jh(t,p,s,Y),Hi=!1,re=t.memoizedState,p.state=re,xr(t,s,p,d),wr();var ae=t.memoizedState;A!==de||re!==ae||Hi||e!==null&&e.dependencies!==null&&_n(e.dependencies)?(typeof N=="function"&&(Mo(t,i,N,s),ae=t.memoizedState),(le=Hi||Fh(t,i,le,s,re,ae,Y)||e!==null&&e.dependencies!==null&&_n(e.dependencies))?(se||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(s,ae,Y),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(s,ae,Y)),typeof p.componentDidUpdate=="function"&&(t.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof p.componentDidUpdate!="function"||A===e.memoizedProps&&re===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||A===e.memoizedProps&&re===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=ae),p.props=s,p.state=ae,p.context=Y,s=le):(typeof p.componentDidUpdate!="function"||A===e.memoizedProps&&re===e.memoizedState||(t.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||A===e.memoizedProps&&re===e.memoizedState||(t.flags|=1024),s=!1)}return p=s,On(e,t),s=(t.flags&128)!==0,p||s?(p=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:p.render(),t.flags|=1,e!==null&&s?(t.child=us(t,e.child,null,d),t.child=us(t,null,i,d)):yt(e,t,i,d),t.memoizedState=p.state,e=t.child):e=Ci(e,t,d),e}function su(e,t,i,s){return ns(),t.flags|=256,yt(e,t,i,s),t.child}var Bo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Oo(e){return{baseLanes:e,cachePool:Gc()}}function ko(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=It),e}function ru(e,t,i){var s=t.pendingProps,d=!1,p=(t.flags&128)!==0,A;if((A=p)||(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?Ui(t):Ii(),(e=Ze)?(e=dd(e,Yt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ti!==null?{id:ai,overflow:oi}:null,retryLane:536870912,hydrationErrors:null},i=zc(e),i.return=t,t.child=i,St=t,Ze=null)):e=null,e===null)throw Oi(t);return gl(e)?t.lanes=32:t.lanes=536870912,null}var N=s.children;return s=s.fallback,d?(Ii(),d=t.mode,N=kn({mode:"hidden",children:N},d),s=rs(s,d,i,null),N.return=t,s.return=t,N.sibling=s,t.child=N,s=t.child,s.memoizedState=Oo(i),s.childLanes=ko(e,A,i),t.memoizedState=Bo,Rr(null,s)):(Ui(t),Ho(t,N))}var Y=e.memoizedState;if(Y!==null&&(N=Y.dehydrated,N!==null)){if(p)t.flags&256?(Ui(t),t.flags&=-257,t=No(e,t,i)):t.memoizedState!==null?(Ii(),t.child=e.child,t.flags|=128,t=null):(Ii(),N=s.fallback,d=t.mode,s=kn({mode:"visible",children:s.children},d),N=rs(N,d,i,null),N.flags|=2,s.return=t,N.return=t,s.sibling=N,t.child=s,us(t,e.child,null,i),s=t.child,s.memoizedState=Oo(i),s.childLanes=ko(e,A,i),t.memoizedState=Bo,t=Rr(null,s));else if(Ui(t),gl(N)){if(A=N.nextSibling&&N.nextSibling.dataset,A)var se=A.dgst;A=se,s=Error(B(419)),s.stack="",s.digest=A,pr({value:s,source:null,stack:null}),t=No(e,t,i)}else if(ct||Os(e,t,i,!1),A=(i&e.childLanes)!==0,ct||A){if(A=Ke,A!==null&&(s=ql(A,i),s!==0&&s!==Y.retryLane))throw Y.retryLane=s,ss(e,s),Bt(A,e,s),Do;vl(N)||$n(),t=No(e,t,i)}else vl(N)?(t.flags|=192,t.child=e.child,t=null):(e=Y.treeContext,Ze=Kt(N.nextSibling),St=t,Pe=!0,Bi=null,Yt=!1,e!==null&&Pc(t,e),t=Ho(t,s.children),t.flags|=4096);return t}return d?(Ii(),N=s.fallback,d=t.mode,Y=e.child,se=Y.sibling,s=_i(Y,{mode:"hidden",children:s.children}),s.subtreeFlags=Y.subtreeFlags&65011712,se!==null?N=_i(se,N):(N=rs(N,d,i,null),N.flags|=2),N.return=t,s.return=t,s.sibling=N,t.child=s,Rr(null,s),s=t.child,N=e.child.memoizedState,N===null?N=Oo(i):(d=N.cachePool,d!==null?(Y=ot._currentValue,d=d.parent!==Y?{parent:Y,pool:Y}:d):d=Gc(),N={baseLanes:N.baseLanes|i,cachePool:d}),s.memoizedState=N,s.childLanes=ko(e,A,i),t.memoizedState=Bo,Rr(e.child,s)):(Ui(t),i=e.child,e=i.sibling,i=_i(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 Ho(e,t){return t=kn({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function kn(e,t){return e=Ht(22,e,null,t),e.lanes=0,e}function No(e,t,i){return us(t,e.child,null,i),e=Ho(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nu(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Ka(e.return,t,i)}function zo(e,t,i,s,d,p){var A=e.memoizedState;A===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:d,treeForkCount:p}:(A.isBackwards=t,A.rendering=null,A.renderingStartTime=0,A.last=s,A.tail=i,A.tailMode=d,A.treeForkCount=p)}function au(e,t,i){var s=t.pendingProps,d=s.revealOrder,p=s.tail;s=s.children;var A=nt.current,N=(A&2)!==0;if(N?(A=A&1|2,t.flags|=128):A&=1,$(nt,A),yt(e,t,s,i),s=Pe?gr:0,!N&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&nu(e,i,t);else if(e.tag===19)nu(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&&bn(e)===null&&(d=i),i=i.sibling;i=d,i===null?(d=t.child,t.child=null):(d=i.sibling,i.sibling=null),zo(t,!1,d,i,p,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&&bn(e)===null){t.child=d;break}e=d.sibling,d.sibling=i,i=d,d=e}zo(t,!0,i,null,p,s);break;case"together":zo(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Ci(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(B(153));if(t.child!==null){for(e=t.child,i=_i(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=_i(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Uo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&_n(e)))}function M_(e,t,i){switch(t.tag){case 3:z(t,t.stateNode.containerInfo),ki(t,ot,e.memoizedState.cache),ns();break;case 27:case 5:J(t);break;case 4:z(t,t.stateNode.containerInfo);break;case 10:ki(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,lo(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Ui(t),t.flags|=128,null):(i&t.child.childLanes)!==0?ru(e,t,i):(Ui(t),e=Ci(e,t,i),e!==null?e.sibling:null);Ui(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 au(e,t,i);t.flags|=128}if(d=t.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),$(nt,nt.current),s)break;return null;case 22:return t.lanes=0,Zh(e,t,i,t.pendingProps);case 24:ki(t,ot,e.memoizedState.cache)}return Ci(e,t,i)}function ou(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)ct=!0;else{if(!Uo(e,i)&&(t.flags&128)===0)return ct=!1,M_(e,t,i);ct=(e.flags&131072)!==0}else ct=!1,Pe&&(t.flags&1048576)!==0&&Ic(t,gr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=cs(t.elementType),t.type=e,typeof e=="function")ja(e)?(s=fs(e,s),t.tag=1,t=iu(null,t,e,s,i)):(t.tag=0,t=To(null,t,e,s,i));else{if(e!=null){var d=e.$$typeof;if(d===m){t.tag=11,t=Vh(null,t,e,s,i);break e}else if(d===w){t.tag=14,t=Kh(null,t,e,s,i);break e}}throw t=k(e)||e,Error(B(306,t,""))}}return t;case 0:return To(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,d=fs(s,t.pendingProps),iu(e,t,s,d,i);case 3:e:{if(z(t,t.stateNode.containerInfo),e===null)throw Error(B(387));s=t.pendingProps;var p=t.memoizedState;d=p.element,so(e,t),xr(t,s,null,i);var A=t.memoizedState;if(s=A.cache,ki(t,ot,s),s!==p.cache&&Qa(t,[ot],i,!0),wr(),s=A.element,p.isDehydrated)if(p={element:s,isDehydrated:!1,cache:A.cache},t.updateQueue.baseState=p,t.memoizedState=p,t.flags&256){t=su(e,t,s,i);break e}else if(s!==d){d=Wt(Error(B(424)),t),pr(d),t=su(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,Bi=null,Yt=!0,i=Zc(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(ns(),s===d){t=Ci(e,t,i);break e}yt(e,t,s,i)}t=t.child}return t;case 26:return On(e,t),e===null?(i=md(t.type,null,t.pendingProps,null))?t.memoizedState=i:Pe||(i=t.type,e=t.pendingProps,s=Kn(oe.current).createElement(i),s[mt]=t,s[Et]=e,bt(s,i,e),gt(s),t.stateNode=s):t.memoizedState=md(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return J(t),e===null&&Pe&&(s=t.stateNode=vd(t.type,t.pendingProps,oe.current),St=t,Yt=!0,d=Ze,Xi(t.type)?(pl=d,Ze=Kt(s.firstChild)):Ze=d),yt(e,t,t.pendingProps.children,i),On(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Pe&&((d=s=Ze)&&(s=sv(s,t.type,t.pendingProps,Yt),s!==null?(t.stateNode=s,St=t,Ze=Kt(s.firstChild),Yt=!1,d=!0):d=!1),d||Oi(t)),J(t),d=t.type,p=t.pendingProps,A=e!==null?e.memoizedProps:null,s=p.children,dl(d,p)?s=null:A!==null&&dl(d,A)&&(t.flags|=32),t.memoizedState!==null&&(d=ho(e,t,m_,null,null,i),qr._currentValue=d),On(e,t),yt(e,t,s,i),t.child;case 6:return e===null&&Pe&&((e=i=Ze)&&(i=rv(i,t.pendingProps,Yt),i!==null?(t.stateNode=i,St=t,Ze=null,e=!0):e=!1),e||Oi(t)),null;case 13:return ru(e,t,i);case 4:return z(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=us(t,null,s,i):yt(e,t,s,i),t.child;case 11:return Vh(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,ki(t,t.type,s.value),yt(e,t,s.children,i),t.child;case 9:return d=t.type._context,s=t.pendingProps.children,os(t),d=Ct(d),s=s(d),t.flags|=1,yt(e,t,s,i),t.child;case 14:return Kh(e,t,t.type,t.pendingProps,i);case 15:return Qh(e,t,t.type,t.pendingProps,i);case 19:return au(e,t,i);case 31:return E_(e,t,i);case 22:return Zh(e,t,i,t.pendingProps);case 24:return os(t),s=Ct(ot),e===null?(d=eo(),d===null&&(d=Ke,p=Za(),d.pooledCache=p,p.refCount++,p!==null&&(d.pooledCacheLanes|=i),d=p),t.memoizedState={parent:s,cache:d},io(t),ki(t,ot,d)):((e.lanes&i)!==0&&(so(e,t),xr(t,null,null,i),wr()),d=e.memoizedState,p=t.memoizedState,d.parent!==s?(d={parent:s,cache:s},t.memoizedState=d,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=d),ki(t,ot,s)):(s=p.cache,ki(t,ot,s),s!==d.cache&&Qa(t,[ot],i,!0))),yt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(B(156,t.tag))}function yi(e){e.flags|=4}function Io(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(ku())e.flags|=8192;else throw hs=mn,to}else e.flags&=-16777217}function lu(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wd(t))if(ku())e.flags|=8192;else throw hs=mn,to}function Hn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Fl():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 A_(e,t,i){var s=t.pendingProps;switch(Ga(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),pi(ot),te(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Bs(t)?yi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ya())),Je(t),null;case 26:var d=t.type,p=t.memoizedState;return e===null?(yi(t),p!==null?(Je(t),lu(t,p)):(Je(t),Io(t,d,null,s,i))):p?p!==e.memoizedState?(yi(t),Je(t),lu(t,p)):(Je(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&yi(t),Je(t),Io(t,d,e,s,i)),null;case 27:if(_e(t),i=oe.current,d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&yi(t);else{if(!s){if(t.stateNode===null)throw Error(B(166));return Je(t),null}e=K.current,Bs(t)?Fc(t):(e=vd(d,s,i),t.stateNode=e,yi(t))}return Je(t),null;case 5:if(_e(t),d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&yi(t);else{if(!s){if(t.stateNode===null)throw Error(B(166));return Je(t),null}if(p=K.current,Bs(t))Fc(t);else{var A=Kn(oe.current);switch(p){case 1:p=A.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:p=A.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":p=A.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":p=A.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":p=A.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof s.is=="string"?A.createElement("select",{is:s.is}):A.createElement("select"),s.multiple?p.multiple=!0:s.size&&(p.size=s.size);break;default:p=typeof s.is=="string"?A.createElement(d,{is:s.is}):A.createElement(d)}}p[mt]=t,p[Et]=s;e:for(A=t.child;A!==null;){if(A.tag===5||A.tag===6)p.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=p;e:switch(bt(p,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&&yi(t)}}return Je(t),Io(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&yi(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(B(166));if(e=oe.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||rd(e.nodeValue,i)),e||Oi(t,!0)}else e=Kn(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(B(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(557));e[mt]=t}else ns(),(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?(zt(t),t):(zt(t),null);if((t.flags&128)!==0)throw Error(B(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(B(318));if(d=t.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(B(317));d[mt]=t}else ns(),(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?(zt(t),t):(zt(t),null)}return zt(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),p=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),p!==d&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Hn(t,t.updateQueue),Je(t),null);case 4:return te(),e===null&&ol(t.stateNode.containerInfo),Je(t),null;case 10:return pi(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,p=s.rendering,p===null)if(d)Dr(s,!1);else{if(rt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(p=bn(e),p!==null){for(t.flags|=128,Dr(s,!1),e=p.updateQueue,t.updateQueue=e,Hn(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Nc(i,e),i=i.sibling;return $(nt,nt.current&1|2),Pe&&vi(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&ge()>Pn&&(t.flags|=128,d=!0,Dr(s,!1),t.lanes=4194304)}else{if(!d)if(e=bn(p),e!==null){if(t.flags|=128,d=!0,e=e.updateQueue,t.updateQueue=e,Hn(t,e),Dr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!p.alternate&&!Pe)return Je(t),null}else 2*ge()-s.renderingStartTime>Pn&&i!==536870912&&(t.flags|=128,d=!0,Dr(s,!1),t.lanes=4194304);s.isBackwards?(p.sibling=t.child,t.child=p):(e=s.last,e!==null?e.sibling=p:t.child=p,s.last=p)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ge(),e.sibling=null,i=nt.current,$(nt,d?i&1|2:i&1),Pe&&vi(t,s.treeForkCount),e):(Je(t),null);case 22:case 23:return zt(t),oo(),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&&Hn(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),pi(ot),Je(t),null;case 25:return null;case 30:return null}throw Error(B(156,t.tag))}function R_(e,t){switch(Ga(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pi(ot),te(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(zt(t),t.alternate===null)throw Error(B(340));ns()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(zt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(B(340));ns()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(nt),null;case 4:return te(),null;case 10:return pi(t.type),null;case 22:case 23:return zt(t),oo(),e!==null&&H(ls),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return pi(ot),null;case 25:return null;default:return null}}function cu(e,t){switch(Ga(t),t.tag){case 3:pi(ot),te();break;case 26:case 27:case 5:_e(t);break;case 4:te();break;case 31:t.memoizedState!==null&&zt(t);break;case 13:zt(t);break;case 19:H(nt);break;case 10:pi(t.type);break;case 22:case 23:zt(t),oo(),e!==null&&H(ls);break;case 24:pi(ot)}}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 p=i.create,A=i.inst;s=p(),A.destroy=s}i=i.next}while(i!==d)}}catch(N){Ge(t,t.return,N)}}function Pi(e,t,i){try{var s=t.updateQueue,d=s!==null?s.lastEffect:null;if(d!==null){var p=d.next;s=p;do{if((s.tag&e)===e){var A=s.inst,N=A.destroy;if(N!==void 0){A.destroy=void 0,d=t;var Y=i,se=N;try{se()}catch(le){Ge(d,Y,le)}}}s=s.next}while(s!==p)}}catch(le){Ge(t,t.return,le)}}function hu(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{eh(t,i)}catch(s){Ge(e,e.return,s)}}}function uu(e,t,i){i.props=fs(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 du(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 Po(e,t,i){try{var s=e.stateNode;Q_(s,e.type,i,t),s[Et]=t}catch(d){Ge(e,e.return,d)}}function fu(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Xi(e.type)||e.tag===4}function Fo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fu(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&&Xi(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 jo(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=di));else if(s!==4&&(s===27&&Xi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(jo(e,t,i),e=e.sibling;e!==null;)jo(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&&Xi(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 _u(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(p){Ge(e,e.return,p)}}var bi=!1,ht=!1,$o=!1,vu=typeof WeakSet=="function"?WeakSet:Set,pt=null;function D_(e,t){if(e=e.containerInfo,hl=sa,e=Mc(e),Ha(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,p=s.focusNode;s=s.focusOffset;try{i.nodeType,p.nodeType}catch{i=null;break e}var A=0,N=-1,Y=-1,se=0,le=0,de=e,re=null;t:for(;;){for(var ae;de!==i||d!==0&&de.nodeType!==3||(N=A+d),de!==p||s!==0&&de.nodeType!==3||(Y=A+s),de.nodeType===3&&(A+=de.nodeValue.length),(ae=de.firstChild)!==null;)re=de,de=ae;for(;;){if(de===e)break t;if(re===i&&++se===d&&(N=A),re===p&&++le===s&&(Y=A),(ae=de.nextSibling)!==null)break;de=re,re=de.parentNode}de=ae}i=N===-1||Y===-1?null:{start:N,end:Y}}else i=null}i=i||{start:0,end:0}}else i=null;for(ul={focusedElem:e,selectionRange:i},sa=!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,p=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&&p!==null){e=void 0,i=t,d=p.memoizedProps,p=p.memoizedState,s=i.stateNode;try{var Ce=fs(i.type,d);e=s.getSnapshotBeforeUpdate(Ce,p),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)_l(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":_l(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(B(163))}if(e=t.sibling,e!==null){e.return=t.return,pt=e;break}pt=t.return}}function gu(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:xi(e,i),s&4&&Tr(5,i);break;case 1:if(xi(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(A){Ge(i,i.return,A)}else{var d=fs(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(d,t,e.__reactInternalSnapshotBeforeUpdate)}catch(A){Ge(i,i.return,A)}}s&64&&hu(i),s&512&&Br(i,i.return);break;case 3:if(xi(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{eh(e,t)}catch(A){Ge(i,i.return,A)}}break;case 27:t===null&&s&4&&_u(i);case 26:case 5:xi(e,i),t===null&&s&4&&du(i),s&512&&Br(i,i.return);break;case 12:xi(e,i);break;case 31:xi(e,i),s&4&&Su(e,i);break;case 13:xi(e,i),s&4&&Cu(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=I_.bind(null,i),nv(e,i))));break;case 22:if(s=i.memoizedState!==null||bi,!s){t=t!==null&&t.memoizedState!==null||ht,d=bi;var p=ht;bi=s,(ht=t)&&!p?Li(e,i,(i.subtreeFlags&8772)!==0):xi(e,i),bi=d,ht=p}break;case 30:break;default:xi(e,i)}}function pu(e){var t=e.alternate;t!==null&&(e.alternate=null,pu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ma(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 wi(e,t,i){for(i=i.child;i!==null;)mu(e,t,i),i=i.sibling}function mu(e,t,i){if(tt&&typeof tt.onCommitFiberUnmount=="function")try{tt.onCommitFiberUnmount(xt,i)}catch{}switch(i.tag){case 26:ht||li(i,t),wi(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;Xi(i.type)&&(et=i.stateNode,At=!1),wi(e,t,i),Fr(i.stateNode),et=s,At=d;break;case 5:ht||li(i,t);case 6:if(s=et,d=At,et=null,wi(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(p){Ge(i,t,p)}else try{et.removeChild(i.stateNode)}catch(p){Ge(i,t,p)}break;case 18:et!==null&&(At?(e=et,hd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Js(e)):hd(et,i.stateNode));break;case 4:s=et,d=At,et=i.stateNode.containerInfo,At=!0,wi(e,t,i),et=s,At=d;break;case 0:case 11:case 14:case 15:Pi(2,i,t),ht||Pi(4,i,t),wi(e,t,i);break;case 1:ht||(li(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&uu(i,t,s)),wi(e,t,i);break;case 21:wi(e,t,i);break;case 22:ht=(s=ht)||i.memoizedState!==null,wi(e,t,i),ht=s;break;default:wi(e,t,i)}}function Su(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 Cu(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 T_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new vu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new vu),t;default:throw Error(B(435,e.tag))}}function zn(e,t){var i=T_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var d=P_.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],p=e,A=t,N=A;e:for(;N!==null;){switch(N.tag){case 27:if(Xi(N.type)){et=N.stateNode,At=!1;break e}break;case 5:et=N.stateNode,At=!1;break e;case 3:case 4:et=N.stateNode.containerInfo,At=!0;break e}N=N.return}if(et===null)throw Error(B(160));mu(p,A,d),et=null,At=!1,p=d.alternate,p!==null&&(p.return=null),d.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yu(t,e),t=t.sibling}var ti=null;function yu(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&&(Pi(3,e,e.return),Tr(3,e),Pi(5,e,e.return));break;case 1:Rt(t,e),Dt(e),s&512&&(ht||i===null||li(i,i.return)),s&64&&bi&&(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 p=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":p=d.getElementsByTagName("title")[0],(!p||p[nr]||p[mt]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=d.createElement(s),d.head.insertBefore(p,d.querySelector("head > title"))),bt(p,s,i),p[mt]=e,gt(p),s=p;break e;case"link":var A=yd("link","href",d).get(s+(i.href||""));if(A){for(var N=0;N<A.length;N++)if(p=A[N],p.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&p.getAttribute("rel")===(i.rel==null?null:i.rel)&&p.getAttribute("title")===(i.title==null?null:i.title)&&p.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){A.splice(N,1);break t}}p=d.createElement(s),bt(p,s,i),d.head.appendChild(p);break;case"meta":if(A=yd("meta","content",d).get(s+(i.content||""))){for(N=0;N<A.length;N++)if(p=A[N],p.getAttribute("content")===(i.content==null?null:""+i.content)&&p.getAttribute("name")===(i.name==null?null:i.name)&&p.getAttribute("property")===(i.property==null?null:i.property)&&p.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&p.getAttribute("charset")===(i.charSet==null?null:i.charSet)){A.splice(N,1);break t}}p=d.createElement(s),bt(p,s,i),d.head.appendChild(p);break;default:throw Error(B(468,s))}p[mt]=e,gt(p),s=p}e.stateNode=s}else bd(d,e.type,e.stateNode);else e.stateNode=Cd(d,s,e.memoizedProps);else p!==s?(p===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):p.count--,s===null?bd(d,e.type,e.stateNode):Cd(d,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Po(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&&Po(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,Po(e,d,i!==null?i.memoizedProps:d)),s&1024&&($o=!0);break;case 6:if(Rt(t,e),Dt(e),s&4){if(e.stateNode===null)throw Error(B(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(Ce){Ge(e,e.return,Ce)}}break;case 3:if(Jn=null,d=ti,ti=Qn(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)}$o&&($o=!1,bu(e));break;case 4:s=ti,ti=Qn(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,zn(e,s)));break;case 13:Rt(t,e),Dt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(In=ge()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,zn(e,s)));break;case 22:d=e.memoizedState!==null;var Y=i!==null&&i.memoizedState!==null,se=bi,le=ht;if(bi=se||d,ht=le||Y,Rt(t,e),ht=le,bi=se,Dt(e),s&8192)e:for(t=e.stateNode,t._visibility=d?t._visibility&-2:t._visibility|1,d&&(i===null||Y||bi||ht||_s(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){Y=i=t;try{if(p=Y.stateNode,d)A=p.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{N=Y.stateNode;var de=Y.memoizedProps.style,re=de!=null&&de.hasOwnProperty("display")?de.display:null;N.style.display=re==null||typeof re=="boolean"?"":(""+re).trim()}}catch(Ce){Ge(Y,Y.return,Ce)}}}else if(t.tag===6){if(i===null){Y=t;try{Y.stateNode.nodeValue=d?"":Y.memoizedProps}catch(Ce){Ge(Y,Y.return,Ce)}}}else if(t.tag===18){if(i===null){Y=t;try{var ae=Y.stateNode;d?ud(ae,!0):ud(Y.stateNode,!1)}catch(Ce){Ge(Y,Y.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,zn(e,i))));break;case 19:Rt(t,e),Dt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,zn(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(fu(s)){i=s;break}s=s.return}if(i==null)throw Error(B(160));switch(i.tag){case 27:var d=i.stateNode,p=Fo(e);Nn(e,p,d);break;case 5:var A=i.stateNode;i.flags&32&&(bs(A,""),i.flags&=-33);var N=Fo(e);Nn(e,N,A);break;case 3:case 4:var Y=i.stateNode.containerInfo,se=Fo(e);jo(e,se,Y);break;default:throw Error(B(161))}}catch(le){Ge(e,e.return,le)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bu(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)gu(e,t.alternate,t),t=t.sibling}function _s(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Pi(4,t,t.return),_s(t);break;case 1:li(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&uu(t,t.return,i),_s(t);break;case 27:Fr(t.stateNode);case 26:case 5:li(t,t.return),_s(t);break;case 22:t.memoizedState===null&&_s(t);break;case 30:_s(t);break;default:_s(t)}e=e.sibling}}function Li(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,d=e,p=t,A=p.flags;switch(p.tag){case 0:case 11:case 15:Li(d,p,i),Tr(4,p);break;case 1:if(Li(d,p,i),s=p,d=s.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(se){Ge(s,s.return,se)}if(s=p,d=s.updateQueue,d!==null){var N=s.stateNode;try{var Y=d.shared.hiddenCallbacks;if(Y!==null)for(d.shared.hiddenCallbacks=null,d=0;d<Y.length;d++)Jc(Y[d],N)}catch(se){Ge(s,s.return,se)}}i&&A&64&&hu(p),Br(p,p.return);break;case 27:_u(p);case 26:case 5:Li(d,p,i),i&&s===null&&A&4&&du(p),Br(p,p.return);break;case 12:Li(d,p,i);break;case 31:Li(d,p,i),i&&A&4&&Su(d,p);break;case 13:Li(d,p,i),i&&A&4&&Cu(d,p);break;case 22:p.memoizedState===null&&Li(d,p,i),Br(p,p.return);break;case 30:break;default:Li(d,p,i)}t=t.sibling}}function qo(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 Wo(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;)wu(e,t,i,s),t=t.sibling}function wu(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 p=t.memoizedProps,A=p.id,N=p.onPostCommit;typeof N=="function"&&N(A,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(Y){Ge(t,t.return,Y)}}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:p=t.stateNode,A=t.alternate,t.memoizedState!==null?p._visibility&2?ii(e,t,i,s):Or(e,t):p._visibility&2?ii(e,t,i,s):(p._visibility|=2,js(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),d&2048&&qo(A,t);break;case 24:ii(e,t,i,s),d&2048&&Wo(t.alternate,t);break;default:ii(e,t,i,s)}}function js(e,t,i,s,d){for(d=d&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var p=e,A=t,N=i,Y=s,se=A.flags;switch(A.tag){case 0:case 11:case 15:js(p,A,N,Y,d),Tr(8,A);break;case 23:break;case 22:var le=A.stateNode;A.memoizedState!==null?le._visibility&2?js(p,A,N,Y,d):Or(p,A):(le._visibility|=2,js(p,A,N,Y,d)),d&&se&2048&&qo(A.alternate,A);break;case 24:js(p,A,N,Y,d),d&&se&2048&&Wo(A.alternate,A);break;default:js(p,A,N,Y,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&&qo(s.alternate,s);break;case 24:Or(i,s),d&2048&&Wo(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;)xu(e,t,i),e=e.sibling}function xu(e,t,i){switch(e.tag){case 26:$s(e,t,i),e.flags&kr&&e.memoizedState!==null&&pv(i,ti,e.memoizedState,e.memoizedProps);break;case 5:$s(e,t,i);break;case 3:case 4:var s=ti;ti=Qn(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 Lu(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,Mu(s,e)}Lu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Eu(e),e=e.sibling}function Eu(e){switch(e.tag){case 0:case 11:case 15:Hr(e),e.flags&2048&&Pi(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,Un(e)):Hr(e);break;default:Hr(e)}}function Un(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,Mu(s,e)}Lu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Pi(8,t,t.return),Un(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Un(t));break;default:Un(t)}e=e.sibling}}function Mu(e,t){for(;pt!==null;){var i=pt;switch(i.tag){case 0:case 11:case 15:Pi(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,p=s.return;if(pu(s),s===i){pt=null;break e}if(d!==null){d.return=p,pt=d;break e}pt=p}}}var B_={getCacheForType:function(e){var t=Ct(ot),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Ct(ot).controller.signal}},O_=typeof WeakMap=="function"?WeakMap:Map,$e=0,Ke=null,ke=null,ze=0,We=0,Ut=null,Fi=!1,qs=!1,Go=!1,Ei=0,rt=0,ji=0,vs=0,Xo=0,It=0,Ws=0,Nr=null,Tt=null,Yo=!1,In=0,Au=0,Pn=1/0,Fn=null,$i=null,dt=0,qi=null,Gs=null,Mi=0,Vo=0,Ko=null,Ru=null,zr=0,Qo=null;function Pt(){return($e&2)!==0&&ze!==0?ze&-ze:U.T!==null?sl():Wl()}function Du(){if(It===0)if((ze&536870912)===0||Pe){var e=ri;ri<<=1,(ri&3932160)===0&&(ri=262144),It=e}else It=536870912;return e=Nt.current,e!==null&&(e.flags|=32),It}function Bt(e,t,i){(e===Ke&&(We===2||We===9)||e.cancelPendingCommit!==null)&&(Xs(e,0),Wi(e,ze,It,!1)),rr(e,i),(($e&2)===0||e!==Ke)&&(e===Ke&&(($e&2)===0&&(vs|=i),rt===4&&Wi(e,ze,It,!1)),ci(e))}function Tu(e,t,i){if(($e&6)!==0)throw Error(B(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||sr(e,t),d=s?N_(e,t):Jo(e,t,!0),p=s;do{if(d===0){qs&&!s&&Wi(e,t,0,!1);break}else{if(i=e.current.alternate,p&&!k_(i)){d=Jo(e,t,!1),p=!1;continue}if(d===2){if(p=t,e.errorRecoveryDisabledLanes&p)var A=0;else A=e.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){t=A;e:{var N=e;d=Nr;var Y=N.current.memoizedState.isDehydrated;if(Y&&(Xs(N,A).flags|=256),A=Jo(N,A,!1),A!==2){if(Go&&!Y){N.errorRecoveryDisabledLanes|=p,vs|=p,d=4;break e}p=Tt,Tt=d,p!==null&&(Tt===null?Tt=p:Tt.push.apply(Tt,p))}d=A}if(p=!1,d!==2)continue}}if(d===1){Xs(e,0),Wi(e,t,0,!0);break}e:{switch(s=e,p=d,p){case 0:case 1:throw Error(B(345));case 4:if((t&4194048)!==t)break;case 6:Wi(s,t,It,!Fi);break e;case 2:Tt=null;break;case 3:case 5:break;default:throw Error(B(329))}if((t&62914560)===t&&(d=In+300-ge(),10<d)){if(Wi(s,t,It,!Fi),Kr(s,0,!0)!==0)break e;Mi=t,s.timeoutHandle=ld(Bu.bind(null,s,i,Tt,Fn,Yo,t,It,vs,Ws,Fi,p,"Throttled",-0,0),d);break e}Bu(s,i,Tt,Fn,Yo,t,It,vs,Ws,Fi,p,null,-0,0)}}break}while(!0);ci(e)}function Bu(e,t,i,s,d,p,A,N,Y,se,le,de,re,ae){if(e.timeoutHandle=-1,de=t.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:di},xu(t,p,de);var Ce=(p&62914560)===p?In-ge():(p&4194048)===p?Au-ge():0;if(Ce=mv(de,Ce),Ce!==null){Mi=p,e.cancelPendingCommit=Ce(Pu.bind(null,e,t,p,i,s,d,A,N,Y,le,de,null,re,ae)),Wi(e,p,A,!se);return}}Pu(e,t,p,i,s,d,A,N,Y)}function k_(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],p=d.getSnapshot;d=d.value;try{if(!kt(p(),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 Wi(e,t,i,s){t&=~Xo,t&=~vs,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var d=t;0<d;){var p=31-ut(d),A=1<<p;s[p]=-1,d&=~A}i!==0&&jl(e,i,t)}function jn(){return($e&6)===0?(Ur(0),!1):!0}function Zo(){if(ke!==null){if(We===0)var e=ke.return;else e=ke,gi=as=null,_o(e),zs=null,Cr=0,e=ke;for(;e!==null;)cu(e.alternate,e),e=e.return;ke=null}}function Xs(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,ev(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Mi=0,Zo(),Ke=e,ke=i=_i(e.current,null),ze=t,We=0,Ut=null,Fi=!1,qs=sr(e,t),Go=!1,Ws=It=Xo=vs=ji=rt=0,Tt=Nr=null,Yo=!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),p=1<<d;t|=e[d],s&=~p}return Ei=t,cn(),i}function Ou(e,t){Te=null,U.H=Ar,t===Ns||t===pn?(t=Vc(),We=3):t===to?(t=Vc(),We=4):We=t===Do?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ut=t,ke===null&&(rt=1,Tn(e,Wt(t,e.current)))}function ku(){var e=Nt.current;return e===null?!0:(ze&4194048)===ze?Vt===null:(ze&62914560)===ze||(ze&536870912)!==0?e===Vt:!1}function Hu(){var e=U.H;return U.H=Ar,e===null?Ar:e}function Nu(){var e=U.A;return U.A=B_,e}function $n(){rt=4,Fi||(ze&4194048)!==ze&&Nt.current!==null||(qs=!0),(ji&134217727)===0&&(vs&134217727)===0||Ke===null||Wi(Ke,ze,It,!1)}function Jo(e,t,i){var s=$e;$e|=2;var d=Hu(),p=Nu();(Ke!==e||ze!==t)&&(Fn=null,Xs(e,t)),t=!1;var A=rt;e:do try{if(We!==0&&ke!==null){var N=ke,Y=Ut;switch(We){case 8:Zo(),A=6;break e;case 3:case 2:case 9:case 6:Nt.current===null&&(t=!0);var se=We;if(We=0,Ut=null,Ys(e,N,Y,se),i&&qs){A=0;break e}break;default:se=We,We=0,Ut=null,Ys(e,N,Y,se)}}H_(),A=rt;break}catch(le){Ou(e,le)}while(!0);return t&&e.shellSuspendCounter++,gi=as=null,$e=s,U.H=d,U.A=p,ke===null&&(Ke=null,ze=0,cn()),A}function H_(){for(;ke!==null;)zu(ke)}function N_(e,t){var i=$e;$e|=2;var s=Hu(),d=Nu();Ke!==e||ze!==t?(Fn=null,Pn=ge()+500,Xs(e,t)):qs=sr(e,t);e:do try{if(We!==0&&ke!==null){t=ke;var p=Ut;t:switch(We){case 1:We=0,Ut=null,Ys(e,t,p,1);break;case 2:case 9:if(Xc(p)){We=0,Ut=null,Uu(t);break}t=function(){We!==2&&We!==9||Ke!==e||(We=7),ci(e)},p.then(t,t);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:Xc(p)?(We=0,Ut=null,Uu(t)):(We=0,Ut=null,Ys(e,t,p,7));break;case 5:var A=null;switch(ke.tag){case 26:A=ke.memoizedState;case 5:case 27:var N=ke;if(A?wd(A):N.stateNode.complete){We=0,Ut=null;var Y=N.sibling;if(Y!==null)ke=Y;else{var se=N.return;se!==null?(ke=se,qn(se)):ke=null}break t}}We=0,Ut=null,Ys(e,t,p,5);break;case 6:We=0,Ut=null,Ys(e,t,p,6);break;case 8:Zo(),rt=6;break e;default:throw Error(B(462))}}z_();break}catch(le){Ou(e,le)}while(!0);return gi=as=null,U.H=s,U.A=d,$e=i,ke!==null?0:(Ke=null,ze=0,cn(),rt)}function z_(){for(;ke!==null&&!me();)zu(ke)}function zu(e){var t=ou(e.alternate,e,Ei);e.memoizedProps=e.pendingProps,t===null?qn(e):ke=t}function Uu(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=tu(i,t,t.pendingProps,t.type,void 0,ze);break;case 11:t=tu(i,t,t.pendingProps,t.type.render,t.ref,ze);break;case 5:_o(t);default:cu(i,t),t=ke=Nc(t,Ei),t=ou(i,t,Ei)}e.memoizedProps=e.pendingProps,t===null?qn(e):ke=t}function Ys(e,t,i,s){gi=as=null,_o(t),zs=null,Cr=0;var d=t.return;try{if(L_(e,d,t,i,ze)){rt=1,Tn(e,Wt(i,e.current)),ke=null;return}}catch(p){if(d!==null)throw ke=d,p;rt=1,Tn(e,Wt(i,e.current)),ke=null;return}t.flags&32768?(Pe||s===1?e=!0:qs||(ze&536870912)!==0?e=!1:(Fi=e=!0,(s===2||s===9||s===3||s===6)&&(s=Nt.current,s!==null&&s.tag===13&&(s.flags|=16384))),Iu(t,e)):qn(t)}function qn(e){var t=e;do{if((t.flags&32768)!==0){Iu(t,Fi);return}e=t.return;var i=A_(t.alternate,t,Ei);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 Iu(e,t){do{var i=R_(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 Pu(e,t,i,s,d,p,A,N,Y){e.cancelPendingCommit=null;do Wn();while(dt!==0);if(($e&6)!==0)throw Error(B(327));if(t!==null){if(t===e.current)throw Error(B(177));if(p=t.lanes|t.childLanes,p|=Pa,gf(e,i,p,A,N,Y),e===Ke&&(ke=Ke=null,ze=0),Gs=t,qi=e,Mi=i,Vo=p,Ko=d,Ru=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,F_(Qe,function(){return Wu(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=U.T,U.T=null,d=P.p,P.p=2,A=$e,$e|=4;try{D_(e,t,i)}finally{$e=A,P.p=d,U.T=s}}dt=1,Fu(),ju(),$u()}}function Fu(){if(dt===1){dt=0;var e=qi,t=Gs,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=U.T,U.T=null;var s=P.p;P.p=2;var d=$e;$e|=4;try{yu(t,e);var p=ul,A=Mc(e.containerInfo),N=p.focusedElem,Y=p.selectionRange;if(A!==N&&N&&N.ownerDocument&&Ec(N.ownerDocument.documentElement,N)){if(Y!==null&&Ha(N)){var se=Y.start,le=Y.end;if(le===void 0&&(le=se),"selectionStart"in N)N.selectionStart=se,N.selectionEnd=Math.min(le,N.value.length);else{var de=N.ownerDocument||document,re=de&&de.defaultView||window;if(re.getSelection){var ae=re.getSelection(),Ce=N.textContent.length,Ee=Math.min(Y.start,Ce),Ve=Y.end===void 0?Ee:Math.min(Y.end,Ce);!ae.extend&&Ee>Ve&&(A=Ve,Ve=Ee,Ee=A);var Z=Lc(N,Ee),V=Lc(N,Ve);if(Z&&V&&(ae.rangeCount!==1||ae.anchorNode!==Z.node||ae.anchorOffset!==Z.offset||ae.focusNode!==V.node||ae.focusOffset!==V.offset)){var ie=de.createRange();ie.setStart(Z.node,Z.offset),ae.removeAllRanges(),Ee>Ve?(ae.addRange(ie),ae.extend(V.node,V.offset)):(ie.setEnd(V.node,V.offset),ae.addRange(ie))}}}}for(de=[],ae=N;ae=ae.parentNode;)ae.nodeType===1&&de.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<de.length;N++){var he=de[N];he.element.scrollLeft=he.left,he.element.scrollTop=he.top}}sa=!!hl,ul=hl=null}finally{$e=d,P.p=s,U.T=i}}e.current=t,dt=2}}function ju(){if(dt===2){dt=0;var e=qi,t=Gs,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=U.T,U.T=null;var s=P.p;P.p=2;var d=$e;$e|=4;try{gu(e,t.alternate,t)}finally{$e=d,P.p=s,U.T=i}}dt=3}}function $u(){if(dt===4||dt===3){dt=0,ue();var e=qi,t=Gs,i=Mi,s=Ru;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?dt=5:(dt=0,Gs=qi=null,qu(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&($i=null),ga(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=U.T,d=P.p,P.p=2,U.T=null;try{for(var p=e.onRecoverableError,A=0;A<s.length;A++){var N=s[A];p(N.value,{componentStack:N.stack})}}finally{U.T=t,P.p=d}}(Mi&3)!==0&&Wn(),ci(e),d=e.pendingLanes,(i&261930)!==0&&(d&42)!==0?e===Qo?zr++:(zr=0,Qo=e):zr=0,Ur(0)}}function qu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,mr(t)))}function Wn(){return Fu(),ju(),$u(),Wu()}function Wu(){if(dt!==5)return!1;var e=qi,t=Vo;Vo=0;var i=ga(Mi),s=U.T,d=P.p;try{P.p=32>i?32:i,U.T=null,i=Ko,Ko=null;var p=qi,A=Mi;if(dt=0,Gs=qi=null,Mi=0,($e&6)!==0)throw Error(B(331));var N=$e;if($e|=4,Eu(p.current),wu(p,p.current,A,i),$e=N,Ur(0,!1),tt&&typeof tt.onPostCommitFiberRoot=="function")try{tt.onPostCommitFiberRoot(xt,p)}catch{}return!0}finally{P.p=d,U.T=s,qu(e,t)}}function Gu(e,t,i){t=Wt(i,t),t=Ro(e.stateNode,t,2),e=zi(e,t,2),e!==null&&(rr(e,2),ci(e))}function Ge(e,t,i){if(e.tag===3)Gu(e,e,i);else for(;t!==null;){if(t.tag===3){Gu(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&($i===null||!$i.has(s))){e=Wt(i,e),i=Xh(2),s=zi(t,i,2),s!==null&&(Yh(i,s,t,e),rr(s,2),ci(s));break}}t=t.return}}function el(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new O_;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)||(Go=!0,d.add(i),e=U_.bind(null,e,t,i),t.then(e,e))}function U_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ke===e&&(ze&i)===i&&(rt===4||rt===3&&(ze&62914560)===ze&&300>ge()-In?($e&2)===0&&Xs(e,0):Xo|=i,Ws===ze&&(Ws=0)),ci(e)}function Xu(e,t){t===0&&(t=Fl()),e=ss(e,t),e!==null&&(rr(e,t),ci(e))}function I_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Xu(e,i)}function P_(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(B(314))}s!==null&&s.delete(t),Xu(e,i)}function F_(e,t){return Se(e,t)}var Gn=null,Vs=null,tl=!1,Xn=!1,il=!1,Gi=0;function ci(e){e!==Vs&&e.next===null&&(Vs===null?Gn=Vs=e:Vs=Vs.next=e),Xn=!0,tl||(tl=!0,$_())}function Ur(e,t){if(!il&&Xn){il=!0;do for(var i=!1,s=Gn;s!==null;){if(e!==0){var d=s.pendingLanes;if(d===0)var p=0;else{var A=s.suspendedLanes,N=s.pingedLanes;p=(1<<31-ut(42|e)+1)-1,p&=d&~(A&~N),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(i=!0,Qu(s,p))}else p=ze,p=Kr(s,s===Ke?p:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(p&3)===0||sr(s,p)||(i=!0,Qu(s,p));s=s.next}while(i);il=!1}}function j_(){Yu()}function Yu(){Xn=tl=!1;var e=0;Gi!==0&&J_()&&(e=Gi);for(var t=ge(),i=null,s=Gn;s!==null;){var d=s.next,p=Vu(s,t);p===0?(s.next=null,i===null?Gn=d:i.next=d,d===null&&(Vs=i)):(i=s,(e!==0||(p&3)!==0)&&(Xn=!0)),s=d}dt!==0&&dt!==5||Ur(e),Gi!==0&&(Gi=0)}function Vu(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,d=e.expirationTimes,p=e.pendingLanes&-62914561;0<p;){var A=31-ut(p),N=1<<A,Y=d[A];Y===-1?((N&i)===0||(N&s)!==0)&&(d[A]=vf(N,t)):Y<=t&&(e.expiredLanes|=N),p&=~N}if(t=Ke,i=ze,i=Kr(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),ga(i)){case 2:case 8:i=_t;break;case 32:i=Qe;break;case 268435456:i=Ie;break;default:i=Qe}return s=Ku.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 Ku(e,t){if(dt!==0&&dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Wn()&&e.callbackNode!==i)return null;var s=ze;return s=Kr(e,e===Ke?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Tu(e,s,t),Vu(e,ge()),e.callbackNode!=null&&e.callbackNode===i?Ku.bind(null,e):null)}function Qu(e,t){if(Wn())return null;Tu(e,t,!0)}function $_(){tv(function(){($e&6)!==0?Se(Re,j_):Yu()})}function sl(){if(Gi===0){var e=ks;e===0&&(e=Ft,Ft<<=1,(Ft&261888)===0&&(Ft=256)),Gi=e}return Gi}function Zu(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:en(""+e)}function Ju(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 q_(e,t,i,s,d){if(t==="submit"&&i&&i.stateNode===d){var p=Zu((d[Et]||null).action),A=s.submitter;A&&(t=(t=A[Et]||null)?Zu(t.formAction):A.getAttribute("formAction"),t!==null&&(p=t,A=null));var N=new nn("action","action",null,s,d);e.push({event:N,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Gi!==0){var Y=A?Ju(d,A):new FormData(d);wo(i,{pending:!0,data:Y,method:d.method,action:p},null,Y)}}else typeof p=="function"&&(N.preventDefault(),Y=A?Ju(d,A):new FormData(d),wo(i,{pending:!0,data:Y,method:d.method,action:p},p,Y))},currentTarget:d}]})}}for(var rl=0;rl<Ia.length;rl++){var nl=Ia[rl],W_=nl.toLowerCase(),G_=nl[0].toUpperCase()+nl.slice(1);ei(W_,"on"+G_)}ei(Dc,"onAnimationEnd"),ei(Tc,"onAnimationIteration"),ei(Bc,"onAnimationStart"),ei("dblclick","onDoubleClick"),ei("focusin","onFocus"),ei("focusout","onBlur"),ei(l_,"onTransitionRun"),ei(c_,"onTransitionStart"),ei(h_,"onTransitionCancel"),ei(Oc,"onTransitionEnd"),Cs("onMouseEnter",["mouseout","mouseover"]),Cs("onMouseLeave",["mouseout","mouseover"]),Cs("onPointerEnter",["pointerout","pointerover"]),Cs("onPointerLeave",["pointerout","pointerover"]),Ji("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ji("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ji("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ji("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ji("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ji("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(" "),X_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ir));function ed(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 p=void 0;if(t)for(var A=s.length-1;0<=A;A--){var N=s[A],Y=N.instance,se=N.currentTarget;if(N=N.listener,Y!==p&&d.isPropagationStopped())break e;p=N,d.currentTarget=se;try{p(d)}catch(le){ln(le)}d.currentTarget=null,p=Y}else for(A=0;A<s.length;A++){if(N=s[A],Y=N.instance,se=N.currentTarget,N=N.listener,Y!==p&&d.isPropagationStopped())break e;p=N,d.currentTarget=se;try{p(d)}catch(le){ln(le)}d.currentTarget=null,p=Y}}}}function He(e,t){var i=t[pa];i===void 0&&(i=t[pa]=new Set);var s=e+"__bubble";i.has(s)||(td(t,e,2,!1),i.add(s))}function al(e,t,i){var s=0;t&&(s|=4),td(i,e,s,t)}var Yn="_reactListening"+Math.random().toString(36).slice(2);function ol(e){if(!e[Yn]){e[Yn]=!0,Yl.forEach(function(i){i!=="selectionchange"&&(X_.has(i)||al(i,!1,e),al(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Yn]||(t[Yn]=!0,al("selectionchange",!1,t))}}function td(e,t,i,s){switch(Dd(t)){case 2:var d=yv;break;case 8:d=bv;break;default:d=bl}i=d.bind(null,t,i,e),d=void 0,!Ea||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 ll(e,t,i,s,d){var p=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 N=s.stateNode.containerInfo;if(N===d)break;if(A===4)for(A=s.return;A!==null;){var Y=A.tag;if((Y===3||Y===4)&&A.stateNode.containerInfo===d)return;A=A.return}for(;N!==null;){if(A=ps(N),A===null)return;if(Y=A.tag,Y===5||Y===6||Y===26||Y===27){s=p=A;continue e}N=N.parentNode}}s=s.return}ac(function(){var se=p,le=xa(i),de=[];e:{var re=kc.get(e);if(re!==void 0){var ae=nn,Ce=e;switch(e){case"keypress":if(sn(i)===0)break e;case"keydown":case"keyup":ae=Pf;break;case"focusin":Ce="focus",ae=Da;break;case"focusout":Ce="blur",ae=Da;break;case"beforeblur":case"afterblur":ae=Da;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=cc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=Af;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=$f;break;case Dc:case Tc:case Bc:ae=Tf;break;case Oc:ae=Wf;break;case"scroll":case"scrollend":ae=Ef;break;case"wheel":ae=Xf;break;case"copy":case"cut":case"paste":ae=Of;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=uc;break;case"toggle":case"beforetoggle":ae=Vf}var Ee=(t&4)!==0,Ve=!Ee&&(e==="scroll"||e==="scrollend"),Z=Ee?re!==null?re+"Capture":null:re;Ee=[];for(var V=se,ie;V!==null;){var he=V;if(ie=he.stateNode,he=he.tag,he!==5&&he!==26&&he!==27||ie===null||Z===null||(he=or(V,Z),he!=null&&Ee.push(Pr(V,he,ie))),Ve)break;V=V.return}0<Ee.length&&(re=new ae(re,Ce,null,i,le),de.push({event:re,listeners:Ee}))}}if((t&7)===0){e:{if(re=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",re&&i!==wa&&(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=se,Ce=Ce?ps(Ce):null,Ce!==null&&(Ve=ne(Ce),Ee=Ce.tag,Ce!==Ve||Ee!==5&&Ee!==27&&Ee!==6)&&(Ce=null)):(ae=null,Ce=se),ae!==Ce)){if(Ee=cc,he="onMouseLeave",Z="onMouseEnter",V="mouse",(e==="pointerout"||e==="pointerover")&&(Ee=uc,he="onPointerLeave",Z="onPointerEnter",V="pointer"),Ve=ae==null?re:ar(ae),ie=Ce==null?re:ar(Ce),re=new Ee(he,V+"leave",ae,i,le),re.target=Ve,re.relatedTarget=ie,he=null,ps(le)===se&&(Ee=new Ee(Z,V+"enter",Ce,i,le),Ee.target=ie,Ee.relatedTarget=Ve,he=Ee),Ve=he,ae&&Ce)t:{for(Ee=Y_,Z=ae,V=Ce,ie=0,he=Z;he;he=Ee(he))ie++;he=0;for(var xe=V;xe;xe=Ee(xe))he++;for(;0<ie-he;)Z=Ee(Z),ie--;for(;0<he-ie;)V=Ee(V),he--;for(;ie--;){if(Z===V||V!==null&&Z===V.alternate){Ee=Z;break t}Z=Ee(Z),V=Ee(V)}Ee=null}else Ee=null;ae!==null&&id(de,re,ae,Ee,!1),Ce!==null&&Ve!==null&&id(de,Ve,Ce,Ee,!0)}}e:{if(re=se?ar(se):window,ae=re.nodeName&&re.nodeName.toLowerCase(),ae==="select"||ae==="input"&&re.type==="file")var Fe=Sc;else if(pc(re))if(Cc)Fe=n_;else{Fe=s_;var be=i_}else ae=re.nodeName,!ae||ae.toLowerCase()!=="input"||re.type!=="checkbox"&&re.type!=="radio"?se&&ba(se.elementType)&&(Fe=Sc):Fe=r_;if(Fe&&(Fe=Fe(e,se))){mc(de,Fe,i,le);break e}be&&be(e,re,se),e==="focusout"&&se&&re.type==="number"&&se.memoizedProps.value!=null&&ya(re,"number",re.value)}switch(be=se?ar(se):window,e){case"focusin":(pc(be)||be.contentEditable==="true")&&(Es=be,Na=se,vr=null);break;case"focusout":vr=Na=Es=null;break;case"mousedown":za=!0;break;case"contextmenu":case"mouseup":case"dragend":za=!1,Ac(de,i,le);break;case"selectionchange":if(o_)break;case"keydown":case"keyup":Ac(de,i,le)}var Be;if(Ba)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?vc(e,i)&&(Ue="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ue="onCompositionStart");Ue&&(dc&&i.locale!=="ko"&&(Ls||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Ls&&(Be=oc()):(Di=le,Ma="value"in Di?Di.value:Di.textContent,Ls=!0)),be=Vn(se,Ue),0<be.length&&(Ue=new hc(Ue,e,null,i,le),de.push({event:Ue,listeners:be}),Be?Ue.data=Be:(Be=gc(i),Be!==null&&(Ue.data=Be)))),(Be=Qf?Zf(e,i):Jf(e,i))&&(Ue=Vn(se,"onBeforeInput"),0<Ue.length&&(be=new hc("onBeforeInput","beforeinput",null,i,le),de.push({event:be,listeners:Ue}),be.data=Be)),q_(de,e,se,i,le)}ed(de,t)})}function Pr(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Vn(e,t){for(var i=t+"Capture",s=[];e!==null;){var d=e,p=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||p===null||(d=or(e,i),d!=null&&s.unshift(Pr(e,d,p)),d=or(e,t),d!=null&&s.push(Pr(e,d,p))),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 id(e,t,i,s,d){for(var p=t._reactName,A=[];i!==null&&i!==s;){var N=i,Y=N.alternate,se=N.stateNode;if(N=N.tag,Y!==null&&Y===s)break;N!==5&&N!==26&&N!==27||se===null||(Y=se,d?(se=or(i,p),se!=null&&A.unshift(Pr(i,se,Y))):d||(se=or(i,p),se!=null&&A.push(Pr(i,se,Y)))),i=i.return}A.length!==0&&e.push({event:t,listeners:A})}var V_=/\r\n?/g,K_=/\u0000|\uFFFD/g;function sd(e){return(typeof e=="string"?e:""+e).replace(V_,`
|
|
49
|
+
`).replace(K_,"")}function rd(e,t){return t=sd(t),sd(e)===t}function Ye(e,t,i,s,d,p){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":Zr(e,"class",s);break;case"tabIndex":Zr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Zr(e,i,s);break;case"style":rc(e,s,p);break;case"data":if(t!=="object"){Zr(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=en(""+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 p=="function"&&(i==="formAction"?(t!=="input"&&Ye(e,t,"name",d.name,d,null),Ye(e,t,"formEncType",d.formEncType,d,null),Ye(e,t,"formMethod",d.formMethod,d,null),Ye(e,t,"formTarget",d.formTarget,d,null)):(Ye(e,t,"encType",d.encType,d,null),Ye(e,t,"method",d.method,d,null),Ye(e,t,"target",d.target,d,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=en(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=di);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(B(61));if(i=s.__html,i!=null){if(d.children!=null)throw Error(B(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=en(""+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),Qr(e,"popover",s);break;case"xlinkActuate":ui(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ui(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ui(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ui(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ui(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ui(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ui(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ui(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ui(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Qr(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=xf.get(i)||i,Qr(e,i,s))}}function cl(e,t,i,s,d,p){switch(i){case"style":rc(e,s,p);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(B(61));if(i=s.__html,i!=null){if(d.children!=null)throw Error(B(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=di);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Vl.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(d=i.endsWith("Capture"),t=i.slice(2,d?i.length-7:void 0),p=e[Et]||null,p=p!=null?p[i]:null,typeof p=="function"&&e.removeEventListener(t,p,d),typeof s=="function")){typeof p!="function"&&p!==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,""):Qr(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,p;for(p in i)if(i.hasOwnProperty(p)){var A=i[p];if(A!=null)switch(p){case"src":s=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(B(137,t));default:Ye(e,t,p,A,i,null)}}d&&Ye(e,t,"srcSet",i.srcSet,i,null),s&&Ye(e,t,"src",i.src,i,null);return;case"input":He("invalid",e);var N=p=A=d=null,Y=null,se=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":Y=le;break;case"defaultChecked":se=le;break;case"value":p=le;break;case"defaultValue":N=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(B(137,t));break;default:Ye(e,t,s,le,i,null)}}ec(e,p,N,Y,se,A,d,!1);return;case"select":He("invalid",e),s=A=p=null;for(d in i)if(i.hasOwnProperty(d)&&(N=i[d],N!=null))switch(d){case"value":p=N;break;case"defaultValue":A=N;break;case"multiple":s=N;default:Ye(e,t,d,N,i,null)}t=p,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),p=d=s=null;for(A in i)if(i.hasOwnProperty(A)&&(N=i[A],N!=null))switch(A){case"value":s=N;break;case"defaultValue":d=N;break;case"children":p=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(B(91));break;default:Ye(e,t,A,N,i,null)}ic(e,s,d,p);return;case"option":for(Y in i)if(i.hasOwnProperty(Y)&&(s=i[Y],s!=null))switch(Y){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Ye(e,t,Y,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(se in i)if(i.hasOwnProperty(se)&&(s=i[se],s!=null))switch(se){case"children":case"dangerouslySetInnerHTML":throw Error(B(137,t));default:Ye(e,t,se,s,i,null)}return;default:if(ba(t)){for(le in i)i.hasOwnProperty(le)&&(s=i[le],s!==void 0&&cl(e,t,le,s,i,void 0));return}}for(N in i)i.hasOwnProperty(N)&&(s=i[N],s!=null&&Ye(e,t,N,s,i,null))}function Q_(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,p=null,A=null,N=null,Y=null,se=null,le=null;for(ae in i){var de=i[ae];if(i.hasOwnProperty(ae)&&de!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":Y=de;default:s.hasOwnProperty(ae)||Ye(e,t,ae,null,s,de)}}for(var re in s){var ae=s[re];if(de=i[re],s.hasOwnProperty(re)&&(ae!=null||de!=null))switch(re){case"type":p=ae;break;case"name":d=ae;break;case"checked":se=ae;break;case"defaultChecked":le=ae;break;case"value":A=ae;break;case"defaultValue":N=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(B(137,t));break;default:ae!==de&&Ye(e,t,re,ae,s,de)}}Ca(e,A,N,Y,se,le,p,d);return;case"select":ae=A=N=re=null;for(p in i)if(Y=i[p],i.hasOwnProperty(p)&&Y!=null)switch(p){case"value":break;case"multiple":ae=Y;default:s.hasOwnProperty(p)||Ye(e,t,p,null,s,Y)}for(d in s)if(p=s[d],Y=i[d],s.hasOwnProperty(d)&&(p!=null||Y!=null))switch(d){case"value":re=p;break;case"defaultValue":N=p;break;case"multiple":A=p;default:p!==Y&&Ye(e,t,d,p,s,Y)}t=N,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(N in i)if(d=i[N],i.hasOwnProperty(N)&&d!=null&&!s.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:Ye(e,t,N,null,s,d)}for(A in s)if(d=s[A],p=i[A],s.hasOwnProperty(A)&&(d!=null||p!=null))switch(A){case"value":re=d;break;case"defaultValue":ae=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(B(91));break;default:d!==p&&Ye(e,t,A,d,s,p)}tc(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:Ye(e,t,Ce,null,s,re)}for(Y in s)if(re=s[Y],ae=i[Y],s.hasOwnProperty(Y)&&re!==ae&&(re!=null||ae!=null))switch(Y){case"selected":e.selected=re&&typeof re!="function"&&typeof re!="symbol";break;default:Ye(e,t,Y,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)&&Ye(e,t,Ee,null,s,re);for(se in s)if(re=s[se],ae=i[se],s.hasOwnProperty(se)&&re!==ae&&(re!=null||ae!=null))switch(se){case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(B(137,t));break;default:Ye(e,t,se,re,s,ae)}return;default:if(ba(t)){for(var Ve in i)re=i[Ve],i.hasOwnProperty(Ve)&&re!==void 0&&!s.hasOwnProperty(Ve)&&cl(e,t,Ve,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||cl(e,t,le,re,s,ae);return}}for(var Z in i)re=i[Z],i.hasOwnProperty(Z)&&re!=null&&!s.hasOwnProperty(Z)&&Ye(e,t,Z,null,s,re);for(de in s)re=s[de],ae=i[de],!s.hasOwnProperty(de)||re===ae||re==null&&ae==null||Ye(e,t,de,re,s,ae)}function nd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Z_(){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],p=d.transferSize,A=d.initiatorType,N=d.duration;if(p&&N&&nd(A)){for(A=0,N=d.responseEnd,s+=1;s<i.length;s++){var Y=i[s],se=Y.startTime;if(se>N)break;var le=Y.transferSize,de=Y.initiatorType;le&&nd(de)&&(Y=Y.responseEnd,A+=le*(Y<N?1:(N-se)/(Y-se)))}if(--s,t+=8*(p+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 hl=null,ul=null;function Kn(e){return e.nodeType===9?e:e.ownerDocument}function ad(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 od(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 dl(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 fl=null;function J_(){var e=window.event;return e&&e.type==="popstate"?e===fl?!1:(fl=e,!0):(fl=null,!1)}var ld=typeof setTimeout=="function"?setTimeout:void 0,ev=typeof clearTimeout=="function"?clearTimeout:void 0,cd=typeof Promise=="function"?Promise:void 0,tv=typeof queueMicrotask=="function"?queueMicrotask:typeof cd<"u"?function(e){return cd.resolve(null).then(e).catch(iv)}:ld;function iv(e){setTimeout(function(){throw e})}function Xi(e){return e==="head"}function hd(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")Fr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Fr(i);for(var p=i.firstChild;p;){var A=p.nextSibling,N=p.nodeName;p[nr]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&p.rel.toLowerCase()==="stylesheet"||i.removeChild(p),p=A}}else i==="body"&&Fr(e.ownerDocument.body);i=d}while(i);Js(t)}function ud(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 _l(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":_l(i),ma(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function sv(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(p=e.getAttribute("rel"),p==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(p!==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(p=e.getAttribute("src"),(p!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&p&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var p=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===p)return e}else return e;if(e=Kt(e.nextSibling),e===null)break}return null}function rv(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 dd(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 vl(e){return e.data==="$?"||e.data==="$~"}function gl(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function nv(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 pl=null;function fd(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 _d(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 vd(e,t,i){switch(t=Kn(i),e){case"html":if(e=t.documentElement,!e)throw Error(B(452));return e;case"head":if(e=t.head,!e)throw Error(B(453));return e;case"body":if(e=t.body,!e)throw Error(B(454));return e;default:throw Error(B(451))}}function Fr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ma(e)}var Qt=new Map,gd=new Set;function Qn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ai=P.d;P.d={f:av,r:ov,D:lv,C:cv,L:hv,m:uv,X:fv,S:dv,M:_v};function av(){var e=Ai.f(),t=jn();return e||t}function ov(e){var t=ms(e);t!==null&&t.tag===5&&t.type==="form"?Oh(t):Ai.r(e)}var Ks=typeof document>"u"?null:document;function pd(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+'"]'),gd.has(d)||(gd.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 lv(e){Ai.D(e),pd("dns-prefetch",e,null)}function cv(e,t){Ai.C(e,t),pd("preconnect",e,t)}function hv(e,t,i){Ai.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 p=d;switch(t){case"style":p=Qs(e);break;case"script":p=Zs(e)}Qt.has(p)||(e=a({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Qt.set(p,e),s.querySelector(d)!==null||t==="style"&&s.querySelector(jr(p))||t==="script"&&s.querySelector($r(p))||(t=s.createElement("link"),bt(t,"link",e),gt(t),s.head.appendChild(t)))}}function uv(e,t){Ai.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)+'"]',p=d;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=Zs(e)}if(!Qt.has(p)&&(e=a({rel:"modulepreload",href:e},t),Qt.set(p,e),i.querySelector(d)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector($r(p)))return}s=i.createElement("link"),bt(s,"link",e),gt(s),i.head.appendChild(s)}}}function dv(e,t,i){Ai.S(e,t,i);var s=Ks;if(s&&e){var d=Ss(s).hoistableStyles,p=Qs(e);t=t||"default";var A=d.get(p);if(!A){var N={loading:0,preload:null};if(A=s.querySelector(jr(p)))N.loading=5;else{e=a({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Qt.get(p))&&ml(e,i);var Y=A=s.createElement("link");gt(Y),bt(Y,"link",e),Y._p=new Promise(function(se,le){Y.onload=se,Y.onerror=le}),Y.addEventListener("load",function(){N.loading|=1}),Y.addEventListener("error",function(){N.loading|=2}),N.loading|=4,Zn(A,t,s)}A={type:"stylesheet",instance:A,count:1,state:N},d.set(p,A)}}}function fv(e,t){Ai.X(e,t);var i=Ks;if(i&&e){var s=Ss(i).hoistableScripts,d=Zs(e),p=s.get(d);p||(p=i.querySelector($r(d)),p||(e=a({src:e,async:!0},t),(t=Qt.get(d))&&Sl(e,t),p=i.createElement("script"),gt(p),bt(p,"link",e),i.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},s.set(d,p))}}function _v(e,t){Ai.M(e,t);var i=Ks;if(i&&e){var s=Ss(i).hoistableScripts,d=Zs(e),p=s.get(d);p||(p=i.querySelector($r(d)),p||(e=a({src:e,async:!0,type:"module"},t),(t=Qt.get(d))&&Sl(e,t),p=i.createElement("script"),gt(p),bt(p,"link",e),i.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},s.set(d,p))}}function md(e,t,i,s){var d=(d=oe.current)?Qn(d):null;if(!d)throw Error(B(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 p=Ss(d).hoistableStyles,A=p.get(e);if(A||(d=d.ownerDocument||d,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(e,A),(p=d.querySelector(jr(e)))&&!p._p&&(A.instance=p,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),p||vv(d,e,i,A.state))),t&&s===null)throw Error(B(528,""));return A}if(t&&s!==null)throw Error(B(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(B(444,e))}}function Qs(e){return'href="'+$t(e)+'"'}function jr(e){return'link[rel="stylesheet"]['+e+"]"}function Sd(e){return a({},e,{"data-precedence":e.precedence,precedence:null})}function vv(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 Cd(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),Zn(s,i.precedence,e),t.instance=s;case"stylesheet":d=Qs(i.href);var p=e.querySelector(jr(d));if(p)return t.state.loading|=4,t.instance=p,gt(p),p;s=Sd(i),(d=Qt.get(d))&&ml(s,d),p=(e.ownerDocument||e).createElement("link"),gt(p);var A=p;return A._p=new Promise(function(N,Y){A.onload=N,A.onerror=Y}),bt(p,"link",s),t.state.loading|=4,Zn(p,i.precedence,e),t.instance=p;case"script":return p=Zs(i.src),(d=e.querySelector($r(p)))?(t.instance=d,gt(d),d):(s=i,(d=Qt.get(p))&&(s=a({},i),Sl(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(B(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Zn(s,i.precedence,e));return t.instance}function Zn(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=s.length?s[s.length-1]:null,p=d,A=0;A<s.length;A++){var N=s[A];if(N.dataset.precedence===t)p=N;else if(p!==d)break}p?p.parentNode.insertBefore(e,p.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function ml(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Sl(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Jn=null;function yd(e,t,i){if(Jn===null){var s=new Map,d=Jn=new Map;d.set(i,s)}else d=Jn,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 p=i[d];if(!(p[nr]||p[mt]||e==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var A=p.getAttribute(t)||"";A=e+A;var N=s.get(A);N?N.push(p):s.set(A,[p])}}return s}function bd(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function gv(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 wd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function pv(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),p=t.querySelector(jr(d));if(p){t=p._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ea.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=p,gt(p);return}p=t.ownerDocument||t,s=Sd(s),(d=Qt.get(d))&&ml(s,d),p=p.createElement("link"),gt(p);var A=p;A._p=new Promise(function(N,Y){A.onload=N,A.onerror=Y}),bt(p,"link",s),i.instance=p}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=ea.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Cl=0;function mv(e,t){return e.stylesheets&&e.count===0&&ia(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&ia(e,e.stylesheets),e.unsuspend){var p=e.unsuspend;e.unsuspend=null,p()}},6e4+t);0<e.imgBytes&&Cl===0&&(Cl=62500*Z_());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ia(e,e.stylesheets),e.unsuspend)){var p=e.unsuspend;e.unsuspend=null,p()}},(e.imgBytes>Cl?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(d)}}:null}function ea(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ia(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ta=null;function ia(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ta=new Map,t.forEach(Sv,e),ta=null,ea.call(e))}function Sv(e,t){if(!(t.state.loading&4)){var i=ta.get(e);if(i)var s=i.get(null);else{i=new Map,ta.set(e,i);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<d.length;p++){var A=d[p];(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"),p=i.get(A)||s,p===s&&i.set(null,d),i.set(A,d),this.count++,s=ea.bind(this),d.addEventListener("load",s),d.addEventListener("error",s),p?p.parentNode.insertBefore(d,p.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),t.state.loading|=4}}var qr={$$typeof:o,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function Cv(e,t,i,s,d,p,A,N,Y){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=_a(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_a(0),this.hiddenUpdates=_a(null),this.identifierPrefix=s,this.onUncaughtError=d,this.onCaughtError=p,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Y,this.incompleteTransitions=new Map}function xd(e,t,i,s,d,p,A,N,Y,se,le,de){return e=new Cv(e,t,i,A,Y,se,le,de,N),t=1,p===!0&&(t|=24),p=Ht(3,null,null,t),e.current=p,p.stateNode=e,t=Za(),t.refCount++,e.pooledCache=t,t.refCount++,p.memoizedState={element:s,isDehydrated:i,cache:t},io(p),e}function Ld(e){return e?(e=Rs,e):Rs}function Ed(e,t,i,s,d,p){d=Ld(d),s.context===null?s.context=d:s.pendingContext=d,s=Ni(t),s.payload={element:i},p=p===void 0?null:p,p!==null&&(s.callback=p),i=zi(e,s,t),i!==null&&(Bt(i,e,t),br(i,e,t))}function Md(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function yl(e,t){Md(e,t),(e=e.alternate)&&Md(e,t)}function Ad(e){if(e.tag===13||e.tag===31){var t=ss(e,67108864);t!==null&&Bt(t,e,67108864),yl(e,67108864)}}function Rd(e){if(e.tag===13||e.tag===31){var t=Pt();t=va(t);var i=ss(e,t);i!==null&&Bt(i,e,t),yl(e,t)}}var sa=!0;function yv(e,t,i,s){var d=U.T;U.T=null;var p=P.p;try{P.p=2,bl(e,t,i,s)}finally{P.p=p,U.T=d}}function bv(e,t,i,s){var d=U.T;U.T=null;var p=P.p;try{P.p=8,bl(e,t,i,s)}finally{P.p=p,U.T=d}}function bl(e,t,i,s){if(sa){var d=wl(s);if(d===null)ll(e,t,s,ra,i),Td(e,s);else if(xv(d,e,t,i,s))s.stopPropagation();else if(Td(e,s),t&4&&-1<wv.indexOf(e)){for(;d!==null;){var p=ms(d);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var A=Jt(p.pendingLanes);if(A!==0){var N=p;for(N.pendingLanes|=2,N.entangledLanes|=2;A;){var Y=1<<31-ut(A);N.entanglements[1]|=Y,A&=~Y}ci(p),($e&6)===0&&(Pn=ge()+500,Ur(0))}}break;case 31:case 13:N=ss(p,2),N!==null&&Bt(N,p,2),jn(),yl(p,2)}if(p=wl(s),p===null&&ll(e,t,s,ra,i),p===d)break;d=p}d!==null&&s.stopPropagation()}else ll(e,t,s,null,i)}}function wl(e){return e=xa(e),xl(e)}var ra=null;function xl(e){if(ra=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 ra=e,null}function Dd(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(Ne()){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 Ll=!1,Yi=null,Vi=null,Ki=null,Wr=new Map,Gr=new Map,Qi=[],wv="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 Td(e,t){switch(e){case"focusin":case"focusout":Yi=null;break;case"dragenter":case"dragleave":Vi=null;break;case"mouseover":case"mouseout":Ki=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,p){return e===null||e.nativeEvent!==p?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:p,targetContainers:[d]},t!==null&&(t=ms(t),t!==null&&Ad(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,d!==null&&t.indexOf(d)===-1&&t.push(d),e)}function xv(e,t,i,s,d){switch(t){case"focusin":return Yi=Xr(Yi,e,t,i,s,d),!0;case"dragenter":return Vi=Xr(Vi,e,t,i,s,d),!0;case"mouseover":return Ki=Xr(Ki,e,t,i,s,d),!0;case"pointerover":var p=d.pointerId;return Wr.set(p,Xr(Wr.get(p)||null,e,t,i,s,d)),!0;case"gotpointercapture":return p=d.pointerId,Gr.set(p,Xr(Gr.get(p)||null,e,t,i,s,d)),!0}return!1}function Bd(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,Gl(e.priority,function(){Rd(i)});return}}else if(t===31){if(t=n(i),t!==null){e.blockedOn=t,Gl(e.priority,function(){Rd(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 na(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=wl(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);wa=s,i.target.dispatchEvent(s),wa=null}else return t=ms(i),t!==null&&Ad(t),e.blockedOn=i,!1;t.shift()}return!0}function Od(e,t,i){na(e)&&i.delete(t)}function Lv(){Ll=!1,Yi!==null&&na(Yi)&&(Yi=null),Vi!==null&&na(Vi)&&(Vi=null),Ki!==null&&na(Ki)&&(Ki=null),Wr.forEach(Od),Gr.forEach(Od)}function aa(e,t){e.blockedOn===t&&(e.blockedOn=null,Ll||(Ll=!0,I.unstable_scheduleCallback(I.unstable_NormalPriority,Lv)))}var oa=null;function kd(e){oa!==e&&(oa=e,I.unstable_scheduleCallback(I.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(xl(s||i)===null)continue;break}var p=ms(i);p!==null&&(e.splice(t,3),t-=3,wo(p,{pending:!0,data:d,method:i.method,action:s},s,d))}}))}function Js(e){function t(Y){return aa(Y,e)}Yi!==null&&aa(Yi,e),Vi!==null&&aa(Vi,e),Ki!==null&&aa(Ki,e),Wr.forEach(t),Gr.forEach(t);for(var i=0;i<Qi.length;i++){var s=Qi[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Qi.length&&(i=Qi[0],i.blockedOn===null);)Bd(i),i.blockedOn===null&&Qi.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var d=i[s],p=i[s+1],A=d[Et]||null;if(typeof p=="function")A||kd(i);else if(A){var N=null;if(p&&p.hasAttribute("formAction")){if(d=p,A=p[Et]||null)N=A.formAction;else if(xl(d)!==null)continue}else N=A.action;typeof N=="function"?i[s+1]=N:(i.splice(s,3),s-=3),kd(i)}}}function Hd(){function e(p){p.canIntercept&&p.info==="react-transition"&&p.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 p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.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 El(e){this._internalRoot=e}la.prototype.render=El.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(B(409));var i=t.current,s=Pt();Ed(i,s,e,t,null,null)},la.prototype.unmount=El.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ed(e.current,2,null,e,null,null),jn(),t[gs]=null}};function la(e){this._internalRoot=e}la.prototype.unstable_scheduleHydration=function(e){if(e){var t=Wl();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Qi.length&&t!==0&&t<Qi[i].priority;i++);Qi.splice(i,0,e),i===0&&Bd(e)}};var Nd=X.version;if(Nd!=="19.2.4")throw Error(B(527,Nd,"19.2.4"));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(B(188)):(e=Object.keys(e).join(","),Error(B(268,e)));return e=f(t),e=e!==null?_(e):null,e=e===null?null:e.stateNode,e};var Ev={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ca=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ca.isDisabled&&ca.supportsFiber)try{xt=ca.inject(Ev),tt=ca}catch{}}return Vr.createRoot=function(e,t){if(!ee(e))throw Error(B(299));var i=!1,s="",d=$h,p=qh,A=Wh;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&&(p=t.onCaughtError),t.onRecoverableError!==void 0&&(A=t.onRecoverableError)),t=xd(e,1,!1,null,null,i,s,null,d,p,A,Hd),e[gs]=t.current,ol(e),new El(t)},Vr.hydrateRoot=function(e,t,i){if(!ee(e))throw Error(B(299));var s=!1,d="",p=$h,A=qh,N=Wh,Y=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(p=i.onUncaughtError),i.onCaughtError!==void 0&&(A=i.onCaughtError),i.onRecoverableError!==void 0&&(N=i.onRecoverableError),i.formState!==void 0&&(Y=i.formState)),t=xd(e,1,!0,t,i??null,s,d,Y,p,A,N,Hd),t.context=Ld(null),i=t.current,s=Pt(),s=va(s),d=Ni(s),d.callback=null,zi(i,d,s),i=s,t.current.lanes=i,rr(t,i),ci(t),e[gs]=t.current,ol(e),new la(t)},Vr.version="19.2.4",Vr}var Gd;function Uv(){if(Gd)return Rl.exports;Gd=1;function I(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(I)}catch(X){console.error(X)}}return I(),Rl.exports=zv(),Rl.exports}var Iv=Uv();const ef=768,Pv=1e3;function tf(){return"./"}function si(I){const X=tf(),G=I.startsWith("/")?I.slice(1):I;return X+G}function hi(){const I=localStorage.getItem("codev-web-key");return I?{Authorization:`Bearer ${I}`}:{}}async function Fv(){const I=await fetch(si("api/state"),{headers:hi()});if(!I.ok)throw new Error(`Failed to fetch state: ${I.status}`);return I.json()}async function jv(){const I=await fetch(si("api/overview"),{headers:hi()});if(!I.ok)throw new Error(`Failed to fetch overview: ${I.status}`);return I.json()}function $v(){return si("api/events")}async function qv(){await fetch(si("api/overview/refresh"),{method:"POST",headers:hi()})}async function Wv(){const I=await fetch(si("api/tabs/shell"),{method:"POST",headers:{"Content-Type":"application/json",...hi()}});if(!I.ok)throw new Error(await I.text());return I.json()}async function Pl(I,X,G){const B=await fetch(si("api/tabs/file"),{method:"POST",headers:{"Content-Type":"application/json",...hi()},body:JSON.stringify({path:I,line:X,terminalId:G})});if(!B.ok)throw new Error(await B.text());return B.json()}async function Gv(I){const X=await fetch(si(`api/tabs/${I}`),{method:"DELETE",headers:hi()});if(!X.ok)throw new Error(await X.text())}async function Xv(){const I=await fetch(si("api/files"),{headers:hi()});if(!I.ok)throw new Error(`Failed to fetch files: ${I.status}`);return I.json()}async function sf(I){const X=await fetch(si("api/paste-image"),{method:"POST",headers:{"Content-Type":I.type||"image/png",...hi()},body:I});if(!X.ok)throw new Error(`Image upload failed: ${X.status}`);return X.json()}function Xd(I){if(I.terminalId){const X=window.location.pathname;return`${X.endsWith("/")?X:X+"/"}ws/terminal/${I.terminalId}`}return null}async function Yv(){const I=await fetch(si("api/git/status"),{headers:hi()});if(!I.ok)throw new Error(`Failed to fetch git status: ${I.status}`);return I.json()}async function Vv(){const I=await fetch(si("api/files/recent"),{headers:hi()});if(!I.ok)throw new Error(`Failed to fetch recent files: ${I.status}`);return I.json()}function Kv(){const[I,X]=ye.useState(null),[G,B]=ye.useState(null),ee=ye.useCallback(async()=>{try{const ne=await Fv();X(ne),B(null)}catch(ne){B(ne.message)}},[]);return ye.useEffect(()=>{ee();const ne=setInterval(ee,Pv);return()=>clearInterval(ne)},[ee]),{state:I,error:G,refresh:ee}}function Qv(I){const X=[{id:"work",type:"work",label:"Work",closable:!1}];I!=null&&I.architect&&X.push({id:"architect",type:"architect",label:"Architect",closable:!1,terminalId:I.architect.terminalId,persistent:I.architect.persistent});for(const G of(I==null?void 0:I.builders)??[])X.push({id:G.id,type:"builder",label:G.name||G.id,closable:!0,projectId:G.id,terminalId:G.terminalId,persistent:G.persistent});for(const G of(I==null?void 0:I.utils)??[])!G.terminalId&&(!G.pid||G.pid===0)||X.push({id:G.id,type:"shell",label:G.name||`Shell ${G.id}`,closable:!0,utilId:G.id,terminalId:G.terminalId,persistent:G.persistent});for(const G of(I==null?void 0:I.annotations)??[]){const B=G.file.split("/").pop()??G.file;X.push({id:G.id,type:"file",label:B,closable:!0,annotationId:G.id,filePath:G.file})}return X}function Zv(I){const[X,G]=ye.useState("work"),B=ye.useRef(null),ee=ye.useRef(!1),ne=Qv(I);ye.useEffect(()=>{if(ee.current||I===null)return;const f=new URLSearchParams(window.location.search).get("tab");if(f){const _=ne.find(a=>a.id===f||a.type===f);if(_){G(_.id),ee.current=!0;const a=new URL(window.location.href);a.searchParams.delete("tab"),window.history.replaceState({},"",a.toString())}}else ee.current=!0},[ne,I]),ye.useEffect(()=>{const u=new Set(ne.map(f=>f.id));if(B.current===null){I!==null&&(B.current=u);return}for(const f of ne)!B.current.has(f.id)&&f.type!=="architect"&&G(f.id);B.current=u},[ne.map(u=>u.id).join(","),I!==null]);const j=ye.useCallback(u=>{G(u)},[]),n=ne.find(u=>u.id===X)??ne[0];return{tabs:ne,activeTab:n,activeTabId:X,selectTab:j}}function rf(I){const[X,G]=ye.useState(()=>typeof window<"u"?window.matchMedia(I).matches:!1);return ye.useEffect(()=>{const B=window.matchMedia(I),ee=ne=>G(ne.matches);return B.addEventListener("change",ee),G(B.matches),()=>B.removeEventListener("change",ee)},[I]),X}function Jv({left:I,right:X,defaultSplit:G=50}){const[B,ee]=ye.useState(G),ne=ye.useRef(null),j=ye.useRef(!1),n=ye.useCallback(u=>{u.preventDefault(),j.current=!0;const f=a=>{if(!j.current||!ne.current)return;const g=ne.current.getBoundingClientRect(),b=(a.clientX-g.left)/g.width*100;ee(Math.max(20,Math.min(80,b)))},_=()=>{j.current=!1,document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",_)};document.addEventListener("mousemove",f),document.addEventListener("mouseup",_)},[]);return Q.jsxs("div",{ref:ne,className:"split-pane",children:[Q.jsx("div",{className:"split-left",style:{width:`${B}%`},children:I}),Q.jsx("div",{className:"split-handle",onMouseDown:n,role:"separator","aria-label":"Resize panels"}),Q.jsx("div",{className:"split-right",style:{width:`${100-B}%`},children:X})]})}function nf({tabs:I,activeTabId:X,onSelectTab:G,onRefresh:B}){const ee=async(ne,j)=>{ne.stopPropagation();try{await Gv(j.id),B()}catch(n){console.error("Failed to close tab:",n)}};return Q.jsx("div",{className:"tab-bar",role:"tablist","aria-label":"Content tabs",children:I.map(ne=>Q.jsxs("button",{role:"tab","aria-selected":ne.id===X,className:`tab ${ne.id===X?"tab-active":""}`,onClick:()=>G(ne.id),title:ne.label,children:[Q.jsx("span",{className:"tab-label",children:ne.label}),ne.closable&&Q.jsx("span",{className:"tab-close",onClick:j=>ee(j,ne),role:"button","aria-label":`Close ${ne.label}`,tabIndex:0,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),ee(j,ne))},children:"×"})]},ne.id))})}var Ol={exports:{}},Yd;function eg(){return Yd||(Yd=1,(function(I,X){(function(G,B){I.exports=B()})(globalThis,(()=>(()=>{var G={4567:function(j,n,u){var f=this&&this.__decorate||function(l,o,m,x){var v,w=arguments.length,S=w<3?o:x===null?x=Object.getOwnPropertyDescriptor(o,m):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(l,o,m,x);else for(var C=l.length-1;C>=0;C--)(v=l[C])&&(S=(w<3?v(S):w>3?v(o,m,S):v(o,m))||S);return w>3&&S&&Object.defineProperty(o,m,S),S},_=this&&this.__param||function(l,o){return function(m,x){o(m,x,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.AccessibilityManager=void 0;const a=u(9042),g=u(9924),b=u(844),y=u(4725),c=u(2585),r=u(3656);let h=n.AccessibilityManager=class extends b.Disposable{constructor(l,o,m,x){super(),this._terminal=l,this._coreBrowserService=m,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 g.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((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(l){for(let o=0;o<l;o++)this._handleChar(" ")}_handleChar(l){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==l&&(this._charsToAnnounce+=l):this._charsToAnnounce+=l,l===`
|
|
51
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=a.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(l){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(l)||this._charsToConsume.push(l)}_refreshRows(l,o){this._liveRegionDebouncer.refresh(l,o,this._terminal.rows)}_renderRows(l,o){const m=this._terminal.buffer,x=m.lines.length.toString();for(let v=l;v<=o;v++){const w=m.lines.get(m.ydisp+v),S=[],C=(w==null?void 0:w.translateToString(!0,void 0,void 0,S))||"",L=(m.ydisp+v+1).toString(),R=this._rowElements[v];R&&(C.length===0?(R.innerText=" ",this._rowColumns.set(R,[0,1])):(R.textContent=C,this._rowColumns.set(R,S)),R.setAttribute("aria-posinset",L),R.setAttribute("aria-setsize",x))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(l,o){const m=l.target,x=this._rowElements[o===0?1:this._rowElements.length-2];if(m.getAttribute("aria-posinset")===(o===0?"1":`${this._terminal.buffer.lines.length}`)||l.relatedTarget!==x)return;let v,w;if(o===0?(v=m,w=this._rowElements.pop(),this._rowContainer.removeChild(w)):(v=this._rowElements.shift(),w=m,this._rowContainer.removeChild(v)),v.removeEventListener("focus",this._topBoundaryFocusListener),w.removeEventListener("focus",this._bottomBoundaryFocusListener),o===0){const S=this._createAccessibilityTreeNode();this._rowElements.unshift(S),this._rowContainer.insertAdjacentElement("afterbegin",S)}else{const S=this._createAccessibilityTreeNode();this._rowElements.push(S),this._rowContainer.appendChild(S)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(o===0?-1:1),this._rowElements[o===0?1:this._rowElements.length-2].focus(),l.preventDefault(),l.stopImmediatePropagation()}_handleSelectionChange(){var C;if(this._rowElements.length===0)return;const l=document.getSelection();if(!l)return;if(l.isCollapsed)return void(this._rowContainer.contains(l.anchorNode)&&this._terminal.clearSelection());if(!l.anchorNode||!l.focusNode)return void console.error("anchorNode and/or focusNode are null");let o={node:l.anchorNode,offset:l.anchorOffset},m={node:l.focusNode,offset:l.focusOffset};if((o.node.compareDocumentPosition(m.node)&Node.DOCUMENT_POSITION_PRECEDING||o.node===m.node&&o.offset>m.offset)&&([o,m]=[m,o]),o.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(o={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(o.node))return;const x=this._rowElements.slice(-1)[0];if(m.node.compareDocumentPosition(x)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(m={node:x,offset:((C=x.textContent)==null?void 0:C.length)??0}),!this._rowContainer.contains(m.node))return;const v=({node:L,offset:R})=>{const E=L instanceof Text?L.parentNode:L;let T=parseInt(E==null?void 0:E.getAttribute("aria-posinset"),10)-1;if(isNaN(T))return console.warn("row is invalid. Race condition?"),null;const k=this._rowColumns.get(E);if(!k)return console.warn("columns is null. Race condition?"),null;let W=R<k.length?k[R]:k.slice(-1)[0]+1;return W>=this._terminal.cols&&(++T,W=0),{row:T,column:W}},w=v(o),S=v(m);if(w&&S){if(w.row>S.row||w.row===S.row&&w.column>=S.column)throw new Error("invalid range");this._terminal.select(w.column,w.row,(S.row-w.row)*this._terminal.cols-w.column+S.column)}}_handleResize(l){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let o=this._rowContainer.children.length;o<this._terminal.rows;o++)this._rowElements[o]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[o]);for(;this._rowElements.length>l;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const l=this._coreBrowserService.mainDocument.createElement("div");return l.setAttribute("role","listitem"),l.tabIndex=-1,this._refreshRowDimensions(l),l}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let l=0;l<this._terminal.rows;l++)this._refreshRowDimensions(this._rowElements[l])}}_refreshRowDimensions(l){l.style.height=`${this._renderService.dimensions.css.cell.height}px`}};n.AccessibilityManager=h=f([_(1,c.IInstantiationService),_(2,y.ICoreBrowserService),_(3,y.IRenderService)],h)},3614:(j,n)=>{function u(g){return g.replace(/\r?\n/g,"\r")}function f(g,b){return b?"\x1B[200~"+g+"\x1B[201~":g}function _(g,b,y,c){g=f(g=u(g),y.decPrivateModes.bracketedPasteMode&&c.rawOptions.ignoreBracketedPasteMode!==!0),y.triggerDataEvent(g,!0),b.value=""}function a(g,b,y){const c=y.getBoundingClientRect(),r=g.clientX-c.left-10,h=g.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(g,b){g.clipboardData&&g.clipboardData.setData("text/plain",b.selectionText),g.preventDefault()},n.handlePasteEvent=function(g,b,y,c){g.stopPropagation(),g.clipboardData&&_(g.clipboardData.getData("text/plain"),b,y,c)},n.paste=_,n.moveTextAreaUnderMouseCursor=a,n.rightClickHandler=function(g,b,y,c,r){a(g,b,y),r&&c.rightClickSelect(g),b.value=c.selectionText,b.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,g){this._css.set(_,a,g)}getCss(_,a){return this._css.get(_,a)}setColor(_,a,g){this._color.set(_,a,g)}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 g=!1;return{dispose:()=>{g||(g=!0,u.removeEventListener(f,_,a))}}}},3551:function(j,n,u){var f=this&&this.__decorate||function(h,l,o,m){var x,v=arguments.length,w=v<3?l:m===null?m=Object.getOwnPropertyDescriptor(l,o):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,l,o,m);else for(var S=h.length-1;S>=0;S--)(x=h[S])&&(w=(v<3?x(w):v>3?x(l,o,w):x(l,o))||w);return v>3&&w&&Object.defineProperty(l,o,w),w},_=this&&this.__param||function(h,l){return function(o,m){l(o,m,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Linkifier=void 0;const a=u(3656),g=u(8460),b=u(844),y=u(2585),c=u(4725);let r=n.Linkifier=class extends b.Disposable{get currentLink(){return this._currentLink}constructor(h,l,o,m,x){super(),this._element=h,this._mouseService=l,this._renderService=o,this._bufferService=m,this._linkProviderService=x,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new g.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new g.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,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 l=this._positionFromMouseEvent(h,this._element,this._mouseService);if(!l)return;this._isMouseOut=!1;const o=h.composedPath();for(let m=0;m<o.length;m++){const x=o[m];if(x.classList.contains("xterm"))break;if(x.classList.contains("xterm-hover"))return}this._lastBufferCell&&l.x===this._lastBufferCell.x&&l.y===this._lastBufferCell.y||(this._handleHover(l),this._lastBufferCell=l)}_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,l){var m,x;this._activeProviderReplies&&l||((m=this._activeProviderReplies)==null||m.forEach((v=>{v==null||v.forEach((w=>{w.link.dispose&&w.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=h.y);let o=!1;for(const[v,w]of this._linkProviderService.linkProviders.entries())l?(x=this._activeProviderReplies)!=null&&x.get(v)&&(o=this._checkLinkProviderResult(v,h,o)):w.provideLinks(h.y,(S=>{var L,R;if(this._isMouseOut)return;const C=S==null?void 0:S.map((E=>({link:E})));(L=this._activeProviderReplies)==null||L.set(v,C),o=this._checkLinkProviderResult(v,h,o),((R=this._activeProviderReplies)==null?void 0:R.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(h.y,this._activeProviderReplies)}))}_removeIntersectingLinks(h,l){const o=new Set;for(let m=0;m<l.size;m++){const x=l.get(m);if(x)for(let v=0;v<x.length;v++){const w=x[v],S=w.link.range.start.y<h?0:w.link.range.start.x,C=w.link.range.end.y>h?this._bufferService.cols:w.link.range.end.x;for(let L=S;L<=C;L++){if(o.has(L)){x.splice(v--,1);break}o.add(L)}}}}_checkLinkProviderResult(h,l,o){var v;if(!this._activeProviderReplies)return o;const m=this._activeProviderReplies.get(h);let x=!1;for(let w=0;w<h;w++)this._activeProviderReplies.has(w)&&!this._activeProviderReplies.get(w)||(x=!0);if(!x&&m){const w=m.find((S=>this._linkAtPosition(S.link,l)));w&&(o=!0,this._handleNewLink(w))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!o)for(let w=0;w<this._activeProviderReplies.size;w++){const S=(v=this._activeProviderReplies.get(w))==null?void 0:v.find((C=>this._linkAtPosition(C.link,l)));if(S){o=!0,this._handleNewLink(S);break}}return o}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(h){if(!this._currentLink)return;const l=this._positionFromMouseEvent(h,this._element,this._mouseService);l&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,l)&&this._currentLink.link.activate(h,this._currentLink.link.text)}_clearCurrentLink(h,l){this._currentLink&&this._lastMouseEvent&&(!h||!l||this._currentLink.link.range.start.y>=h&&this._currentLink.link.range.end.y<=l)&&(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 l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._linkAtPosition(h.link,l)&&(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 o,m;return(m=(o=this._currentLink)==null?void 0:o.state)==null?void 0:m.decorations.pointerCursor},set:o=>{var m;(m=this._currentLink)!=null&&m.state&&this._currentLink.state.decorations.pointerCursor!==o&&(this._currentLink.state.decorations.pointerCursor=o,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",o))}},underline:{get:()=>{var o,m;return(m=(o=this._currentLink)==null?void 0:o.state)==null?void 0:m.decorations.underline},set:o=>{var m,x,v;(m=this._currentLink)!=null&&m.state&&((v=(x=this._currentLink)==null?void 0:x.state)==null?void 0:v.decorations.underline)!==o&&(this._currentLink.state.decorations.underline=o,this._currentLink.state.isHovered&&this._fireUnderlineEvent(h.link,o))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((o=>{if(!this._currentLink)return;const m=o.start===0?0:o.start+1+this._bufferService.buffer.ydisp,x=this._bufferService.buffer.ydisp+1+o.end;if(this._currentLink.link.range.start.y>=m&&this._currentLink.link.range.end.y<=x&&(this._clearCurrentLink(m,x),this._lastMouseEvent)){const v=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);v&&this._askForLink(v,!1)}}))))}_linkHover(h,l,o){var m;(m=this._currentLink)!=null&&m.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(l,!0),this._currentLink.state.decorations.pointerCursor&&h.classList.add("xterm-cursor-pointer")),l.hover&&l.hover(o,l.text)}_fireUnderlineEvent(h,l){const o=h.range,m=this._bufferService.buffer.ydisp,x=this._createLinkUnderlineEvent(o.start.x-1,o.start.y-m-1,o.end.x,o.end.y-m-1,void 0);(l?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(x)}_linkLeave(h,l,o){var m;(m=this._currentLink)!=null&&m.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(l,!1),this._currentLink.state.decorations.pointerCursor&&h.classList.remove("xterm-cursor-pointer")),l.leave&&l.leave(o,l.text)}_linkAtPosition(h,l){const o=h.range.start.y*this._bufferService.cols+h.range.start.x,m=h.range.end.y*this._bufferService.cols+h.range.end.x,x=l.y*this._bufferService.cols+l.x;return o<=x&&x<=m}_positionFromMouseEvent(h,l,o){const m=o.getCoords(h,l,this._bufferService.cols,this._bufferService.rows);if(m)return{x:m[0],y:m[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(h,l,o,m,x){return{x1:h,y1:l,x2:o,y2:m,cols:this._bufferService.cols,fg:x}}};n.Linkifier=r=f([_(1,c.IMouseService),_(2,c.IRenderService),_(3,y.IBufferService),_(4,c.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(c,r,h,l){var o,m=arguments.length,x=m<3?r:l===null?l=Object.getOwnPropertyDescriptor(r,h):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,r,h,l);else for(var v=c.length-1;v>=0;v--)(o=c[v])&&(x=(m<3?o(x):m>3?o(r,h,x):o(r,h))||x);return m>3&&x&&Object.defineProperty(r,h,x),x},_=this&&this.__param||function(c,r){return function(h,l){r(h,l,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkProvider=void 0;const a=u(511),g=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 l=[],o=this._optionsService.rawOptions.linkHandler,m=new a.CellData,x=h.getTrimmedLength();let v=-1,w=-1,S=!1;for(let L=0;L<x;L++)if(w!==-1||h.hasContent(L)){if(h.loadCell(L,m),m.hasExtendedAttrs()&&m.extended.urlId){if(w===-1){w=L,v=m.extended.urlId;continue}S=m.extended.urlId!==v}else w!==-1&&(S=!0);if(S||w!==-1&&L===x-1){const R=(C=this._oscLinkService.getLinkData(v))==null?void 0:C.uri;if(R){const E={start:{x:w+1,y:c},end:{x:L+(S||L!==x-1?0:1),y:c}};let T=!1;if(!(o!=null&&o.allowNonHttpProtocols))try{const k=new URL(R);["http:","https:"].includes(k.protocol)||(T=!0)}catch{T=!0}T||l.push({text:R,range:E,activate:(k,W)=>o?o.activate(k,W,E):y(0,W),hover:(k,W)=>{var U;return(U=o==null?void 0:o.hover)==null?void 0:U.call(o,k,W,E)},leave:(k,W)=>{var U;return(U=o==null?void 0:o.leave)==null?void 0:U.call(o,k,W,E)}})}S=!1,m.hasExtendedAttrs()&&m.extended.urlId?(w=L,v=m.extended.urlId):(w=-1,v=-1)}}r(l)}};function y(c,r){if(confirm(`Do you want to navigate to ${r}?
|
|
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,g.IBufferService),_(1,g.IOptionsService),_(2,g.IOscLinkService)],b)},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),g=u(9042),b=u(3730),y=u(1680),c=u(3107),r=u(5744),h=u(2950),l=u(1296),o=u(428),m=u(4269),x=u(5114),v=u(8934),w=u(3230),S=u(9312),C=u(4725),L=u(6731),R=u(8055),E=u(8969),T=u(8460),k=u(844),W=u(6114),U=u(8437),P=u(2584),F=u(7399),D=u(5941),O=u(9074),M=u(2585),H=u(5435),$=u(4567),K=u(779);class ce 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=W,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new k.MutableDisposable),this._onCursorMove=this.register(new T.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new T.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new T.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new T.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new T.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new T.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new T.EventEmitter),this._onBlur=this.register(new T.EventEmitter),this._onA11yCharEmitter=this.register(new T.EventEmitter),this._onA11yTabEmitter=this.register(new T.EventEmitter),this._onWillOpen=this.register(new T.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(O.DecorationService),this._instantiationService.setService(M.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(K.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,te)=>this.refresh(z,te)))),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,T.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,T.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,T.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,T.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((z=>this._afterResize(z.cols,z.rows)))),this.register((0,k.toDisposable)((()=>{var z,te;this._customKeyEventHandler=void 0,(te=(z=this.element)==null?void 0:z.parentNode)==null||te.removeChild(this.element)})))}_handleColorEvent(q){if(this._themeService)for(const z of q){let te,J="";switch(z.index){case 256:te="foreground",J="10";break;case 257:te="background",J="11";break;case 258:te="cursor",J="12";break;default:te="ansi",J="4;"+z.index}switch(z.type){case 0:const _e=R.color.toColorRGB(te==="ansi"?this._themeService.colors.ansi[z.index]:this._themeService.colors[te]);this.coreService.triggerDataEvent(`${P.C0.ESC}]${J};${(0,D.toRgbString)(_e)}${P.C1_ESCAPED.ST}`);break;case 1:if(te==="ansi")this._themeService.modifyColors((fe=>fe.ansi[z.index]=R.channels.toColor(...z.color)));else{const fe=te;this._themeService.modifyColors((Me=>Me[fe]=R.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($.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(q){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(P.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(P.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const q=this.buffer.ybase+this.buffer.y,z=this.buffer.lines.get(q);if(!z)return;const te=Math.min(this.buffer.x,this.cols-1),J=this._renderService.dimensions.css.cell.height,_e=z.getWidth(te),fe=this._renderService.dimensions.css.cell.width*_e,Me=this.buffer.y*this._renderService.dimensions.css.cell.height,ve=te*this._renderService.dimensions.css.cell.width;this.textarea.style.left=ve+"px",this.textarea.style.top=Me+"px",this.textarea.style.width=fe+"px",this.textarea.style.height=J+"px",this.textarea.style.lineHeight=J+"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)),W.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)}))),W.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 te;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"),((te=this.element)==null?void 0:te.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",(J=>this.updateCursorStyle(J)))),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",g.promptLabel),W.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",(J=>this._handleTextAreaFocus(J)))),this.register((0,_.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(o.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(m.CharacterJoinerService),this._instantiationService.setService(C.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(w.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(C.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((J=>this._onRender.fire(J)))),this.onResize((J=>this._renderService.resize(J.cols,J.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((J=>this.scrollLines(J.amount,J.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(S.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(C.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((J=>this.scrollLines(J.amount,J.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((J=>this._renderService.handleSelectionChanged(J.start,J.end,J.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((J=>{this.textarea.value=J,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((J=>{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",(J=>this._selectionService.handleMouseDown(J)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance($.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(J=>this._handleScreenReaderModeOptionChange(J)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(J=>{!this._overviewRulerRenderer&&J&&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(l.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const q=this,z=this.element;function te(fe){const Me=q._mouseService.getMouseReportCoords(fe,q.screenElement);if(!Me)return!1;let ve,Oe;switch(fe.overrideType||fe.type){case"mousemove":Oe=32,fe.buttons===void 0?(ve=3,fe.button!==void 0&&(ve=fe.button<3?fe.button:3)):ve=1&fe.buttons?0:4&fe.buttons?1:2&fe.buttons?2:3;break;case"mouseup":Oe=0,ve=fe.button<3?fe.button:3;break;case"mousedown":Oe=1,ve=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,ve=4;break;default:return!1}return!(Oe===void 0||ve===void 0||ve>4)&&q.coreMouseService.triggerMouseEvent({col:Me.col,row:Me.row,x:Me.x,y:Me.y,button:ve,action:Oe,ctrl:fe.ctrlKey,alt:fe.altKey,shift:fe.shiftKey})}const J={mouseup:null,wheel:null,mousedrag:null,mousemove:null},_e={mouseup:fe=>(te(fe),fe.buttons||(this._document.removeEventListener("mouseup",J.mouseup),J.mousedrag&&this._document.removeEventListener("mousemove",J.mousedrag)),this.cancel(fe)),wheel:fe=>(te(fe),this.cancel(fe,!0)),mousedrag:fe=>{fe.buttons&&te(fe)},mousemove:fe=>{fe.buttons||te(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?J.mousemove||(z.addEventListener("mousemove",_e.mousemove),J.mousemove=_e.mousemove):(z.removeEventListener("mousemove",J.mousemove),J.mousemove=null),16&fe?J.wheel||(z.addEventListener("wheel",_e.wheel,{passive:!1}),J.wheel=_e.wheel):(z.removeEventListener("wheel",J.wheel),J.wheel=null),2&fe?J.mouseup||(J.mouseup=_e.mouseup):(this._document.removeEventListener("mouseup",J.mouseup),J.mouseup=null),4&fe?J.mousedrag||(J.mousedrag=_e.mousedrag):(this._document.removeEventListener("mousemove",J.mousedrag),J.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 te(fe),J.mouseup&&this._document.addEventListener("mouseup",J.mouseup),J.mousedrag&&this._document.addEventListener("mousemove",J.mousedrag),this.cancel(fe)}))),this.register((0,_.addDisposableDomListener)(z,"wheel",(fe=>{if(!J.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 ve=P.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(fe.deltaY<0?"A":"B");let Oe="";for(let qe=0;qe<Math.abs(Me);qe++)Oe+=ve;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 te;(te=this._renderService)==null||te.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,te=0){var J;te===1?(super.scrollLines(q,z,te),this.refresh(0,this.rows-1)):(J=this.viewport)==null||J.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,te){this._selectionService.setSelection(q,z,te)}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 te;(te=this._selectionService)==null||te.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 te=(0,F.evaluateKeyboardEvent)(q,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(q),te.type===3||te.type===2){const J=this.rows-1;return this.scrollLines(te.type===2?-J:J),this.cancel(q,!0)}return te.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,q)||(te.cancel&&this.cancel(q,!0),!te.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):(te.key!==P.C0.ETX&&te.key!==P.C0.CR||(this.textarea.value=""),this._onKey.fire({key:te.key,domEvent:q}),this._showCursor(),this.coreService.triggerDataEvent(te.key,!0),!this.optionsService.rawOptions.screenReaderMode||q.altKey||q.ctrlKey?this.cancel(q,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(q,z){const te=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"?te:te&&(!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 te,J;(te=this._charSizeService)==null||te.measure(),(J=this.viewport)==null||J.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(U.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,te;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(),(te=this.viewport)==null||te.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(P.C0.ESC+"[I"):this.coreService.triggerDataEvent(P.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),te=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${P.C0.ESC}[4;${te};${z}t`);break;case H.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const J=this._renderService.dimensions.css.cell.width.toFixed(0),_e=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${P.C0.ESC}[6;${_e};${J}t`)}}cancel(q,z){if(this.options.cancelEvents||z)return q.preventDefault(),q.stopPropagation(),!1}}n.Terminal=ce},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 g=a-this._lastRefreshMs,b=this._debounceThresholdMS-g;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(j,n,u){var f=this&&this.__decorate||function(h,l,o,m){var x,v=arguments.length,w=v<3?l:m===null?m=Object.getOwnPropertyDescriptor(l,o):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,l,o,m);else for(var S=h.length-1;S>=0;S--)(x=h[S])&&(w=(v<3?x(w):v>3?x(l,o,w):x(l,o))||w);return v>3&&w&&Object.defineProperty(l,o,w),w},_=this&&this.__param||function(h,l){return function(o,m){l(o,m,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Viewport=void 0;const a=u(3656),g=u(4725),b=u(8460),y=u(844),c=u(2585);let r=n.Viewport=class extends y.Disposable{constructor(h,l,o,m,x,v,w,S){super(),this._viewportElement=h,this._scrollArea=l,this._bufferService=o,this._optionsService=m,this._charSizeService=x,this._renderService=v,this._coreBrowserService=w,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(S.colors),this.register(S.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 l=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==l&&(this._lastRecordedBufferHeight=l,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const 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 l=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:l,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const 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,l){const o=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(l<0&&this._viewportElement.scrollTop!==0||l>0&&o<this._lastRecordedBufferHeight)||(h.cancelable&&h.preventDefault(),!1)}handleWheel(h){const l=this._getPixelsScrolled(h);return l!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+l:this._smoothScrollState.target+=l,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=l,this._bubbleScroll(h,l))}scrollLines(h){if(h!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const l=h*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+l,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:h,suppressScrollEvent:!1})}_getPixelsScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let l=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_LINE?l*=this._currentRowHeight:h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(l*=this._currentRowHeight*this._bufferService.rows),l}getBufferElements(h,l){var S;let o,m="";const x=[],v=l??this._bufferService.buffer.lines.length,w=this._bufferService.buffer.lines;for(let C=h;C<v;C++){const L=w.get(C);if(!L)continue;const R=(S=w.get(C+1))==null?void 0:S.isWrapped;if(m+=L.translateToString(!R),!R||C===w.length-1){const E=document.createElement("div");E.textContent=m,x.push(E),m.length>0&&(o=E),m=""}}return{bufferElements:x,cursorElement:o}}getLinesScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let l=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(l/=this._currentRowHeight+0,this._wheelPartialScroll+=l,l=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(l*=this._bufferService.rows),l}_applyScrollModifier(h,l){const o=this._optionsService.rawOptions.fastScrollModifier;return o==="alt"&&l.altKey||o==="ctrl"&&l.ctrlKey||o==="shift"&&l.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 l=this._lastTouchY-h.touches[0].pageY;return this._lastTouchY=h.touches[0].pageY,l!==0&&(this._viewportElement.scrollTop+=l,this._bubbleScroll(h,l))}};n.Viewport=r=f([_(2,c.IBufferService),_(3,c.IOptionsService),_(4,g.ICharSizeService),_(5,g.IRenderService),_(6,g.ICoreBrowserService),_(7,g.IThemeService)],r)},3107:function(j,n,u){var f=this&&this.__decorate||function(c,r,h,l){var o,m=arguments.length,x=m<3?r:l===null?l=Object.getOwnPropertyDescriptor(r,h):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,r,h,l);else for(var v=c.length-1;v>=0;v--)(o=c[v])&&(x=(m<3?o(x):m>3?o(r,h,x):o(r,h))||x);return m>3&&x&&Object.defineProperty(r,h,x),x},_=this&&this.__param||function(c,r){return function(h,l){r(h,l,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferDecorationRenderer=void 0;const a=u(4725),g=u(844),b=u(2585);let y=n.BufferDecorationRenderer=class extends g.Disposable{constructor(c,r,h,l,o){super(),this._screenElement=c,this._bufferService=r,this._coreBrowserService=h,this._decorationService=l,this._renderService=o,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((m=>this._removeDecoration(m)))),this.register((0,g.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const c of this._decorationService.decorations)this._renderDecoration(c);this._dimensionsChanged=!1}_renderDecoration(c){this._refreshStyle(c),this._dimensionsChanged&&this._refreshXPosition(c)}_createElement(c){var l;const r=this._coreBrowserService.mainDocument.createElement("div");r.classList.add("xterm-decoration"),r.classList.toggle("xterm-decoration-top-layer",((l=c==null?void 0:c.options)==null?void 0:l.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=y=f([_(1,b.IBufferService),_(2,a.ICoreBrowserService),_(3,b.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(o,m,x,v){var w,S=arguments.length,C=S<3?m:v===null?v=Object.getOwnPropertyDescriptor(m,x):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(o,m,x,v);else for(var L=o.length-1;L>=0;L--)(w=o[L])&&(C=(S<3?w(C):S>3?w(m,x,C):w(m,x))||C);return S>3&&C&&Object.defineProperty(m,x,C),C},_=this&&this.__param||function(o,m){return function(x,v){m(x,v,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OverviewRulerRenderer=void 0;const a=u(5871),g=u(4725),b=u(844),y=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 l=n.OverviewRulerRenderer=class extends b.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(o,m,x,v,w,S,C){var R;super(),this._viewportElement=o,this._screenElement=m,this._bufferService=x,this._decorationService=v,this._renderService=w,this._optionsService=S,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(),(R=this._viewportElement.parentElement)==null||R.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 o=Math.floor(this._canvas.width/3),m=Math.ceil(this._canvas.width/3);r.full=this._canvas.width,r.left=o,r.center=m,r.right=o,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 o=this._canvas.height/this._bufferService.buffer.lines.length,m=Math.round(Math.max(Math.min(o,12),6)*this._coreBrowserService.dpr);c.left=m,c.center=m,c.right=m}_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 m of this._decorationService.decorations)this._colorZoneStore.addDecoration(m);this._ctx.lineWidth=1;const o=this._colorZoneStore.zones;for(const m of o)m.position!=="full"&&this._renderColorZone(m);for(const m of o)m.position==="full"&&this._renderColorZone(m);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(o){this._ctx.fillStyle=o.color,this._ctx.fillRect(h[o.position||"full"],Math.round((this._canvas.height-1)*(o.startBufferLine/this._bufferService.buffers.active.lines.length)-c[o.position||"full"]/2),r[o.position||"full"],Math.round((this._canvas.height-1)*((o.endBufferLine-o.startBufferLine)/this._bufferService.buffers.active.lines.length)+c[o.position||"full"]))}_queueRefresh(o,m){this._shouldUpdateDimensions=o||this._shouldUpdateDimensions,this._shouldUpdateAnchor=m||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};n.OverviewRulerRenderer=l=f([_(2,y.IBufferService),_(3,y.IDecorationService),_(4,g.IRenderService),_(5,y.IOptionsService),_(6,g.ICoreBrowserService)],l)},2950:function(j,n,u){var f=this&&this.__decorate||function(c,r,h,l){var o,m=arguments.length,x=m<3?r:l===null?l=Object.getOwnPropertyDescriptor(r,h):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,r,h,l);else for(var v=c.length-1;v>=0;v--)(o=c[v])&&(x=(m<3?o(x):m>3?o(r,h,x):o(r,h))||x);return m>3&&x&&Object.defineProperty(r,h,x),x},_=this&&this.__param||function(c,r){return function(h,l){r(h,l,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CompositionHelper=void 0;const a=u(4725),g=u(2585),b=u(2584);let y=n.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(c,r,h,l,o,m){this._textarea=c,this._compositionView=r,this._bufferService=h,this._optionsService=l,this._coreService=o,this._renderService=m,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(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,l=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,o=r*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=o+"px",this._compositionView.style.top=l+"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 m=this._compositionView.getBoundingClientRect();this._textarea.style.left=o+"px",this._textarea.style.top=l+"px",this._textarea.style.width=Math.max(m.width,1)+"px",this._textarea.style.height=Math.max(m.height,1)+"px",this._textarea.style.lineHeight=m.height+"px"}c||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};n.CompositionHelper=y=f([_(2,g.IBufferService),_(3,g.IOptionsService),_(4,g.ICoreService),_(5,a.IRenderService)],y)},9806:(j,n)=>{function u(f,_,a){const g=a.getBoundingClientRect(),b=f.getComputedStyle(a),y=parseInt(b.getPropertyValue("padding-left")),c=parseInt(b.getPropertyValue("padding-top"));return[_.clientX-g.left-y,_.clientY-g.top-c]}Object.defineProperty(n,"__esModule",{value:!0}),n.getCoords=n.getCoordsRelativeToElement=void 0,n.getCoordsRelativeToElement=u,n.getCoords=function(f,_,a,g,b,y,c,r,h){if(!y)return;const l=u(f,_,a);return l?(l[0]=Math.ceil((l[0]+(h?c/2:0))/c),l[1]=Math.ceil(l[1]/r),l[0]=Math.min(Math.max(l[0],1),g+(h?1:0)),l[1]=Math.min(Math.max(l[1],1),b),l):void 0}},9504:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.moveToCellSequence=void 0;const f=u(2584);function _(r,h,l,o){const m=r-a(r,l),x=h-a(h,l),v=Math.abs(m-x)-(function(w,S,C){let L=0;const R=w-a(w,C),E=S-a(S,C);for(let T=0;T<Math.abs(R-E);T++){const k=g(w,S)==="A"?-1:1,W=C.buffer.lines.get(R+k*T);W!=null&&W.isWrapped&&L++}return L})(r,h,l);return c(v,y(g(r,h),o))}function a(r,h){let l=0,o=h.buffer.lines.get(r),m=o==null?void 0:o.isWrapped;for(;m&&r>=0&&r<h.rows;)l++,o=h.buffer.lines.get(--r),m=o==null?void 0:o.isWrapped;return l}function g(r,h){return r>h?"A":"B"}function b(r,h,l,o,m,x){let v=r,w=h,S="";for(;v!==l||w!==o;)v+=m?1:-1,m&&v>x.cols-1?(S+=x.buffer.translateBufferLineToString(w,!1,r,v),v=0,r=0,w++):!m&&v<0&&(S+=x.buffer.translateBufferLineToString(w,!1,0,r+1),v=x.cols-1,r=v,w--);return S+x.buffer.translateBufferLineToString(w,!1,r,v)}function y(r,h){const l=h?"O":"[";return f.C0.ESC+l+r}function c(r,h){r=Math.floor(r);let l="";for(let o=0;o<r;o++)l+=h;return l}n.moveToCellSequence=function(r,h,l,o){const m=l.buffer.x,x=l.buffer.y;if(!l.buffer.hasScrollback)return(function(S,C,L,R,E,T){return _(C,R,E,T).length===0?"":c(b(S,C,S,C-a(C,E),!1,E).length,y("D",T))})(m,x,0,h,l,o)+_(x,h,l,o)+(function(S,C,L,R,E,T){let k;k=_(C,R,E,T).length>0?R-a(R,E):C;const W=R,U=(function(P,F,D,O,M,H){let $;return $=_(D,O,M,H).length>0?O-a(O,M):F,P<D&&$<=O||P>=D&&$<O?"C":"D"})(S,C,L,R,E,T);return c(b(S,k,L,W,U==="C",E).length,y(U,T))})(m,x,r,h,l,o);let v;if(x===h)return v=m>r?"D":"C",c(Math.abs(m-r),y(v,o));v=x>h?"D":"C";const w=Math.abs(x-h);return c((function(S,C){return C.cols-S})(x>h?r:m,l)+(w-1)*l.cols+1+((x>h?m:r)-1),y(v,o))}},1296:function(j,n,u){var f=this&&this.__decorate||function(T,k,W,U){var P,F=arguments.length,D=F<3?k:U===null?U=Object.getOwnPropertyDescriptor(k,W):U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(T,k,W,U);else for(var O=T.length-1;O>=0;O--)(P=T[O])&&(D=(F<3?P(D):F>3?P(k,W,D):P(k,W))||D);return F>3&&D&&Object.defineProperty(k,W,D),D},_=this&&this.__param||function(T,k){return function(W,U){k(W,U,T)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRenderer=void 0;const a=u(3787),g=u(2550),b=u(2223),y=u(6171),c=u(6052),r=u(4725),h=u(8055),l=u(8460),o=u(844),m=u(2585),x="xterm-dom-renderer-owner-",v="xterm-rows",w="xterm-fg-",S="xterm-bg-",C="xterm-focus",L="xterm-selection";let R=1,E=n.DomRenderer=class extends o.Disposable{constructor(T,k,W,U,P,F,D,O,M,H,$,K,ce){super(),this._terminal=T,this._document=k,this._element=W,this._screenElement=U,this._viewportElement=P,this._helperContainer=F,this._linkifier2=D,this._charSizeService=M,this._optionsService=H,this._bufferService=$,this._coreBrowserService=K,this._themeService=ce,this._terminalClass=R++,this._rowElements=[],this._selectionRenderModel=(0,c.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new l.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((oe=>this._injectCss(oe)))),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((oe=>this._handleLinkHover(oe)))),this.register(this._linkifier2.onHideLinkUnderline((oe=>this._handleLinkLeave(oe)))),this.register((0,o.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 g.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const T=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*T,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*T),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/T),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/T),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 W of this._rowElements)W.style.width=`${this.dimensions.css.canvas.width}px`,W.style.height=`${this.dimensions.css.cell.height}px`,W.style.lineHeight=`${this.dimensions.css.cell.height}px`,W.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const k=`${this._terminalSelector} .${v} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=k,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(T){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let k=`${this._terminalSelector} .${v} { color: ${T.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;k+=`${this._terminalSelector} .${v} .xterm-dim { color: ${h.color.multiplyOpacity(T.foreground,.5).css};}`,k+=`${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 W=`blink_underline_${this._terminalClass}`,U=`blink_bar_${this._terminalClass}`,P=`blink_block_${this._terminalClass}`;k+=`@keyframes ${W} { 50% { border-bottom-style: hidden; }}`,k+=`@keyframes ${U} { 50% { box-shadow: none; }}`,k+=`@keyframes ${P} { 0% { background-color: ${T.cursor.css}; color: ${T.cursorAccent.css}; } 50% { background-color: inherit; color: ${T.cursor.css}; }}`,k+=`${this._terminalSelector} .${v}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${W} 1s step-end infinite;}${this._terminalSelector} .${v}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${U} 1s step-end infinite;}${this._terminalSelector} .${v}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${P} 1s step-end infinite;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-block { background-color: ${T.cursor.css}; color: ${T.cursorAccent.css};}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${T.cursor.css} !important; color: ${T.cursorAccent.css} !important;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${T.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${T.cursor.css} inset;}${this._terminalSelector} .${v} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${T.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,k+=`${this._terminalSelector} .${L} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${L} div { position: absolute; background-color: ${T.selectionBackgroundOpaque.css};}${this._terminalSelector} .${L} div { position: absolute; background-color: ${T.selectionInactiveBackgroundOpaque.css};}`;for(const[F,D]of T.ansi.entries())k+=`${this._terminalSelector} .${w}${F} { color: ${D.css}; }${this._terminalSelector} .${w}${F}.xterm-dim { color: ${h.color.multiplyOpacity(D,.5).css}; }${this._terminalSelector} .${S}${F} { background-color: ${D.css}; }`;k+=`${this._terminalSelector} .${w}${b.INVERTED_DEFAULT_COLOR} { color: ${h.color.opaque(T.background).css}; }${this._terminalSelector} .${w}${b.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${h.color.multiplyOpacity(h.color.opaque(T.background),.5).css}; }${this._terminalSelector} .${S}${b.INVERTED_DEFAULT_COLOR} { background-color: ${T.foreground.css}; }`,this._themeStyleElement.textContent=k}_setDefaultSpacing(){const T=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${T}px`,this._rowFactory.defaultSpacing=T}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(T,k){for(let W=this._rowElements.length;W<=k;W++){const U=this._document.createElement("div");this._rowContainer.appendChild(U),this._rowElements.push(U)}for(;this._rowElements.length>k;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(T,k){this._refreshRowElements(T,k),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(T,k,W){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(T,k,W),this.renderRows(0,this._bufferService.rows-1),!T||!k)return;this._selectionRenderModel.update(this._terminal,T,k,W);const U=this._selectionRenderModel.viewportStartRow,P=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(W){const M=T[0]>k[0];O.appendChild(this._createSelectionElement(F,M?k[0]:T[0],M?T[0]:k[0],D-F+1))}else{const M=U===F?T[0]:0,H=F===P?k[0]:this._bufferService.cols;O.appendChild(this._createSelectionElement(F,M,H));const $=D-F-1;if(O.appendChild(this._createSelectionElement(F+1,0,this._bufferService.cols,$)),F!==D){const K=P===D?k[0]:this._bufferService.cols;O.appendChild(this._createSelectionElement(D,0,K))}}this._selectionContainer.appendChild(O)}_createSelectionElement(T,k,W,U=1){const P=this._document.createElement("div"),F=k*this.dimensions.css.cell.width;let D=this.dimensions.css.cell.width*(W-k);return F+D>this.dimensions.css.canvas.width&&(D=this.dimensions.css.canvas.width-F),P.style.height=U*this.dimensions.css.cell.height+"px",P.style.top=T*this.dimensions.css.cell.height+"px",P.style.left=`${F}px`,P.style.width=`${D}px`,P}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const T of this._rowElements)T.replaceChildren()}renderRows(T,k){const W=this._bufferService.buffer,U=W.ybase+W.y,P=Math.min(W.x,this._bufferService.cols-1),F=this._optionsService.rawOptions.cursorBlink,D=this._optionsService.rawOptions.cursorStyle,O=this._optionsService.rawOptions.cursorInactiveStyle;for(let M=T;M<=k;M++){const H=M+W.ydisp,$=this._rowElements[M],K=W.lines.get(H);if(!$||!K)break;$.replaceChildren(...this._rowFactory.createRow(K,H,H===U,D,O,P,F,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${x}${this._terminalClass}`}_handleLinkHover(T){this._setCellUnderline(T.x1,T.x2,T.y1,T.y2,T.cols,!0)}_handleLinkLeave(T){this._setCellUnderline(T.x1,T.x2,T.y1,T.y2,T.cols,!1)}_setCellUnderline(T,k,W,U,P,F){W<0&&(T=0),U<0&&(k=0);const D=this._bufferService.rows-1;W=Math.max(Math.min(W,D),0),U=Math.max(Math.min(U,D),0),P=Math.min(P,this._bufferService.cols);const O=this._bufferService.buffer,M=O.ybase+O.y,H=Math.min(O.x,P-1),$=this._optionsService.rawOptions.cursorBlink,K=this._optionsService.rawOptions.cursorStyle,ce=this._optionsService.rawOptions.cursorInactiveStyle;for(let oe=W;oe<=U;++oe){const q=oe+O.ydisp,z=this._rowElements[oe],te=O.lines.get(q);if(!z||!te)break;z.replaceChildren(...this._rowFactory.createRow(te,q,q===M,K,ce,H,$,this.dimensions.css.cell.width,this._widthCache,F?oe===W?T:0:-1,F?(oe===U?k:P)-1:-1))}}};n.DomRenderer=E=f([_(7,m.IInstantiationService),_(8,r.ICharSizeService),_(9,m.IOptionsService),_(10,m.IBufferService),_(11,r.ICoreBrowserService),_(12,r.IThemeService)],E)},3787:function(j,n,u){var f=this&&this.__decorate||function(v,w,S,C){var L,R=arguments.length,E=R<3?w:C===null?C=Object.getOwnPropertyDescriptor(w,S):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,w,S,C);else for(var T=v.length-1;T>=0;T--)(L=v[T])&&(E=(R<3?L(E):R>3?L(w,S,E):L(w,S))||E);return R>3&&E&&Object.defineProperty(w,S,E),E},_=this&&this.__param||function(v,w){return function(S,C){w(S,C,v)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRendererRowFactory=void 0;const a=u(2223),g=u(643),b=u(511),y=u(2585),c=u(8055),r=u(4725),h=u(4269),l=u(6171),o=u(3734);let m=n.DomRendererRowFactory=class{constructor(v,w,S,C,L,R,E){this._document=v,this._characterJoinerService=w,this._optionsService=S,this._coreBrowserService=C,this._coreService=L,this._decorationService=R,this._themeService=E,this._workCell=new b.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(v,w,S){this._selectionStart=v,this._selectionEnd=w,this._columnSelectMode=S}createRow(v,w,S,C,L,R,E,T,k,W,U){const P=[],F=this._characterJoinerService.getJoinedCharacters(w),D=this._themeService.colors;let O,M=v.getNoBgTrimmedLength();S&&M<R+1&&(M=R+1);let H=0,$="",K=0,ce=0,oe=0,q=!1,z=0,te=!1,J=0;const _e=[],fe=W!==-1&&U!==-1;for(let Me=0;Me<M;Me++){v.loadCell(Me,this._workCell);let ve=this._workCell.getWidth();if(ve===0)continue;let Oe=!1,qe=Me,we=this._workCell;if(F.length>0&&Me===F[0][0]){Oe=!0;const Le=F.shift();we=new h.JoinedCellData(this._workCell,v.translateToString(!0,Le[0],Le[1]),Le[1]-Le[0]),qe=Le[1]-1,ve=we.getWidth()}const ft=this._isCellInSelection(Me,w),Ot=S&&Me===R,Se=fe&&Me>=W&&Me<=U;let pe=!1;this._decorationService.forEachDecorationAtCell(Me,w,void 0,(Le=>{pe=!0}));let me=we.getChars()||g.WHITESPACE_CELL_CHAR;if(me===" "&&(we.isUnderline()||we.isOverline())&&(me=" "),J=ve*T-k.get(me,we.isBold(),we.isItalic()),O){if(H&&(ft&&te||!ft&&!te&&we.bg===K)&&(ft&&te&&D.selectionForeground||we.fg===ce)&&we.extended.ext===oe&&Se===q&&J===z&&!Ot&&!Oe&&!pe){we.isInvisible()?$+=g.WHITESPACE_CELL_CHAR:$+=me,H++;continue}H&&(O.textContent=$),O=this._document.createElement("span"),H=0,$=""}else O=this._document.createElement("span");if(K=we.bg,ce=we.fg,oe=we.extended.ext,q=Se,z=J,te=ft,Oe&&R>=Me&&R<=qe&&(R=Me),!this._coreService.isCursorHidden&&Ot&&this._coreService.isCursorInitialized){if(_e.push("xterm-cursor"),this._coreBrowserService.isFocused)E&&_e.push("xterm-cursor-blink"),_e.push(C==="bar"?"xterm-cursor-bar":C==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(L)switch(L){case"outline":_e.push("xterm-cursor-outline");break;case"block":_e.push("xterm-cursor-block");break;case"bar":_e.push("xterm-cursor-bar");break;case"underline":_e.push("xterm-cursor-underline")}}if(we.isBold()&&_e.push("xterm-bold"),we.isItalic()&&_e.push("xterm-italic"),we.isDim()&&_e.push("xterm-dim"),$=we.isInvisible()?g.WHITESPACE_CELL_CHAR:we.getChars()||g.WHITESPACE_CELL_CHAR,we.isUnderline()&&(_e.push(`xterm-underline-${we.extended.underlineStyle}`),$===" "&&($=" "),!we.isUnderlineColorDefault()))if(we.isUnderlineColorRGB())O.style.textDecorationColor=`rgb(${o.AttributeData.toColorRGB(we.getUnderlineColor()).join(",")})`;else{let Le=we.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&we.isBold()&&Le<8&&(Le+=8),O.style.textDecorationColor=D.ansi[Le].css}we.isOverline()&&(_e.push("xterm-overline"),$===" "&&($=" ")),we.isStrikethrough()&&_e.push("xterm-strikethrough"),Se&&(O.style.textDecoration="underline");let ue=we.getFgColor(),ge=we.getFgColorMode(),Ne=we.getBgColor(),Re=we.getBgColorMode();const _t=!!we.isInverse();if(_t){const Le=ue;ue=Ne,Ne=Le;const xt=ge;ge=Re,Re=xt}let Qe,it,Ie,Ae=!1;switch(this._decorationService.forEachDecorationAtCell(Me,w,void 0,(Le=>{Le.options.layer!=="top"&&Ae||(Le.backgroundColorRGB&&(Re=50331648,Ne=Le.backgroundColorRGB.rgba>>8&16777215,Qe=Le.backgroundColorRGB),Le.foregroundColorRGB&&(ge=50331648,ue=Le.foregroundColorRGB.rgba>>8&16777215,it=Le.foregroundColorRGB),Ae=Le.options.layer==="top")})),!Ae&&ft&&(Qe=this._coreBrowserService.isFocused?D.selectionBackgroundOpaque:D.selectionInactiveBackgroundOpaque,Ne=Qe.rgba>>8&16777215,Re=50331648,Ae=!0,D.selectionForeground&&(ge=50331648,ue=D.selectionForeground.rgba>>8&16777215,it=D.selectionForeground)),Ae&&_e.push("xterm-decoration-top"),Re){case 16777216:case 33554432:Ie=D.ansi[Ne],_e.push(`xterm-bg-${Ne}`);break;case 50331648:Ie=c.channels.toColor(Ne>>16,Ne>>8&255,255&Ne),this._addStyle(O,`background-color:#${x((Ne>>>0).toString(16),"0",6)}`);break;default:_t?(Ie=D.foreground,_e.push(`xterm-bg-${a.INVERTED_DEFAULT_COLOR}`)):Ie=D.background}switch(Qe||we.isDim()&&(Qe=c.color.multiplyOpacity(Ie,.5)),ge){case 16777216:case 33554432:we.isBold()&&ue<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ue+=8),this._applyMinimumContrast(O,Ie,D.ansi[ue],we,Qe,void 0)||_e.push(`xterm-fg-${ue}`);break;case 50331648:const Le=c.channels.toColor(ue>>16&255,ue>>8&255,255&ue);this._applyMinimumContrast(O,Ie,Le,we,Qe,it)||this._addStyle(O,`color:#${x(ue.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(O,Ie,D.foreground,we,Qe,it)||_t&&_e.push(`xterm-fg-${a.INVERTED_DEFAULT_COLOR}`)}_e.length&&(O.className=_e.join(" "),_e.length=0),Ot||Oe||pe?O.textContent=$:H++,J!==this.defaultSpacing&&(O.style.letterSpacing=`${J}px`),P.push(O),Me=qe}return O&&H&&(O.textContent=$),P}_applyMinimumContrast(v,w,S,C,L,R){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,l.treatGlyphAsBackgroundColor)(C.getCode()))return!1;const E=this._getContrastCache(C);let T;if(L||R||(T=E.getColor(w.rgba,S.rgba)),T===void 0){const k=this._optionsService.rawOptions.minimumContrastRatio/(C.isDim()?2:1);T=c.color.ensureContrastRatio(L||w,R||S,k),E.setColor((L||w).rgba,(R||S).rgba,T??null)}return!!T&&(this._addStyle(v,`color:${T.css}`),!0)}_getContrastCache(v){return v.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(v,w){v.setAttribute("style",`${v.getAttribute("style")||""}${w};`)}_isCellInSelection(v,w){const S=this._selectionStart,C=this._selectionEnd;return!(!S||!C)&&(this._columnSelectMode?S[0]<=C[0]?v>=S[0]&&w>=S[1]&&v<C[0]&&w<=C[1]:v<S[0]&&w>=S[1]&&v>=C[0]&&w<=C[1]:w>S[1]&&w<C[1]||S[1]===C[1]&&w===S[1]&&v>=S[0]&&v<C[0]||S[1]<C[1]&&w===C[1]&&v<C[0]||S[1]<C[1]&&w===S[1]&&v>=S[0])}};function x(v,w,S){for(;v.length<S;)v=w+v;return v}n.DomRendererRowFactory=m=f([_(1,r.ICharacterJoinerService),_(2,y.IOptionsService),_(3,r.ICoreBrowserService),_(4,y.ICoreService),_(5,y.IDecorationService),_(6,r.IThemeService)],m)},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 g=u.createElement("span");g.classList.add("xterm-char-measure-element"),g.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,g,b],this._container.appendChild(_),this._container.appendChild(a),this._container.appendChild(g),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 y=this._measure(u,0);return y>0&&(this._flat[a]=y),y}let g=u;f&&(g+="B"),_&&(g+="I");let b=this._holey.get(g);if(b===void 0){let y=0;f&&(y|=1),_&&(y|=2),b=this._measure(u,y),b>0&&this._holey.set(g,b)}return b}_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,g,b){return a===1&&g>Math.ceil(1.5*b)&&_!==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,g=0){return(_-(2*Math.round(a)-g))%(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,g,b=!1){if(this.selectionStart=a,this.selectionEnd=g,!a||!g||a[0]===g[0]&&a[1]===g[1])return void this.clear();const y=_.buffers.active.ydisp,c=a[1]-y,r=g[1]-y,h=Math.max(c,0),l=Math.min(r,_.rows-1);h>=_.rows||l<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=b,this.viewportStartRow=c,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=l,this.startCol=a[0],this.endCol=g[0])}isCellSelected(_,a,g){return!!this.hasSelection&&(g-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?a>=this.startCol&&g>=this.viewportCappedStartRow&&a<this.endCol&&g<=this.viewportCappedEndRow:a<this.startCol&&g>=this.viewportCappedStartRow&&a>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&a>=this.startCol&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===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(l,o,m,x){var v,w=arguments.length,S=w<3?o:x===null?x=Object.getOwnPropertyDescriptor(o,m):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(l,o,m,x);else for(var C=l.length-1;C>=0;C--)(v=l[C])&&(S=(w<3?v(S):w>3?v(o,m,S):v(o,m))||S);return w>3&&S&&Object.defineProperty(o,m,S),S},_=this&&this.__param||function(l,o){return function(m,x){o(m,x,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharSizeService=void 0;const a=u(2585),g=u(8460),b=u(844);let y=n.CharSizeService=class extends b.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(l,o,m){super(),this._optionsService=m,this.width=0,this.height=0,this._onCharSizeChange=this.register(new g.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new h(this._optionsService))}catch{this._measureStrategy=this.register(new r(l,o,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const l=this._measureStrategy.measure();l.width===this.width&&l.height===this.height||(this.width=l.width,this.height=l.height,this._onCharSizeChange.fire())}};n.CharSizeService=y=f([_(2,a.IOptionsService)],y);class c extends b.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(o,m){o!==void 0&&o>0&&m!==void 0&&m>0&&(this._result.width=o,this._result.height=m)}}class r extends c{constructor(o,m,x){super(),this._document=o,this._parentElement=m,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(o){super(),this._optionsService=o,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const m=this._ctx.measureText("W");if(!("width"in m&&"fontBoundingBoxAscent"in m&&"fontBoundingBoxDescent"in m))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const o=this._ctx.measureText("W");return this._validateAndSet(o.width,o.fontBoundingBoxAscent+o.fontBoundingBoxDescent),this._result}}},4269:function(j,n,u){var f=this&&this.__decorate||function(h,l,o,m){var x,v=arguments.length,w=v<3?l:m===null?m=Object.getOwnPropertyDescriptor(l,o):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,l,o,m);else for(var S=h.length-1;S>=0;S--)(x=h[S])&&(w=(v<3?x(w):v>3?x(l,o,w):x(l,o))||w);return v>3&&w&&Object.defineProperty(l,o,w),w},_=this&&this.__param||function(h,l){return function(o,m){l(o,m,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const a=u(3734),g=u(643),b=u(511),y=u(2585);class c extends a.AttributeData{constructor(l,o,m){super(),this.content=0,this.combinedData="",this.fg=l.fg,this.bg=l.bg,this.combinedData=o,this._width=m}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(l){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.JoinedCellData=c;let r=n.CharacterJoinerService=class af{constructor(l){this._bufferService=l,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new b.CellData}register(l){const o={id:this._nextCharacterJoinerId++,handler:l};return this._characterJoiners.push(o),o.id}deregister(l){for(let o=0;o<this._characterJoiners.length;o++)if(this._characterJoiners[o].id===l)return this._characterJoiners.splice(o,1),!0;return!1}getJoinedCharacters(l){if(this._characterJoiners.length===0)return[];const o=this._bufferService.buffer.lines.get(l);if(!o||o.length===0)return[];const m=[],x=o.translateToString(!0);let v=0,w=0,S=0,C=o.getFg(0),L=o.getBg(0);for(let R=0;R<o.getTrimmedLength();R++)if(o.loadCell(R,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==C||this._workCell.bg!==L){if(R-v>1){const E=this._getJoinedRanges(x,S,w,o,v);for(let T=0;T<E.length;T++)m.push(E[T])}v=R,S=w,C=this._workCell.fg,L=this._workCell.bg}w+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-v>1){const R=this._getJoinedRanges(x,S,w,o,v);for(let E=0;E<R.length;E++)m.push(R[E])}return m}_getJoinedRanges(l,o,m,x,v){const w=l.substring(o,m);let S=[];try{S=this._characterJoiners[0].handler(w)}catch(C){console.error(C)}for(let C=1;C<this._characterJoiners.length;C++)try{const L=this._characterJoiners[C].handler(w);for(let R=0;R<L.length;R++)af._mergeRanges(S,L[R])}catch(L){console.error(L)}return this._stringRangesToCellRanges(S,x,v),S}_stringRangesToCellRanges(l,o,m){let x=0,v=!1,w=0,S=l[x];if(S){for(let C=m;C<this._bufferService.cols;C++){const L=o.getWidth(C),R=o.getString(C).length||g.WHITESPACE_CELL_CHAR.length;if(L!==0){if(!v&&S[0]<=w&&(S[0]=C,v=!0),S[1]<=w){if(S[1]=C,S=l[++x],!S)break;S[0]<=w?(S[0]=C,v=!0):v=!1}w+=R}}S&&(S[1]=this._bufferService.cols)}}static _mergeRanges(l,o){let m=!1;for(let x=0;x<l.length;x++){const v=l[x];if(m){if(o[1]<=v[0])return l[x-1][1]=o[1],l;if(o[1]<=v[1])return l[x-1][1]=Math.max(o[1],v[1]),l.splice(x,1),l;l.splice(x,1),x--}else{if(o[1]<=v[0])return l.splice(x,0,o),l;if(o[1]<=v[1])return v[0]=Math.min(o[0],v[0]),l;o[0]<v[1]&&(v[0]=Math.min(o[0],v[0]),m=!0)}}return m?l[l.length-1][1]=o[1]:l.push(o),l}};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 g 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((l=>this._screenDprMonitor.setWindow(l)))),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=g;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:(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(g){return this.linkProviders.push(g),{dispose:()=>{const b=this.linkProviders.indexOf(g);b!==-1&&this.linkProviders.splice(b,1)}}}}n.LinkProviderService=_},8934:function(j,n,u){var f=this&&this.__decorate||function(y,c,r,h){var l,o=arguments.length,m=o<3?c:h===null?h=Object.getOwnPropertyDescriptor(c,r):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(y,c,r,h);else for(var x=y.length-1;x>=0;x--)(l=y[x])&&(m=(o<3?l(m):o>3?l(c,r,m):l(c,r))||m);return o>3&&m&&Object.defineProperty(c,r,m),m},_=this&&this.__param||function(y,c){return function(r,h){c(r,h,y)}};Object.defineProperty(n,"__esModule",{value:!0}),n.MouseService=void 0;const a=u(4725),g=u(9806);let b=n.MouseService=class{constructor(y,c){this._renderService=y,this._charSizeService=c}getCoords(y,c,r,h,l){return(0,g.getCoords)(window,y,c,r,h,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,l)}getMouseReportCoords(y,c){const r=(0,g.getCoordsRelativeToElement)(window,y,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(j,n,u){var f=this&&this.__decorate||function(l,o,m,x){var v,w=arguments.length,S=w<3?o:x===null?x=Object.getOwnPropertyDescriptor(o,m):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(l,o,m,x);else for(var C=l.length-1;C>=0;C--)(v=l[C])&&(S=(w<3?v(S):w>3?v(o,m,S):v(o,m))||S);return w>3&&S&&Object.defineProperty(o,m,S),S},_=this&&this.__param||function(l,o){return function(m,x){o(m,x,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.RenderService=void 0;const a=u(6193),g=u(4725),b=u(8460),y=u(844),c=u(7226),r=u(2585);let h=n.RenderService=class extends y.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(l,o,m,x,v,w,S,C){super(),this._rowCount=l,this._charSizeService=x,this._renderer=this.register(new y.MutableDisposable),this._pausedResizeTask=new c.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 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,R)=>this._renderRows(L,R)),S),this.register(this._renderDebouncer),this.register(S.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(w.onResize((()=>this._fullRefresh()))),this.register(w.buffers.onBufferActivate((()=>{var L;return(L=this._renderer.value)==null?void 0:L.clear()}))),this.register(m.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(v.onDecorationRegistered((()=>this._fullRefresh()))),this.register(v.onDecorationRemoved((()=>this._fullRefresh()))),this.register(m.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(w.cols,w.rows),this._fullRefresh()}))),this.register(m.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(w.buffer.y,w.buffer.y,!0)))),this.register(C.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(S.window,o),this.register(S.onWindowChange((L=>this._registerIntersectionObserver(L,o))))}_registerIntersectionObserver(l,o){if("IntersectionObserver"in l){const m=new l.IntersectionObserver((x=>this._handleIntersectionChange(x[x.length-1])),{threshold:0});m.observe(o),this._observerDisposable.value=(0,y.toDisposable)((()=>m.disconnect()))}}_handleIntersectionChange(l){this._isPaused=l.isIntersecting===void 0?l.intersectionRatio===0:!l.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(l,o,m=!1){this._isPaused?this._needsFullRefresh=!0:(m||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(l,o,this._rowCount))}_renderRows(l,o){this._renderer.value&&(l=Math.min(l,this._rowCount-1),o=Math.min(o,this._rowCount-1),this._renderer.value.renderRows(l,o),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:l,end:o}),this._onRender.fire({start:l,end:o}),this._isNextRenderRedrawOnly=!0)}resize(l,o){this._rowCount=o,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(l){this._renderer.value=l,this._renderer.value&&(this._renderer.value.onRequestRedraw((o=>this.refreshRows(o.start,o.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(l){return this._renderDebouncer.addRefreshCallback(l)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var l,o;this._renderer.value&&((o=(l=this._renderer.value).clearTextureAtlas)==null||o.call(l),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(l,o){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var m;return(m=this._renderer.value)==null?void 0:m.handleResize(l,o)})):this._renderer.value.handleResize(l,o),this._fullRefresh())}handleCharSizeChanged(){var l;(l=this._renderer.value)==null||l.handleCharSizeChanged()}handleBlur(){var l;(l=this._renderer.value)==null||l.handleBlur()}handleFocus(){var l;(l=this._renderer.value)==null||l.handleFocus()}handleSelectionChanged(l,o,m){var x;this._selectionState.start=l,this._selectionState.end=o,this._selectionState.columnSelectMode=m,(x=this._renderer.value)==null||x.handleSelectionChanged(l,o,m)}handleCursorMove(){var l;(l=this._renderer.value)==null||l.handleCursorMove()}clear(){var l;(l=this._renderer.value)==null||l.clear()}};n.RenderService=h=f([_(2,r.IOptionsService),_(3,g.ICharSizeService),_(4,r.IDecorationService),_(5,r.IBufferService),_(6,g.ICoreBrowserService),_(7,g.IThemeService)],h)},9312:function(j,n,u){var f=this&&this.__decorate||function(S,C,L,R){var E,T=arguments.length,k=T<3?C:R===null?R=Object.getOwnPropertyDescriptor(C,L):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(S,C,L,R);else for(var W=S.length-1;W>=0;W--)(E=S[W])&&(k=(T<3?E(k):T>3?E(C,L,k):E(C,L))||k);return T>3&&k&&Object.defineProperty(C,L,k),k},_=this&&this.__param||function(S,C){return function(L,R){C(L,R,S)}};Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionService=void 0;const a=u(9806),g=u(9504),b=u(456),y=u(4725),c=u(8460),r=u(844),h=u(6114),l=u(4841),o=u(511),m=u(2585),x=" ",v=new RegExp(x,"g");let w=n.SelectionService=class extends r.Disposable{constructor(S,C,L,R,E,T,k,W,U){super(),this._element=S,this._screenElement=C,this._linkifier=L,this._bufferService=R,this._coreService=E,this._mouseService=T,this._optionsService=k,this._renderService=W,this._coreBrowserService=U,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new o.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=P=>this._handleMouseMove(P),this._mouseUpListener=P=>this._handleMouseUp(P),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((P=>this._handleTrim(P))),this.register(this._bufferService.buffers.onBufferActivate((P=>this._handleBufferActivate(P)))),this.enable(),this._model=new 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 S=this._model.finalSelectionStart,C=this._model.finalSelectionEnd;return!(!S||!C||S[0]===C[0]&&S[1]===C[1])}get selectionText(){const S=this._model.finalSelectionStart,C=this._model.finalSelectionEnd;if(!S||!C)return"";const L=this._bufferService.buffer,R=[];if(this._activeSelectionMode===3){if(S[0]===C[0])return"";const E=S[0]<C[0]?S[0]:C[0],T=S[0]<C[0]?C[0]:S[0];for(let k=S[1];k<=C[1];k++){const W=L.translateBufferLineToString(k,!0,E,T);R.push(W)}}else{const E=S[1]===C[1]?C[0]:void 0;R.push(L.translateBufferLineToString(S[1],!0,S[0],E));for(let T=S[1]+1;T<=C[1]-1;T++){const k=L.lines.get(T),W=L.translateBufferLineToString(T,!0);k!=null&&k.isWrapped?R[R.length-1]+=W:R.push(W)}if(S[1]!==C[1]){const T=L.lines.get(C[1]),k=L.translateBufferLineToString(C[1],!0,0,C[0]);T&&T.isWrapped?R[R.length-1]+=k:R.push(k)}}return R.map((E=>E.replace(v," "))).join(h.isWindows?`\r
|
|
54
|
+
`:`
|
|
55
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(S){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),h.isLinux&&S&&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(S){const C=this._getMouseBufferCoords(S),L=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!!(L&&R&&C)&&this._areCoordsInSelection(C,L,R)}isCellInSelection(S,C){const L=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!L||!R)&&this._areCoordsInSelection([S,C],L,R)}_areCoordsInSelection(S,C,L){return S[1]>C[1]&&S[1]<L[1]||C[1]===L[1]&&S[1]===C[1]&&S[0]>=C[0]&&S[0]<L[0]||C[1]<L[1]&&S[1]===L[1]&&S[0]<L[0]||C[1]<L[1]&&S[1]===C[1]&&S[0]>=C[0]}_selectWordAtCursor(S,C){var E,T;const L=(T=(E=this._linkifier.currentLink)==null?void 0:E.link)==null?void 0:T.range;if(L)return this._model.selectionStart=[L.start.x-1,L.start.y-1],this._model.selectionStartLength=(0,l.getRangeLength)(L,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const R=this._getMouseBufferCoords(S);return!!R&&(this._selectWordAt(R,C),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(S,C){this._model.clearSelection(),S=Math.max(S,0),C=Math.min(C,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,S],this._model.selectionEnd=[this._bufferService.cols,C],this.refresh(),this._onSelectionChange.fire()}_handleTrim(S){this._model.handleTrim(S)&&this.refresh()}_getMouseBufferCoords(S){const C=this._mouseService.getCoords(S,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(C)return C[0]--,C[1]--,C[1]+=this._bufferService.buffer.ydisp,C}_getMouseEventScrollAmount(S){let C=(0,a.getCoordsRelativeToElement)(this._coreBrowserService.window,S,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(S){return h.isMac?S.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:S.shiftKey}handleMouseDown(S){if(this._mouseDownTimeStamp=S.timeStamp,(S.button!==2||!this.hasSelection)&&S.button===0){if(!this._enabled){if(!this.shouldForceSelection(S))return;S.stopPropagation()}S.preventDefault(),this._dragScrollAmount=0,this._enabled&&S.shiftKey?this._handleIncrementalClick(S):S.detail===1?this._handleSingleClick(S):S.detail===2?this._handleDoubleClick(S):S.detail===3&&this._handleTripleClick(S),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(S){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(S))}_handleSingleClick(S){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(S)?3:0,this._model.selectionStart=this._getMouseBufferCoords(S),!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(S){this._selectWordAtCursor(S,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(S){const C=this._getMouseBufferCoords(S);C&&(this._activeSelectionMode=2,this._selectLineAt(C[1]))}shouldColumnSelect(S){return S.altKey&&!(h.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(S){if(S.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(S),!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(S),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 R=L.lines.get(this._model.selectionEnd[1]);R&&R.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 S=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(S.ydisp+this._bufferService.rows,S.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=S.ydisp),this.refresh()}}_handleMouseUp(S){const C=S.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&C<500&&S.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const L=this._mouseService.getCoords(S,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(L&&L[0]!==void 0&&L[1]!==void 0){const R=(0,g.moveToCellSequence)(L[0]-1,L[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(R,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const S=this._model.finalSelectionStart,C=this._model.finalSelectionEnd,L=!(!S||!C||S[0]===C[0]&&S[1]===C[1]);L?S&&C&&(this._oldSelectionStart&&this._oldSelectionEnd&&S[0]===this._oldSelectionStart[0]&&S[1]===this._oldSelectionStart[1]&&C[0]===this._oldSelectionEnd[0]&&C[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(S,C,L)):this._oldHasSelection&&this._fireOnSelectionChange(S,C,L)}_fireOnSelectionChange(S,C,L){this._oldSelectionStart=S,this._oldSelectionEnd=C,this._oldHasSelection=L,this._onSelectionChange.fire()}_handleBufferActivate(S){this.clearSelection(),this._trimListener.dispose(),this._trimListener=S.activeBuffer.lines.onTrim((C=>this._handleTrim(C)))}_convertViewportColToCharacterIndex(S,C){let L=C;for(let R=0;C>=R;R++){const E=S.loadCell(R,this._workCell).getChars().length;this._workCell.getWidth()===0?L--:E>1&&C!==R&&(L+=E-1)}return L}setSelection(S,C,L){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[S,C],this._model.selectionStartLength=L,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(S){this._isClickInSelection(S)||(this._selectWordAtCursor(S,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(S,C,L=!0,R=!0){if(S[0]>=this._bufferService.cols)return;const E=this._bufferService.buffer,T=E.lines.get(S[1]);if(!T)return;const k=E.translateBufferLineToString(S[1],!1);let W=this._convertViewportColToCharacterIndex(T,S[0]),U=W;const P=S[0]-W;let F=0,D=0,O=0,M=0;if(k.charAt(W)===" "){for(;W>0&&k.charAt(W-1)===" ";)W--;for(;U<k.length&&k.charAt(U+1)===" ";)U++}else{let K=S[0],ce=S[0];T.getWidth(K)===0&&(F++,K--),T.getWidth(ce)===2&&(D++,ce++);const oe=T.getString(ce).length;for(oe>1&&(M+=oe-1,U+=oe-1);K>0&&W>0&&!this._isCharWordSeparator(T.loadCell(K-1,this._workCell));){T.loadCell(K-1,this._workCell);const q=this._workCell.getChars().length;this._workCell.getWidth()===0?(F++,K--):q>1&&(O+=q-1,W-=q-1),W--,K--}for(;ce<T.length&&U+1<k.length&&!this._isCharWordSeparator(T.loadCell(ce+1,this._workCell));){T.loadCell(ce+1,this._workCell);const q=this._workCell.getChars().length;this._workCell.getWidth()===2?(D++,ce++):q>1&&(M+=q-1,U+=q-1),U++,ce++}}U++;let H=W+P-F+O,$=Math.min(this._bufferService.cols,U-W+F+D-O-M);if(C||k.slice(W,U).trim()!==""){if(L&&H===0&&T.getCodePoint(0)!==32){const K=E.lines.get(S[1]-1);if(K&&T.isWrapped&&K.getCodePoint(this._bufferService.cols-1)!==32){const ce=this._getWordAt([this._bufferService.cols-1,S[1]-1],!1,!0,!1);if(ce){const oe=this._bufferService.cols-ce.start;H-=oe,$+=oe}}}if(R&&H+$===this._bufferService.cols&&T.getCodePoint(this._bufferService.cols-1)!==32){const K=E.lines.get(S[1]+1);if(K!=null&&K.isWrapped&&K.getCodePoint(0)!==32){const ce=this._getWordAt([0,S[1]+1],!1,!1,!0);ce&&($+=ce.length)}}return{start:H,length:$}}}_selectWordAt(S,C){const L=this._getWordAt(S,C);if(L){for(;L.start<0;)L.start+=this._bufferService.cols,S[1]--;this._model.selectionStart=[L.start,S[1]],this._model.selectionStartLength=L.length}}_selectToWordAt(S){const C=this._getWordAt(S,!0);if(C){let L=S[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(S){return S.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(S.getChars())>=0}_selectLineAt(S){const C=this._bufferService.buffer.getWrappedRangeForLine(S),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,l.getRangeLength)(L,this._bufferService.cols)}};n.SelectionService=w=f([_(3,m.IBufferService),_(4,m.ICoreService),_(5,y.IMouseService),_(6,m.IOptionsService),_(7,y.IRenderService),_(8,y.ICoreBrowserService)],w)},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(w,S,C,L){var R,E=arguments.length,T=E<3?S:L===null?L=Object.getOwnPropertyDescriptor(S,C):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(w,S,C,L);else for(var k=w.length-1;k>=0;k--)(R=w[k])&&(T=(E<3?R(T):E>3?R(S,C,T):R(S,C))||T);return E>3&&T&&Object.defineProperty(S,C,T),T},_=this&&this.__param||function(w,S){return function(C,L){S(C,L,w)}};Object.defineProperty(n,"__esModule",{value:!0}),n.ThemeService=n.DEFAULT_ANSI_COLORS=void 0;const a=u(7239),g=u(8055),b=u(8460),y=u(844),c=u(2585),r=g.css.toColor("#ffffff"),h=g.css.toColor("#000000"),l=g.css.toColor("#ffffff"),o=g.css.toColor("#000000"),m={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};n.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const w=[g.css.toColor("#2e3436"),g.css.toColor("#cc0000"),g.css.toColor("#4e9a06"),g.css.toColor("#c4a000"),g.css.toColor("#3465a4"),g.css.toColor("#75507b"),g.css.toColor("#06989a"),g.css.toColor("#d3d7cf"),g.css.toColor("#555753"),g.css.toColor("#ef2929"),g.css.toColor("#8ae234"),g.css.toColor("#fce94f"),g.css.toColor("#729fcf"),g.css.toColor("#ad7fa8"),g.css.toColor("#34e2e2"),g.css.toColor("#eeeeec")],S=[0,95,135,175,215,255];for(let C=0;C<216;C++){const L=S[C/36%6|0],R=S[C/6%6|0],E=S[C%6];w.push({css:g.channels.toCss(L,R,E),rgba:g.channels.toRgba(L,R,E)})}for(let C=0;C<24;C++){const L=8+10*C;w.push({css:g.channels.toCss(L,L,L),rgba:g.channels.toRgba(L,L,L)})}return w})());let x=n.ThemeService=class extends y.Disposable{get colors(){return this._colors}constructor(w){super(),this._optionsService=w,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:l,cursorAccent:o,selectionForeground:void 0,selectionBackgroundTransparent:m,selectionBackgroundOpaque:g.color.blend(h,m),selectionInactiveBackgroundTransparent:m,selectionInactiveBackgroundOpaque:g.color.blend(h,m),ansi:n.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(w={}){const S=this._colors;if(S.foreground=v(w.foreground,r),S.background=v(w.background,h),S.cursor=v(w.cursor,l),S.cursorAccent=v(w.cursorAccent,o),S.selectionBackgroundTransparent=v(w.selectionBackground,m),S.selectionBackgroundOpaque=g.color.blend(S.background,S.selectionBackgroundTransparent),S.selectionInactiveBackgroundTransparent=v(w.selectionInactiveBackground,S.selectionBackgroundTransparent),S.selectionInactiveBackgroundOpaque=g.color.blend(S.background,S.selectionInactiveBackgroundTransparent),S.selectionForeground=w.selectionForeground?v(w.selectionForeground,g.NULL_COLOR):void 0,S.selectionForeground===g.NULL_COLOR&&(S.selectionForeground=void 0),g.color.isOpaque(S.selectionBackgroundTransparent)&&(S.selectionBackgroundTransparent=g.color.opacity(S.selectionBackgroundTransparent,.3)),g.color.isOpaque(S.selectionInactiveBackgroundTransparent)&&(S.selectionInactiveBackgroundTransparent=g.color.opacity(S.selectionInactiveBackgroundTransparent,.3)),S.ansi=n.DEFAULT_ANSI_COLORS.slice(),S.ansi[0]=v(w.black,n.DEFAULT_ANSI_COLORS[0]),S.ansi[1]=v(w.red,n.DEFAULT_ANSI_COLORS[1]),S.ansi[2]=v(w.green,n.DEFAULT_ANSI_COLORS[2]),S.ansi[3]=v(w.yellow,n.DEFAULT_ANSI_COLORS[3]),S.ansi[4]=v(w.blue,n.DEFAULT_ANSI_COLORS[4]),S.ansi[5]=v(w.magenta,n.DEFAULT_ANSI_COLORS[5]),S.ansi[6]=v(w.cyan,n.DEFAULT_ANSI_COLORS[6]),S.ansi[7]=v(w.white,n.DEFAULT_ANSI_COLORS[7]),S.ansi[8]=v(w.brightBlack,n.DEFAULT_ANSI_COLORS[8]),S.ansi[9]=v(w.brightRed,n.DEFAULT_ANSI_COLORS[9]),S.ansi[10]=v(w.brightGreen,n.DEFAULT_ANSI_COLORS[10]),S.ansi[11]=v(w.brightYellow,n.DEFAULT_ANSI_COLORS[11]),S.ansi[12]=v(w.brightBlue,n.DEFAULT_ANSI_COLORS[12]),S.ansi[13]=v(w.brightMagenta,n.DEFAULT_ANSI_COLORS[13]),S.ansi[14]=v(w.brightCyan,n.DEFAULT_ANSI_COLORS[14]),S.ansi[15]=v(w.brightWhite,n.DEFAULT_ANSI_COLORS[15]),w.extendedAnsi){const C=Math.min(S.ansi.length-16,w.extendedAnsi.length);for(let L=0;L<C;L++)S.ansi[L+16]=v(w.extendedAnsi[L],n.DEFAULT_ANSI_COLORS[L+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(w){this._restoreColor(w),this._onChangeColors.fire(this.colors)}_restoreColor(w){if(w!==void 0)switch(w){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[w]=this._restoreColors.ansi[w]}else for(let S=0;S<this._restoreColors.ansi.length;++S)this._colors.ansi[S]=this._restoreColors.ansi[S]}modifyColors(w){w(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(w,S){if(w!==void 0)try{return g.css.toColor(w)}catch{}return S}n.ThemeService=x=f([_(0,c.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(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 y=new Array(b);for(let c=0;c<Math.min(b,this.length);c++)y[c]=this._array[this._getCyclicIndex(c)];this._array=y,this._maxLength=b,this._startIndex=0}get length(){return this._length}set length(b){if(b>this._length)for(let y=this._length;y<b;y++)this._array[y]=void 0;this._length=b}get(b){return this._array[this._getCyclicIndex(b)]}set(b,y){this._array[this._getCyclicIndex(b)]=y}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,y,...c){if(y){for(let r=b;r<this._length-y;r++)this._array[this._getCyclicIndex(r)]=this._array[this._getCyclicIndex(r+y)];this._length-=y,this.onDeleteEmitter.fire({index:b,amount:y})}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,y,c){if(!(y<=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=y-1;h>=0;h--)this.set(b+h+c,this.get(b+h));const r=b+y+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<y;r++)this.set(b+r+c,this.get(b+r))}}_getCyclicIndex(b){return(this._startIndex+b)%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 g in f)a[g]=_<=1?f[g]:f[g]&&u(f[g],_-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 g,b,y,c,r;function h(o){const m=o.toString(16);return m.length<2?"0"+m:m}function l(o,m){return o<m?(m+.05)/(o+.05):(o+.05)/(m+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(o){o.toCss=function(m,x,v,w){return w!==void 0?`#${h(m)}${h(x)}${h(v)}${h(w)}`:`#${h(m)}${h(x)}${h(v)}`},o.toRgba=function(m,x,v,w=255){return(m<<24|x<<16|v<<8|w)>>>0},o.toColor=function(m,x,v,w){return{css:o.toCss(m,x,v,w),rgba:o.toRgba(m,x,v,w)}}})(g||(n.channels=g={})),(function(o){function m(x,v){return a=Math.round(255*v),[u,f,_]=r.toChannels(x.rgba),{css:g.toCss(u,f,_,a),rgba:g.toRgba(u,f,_,a)}}o.blend=function(x,v){if(a=(255&v.rgba)/255,a===1)return{css:v.css,rgba:v.rgba};const w=v.rgba>>24&255,S=v.rgba>>16&255,C=v.rgba>>8&255,L=x.rgba>>24&255,R=x.rgba>>16&255,E=x.rgba>>8&255;return u=L+Math.round((w-L)*a),f=R+Math.round((S-R)*a),_=E+Math.round((C-E)*a),{css:g.toCss(u,f,_),rgba:g.toRgba(u,f,_)}},o.isOpaque=function(x){return(255&x.rgba)==255},o.ensureContrastRatio=function(x,v,w){const S=r.ensureContrastRatio(x.rgba,v.rgba,w);if(S)return g.toColor(S>>24&255,S>>16&255,S>>8&255)},o.opaque=function(x){const v=(255|x.rgba)>>>0;return[u,f,_]=r.toChannels(v),{css:g.toCss(u,f,_),rgba:v}},o.opacity=m,o.multiplyOpacity=function(x,v){return a=255&x.rgba,m(x,a*v/255)},o.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(b||(n.color=b={})),(function(o){let m,x;try{const v=document.createElement("canvas");v.width=1,v.height=1;const w=v.getContext("2d",{willReadFrequently:!0});w&&(m=w,m.globalCompositeOperation="copy",x=m.createLinearGradient(0,0,1,1))}catch{}o.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),g.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),g.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 w=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(w)return u=parseInt(w[1]),f=parseInt(w[2]),_=parseInt(w[3]),a=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),g.toColor(u,f,_,a);if(!m||!x)throw new Error("css.toColor: Unsupported css format");if(m.fillStyle=x,m.fillStyle=v,typeof m.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(m.fillRect(0,0,1,1),[u,f,_,a]=m.getImageData(0,0,1,1).data,a!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(u,f,_,a),css:v}}})(y||(n.css=y={})),(function(o){function m(x,v,w){const S=x/255,C=v/255,L=w/255;return .2126*(S<=.03928?S/12.92:Math.pow((S+.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))}o.relativeLuminance=function(x){return m(x>>16&255,x>>8&255,255&x)},o.relativeLuminance2=m})(c||(n.rgb=c={})),(function(o){function m(v,w,S){const C=v>>24&255,L=v>>16&255,R=v>>8&255;let E=w>>24&255,T=w>>16&255,k=w>>8&255,W=l(c.relativeLuminance2(E,T,k),c.relativeLuminance2(C,L,R));for(;W<S&&(E>0||T>0||k>0);)E-=Math.max(0,Math.ceil(.1*E)),T-=Math.max(0,Math.ceil(.1*T)),k-=Math.max(0,Math.ceil(.1*k)),W=l(c.relativeLuminance2(E,T,k),c.relativeLuminance2(C,L,R));return(E<<24|T<<16|k<<8|255)>>>0}function x(v,w,S){const C=v>>24&255,L=v>>16&255,R=v>>8&255;let E=w>>24&255,T=w>>16&255,k=w>>8&255,W=l(c.relativeLuminance2(E,T,k),c.relativeLuminance2(C,L,R));for(;W<S&&(E<255||T<255||k<255);)E=Math.min(255,E+Math.ceil(.1*(255-E))),T=Math.min(255,T+Math.ceil(.1*(255-T))),k=Math.min(255,k+Math.ceil(.1*(255-k))),W=l(c.relativeLuminance2(E,T,k),c.relativeLuminance2(C,L,R));return(E<<24|T<<16|k<<8|255)>>>0}o.blend=function(v,w){if(a=(255&w)/255,a===1)return w;const S=w>>24&255,C=w>>16&255,L=w>>8&255,R=v>>24&255,E=v>>16&255,T=v>>8&255;return u=R+Math.round((S-R)*a),f=E+Math.round((C-E)*a),_=T+Math.round((L-T)*a),g.toRgba(u,f,_)},o.ensureContrastRatio=function(v,w,S){const C=c.relativeLuminance(v>>8),L=c.relativeLuminance(w>>8);if(l(C,L)<S){if(L<C){const T=m(v,w,S),k=l(C,c.relativeLuminance(T>>8));if(k<S){const W=x(v,w,S);return k>l(C,c.relativeLuminance(W>>8))?T:W}return T}const R=x(v,w,S),E=l(C,c.relativeLuminance(R>>8));if(E<S){const T=m(v,w,S);return E>l(C,c.relativeLuminance(T>>8))?R:T}return R}},o.reduceLuminance=m,o.increaseLuminance=x,o.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=l},8969:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreTerminal=void 0;const f=u(844),_=u(2585),a=u(4348),g=u(7866),b=u(744),y=u(7302),c=u(6975),r=u(8460),h=u(1753),l=u(1480),o=u(7994),m=u(9282),x=u(5435),v=u(5981),w=u(2660);let S=!1;class C extends f.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new r.EventEmitter),this._onScroll.event((R=>{var E;(E=this._onScrollApi)==null||E.fire(R.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(R){for(const E in R)this.optionsService.options[E]=R[E]}constructor(R){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(R)),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(g.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(l.UnicodeService)),this._instantiationService.setService(_.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(o.CharsetService),this._instantiationService.setService(_.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(w.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,T)=>this._inputHandler.parse(E,T)))),this.register((0,r.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(R,E){this._writeBuffer.write(R,E)}writeSync(R,E){this._logService.logLevel<=_.LogLevelEnum.WARN&&!S&&(this._logService.warn("writeSync is unreliable and will be removed soon."),S=!0),this._writeBuffer.writeSync(R,E)}input(R,E=!0){this.coreService.triggerDataEvent(R,E)}resize(R,E){isNaN(R)||isNaN(E)||(R=Math.max(R,b.MINIMUM_COLS),E=Math.max(E,b.MINIMUM_ROWS),this._bufferService.resize(R,E))}scroll(R,E=!1){this._bufferService.scroll(R,E)}scrollLines(R,E,T){this._bufferService.scrollLines(R,E,T)}scrollPages(R){this.scrollLines(R*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(R){const E=R-this._bufferService.buffer.ydisp;E!==0&&this.scrollLines(E)}registerEscHandler(R,E){return this._inputHandler.registerEscHandler(R,E)}registerDcsHandler(R,E){return this._inputHandler.registerDcsHandler(R,E)}registerCsiHandler(R,E){return this._inputHandler.registerCsiHandler(R,E)}registerOscHandler(R,E){return this._inputHandler.registerOscHandler(R,E)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let R=!1;const E=this.optionsService.rawOptions.windowsPty;E&&E.buildNumber!==void 0&&E.buildNumber!==void 0?R=E.backend==="conpty"&&E.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(R=!0),R?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const R=[];R.push(this.onLineFeed(m.updateWindowsModeWrappedState.bind(null,this._bufferService))),R.push(this.registerCsiHandler({final:"H"},(()=>((0,m.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,f.toDisposable)((()=>{for(const E of R)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,M){var H,$=arguments.length,K=$<3?D:M===null?M=Object.getOwnPropertyDescriptor(D,O):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")K=Reflect.decorate(F,D,O,M);else for(var ce=F.length-1;ce>=0;ce--)(H=F[ce])&&(K=($<3?H(K):$>3?H(D,O,K):H(D,O))||K);return $>3&&K&&Object.defineProperty(D,O,K),K},_=this&&this.__param||function(F,D){return function(O,M){D(O,M,F)}};Object.defineProperty(n,"__esModule",{value:!0}),n.InputHandler=n.WindowsOptionsReportType=void 0;const a=u(2584),g=u(7116),b=u(2015),y=u(844),c=u(482),r=u(8437),h=u(8460),l=u(643),o=u(511),m=u(3734),x=u(2585),v=u(1480),w=u(6242),S=u(6351),C=u(5941),L={"(":0,")":1,"*":2,"+":3,"-":1,".":2},R=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 T;(function(F){F[F.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",F[F.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(T||(n.WindowsOptionsReportType=T={}));let k=0;class W extends y.Disposable{getAttrData(){return this._curAttrData}constructor(D,O,M,H,$,K,ce,oe,q=new b.EscapeSequenceParser){super(),this._bufferService=D,this._charsetService=O,this._coreService=M,this._logService=H,this._optionsService=$,this._oscLinkService=K,this._coreMouseService=ce,this._unicodeService=oe,this._parser=q,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new c.StringToUtf32,this._utf8Decoder=new c.Utf8ToUtf32,this._workCell=new o.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 U(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((z=>this._activeBuffer=z.activeBuffer))),this._parser.setCsiHandlerFallback(((z,te)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(z),params:te.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,te,J)=>{this._logService.debug("Unknown OSC code: ",{identifier:z,action:te,data:J})})),this._parser.setDcsHandlerFallback(((z,te,J)=>{te==="HOOK"&&(J=J.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(z),action:te,payload:J})})),this._parser.setPrintHandler(((z,te,J)=>this.print(z,te,J))),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 w.OscHandler((z=>(this.setTitle(z),this.setIconName(z),!0)))),this._parser.registerOscHandler(1,new w.OscHandler((z=>this.setIconName(z)))),this._parser.registerOscHandler(2,new w.OscHandler((z=>this.setTitle(z)))),this._parser.registerOscHandler(4,new w.OscHandler((z=>this.setOrReportIndexedColor(z)))),this._parser.registerOscHandler(8,new w.OscHandler((z=>this.setHyperlink(z)))),this._parser.registerOscHandler(10,new w.OscHandler((z=>this.setOrReportFgColor(z)))),this._parser.registerOscHandler(11,new w.OscHandler((z=>this.setOrReportBgColor(z)))),this._parser.registerOscHandler(12,new w.OscHandler((z=>this.setOrReportCursorColor(z)))),this._parser.registerOscHandler(104,new w.OscHandler((z=>this.restoreIndexedColor(z)))),this._parser.registerOscHandler(110,new w.OscHandler((z=>this.restoreFgColor(z)))),this._parser.registerOscHandler(111,new w.OscHandler((z=>this.restoreBgColor(z)))),this._parser.registerOscHandler(112,new w.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 g.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 S.DcsHandler(((z,te)=>this.requestStatusString(z,te))))}_preserveStack(D,O,M,H){this._parseStack.paused=!0,this._parseStack.cursorStartX=D,this._parseStack.cursorStartY=O,this._parseStack.decodedLength=M,this._parseStack.position=H}_logSlowResolvingAsync(D){this._logService.logLevel<=x.LogLevelEnum.WARN&&Promise.race([D,new Promise(((O,M)=>setTimeout((()=>M("#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 M,H=this._activeBuffer.x,$=this._activeBuffer.y,K=0;const ce=this._parseStack.paused;if(ce){if(M=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,O))return this._logSlowResolvingAsync(M),M;H=this._parseStack.cursorStartX,$=this._parseStack.cursorStartY,this._parseStack.paused=!1,D.length>R&&(K=this._parseStack.position+R)}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<R&&(this._parseBuffer=new Uint32Array(Math.min(D.length,R))),ce||this._dirtyRowTracker.clearRange(),D.length>R)for(let z=K;z<D.length;z+=R){const te=z+R<D.length?z+R:D.length,J=typeof D=="string"?this._stringDecoder.decode(D.substring(z,te),this._parseBuffer):this._utf8Decoder.decode(D.subarray(z,te),this._parseBuffer);if(M=this._parser.parse(this._parseBuffer,J))return this._preserveStack(H,$,J,z),this._logSlowResolvingAsync(M),M}else if(!ce){const z=typeof D=="string"?this._stringDecoder.decode(D,this._parseBuffer):this._utf8Decoder.decode(D,this._parseBuffer);if(M=this._parser.parse(this._parseBuffer,z))return this._preserveStack(H,$,z,0),this._logSlowResolvingAsync(M),M}this._activeBuffer.x===H&&this._activeBuffer.y===$||this._onCursorMove.fire();const oe=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(oe,this._bufferService.rows-1))}print(D,O,M){let H,$;const K=this._charsetService.charset,ce=this._optionsService.rawOptions.screenReaderMode,oe=this._bufferService.cols,q=this._coreService.decPrivateModes.wraparound,z=this._coreService.modes.insertMode,te=this._curAttrData;let J=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&M-O>0&&J.getWidth(this._activeBuffer.x-1)===2&&J.setCellFromCodepoint(this._activeBuffer.x-1,0,1,te);let _e=this._parser.precedingJoinState;for(let fe=O;fe<M;++fe){if(H=D[fe],H<127&&K){const qe=K[String.fromCharCode(H)];qe&&(H=qe.charCodeAt(0))}const Me=this._unicodeService.charProperties(H,_e);$=v.UnicodeService.extractWidth(Me);const ve=v.UnicodeService.extractShouldJoin(Me),Oe=ve?v.UnicodeService.extractWidth(_e):0;if(_e=Me,ce&&this._onA11yChar.fire((0,c.stringFromCodePoint)(H)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+$-Oe>oe){if(q){const qe=J;let we=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),J=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Oe>0&&J instanceof r.BufferLine&&J.copyCellsFrom(qe,we,0,Oe,!1);we<oe;)qe.setCellFromCodepoint(we++,0,1,te)}else if(this._activeBuffer.x=oe-1,$===2)continue}if(ve&&this._activeBuffer.x){const qe=J.getWidth(this._activeBuffer.x-1)?1:2;J.addCodepointToCell(this._activeBuffer.x-qe,H,$);for(let we=$-Oe;--we>=0;)J.setCellFromCodepoint(this._activeBuffer.x++,0,0,te)}else if(z&&(J.insertCells(this._activeBuffer.x,$-Oe,this._activeBuffer.getNullCell(te)),J.getWidth(oe-1)===2&&J.setCellFromCodepoint(oe-1,l.NULL_CELL_CODE,l.NULL_CELL_WIDTH,te)),J.setCellFromCodepoint(this._activeBuffer.x++,H,$,te),$>0)for(;--$;)J.setCellFromCodepoint(this._activeBuffer.x++,0,0,te)}this._parser.precedingJoinState=_e,this._activeBuffer.x<oe&&M-O>0&&J.getWidth(this._activeBuffer.x)===0&&!J.hasContent(this._activeBuffer.x)&&J.setCellFromCodepoint(this._activeBuffer.x,0,1,te),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,(M=>!E(M.params[0],this._optionsService.rawOptions.windowOptions)||O(M)))}registerDcsHandler(D,O){return this._parser.registerDcsHandler(D,new S.DcsHandler(O))}registerEscHandler(D,O){return this._parser.registerEscHandler(D,O)}registerOscHandler(D,O){return this._parser.registerOscHandler(D,new w.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,M,H=!1,$=!1){const K=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);K.replaceCells(O,M,this._activeBuffer.getNullCell(this._eraseAttrData()),$),H&&(K.isWrapped=!1)}_resetBufferLine(D,O=!1){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);M&&(M.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),O),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+D),M.isWrapped=!1)}eraseInDisplay(D,O=!1){let M;switch(this._restrictCursor(this._bufferService.cols),D.params[0]){case 0:for(M=this._activeBuffer.y,this._dirtyRowTracker.markDirty(M),this._eraseInBufferLine(M++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,O);M<this._bufferService.rows;M++)this._resetBufferLine(M,O);this._dirtyRowTracker.markDirty(M);break;case 1:for(M=this._activeBuffer.y,this._dirtyRowTracker.markDirty(M),this._eraseInBufferLine(M,0,this._activeBuffer.x+1,!0,O),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(M+1).isWrapped=!1);M--;)this._resetBufferLine(M,O);this._dirtyRowTracker.markDirty(0);break;case 2:for(M=this._bufferService.rows,this._dirtyRowTracker.markDirty(M-1);M--;)this._resetBufferLine(M,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 M=this._activeBuffer.ybase+this._activeBuffer.y,H=this._bufferService.rows-1-this._activeBuffer.scrollBottom,$=this._bufferService.rows-1+this._activeBuffer.ybase-H+1;for(;O--;)this._activeBuffer.lines.splice($-1,1),this._activeBuffer.lines.splice(M,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 M=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(M,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 M=this._activeBuffer.scrollTop;M<=this._activeBuffer.scrollBottom;++M){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);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 M=this._activeBuffer.scrollTop;M<=this._activeBuffer.scrollBottom;++M){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);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 M=this._activeBuffer.scrollTop;M<=this._activeBuffer.scrollBottom;++M){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);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 M=this._activeBuffer.scrollTop;M<=this._activeBuffer.scrollBottom;++M){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+M);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 M=D.params[0]||1,H=v.UnicodeService.extractWidth(O),$=this._activeBuffer.x-H,K=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString($),ce=new Uint32Array(K.length*M);let oe=0;for(let z=0;z<K.length;){const te=K.codePointAt(z)||0;ce[oe++]=te,z+=te>65535?2:1}let q=oe;for(let z=1;z<M;++z)ce.copyWithin(q,0,oe),q+=oe;return this.print(ce,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,g.DEFAULT_CHARSET),this._charsetService.setgCharset(1,g.DEFAULT_CHARSET),this._charsetService.setgCharset(2,g.DEFAULT_CHARSET),this._charsetService.setgCharset(3,g.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(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 M=this._coreService.decPrivateModes,{activeProtocol:H,activeEncoding:$}=this._coreMouseService,K=this._coreService,{buffers:ce,cols:oe}=this._bufferService,{active:q,alt:z}=ce,te=this._optionsService.rawOptions,J=ve=>ve?1:2,_e=D.params[0];return fe=_e,Me=O?_e===2?4:_e===4?J(K.modes.insertMode):_e===12?3:_e===20?J(te.convertEol):0:_e===1?J(M.applicationCursorKeys):_e===3?te.windowOptions.setWinLines?oe===80?2:oe===132?1:0:0:_e===6?J(M.origin):_e===7?J(M.wraparound):_e===8?3:_e===9?J(H==="X10"):_e===12?J(te.cursorBlink):_e===25?J(!K.isCursorHidden):_e===45?J(M.reverseWraparound):_e===66?J(M.applicationKeypad):_e===67?4:_e===1e3?J(H==="VT200"):_e===1002?J(H==="DRAG"):_e===1003?J(H==="ANY"):_e===1004?J(M.sendFocus):_e===1005?4:_e===1006?J($==="SGR"):_e===1015?4:_e===1016?J($==="SGR_PIXELS"):_e===1048?1:_e===47||_e===1047||_e===1049?J(q===z):_e===2004?J(M.bracketedPasteMode):0,K.triggerDataEvent(`${a.C0.ESC}[${O?"":"?"}${fe};${Me}$y`),!0;var fe,Me}_updateAttrColor(D,O,M,H,$){return O===2?(D|=50331648,D&=-16777216,D|=m.AttributeData.fromColorRGB([M,H,$])):O===5&&(D&=-50331904,D|=33554432|255&M),D}_extractColor(D,O,M){const H=[0,0,-1,0,0,0];let $=0,K=0;do{if(H[K+$]=D.params[O+K],D.hasSubParams(O+K)){const ce=D.getSubParams(O+K);let oe=0;do H[1]===5&&($=1),H[K+oe+1+$]=ce[oe];while(++oe<ce.length&&oe+K+1+$<H.length);break}if(H[1]===5&&K+$>=2||H[1]===2&&K+$>=5)break;H[1]&&($=1)}while(++K+O<D.length&&K+$<H.length);for(let ce=2;ce<H.length;++ce)H[ce]===-1&&(H[ce]=0);switch(H[0]){case 38:M.fg=this._updateAttrColor(M.fg,H[1],H[3],H[4],H[5]);break;case 48:M.bg=this._updateAttrColor(M.bg,H[1],H[3],H[4],H[5]);break;case 58:M.extended=M.extended.clone(),M.extended.underlineColor=this._updateAttrColor(M.extended.underlineColor,H[1],H[3],H[4],H[5])}return K}_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 M;const H=this._curAttrData;for(let $=0;$<O;$++)M=D.params[$],M>=30&&M<=37?(H.fg&=-50331904,H.fg|=16777216|M-30):M>=40&&M<=47?(H.bg&=-50331904,H.bg|=16777216|M-40):M>=90&&M<=97?(H.fg&=-50331904,H.fg|=16777224|M-90):M>=100&&M<=107?(H.bg&=-50331904,H.bg|=16777224|M-100):M===0?this._processSGR0(H):M===1?H.fg|=134217728:M===3?H.bg|=67108864:M===4?(H.fg|=268435456,this._processUnderline(D.hasSubParams($)?D.getSubParams($)[0]:1,H)):M===5?H.fg|=536870912:M===7?H.fg|=67108864:M===8?H.fg|=1073741824:M===9?H.fg|=2147483648:M===2?H.bg|=134217728:M===21?this._processUnderline(2,H):M===22?(H.fg&=-134217729,H.bg&=-134217729):M===23?H.bg&=-67108865:M===24?(H.fg&=-268435457,this._processUnderline(0,H)):M===25?H.fg&=-536870913:M===27?H.fg&=-67108865:M===28?H.fg&=-1073741825:M===29?H.fg&=2147483647:M===39?(H.fg&=-67108864,H.fg|=16777215&r.DEFAULT_ATTR_DATA.fg):M===49?(H.bg&=-67108864,H.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):M===38||M===48||M===58?$+=this._extractColor(D,$,H):M===53?H.bg|=1073741824:M===55?H.bg&=-1073741825:M===59?(H.extended=H.extended.clone(),H.extended.underlineColor=-1,H.updateExtended()):M===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.",M);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,M=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${a.C0.ESC}[${O};${M}R`)}return!0}deviceStatusPrivate(D){if(D.params[0]===6){const O=this._activeBuffer.y+1,M=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${a.C0.ESC}[?${O};${M}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 M=O%2==1;return this._optionsService.options.cursorBlink=M,!0}setScrollRegion(D){const O=D.params[0]||1;let M;return(D.length<2||(M=D.params[1])>this._bufferService.rows||M===0)&&(M=this._bufferService.rows),M>O&&(this._activeBuffer.scrollTop=O-1,this._activeBuffer.scrollBottom=M-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(T.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(T.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=[],M=D.split(";");for(;M.length>1;){const H=M.shift(),$=M.shift();if(/^\d+$/.exec(H)){const K=parseInt(H);if(P(K))if($==="?")O.push({type:0,index:K});else{const ce=(0,C.parseColor)($);ce&&O.push({type:1,index:K,color:ce})}}}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 M=D.split(":");let H;const $=M.findIndex((K=>K.startsWith("id=")));return $!==-1&&(H=M[$].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 M=D.split(";");for(let H=0;H<M.length&&!(O>=this._specialColors.length);++H,++O)if(M[H]==="?")this._onColor.fire([{type:0,index:this._specialColors[O]}]);else{const $=(0,C.parseColor)(M[H]);$&&this._onColor.fire([{type:1,index:this._specialColors[O],color:$}])}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=[],M=D.split(";");for(let H=0;H<M.length;++H)if(/^\d+$/.exec(M[H])){const $=parseInt(M[H]);P($)&&O.push({type:2,index:$})}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,g.DEFAULT_CHARSET),!0}selectCharset(D){return D.length!==2?(this.selectDefaultCharset(),!0):(D[0]==="/"||this._charsetService.setgCharset(L[D[0]],g.CHARSETS[D[1]]||g.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const 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 o.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 M=this._activeBuffer.ybase+this._activeBuffer.y+O,H=this._activeBuffer.lines.get(M);H&&(H.fill(D),H.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(D,O){const M=this._bufferService.buffer,H=this._optionsService.rawOptions;return($=>(this._coreService.triggerDataEvent(`${a.C0.ESC}${$}${a.C0.ESC}\\`),!0))(D==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:D==='"p'?'P1$r61;1"p':D==="r"?`P1$r${M.scrollTop+1};${M.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=W;let U=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&&(k=F,F=D,D=k),F<this.start&&(this.start=F),D>this.end&&(this.end=D)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function P(F){return 0<=F&&F<256}U=f([_(0,x.IBufferService)],U)},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,g){this._data[_]||(this._data[_]={}),this._data[_][a]=g}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,g,b){this._data.get(f,_)||this._data.set(f,_,new u),this._data.get(f,_).set(a,g,b)}get(f,_,a,g){var b;return(b=this._data.get(f,_))==null?void 0:b.get(a,g)}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 g=_+a>>1;const b=this._getKey(this._array[g]);if(b>f)a=g-1;else{if(!(b<f)){for(;g>0&&this._getKey(this._array[g-1])===f;)g--;return g}_=g+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(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 y=0,c=0,r=b.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),c=Math.max(y,c),h=b.timeRemaining(),1.5*c>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(b){return setTimeout((()=>b(this._createDeadline(16))))}_cancelCallback(b){clearTimeout(b)}_createDeadline(b){const y=Date.now()+b;return{timeRemaining:()=>Math.max(0,y-Date.now())}}}n.PriorityTaskQueue=a,n.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:a,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}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),g=a==null?void 0:a.get(_.cols-1),b=_.buffer.lines.get(_.buffer.ybase+_.buffer.y);b&&g&&(b.isWrapped=g[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&g[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,g=0){this._ext=0,this._urlId=0,this._ext=a,this._urlId=g}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),g=u(8437),b=u(4634),y=u(511),c=u(643),r=u(4863),h=u(7116);n.MAX_BUFFER_SIZE=4294967295,n.Buffer=class{constructor(l,o,m){this._hasScrollback=l,this._optionsService=o,this._bufferService=m,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=g.DEFAULT_ATTR_DATA.clone(),this.savedCharset=h.DEFAULT_CHARSET,this.markers=[],this._nullCell=y.CellData.fromCharData([0,c.NULL_CELL_CHAR,c.NULL_CELL_WIDTH,c.NULL_CELL_CODE]),this._whitespaceCell=y.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(l){return l?(this._nullCell.fg=l.fg,this._nullCell.bg=l.bg,this._nullCell.extended=l.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new a.ExtendedAttrs),this._nullCell}getWhitespaceCell(l){return l?(this._whitespaceCell.fg=l.fg,this._whitespaceCell.bg=l.bg,this._whitespaceCell.extended=l.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new a.ExtendedAttrs),this._whitespaceCell}getBlankLine(l,o){return new g.BufferLine(this._bufferService.cols,this.getNullCell(l),o)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const l=this.ybase+this.y-this.ydisp;return l>=0&&l<this._rows}_getCorrectBufferLength(l){if(!this._hasScrollback)return l;const o=l+this._optionsService.rawOptions.scrollback;return o>n.MAX_BUFFER_SIZE?n.MAX_BUFFER_SIZE:o}fillViewportRows(l){if(this.lines.length===0){l===void 0&&(l=g.DEFAULT_ATTR_DATA);let o=this._rows;for(;o--;)this.lines.push(this.getBlankLine(l))}}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(l,o){const m=this.getNullCell(g.DEFAULT_ATTR_DATA);let x=0;const v=this._getCorrectBufferLength(o);if(v>this.lines.maxLength&&(this.lines.maxLength=v),this.lines.length>0){if(this._cols<l)for(let S=0;S<this.lines.length;S++)x+=+this.lines.get(S).resize(l,m);let w=0;if(this._rows<o)for(let S=this._rows;S<o;S++)this.lines.length<o+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new g.BufferLine(l,m)):this.ybase>0&&this.lines.length<=this.ybase+this.y+w+1?(this.ybase--,w++,this.ydisp>0&&this.ydisp--):this.lines.push(new g.BufferLine(l,m)));else for(let S=this._rows;S>o;S--)this.lines.length>o+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(v<this.lines.maxLength){const S=this.lines.length-v;S>0&&(this.lines.trimStart(S),this.ybase=Math.max(this.ybase-S,0),this.ydisp=Math.max(this.ydisp-S,0),this.savedY=Math.max(this.savedY-S,0)),this.lines.maxLength=v}this.x=Math.min(this.x,l-1),this.y=Math.min(this.y,o-1),w&&(this.y+=w),this.savedX=Math.min(this.savedX,l-1),this.scrollTop=0}if(this.scrollBottom=o-1,this._isReflowEnabled&&(this._reflow(l,o),this._cols>l))for(let w=0;w<this.lines.length;w++)x+=+this.lines.get(w).resize(l,m);this._cols=l,this._rows=o,this._memoryCleanupQueue.clear(),x>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let l=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,l=!1);let o=0;for(;this._memoryCleanupPosition<this.lines.length;)if(o+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),o>100)return!0;return l}get _isReflowEnabled(){const l=this._optionsService.rawOptions.windowsPty;return l&&l.buildNumber?this._hasScrollback&&l.backend==="conpty"&&l.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(l,o){this._cols!==l&&(l>this._cols?this._reflowLarger(l,o):this._reflowSmaller(l,o))}_reflowLarger(l,o){const m=(0,b.reflowLargerGetLinesToRemove)(this.lines,this._cols,l,this.ybase+this.y,this.getNullCell(g.DEFAULT_ATTR_DATA));if(m.length>0){const x=(0,b.reflowLargerCreateNewLayout)(this.lines,m);(0,b.reflowLargerApplyNewLayout)(this.lines,x.layout),this._reflowLargerAdjustViewport(l,o,x.countRemoved)}}_reflowLargerAdjustViewport(l,o,m){const x=this.getNullCell(g.DEFAULT_ATTR_DATA);let v=m;for(;v-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<o&&this.lines.push(new g.BufferLine(l,x))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-m,0)}_reflowSmaller(l,o){const m=this.getNullCell(g.DEFAULT_ATTR_DATA),x=[];let v=0;for(let w=this.lines.length-1;w>=0;w--){let S=this.lines.get(w);if(!S||!S.isWrapped&&S.getTrimmedLength()<=l)continue;const C=[S];for(;S.isWrapped&&w>0;)S=this.lines.get(--w),C.unshift(S);const L=this.ybase+this.y;if(L>=w&&L<w+C.length)continue;const R=C[C.length-1].getTrimmedLength(),E=(0,b.reflowSmallerGetNewLineLengths)(C,this._cols,l),T=E.length-C.length;let k;k=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+T):Math.max(0,this.lines.length-this.lines.maxLength+T);const W=[];for(let M=0;M<T;M++){const H=this.getBlankLine(g.DEFAULT_ATTR_DATA,!0);W.push(H)}W.length>0&&(x.push({start:w+C.length+v,newLines:W}),v+=W.length),C.push(...W);let U=E.length-1,P=E[U];P===0&&(U--,P=E[U]);let F=C.length-T-1,D=R;for(;F>=0;){const M=Math.min(D,P);if(C[U]===void 0)break;if(C[U].copyCellsFrom(C[F],D-M,P-M,M,!0),P-=M,P===0&&(U--,P=E[U]),D-=M,D===0){F--;const H=Math.max(F,0);D=(0,b.getWrappedLineTrimmedLength)(C,H,this._cols)}}for(let M=0;M<C.length;M++)E[M]<l&&C[M].setCell(E[M],m);let O=T-k;for(;O-- >0;)this.ybase===0?this.y<o-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+v)-o&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+T,this.ybase+o-1)}if(x.length>0){const w=[],S=[];for(let U=0;U<this.lines.length;U++)S.push(this.lines.get(U));const C=this.lines.length;let L=C-1,R=0,E=x[R];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+v);let T=0;for(let U=Math.min(this.lines.maxLength-1,C+v-1);U>=0;U--)if(E&&E.start>L+T){for(let P=E.newLines.length-1;P>=0;P--)this.lines.set(U--,E.newLines[P]);U++,w.push({index:L+1,amount:E.newLines.length}),T+=E.newLines.length,E=x[++R]}else this.lines.set(U,S[L--]);let k=0;for(let U=w.length-1;U>=0;U--)w[U].index+=k,this.lines.onInsertEmitter.fire(w[U]),k+=w[U].amount;const W=Math.max(0,C+v-this.lines.maxLength);W>0&&this.lines.onTrimEmitter.fire(W)}}translateBufferLineToString(l,o,m=0,x){const v=this.lines.get(l);return v?v.translateToString(o,m,x):""}getWrappedRangeForLine(l){let o=l,m=l;for(;o>0&&this.lines.get(o).isWrapped;)o--;for(;m+1<this.lines.length&&this.lines.get(m+1).isWrapped;)m++;return{first:o,last:m}}setupTabStops(l){for(l!=null?this.tabs[l]||(l=this.prevStop(l)):(this.tabs={},l=0);l<this._cols;l+=this._optionsService.rawOptions.tabStopWidth)this.tabs[l]=!0}prevStop(l){for(l==null&&(l=this.x);!this.tabs[--l]&&l>0;);return l>=this._cols?this._cols-1:l<0?0:l}nextStop(l){for(l==null&&(l=this.x);!this.tabs[++l]&&l<this._cols;);return l>=this._cols?this._cols-1:l<0?0:l}clearMarkers(l){this._isClearing=!0;for(let o=0;o<this.markers.length;o++)this.markers[o].line===l&&(this.markers[o].dispose(),this.markers.splice(o--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].dispose(),this.markers.splice(l--,1);this._isClearing=!1}addMarker(l){const o=new r.Marker(l);return this.markers.push(o),o.register(this.lines.onTrim((m=>{o.line-=m,o.line<0&&o.dispose()}))),o.register(this.lines.onInsert((m=>{o.line>=m.index&&(o.line+=m.amount)}))),o.register(this.lines.onDelete((m=>{o.line>=m.index&&o.line<m.index+m.amount&&o.dispose(),o.line>m.index&&(o.line-=m.amount)}))),o.register(o.onDispose((()=>this._removeMarker(o)))),o}_removeMarker(l){this._isClearing||this.markers.splice(this.markers.indexOf(l),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),g=u(482);n.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);let b=0;class y{constructor(r,h,l=!1){this.isWrapped=l,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*r);const o=h||_.CellData.fromCharData([0,a.NULL_CELL_CHAR,a.NULL_CELL_WIDTH,a.NULL_CELL_CODE]);for(let m=0;m<r;++m)this.setCell(m,o);this.length=r}get(r){const h=this._data[3*r+0],l=2097151&h;return[this._data[3*r+1],2097152&h?this._combined[r]:l?(0,g.stringFromCodePoint)(l):"",h>>22,2097152&h?this._combined[r].charCodeAt(this._combined[r].length-1):l]}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,g.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,l,o){268435456&o.bg&&(this._extendedAttrs[r]=o.extended),this._data[3*r+0]=h|l<<22,this._data[3*r+1]=o.fg,this._data[3*r+2]=o.bg}addCodepointToCell(r,h,l){let o=this._data[3*r+0];2097152&o?this._combined[r]+=(0,g.stringFromCodePoint)(h):2097151&o?(this._combined[r]=(0,g.stringFromCodePoint)(2097151&o)+(0,g.stringFromCodePoint)(h),o&=-2097152,o|=2097152):o=h|4194304,l&&(o&=-12582913,o|=l<<22),this._data[3*r+0]=o}insertCells(r,h,l){if((r%=this.length)&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,l),h<this.length-r){const o=new _.CellData;for(let m=this.length-r-h-1;m>=0;--m)this.setCell(r+h+m,this.loadCell(r+m,o));for(let m=0;m<h;++m)this.setCell(r+m,l)}else for(let o=r;o<this.length;++o)this.setCell(o,l);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,l)}deleteCells(r,h,l){if(r%=this.length,h<this.length-r){const o=new _.CellData;for(let m=0;m<this.length-r-h;++m)this.setCell(r+m,this.loadCell(r+h+m,o));for(let m=this.length-h;m<this.length;++m)this.setCell(m,l)}else for(let o=r;o<this.length;++o)this.setCell(o,l);r&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,l),this.getWidth(r)!==0||this.hasContent(r)||this.setCellFromCodepoint(r,0,1,l)}replaceCells(r,h,l,o=!1){if(o)for(r&&this.getWidth(r-1)===2&&!this.isProtected(r-1)&&this.setCellFromCodepoint(r-1,0,1,l),h<this.length&&this.getWidth(h-1)===2&&!this.isProtected(h)&&this.setCellFromCodepoint(h,0,1,l);r<h&&r<this.length;)this.isProtected(r)||this.setCell(r,l),r++;else for(r&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,l),h<this.length&&this.getWidth(h-1)===2&&this.setCellFromCodepoint(h,0,1,l);r<h&&r<this.length;)this.setCell(r++,l)}resize(r,h){if(r===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const l=3*r;if(r>this.length){if(this._data.buffer.byteLength>=4*l)this._data=new Uint32Array(this._data.buffer,0,l);else{const o=new Uint32Array(l);o.set(this._data),this._data=o}for(let o=this.length;o<r;++o)this.setCell(o,h)}else{this._data=this._data.subarray(0,l);const o=Object.keys(this._combined);for(let x=0;x<o.length;x++){const v=parseInt(o[x],10);v>=r&&delete this._combined[v]}const m=Object.keys(this._extendedAttrs);for(let x=0;x<m.length;x++){const v=parseInt(m[x],10);v>=r&&delete this._extendedAttrs[v]}}return this.length=r,4*l*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 l=0;l<this.length;++l)this.isProtected(l)||this.setCell(l,r);else{this._combined={},this._extendedAttrs={};for(let l=0;l<this.length;++l)this.setCell(l,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,l,o,m){const x=r._data;if(m)for(let w=o-1;w>=0;w--){for(let S=0;S<3;S++)this._data[3*(l+w)+S]=x[3*(h+w)+S];268435456&x[3*(h+w)+2]&&(this._extendedAttrs[l+w]=r._extendedAttrs[h+w])}else for(let w=0;w<o;w++){for(let S=0;S<3;S++)this._data[3*(l+w)+S]=x[3*(h+w)+S];268435456&x[3*(h+w)+2]&&(this._extendedAttrs[l+w]=r._extendedAttrs[h+w])}const v=Object.keys(r._combined);for(let w=0;w<v.length;w++){const S=parseInt(v[w],10);S>=h&&(this._combined[S-h+l]=r._combined[S])}}translateToString(r,h,l,o){h=h??0,l=l??this.length,r&&(l=Math.min(l,this.getTrimmedLength())),o&&(o.length=0);let m="";for(;h<l;){const x=this._data[3*h+0],v=2097151&x,w=2097152&x?this._combined[h]:v?(0,g.stringFromCodePoint)(v):a.WHITESPACE_CELL_CHAR;if(m+=w,o)for(let S=0;S<w.length;++S)o.push(h);h+=x>>22||1}return o&&o.push(h),m}}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 g=!f[_].hasContent(a-1)&&f[_].getWidth(a-1)===1,b=f[_+1].getWidth(0)===2;return g&&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,g,b){const y=[];for(let c=0;c<f.length-1;c++){let r=c,h=f.get(++r);if(!h.isWrapped)continue;const l=[f.get(c)];for(;r<f.length&&h.isWrapped;)l.push(h),h=f.get(++r);if(g>=c&&g<r){c+=l.length-1;continue}let o=0,m=u(l,o,_),x=1,v=0;for(;x<l.length;){const S=u(l,x,_),C=S-v,L=a-m,R=Math.min(C,L);l[o].copyCellsFrom(l[x],v,m,R,!1),m+=R,m===a&&(o++,m=0),v+=R,v===S&&(x++,v=0),m===0&&o!==0&&l[o-1].getWidth(a-1)===2&&(l[o].copyCellsFrom(l[o-1],a-1,m++,1,!1),l[o-1].setCell(a-1,b))}l[o].replaceCells(m,a,b);let w=0;for(let S=l.length-1;S>0&&(S>o||l[S].getTrimmedLength()===0);S--)w++;w>0&&(y.push(c+l.length-w),y.push(w)),c+=l.length-1}return y},n.reflowLargerCreateNewLayout=function(f,_){const a=[];let g=0,b=_[g],y=0;for(let c=0;c<f.length;c++)if(b===c){const r=_[++g];f.onDeleteEmitter.fire({index:c-y,amount:r}),c+=r-1,y+=r,b=_[++g]}else a.push(c);return{layout:a,countRemoved:y}},n.reflowLargerApplyNewLayout=function(f,_){const a=[];for(let g=0;g<_.length;g++)a.push(f.get(_[g]));for(let g=0;g<a.length;g++)f.set(g,a[g]);f.length=_.length},n.reflowSmallerGetNewLineLengths=function(f,_,a){const g=[],b=f.map(((h,l)=>u(f,l,_))).reduce(((h,l)=>h+l));let y=0,c=0,r=0;for(;r<b;){if(b-r<a){g.push(b-r);break}y+=a;const h=u(f,c,_);y>h&&(y-=h,c++);const l=f[c].getWidth(y-1)===2;l&&y--;const o=l?a-1:a;g.push(o),r+=o}return g},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 g extends _.Disposable{constructor(y,c){super(),this._optionsService=y,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(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,c){this._normal.resize(y,c),this._alt.resize(y,c),this.setupTabStops(y)}setupTabStops(y){this._normal.setupTabStops(y),this._alt.setupTabStops(y)}}n.BufferSet=g},511:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const f=u(482),_=u(643),a=u(3734);class g 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 c=new g;return c.setFromCharData(y),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(y){this.fg=y[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let c=!1;if(y[_.CHAR_DATA_CHAR_INDEX].length>2)c=!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:c=!0}else c=!0}else this.content=y[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|y[_.CHAR_DATA_WIDTH_INDEX]<<22;c&&(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=g},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(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:(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,g,b,y){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=g?f.C0.ESC+"OA":f.C0.ESC+"[A":a.key==="UIKeyInputLeftArrow"?c.key=g?f.C0.ESC+"OD":f.C0.ESC+"[D":a.key==="UIKeyInputRightArrow"?c.key=g?f.C0.ESC+"OC":f.C0.ESC+"[C":a.key==="UIKeyInputDownArrow"&&(c.key=g?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=g?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=g?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=g?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=g?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":g?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:c.key=r?f.C0.ESC+"[1;"+(r+1)+"F":g?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&&!y||!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],l=h==null?void 0:h[a.shiftKey?1:0];if(l)c.key=f.C0.ESC+l;else if(a.keyCode>=65&&a.keyCode<=90){const o=a.ctrlKey?a.keyCode-64:a.keyCode+32;let m=String.fromCharCode(o);a.shiftKey&&(m=m.toUpperCase()),c.key=f.C0.ESC+m}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 o=a.code.slice(3,4);a.shiftKey||(o=o.toLowerCase()),c.key=f.C0.ESC+o,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:(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 g=f;g<_;++g){let b=u[g];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,g=0;if(this._interim){const b=u.charCodeAt(g++);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=g;b<_;++b){const y=u.charCodeAt(b);if(55296<=y&&y<=56319){if(++b>=_)return this._interim=y,a;const c=u.charCodeAt(b);56320<=c&&c<=57343?f[a++]=1024*(y-55296)+c-56320+65536:(f[a++]=y,f[a++]=c)}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,g,b,y,c=0,r=0,h=0;if(this.interim[0]){let m=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let v,w=0;for(;(v=63&this.interim[++w])&&w<4;)x<<=6,x|=v;const S=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,C=S-w;for(;h<C;){if(h>=_)return 0;if(v=u[h++],(192&v)!=128){h--,m=!0;break}this.interim[w++]=v,x<<=6,x|=63&v}m||(S===2?x<128?h--:f[c++]=x:S===3?x<2048||x>=55296&&x<=57343||x===65279||(f[c++]=x):x<65536||x>1114111||(f[c++]=x)),this.interim.fill(0)}const l=_-4;let o=h;for(;o<_;){for(;!(!(o<l)||128&(a=u[o])||128&(g=u[o+1])||128&(b=u[o+2])||128&(y=u[o+3]));)f[c++]=a,f[c++]=g,f[c++]=b,f[c++]=y,o+=4;if(a=u[o++],a<128)f[c++]=a;else if((224&a)==192){if(o>=_)return this.interim[0]=a,c;if(g=u[o++],(192&g)!=128){o--;continue}if(r=(31&a)<<6|63&g,r<128){o--;continue}f[c++]=r}else if((240&a)==224){if(o>=_)return this.interim[0]=a,c;if(g=u[o++],(192&g)!=128){o--;continue}if(o>=_)return this.interim[0]=a,this.interim[1]=g,c;if(b=u[o++],(192&b)!=128){o--;continue}if(r=(15&a)<<12|(63&g)<<6|63&b,r<2048||r>=55296&&r<=57343||r===65279)continue;f[c++]=r}else if((248&a)==240){if(o>=_)return this.interim[0]=a,c;if(g=u[o++],(192&g)!=128){o--;continue}if(o>=_)return this.interim[0]=a,this.interim[1]=g,c;if(b=u[o++],(192&b)!=128){o--;continue}if(o>=_)return this.interim[0]=a,this.interim[1]=g,this.interim[2]=b,c;if(y=u[o++],(192&y)!=128){o--;continue}if(r=(7&a)<<18|(63&g)<<12|(63&b)<<6|63&y,r<65536||r>1114111)continue;f[c++]=r}}return c}}},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 g;n.UnicodeV6=class{constructor(){if(this.version="6",!g){g=new Uint8Array(65536),g.fill(1),g[0]=0,g.fill(0,1,32),g.fill(0,127,160),g.fill(2,4352,4448),g[9001]=2,g[9002]=2,g.fill(2,11904,42192),g[12351]=1,g.fill(2,44032,55204),g.fill(2,63744,64256),g.fill(2,65040,65050),g.fill(2,65072,65136),g.fill(2,65280,65377),g.fill(2,65504,65511);for(let b=0;b<_.length;++b)g.fill(0,_[b][0],_[b][1]+1)}}wcwidth(b){return b<32?0:b<127?1:b<65536?g[b]:(function(y,c){let r,h=0,l=c.length-1;if(y<c[0][0]||y>c[l][1])return!1;for(;l>=h;)if(r=h+l>>1,y>c[r][1])h=r+1;else{if(!(y<c[r][0]))return!0;l=r-1}return!1})(b,a)?0:b>=131072&&b<=196605||b>=196608&&b<=262141?2:1}charProperties(b,y){let c=this.wcwidth(b),r=c===0&&y!==0;if(r){const h=f.UnicodeService.extractWidth(y);h===0?r=!1:h>c&&(c=h)}return f.UnicodeService.createPropertyValue(0,c,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(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,y){if(y!==void 0&&this._syncCalls>y)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,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+=b.length,this._writeBuffer.push(b),this._callbacks.push(y),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(y)}_innerWrite(b=0,y=!0){const c=b||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const r=this._writeBuffer[this._bufferOffset],h=this._action(r,y);if(h){const o=m=>Date.now()-c>=12?setTimeout((()=>this._innerWrite(0,m))):this._innerWrite(c,m);return void h.catch((m=>(queueMicrotask((()=>{throw m})),Promise.resolve(!1)))).then(o)}const l=this._callbacks[this._bufferOffset];if(l&&l(),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:(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,g){const b=a.toString(16),y=b.length<2?"0"+b:b;switch(g){case 4:return b[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 g=a.toLowerCase();if(g.indexOf("rgb:")===0){g=g.slice(4);const b=u.exec(g);if(b){const y=b[1]?15:b[4]?255:b[7]?4095:65535;return[Math.round(parseInt(b[1]||b[4]||b[7]||b[10],16)/y*255),Math.round(parseInt(b[2]||b[5]||b[8]||b[11],16)/y*255),Math.round(parseInt(b[3]||b[6]||b[9]||b[12],16)/y*255)]}}else if(g.indexOf("#")===0&&(g=g.slice(1),f.exec(g)&&[3,6,9,12].includes(g.length))){const b=g.length/3,y=[0,0,0];for(let c=0;c<3;++c){const r=parseInt(g.slice(b*c,b*c+b),16);y[c]=b===1?r<<4:b===2?r:b===3?r>>4:r>>8}return y}},n.toRgbString=function(a,g=16){const[b,y,c]=a;return`rgb:${_(b,g)}/${_(y,g)}/${_(c,g)}`}},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),g=[];n.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=g,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=g}registerHandler(y,c){this._handlers[y]===void 0&&(this._handlers[y]=[]);const r=this._handlers[y];return r.push(c),{dispose:()=>{const h=r.indexOf(c);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=g,this._ident=0}hook(y,c){if(this.reset(),this._ident=y,this._active=this._handlers[y]||g,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(y,c,r){if(this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].put(y,c,r);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(y,c,r))}unhook(y,c=!0){if(this._active.length){let r=!1,h=this._active.length-1,l=!1;if(this._stack.paused&&(h=this._stack.loopPosition-1,r=c,l=this._stack.fallThrough,this._stack.paused=!1),!l&&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=g,this._ident=0}};const b=new _.Params;b.addParam(0),n.DcsHandler=class{constructor(y){this._handler=y,this._data="",this._params=b,this._hitLimit=!1}hook(y){this._params=y.length>1||y.params[0]?y.clone():b,this._data="",this._hitLimit=!1}put(y,c,r){this._hitLimit||(this._data+=(0,f.utf32ToString)(y,c,r),this._data.length>a.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(y){let c=!1;if(this._hitLimit)c=!1;else if(y&&(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:(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),g=u(6351);class b{constructor(h){this.table=new Uint8Array(h)}setDefault(h,l){this.table.fill(h<<4|l)}add(h,l,o,m){this.table[l<<8|h]=o<<4|m}addMany(h,l,o,m){for(let x=0;x<h.length;x++)this.table[l<<8|h[x]]=o<<4|m}}n.TransitionTable=b;const y=160;n.VT500_TRANSITION_TABLE=(function(){const r=new b(4095),h=Array.apply(null,Array(256)).map(((w,S)=>S)),l=(w,S)=>h.slice(w,S),o=l(32,127),m=l(0,24);m.push(25),m.push.apply(m,l(28,32));const x=l(0,14);let v;for(v in r.setDefault(1,0),r.addMany(o,0,2,0),x)r.addMany([24,26,153,154],v,3,0),r.addMany(l(128,144),v,3,0),r.addMany(l(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(m,0,3,0),r.addMany(m,1,3,1),r.add(127,1,0,1),r.addMany(m,8,0,8),r.addMany(m,3,3,3),r.add(127,3,0,3),r.addMany(m,4,3,4),r.add(127,4,0,4),r.addMany(m,6,3,6),r.addMany(m,5,3,5),r.add(127,5,0,5),r.addMany(m,2,3,2),r.add(127,2,0,2),r.add(93,1,4,8),r.addMany(o,8,5,8),r.add(127,8,5,8),r.addMany([156,27,24,26,7],8,6,0),r.addMany(l(28,32),8,0,8),r.addMany([88,94,95],1,0,7),r.addMany(o,7,0,7),r.addMany(m,7,0,7),r.add(156,7,0,0),r.add(127,7,0,7),r.add(91,1,11,3),r.addMany(l(64,127),3,7,0),r.addMany(l(48,60),3,8,4),r.addMany([60,61,62,63],3,9,4),r.addMany(l(48,60),4,8,4),r.addMany(l(64,127),4,7,0),r.addMany([60,61,62,63],4,0,6),r.addMany(l(32,64),6,0,6),r.add(127,6,0,6),r.addMany(l(64,127),6,0,0),r.addMany(l(32,48),3,9,5),r.addMany(l(32,48),5,9,5),r.addMany(l(48,64),5,0,6),r.addMany(l(64,127),5,7,0),r.addMany(l(32,48),4,9,5),r.addMany(l(32,48),1,9,2),r.addMany(l(32,48),2,9,2),r.addMany(l(48,127),2,10,0),r.addMany(l(48,80),1,10,0),r.addMany(l(81,88),1,10,0),r.addMany([89,90,92],1,10,0),r.addMany(l(96,127),1,10,0),r.add(80,1,11,9),r.addMany(m,9,0,9),r.add(127,9,0,9),r.addMany(l(28,32),9,0,9),r.addMany(l(32,48),9,9,12),r.addMany(l(48,60),9,8,10),r.addMany([60,61,62,63],9,9,10),r.addMany(m,11,0,11),r.addMany(l(32,128),11,0,11),r.addMany(l(28,32),11,0,11),r.addMany(m,10,0,10),r.add(127,10,0,10),r.addMany(l(28,32),10,0,10),r.addMany(l(48,60),10,8,10),r.addMany([60,61,62,63],10,0,11),r.addMany(l(32,48),10,9,12),r.addMany(m,12,0,12),r.add(127,12,0,12),r.addMany(l(28,32),12,0,12),r.addMany(l(32,48),12,9,12),r.addMany(l(48,64),12,0,11),r.addMany(l(64,127),12,12,13),r.addMany(l(64,127),10,12,13),r.addMany(l(64,127),9,12,13),r.addMany(m,13,13,13),r.addMany(o,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 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=(l,o,m)=>{},this._executeHandlerFb=l=>{},this._csiHandlerFb=(l,o)=>{},this._escHandlerFb=l=>{},this._errorHandlerFb=l=>l,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,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 g.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(h,l=[64,126]){let o=0;if(h.prefix){if(h.prefix.length>1)throw new Error("only one byte as prefix supported");if(o=h.prefix.charCodeAt(0),o&&60>o||o>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");o<<=8,o|=v}}if(h.final.length!==1)throw new Error("final must be a single byte");const m=h.final.charCodeAt(0);if(l[0]>m||m>l[1])throw new Error(`final must be in range ${l[0]} .. ${l[1]}`);return o<<=8,o|=m,o}identToString(h){const l=[];for(;h;)l.push(String.fromCharCode(255&h)),h>>=8;return l.reverse().join("")}setPrintHandler(h){this._printHandler=h}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(h,l){const o=this._identifier(h,[48,126]);this._escHandlers[o]===void 0&&(this._escHandlers[o]=[]);const m=this._escHandlers[o];return m.push(l),{dispose:()=>{const x=m.indexOf(l);x!==-1&&m.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,l){this._executeHandlers[h.charCodeAt(0)]=l}clearExecuteHandler(h){this._executeHandlers[h.charCodeAt(0)]&&delete this._executeHandlers[h.charCodeAt(0)]}setExecuteHandlerFallback(h){this._executeHandlerFb=h}registerCsiHandler(h,l){const o=this._identifier(h);this._csiHandlers[o]===void 0&&(this._csiHandlers[o]=[]);const m=this._csiHandlers[o];return m.push(l),{dispose:()=>{const x=m.indexOf(l);x!==-1&&m.splice(x,1)}}}clearCsiHandler(h){this._csiHandlers[this._identifier(h)]&&delete this._csiHandlers[this._identifier(h)]}setCsiHandlerFallback(h){this._csiHandlerFb=h}registerDcsHandler(h,l){return this._dcsParser.registerHandler(this._identifier(h),l)}clearDcsHandler(h){this._dcsParser.clearHandler(this._identifier(h))}setDcsHandlerFallback(h){this._dcsParser.setHandlerFallback(h)}registerOscHandler(h,l){return this._oscParser.registerHandler(h,l)}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,l,o,m,x){this._parseStack.state=h,this._parseStack.handlers=l,this._parseStack.handlerPos=o,this._parseStack.transition=m,this._parseStack.chunkPos=x}parse(h,l,o){let m,x=0,v=0,w=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,w=this._parseStack.chunkPos+1;else{if(o===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const S=this._parseStack.handlers;let C=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(o===!1&&C>-1){for(;C>=0&&(m=S[C](this._params),m!==!0);C--)if(m instanceof Promise)return this._parseStack.handlerPos=C,m}this._parseStack.handlers=[];break;case 4:if(o===!1&&C>-1){for(;C>=0&&(m=S[C](),m!==!0);C--)if(m instanceof Promise)return this._parseStack.handlerPos=C,m}this._parseStack.handlers=[];break;case 6:if(x=h[this._parseStack.chunkPos],m=this._dcsParser.unhook(x!==24&&x!==26,o),m)return m;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],m=this._oscParser.end(x!==24&&x!==26,o),m)return m;x===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,w=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let S=w;S<l;++S){switch(x=h[S],v=this._transitions.table[this.currentState<<8|(x<160?x:y)],v>>4){case 2:for(let T=S+1;;++T){if(T>=l||(x=h[T])<32||x>126&&x<y){this._printHandler(h,S,T),S=T-1;break}if(++T>=l||(x=h[T])<32||x>126&&x<y){this._printHandler(h,S,T),S=T-1;break}if(++T>=l||(x=h[T])<32||x>126&&x<y){this._printHandler(h,S,T),S=T-1;break}if(++T>=l||(x=h[T])<32||x>126&&x<y){this._printHandler(h,S,T),S=T-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:S,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&&(m=C[L](this._params),m!==!0);L--)if(m instanceof Promise)return this._preserveStack(3,C,L,v,S),m;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(++S<l&&(x=h[S])>47&&x<60);S--;break;case 9:this._collect<<=8,this._collect|=x;break;case 10:const R=this._escHandlers[this._collect<<8|x];let E=R?R.length-1:-1;for(;E>=0&&(m=R[E](),m!==!0);E--)if(m instanceof Promise)return this._preserveStack(4,R,E,v,S),m;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 T=S+1;;++T)if(T>=l||(x=h[T])===24||x===26||x===27||x>127&&x<y){this._dcsParser.put(h,S,T),S=T-1;break}break;case 14:if(m=this._dcsParser.unhook(x!==24&&x!==26),m)return this._preserveStack(6,[],0,v,S),m;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 T=S+1;;T++)if(T>=l||(x=h[T])<32||x>127&&x<y){this._oscParser.put(h,S,T),S=T-1;break}break;case 6:if(m=this._oscParser.end(x!==24&&x!==26),m)return this._preserveStack(5,[],0,v,S),m;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:(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(g,b){this._handlers[g]===void 0&&(this._handlers[g]=[]);const y=this._handlers[g];return y.push(b),{dispose:()=>{const c=y.indexOf(b);c!==-1&&y.splice(c,1)}}}clearHandler(g){this._handlers[g]&&delete this._handlers[g]}setHandlerFallback(g){this._handlerFb=g}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=a}reset(){if(this._state===2)for(let g=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;g>=0;--g)this._active[g].end(!1);this._stack.paused=!1,this._active=a,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||a,this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].start();else this._handlerFb(this._id,"START")}_put(g,b,y){if(this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].put(g,b,y);else this._handlerFb(this._id,"PUT",(0,_.utf32ToString)(g,b,y))}start(){this.reset(),this._state=1}put(g,b,y){if(this._state!==3){if(this._state===1)for(;b<y;){const c=g[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&&y-b>0&&this._put(g,b,y)}}end(g,b=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let y=!1,c=this._active.length-1,r=!1;if(this._stack.paused&&(c=this._stack.loopPosition-1,y=b,r=this._stack.fallThrough,this._stack.paused=!1),!r&&y===!1){for(;c>=0&&(y=this._active[c].end(g),y!==!0);c--)if(y instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!1,y;c--}for(;c>=0;c--)if(y=this._active[c].end(!1),y instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!0,y}else this._handlerFb(this._id,"END",g);this._active=a,this._id=-1,this._state=0}}},n.OscHandler=class{constructor(g){this._handler=g,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(g,b,y){this._hitLimit||(this._data+=(0,_.utf32ToString)(g,b,y),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(g){let b=!1;if(this._hitLimit)b=!1;else if(g&&(b=this._handler(this._data),b instanceof Promise))return b.then((y=>(this._data="",this._hitLimit=!1,y)));return this._data="",this._hitLimit=!1,b}}},8742:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Params=void 0;const u=2147483647;class f{static fromArray(a){const g=new f;if(!a.length)return g;for(let b=Array.isArray(a[0])?1:0;b<a.length;++b){const y=a[b];if(Array.isArray(y))for(let c=0;c<y.length;++c)g.addSubParam(y[c]);else g.addParam(y)}return g}constructor(a=32,g=32){if(this.maxLength=a,this.maxSubParamsLength=g,g>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(a),this.length=0,this._subParams=new Int32Array(g),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 g=0;g<this.length;++g){a.push(this.params[g]);const b=this._subParamsIdx[g]>>8,y=255&this._subParamsIdx[g];y-b>0&&a.push(Array.prototype.slice.call(this._subParams,b,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 g=this._subParamsIdx[a]>>8,b=255&this._subParamsIdx[a];return b-g>0?this._subParams.subarray(g,b):null}getSubParamsAll(){const a={};for(let g=0;g<this.length;++g){const b=this._subParamsIdx[g]>>8,y=255&this._subParamsIdx[g];y-b>0&&(a[g]=this._subParams.slice(b,y))}return a}addDigit(a){let g;if(this._rejectDigits||!(g=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const b=this._digitIsSub?this._subParams:this.params,y=b[g-1];b[g-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,g){this._buffer=a,this.type=g}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 g=this._buffer.lines.get(a);if(g)return new f.BufferLineApiView(g)}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,g){return this._line.translateToString(_,a,g)}}},8285:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferNamespaceApi=void 0;const f=u(8771),_=u(8460),a=u(844);class g 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=g},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,l,o){var m,x=arguments.length,v=x<3?h:o===null?o=Object.getOwnPropertyDescriptor(h,l):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,h,l,o);else for(var w=r.length-1;w>=0;w--)(m=r[w])&&(v=(x<3?m(v):x>3?m(h,l,v):m(h,l))||v);return x>3&&v&&Object.defineProperty(h,l,v),v},_=this&&this.__param||function(r,h){return function(l,o){h(l,o,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferService=n.MINIMUM_ROWS=n.MINIMUM_COLS=void 0;const a=u(8460),g=u(844),b=u(5295),y=u(2585);n.MINIMUM_COLS=2,n.MINIMUM_ROWS=1;let c=n.BufferService=class extends g.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 l=this.buffer;let o;o=this._cachedBlankLine,o&&o.length===this.cols&&o.getFg(0)===r.fg&&o.getBg(0)===r.bg||(o=l.getBlankLine(r,h),this._cachedBlankLine=o),o.isWrapped=h;const m=l.ybase+l.scrollTop,x=l.ybase+l.scrollBottom;if(l.scrollTop===0){const v=l.lines.isFull;x===l.lines.length-1?v?l.lines.recycle().copyFrom(o):l.lines.push(o.clone()):l.lines.splice(x+1,0,o.clone()),v?this.isUserScrolling&&(l.ydisp=Math.max(l.ydisp-1,0)):(l.ybase++,this.isUserScrolling||l.ydisp++)}else{const v=x-m+1;l.lines.shiftElements(m+1,v-1,-1),l.lines.set(x,o.clone())}this.isUserScrolling||(l.ydisp=l.ybase),this._onScroll.fire(l.ydisp)}scrollLines(r,h,l){const o=this.buffer;if(r<0){if(o.ydisp===0)return;this.isUserScrolling=!0}else r+o.ydisp>=o.ybase&&(this.isUserScrolling=!1);const m=o.ydisp;o.ydisp=Math.max(Math.min(o.ydisp+r,o.ybase),0),m!==o.ydisp&&(h||this._onScroll.fire(o.ydisp))}};n.BufferService=c=f([_(0,y.IOptionsService)],c)},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(o,m,x,v){var w,S=arguments.length,C=S<3?m:v===null?v=Object.getOwnPropertyDescriptor(m,x):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(o,m,x,v);else for(var L=o.length-1;L>=0;L--)(w=o[L])&&(C=(S<3?w(C):S>3?w(m,x,C):w(m,x))||C);return S>3&&C&&Object.defineProperty(m,x,C),C},_=this&&this.__param||function(o,m){return function(x,v){m(x,v,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreMouseService=void 0;const a=u(2585),g=u(8460),b=u(844),y={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:o=>o.button!==4&&o.action===1&&(o.ctrl=!1,o.alt=!1,o.shift=!1,!0)},VT200:{events:19,restrict:o=>o.action!==32},DRAG:{events:23,restrict:o=>o.action!==32||o.button!==3},ANY:{events:31,restrict:o=>!0}};function c(o,m){let x=(o.ctrl?16:0)|(o.shift?4:0)|(o.alt?8:0);return o.button===4?(x|=64,x|=o.action):(x|=3&o.button,4&o.button&&(x|=64),8&o.button&&(x|=128),o.action===32?x|=32:o.action!==0||m||(x|=3)),x}const r=String.fromCharCode,h={DEFAULT:o=>{const m=[c(o,!1)+32,o.col+32,o.row+32];return m[0]>255||m[1]>255||m[2]>255?"":`\x1B[M${r(m[0])}${r(m[1])}${r(m[2])}`},SGR:o=>{const m=o.action===0&&o.button!==4?"m":"M";return`\x1B[<${c(o,!0)};${o.col};${o.row}${m}`},SGR_PIXELS:o=>{const m=o.action===0&&o.button!==4?"m":"M";return`\x1B[<${c(o,!0)};${o.x};${o.y}${m}`}};let l=n.CoreMouseService=class extends b.Disposable{constructor(o,m){super(),this._bufferService=o,this._coreService=m,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new g.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const 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(o,m){this._protocols[o]=m}addEncoding(o,m){this._encodings[o]=m}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(o){if(!this._protocols[o])throw new Error(`unknown protocol "${o}"`);this._activeProtocol=o,this._onProtocolChange.fire(this._protocols[o].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(o){if(!this._encodings[o])throw new Error(`unknown encoding "${o}"`);this._activeEncoding=o}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(o){if(o.col<0||o.col>=this._bufferService.cols||o.row<0||o.row>=this._bufferService.rows||o.button===4&&o.action===32||o.button===3&&o.action!==32||o.button!==4&&(o.action===2||o.action===3)||(o.col++,o.row++,o.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,o,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(o))return!1;const m=this._encodings[this._activeEncoding](o);return m&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(m):this._coreService.triggerDataEvent(m,!0)),this._lastEvent=o,!0}explainEvents(o){return{down:!!(1&o),up:!!(2&o),drag:!!(4&o),move:!!(8&o),wheel:!!(16&o)}}_equalEvents(o,m,x){if(x){if(o.x!==m.x||o.y!==m.y)return!1}else if(o.col!==m.col||o.row!==m.row)return!1;return o.button===m.button&&o.action===m.action&&o.ctrl===m.ctrl&&o.alt===m.alt&&o.shift===m.shift}};n.CoreMouseService=l=f([_(0,a.IBufferService),_(1,a.ICoreService)],l)},6975:function(j,n,u){var f=this&&this.__decorate||function(l,o,m,x){var v,w=arguments.length,S=w<3?o:x===null?x=Object.getOwnPropertyDescriptor(o,m):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(l,o,m,x);else for(var C=l.length-1;C>=0;C--)(v=l[C])&&(S=(w<3?v(S):w>3?v(o,m,S):v(o,m))||S);return w>3&&S&&Object.defineProperty(o,m,S),S},_=this&&this.__param||function(l,o){return function(m,x){o(m,x,l)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreService=void 0;const a=u(1439),g=u(8460),b=u(844),y=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(l,o,m){super(),this._bufferService=l,this._logService=o,this._optionsService=m,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new g.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new g.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new g.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new g.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,a.clone)(c),this.decPrivateModes=(0,a.clone)(r)}reset(){this.modes=(0,a.clone)(c),this.decPrivateModes=(0,a.clone)(r)}triggerDataEvent(l,o=!1){if(this._optionsService.rawOptions.disableStdin)return;const m=this._bufferService.buffer;o&&this._optionsService.rawOptions.scrollOnUserInput&&m.ybase!==m.ydisp&&this._onRequestScrollToBottom.fire(),o&&this._onUserInput.fire(),this._logService.debug(`sending data "${l}"`,(()=>l.split("").map((x=>x.charCodeAt(0))))),this._onData.fire(l)}triggerBinaryEvent(l){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${l}"`,(()=>l.split("").map((o=>o.charCodeAt(0))))),this._onBinary.fire(l))}};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),g=u(6106);let b=0,y=0;class c extends a.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new g.SortedList((l=>l==null?void 0:l.marker.line)),this._onDecorationRegistered=this.register(new _.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(l){if(l.marker.isDisposed)return;const o=new r(l);if(o){const m=o.marker.onDispose((()=>o.dispose()));o.onDispose((()=>{o&&(this._decorations.delete(o)&&this._onDecorationRemoved.fire(o),m.dispose())})),this._decorations.insert(o),this._onDecorationRegistered.fire(o)}return o}reset(){for(const l of this._decorations.values())l.dispose();this._decorations.clear()}*getDecorationsAtCell(l,o,m){let x=0,v=0;for(const w of this._decorations.getKeyIterator(o))x=w.options.x??0,v=x+(w.options.width??1),l>=x&&l<v&&(!m||(w.options.layer??"bottom")===m)&&(yield w)}forEachDecorationAtCell(l,o,m,x){this._decorations.forEachByKey(o,(v=>{b=v.options.x??0,y=b+(v.options.width??1),l>=b&&l<y&&(!m||(v.options.layer??"bottom")===m)&&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(l){super(),this.options=l,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=l.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(...b){this._entries=new Map;for(const[y,c]of b)this.set(y,c)}set(b,y){const c=this._entries.get(b);return this._entries.set(b,y),c}forEach(b){for(const[y,c]of this._entries.entries())b(y,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(g,b){this._services.set(g,b)}getService(g){return this._services.get(g)}createInstance(g,...b){const y=(0,_.getServiceDependencies)(g).sort(((h,l)=>h.index-l.index)),c=[];for(const h of y){const l=this._services.get(h.id);if(!l)throw new Error(`[createInstance] ${g.name} depends on UNKNOWN service ${h.id}.`);c.push(l)}const r=y.length>0?y[0].index:b.length;if(b.length!==r)throw new Error(`[createInstance] First service dependency of ${g.name} at position ${r+1} conflicts with ${b.length} static arguments`);return new g(...b,...c)}}},7866:function(j,n,u){var f=this&&this.__decorate||function(r,h,l,o){var m,x=arguments.length,v=x<3?h:o===null?o=Object.getOwnPropertyDescriptor(h,l):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,h,l,o);else for(var w=r.length-1;w>=0;w--)(m=r[w])&&(v=(x<3?m(v):x>3?m(h,l,v):m(h,l))||v);return x>3&&v&&Object.defineProperty(h,l,v),v},_=this&&this.__param||function(r,h){return function(l,o){h(l,o,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const a=u(844),g=u(2585),b={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let y,c=n.LogService=class extends a.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),y=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,l){this._evalLazyOptionalParams(l),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...l)}trace(r,...h){var l;this._logLevel<=g.LogLevelEnum.TRACE&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var l;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var l;this._logLevel<=g.LogLevelEnum.INFO&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var l;this._logLevel<=g.LogLevelEnum.WARN&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var l;this._logLevel<=g.LogLevelEnum.ERROR&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.error.bind(this._optionsService.options.logger))??console.error,r,h)}};n.LogService=c=f([_(0,g.IOptionsService)],c),n.setTraceLogger=function(r){y=r},n.traceCall=function(r,h,l){if(typeof l.value!="function")throw new Error("not supported");const o=l.value;l.value=function(...m){if(y.logLevel!==g.LogLevelEnum.TRACE)return o.apply(this,m);y.trace(`GlyphRenderer#${o.name}(${m.map((v=>JSON.stringify(v))).join(", ")})`);const x=o.apply(this,m);return y.trace(`GlyphRenderer#${o.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 g=["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 l=c[h];r[h]=this._sanitizeAndValidateOption(h,l)}catch(l){console.error(l)}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,l)=>{if(!(h in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);l=this._sanitizeAndValidateOption(h,l),this.rawOptions[h]!==l&&(this.rawOptions[h]=l,this._onOptionChange.fire(h))};for(const h in this.rawOptions){const l={get:c.bind(this,h),set:r.bind(this,h)};Object.defineProperty(this.options,h,l)}}_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=g.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(j,n,u){var f=this&&this.__decorate||function(b,y,c,r){var h,l=arguments.length,o=l<3?y:r===null?r=Object.getOwnPropertyDescriptor(y,c):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(b,y,c,r);else for(var m=b.length-1;m>=0;m--)(h=b[m])&&(o=(l<3?h(o):l>3?h(y,c,o):h(y,c))||o);return l>3&&o&&Object.defineProperty(y,c,o),o},_=this&&this.__param||function(b,y){return function(c,r){y(c,r,b)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkService=void 0;const a=u(2585);let g=n.OscLinkService=class{constructor(b){this._bufferService=b,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(b){const y=this._bufferService.buffer;if(b.id===void 0){const m=y.addMarker(y.ybase+y.y),x={data:b,id:this._nextId++,lines:[m]};return m.onDispose((()=>this._removeMarkerFromLink(x,m))),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,y.ybase+y.y),h.id;const l=y.addMarker(y.ybase+y.y),o={id:this._nextId++,key:this._getEntryIdKey(c),data:c,lines:[l]};return l.onDispose((()=>this._removeMarkerFromLink(o,l))),this._entriesWithId.set(o.key,o),this._dataByLinkId.set(o.id,o),o.id}addLineToLink(b,y){const c=this._dataByLinkId.get(b);if(c&&c.lines.every((r=>r.line!==y))){const r=this._bufferService.buffer.addMarker(y);c.lines.push(r),r.onDispose((()=>this._removeMarkerFromLink(c,r)))}}getLinkData(b){var y;return(y=this._dataByLinkId.get(b))==null?void 0:y.data}_getEntryIdKey(b){return`${b.id};;${b.uri}`}_removeMarkerFromLink(b,y){const c=b.lines.indexOf(y);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=g=f([_(0,a.IBufferService)],g)},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(g,b,y){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,g,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(b){return(1&b)!=0}static extractWidth(b){return b>>1&3}static extractCharKind(b){return b>>3}static createPropertyValue(b,y,c=!1){return(16777215&b)<<3|(3&y)<<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 y=0,c=0;const r=b.length;for(let h=0;h<r;++h){let l=b.charCodeAt(h);if(55296<=l&&l<=56319){if(++h>=r)return y+this.wcwidth(l);const x=b.charCodeAt(h);56320<=x&&x<=57343?l=1024*(l-55296)+x-56320+65536:y+=this.wcwidth(x)}const o=this.charProperties(l,c);let m=a.extractWidth(o);a.extractShouldJoin(o)&&(m-=a.extractWidth(c)),y+=m,c=o}return y}charProperties(b,y){return this._activeProvider.charProperties(b,y)}}n.UnicodeService=a}},B={};function ee(j){var n=B[j];if(n!==void 0)return n.exports;var u=B[j]={exports:{}};return G[j].call(u.exports,u,u.exports,ee),u.exports}var ne={};return(()=>{var j=ne;Object.defineProperty(j,"__esModule",{value:!0}),j.Terminal=void 0;const n=ee(9042),u=ee(3236),f=ee(844),_=ee(5741),a=ee(8285),g=ee(7975),b=ee(7090),y=["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 l=m=>this._core.options[m],o=(m,x)=>{this._checkReadonlyOptions(m),this._core.options[m]=x};for(const m in this._core.options){const x={get:l.bind(this,m),set:o.bind(this,m)};Object.defineProperty(this._publicOptions,m,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 g.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 l="none";switch(this._core.coreMouseService.activeProtocol){case"X10":l="x10";break;case"VT200":l="vt200";break;case"DRAG":l="drag";break;case"ANY":l="any"}return{applicationCursorKeysMode:h.applicationCursorKeys,applicationKeypadMode:h.applicationKeypad,bracketedPasteMode:h.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:l,originMode:h.origin,reverseWraparoundMode:h.reverseWraparound,sendFocusMode:h.sendFocus,wraparoundMode:h.wraparound}}get options(){return this._publicOptions}set options(h){for(const l in h)this._publicOptions[l]=h[l]}blur(){this._core.blur()}focus(){this._core.focus()}input(h,l=!0){this._core.input(h,l)}resize(h,l){this._verifyIntegers(h,l),this._core.resize(h,l)}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,l,o){this._verifyIntegers(h,l,o),this._core.select(h,l,o)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(h,l){this._verifyIntegers(h,l),this._core.selectLines(h,l)}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,l){this._core.write(h,l)}writeln(h,l){this._core.write(h),this._core.write(`\r
|
|
57
|
+
`,l)}paste(h){this._core.paste(h)}refresh(h,l){this._verifyIntegers(h,l),this._core.refresh(h,l)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(h){this._addonManager.loadAddon(this,h)}static get strings(){return n}_verifyIntegers(...h){for(const l of h)if(l===1/0||isNaN(l)||l%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...h){for(const l of h)if(l&&(l===1/0||isNaN(l)||l%1!=0||l<0))throw new Error("This API only accepts positive integers")}}j.Terminal=c})(),ne})()))})(Ol)),Ol.exports}var tg=eg(),kl={exports:{}},Vd;function ig(){return Vd||(Vd=1,(function(I,X){(function(G,B){I.exports=B()})(self,(()=>(()=>{var G={};return(()=>{var B=G;Object.defineProperty(B,"__esModule",{value:!0}),B.FitAddon=void 0,B.FitAddon=class{activate(ee){this._terminal=ee}dispose(){}fit(){const ee=this.proposeDimensions();if(!ee||!this._terminal||isNaN(ee.cols)||isNaN(ee.rows))return;const ne=this._terminal._core;this._terminal.rows===ee.rows&&this._terminal.cols===ee.cols||(ne._renderService.clear(),this._terminal.resize(ee.cols,ee.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const ee=this._terminal._core,ne=ee._renderService.dimensions;if(ne.css.cell.width===0||ne.css.cell.height===0)return;const j=this._terminal.options.scrollback===0?0:ee.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"))),g=f-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-j;return{cols:Math.max(2,Math.floor(g/ne.css.cell.width)),rows:Math.max(1,Math.floor(a/ne.css.cell.height))}}}})(),G})()))})(kl)),kl.exports}var sg=ig(),Hl={exports:{}},Kd;function rg(){return Kd||(Kd=1,(function(I,X){(function(G,B){I.exports=B()})(self,(()=>(()=>{var G={965:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GlyphRenderer=void 0;const f=u(374),_=u(509),a=u(855),g=u(859),b=u(381),y=11,c=y*Float32Array.BYTES_PER_ELEMENT;let r,h=0,l=0,o=0;class m extends g.Disposable{constructor(v,w,S,C){super(),this._terminal=v,this._gl=w,this._dimensions=S,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
|
|
58
|
+
layout (location = 0) in vec2 a_unitquad;
|
|
59
|
+
layout (location = 1) in vec2 a_cellpos;
|
|
60
|
+
layout (location = 2) in vec2 a_offset;
|
|
61
|
+
layout (location = 3) in vec2 a_size;
|
|
62
|
+
layout (location = 4) in float a_texpage;
|
|
63
|
+
layout (location = 5) in vec2 a_texcoord;
|
|
64
|
+
layout (location = 6) in vec2 a_texsize;
|
|
65
|
+
|
|
66
|
+
uniform mat4 u_projection;
|
|
67
|
+
uniform vec2 u_resolution;
|
|
68
|
+
|
|
69
|
+
out vec2 v_texcoord;
|
|
70
|
+
flat out int v_texpage;
|
|
71
|
+
|
|
72
|
+
void main() {
|
|
73
|
+
vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);
|
|
74
|
+
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
75
|
+
v_texpage = int(a_texpage);
|
|
76
|
+
v_texcoord = a_texcoord + a_unitquad * a_texsize;
|
|
77
|
+
}`,(function(U){let P="";for(let F=1;F<U;F++)P+=` else if (v_texpage == ${F}) { outColor = texture(u_texture[${F}], v_texcoord); }`;return`#version 300 es
|
|
78
|
+
precision lowp float;
|
|
79
|
+
|
|
80
|
+
in vec2 v_texcoord;
|
|
81
|
+
flat in int v_texpage;
|
|
82
|
+
|
|
83
|
+
uniform sampler2D u_texture[${U}];
|
|
84
|
+
|
|
85
|
+
out vec4 outColor;
|
|
86
|
+
|
|
87
|
+
void main() {
|
|
88
|
+
if (v_texpage == 0) {
|
|
89
|
+
outColor = texture(u_texture[0], v_texcoord);
|
|
90
|
+
} ${P}
|
|
91
|
+
}`})(_.TextureAtlas.maxAtlasPages))),this.register((0,g.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 R=new Float32Array([0,0,1,0,0,1,1,1]),E=L.createBuffer();this.register((0,g.toDisposable)((()=>L.deleteBuffer(E)))),L.bindBuffer(L.ARRAY_BUFFER,E),L.bufferData(L.ARRAY_BUFFER,R,L.STATIC_DRAW),L.enableVertexAttribArray(0),L.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const T=new Uint8Array([0,1,2,3]),k=L.createBuffer();this.register((0,g.toDisposable)((()=>L.deleteBuffer(k)))),L.bindBuffer(L.ELEMENT_ARRAY_BUFFER,k),L.bufferData(L.ELEMENT_ARRAY_BUFFER,T,L.STATIC_DRAW),this._attributesBuffer=(0,f.throwIfFalsy)(L.createBuffer()),this.register((0,g.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 W=new Int32Array(_.TextureAtlas.maxAtlasPages);for(let U=0;U<_.TextureAtlas.maxAtlasPages;U++)W[U]=U;L.uniform1iv(this._textureLocation,W),L.uniformMatrix4fv(this._projectionLocation,!1,b.PROJECTION_MATRIX),this._atlasTextures=[];for(let U=0;U<_.TextureAtlas.maxAtlasPages;U++){const P=new b.GLTexture((0,f.throwIfFalsy)(L.createTexture()));this.register((0,g.toDisposable)((()=>L.deleteTexture(P.texture)))),L.activeTexture(L.TEXTURE0+U),L.bindTexture(L.TEXTURE_2D,P.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[U]=P}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,w,S,C,L,R,E,T,k){this._updateCell(this._vertices.attributes,v,w,S,C,L,R,E,T,k)}_updateCell(v,w,S,C,L,R,E,T,k,W){h=(S*this._terminal.cols+w)*y,C!==a.NULL_CELL_CODE&&C!==void 0?this._atlas&&(r=T&&T.length>1?this._atlas.getRasterizedGlyphCombinedChar(T,L,R,E,!1):this._atlas.getRasterizedGlyph(C,L,R,E,!1),l=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),L!==W&&r.offset.x>l?(o=r.offset.x-l,v[h]=-(r.offset.x-o)+this._dimensions.device.char.left,v[h+1]=-r.offset.y+this._dimensions.device.char.top,v[h+2]=(r.size.x-o)/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+o/this._atlas.pages[r.texturePage].canvas.width,v[h+6]=r.texturePositionClipSpace.y,v[h+7]=r.sizeClipSpace.x-o/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,k,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,w=v.cols*v.rows*y;this._vertices.count!==w?this._vertices.attributes=new Float32Array(w):this._vertices.attributes.fill(0);let S=0;for(;S<this._vertices.attributesBuffers.length;S++)this._vertices.count!==w?this._vertices.attributesBuffers[S]=new Float32Array(w):this._vertices.attributesBuffers[S].fill(0);this._vertices.count=w,S=0;for(let C=0;C<v.rows;C++)for(let L=0;L<v.cols;L++)this._vertices.attributes[S+9]=L/v.cols,this._vertices.attributes[S+10]=C/v.rows,S+=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 w=this._gl;w.useProgram(this._program),w.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const S=this._vertices.attributesBuffers[this._activeBuffer];let C=0;for(let L=0;L<v.lineLengths.length;L++){const R=L*this._terminal.cols*y,E=this._vertices.attributes.subarray(R,R+v.lineLengths[L]*y);S.set(E,C),C+=E.length}w.bindBuffer(w.ARRAY_BUFFER,this._attributesBuffer),w.bufferData(w.ARRAY_BUFFER,S.subarray(0,C),w.STREAM_DRAW);for(let L=0;L<this._atlas.pages.length;L++)this._atlas.pages[L].version!==this._atlasTextures[L].version&&this._bindAtlasPageTexture(w,this._atlas,L);w.drawElementsInstanced(w.TRIANGLE_STRIP,4,w.UNSIGNED_BYTE,0,C/y)}setAtlas(v){this._atlas=v;for(const w of this._atlasTextures)w.version=-1}_bindAtlasPageTexture(v,w,S){v.activeTexture(v.TEXTURE0+S),v.bindTexture(v.TEXTURE_2D,this._atlasTextures[S].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,w.pages[S].canvas),v.generateMipmap(v.TEXTURE_2D),this._atlasTextures[S].version=w.pages[S].version}setDimensions(v){this._dimensions=v}}n.GlyphRenderer=m},742:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RectangleRenderer=void 0;const f=u(374),_=u(859),a=u(310),g=u(381),b=8*Float32Array.BYTES_PER_ELEMENT;class y{constructor(){this.attributes=new Float32Array(160),this.count=0}}let c=0,r=0,h=0,l=0,o=0,m=0,x=0;class v extends _.Disposable{constructor(S,C,L,R){super(),this._terminal=S,this._gl=C,this._dimensions=L,this._themeService=R,this._vertices=new y,this._verticesCursor=new y;const E=this._gl;this._program=(0,f.throwIfFalsy)((0,g.createProgram)(E,`#version 300 es
|
|
92
|
+
layout (location = 0) in vec2 a_position;
|
|
93
|
+
layout (location = 1) in vec2 a_size;
|
|
94
|
+
layout (location = 2) in vec4 a_color;
|
|
95
|
+
layout (location = 3) in vec2 a_unitquad;
|
|
96
|
+
|
|
97
|
+
uniform mat4 u_projection;
|
|
98
|
+
|
|
99
|
+
out vec4 v_color;
|
|
100
|
+
|
|
101
|
+
void main() {
|
|
102
|
+
vec2 zeroToOne = a_position + (a_unitquad * a_size);
|
|
103
|
+
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
104
|
+
v_color = a_color;
|
|
105
|
+
}`,`#version 300 es
|
|
106
|
+
precision lowp float;
|
|
107
|
+
|
|
108
|
+
in vec4 v_color;
|
|
109
|
+
|
|
110
|
+
out vec4 outColor;
|
|
111
|
+
|
|
112
|
+
void main() {
|
|
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 T=new Float32Array([0,0,1,0,0,1,1,1]),k=E.createBuffer();this.register((0,_.toDisposable)((()=>E.deleteBuffer(k)))),E.bindBuffer(E.ARRAY_BUFFER,k),E.bufferData(E.ARRAY_BUFFER,T,E.STATIC_DRAW),E.enableVertexAttribArray(3),E.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const W=new Uint8Array([0,1,2,3]),U=E.createBuffer();this.register((0,_.toDisposable)((()=>E.deleteBuffer(U)))),E.bindBuffer(E.ELEMENT_ARRAY_BUFFER,U),E.bufferData(E.ELEMENT_ARRAY_BUFFER,W,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(R.colors),this.register(this._themeService.onChangeColors((P=>{this._updateCachedColors(P),this._updateViewportRectangle()})))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(S){const C=this._gl;C.useProgram(this._program),C.bindVertexArray(this._vertexArrayObject),C.uniformMatrix4fv(this._projectionLocation,!1,g.PROJECTION_MATRIX),C.bindBuffer(C.ARRAY_BUFFER,this._attributesBuffer),C.bufferData(C.ARRAY_BUFFER,S.attributes,C.DYNAMIC_DRAW),C.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,C.UNSIGNED_BYTE,0,S.count)}handleResize(){this._updateViewportRectangle()}setDimensions(S){this._dimensions=S}_updateCachedColors(S){this._bgFloat=this._colorToFloat32Array(S.background),this._cursorFloat=this._colorToFloat32Array(S.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(S){const C=this._terminal,L=this._vertices;let R,E,T,k,W,U,P,F,D,O,M,H=1;for(R=0;R<C.rows;R++){for(T=-1,k=0,W=0,U=!1,E=0;E<C.cols;E++)P=(R*C.cols+E)*a.RENDER_MODEL_INDICIES_PER_CELL,F=S.cells[P+a.RENDER_MODEL_BG_OFFSET],D=S.cells[P+a.RENDER_MODEL_FG_OFFSET],O=!!(67108864&D),(F!==k||D!==W&&(U||O))&&((k!==0||U&&W!==0)&&(M=8*H++,this._updateRectangle(L,M,W,k,T,E,R)),T=E,k=F,W=D,U=O);(k!==0||U&&W!==0)&&(M=8*H++,this._updateRectangle(L,M,W,k,T,C.cols,R))}L.count=H}updateCursor(S){const C=this._verticesCursor,L=S.cursor;if(!L||L.style==="block")return void(C.count=0);let R,E=0;L.style!=="bar"&&L.style!=="outline"||(R=8*E++,this._addRectangleFloat(C.attributes,R,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"||(R=8*E++,this._addRectangleFloat(C.attributes,R,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"&&(R=8*E++,this._addRectangleFloat(C.attributes,R,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),R=8*E++,this._addRectangleFloat(C.attributes,R,(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(S,C,L,R,E,T,k){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&R){case 16777216:case 33554432:c=this._themeService.colors.ansi[255&R].rgba;break;case 50331648:c=(16777215&R)<<8;break;default:c=this._themeService.colors.background.rgba}S.attributes.length<C+4&&(S.attributes=(0,g.expandFloat32Array)(S.attributes,this._terminal.rows*this._terminal.cols*8)),r=E*this._dimensions.device.cell.width,h=k*this._dimensions.device.cell.height,l=(c>>24&255)/255,o=(c>>16&255)/255,m=(c>>8&255)/255,x=1,this._addRectangle(S.attributes,C,r,h,(T-E)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,l,o,m,x)}_addRectangle(S,C,L,R,E,T,k,W,U,P){S[C]=L/this._dimensions.device.canvas.width,S[C+1]=R/this._dimensions.device.canvas.height,S[C+2]=E/this._dimensions.device.canvas.width,S[C+3]=T/this._dimensions.device.canvas.height,S[C+4]=k,S[C+5]=W,S[C+6]=U,S[C+7]=P}_addRectangleFloat(S,C,L,R,E,T,k){S[C]=L/this._dimensions.device.canvas.width,S[C+1]=R/this._dimensions.device.canvas.height,S[C+2]=E/this._dimensions.device.canvas.width,S[C+3]=T/this._dimensions.device.canvas.height,S[C+4]=k[0],S[C+5]=k[1],S[C+6]=k[2],S[C+7]=k[3]}_colorToFloat32Array(S){return new Float32Array([(S.rgba>>24&255)/255,(S.rgba>>16&255)/255,(S.rgba>>8&255)/255,(255&S.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 g=_*a*n.RENDER_MODEL_INDICIES_PER_CELL;g!==this.cells.length&&(this.cells=new Uint32Array(g),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),g=u(457),b=u(56),y=u(374),c=u(345),r=u(859),h=u(147),l=u(782),o=u(855),m=u(965),x=u(742),v=u(310),w=u(733);class S extends r.Disposable{constructor(E,T,k,W,U,P,F,D,O){super(),this._terminal=E,this._characterJoinerService=T,this._charSizeService=k,this._coreBrowserService=W,this._coreService=U,this._decorationService=P,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 l.CellData,this._workCell2=new l.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 w.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 M={antialias:!1,depth:!1,preserveDrawingBuffer:O};if(this._gl=this._canvas.getContext("webgl2",M),!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,$)=>this._setCanvasDevicePixelDimensions(H,$))),this.register(this._coreBrowserService.onWindowChange((H=>{this._observerDisposable.value=(0,b.observeDevicePixelDimensions)(this._canvas,H,(($,K)=>this._setCanvasDevicePixelDimensions($,K)))}))),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 $ of this._renderLayers)$.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,T){var k,W,U,P;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`,(k=this._rectangleRenderer.value)==null||k.setDimensions(this.dimensions),(W=this._rectangleRenderer.value)==null||W.handleResize(),(U=this._glyphRenderer.value)==null||U.setDimensions(this.dimensions),(P=this._glyphRenderer.value)==null||P.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var E;for(const T of this._renderLayers)T.handleBlur(this._terminal);(E=this._cursorBlinkStateManager.value)==null||E.pause(),this._requestRedrawViewport()}handleFocus(){var E;for(const T of this._renderLayers)T.handleFocus(this._terminal);(E=this._cursorBlinkStateManager.value)==null||E.resume(),this._requestRedrawViewport()}handleSelectionChanged(E,T,k){for(const W of this._renderLayers)W.handleSelectionChanged(this._terminal,E,T,k);this._model.selection.update(this._core,E,T,k),this._requestRedrawViewport()}handleCursorMove(){var E;for(const T of this._renderLayers)T.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 m.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var T;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(),(T=this._glyphRenderer.value)==null||T.setAtlas(this._charAtlas)}_clearModel(E){var T;this._model.clear(),E&&((T=this._glyphRenderer.value)==null||T.clear())}clearTextureAtlas(){var E;(E=this._charAtlas)==null||E.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var E;this._clearModel(!0);for(const T of this._renderLayers)T.reset(this._terminal);(E=this._cursorBlinkStateManager.value)==null||E.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(E){return-1}deregisterCharacterJoiner(E){return!1}renderRows(E,T){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 k of this._renderLayers)k.handleGridChanged(this._terminal,E,T);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(E,T),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 g.CursorBlinkStateManager((()=>{this._requestRedrawCursor()}),this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(E,T){const k=this._core;let W,U,P,F,D,O,M,H,$,K,ce,oe,q,z,te=this._workCell;E=L(E,k.rows-1,0),T=L(T,k.rows-1,0);const J=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,_e=J-k.buffer.ydisp,fe=Math.min(this._terminal.buffer.active.cursorX,k.cols-1);let Me=-1;const ve=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let Oe=!1;for(U=E;U<=T;U++)for(P=U+k.buffer.ydisp,F=k.buffer.lines.get(P),this._model.lineLengths[U]=0,D=this._characterJoinerService.getJoinedCharacters(P),q=0;q<k.cols;q++)if(W=this._cellColorResolver.result.bg,F.loadCell(q,te),q===0&&(W=this._cellColorResolver.result.bg),O=!1,M=q,D.length>0&&q===D[0][0]&&(O=!0,H=D.shift(),te=new C(te,F.translateToString(!0,H[0],H[1]),H[1]-H[0]),M=H[1]-1),$=te.getChars(),K=te.getCode(),oe=(U*k.cols+q)*v.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(te,q,P,this.dimensions.device.cell.width),ve&&P===J&&(q===fe&&(this._model.cursor={x:fe,y:_e,width:te.getWidth(),style:this._coreBrowserService.isFocused?k.options.cursorStyle||"block":k.options.cursorInactiveStyle,cursorWidth:k.options.cursorWidth,dpr:this._devicePixelRatio},Me=fe+te.getWidth()-1),q>=fe&&q<=Me&&(this._coreBrowserService.isFocused&&(k.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&k.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)),K!==o.NULL_CELL_CODE&&(this._model.lineLengths[U]=q+1),(this._model.cells[oe]!==K||this._model.cells[oe+v.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[oe+v.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[oe+v.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(Oe=!0,$.length>1&&(K|=v.COMBINED_CHAR_BIT_MASK),this._model.cells[oe]=K,this._model.cells[oe+v.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[oe+v.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[oe+v.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,ce=te.getWidth(),this._glyphRenderer.value.updateCell(q,U,K,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,$,ce,W),O))for(te=this._workCell,q++;q<M;q++)z=(U*k.cols+q)*v.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(q,U,o.NULL_CELL_CODE,0,0,0,o.NULL_CELL_CHAR,0,0),this._model.cells[z]=o.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,T){this._canvas.width===E&&this._canvas.height===T||(this._canvas.width=E,this._canvas.height=T,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=S;class C extends h.AttributeData{constructor(E,T,k){super(),this.content=0,this.combinedData="",this.fg=E.fg,this.bg=E.bg,this.combinedData=T,this._width=k}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(R,E,T=0){return Math.max(Math.min(R,E),T)}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,g,b){const y=(0,f.throwIfFalsy)(a.createShader(g));if(a.shaderSource(y,b),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,g,b){const y=(0,f.throwIfFalsy)(a.createProgram());if(a.attachShader(y,(0,f.throwIfFalsy)(_(a,a.VERTEX_SHADER,g))),a.attachShader(y,(0,f.throwIfFalsy)(_(a,a.FRAGMENT_SHADER,b))),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,g){const b=Math.min(2*a.length,g),y=new Float32Array(b);for(let c=0;c<a.length;c++)y[c]=a[c];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),g=u(859);class b extends g.Disposable{constructor(c,r,h,l,o,m,x,v){super(),this._container=r,this._alpha=o,this._coreBrowserService=m,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=l.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors((w=>{this._refreshCharAtlas(c,w),this.reset(c)}))),this.register((0,g.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,l=!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,l){this._alpha?this._ctx.clearRect(c*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,l*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(c*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,l*this._deviceCellHeight))}_fillCharTrueColor(c,r,h,l){this._ctx.font=this._getFont(c,!1,!1),this._ctx.textBaseline=_.TEXT_BASELINE,this._clipCell(h,l,r.getWidth()),this._ctx.fillText(r.getChars(),h*this._deviceCellWidth+this._deviceCharLeft,l*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:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkRenderLayer=void 0;const f=u(197),_=u(237),a=u(592);class g extends a.BaseRenderLayer{constructor(y,c,r,h,l,o,m){super(r,y,"link",c,!0,l,o,m),this.register(h.onShowLinkUnderline((x=>this._handleShowLinkUnderline(x)))),this.register(h.onHideLinkUnderline((x=>this._handleHideLinkUnderline(x))))}resize(y,c){super.resize(y,c),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 c=y.y1+1;c<y.y2;c++)this._fillBottomLineAtCells(0,c,y.cols);this._fillBottomLineAtCells(0,y.y2,y.x2)}this._state=y}_handleHideLinkUnderline(y){this._clearCurrentLink()}}n.LinkRenderLayer=g},820:(j,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(u,f,_,a){u.addEventListener(f,_,a);let g=!1;return{dispose:()=>{g||(g=!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 g,b=0,y=0,c=!1,r=!1,h=!1,l=0;n.CellColorResolver=class{constructor(o,m,x,v,w,S){this._terminal=o,this._optionService=m,this._selectionRenderModel=x,this._decorationService=v,this._coreBrowserService=w,this._themeService=S,this.result={fg:0,bg:0,ext:0}}resolve(o,m,x,v){if(this.result.bg=o.bg,this.result.fg=o.fg,this.result.ext=268435456&o.bg?o.extended.ext:0,y=0,b=0,r=!1,c=!1,h=!1,g=this._themeService.colors,l=0,o.getCode()!==f.NULL_CELL_CODE&&o.extended.underlineStyle===4){const w=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));l=m*v%(2*Math.round(w))}if(this._decorationService.forEachDecorationAtCell(m,x,"bottom",(w=>{w.backgroundColorRGB&&(y=w.backgroundColorRGB.rgba>>8&16777215,r=!0),w.foregroundColorRGB&&(b=w.foregroundColorRGB.rgba>>8&16777215,c=!0)})),h=this._selectionRenderModel.isCellSelected(this._terminal,m,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?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else y=(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(r=!0,g.selectionForeground&&(b=g.selectionForeground.rgba>>8&16777215,c=!0),(0,a.treatGlyphAsBackgroundColor)(o.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)b=(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432: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?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}c=!0}}this._decorationService.forEachDecorationAtCell(m,x,"top",(w=>{w.backgroundColorRGB&&(y=w.backgroundColorRGB.rgba>>8&16777215,r=!0),w.foregroundColorRGB&&(b=w.foregroundColorRGB.rgba>>8&16777215,c=!0)})),r&&(y=h?-16777216&o.bg&-134217729|y|50331648:-16777216&o.bg|y|50331648),c&&(b=-16777216&o.fg&-67108865|b|50331648),67108864&this.result.fg&&(r&&!c&&(b=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&g.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,c=!0),!r&&c&&(y=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&g.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,r=!0)),g=void 0,this.result.bg=r?y:this.result.bg,this.result.fg=c?b:this.result.fg,this.result.ext&=536870911,this.result.ext|=l<<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(g,b,y,c,r,h,l,o){const m=(0,_.generateConfig)(c,r,h,l,b,y,o);for(let w=0;w<a.length;w++){const S=a[w],C=S.ownedBy.indexOf(g);if(C>=0){if((0,_.configEquals)(S.config,m))return S.atlas;S.ownedBy.length===1?(S.atlas.dispose(),a.splice(w,1)):S.ownedBy.splice(C,1);break}}for(let w=0;w<a.length;w++){const S=a[w];if((0,_.configEquals)(S.config,m))return S.ownedBy.push(g),S.atlas}const x=g._core,v={atlas:new f.TextureAtlas(document,m,x.unicodeService),config:m,ownedBy:[g]};return a.push(v),v.atlas},n.removeTerminalFromCache=function(g){for(let b=0;b<a.length;b++){const y=a[b].ownedBy.indexOf(g);if(y!==-1){a[b].ownedBy.length===1?(a[b].atlas.dispose(),a.splice(b,1)):a[b].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,g,b,y,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:y.customGlyphs,devicePixelRatio:r,letterSpacing:y.letterSpacing,lineHeight:y.lineHeight,deviceCellWidth:_,deviceCellHeight:a,deviceCharWidth:g,deviceCharHeight:b,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 g=0;g<_.colors.ansi.length;g++)if(_.colors.ansi[g].rgba!==a.colors.ansi[g].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:(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,l,o,m,x,v){const w=n.blockElementDefinitions[r];if(w)return(function(R,E,T,k,W,U){for(let P=0;P<E.length;P++){const F=E[P],D=W/8,O=U/8;R.fillRect(T+F.x*D,k+F.y*O,F.w*D,F.h*O)}})(c,w,h,l,o,m),!0;const S=_[r];if(S)return(function(R,E,T,k,W,U){let P=a.get(E);P||(P=new Map,a.set(E,P));const F=R.fillStyle;if(typeof F!="string")throw new Error(`Unexpected fillStyle type "${F}"`);let D=P.get(F);if(!D){const O=E[0].length,M=E.length,H=R.canvas.ownerDocument.createElement("canvas");H.width=O,H.height=M;const $=(0,f.throwIfFalsy)(H.getContext("2d")),K=new ImageData(O,M);let ce,oe,q,z;if(F.startsWith("#"))ce=parseInt(F.slice(1,3),16),oe=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`);[ce,oe,q,z]=F.substring(5,F.length-1).split(",").map((te=>parseFloat(te)))}for(let te=0;te<M;te++)for(let J=0;J<O;J++)K.data[4*(te*O+J)]=ce,K.data[4*(te*O+J)+1]=oe,K.data[4*(te*O+J)+2]=q,K.data[4*(te*O+J)+3]=E[te][J]*(255*z);$.putImageData(K,0,0),D=(0,f.throwIfFalsy)(R.createPattern(H,null)),P.set(F,D)}R.fillStyle=D,R.fillRect(T,k,W,U)})(c,S,h,l,o,m),!0;const C=n.boxDrawingDefinitions[r];if(C)return(function(R,E,T,k,W,U,P){R.strokeStyle=R.fillStyle;for(const[F,D]of Object.entries(E)){let O;R.beginPath(),R.lineWidth=P*Number.parseInt(F),O=typeof D=="function"?D(.15,.15/U*W):D;for(const M of O.split(" ")){const H=M[0],$=b[H];if(!$){console.error(`Could not find drawing instructions for "${H}"`);continue}const K=M.substring(1).split(",");K[0]&&K[1]&&$(R,y(K,W,U,T,k,!0,P))}R.stroke(),R.closePath()}})(c,C,h,l,o,m,v),!0;const L=n.powerlineDefinitions[r];return!!L&&((function(R,E,T,k,W,U,P,F){const D=new Path2D;D.rect(T,k,W,U),R.clip(D),R.beginPath();const O=P/12;R.lineWidth=F*O;for(const M of E.d.split(" ")){const H=M[0],$=b[H];if(!$){console.error(`Could not find drawing instructions for "${H}"`);continue}const K=M.substring(1).split(",");K[0]&&K[1]&&$(R,y(K,W,U,T,k,!1,F,(E.leftPadding??0)*(O/2),(E.rightPadding??0)*(O/2)))}E.type===1?(R.strokeStyle=R.fillStyle,R.stroke()):R.fill(),R.closePath()})(c,L,h,l,o,m,x,v),!0)};const a=new Map;function g(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 y(c,r,h,l,o,m,x,v=0,w=0){const S=c.map((C=>parseFloat(C)||parseInt(C)));if(S.length<2)throw new Error("Too few arguments for instruction");for(let C=0;C<S.length;C+=2)S[C]*=r-v*x-w*x,m&&S[C]!==0&&(S[C]=g(Math.round(S[C]+.5)-.5,r,0)),S[C]+=l+v*x;for(let C=1;C<S.length;C+=2)S[C]*=h,m&&S[C]!==0&&(S[C]=g(Math.round(S[C]+.5)-.5,h,0)),S[C]+=o;return S}},56:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.observeDevicePixelDimensions=void 0;const f=u(859);n.observeDevicePixelDimensions=function(_,a,g){let b=new a.ResizeObserver((y=>{const c=y.find((l=>l.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&&g(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:(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,g,b){return a===1&&g>Math.ceil(1.5*b)&&_!==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,g=0){return(_-(2*Math.round(a)-g))%(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,g,b=!1){if(this.selectionStart=a,this.selectionEnd=g,!a||!g||a[0]===g[0]&&a[1]===g[1])return void this.clear();const y=_.buffers.active.ydisp,c=a[1]-y,r=g[1]-y,h=Math.max(c,0),l=Math.min(r,_.rows-1);h>=_.rows||l<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=b,this.viewportStartRow=c,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=l,this.startCol=a[0],this.endCol=g[0])}isCellSelected(_,a,g){return!!this.hasSelection&&(g-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?a>=this.startCol&&g>=this.viewportCappedStartRow&&a<this.endCol&&g<=this.viewportCappedEndRow:a<this.startCol&&g>=this.viewportCappedStartRow&&a>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&a>=this.startCol&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===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),g=u(160),b=u(345),y=u(485),c=u(385),r=u(147),h=u(855),l={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let o;class m{get pages(){return this._pages}constructor(C,L,R){this._document=C,this._config=L,this._unicodeService=R,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 b.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new b.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=w(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 R=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,R)}}))}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(m.maxAtlasPages&&this._pages.length>=Math.max(4,m.maxAtlasPages)){const L=this._pages.filter((P=>2*P.canvas.width<=(m.maxTextureSize||4096))).sort(((P,F)=>F.canvas.width!==P.canvas.width?F.canvas.width-P.canvas.width:F.percentageUsed-P.percentageUsed));let R=-1,E=0;for(let P=0;P<L.length;P++)if(L[P].canvas.width!==E)R=P,E=L[P].canvas.width;else if(P-R==3)break;const T=L.slice(R,R+4),k=T.map((P=>P.glyphs[0].texturePage)).sort(((P,F)=>P>F?1:-1)),W=this.pages.length-T.length,U=this._mergePages(T,W);U.version++;for(let P=k.length-1;P>=0;P--)this._deletePage(k[P]);this.pages.push(U),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(U.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 R=2*C[0].canvas.width,E=new x(this._document,R,C);for(const[T,k]of C.entries()){const W=T*k.canvas.width%R,U=Math.floor(T/2)*k.canvas.height;E.ctx.drawImage(k.canvas,W,U);for(const F of k.glyphs)F.texturePage=L,F.sizeClipSpace.x=F.size.x/R,F.sizeClipSpace.y=F.size.y/R,F.texturePosition.x+=W,F.texturePosition.y+=U,F.texturePositionClipSpace.x=F.texturePosition.x/R,F.texturePositionClipSpace.y=F.texturePosition.y/R;this._onRemoveTextureAtlasCanvas.fire(k.canvas);const P=this._activePages.indexOf(k);P!==-1&&this._activePages.splice(P,1)}return E}_deletePage(C){this._pages.splice(C,1);for(let L=C;L<this._pages.length;L++){const R=this._pages[L];for(const E of R.glyphs)E.texturePage--;R.version++}}getRasterizedGlyphCombinedChar(C,L,R,E,T){return this._getFromCacheMap(this._cacheMapCombined,C,L,R,E,T)}getRasterizedGlyph(C,L,R,E,T){return this._getFromCacheMap(this._cacheMap,C,L,R,E,T)}_getFromCacheMap(C,L,R,E,T,k=!1){return o=C.get(L,R,E,T),o||(o=this._drawToCache(L,R,E,T,k),C.set(L,R,E,T,o)),o}_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,R,E){if(this._config.allowTransparency)return g.NULL_COLOR;let T;switch(C){case 16777216:case 33554432:T=this._getColorFromAnsiIndex(L);break;case 50331648:const k=r.AttributeData.toColorRGB(L);T=g.channels.toColor(k[0],k[1],k[2]);break;default:T=R?g.color.opaque(this._config.colors.foreground):this._config.colors.background}return T}_getForegroundColor(C,L,R,E,T,k,W,U,P,F){const D=this._getMinimumContrastColor(C,L,R,E,T,k,W,P,U,F);if(D)return D;let O;switch(T){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&P&&k<8&&(k+=8),O=this._getColorFromAnsiIndex(k);break;case 50331648:const M=r.AttributeData.toColorRGB(k);O=g.channels.toColor(M[0],M[1],M[2]);break;default:O=W?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(O=g.color.opaque(O)),U&&(O=g.color.multiplyOpacity(O,f.DIM_OPACITY)),O}_resolveBackgroundRgba(C,L,R){switch(C){case 16777216:case 33554432:return this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return R?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(C,L,R,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 R?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(C,L,R,E,T,k,W,U,P,F){if(this._config.minimumContrastRatio===1||F)return;const D=this._getContrastCache(P),O=D.getColor(C,E);if(O!==void 0)return O||void 0;const M=this._resolveBackgroundRgba(L,R,W),H=this._resolveForegroundRgba(T,k,W,U),$=g.rgba.ensureContrastRatio(M,H,this._config.minimumContrastRatio/(P?2:1));if(!$)return void D.setColor(C,E,null);const K=g.channels.toColor($>>24&255,$>>16&255,$>>8&255);return D.setColor(C,E,K),K}_getContrastCache(C){return C?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(C,L,R,E,T=!1){const k=typeof C=="number"?String.fromCharCode(C):C,W=Math.min(this._config.deviceCellWidth*Math.max(k.length,2)+4,this._textureSize);this._tmpCanvas.width<W&&(this._tmpCanvas.width=W);const U=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<U&&(this._tmpCanvas.height=U),this._tmpCtx.save(),this._workAttributeData.fg=R,this._workAttributeData.bg=L,this._workAttributeData.extended.ext=E,this._workAttributeData.isInvisible())return l;const P=!!this._workAttributeData.isBold(),F=!!this._workAttributeData.isInverse(),D=!!this._workAttributeData.isDim(),O=!!this._workAttributeData.isItalic(),M=!!this._workAttributeData.isUnderline(),H=!!this._workAttributeData.isStrikethrough(),$=!!this._workAttributeData.isOverline();let K=this._workAttributeData.getFgColor(),ce=this._workAttributeData.getFgColorMode(),oe=this._workAttributeData.getBgColor(),q=this._workAttributeData.getBgColorMode();if(F){const ue=K;K=oe,oe=ue;const ge=ce;ce=q,q=ge}const z=this._getBackgroundColor(q,oe,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 te=P?this._config.fontWeightBold:this._config.fontWeight,J=O?"italic":"";this._tmpCtx.font=`${J} ${te} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=f.TEXT_BASELINE;const _e=k.length===1&&(0,a.isPowerlineGlyph)(k.charCodeAt(0)),fe=k.length===1&&(0,a.isRestrictedPowerlineGlyph)(k.charCodeAt(0)),Me=this._getForegroundColor(L,q,oe,R,ce,K,F,D,P,(0,a.treatGlyphAsBackgroundColor)(k.charCodeAt(0)));this._tmpCtx.fillStyle=Me.css;const ve=fe?0:4;let Oe=!1;this._config.customGlyphs!==!1&&(Oe=(0,_.tryDrawCustomChar)(this._tmpCtx,k,ve,ve,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let qe,we=!_e;if(qe=typeof C=="number"?this._unicodeService.wcwidth(C):this._unicodeService.getStringCellWidth(C),M){this._tmpCtx.save();const ue=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=ue%2==1?.5:0;if(this._tmpCtx.lineWidth=ue,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())we=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{we=!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 Ne=ve,Re=Math.ceil(ve+this._config.deviceCharHeight)-ge-(T?2*ue:0),_t=Re+ue,Qe=Re+2*ue;let it=this._workAttributeData.getUnderlineVariantOffset();for(let Ie=0;Ie<qe;Ie++){this._tmpCtx.save();const Ae=Ne+Ie*this._config.deviceCellWidth,Le=Ne+(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=ue<=1?Qe:Math.ceil(ve+this._config.deviceCharHeight-ue/2)-ge,vt=ue<=1?Re:Math.ceil(ve+this._config.deviceCharHeight+ue/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>=ue?2*ue-it:ue-it;it>=ue||Zt===0?(this._tmpCtx.setLineDash([Math.round(ue),Math.round(ue)]),this._tmpCtx.moveTo(Ae+Zt,Re),this._tmpCtx.lineTo(Le,Re)):(this._tmpCtx.setLineDash([Math.round(ue),Math.round(ue)]),this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Ae+Zt,Re),this._tmpCtx.moveTo(Ae+Zt+ue,Re),this._tmpCtx.lineTo(Le,Re)),it=(0,a.computeNextVariantOffset)(Le-Ae,ue,it);break;case 5:const tr=.6,ir=.3,Ft=Le-Ae,ri=Math.floor(tr*Ft),ni=Math.floor(ir*Ft),Jt=Ft-ri-ni;this._tmpCtx.setLineDash([ri,ni,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&&k!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Ie=this._tmpCtx.measureText(k);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Ie&&Ie.actualBoundingBoxDescent>0){this._tmpCtx.save();const Ae=new Path2D;Ae.rect(Ne,Re-Math.ceil(ue/2),this._config.deviceCellWidth*qe,Qe-Re+Math.ceil(ue/2)),this._tmpCtx.clip(Ae),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=z.css,this._tmpCtx.strokeText(k,ve,ve+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if($){const ue=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=ue%2==1?.5:0;this._tmpCtx.lineWidth=ue,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(ve,ve+ge),this._tmpCtx.lineTo(ve+this._config.deviceCharWidth*qe,ve+ge),this._tmpCtx.stroke()}if(Oe||this._tmpCtx.fillText(k,ve,ve+this._config.deviceCharHeight),k==="_"&&!this._config.allowTransparency){let ue=v(this._tmpCtx.getImageData(ve,ve,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Me,we);if(ue)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(k,ve,ve+this._config.deviceCharHeight-ge),ue=v(this._tmpCtx.getImageData(ve,ve,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Me,we),ue);ge++);}if(H){const ue=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),ge=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=ue,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(ve,ve+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.lineTo(ve+this._config.deviceCharWidth*qe,ve+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(ue){for(let ge=0;ge<ue.data.length;ge+=4)if(ue.data[ge+3]>0)return!1;return!0})(ft):v(ft,z,Me,we),Ot)return l;const Se=this._findGlyphBoundingBox(ft,this._workBoundingBox,W,fe,Oe,ve);let pe,me;for(;;){if(this._activePages.length===0){const ue=this._createNewPage();pe=ue,me=ue.currentRow,me.height=Se.size.y;break}pe=this._activePages[this._activePages.length-1],me=pe.currentRow;for(const ue of this._activePages)Se.size.y<=ue.currentRow.height&&(pe=ue,me=ue.currentRow);for(let ue=this._activePages.length-1;ue>=0;ue--)for(const ge of this._activePages[ue].fixedRows)ge.height<=me.height&&Se.size.y<=ge.height&&(pe=this._activePages[ue],me=ge);if(me.y+Se.size.y>=pe.canvas.height||me.height>Se.size.y+2){let ue=!1;if(pe.currentRow.y+pe.currentRow.height+Se.size.y>=pe.canvas.height){let ge;for(const Ne of this._activePages)if(Ne.currentRow.y+Ne.currentRow.height+Se.size.y<Ne.canvas.height){ge=Ne;break}if(ge)pe=ge;else if(m.maxAtlasPages&&this._pages.length>=m.maxAtlasPages&&me.y+Se.size.y<=pe.canvas.height&&me.height>=Se.size.y&&me.x+Se.size.x<=pe.canvas.width)ue=!0;else{const Ne=this._createNewPage();pe=Ne,me=Ne.currentRow,me.height=Se.size.y,ue=!0}}ue||(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,R,E,T,k){L.top=0;const W=E?this._config.deviceCellHeight:this._tmpCanvas.height,U=E?this._config.deviceCellWidth:R;let P=!1;for(let F=0;F<W;F++){for(let D=0;D<U;D++){const O=F*this._tmpCanvas.width*4+4*D+3;if(C.data[O]!==0){L.top=F,P=!0;break}}if(P)break}L.left=0,P=!1;for(let F=0;F<k+U;F++){for(let D=0;D<W;D++){const O=D*this._tmpCanvas.width*4+4*F+3;if(C.data[O]!==0){L.left=F,P=!0;break}}if(P)break}L.right=U,P=!1;for(let F=k+U-1;F>=k;F--){for(let D=0;D<W;D++){const O=D*this._tmpCanvas.width*4+4*F+3;if(C.data[O]!==0){L.right=F,P=!0;break}}if(P)break}L.bottom=W,P=!1;for(let F=W-1;F>=0;F--){for(let D=0;D<U;D++){const O=F*this._tmpCanvas.width*4+4*D+3;if(C.data[O]!==0){L.bottom=F,P=!0;break}}if(P)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+k+(E||T?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-L.top+k+(E||T?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}n.TextureAtlas=m;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,R){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],R)for(const E of R)this._glyphs.push(...E.glyphs),this._usedPixels+=E._usedPixels;this.canvas=w(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(S,C,L,R){const E=C.rgba>>>24,T=C.rgba>>>16&255,k=C.rgba>>>8&255,W=L.rgba>>>24,U=L.rgba>>>16&255,P=L.rgba>>>8&255,F=Math.floor((Math.abs(E-W)+Math.abs(T-U)+Math.abs(k-P))/12);let D=!0;for(let O=0;O<S.data.length;O+=4)S.data[O]===E&&S.data[O+1]===T&&S.data[O+2]===k||R&&Math.abs(S.data[O]-E)+Math.abs(S.data[O+1]-T)+Math.abs(S.data[O+2]-k)<F?S.data[O+3]=0:D=!1;return D}function w(S,C,L){const R=S.createElement("canvas");return R.width=C,R.height=L,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 g,b,y,c,r;function h(o){const m=o.toString(16);return m.length<2?"0"+m:m}function l(o,m){return o<m?(m+.05)/(o+.05):(o+.05)/(m+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(o){o.toCss=function(m,x,v,w){return w!==void 0?`#${h(m)}${h(x)}${h(v)}${h(w)}`:`#${h(m)}${h(x)}${h(v)}`},o.toRgba=function(m,x,v,w=255){return(m<<24|x<<16|v<<8|w)>>>0},o.toColor=function(m,x,v,w){return{css:o.toCss(m,x,v,w),rgba:o.toRgba(m,x,v,w)}}})(g||(n.channels=g={})),(function(o){function m(x,v){return a=Math.round(255*v),[u,f,_]=r.toChannels(x.rgba),{css:g.toCss(u,f,_,a),rgba:g.toRgba(u,f,_,a)}}o.blend=function(x,v){if(a=(255&v.rgba)/255,a===1)return{css:v.css,rgba:v.rgba};const w=v.rgba>>24&255,S=v.rgba>>16&255,C=v.rgba>>8&255,L=x.rgba>>24&255,R=x.rgba>>16&255,E=x.rgba>>8&255;return u=L+Math.round((w-L)*a),f=R+Math.round((S-R)*a),_=E+Math.round((C-E)*a),{css:g.toCss(u,f,_),rgba:g.toRgba(u,f,_)}},o.isOpaque=function(x){return(255&x.rgba)==255},o.ensureContrastRatio=function(x,v,w){const S=r.ensureContrastRatio(x.rgba,v.rgba,w);if(S)return g.toColor(S>>24&255,S>>16&255,S>>8&255)},o.opaque=function(x){const v=(255|x.rgba)>>>0;return[u,f,_]=r.toChannels(v),{css:g.toCss(u,f,_),rgba:v}},o.opacity=m,o.multiplyOpacity=function(x,v){return a=255&x.rgba,m(x,a*v/255)},o.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(b||(n.color=b={})),(function(o){let m,x;try{const v=document.createElement("canvas");v.width=1,v.height=1;const w=v.getContext("2d",{willReadFrequently:!0});w&&(m=w,m.globalCompositeOperation="copy",x=m.createLinearGradient(0,0,1,1))}catch{}o.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),g.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),g.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 w=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(w)return u=parseInt(w[1]),f=parseInt(w[2]),_=parseInt(w[3]),a=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),g.toColor(u,f,_,a);if(!m||!x)throw new Error("css.toColor: Unsupported css format");if(m.fillStyle=x,m.fillStyle=v,typeof m.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(m.fillRect(0,0,1,1),[u,f,_,a]=m.getImageData(0,0,1,1).data,a!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(u,f,_,a),css:v}}})(y||(n.css=y={})),(function(o){function m(x,v,w){const S=x/255,C=v/255,L=w/255;return .2126*(S<=.03928?S/12.92:Math.pow((S+.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))}o.relativeLuminance=function(x){return m(x>>16&255,x>>8&255,255&x)},o.relativeLuminance2=m})(c||(n.rgb=c={})),(function(o){function m(v,w,S){const C=v>>24&255,L=v>>16&255,R=v>>8&255;let E=w>>24&255,T=w>>16&255,k=w>>8&255,W=l(c.relativeLuminance2(E,T,k),c.relativeLuminance2(C,L,R));for(;W<S&&(E>0||T>0||k>0);)E-=Math.max(0,Math.ceil(.1*E)),T-=Math.max(0,Math.ceil(.1*T)),k-=Math.max(0,Math.ceil(.1*k)),W=l(c.relativeLuminance2(E,T,k),c.relativeLuminance2(C,L,R));return(E<<24|T<<16|k<<8|255)>>>0}function x(v,w,S){const C=v>>24&255,L=v>>16&255,R=v>>8&255;let E=w>>24&255,T=w>>16&255,k=w>>8&255,W=l(c.relativeLuminance2(E,T,k),c.relativeLuminance2(C,L,R));for(;W<S&&(E<255||T<255||k<255);)E=Math.min(255,E+Math.ceil(.1*(255-E))),T=Math.min(255,T+Math.ceil(.1*(255-T))),k=Math.min(255,k+Math.ceil(.1*(255-k))),W=l(c.relativeLuminance2(E,T,k),c.relativeLuminance2(C,L,R));return(E<<24|T<<16|k<<8|255)>>>0}o.blend=function(v,w){if(a=(255&w)/255,a===1)return w;const S=w>>24&255,C=w>>16&255,L=w>>8&255,R=v>>24&255,E=v>>16&255,T=v>>8&255;return u=R+Math.round((S-R)*a),f=E+Math.round((C-E)*a),_=T+Math.round((L-T)*a),g.toRgba(u,f,_)},o.ensureContrastRatio=function(v,w,S){const C=c.relativeLuminance(v>>8),L=c.relativeLuminance(w>>8);if(l(C,L)<S){if(L<C){const T=m(v,w,S),k=l(C,c.relativeLuminance(T>>8));if(k<S){const W=x(v,w,S);return k>l(C,c.relativeLuminance(W>>8))?T:W}return T}const R=x(v,w,S),E=l(C,c.relativeLuminance(R>>8));if(E<S){const T=m(v,w,S);return E>l(C,c.relativeLuminance(T>>8))?R:T}return R}},o.reduceLuminance=m,o.increaseLuminance=x,o.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=l},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,g){this._data[_]||(this._data[_]={}),this._data[_][a]=g}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,g,b){this._data.get(f,_)||this._data.set(f,_,new u),this._data.get(f,_).set(a,g,b)}get(f,_,a,g){var b;return(b=this._data.get(f,_))==null?void 0:b.get(a,g)}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(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 y=0,c=0,r=b.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),c=Math.max(y,c),h=b.timeRemaining(),1.5*c>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(b){return setTimeout((()=>b(this._createDeadline(16))))}_cancelCallback(b){clearTimeout(b)}_createDeadline(b){const y=Date.now()+b;return{timeRemaining:()=>Math.max(0,y-Date.now())}}}n.PriorityTaskQueue=a,n.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:a,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}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,g=0){this._ext=0,this._urlId=0,this._ext=a,this._urlId=g}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 g 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 c=new g;return c.setFromCharData(y),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(y){this.fg=y[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let c=!1;if(y[_.CHAR_DATA_CHAR_INDEX].length>2)c=!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:c=!0}else c=!0}else this.content=y[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|y[_.CHAR_DATA_WIDTH_INDEX]<<22;c&&(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=g},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 g=f;g<_;++g){let b=u[g];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,g=0;if(this._interim){const b=u.charCodeAt(g++);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=g;b<_;++b){const y=u.charCodeAt(b);if(55296<=y&&y<=56319){if(++b>=_)return this._interim=y,a;const c=u.charCodeAt(b);56320<=c&&c<=57343?f[a++]=1024*(y-55296)+c-56320+65536:(f[a++]=y,f[a++]=c)}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,g,b,y,c=0,r=0,h=0;if(this.interim[0]){let m=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let v,w=0;for(;(v=63&this.interim[++w])&&w<4;)x<<=6,x|=v;const S=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,C=S-w;for(;h<C;){if(h>=_)return 0;if(v=u[h++],(192&v)!=128){h--,m=!0;break}this.interim[w++]=v,x<<=6,x|=63&v}m||(S===2?x<128?h--:f[c++]=x:S===3?x<2048||x>=55296&&x<=57343||x===65279||(f[c++]=x):x<65536||x>1114111||(f[c++]=x)),this.interim.fill(0)}const l=_-4;let o=h;for(;o<_;){for(;!(!(o<l)||128&(a=u[o])||128&(g=u[o+1])||128&(b=u[o+2])||128&(y=u[o+3]));)f[c++]=a,f[c++]=g,f[c++]=b,f[c++]=y,o+=4;if(a=u[o++],a<128)f[c++]=a;else if((224&a)==192){if(o>=_)return this.interim[0]=a,c;if(g=u[o++],(192&g)!=128){o--;continue}if(r=(31&a)<<6|63&g,r<128){o--;continue}f[c++]=r}else if((240&a)==224){if(o>=_)return this.interim[0]=a,c;if(g=u[o++],(192&g)!=128){o--;continue}if(o>=_)return this.interim[0]=a,this.interim[1]=g,c;if(b=u[o++],(192&b)!=128){o--;continue}if(r=(15&a)<<12|(63&g)<<6|63&b,r<2048||r>=55296&&r<=57343||r===65279)continue;f[c++]=r}else if((248&a)==240){if(o>=_)return this.interim[0]=a,c;if(g=u[o++],(192&g)!=128){o--;continue}if(o>=_)return this.interim[0]=a,this.interim[1]=g,c;if(b=u[o++],(192&b)!=128){o--;continue}if(o>=_)return this.interim[0]=a,this.interim[1]=g,this.interim[2]=b,c;if(y=u[o++],(192&y)!=128){o--;continue}if(r=(7&a)<<18|(63&g)<<12|(63&b)<<6|63&y,r<65536||r>1114111)continue;f[c++]=r}}return c}}},776:function(j,n,u){var f=this&&this.__decorate||function(r,h,l,o){var m,x=arguments.length,v=x<3?h:o===null?o=Object.getOwnPropertyDescriptor(h,l):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,h,l,o);else for(var w=r.length-1;w>=0;w--)(m=r[w])&&(v=(x<3?m(v):x>3?m(h,l,v):m(h,l))||v);return x>3&&v&&Object.defineProperty(h,l,v),v},_=this&&this.__param||function(r,h){return function(l,o){h(l,o,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const a=u(859),g=u(97),b={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let y,c=n.LogService=class extends a.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),y=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,l){this._evalLazyOptionalParams(l),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...l)}trace(r,...h){var l;this._logLevel<=g.LogLevelEnum.TRACE&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var l;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var l;this._logLevel<=g.LogLevelEnum.INFO&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var l;this._logLevel<=g.LogLevelEnum.WARN&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var l;this._logLevel<=g.LogLevelEnum.ERROR&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.error.bind(this._optionsService.options.logger))??console.error,r,h)}};n.LogService=c=f([_(0,g.IOptionsService)],c),n.setTraceLogger=function(r){y=r},n.traceCall=function(r,h,l){if(typeof l.value!="function")throw new Error("not supported");const o=l.value;l.value=function(...m){if(y.logLevel!==g.LogLevelEnum.TRACE)return o.apply(this,m);y.trace(`GlyphRenderer#${o.name}(${m.map((v=>JSON.stringify(v))).join(", ")})`);const x=o.apply(this,m);return y.trace(`GlyphRenderer#${o.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(g,b,y){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,g,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")}},B={};function ee(j){var n=B[j];if(n!==void 0)return n.exports;var u=B[j]={exports:{}};return G[j].call(u.exports,u,u.exports,ee),u.exports}var ne={};return(()=>{var j=ne;Object.defineProperty(j,"__esModule",{value:!0}),j.WebglAddon=void 0;const n=ee(345),u=ee(859),f=ee(399),_=ee(666),a=ee(776);class g extends u.Disposable{constructor(y){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=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 c=y._core;if(!y.element)return void this.register(c.onWillOpen((()=>this.activate(y))));this._terminal=y;const r=c.coreService,h=c.optionsService,l=c,o=l._renderService,m=l._characterJoinerService,x=l._charSizeService,v=l._coreBrowserService,w=l._decorationService,S=l._logService,C=l._themeService;(0,a.setTraceLogger)(S),this._renderer=this.register(new _.WebglRenderer(y,m,x,v,r,w,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)),o.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=g})(),ne})()))})(Hl)),Hl.exports}var ng=rg(),Nl={exports:{}},Qd;function ag(){return Qd||(Qd=1,(function(I,X){(function(G,B){I.exports=B()})(self,(()=>(()=>{var G={903:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BaseRenderLayer=void 0;const f=u(274),_=u(627),a=u(237),g=u(860),b=u(374),y=u(296),c=u(345),r=u(859),h=u(399),l=u(855);class o 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,w,S,C,L,R,E,T,k,W){super(),this._terminal=v,this._container=w,this._alpha=L,this._themeService=R,this._bufferService=E,this._optionsService=T,this._decorationService=k,this._coreBrowserService=W,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 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-${S}-layer`),this._canvas.style.zIndex=C.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._refreshCharAtlas(this._themeService.colors),this.register(this._themeService.onChangeColors((U=>{this._refreshCharAtlas(U),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,w){}handleSelectionChanged(v,w,S=!1){this._selectionModel.update(this._terminal._core,v,w,S)}_setTransparency(v){if(v===this._alpha)return;const w=this._canvas;this._alpha=v,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,w),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 w=0;w<this._charAtlas.pages.length;w++)this._bitmapGenerator[w]=new m(this._charAtlas.pages[w].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,w,S,C){this._ctx.fillRect(v*this._deviceCellWidth,w*this._deviceCellHeight,S*this._deviceCellWidth,C*this._deviceCellHeight)}_fillMiddleLineAtCells(v,w,S=1){const C=Math.ceil(.5*this._deviceCellHeight);this._ctx.fillRect(v*this._deviceCellWidth,(w+1)*this._deviceCellHeight-C-this._coreBrowserService.dpr,S*this._deviceCellWidth,this._coreBrowserService.dpr)}_fillBottomLineAtCells(v,w,S=1,C=0){this._ctx.fillRect(v*this._deviceCellWidth,(w+1)*this._deviceCellHeight+C-this._coreBrowserService.dpr-1,S*this._deviceCellWidth,this._coreBrowserService.dpr)}_curlyUnderlineAtCell(v,w,S=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<S;L++){const R=(v+L)*this._deviceCellWidth,E=(v+L+.5)*this._deviceCellWidth,T=(v+L+1)*this._deviceCellWidth,k=(w+1)*this._deviceCellHeight-C-1,W=k-C,U=k+C;this._ctx.moveTo(R,k),this._ctx.bezierCurveTo(R,W,E,W,E,k),this._ctx.bezierCurveTo(E,U,T,U,T,k)}this._ctx.stroke(),this._ctx.restore()}_dottedUnderlineAtCell(v,w,S=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,R=(w+1)*this._deviceCellHeight-C-1;this._ctx.moveTo(L,R);for(let E=0;E<S;E++){const T=(v+S+E)*this._deviceCellWidth;this._ctx.lineTo(T,R)}this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_dashedUnderlineAtCell(v,w,S=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,R=(v+S)*this._deviceCellWidth,E=(w+1)*this._deviceCellHeight-C-1;this._ctx.moveTo(L,E),this._ctx.lineTo(R,E),this._ctx.stroke(),this._ctx.closePath(),this._ctx.restore()}_fillLeftLineAtCell(v,w,S){this._ctx.fillRect(v*this._deviceCellWidth,w*this._deviceCellHeight,this._coreBrowserService.dpr*S,this._deviceCellHeight)}_strokeRectAtCell(v,w,S,C){const L=this._coreBrowserService.dpr;this._ctx.lineWidth=L,this._ctx.strokeRect(v*this._deviceCellWidth+L/2,w*this._deviceCellHeight+L/2,S*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,w,S,C){this._alpha?this._ctx.clearRect(v*this._deviceCellWidth,w*this._deviceCellHeight,S*this._deviceCellWidth,C*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(v*this._deviceCellWidth,w*this._deviceCellHeight,S*this._deviceCellWidth,C*this._deviceCellHeight))}_fillCharTrueColor(v,w,S){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=a.TEXT_BASELINE,this._clipRow(S);let C=!1;this._optionsService.rawOptions.customGlyphs!==!1&&(C=(0,g.tryDrawCustomChar)(this._ctx,v.getChars(),w*this._deviceCellWidth,S*this._deviceCellHeight,this._deviceCellWidth,this._deviceCellHeight,this._optionsService.rawOptions.fontSize,this._coreBrowserService.dpr)),C||this._ctx.fillText(v.getChars(),w*this._deviceCellWidth+this._deviceCharLeft,S*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_drawChars(v,w,S){var k,W,U,P;const C=v.getChars(),L=v.getCode(),R=v.getWidth();if(this._cellColorResolver.resolve(v,w,this._bufferService.buffer.ydisp+S,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()||l.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(S),this._bitmapGenerator[E.texturePage]&&this._charAtlas.pages[E.texturePage].canvas!==this._bitmapGenerator[E.texturePage].canvas&&((W=(k=this._bitmapGenerator[E.texturePage])==null?void 0:k.bitmap)==null||W.close(),delete this._bitmapGenerator[E.texturePage]),this._charAtlas.pages[E.texturePage].version!==((U=this._bitmapGenerator[E.texturePage])==null?void 0:U.version)&&(this._bitmapGenerator[E.texturePage]||(this._bitmapGenerator[E.texturePage]=new m(this._charAtlas.pages[E.texturePage].canvas)),this._bitmapGenerator[E.texturePage].refresh(),this._bitmapGenerator[E.texturePage].version=this._charAtlas.pages[E.texturePage].version);let T=E.size.x;this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,b.allowRescaling)(L,R,E.size.x,this._deviceCellWidth)&&(T=this._deviceCellWidth-1),this._ctx.drawImage(((P=this._bitmapGenerator[E.texturePage])==null?void 0:P.bitmap)||this._charAtlas.pages[E.texturePage].canvas,E.texturePosition.x,E.texturePosition.y,E.size.x,E.size.y,w*this._deviceCellWidth+this._deviceCharLeft-E.offset.x,S*this._deviceCellHeight+this._deviceCharTop-E.offset.y,T,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,w){return`${w?"italic":""} ${v?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight} ${this._optionsService.rawOptions.fontSize*this._coreBrowserService.dpr}px ${this._optionsService.rawOptions.fontFamily}`}}n.BaseRenderLayer=o;class m{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((w=>{this._state===2?this.refresh():this._bitmap=w,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),g=u(345),b=u(859),y=u(873),c=u(43),r=u(630),h=u(744);class l extends b.Disposable{constructor(m,x,v,w,S,C,L,R,E,T,k){super(),this._terminal=m,this._screenElement=x,this._bufferService=w,this._charSizeService=S,this._optionsService=C,this._coreBrowserService=E,this._themeService=k,this._observerDisposable=this.register(new b.MutableDisposable),this._onRequestRedraw=this.register(new g.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onChangeTextureAtlas=this.register(new g.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new g.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event;const W=this._optionsService.rawOptions.allowTransparency;this._renderLayers=[new h.TextRenderLayer(this._terminal,this._screenElement,0,W,this._bufferService,this._optionsService,L,T,this._coreBrowserService,k),new r.SelectionRenderLayer(this._terminal,this._screenElement,1,this._bufferService,this._coreBrowserService,T,this._optionsService,k),new c.LinkRenderLayer(this._terminal,this._screenElement,2,v,this._bufferService,this._optionsService,T,this._coreBrowserService,k),new y.CursorRenderLayer(this._terminal,this._screenElement,3,this._onRequestRedraw,this._bufferService,this._optionsService,R,this._coreBrowserService,T,k)];for(const U of this._renderLayers)(0,g.forwardEvent)(U.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,((U,P)=>this._setCanvasDevicePixelDimensions(U,P))),this.register(this._coreBrowserService.onWindowChange((U=>{this._observerDisposable.value=(0,_.observeDevicePixelDimensions)(this._renderLayers[0].canvas,U,((P,F)=>this._setCanvasDevicePixelDimensions(P,F)))}))),this.register((0,b.toDisposable)((()=>{for(const U of this._renderLayers)U.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(m,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((m=>m.handleBlur()))}handleFocus(){this._runOperation((m=>m.handleFocus()))}handleSelectionChanged(m,x,v=!1){this._runOperation((w=>w.handleSelectionChanged(m,x,v))),this._themeService.colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})}handleCursorMove(){this._runOperation((m=>m.handleCursorMove()))}clear(){this._runOperation((m=>m.reset()))}_runOperation(m){for(const x of this._renderLayers)m(x)}renderRows(m,x){for(const v of this._renderLayers)v.handleGridChanged(m,x)}clearTextureAtlas(){for(const m of this._renderLayers)m.clearTextureAtlas()}_updateDimensions(){if(!this._charSizeService.hasValidSize)return;const m=this._coreBrowserService.dpr;this.dimensions.device.char.width=Math.floor(this._charSizeService.width*m),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*m),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._bufferService.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._bufferService.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/m),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/m),this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows,this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols}_setCanvasDevicePixelDimensions(m,x){this.dimensions.device.canvas.height=x,this.dimensions.device.canvas.width=m;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=l},873:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorRenderLayer=void 0;const f=u(457),_=u(859),a=u(399),g=u(782),b=u(903);class y extends b.BaseRenderLayer{constructor(r,h,l,o,m,x,v,w,S,C){super(r,h,"cursor",l,!0,C,m,x,S,w),this._onRequestRedraw=o,this._coreService=v,this._cursorBlinkStateManager=this.register(new _.MutableDisposable),this._cell=new g.CellData,this._state={x:0,y:0,isFocused:!1,style:"",width:0},this._cursorRenderers={bar:this._renderBarCursor.bind(this),block:this._renderBlockCursor.bind(this),underline:this._renderUnderlineCursor.bind(this),outline:this._renderOutlineCursor.bind(this)},this.register(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,l=h-this._bufferService.buffer.ydisp;if(l<0||l>=this._bufferService.rows)return void this._clearCursor();const o=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(h).loadCell(o,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css;const m=this._optionsService.rawOptions.cursorStyle,x=this._optionsService.rawOptions.cursorInactiveStyle;return x&&x!=="none"&&this._cursorRenderers[x](o,l,this._cell),this._ctx.restore(),this._state.x=o,this._state.y=l,this._state.isFocused=!1,this._state.style=m,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible){if(this._state){if(this._state.x===o&&this._state.y===l&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](o,l,this._cell),this._ctx.restore(),this._state.x=o,this._state.y=l,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}_clearCursor(){this._state&&(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,l){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,l){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillCells(r,h,l.getWidth(),1),this._ctx.fillStyle=this._themeService.colors.cursorAccent.css,this._fillCharTrueColor(l,r,h),this._ctx.restore()}_renderUnderlineCursor(r,h,l){this._ctx.save(),this._ctx.fillStyle=this._themeService.colors.cursor.css,this._fillBottomLineAtCells(r,h),this._ctx.restore()}_renderOutlineCursor(r,h,l){this._ctx.save(),this._ctx.strokeStyle=this._themeService.colors.cursor.css,this._strokeRectAtCell(r,h,l.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 g extends a.BaseRenderLayer{constructor(y,c,r,h,l,o,m,x,v){super(y,c,"link",r,!0,v,l,o,m,x),this.register(h.onShowLinkUnderline((w=>this._handleShowLinkUnderline(w)))),this.register(h.onHideLinkUnderline((w=>this._handleHideLinkUnderline(w))))}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 c=y.y1+1;c<y.y2;c++)this._fillBottomLineAtCells(0,c,y.cols);this._fillBottomLineAtCells(0,y.y2,y.x2)}this._state=y}_handleHideLinkUnderline(y){this._clearCurrentLink()}}n.LinkRenderLayer=g},630:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionRenderLayer=void 0;const f=u(903);class _ extends f.BaseRenderLayer{constructor(g,b,y,c,r,h,l,o){super(g,b,"selection",y,!0,o,c,l,h,r),this._clearState()}_clearState(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}}resize(g){super.resize(g),this._selectionModel.selectionStart&&this._selectionModel.selectionEnd&&(this._clearState(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode))}reset(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())}handleBlur(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleFocus(){this.reset(),this._redrawSelection(this._selectionModel.selectionStart,this._selectionModel.selectionEnd,this._selectionModel.columnSelectMode)}handleSelectionChanged(g,b,y){super.handleSelectionChanged(g,b,y),this._redrawSelection(g,b,y)}_redrawSelection(g,b,y){if(!this._didStateChange(g,b,y,this._bufferService.buffer.ydisp))return;if(this._clearAll(),!g||!b)return void this._clearState();const c=g[1]-this._bufferService.buffer.ydisp,r=b[1]-this._bufferService.buffer.ydisp,h=Math.max(c,0),l=Math.min(r,this._bufferService.rows-1);if(h>=this._bufferService.rows||l<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=(this._coreBrowserService.isFocused?this._themeService.colors.selectionBackgroundTransparent:this._themeService.colors.selectionInactiveBackgroundTransparent).css,y){const o=g[0],m=b[0]-o,x=l-h+1;this._fillCells(o,h,m,x)}else{const o=c===h?g[0]:0,m=h===r?b[0]:this._bufferService.cols;this._fillCells(o,h,m-o,1);const x=Math.max(l-h-1,0);if(this._fillCells(0,h+1,this._bufferService.cols,x),h!==l){const v=r===l?b[0]:this._bufferService.cols;this._fillCells(0,l,v,1)}}this._state.start=[g[0],g[1]],this._state.end=[b[0],b[1]],this._state.columnSelectMode=y,this._state.ydisp=this._bufferService.buffer.ydisp}}_didStateChange(g,b,y,c){return!this._areCoordinatesEqual(g,this._state.start)||!this._areCoordinatesEqual(b,this._state.end)||y!==this._state.columnSelectMode||c!==this._state.ydisp}_areCoordinatesEqual(g,b){return!(!g||!b)&&g[0]===b[0]&&g[1]===b[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),g=u(855),b=u(903),y=u(574);class c extends b.BaseRenderLayer{constructor(h,l,o,m,x,v,w,S,C,L){super(h,l,"text",o,m,L,x,v,S,C),this._characterJoinerService=w,this._characterWidth=0,this._characterFont="",this._characterOverlapCache={},this._workCell=new a.CellData,this._state=new y.GridCache,this.register(v.onSpecificOptionChange("allowTransparency",(R=>this._setTransparency(R))))}resize(h){super.resize(h);const l=this._getFont(!1,!1);this._characterWidth===h.device.char.width&&this._characterFont===l||(this._characterWidth=h.device.char.width,this._characterFont=l,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)}reset(){this._state.clear(),this._clearAll()}_forEachCell(h,l,o){for(let m=h;m<=l;m++){const x=m+this._bufferService.buffer.ydisp,v=this._bufferService.buffer.lines.get(x),w=this._characterJoinerService.getJoinedCharacters(x);for(let S=0;S<this._bufferService.cols;S++){v.loadCell(S,this._workCell);let C=this._workCell,L=!1,R=S;if(C.getWidth()!==0){if(w.length>0&&S===w[0][0]){L=!0;const E=w.shift();C=new f.JoinedCellData(this._workCell,v.translateToString(!0,E[0],E[1]),E[1]-E[0]),R=E[1]-1}!L&&this._isOverlapping(C)&&R<v.length-1&&v.getCodePoint(R+1)===g.NULL_CELL_CODE&&(C.content&=-12582913,C.content|=8388608),o(C,S,m),S=R}}}}_drawBackground(h,l){const o=this._ctx,m=this._bufferService.cols;let x=0,v=0,w=null;o.save(),this._forEachCell(h,l,((S,C,L)=>{let R=null;S.isInverse()?R=S.isFgDefault()?this._themeService.colors.foreground.css:S.isFgRGB()?`rgb(${_.AttributeData.toColorRGB(S.getFgColor()).join(",")})`:this._themeService.colors.ansi[S.getFgColor()].css:S.isBgRGB()?R=`rgb(${_.AttributeData.toColorRGB(S.getBgColor()).join(",")})`:S.isBgPalette()&&(R=this._themeService.colors.ansi[S.getBgColor()].css);let E=!1;this._decorationService.forEachDecorationAtCell(C,this._bufferService.buffer.ydisp+L,void 0,(T=>{T.options.layer!=="top"&&E||(T.backgroundColorRGB&&(R=T.backgroundColorRGB.css),E=T.options.layer==="top")})),w===null&&(x=C,v=L),L!==v?(o.fillStyle=w||"",this._fillCells(x,v,m-x,1),x=C,v=L):w!==R&&(o.fillStyle=w||"",this._fillCells(x,v,C-x,1),x=C,v=L),w=R})),w!==null&&(o.fillStyle=w,this._fillCells(x,v,m-x,1)),o.restore()}_drawForeground(h,l){this._forEachCell(h,l,((o,m,x)=>this._drawChars(o,m,x)))}handleGridChanged(h,l){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,h,this._bufferService.cols,l-h+1),this._drawBackground(h,l),this._drawForeground(h,l))}_isOverlapping(h){if(h.getWidth()!==1||h.getCode()<256)return!1;const l=h.getChars();if(this._characterOverlapCache.hasOwnProperty(l))return this._characterOverlapCache[l];this._ctx.save(),this._ctx.font=this._characterFont;const o=Math.floor(this._ctx.measureText(l).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[l]=o,o}}n.TextRenderLayer=c},274:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellColorResolver=void 0;const f=u(855),_=u(160),a=u(374);let g,b=0,y=0,c=!1,r=!1,h=!1,l=0;n.CellColorResolver=class{constructor(o,m,x,v,w,S){this._terminal=o,this._optionService=m,this._selectionRenderModel=x,this._decorationService=v,this._coreBrowserService=w,this._themeService=S,this.result={fg:0,bg:0,ext:0}}resolve(o,m,x,v){if(this.result.bg=o.bg,this.result.fg=o.fg,this.result.ext=268435456&o.bg?o.extended.ext:0,y=0,b=0,r=!1,c=!1,h=!1,g=this._themeService.colors,l=0,o.getCode()!==f.NULL_CELL_CODE&&o.extended.underlineStyle===4){const w=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));l=m*v%(2*Math.round(w))}if(this._decorationService.forEachDecorationAtCell(m,x,"bottom",(w=>{w.backgroundColorRGB&&(y=w.backgroundColorRGB.rgba>>8&16777215,r=!0),w.foregroundColorRGB&&(b=w.foregroundColorRGB.rgba>>8&16777215,c=!0)})),h=this._selectionRenderModel.isCellSelected(this._terminal,m,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?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else y=(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(r=!0,g.selectionForeground&&(b=g.selectionForeground.rgba>>8&16777215,c=!0),(0,a.treatGlyphAsBackgroundColor)(o.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)b=(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432: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?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}c=!0}}this._decorationService.forEachDecorationAtCell(m,x,"top",(w=>{w.backgroundColorRGB&&(y=w.backgroundColorRGB.rgba>>8&16777215,r=!0),w.foregroundColorRGB&&(b=w.foregroundColorRGB.rgba>>8&16777215,c=!0)})),r&&(y=h?-16777216&o.bg&-134217729|y|50331648:-16777216&o.bg|y|50331648),c&&(b=-16777216&o.fg&-67108865|b|50331648),67108864&this.result.fg&&(r&&!c&&(b=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&g.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,c=!0),!r&&c&&(y=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&g.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,r=!0)),g=void 0,this.result.bg=r?y:this.result.bg,this.result.fg=c?b:this.result.fg,this.result.ext&=536870911,this.result.ext|=l<<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(g,b,y,c,r,h,l,o){const m=(0,_.generateConfig)(c,r,h,l,b,y,o);for(let w=0;w<a.length;w++){const S=a[w],C=S.ownedBy.indexOf(g);if(C>=0){if((0,_.configEquals)(S.config,m))return S.atlas;S.ownedBy.length===1?(S.atlas.dispose(),a.splice(w,1)):S.ownedBy.splice(C,1);break}}for(let w=0;w<a.length;w++){const S=a[w];if((0,_.configEquals)(S.config,m))return S.ownedBy.push(g),S.atlas}const x=g._core,v={atlas:new f.TextureAtlas(document,m,x.unicodeService),config:m,ownedBy:[g]};return a.push(v),v.atlas},n.removeTerminalFromCache=function(g){for(let b=0;b<a.length;b++){const y=a[b].ownedBy.indexOf(g);if(y!==-1){a[b].ownedBy.length===1?(a[b].atlas.dispose(),a.splice(b,1)):a[b].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,g,b,y,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:y.customGlyphs,devicePixelRatio:r,letterSpacing:y.letterSpacing,lineHeight:y.lineHeight,deviceCellWidth:_,deviceCellHeight:a,deviceCharWidth:g,deviceCharHeight:b,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 g=0;g<_.colors.ansi.length;g++)if(_.colors.ansi[g].rgba!==a.colors.ansi[g].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:(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,l,o,m,x,v){const w=n.blockElementDefinitions[r];if(w)return(function(R,E,T,k,W,U){for(let P=0;P<E.length;P++){const F=E[P],D=W/8,O=U/8;R.fillRect(T+F.x*D,k+F.y*O,F.w*D,F.h*O)}})(c,w,h,l,o,m),!0;const S=_[r];if(S)return(function(R,E,T,k,W,U){let P=a.get(E);P||(P=new Map,a.set(E,P));const F=R.fillStyle;if(typeof F!="string")throw new Error(`Unexpected fillStyle type "${F}"`);let D=P.get(F);if(!D){const O=E[0].length,M=E.length,H=R.canvas.ownerDocument.createElement("canvas");H.width=O,H.height=M;const $=(0,f.throwIfFalsy)(H.getContext("2d")),K=new ImageData(O,M);let ce,oe,q,z;if(F.startsWith("#"))ce=parseInt(F.slice(1,3),16),oe=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`);[ce,oe,q,z]=F.substring(5,F.length-1).split(",").map((te=>parseFloat(te)))}for(let te=0;te<M;te++)for(let J=0;J<O;J++)K.data[4*(te*O+J)]=ce,K.data[4*(te*O+J)+1]=oe,K.data[4*(te*O+J)+2]=q,K.data[4*(te*O+J)+3]=E[te][J]*(255*z);$.putImageData(K,0,0),D=(0,f.throwIfFalsy)(R.createPattern(H,null)),P.set(F,D)}R.fillStyle=D,R.fillRect(T,k,W,U)})(c,S,h,l,o,m),!0;const C=n.boxDrawingDefinitions[r];if(C)return(function(R,E,T,k,W,U,P){R.strokeStyle=R.fillStyle;for(const[F,D]of Object.entries(E)){let O;R.beginPath(),R.lineWidth=P*Number.parseInt(F),O=typeof D=="function"?D(.15,.15/U*W):D;for(const M of O.split(" ")){const H=M[0],$=b[H];if(!$){console.error(`Could not find drawing instructions for "${H}"`);continue}const K=M.substring(1).split(",");K[0]&&K[1]&&$(R,y(K,W,U,T,k,!0,P))}R.stroke(),R.closePath()}})(c,C,h,l,o,m,v),!0;const L=n.powerlineDefinitions[r];return!!L&&((function(R,E,T,k,W,U,P,F){const D=new Path2D;D.rect(T,k,W,U),R.clip(D),R.beginPath();const O=P/12;R.lineWidth=F*O;for(const M of E.d.split(" ")){const H=M[0],$=b[H];if(!$){console.error(`Could not find drawing instructions for "${H}"`);continue}const K=M.substring(1).split(",");K[0]&&K[1]&&$(R,y(K,W,U,T,k,!1,F,(E.leftPadding??0)*(O/2),(E.rightPadding??0)*(O/2)))}E.type===1?(R.strokeStyle=R.fillStyle,R.stroke()):R.fill(),R.closePath()})(c,L,h,l,o,m,x,v),!0)};const a=new Map;function g(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 y(c,r,h,l,o,m,x,v=0,w=0){const S=c.map((C=>parseFloat(C)||parseInt(C)));if(S.length<2)throw new Error("Too few arguments for instruction");for(let C=0;C<S.length;C+=2)S[C]*=r-v*x-w*x,m&&S[C]!==0&&(S[C]=g(Math.round(S[C]+.5)-.5,r,0)),S[C]+=l+v*x;for(let C=1;C<S.length;C+=2)S[C]*=h,m&&S[C]!==0&&(S[C]=g(Math.round(S[C]+.5)-.5,h,0)),S[C]+=o;return S}},56:(j,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.observeDevicePixelDimensions=void 0;const f=u(859);n.observeDevicePixelDimensions=function(_,a,g){let b=new a.ResizeObserver((y=>{const c=y.find((l=>l.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&&g(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:(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,g,b){return a===1&&g>Math.ceil(1.5*b)&&_!==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,g=0){return(_-(2*Math.round(a)-g))%(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,g,b=!1){if(this.selectionStart=a,this.selectionEnd=g,!a||!g||a[0]===g[0]&&a[1]===g[1])return void this.clear();const y=_.buffers.active.ydisp,c=a[1]-y,r=g[1]-y,h=Math.max(c,0),l=Math.min(r,_.rows-1);h>=_.rows||l<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=b,this.viewportStartRow=c,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=l,this.startCol=a[0],this.endCol=g[0])}isCellSelected(_,a,g){return!!this.hasSelection&&(g-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?a>=this.startCol&&g>=this.viewportCappedStartRow&&a<this.endCol&&g<=this.viewportCappedEndRow:a<this.startCol&&g>=this.viewportCappedStartRow&&a>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&a>=this.startCol&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&a<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===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),g=u(160),b=u(345),y=u(485),c=u(385),r=u(147),h=u(855),l={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let o;class m{get pages(){return this._pages}constructor(C,L,R){this._document=C,this._config=L,this._unicodeService=R,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 b.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new b.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=w(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 R=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,R)}}))}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(m.maxAtlasPages&&this._pages.length>=Math.max(4,m.maxAtlasPages)){const L=this._pages.filter((P=>2*P.canvas.width<=(m.maxTextureSize||4096))).sort(((P,F)=>F.canvas.width!==P.canvas.width?F.canvas.width-P.canvas.width:F.percentageUsed-P.percentageUsed));let R=-1,E=0;for(let P=0;P<L.length;P++)if(L[P].canvas.width!==E)R=P,E=L[P].canvas.width;else if(P-R==3)break;const T=L.slice(R,R+4),k=T.map((P=>P.glyphs[0].texturePage)).sort(((P,F)=>P>F?1:-1)),W=this.pages.length-T.length,U=this._mergePages(T,W);U.version++;for(let P=k.length-1;P>=0;P--)this._deletePage(k[P]);this.pages.push(U),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(U.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 R=2*C[0].canvas.width,E=new x(this._document,R,C);for(const[T,k]of C.entries()){const W=T*k.canvas.width%R,U=Math.floor(T/2)*k.canvas.height;E.ctx.drawImage(k.canvas,W,U);for(const F of k.glyphs)F.texturePage=L,F.sizeClipSpace.x=F.size.x/R,F.sizeClipSpace.y=F.size.y/R,F.texturePosition.x+=W,F.texturePosition.y+=U,F.texturePositionClipSpace.x=F.texturePosition.x/R,F.texturePositionClipSpace.y=F.texturePosition.y/R;this._onRemoveTextureAtlasCanvas.fire(k.canvas);const P=this._activePages.indexOf(k);P!==-1&&this._activePages.splice(P,1)}return E}_deletePage(C){this._pages.splice(C,1);for(let L=C;L<this._pages.length;L++){const R=this._pages[L];for(const E of R.glyphs)E.texturePage--;R.version++}}getRasterizedGlyphCombinedChar(C,L,R,E,T){return this._getFromCacheMap(this._cacheMapCombined,C,L,R,E,T)}getRasterizedGlyph(C,L,R,E,T){return this._getFromCacheMap(this._cacheMap,C,L,R,E,T)}_getFromCacheMap(C,L,R,E,T,k=!1){return o=C.get(L,R,E,T),o||(o=this._drawToCache(L,R,E,T,k),C.set(L,R,E,T,o)),o}_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,R,E){if(this._config.allowTransparency)return g.NULL_COLOR;let T;switch(C){case 16777216:case 33554432:T=this._getColorFromAnsiIndex(L);break;case 50331648:const k=r.AttributeData.toColorRGB(L);T=g.channels.toColor(k[0],k[1],k[2]);break;default:T=R?g.color.opaque(this._config.colors.foreground):this._config.colors.background}return T}_getForegroundColor(C,L,R,E,T,k,W,U,P,F){const D=this._getMinimumContrastColor(C,L,R,E,T,k,W,P,U,F);if(D)return D;let O;switch(T){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&P&&k<8&&(k+=8),O=this._getColorFromAnsiIndex(k);break;case 50331648:const M=r.AttributeData.toColorRGB(k);O=g.channels.toColor(M[0],M[1],M[2]);break;default:O=W?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(O=g.color.opaque(O)),U&&(O=g.color.multiplyOpacity(O,f.DIM_OPACITY)),O}_resolveBackgroundRgba(C,L,R){switch(C){case 16777216:case 33554432:return this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return R?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(C,L,R,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 R?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(C,L,R,E,T,k,W,U,P,F){if(this._config.minimumContrastRatio===1||F)return;const D=this._getContrastCache(P),O=D.getColor(C,E);if(O!==void 0)return O||void 0;const M=this._resolveBackgroundRgba(L,R,W),H=this._resolveForegroundRgba(T,k,W,U),$=g.rgba.ensureContrastRatio(M,H,this._config.minimumContrastRatio/(P?2:1));if(!$)return void D.setColor(C,E,null);const K=g.channels.toColor($>>24&255,$>>16&255,$>>8&255);return D.setColor(C,E,K),K}_getContrastCache(C){return C?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(C,L,R,E,T=!1){const k=typeof C=="number"?String.fromCharCode(C):C,W=Math.min(this._config.deviceCellWidth*Math.max(k.length,2)+4,this._textureSize);this._tmpCanvas.width<W&&(this._tmpCanvas.width=W);const U=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<U&&(this._tmpCanvas.height=U),this._tmpCtx.save(),this._workAttributeData.fg=R,this._workAttributeData.bg=L,this._workAttributeData.extended.ext=E,this._workAttributeData.isInvisible())return l;const P=!!this._workAttributeData.isBold(),F=!!this._workAttributeData.isInverse(),D=!!this._workAttributeData.isDim(),O=!!this._workAttributeData.isItalic(),M=!!this._workAttributeData.isUnderline(),H=!!this._workAttributeData.isStrikethrough(),$=!!this._workAttributeData.isOverline();let K=this._workAttributeData.getFgColor(),ce=this._workAttributeData.getFgColorMode(),oe=this._workAttributeData.getBgColor(),q=this._workAttributeData.getBgColorMode();if(F){const ue=K;K=oe,oe=ue;const ge=ce;ce=q,q=ge}const z=this._getBackgroundColor(q,oe,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 te=P?this._config.fontWeightBold:this._config.fontWeight,J=O?"italic":"";this._tmpCtx.font=`${J} ${te} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=f.TEXT_BASELINE;const _e=k.length===1&&(0,a.isPowerlineGlyph)(k.charCodeAt(0)),fe=k.length===1&&(0,a.isRestrictedPowerlineGlyph)(k.charCodeAt(0)),Me=this._getForegroundColor(L,q,oe,R,ce,K,F,D,P,(0,a.treatGlyphAsBackgroundColor)(k.charCodeAt(0)));this._tmpCtx.fillStyle=Me.css;const ve=fe?0:4;let Oe=!1;this._config.customGlyphs!==!1&&(Oe=(0,_.tryDrawCustomChar)(this._tmpCtx,k,ve,ve,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let qe,we=!_e;if(qe=typeof C=="number"?this._unicodeService.wcwidth(C):this._unicodeService.getStringCellWidth(C),M){this._tmpCtx.save();const ue=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=ue%2==1?.5:0;if(this._tmpCtx.lineWidth=ue,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())we=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{we=!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 Ne=ve,Re=Math.ceil(ve+this._config.deviceCharHeight)-ge-(T?2*ue:0),_t=Re+ue,Qe=Re+2*ue;let it=this._workAttributeData.getUnderlineVariantOffset();for(let Ie=0;Ie<qe;Ie++){this._tmpCtx.save();const Ae=Ne+Ie*this._config.deviceCellWidth,Le=Ne+(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=ue<=1?Qe:Math.ceil(ve+this._config.deviceCharHeight-ue/2)-ge,vt=ue<=1?Re:Math.ceil(ve+this._config.deviceCharHeight+ue/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>=ue?2*ue-it:ue-it;it>=ue||Zt===0?(this._tmpCtx.setLineDash([Math.round(ue),Math.round(ue)]),this._tmpCtx.moveTo(Ae+Zt,Re),this._tmpCtx.lineTo(Le,Re)):(this._tmpCtx.setLineDash([Math.round(ue),Math.round(ue)]),this._tmpCtx.moveTo(Ae,Re),this._tmpCtx.lineTo(Ae+Zt,Re),this._tmpCtx.moveTo(Ae+Zt+ue,Re),this._tmpCtx.lineTo(Le,Re)),it=(0,a.computeNextVariantOffset)(Le-Ae,ue,it);break;case 5:const tr=.6,ir=.3,Ft=Le-Ae,ri=Math.floor(tr*Ft),ni=Math.floor(ir*Ft),Jt=Ft-ri-ni;this._tmpCtx.setLineDash([ri,ni,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&&k!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const Ie=this._tmpCtx.measureText(k);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in Ie&&Ie.actualBoundingBoxDescent>0){this._tmpCtx.save();const Ae=new Path2D;Ae.rect(Ne,Re-Math.ceil(ue/2),this._config.deviceCellWidth*qe,Qe-Re+Math.ceil(ue/2)),this._tmpCtx.clip(Ae),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=z.css,this._tmpCtx.strokeText(k,ve,ve+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if($){const ue=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),ge=ue%2==1?.5:0;this._tmpCtx.lineWidth=ue,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(ve,ve+ge),this._tmpCtx.lineTo(ve+this._config.deviceCharWidth*qe,ve+ge),this._tmpCtx.stroke()}if(Oe||this._tmpCtx.fillText(k,ve,ve+this._config.deviceCharHeight),k==="_"&&!this._config.allowTransparency){let ue=v(this._tmpCtx.getImageData(ve,ve,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Me,we);if(ue)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(k,ve,ve+this._config.deviceCharHeight-ge),ue=v(this._tmpCtx.getImageData(ve,ve,this._config.deviceCellWidth,this._config.deviceCellHeight),z,Me,we),ue);ge++);}if(H){const ue=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),ge=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=ue,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(ve,ve+Math.floor(this._config.deviceCharHeight/2)-ge),this._tmpCtx.lineTo(ve+this._config.deviceCharWidth*qe,ve+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(ue){for(let ge=0;ge<ue.data.length;ge+=4)if(ue.data[ge+3]>0)return!1;return!0})(ft):v(ft,z,Me,we),Ot)return l;const Se=this._findGlyphBoundingBox(ft,this._workBoundingBox,W,fe,Oe,ve);let pe,me;for(;;){if(this._activePages.length===0){const ue=this._createNewPage();pe=ue,me=ue.currentRow,me.height=Se.size.y;break}pe=this._activePages[this._activePages.length-1],me=pe.currentRow;for(const ue of this._activePages)Se.size.y<=ue.currentRow.height&&(pe=ue,me=ue.currentRow);for(let ue=this._activePages.length-1;ue>=0;ue--)for(const ge of this._activePages[ue].fixedRows)ge.height<=me.height&&Se.size.y<=ge.height&&(pe=this._activePages[ue],me=ge);if(me.y+Se.size.y>=pe.canvas.height||me.height>Se.size.y+2){let ue=!1;if(pe.currentRow.y+pe.currentRow.height+Se.size.y>=pe.canvas.height){let ge;for(const Ne of this._activePages)if(Ne.currentRow.y+Ne.currentRow.height+Se.size.y<Ne.canvas.height){ge=Ne;break}if(ge)pe=ge;else if(m.maxAtlasPages&&this._pages.length>=m.maxAtlasPages&&me.y+Se.size.y<=pe.canvas.height&&me.height>=Se.size.y&&me.x+Se.size.x<=pe.canvas.width)ue=!0;else{const Ne=this._createNewPage();pe=Ne,me=Ne.currentRow,me.height=Se.size.y,ue=!0}}ue||(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,R,E,T,k){L.top=0;const W=E?this._config.deviceCellHeight:this._tmpCanvas.height,U=E?this._config.deviceCellWidth:R;let P=!1;for(let F=0;F<W;F++){for(let D=0;D<U;D++){const O=F*this._tmpCanvas.width*4+4*D+3;if(C.data[O]!==0){L.top=F,P=!0;break}}if(P)break}L.left=0,P=!1;for(let F=0;F<k+U;F++){for(let D=0;D<W;D++){const O=D*this._tmpCanvas.width*4+4*F+3;if(C.data[O]!==0){L.left=F,P=!0;break}}if(P)break}L.right=U,P=!1;for(let F=k+U-1;F>=k;F--){for(let D=0;D<W;D++){const O=D*this._tmpCanvas.width*4+4*F+3;if(C.data[O]!==0){L.right=F,P=!0;break}}if(P)break}L.bottom=W,P=!1;for(let F=W-1;F>=0;F--){for(let D=0;D<U;D++){const O=F*this._tmpCanvas.width*4+4*D+3;if(C.data[O]!==0){L.bottom=F,P=!0;break}}if(P)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+k+(E||T?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-L.top+k+(E||T?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}n.TextureAtlas=m;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,R){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],R)for(const E of R)this._glyphs.push(...E.glyphs),this._usedPixels+=E._usedPixels;this.canvas=w(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(S,C,L,R){const E=C.rgba>>>24,T=C.rgba>>>16&255,k=C.rgba>>>8&255,W=L.rgba>>>24,U=L.rgba>>>16&255,P=L.rgba>>>8&255,F=Math.floor((Math.abs(E-W)+Math.abs(T-U)+Math.abs(k-P))/12);let D=!0;for(let O=0;O<S.data.length;O+=4)S.data[O]===E&&S.data[O+1]===T&&S.data[O+2]===k||R&&Math.abs(S.data[O]-E)+Math.abs(S.data[O+1]-T)+Math.abs(S.data[O+2]-k)<F?S.data[O+3]=0:D=!1;return D}function w(S,C,L){const R=S.createElement("canvas");return R.width=C,R.height=L,R}},577:function(j,n,u){var f=this&&this.__decorate||function(h,l,o,m){var x,v=arguments.length,w=v<3?l:m===null?m=Object.getOwnPropertyDescriptor(l,o):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,l,o,m);else for(var S=h.length-1;S>=0;S--)(x=h[S])&&(w=(v<3?x(w):v>3?x(l,o,w):x(l,o))||w);return v>3&&w&&Object.defineProperty(l,o,w),w},_=this&&this.__param||function(h,l){return function(o,m){l(o,m,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const a=u(147),g=u(855),b=u(782),y=u(97);class c extends a.AttributeData{constructor(l,o,m){super(),this.content=0,this.combinedData="",this.fg=l.fg,this.bg=l.bg,this.combinedData=o,this._width=m}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(l){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.JoinedCellData=c;let r=n.CharacterJoinerService=class of{constructor(l){this._bufferService=l,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new b.CellData}register(l){const o={id:this._nextCharacterJoinerId++,handler:l};return this._characterJoiners.push(o),o.id}deregister(l){for(let o=0;o<this._characterJoiners.length;o++)if(this._characterJoiners[o].id===l)return this._characterJoiners.splice(o,1),!0;return!1}getJoinedCharacters(l){if(this._characterJoiners.length===0)return[];const o=this._bufferService.buffer.lines.get(l);if(!o||o.length===0)return[];const m=[],x=o.translateToString(!0);let v=0,w=0,S=0,C=o.getFg(0),L=o.getBg(0);for(let R=0;R<o.getTrimmedLength();R++)if(o.loadCell(R,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==C||this._workCell.bg!==L){if(R-v>1){const E=this._getJoinedRanges(x,S,w,o,v);for(let T=0;T<E.length;T++)m.push(E[T])}v=R,S=w,C=this._workCell.fg,L=this._workCell.bg}w+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-v>1){const R=this._getJoinedRanges(x,S,w,o,v);for(let E=0;E<R.length;E++)m.push(R[E])}return m}_getJoinedRanges(l,o,m,x,v){const w=l.substring(o,m);let S=[];try{S=this._characterJoiners[0].handler(w)}catch(C){console.error(C)}for(let C=1;C<this._characterJoiners.length;C++)try{const L=this._characterJoiners[C].handler(w);for(let R=0;R<L.length;R++)of._mergeRanges(S,L[R])}catch(L){console.error(L)}return this._stringRangesToCellRanges(S,x,v),S}_stringRangesToCellRanges(l,o,m){let x=0,v=!1,w=0,S=l[x];if(S){for(let C=m;C<this._bufferService.cols;C++){const L=o.getWidth(C),R=o.getString(C).length||g.WHITESPACE_CELL_CHAR.length;if(L!==0){if(!v&&S[0]<=w&&(S[0]=C,v=!0),S[1]<=w){if(S[1]=C,S=l[++x],!S)break;S[0]<=w?(S[0]=C,v=!0):v=!1}w+=R}}S&&(S[1]=this._bufferService.cols)}}static _mergeRanges(l,o){let m=!1;for(let x=0;x<l.length;x++){const v=l[x];if(m){if(o[1]<=v[0])return l[x-1][1]=o[1],l;if(o[1]<=v[1])return l[x-1][1]=Math.max(o[1],v[1]),l.splice(x,1),l;l.splice(x,1),x--}else{if(o[1]<=v[0])return l.splice(x,0,o),l;if(o[1]<=v[1])return v[0]=Math.min(o[0],v[0]),l;o[0]<v[1]&&(v[0]=Math.min(o[0],v[0]),m=!0)}}return m?l[l.length-1][1]=o[1]:l.push(o),l}};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 g,b,y,c,r;function h(o){const m=o.toString(16);return m.length<2?"0"+m:m}function l(o,m){return o<m?(m+.05)/(o+.05):(o+.05)/(m+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(o){o.toCss=function(m,x,v,w){return w!==void 0?`#${h(m)}${h(x)}${h(v)}${h(w)}`:`#${h(m)}${h(x)}${h(v)}`},o.toRgba=function(m,x,v,w=255){return(m<<24|x<<16|v<<8|w)>>>0},o.toColor=function(m,x,v,w){return{css:o.toCss(m,x,v,w),rgba:o.toRgba(m,x,v,w)}}})(g||(n.channels=g={})),(function(o){function m(x,v){return a=Math.round(255*v),[u,f,_]=r.toChannels(x.rgba),{css:g.toCss(u,f,_,a),rgba:g.toRgba(u,f,_,a)}}o.blend=function(x,v){if(a=(255&v.rgba)/255,a===1)return{css:v.css,rgba:v.rgba};const w=v.rgba>>24&255,S=v.rgba>>16&255,C=v.rgba>>8&255,L=x.rgba>>24&255,R=x.rgba>>16&255,E=x.rgba>>8&255;return u=L+Math.round((w-L)*a),f=R+Math.round((S-R)*a),_=E+Math.round((C-E)*a),{css:g.toCss(u,f,_),rgba:g.toRgba(u,f,_)}},o.isOpaque=function(x){return(255&x.rgba)==255},o.ensureContrastRatio=function(x,v,w){const S=r.ensureContrastRatio(x.rgba,v.rgba,w);if(S)return g.toColor(S>>24&255,S>>16&255,S>>8&255)},o.opaque=function(x){const v=(255|x.rgba)>>>0;return[u,f,_]=r.toChannels(v),{css:g.toCss(u,f,_),rgba:v}},o.opacity=m,o.multiplyOpacity=function(x,v){return a=255&x.rgba,m(x,a*v/255)},o.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(b||(n.color=b={})),(function(o){let m,x;try{const v=document.createElement("canvas");v.width=1,v.height=1;const w=v.getContext("2d",{willReadFrequently:!0});w&&(m=w,m.globalCompositeOperation="copy",x=m.createLinearGradient(0,0,1,1))}catch{}o.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),g.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),g.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 w=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(w)return u=parseInt(w[1]),f=parseInt(w[2]),_=parseInt(w[3]),a=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),g.toColor(u,f,_,a);if(!m||!x)throw new Error("css.toColor: Unsupported css format");if(m.fillStyle=x,m.fillStyle=v,typeof m.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(m.fillRect(0,0,1,1),[u,f,_,a]=m.getImageData(0,0,1,1).data,a!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(u,f,_,a),css:v}}})(y||(n.css=y={})),(function(o){function m(x,v,w){const S=x/255,C=v/255,L=w/255;return .2126*(S<=.03928?S/12.92:Math.pow((S+.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))}o.relativeLuminance=function(x){return m(x>>16&255,x>>8&255,255&x)},o.relativeLuminance2=m})(c||(n.rgb=c={})),(function(o){function m(v,w,S){const C=v>>24&255,L=v>>16&255,R=v>>8&255;let E=w>>24&255,T=w>>16&255,k=w>>8&255,W=l(c.relativeLuminance2(E,T,k),c.relativeLuminance2(C,L,R));for(;W<S&&(E>0||T>0||k>0);)E-=Math.max(0,Math.ceil(.1*E)),T-=Math.max(0,Math.ceil(.1*T)),k-=Math.max(0,Math.ceil(.1*k)),W=l(c.relativeLuminance2(E,T,k),c.relativeLuminance2(C,L,R));return(E<<24|T<<16|k<<8|255)>>>0}function x(v,w,S){const C=v>>24&255,L=v>>16&255,R=v>>8&255;let E=w>>24&255,T=w>>16&255,k=w>>8&255,W=l(c.relativeLuminance2(E,T,k),c.relativeLuminance2(C,L,R));for(;W<S&&(E<255||T<255||k<255);)E=Math.min(255,E+Math.ceil(.1*(255-E))),T=Math.min(255,T+Math.ceil(.1*(255-T))),k=Math.min(255,k+Math.ceil(.1*(255-k))),W=l(c.relativeLuminance2(E,T,k),c.relativeLuminance2(C,L,R));return(E<<24|T<<16|k<<8|255)>>>0}o.blend=function(v,w){if(a=(255&w)/255,a===1)return w;const S=w>>24&255,C=w>>16&255,L=w>>8&255,R=v>>24&255,E=v>>16&255,T=v>>8&255;return u=R+Math.round((S-R)*a),f=E+Math.round((C-E)*a),_=T+Math.round((L-T)*a),g.toRgba(u,f,_)},o.ensureContrastRatio=function(v,w,S){const C=c.relativeLuminance(v>>8),L=c.relativeLuminance(w>>8);if(l(C,L)<S){if(L<C){const T=m(v,w,S),k=l(C,c.relativeLuminance(T>>8));if(k<S){const W=x(v,w,S);return k>l(C,c.relativeLuminance(W>>8))?T:W}return T}const R=x(v,w,S),E=l(C,c.relativeLuminance(R>>8));if(E<S){const T=m(v,w,S);return E>l(C,c.relativeLuminance(T>>8))?R:T}return R}},o.reduceLuminance=m,o.increaseLuminance=x,o.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=l},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,g){this._data[_]||(this._data[_]={}),this._data[_][a]=g}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,g,b){this._data.get(f,_)||this._data.set(f,_,new u),this._data.get(f,_).set(a,g,b)}get(f,_,a,g){var b;return(b=this._data.get(f,_))==null?void 0:b.get(a,g)}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(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 y=0,c=0,r=b.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),c=Math.max(y,c),h=b.timeRemaining(),1.5*c>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(b){return setTimeout((()=>b(this._createDeadline(16))))}_cancelCallback(b){clearTimeout(b)}_createDeadline(b){const y=Date.now()+b;return{timeRemaining:()=>Math.max(0,y-Date.now())}}}n.PriorityTaskQueue=a,n.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:a,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}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,g=0){this._ext=0,this._urlId=0,this._ext=a,this._urlId=g}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 g 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 c=new g;return c.setFromCharData(y),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(y){this.fg=y[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let c=!1;if(y[_.CHAR_DATA_CHAR_INDEX].length>2)c=!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:c=!0}else c=!0}else this.content=y[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|y[_.CHAR_DATA_WIDTH_INDEX]<<22;c&&(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=g},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 g=f;g<_;++g){let b=u[g];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,g=0;if(this._interim){const b=u.charCodeAt(g++);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=g;b<_;++b){const y=u.charCodeAt(b);if(55296<=y&&y<=56319){if(++b>=_)return this._interim=y,a;const c=u.charCodeAt(b);56320<=c&&c<=57343?f[a++]=1024*(y-55296)+c-56320+65536:(f[a++]=y,f[a++]=c)}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,g,b,y,c=0,r=0,h=0;if(this.interim[0]){let m=!1,x=this.interim[0];x&=(224&x)==192?31:(240&x)==224?15:7;let v,w=0;for(;(v=63&this.interim[++w])&&w<4;)x<<=6,x|=v;const S=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,C=S-w;for(;h<C;){if(h>=_)return 0;if(v=u[h++],(192&v)!=128){h--,m=!0;break}this.interim[w++]=v,x<<=6,x|=63&v}m||(S===2?x<128?h--:f[c++]=x:S===3?x<2048||x>=55296&&x<=57343||x===65279||(f[c++]=x):x<65536||x>1114111||(f[c++]=x)),this.interim.fill(0)}const l=_-4;let o=h;for(;o<_;){for(;!(!(o<l)||128&(a=u[o])||128&(g=u[o+1])||128&(b=u[o+2])||128&(y=u[o+3]));)f[c++]=a,f[c++]=g,f[c++]=b,f[c++]=y,o+=4;if(a=u[o++],a<128)f[c++]=a;else if((224&a)==192){if(o>=_)return this.interim[0]=a,c;if(g=u[o++],(192&g)!=128){o--;continue}if(r=(31&a)<<6|63&g,r<128){o--;continue}f[c++]=r}else if((240&a)==224){if(o>=_)return this.interim[0]=a,c;if(g=u[o++],(192&g)!=128){o--;continue}if(o>=_)return this.interim[0]=a,this.interim[1]=g,c;if(b=u[o++],(192&b)!=128){o--;continue}if(r=(15&a)<<12|(63&g)<<6|63&b,r<2048||r>=55296&&r<=57343||r===65279)continue;f[c++]=r}else if((248&a)==240){if(o>=_)return this.interim[0]=a,c;if(g=u[o++],(192&g)!=128){o--;continue}if(o>=_)return this.interim[0]=a,this.interim[1]=g,c;if(b=u[o++],(192&b)!=128){o--;continue}if(o>=_)return this.interim[0]=a,this.interim[1]=g,this.interim[2]=b,c;if(y=u[o++],(192&y)!=128){o--;continue}if(r=(7&a)<<18|(63&g)<<12|(63&b)<<6|63&y,r<65536||r>1114111)continue;f[c++]=r}}return c}}},776:function(j,n,u){var f=this&&this.__decorate||function(r,h,l,o){var m,x=arguments.length,v=x<3?h:o===null?o=Object.getOwnPropertyDescriptor(h,l):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(r,h,l,o);else for(var w=r.length-1;w>=0;w--)(m=r[w])&&(v=(x<3?m(v):x>3?m(h,l,v):m(h,l))||v);return x>3&&v&&Object.defineProperty(h,l,v),v},_=this&&this.__param||function(r,h){return function(l,o){h(l,o,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const a=u(859),g=u(97),b={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let y,c=n.LogService=class extends a.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),y=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,l){this._evalLazyOptionalParams(l),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...l)}trace(r,...h){var l;this._logLevel<=g.LogLevelEnum.TRACE&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var l;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var l;this._logLevel<=g.LogLevelEnum.INFO&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var l;this._logLevel<=g.LogLevelEnum.WARN&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var l;this._logLevel<=g.LogLevelEnum.ERROR&&this._log(((l=this._optionsService.options.logger)==null?void 0:l.error.bind(this._optionsService.options.logger))??console.error,r,h)}};n.LogService=c=f([_(0,g.IOptionsService)],c),n.setTraceLogger=function(r){y=r},n.traceCall=function(r,h,l){if(typeof l.value!="function")throw new Error("not supported");const o=l.value;l.value=function(...m){if(y.logLevel!==g.LogLevelEnum.TRACE)return o.apply(this,m);y.trace(`GlyphRenderer#${o.name}(${m.map((v=>JSON.stringify(v))).join(", ")})`);const x=o.apply(this,m);return y.trace(`GlyphRenderer#${o.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(g,b,y){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,g,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")}},B={};function ee(j){var n=B[j];if(n!==void 0)return n.exports;var u=B[j]={exports:{}};return G[j].call(u.exports,u,u.exports,ee),u.exports}var ne={};return(()=>{var j=ne;Object.defineProperty(j,"__esModule",{value:!0}),j.CanvasAddon=void 0;const n=ee(345),u=ee(859),f=ee(776),_=ee(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 y=b._core;if(!b.element)return void this.register(y.onWillOpen((()=>this.activate(b))));this._terminal=b;const c=y.coreService,r=y.optionsService,h=y.screenElement,l=y.linkifier,o=y,m=o._bufferService,x=o._renderService,v=o._characterJoinerService,w=o._charSizeService,S=o._coreBrowserService,C=o._decorationService,L=o._logService,R=o._themeService;(0,f.setTraceLogger)(L),this._renderer=new _.CanvasRenderer(b,h,l,m,w,r,v,c,S,C,R),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(m.cols,m.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()}}j.CanvasAddon=a})(),ne})()))})(Nl)),Nl.exports}var og=ag();/**
|
|
115
|
+
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
116
|
+
* @license MIT
|
|
117
|
+
*
|
|
118
|
+
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
119
|
+
* @license MIT
|
|
120
|
+
*
|
|
121
|
+
* Originally forked from (with the author's permission):
|
|
122
|
+
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
123
|
+
* http://bellard.org/jslinux/
|
|
124
|
+
* Copyright (c) 2011 Fabrice Bellard
|
|
125
|
+
*/var lg=class{constructor(I,X,G,B={}){this._terminal=I,this._regex=X,this._handler=G,this._options=B}provideLinks(I,X){let G=hg.computeLink(I,this._regex,this._terminal,this._handler);X(this._addCallbacks(G))}_addCallbacks(I){return I.map(X=>(X.leave=this._options.leave,X.hover=(G,B)=>{if(this._options.hover){let{range:ee}=X;this._options.hover(G,B,ee)}},X))}};function cg(I){try{let X=new URL(I),G=X.password&&X.username?`${X.protocol}//${X.username}:${X.password}@${X.host}`:X.username?`${X.protocol}//${X.username}@${X.host}`:`${X.protocol}//${X.host}`;return I.toLocaleLowerCase().startsWith(G.toLocaleLowerCase())}catch{return!1}}var hg=class ua{static computeLink(X,G,B,ee){let ne=new RegExp(G.source,(G.flags||"")+"g"),[j,n]=ua._getWindowedLineStrings(X-1,B),u=j.join(""),f,_=[];for(;f=ne.exec(u);){let a=f[0];if(!cg(a))continue;let[g,b]=ua._mapStrIdx(B,n,0,f.index),[y,c]=ua._mapStrIdx(B,g,b,a.length);if(g===-1||b===-1||y===-1||c===-1)continue;let r={start:{x:b+1,y:g+1},end:{x:c,y:y+1}};_.push({range:r,text:a,activate:ee})}return _}static _getWindowedLineStrings(X,G){let B,ee=X,ne=X,j=0,n="",u=[];if(B=G.buffer.active.getLine(X)){let f=B.translateToString(!0);if(B.isWrapped&&f[0]!==" "){for(j=0;(B=G.buffer.active.getLine(--ee))&&j<2048&&(n=B.translateToString(!0),j+=n.length,u.push(n),!(!B.isWrapped||n.indexOf(" ")!==-1)););u.reverse()}for(u.push(f),j=0;(B=G.buffer.active.getLine(++ne))&&B.isWrapped&&j<2048&&(n=B.translateToString(!0),j+=n.length,u.push(n),n.indexOf(" ")===-1););}return[u,ee]}static _mapStrIdx(X,G,B,ee){let ne=X.buffer.active,j=ne.getNullCell(),n=B;for(;ee;){let u=ne.getLine(G);if(!u)return[-1,-1];for(let f=n;f<u.length;++f){u.getCell(f,j);let _=j.getChars();if(j.getWidth()&&(ee-=_.length||1,f===u.length-1&&_==="")){let a=ne.getLine(G+1);a&&a.isWrapped&&(a.getCell(0,j),j.getWidth()===2&&(ee+=1))}if(ee<0)return[G,f]}G++,n=0}return[G,n]}},ug=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function dg(I,X){let G=window.open();if(G){try{G.opener=null}catch{}G.location.href=X}else console.warn("Opening link blocked as opener could not be cleared")}var fg=class{constructor(I=dg,X={}){this._handler=I,this._options=X}activate(I){this._terminal=I;let X=this._options,G=X.urlRegex||ug;this._linkProvider=this._terminal.registerLinkProvider(new lg(this._terminal,G,this._handler,X))}dispose(){var I;(I=this._linkProvider)==null||I.dispose()}};const fa=new RegExp("(?<![a-zA-Z]:\\/\\/)(?:^|[\\s\"'`(\\[{])([./]?[\\w./-]+\\.[a-zA-Z]{1,10})(?::(\\d+)(?::(\\d+))?|\\((\\d+),(\\d+)\\))?","g");function lf(I){return!(!/\.[a-zA-Z]{1,10}(?::\d+(?::\d+)?|\(\d+,\d+\))?$/.test(I)||/^https?:\/\//i.test(I)||/^[a-z0-9-]+\.(com|org|net|io|dev|app|co)$/i.test(I))}const _g=typeof navigator<"u"&&navigator.platform.toUpperCase().includes("MAC");class vg{constructor(X,G,B,ee){this.terminal=X,this.onFileOpen=G,this.terminalId=B,this.decorationManager=ee}provideLinks(X,G){const B=this.terminal.buffer.active.getLine(X-1);if(!B){G(void 0);return}const ee=B.translateToString(),ne=new RegExp(fa.source,fa.flags),j=[];let n;for(;(n=ne.exec(ee))!==null;){const u=n[1];if(!u||!lf(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],g=a.indexOf(u),b=n.index+g,y=n.index+a.length,c=b,r=X-1;j.push({range:{start:{x:b+1,y:X},end:{x:y,y:X}},text:a.substring(g),decorations:{pointerCursor:!0,underline:!0},activate:(h,l)=>{(_g?!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()}})}G(j.length>0?j:void 0)}}class gg{constructor(X){ha(this,"disposables",[]);ha(this,"entries",[]);ha(this,"lastScannedLine",-1);this.terminal=X,this.disposables.push(X.onWriteParsed(()=>this.scanNewLines()))}highlightAt(X,G){for(const B of this.entries)B.marker.line===X&&B.x===G&&B.element&&B.element.classList.add("file-path-decoration-hover")}unhighlightAll(){var X;for(const G of this.entries)(X=G.element)==null||X.classList.remove("file-path-decoration-hover")}scanNewLines(){const X=this.terminal.buffer.active,G=X.baseY+X.cursorY;for(let B=this.lastScannedLine+1;B<=G;B++)this.decorateLine(B);this.lastScannedLine=G}decorateLine(X){const G=this.terminal.buffer.active,B=G.getLine(X);if(!B)return;const ee=B.translateToString(),ne=new RegExp(fa.source,fa.flags);let j;for(;(j=ne.exec(ee))!==null;){const n=j[1];if(!n||!lf(n))continue;const u=j[0],f=u.indexOf(n),_=j.index+f,a=u.length-f,g=G.baseY+G.cursorY,b=X-g,y=this.terminal.registerMarker(b);if(!y||y.line===-1)continue;const c={marker:y,x:_},r=this.terminal.registerDecoration({marker:y,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(y)}}dispose(){for(const X of this.disposables)X.dispose();this.disposables=[],this.entries=[],this.lastScannedLine=-1}}const pg=1;function Zd(I,X){if(!I||I.readyState!==WebSocket.OPEN)return;const G=new TextEncoder().encode(X),B=new Uint8Array(1+G.length);B[0]=pg,B.set(G,1),I.send(B.buffer)}function mg({wsRef:I,modifierRef:X}){const[G,B]=ye.useState(null);ye.useEffect(()=>(X.current.clearCallback=()=>B(null),()=>{X.current.clearCallback=null}),[X]);const ee=ye.useCallback(u=>{u.preventDefault(),Zd(I.current,"\x1B")},[I]),ne=ye.useCallback(u=>{u.preventDefault(),Zd(I.current," ")},[I]),j=ye.useCallback(u=>{u.preventDefault();const f=G==="ctrl"?null:"ctrl";B(f),X.current.ctrl=f==="ctrl",X.current.cmd=!1},[G,X]),n=ye.useCallback(u=>{u.preventDefault();const f=G==="cmd"?null:"cmd";B(f),X.current.cmd=f==="cmd",X.current.ctrl=!1},[G,X]);return Q.jsxs("div",{className:"virtual-keyboard",role:"toolbar","aria-label":"Virtual modifier keys",children:[Q.jsx("button",{className:"virtual-key",onPointerDown:ee,tabIndex:-1,children:"Esc"}),Q.jsx("button",{className:"virtual-key",onPointerDown:ne,tabIndex:-1,children:"Tab"}),Q.jsx("button",{className:`virtual-key virtual-key-modifier${G==="ctrl"?" virtual-key-active":""}`,onPointerDown:j,tabIndex:-1,"aria-pressed":G==="ctrl",children:"Ctrl"}),Q.jsx("button",{className:`virtual-key virtual-key-modifier${G==="cmd"?" virtual-key-active":""}`,onPointerDown:n,tabIndex:-1,"aria-pressed":G==="cmd",children:"Cmd"})]})}function Sg({fitRef:I,wsRef:X,xtermRef:G}){const B=ne=>{var r,h,l,o,m;ne.preventDefault();const j=I.current,n=X.current,u=G.current;if(!j||!n||n.readyState!==WebSocket.OPEN||!u)return;const f=u.cols,_=u.rows,a=(r=u.element)==null?void 0:r.parentElement,g=a?window.getComputedStyle(a):null;console.log("[refresh] before:",{cols:f,rows:_,containerW:g==null?void 0:g.width,containerH:g==null?void 0:g.height});const b=(l=(h=u.buffer)==null?void 0:h.active)==null?void 0:l.baseY,y=(m=(o=u.buffer)==null?void 0:o.active)==null?void 0:m.viewportY,c=!b||y==null||y>=b;j.fit(),c?u.scrollToBottom():u.scrollToLine(y),console.log("[refresh] after fit():",{cols:u.cols,rows:u.rows,changed:u.cols!==f||u.rows!==_}),da(n,"resize",{cols:u.cols,rows:u.rows}),console.log("[refresh] sent resize control frame:",{cols:u.cols,rows:u.rows})},ee=ne=>{var j;ne.preventDefault(),(j=G.current)==null||j.scrollToBottom()};return Q.jsxs("div",{className:"terminal-controls",children:[Q.jsx("button",{className:"terminal-control-btn",onPointerDown:B,tabIndex:-1,"aria-label":"Refresh terminal",children:Q.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[Q.jsx("path",{d:"M13.5 2.5v4h-4"}),Q.jsx("path",{d:"M2.5 8a5.5 5.5 0 0 1 9.35-3.5L13.5 6.5"}),Q.jsx("path",{d:"M2.5 13.5v-4h4"}),Q.jsx("path",{d:"M13.5 8a5.5 5.5 0 0 1-9.35 3.5L2.5 9.5"})]})}),Q.jsx("button",{className:"terminal-control-btn",onPointerDown:ee,tabIndex:-1,"aria-label":"Scroll to bottom",children:Q.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[Q.jsx("path",{d:"M8 3v8"}),Q.jsx("path",{d:"M4 8l4 4 4-4"}),Q.jsx("line",{x1:"4",y1:"13",x2:"12",y2:"13"})]})})]})}const cf=0,hf=1,uf=["image/png","image/jpeg","image/gif","image/webp","image/bmp"];async function Cg(I){var G;if(!((G=navigator.clipboard)!=null&&G.read))return!1;let X=!1;try{const B=await navigator.clipboard.read();for(const ee of B){const ne=ee.types.find(j=>uf.includes(j));if(ne){X=!0;const j=await ee.getType(ne);I.write(`\r
|
|
126
|
+
\x1B[90m[Uploading image...]\x1B[0m`);const{path:n}=await sf(j);return I.write("\r\x1B[2K"),I.paste(n),!0}}}catch{if(X)return I.write(`\r\x1B[2K\x1B[31m[Image upload failed]\x1B[0m\r
|
|
127
|
+
`),!0}return!1}async function yg(I){var X;if(!await Cg(I))try{const G=await((X=navigator.clipboard)==null?void 0:X.readText());G&&I.paste(G)}catch{}}function bg(I,X){var B;const G=(B=I.clipboardData)==null?void 0:B.items;if(G){for(const ee of Array.from(G))if(uf.includes(ee.type)){const ne=ee.getAsFile();if(!ne)continue;I.preventDefault(),X.write(`\r
|
|
128
|
+
\x1B[90m[Uploading image...]\x1B[0m`),sf(ne).then(({path:j})=>{X.write("\r\x1B[2K"),X.paste(j)}).catch(()=>{X.write(`\r\x1B[2K\x1B[31m[Image upload failed]\x1B[0m\r
|
|
129
|
+
`)});return}}}function Jd({wsPath:I,onFileOpen:X,persistent:G}){const B=ye.useRef(null),ee=ye.useRef(null),ne=ye.useRef(null),j=ye.useRef(null),n=ye.useRef({ctrl:!1,cmd:!1,clearCallback:null}),u=rf(`(max-width: ${ef}px)`),[f,_]=ye.useState("connected");return ye.useEffect(()=>{if(!B.current)return;const a=new tg.Terminal({cursorBlink:!0,fontSize:13,lineHeight:1,fontFamily:'Menlo, Monaco, "Courier New", monospace',customGlyphs:!0,scrollback:5e4,theme:{background:"#1a1a1a",foreground:"#e0e0e0",cursor:"#ffffff"},allowProposedApi:!0,linkHandler:{activate:(M,H)=>{window.open(H,"_blank","noopener")}}});ee.current=a;const g=new sg.FitAddon;j.current=g,a.loadAddon(g),a.open(B.current);const b=()=>{try{a.loadAddon(new og.CanvasAddon)}catch{}};try{const M=new ng.WebglAddon;M.onContextLoss(()=>{M.dispose(),b()}),a.loadAddon(M)}catch{b()}const y=new fg((M,H)=>{M.preventDefault(),window.open(H,"_blank")});a.loadAddon(y);const c=I.split("/").pop();let r=null,h=null;if(X){h=new gg(a);const M=new vg(a,(H,$,K,ce)=>{X(H,$,K,ce)},c,h);r=a.registerLinkProvider(M)}const l=navigator.platform.toUpperCase().includes("MAC");a.attachCustomKeyEventHandler(M=>{if(M.type!=="keydown")return!0;if(M.key==="Enter"&&M.shiftKey)return M.preventDefault(),a.paste(`\\
|
|
130
|
+
`),!1;if(!(l?M.metaKey:M.ctrlKey&&M.shiftKey))return!0;if(M.key==="c"||M.key==="C"){const $=a.getSelection();return $?(M.preventDefault(),navigator.clipboard.writeText($).catch(()=>{}),!1):!0}return M.key==="v"||M.key==="V"?(M.preventDefault(),yg(a),!1):!0});const o=M=>bg(M,a);B.current.addEventListener("paste",o);const m=()=>{var ce,oe,q;const M=(ce=B.current)==null?void 0:ce.getBoundingClientRect();if(!M||M.width===0||M.height===0)return;const H=(q=(oe=a.buffer)==null?void 0:oe.active)==null?void 0:q.baseY;if(!H){g.fit();return}const $=a.buffer.active.viewportY,K=$==null||$>=H;g.fit(),K?a.scrollToBottom():a.scrollToLine($)};let x=null;const v=()=>{x&&clearTimeout(x),x=setTimeout(()=>{x=null,m()},150)};m();const w=setTimeout(v,300),C=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}${I}`,L={lastSeq:0,attempts:0,rapidFailures:0,timer:null,disposed:!1,initialPhase:!0,initialBuffer:"",flushTimer:null},R=15,E=5,T=3e4,k=M=>(M=M.replace(/\x1b\[[\?>][\d;]*c/g,""),M=M.replace(/\[[\?>][\d;]*c/g,""),M),W=M=>{const H=M!==void 0?`${C}?resume=${M}`:C,$=new WebSocket(H);$.binaryType="arraybuffer",ne.current=$;const K=Date.now();L.initialPhase=!0,L.initialBuffer="",L.flushTimer&&(clearTimeout(L.flushTimer),L.flushTimer=null);const ce=()=>{if(L.initialPhase=!1,L.flushTimer=null,L.initialBuffer){const oe=k(L.initialBuffer);oe&&a.write(oe,()=>{a.scrollToBottom()}),L.initialBuffer=""}v(),setTimeout(()=>{var oe;((oe=ne.current)==null?void 0:oe.readyState)===WebSocket.OPEN&&da(ne.current,"resize",{cols:a.cols,rows:a.rows}),a.scrollToBottom()},350)};$.onopen=()=>{L.attempts=0,L.rapidFailures=0,_("connected"),da($,"resize",{cols:a.cols,rows:a.rows})},$.onmessage=oe=>{var J;const q=new Uint8Array(oe.data);if(q.length===0)return;const z=q[0],te=q.subarray(1);if(z===hf){const _e=new TextDecoder().decode(te);if(L.initialPhase)L.initialBuffer+=_e,L.flushTimer||(L.flushTimer=setTimeout(ce,500));else{const fe=k(_e);fe&&a.write(fe)}}else if(z===cf)try{const _e=JSON.parse(new TextDecoder().decode(te));_e.type==="seq"&&typeof((J=_e.payload)==null?void 0:J.seq)=="number"&&(L.lastSeq=_e.payload.seq)}catch{}},$.onclose=()=>{if(L.disposed)return;if(Date.now()-K<2e3?L.rapidFailures++:L.rapidFailures=0,L.rapidFailures>=E||L.attempts>=R){_("disconnected"),a.write(`\r
|
|
131
|
+
\x1B[90m[Session ended — unable to reconnect]\x1B[0m\r
|
|
132
|
+
`);return}_("reconnecting"),L.attempts===0&&a.write(`\r
|
|
133
|
+
\x1B[33m[Connection lost — reconnecting...]\x1B[0m`);const q=Math.min(1e3*Math.pow(2,L.attempts),T);L.attempts++,L.timer=setTimeout(()=>{L.disposed||W(L.lastSeq||void 0)},q)},$.onerror=()=>{}},U=/Android|iPhone|iPad|iPod/i.test(navigator.userAgent);let P="",F=0;a.onData(M=>{var K,ce,oe,q,z,te;const H=ne.current;if(!H||H.readyState!==WebSocket.OPEN)return;if(U){const J=Date.now();if(M===P&&J-F<150)return;P=M,F=J}if(L.initialPhase){const J=M.replace(/\x1b\[[\?>][\d;]*c/g,"").replace(/\x1b\[\d+;\d+R/g,"").replace(/\x1b\[\?[\d;]*\$y/g,"");if(!J)return;M=J}const $=n.current;if(($.ctrl||$.cmd)&&M.length===1){const J=M.charCodeAt(0);if($.ctrl)J>=97&&J<=122?M=String.fromCharCode(J-96):J>=65&&J<=90&&(M=String.fromCharCode(J-64)),$.ctrl=!1,$.cmd=!1,(K=$.clearCallback)==null||K.call($);else if($.cmd){const _e=M.toLowerCase();if(_e==="v"){(ce=navigator.clipboard)==null||ce.readText().then(fe=>{fe&&a.paste(fe)}).catch(()=>{}),$.ctrl=!1,$.cmd=!1,(oe=$.clearCallback)==null||oe.call($);return}if(_e==="c"){const fe=a.getSelection();fe&&((q=navigator.clipboard)==null||q.writeText(fe).catch(()=>{})),$.ctrl=!1,$.cmd=!1,(z=$.clearCallback)==null||z.call($);return}$.ctrl=!1,$.cmd=!1,(te=$.clearCallback)==null||te.call($)}}wg(H,M)}),a.onResize(({cols:M,rows:H})=>{const $=ne.current;($==null?void 0:$.readyState)===WebSocket.OPEN&&da($,"resize",{cols:M,rows:H})}),W();const D=new ResizeObserver(v);D.observe(B.current);const O=()=>{document.hidden||v()};return document.addEventListener("visibilitychange",O),()=>{var M,H;L.disposed=!0,L.timer&&clearTimeout(L.timer),L.flushTimer&&clearTimeout(L.flushTimer),clearTimeout(w),x&&clearTimeout(x),h==null||h.dispose(),r==null||r.dispose(),(M=B.current)==null||M.removeEventListener("paste",o),D.disconnect(),document.removeEventListener("visibilitychange",O),(H=ne.current)==null||H.close(),a.dispose(),ee.current=null,ne.current=null,j.current=null}},[I]),Q.jsxs("div",{style:{width:"100%",height:"100%",display:"flex",flexDirection:"column",position:"relative"},children:[G===!1&&Q.jsx("div",{style:{backgroundColor:"#3a2a00",color:"#ffcc00",padding:"4px 12px",fontSize:"12px",flexShrink:0},children:"Session persistence unavailable — this terminal will not survive a restart"}),Q.jsx("div",{ref:B,className:"terminal-container",style:{width:"100%",flex:1,minHeight:0,overflow:"hidden",backgroundColor:"#1a1a1a"}}),f==="reconnecting"&&Q.jsxs("div",{className:"terminal-reconnecting-overlay",children:[Q.jsx("span",{className:"terminal-reconnecting-spinner"}),"Reconnecting…"]}),Q.jsx(Sg,{fitRef:j,wsRef:ne,xtermRef:ee}),u&&Q.jsx(mg,{wsRef:ne,modifierRef:n})]})}function wg(I,X){const G=new TextEncoder().encode(X),B=new Uint8Array(1+G.length);B[0]=hf,B.set(G,1),I.send(B.buffer)}function da(I,X,G){const B=JSON.stringify({type:X,payload:G}),ee=new TextEncoder().encode(B),ne=new Uint8Array(1+ee.length);ne[0]=cf,ne.set(ee,1),I.send(ne.buffer)}const xg=5e3;function Lg(){const[I,X]=ye.useState(null),[G,B]=ye.useState(null),ee=ye.useRef(!1),ne=ye.useCallback(async()=>{try{const n=await jv();X(u=>u!==null&&JSON.stringify(u)===JSON.stringify(n)?u:n),B(null)}catch(n){B(n instanceof Error?n.message:"Failed to fetch overview")}},[]);ye.useEffect(()=>{if(typeof EventSource>"u")return;const n=$v(),u=new EventSource(n);return u.onmessage=f=>{try{JSON.parse(f.data).type==="overview-changed"&&!ee.current&&(ee.current=!0,ne().finally(()=>{ee.current=!1}))}catch{}},u.onerror=()=>{},()=>u.close()},[ne]),ye.useEffect(()=>{ne();const n=setInterval(ne,xg);return()=>clearInterval(n)},[ne]);const j=ye.useCallback(async()=>{await qv(),await ne()},[ne]);return{data:I,error:G,refresh:j}}function Eg(I){if(I.blocked)return`Blocked: ${I.blocked}`;if(I.mode==="soft")return"running";if(!I.phase)return"starting";const X=I.planPhases;if(X.length===0)return I.phase;const G=X.findIndex(B=>B.id===I.phase);return G===-1?I.phase:`${I.phase} (${G+1}/${X.length})`}function zl(I){if(I<0)return"-";const X=Math.floor(I/6e4);if(X<60)return`${X}m`;const G=Math.floor(X/60),B=X%60;return G<24?`${G}h ${B}m`:`${Math.floor(G/24)}d ${G%24}h`}function Mg(I,X){if(!I)return"-";const G=Date.now()-new Date(I).getTime();if(G<0)return"-";const B=Math.max(0,G-X);return X===0?zl(G):`${zl(G)} wc / ${zl(B)} ag`}function Ag({builder:I,onOpen:X}){const G=I.issueNumber?`#${I.issueNumber}`:I.id,B=I.issueTitle||I.id,ee=I.blocked!==null&&I.blocked!=="",ne=Math.min(100,Math.max(0,Math.round(I.progress??0)));return Q.jsxs("tr",{className:`builder-row${ee?" builder-row--blocked":""}`,children:[Q.jsx("td",{className:"builder-col-id",children:G}),Q.jsx("td",{className:"builder-col-title",children:B}),Q.jsx("td",{className:"builder-col-state",children:Q.jsx("span",{className:ee?"builder-state-blocked":"builder-state-active",children:Eg(I)})}),Q.jsxs("td",{className:"builder-col-progress",children:[Q.jsx("div",{className:"progress-bar",children:Q.jsx("div",{className:`progress-fill${ee?" progress-fill--blocked":""}`,style:{width:`${ne}%`}})}),Q.jsxs("span",{className:"progress-pct",children:[ne,"%"]})]}),Q.jsx("td",{className:"builder-col-elapsed",children:Mg(I.startedAt,I.idleMs??0)}),Q.jsx("td",{className:"builder-col-actions",children:X&&Q.jsx("button",{className:"builder-row-open",onClick:()=>X(I),children:"Open"})})]})}function Rg(I){const X=Date.now()-new Date(I).getTime(),G=Math.floor(X/6e4);if(G<60)return`${Math.max(1,G)}m`;const B=Math.floor(G/60);return B<24?`${B}h`:`${Math.floor(B/24)}d`}function Dg(I,X){const G=[];for(const B of I)G.push({key:`pr-${B.number}`,issueOrPR:`#${B.number}`,title:B.title,kind:"PR review",kindClass:"attention-kind--pr",waitingSince:B.createdAt,url:B.url});for(const B of X){if(!B.blocked||!B.blockedSince||B.blocked==="PR review")continue;const ee=B.issueNumber?`#${B.issueNumber}`:B.id;G.push({key:`gate-${B.id}`,issueOrPR:ee,title:B.issueTitle||B.id,kind:B.blocked,kindClass:B.blocked==="spec review"?"attention-kind--spec":"attention-kind--plan",waitingSince:B.blockedSince})}return G.sort((B,ee)=>new Date(B.waitingSince).getTime()-new Date(ee.waitingSince).getTime()),G}function Tg({prs:I,builders:X}){const G=Dg(I,X);return G.length===0?Q.jsx("p",{className:"work-empty",children:"Nothing needs attention"}):Q.jsx("div",{className:"attention-rows",children:G.map(B=>{const ee=Q.jsxs(Q.Fragment,{children:[Q.jsx("span",{className:"attention-row-id",children:B.issueOrPR}),Q.jsx("span",{className:"attention-row-title",children:B.title}),Q.jsx("span",{className:`attention-row-kind ${B.kindClass}`,children:B.kind}),Q.jsx("span",{className:"attention-row-age",children:Rg(B.waitingSince)})]});return B.url?Q.jsx("a",{className:"attention-row",href:B.url,target:"_blank",rel:"noopener noreferrer",children:ee},B.key):Q.jsx("div",{className:"attention-row",children:ee},B.key)})})}function Bg(I){const X=Date.now()-new Date(I).getTime(),G=Math.floor(X/6e4);if(G<60)return`${Math.max(1,G)}m`;const B=Math.floor(G/60);return B<24?`${B}h`:`${Math.floor(B/24)}d`}const Og={high:"priority-dot--high",medium:"priority-dot--med",low:"priority-dot--low"},kg={bug:"type-tag--bug",project:"type-tag--project"};function Ul({label:I,filePath:X,onRefresh:G}){return Q.jsx("button",{className:"backlog-artifact-link",onClick:async B=>{B.preventDefault(),B.stopPropagation(),await Pl(X),G==null||G()},children:I})}function Hg({items:I,onRefresh:X}){const G=I.filter(B=>!B.hasBuilder);return G.length===0?Q.jsx("p",{className:"work-empty",children:"No open issues"}):Q.jsx("div",{className:"backlog-rows",children:G.map(B=>Q.jsxs("div",{className:"backlog-row",children:[Q.jsxs("a",{className:"backlog-row-main",href:B.url,target:"_blank",rel:"noopener noreferrer",children:[Q.jsx("span",{className:`backlog-priority-dot ${Og[B.priority]??"priority-dot--low"}`}),Q.jsxs("span",{className:"backlog-row-number",children:["#",B.number]}),Q.jsx("span",{className:`backlog-type-tag ${kg[B.type]??""}`,children:B.type}),Q.jsx("span",{className:"backlog-row-title",children:B.title}),Q.jsx("span",{className:"backlog-row-age",children:Bg(B.createdAt)})]}),(B.specPath||B.planPath||B.reviewPath)&&Q.jsxs("span",{className:"backlog-artifacts",children:[B.specPath&&Q.jsx(Ul,{label:"spec",filePath:B.specPath,onRefresh:X}),B.planPath&&Q.jsx(Ul,{label:"plan",filePath:B.planPath,onRefresh:X}),B.reviewPath&&Q.jsx(Ul,{label:"review",filePath:B.reviewPath,onRefresh:X})]})]},B.number))})}function Ng(I){const X=Date.now()-new Date(I).getTime(),G=Math.floor(X/6e4);if(G<60)return`${Math.max(1,G)}m ago`;const B=Math.floor(G/60);return B<24?`${B}h ago`:`${Math.floor(B/24)}d ago`}const zg={bug:"type-tag--bug",project:"type-tag--project"};function Ug({items:I}){return I.length===0?null:Q.jsx("div",{className:"recently-closed-rows",children:I.map(X=>Q.jsxs("a",{className:"recently-closed-row",href:X.url,target:"_blank",rel:"noopener noreferrer",children:[Q.jsx("span",{className:"recently-closed-check",children:"✓"}),Q.jsxs("span",{className:"backlog-row-number",children:["#",X.number]}),Q.jsx("span",{className:`backlog-type-tag ${zg[X.type]??""}`,children:X.type}),Q.jsx("span",{className:"backlog-row-title",children:X.title}),Q.jsx("span",{className:"backlog-row-age",children:Ng(X.closedAt)})]},X.number))})}function Ig(I,X){const G=I.replace(/^\//,"");return X.staged.some(B=>G.endsWith(B)||B.endsWith(G))?{indicator:"A",className:"git-staged"}:X.modified.some(B=>G.endsWith(B)||B.endsWith(G))?{indicator:"M",className:"git-modified"}:X.untracked.some(B=>G.endsWith(B)||B.endsWith(G))?{indicator:"?",className:"git-untracked"}:null}function df({entry:I,expanded:X,gitStatus:G,onToggle:B,onOpen:ee,depth:ne=0}){var f;const j=I.type==="directory",n=X.has(I.path),u=j?null:Ig(I.path,G);return Q.jsxs(Q.Fragment,{children:[Q.jsxs("div",{className:`file-node ${j?"directory":"file"}`,style:{paddingLeft:`${ne*16+8}px`},onClick:()=>j?B(I.path):ee(I.path),role:"treeitem","aria-expanded":j?n:void 0,tabIndex:0,onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),j?B(I.path):ee(I.path))},children:[Q.jsx("span",{className:"file-icon",children:j?n?"📂":"📁":"📄"}),Q.jsx("span",{className:"file-name",children:I.name}),u&&Q.jsx("span",{className:`git-indicator ${u.className}`,children:u.indicator})]}),j&&n&&((f=I.children)==null?void 0:f.map(_=>Q.jsx(df,{entry:_,expanded:X,gitStatus:G,onToggle:B,onOpen:ee,depth:ne+1},_.path)))]})}function ff(I,X=[]){for(const G of I)G.type==="file"&&X.push(G),G.children&&ff(G.children,X);return X}function Pg({onRefresh:I}){const[X,G]=ye.useState([]),[B,ee]=ye.useState(new Set),[ne,j]=ye.useState(null),[n,u]=ye.useState(!1),[f,_]=ye.useState({modified:[],staged:[],untracked:[]}),[a,g]=ye.useState([]),[b,y]=ye.useState(""),[c,r]=ye.useState(!1),h=ye.useRef(null),l=ye.useCallback(async()=>{try{const E=await Xv();G(E),j(null),u(!0)}catch(E){j(E.message)}},[]),o=ye.useCallback(async()=>{try{const E=await Yv();_(E)}catch(E){console.error("Failed to load git status:",E)}},[]),m=ye.useCallback(async()=>{try{const E=await Vv();g(E)}catch(E){console.error("Failed to load recent files:",E)}},[]);ye.useEffect(()=>{n||(l(),o(),m())},[n,l,o,m]),ye.useEffect(()=>{const E=setInterval(()=>{l(),o()},5e3);return()=>clearInterval(E)},[l,o]);const x=E=>{ee(T=>{const k=new Set(T);return k.has(E)?k.delete(E):k.add(E),k})},v=async E=>{try{await Pl(E),I(),m()}catch(T){console.error("Failed to open file:",T)}},w=ye.useMemo(()=>ff(X),[X]),S=ye.useMemo(()=>{if(!b.trim())return[];const E=b.toLowerCase();return w.filter(T=>T.name.toLowerCase().includes(E)||T.path.toLowerCase().includes(E)).slice(0,10)},[w,b]),C=E=>{y(E.target.value),r(!0)},L=E=>{E.key==="Escape"?(r(!1),y("")):E.key==="Enter"&&S.length>0&&(v(S[0].path),y(""),r(!1))},R=E=>{v(E),y(""),r(!1)};return ne?Q.jsxs("div",{className:"file-tree-error",children:["Error: ",ne]}):n?Q.jsxs("div",{className:"file-tree-container",children:[Q.jsxs("div",{className:"file-search",children:[Q.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&&S.length>0&&Q.jsx("div",{className:"file-search-suggestions",children:S.map(E=>Q.jsxs("div",{className:"file-search-suggestion",onMouseDown:()=>R(E.path),children:[Q.jsx("span",{className:"suggestion-name",children:E.name}),Q.jsx("span",{className:"suggestion-path",children:E.path})]},E.path))})]}),a.length>0&&Q.jsxs("div",{className:"file-tree-section",children:[Q.jsx("div",{className:"file-tree-section-header",children:"Recent"}),a.map(E=>Q.jsxs("div",{className:"file-node file recent-file",style:{paddingLeft:"8px"},onClick:()=>v(E.path),role:"treeitem",tabIndex:0,onKeyDown:T=>{(T.key==="Enter"||T.key===" ")&&(T.preventDefault(),v(E.path))},children:[Q.jsx("span",{className:"file-icon",children:"🕐"}),Q.jsx("span",{className:"file-name",children:E.name}),Q.jsx("span",{className:"file-path-hint",children:E.relativePath})]},E.id))]}),Q.jsxs("div",{className:"file-tree-section",children:[Q.jsx("div",{className:"file-tree-section-header",children:"Files"}),Q.jsx("div",{className:"file-tree",role:"tree","aria-label":"Project files",children:X.map(E=>Q.jsx(df,{entry:E,expanded:B,gitStatus:f,onToggle:x,onOpen:v},E.path))})]})]}):Q.jsx("div",{className:"file-tree-loading",children:"Loading files..."})}const er=['Use `af spawn --task "description"` for quick one-off tasks that don\'t need a spec',"Run `af status` to see all active builders and their current phase",'Use `af send architect "message"` to notify the architect when you need guidance',"Run `af cleanup --project 0042` after merging a PR to clean up the worktree","Use `af spawn --soft -p 42` for flexible, protocol-guided work without strict porch orchestration","Run `af dash start` to launch the architect dashboard","Use `af spawn 42 --resume` to resume an existing builder worktree instead of recreating it","Use `af open file.ts` to open a file in the dashboard annotation viewer","Run `af tower start` to start the Tower server — there is no `restart` command, use stop then start","Check `af-config.json` at your project root to customize builder and architect commands","Run `porch pending` to see all gates waiting for your approval across all projects","Use `porch status 42` to see detailed phase status for a specific project","Run `porch next 42` to get the next tasks for a project","Use `porch done 42` to signal that the current phase work is complete","Gates like `spec-approval` and `plan-approval` require explicit human approval before advancing","Porch tracks state in `codev/projects/<id>/status.yaml` — never edit this file directly","Use `porch approve 42 spec-approval` to approve a gate (human only)","Porch drives SPIR, TICK, and BUGFIX protocols via a state machine with automatic consultations","Use `consult -m gemini --type integration` for integration reviews with Gemini","Run `consult -m gemini --protocol spir --type spec` to get a Gemini review of your specification","Use `consult -m codex --protocol spir --type spec` for a focused specification review","Run `consult -m claude --protocol spir --type plan` to get feedback on your implementation plan","The `consult` CLI supports three models: `gemini`, `codex`, and `claude`",'Use `consult -m gemini --prompt "your question"` to ask Gemini a general question with codebase context','Say "cmap the PR" to run all three consultations in parallel in the background','Consultations are enabled by default in SPIR — say "without consultation" to skip them',"Commit specs and plans to `main` before spawning — builders branch from HEAD","Always add files explicitly with `git add file1 file2` — never use `git add .` or `git add -A`","Use SPIR for new features, TICK for amendments to existing specs, and BUGFIX for issue fixes","Each SPIR feature produces exactly three documents: spec, plan, and review","Specs define WHAT to build, plans define HOW — keep them as separate documents","Add YAML frontmatter with `approved` and `validated` fields to skip phases in porch","Run `codev doctor` to check that your environment is set up correctly","Use `--merge` (not squash) when merging PRs — individual commits document the development process","The TICK protocol modifies spec and plan in-place and creates a new review file","BUGFIX protocol uses GitHub Issues as source of truth — no spec/plan artifacts needed",'Run `tokei -e "node_modules" -e ".git" -e "dist" .` to measure codebase size',"Use `codev adopt` to set up Codev in an existing project","Click a builder card in the Work view to jump to its terminal tab","The file panel in Work view lets you browse project files without leaving the dashboard","Use the Refresh button to update builder status, PRs, and backlog data","The dashboard shows active builders, pending PRs, and backlog items in one view","Click the file panel toggle arrow to expand or collapse the file browser","The dashboard supports both desktop split-pane and mobile single-pane layouts","Tab indicators show builder status at a glance — active, waiting, or implementing","Use the `+ Shell` button to quickly open a new shell terminal tab","The SPIR protocol has four phases: Specify, Plan, Implement (IDE loop), and Review","Each implementation phase follows the IDE cycle: Implement, Defend (test), Evaluate","The EXPERIMENT protocol is for testing new approaches — use it for proof-of-concept work","The MAINTAIN protocol handles code hygiene and documentation sync","Run 3-way consultations at each SPIR checkpoint for spec, plan, and implementation reviews"];function Fg(I){const X=new Date(I.getFullYear(),0,0);return Math.floor((I.getTime()-X.getTime())/864e5)}function _f(I){const X=I.getFullYear(),G=String(I.getMonth()+1).padStart(2,"0"),B=String(I.getDate()).padStart(2,"0");return`tip-dismissed-${X}-${G}-${B}`}function jg(){try{return localStorage.getItem(_f(new Date))==="1"}catch{return!1}}function $g(){try{localStorage.setItem(_f(new Date),"1")}catch{}}function qg(I){return I.split("`").map((G,B)=>B%2===1?Q.jsx("code",{children:G},B):Q.jsx("span",{children:G},B))}function Wg(){const I=Fg(new Date)%er.length,[X,G]=ye.useState(I),[B,ee]=ye.useState(jg);if(B||er.length===0)return null;const ne=()=>{G((X-1+er.length)%er.length)},j=()=>{G((X+1)%er.length)},n=()=>{$g(),ee(!0)};return Q.jsxs("div",{className:"tip-banner",children:[Q.jsx("button",{className:"tip-banner-nav",onClick:ne,"aria-label":"Previous tip",children:"‹"}),Q.jsx("span",{className:"tip-banner-label",children:"Tip:"}),Q.jsx("span",{className:"tip-banner-text",children:qg(er[X])}),Q.jsx("button",{className:"tip-banner-nav",onClick:j,"aria-label":"Next tip",children:"›"}),Q.jsx("button",{className:"tip-banner-dismiss",onClick:n,"aria-label":"Dismiss tip",children:"×"})]})}function Gg({state:I,onRefresh:X,onSelectTab:G}){var _,a;const{data:B,error:ee,refresh:ne}=Lg(),[j,n]=ye.useState(!1),u=ye.useCallback(async()=>{try{await Wv(),X()}catch(g){console.error("Failed to create shell:",g)}},[X]),f=ye.useCallback(g=>{var y;const b=(y=I==null?void 0:I.builders)==null?void 0:y.find(c=>{var r,h,l,o;return g.issueNumber?((r=c.name)==null?void 0:r.includes(String(g.issueNumber)))||((h=c.id)==null?void 0:h.includes(String(g.issueNumber))):((l=c.id)==null?void 0:l.includes(g.id))||((o=c.name)==null?void 0:o.includes(g.id))});b&&(G==null||G(b.id))},[I==null?void 0:I.builders,G]);return I?Q.jsxs("div",{className:`work-view ${j?"file-panel-open":""}`,children:[Q.jsxs("div",{className:"work-content",children:[Q.jsxs("div",{className:"work-header",children:[Q.jsx("h2",{className:"work-title",children:"Work"}),Q.jsxs("div",{className:"work-actions",children:[Q.jsx("button",{className:"work-btn",onClick:u,children:"+ Shell"}),Q.jsx("button",{className:"work-btn work-btn-secondary",onClick:ne,children:"Refresh"})]})]}),ee&&Q.jsxs("div",{className:"work-error",children:["Failed to load overview: ",ee]}),Q.jsx(Wg,{}),Q.jsxs("section",{className:"work-section",children:[Q.jsx("h3",{className:"work-section-title",children:"Builders"}),B!=null&&B.builders&&B.builders.length>0?Q.jsxs("table",{className:"builder-table",children:[Q.jsx("thead",{children:Q.jsxs("tr",{children:[Q.jsx("th",{children:"Issue"}),Q.jsx("th",{children:"Title"}),Q.jsx("th",{children:"State"}),Q.jsx("th",{children:"Progress"}),Q.jsx("th",{children:"Elapsed"}),Q.jsx("th",{})]})}),Q.jsx("tbody",{children:B.builders.map(g=>Q.jsx(Ag,{builder:g,onOpen:f},g.id))})]}):Q.jsx("p",{className:"work-empty",children:"No active builders"})]}),Q.jsxs("section",{className:"work-section",children:[Q.jsx("h3",{className:"work-section-title",children:"Needs Attention"}),(_=B==null?void 0:B.errors)!=null&&_.prs?Q.jsx("p",{className:"work-unavailable",children:B.errors.prs}):Q.jsx(Tg,{prs:(B==null?void 0:B.pendingPRs)??[],builders:(B==null?void 0:B.builders)??[]})]}),Q.jsxs("section",{className:"work-section",children:[Q.jsx("h3",{className:"work-section-title",children:"Projects and Bugs"}),(a=B==null?void 0:B.errors)!=null&&a.issues?Q.jsx("p",{className:"work-unavailable",children:B.errors.issues}):Q.jsx(Hg,{items:(B==null?void 0:B.backlog)??[],onRefresh:X})]}),(B==null?void 0:B.recentlyClosed)&&B.recentlyClosed.length>0&&Q.jsxs("section",{className:"work-section",children:[Q.jsx("h3",{className:"work-section-title",children:"Recently Closed"}),Q.jsx(Ug,{items:B.recentlyClosed})]})]}),Q.jsxs("div",{className:`work-file-panel ${j?"expanded":"collapsed"}`,children:[Q.jsxs("div",{className:"work-file-panel-header",children:[Q.jsx("span",{className:"work-file-panel-toggle",onClick:()=>n(!j),children:j?"▼":"▲"}),Q.jsx("span",{className:"work-file-panel-label",onClick:()=>n(!j),children:"Files"}),!j&&Q.jsx("input",{className:"work-file-panel-search",type:"text",placeholder:"Search files...",onFocus:()=>n(!0)})]}),j&&Q.jsx("div",{className:"work-file-panel-content",children:Q.jsx(Pg,{onRefresh:X})})]})]}):Q.jsx("div",{className:"work-view",children:Q.jsx("p",{className:"work-loading",children:"Loading..."})})}function Xg({tabs:I,activeTabId:X,onSelectTab:G,onRefresh:B,children:ee}){return Q.jsxs("div",{className:"mobile-layout",children:[Q.jsx(nf,{tabs:I,activeTabId:X,onSelectTab:G,onRefresh:B}),Q.jsx("div",{className:"mobile-content",children:ee})]})}function Yg({tabId:I,initialLine:X}){let B=`${tf()}api/annotate/${I}/`;return X&&(B+=`?line=${X}`),Q.jsx("div",{className:"file-viewer",style:{width:"100%",height:"100%"},children:Q.jsx("iframe",{src:B,style:{width:"100%",height:"100%",border:"none"},title:"File Annotator"})})}function Vg(){const{state:I,refresh:X}=Kv(),{tabs:G,activeTab:B,activeTabId:ee,selectTab:ne}=Zv(I),j=rf(`(max-width: ${ef}px)`),[n,u]=ye.useState(new Set),f=ye.useRef(new Map),_=ye.useCallback(async(h,l,o,m)=>{try{const x=await Pl(h,l,m);l&&l>0&&f.current.set(x.id,l),X()}catch(x){console.error("Failed to open file:",x)}},[X]);ye.useEffect(()=>{I!=null&&I.workspaceName?document.title=`${I.workspaceName} dashboard`:document.title="dashboard"},[I==null?void 0:I.workspaceName]);const[a]=ye.useState(()=>new URLSearchParams(window.location.search).get("fullscreen")==="1");ye.useEffect(()=>{if(!B)return;(B.type==="architect"||B.type==="builder"||B.type==="shell")&&u(l=>{if(l.has(B.id))return l;const o=new Set(l);return o.add(B.id),o})},[B==null?void 0:B.id,B==null?void 0:B.type]);const g=h=>{const l=Xd(h);return l?Q.jsx(Jd,{wsPath:l,onFileOpen:_,persistent:h.persistent}):Q.jsx("div",{className:"no-terminal",children:"No terminal session"})},b=h=>{if(!h.annotationId||!I)return Q.jsx("div",{className:"no-terminal",children:"No file viewer"});if(!I.annotations.find(m=>m.id===h.annotationId))return Q.jsx("div",{className:"no-terminal",children:"Annotation not found"});const o=f.current.get(h.annotationId);return o!==void 0&&f.current.delete(h.annotationId),Q.jsx(Yg,{tabId:h.annotationId,initialLine:o??h.initialLine})},y=h=>{const l=G.filter(o=>h.includes(o.type)&&n.has(o.id));return Q.jsxs(Q.Fragment,{children:[l.map(o=>{const m=Xd(o);return Q.jsx("div",{className:"terminal-tab-pane",style:{display:ee===o.id?void 0:"none"},children:m?Q.jsx(Jd,{wsPath:m,onFileOpen:_,persistent:o.persistent}):Q.jsx("div",{className:"no-terminal",children:"No terminal session"})},o.id)}),Q.jsx("div",{style:{display:(B==null?void 0:B.type)==="work"?void 0:"none"},children:Q.jsx(Gg,{state:I,onRefresh:X,onSelectTab:ne})}),(B==null?void 0:B.type)==="file"&&b(B)]})};if(a)return B&&(B.type==="architect"||B.type==="builder"||B.type==="shell")?Q.jsx("div",{className:"fullscreen-terminal",children:g(B)}):Q.jsx("div",{className:"fullscreen-terminal"});if(j)return Q.jsx("div",{className:"mobile-wrapper",children:Q.jsx(Xg,{tabs:G,activeTabId:ee,onSelectTab:ne,onRefresh:X,children:y(["architect","builder","shell"])})});const c=G.find(h=>h.type==="architect"),r=c?g(c):Q.jsx("div",{className:"no-architect",children:"No architect terminal"});return Q.jsxs("div",{className:"app",children:[Q.jsxs("header",{className:"app-header",children:[Q.jsx("h1",{className:"app-title",children:I!=null&&I.workspaceName?`${I.workspaceName} dashboard`:"dashboard"}),(I==null?void 0:I.version)&&Q.jsxs("span",{className:"header-version",children:["v",I.version]})]}),Q.jsx("div",{className:"app-body",children:Q.jsx(Jv,{left:r,right:Q.jsxs("div",{className:"right-panel",children:[Q.jsx(nf,{tabs:G.filter(h=>h.type!=="architect"),activeTabId:ee,onSelectTab:ne,onRefresh:X}),Q.jsx("div",{className:"tab-content",role:"tabpanel",children:y(["builder","shell"])})]})})})]})}Iv.createRoot(document.getElementById("root")).render(Q.jsx(ye.StrictMode,{children:Q.jsx(Vg,{})}));
|
|
134
|
+
//# sourceMappingURL=index-CioZsJfL.js.map
|