wicked-crew 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,50 @@
1
+ (function(){const $=document.createElement("link").relList;if($&&$.supports&&$.supports("modulepreload"))return;for(const ee of document.querySelectorAll('link[rel="modulepreload"]'))Z(ee);new MutationObserver(ee=>{for(const oe of ee)if(oe.type==="childList")for(const K of oe.addedNodes)K.tagName==="LINK"&&K.rel==="modulepreload"&&Z(K)}).observe(document,{childList:!0,subtree:!0});function M(ee){const oe={};return ee.integrity&&(oe.integrity=ee.integrity),ee.referrerPolicy&&(oe.referrerPolicy=ee.referrerPolicy),ee.crossOrigin==="use-credentials"?oe.credentials="include":ee.crossOrigin==="anonymous"?oe.credentials="omit":oe.credentials="same-origin",oe}function Z(ee){if(ee.ep)return;ee.ep=!0;const oe=M(ee);fetch(ee.href,oe)}})();function Qh(F){return F&&F.__esModule&&Object.prototype.hasOwnProperty.call(F,"default")?F.default:F}var zo={exports:{}},Hi={},Wo={exports:{}},Ee={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Oc;function Yh(){if(Oc)return Ee;Oc=1;var F=Symbol.for("react.element"),$=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),Z=Symbol.for("react.strict_mode"),ee=Symbol.for("react.profiler"),oe=Symbol.for("react.provider"),K=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),u=Symbol.iterator;function v(b){return b===null||typeof b!="object"?null:(b=u&&b[u]||b["@@iterator"],typeof b=="function"?b:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,_={};function n(b,T,Q){this.props=b,this.context=T,this.refs=_,this.updater=Q||S}n.prototype.isReactComponent={},n.prototype.setState=function(b,T){if(typeof b!="object"&&typeof b!="function"&&b!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,b,T,"setState")},n.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function l(){}l.prototype=n.prototype;function s(b,T,Q){this.props=b,this.context=T,this.refs=_,this.updater=Q||S}var o=s.prototype=new l;o.constructor=s,x(o,n.prototype),o.isPureReactComponent=!0;var f=Array.isArray,w=Object.prototype.hasOwnProperty,y={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function g(b,T,Q){var te,ce={},ue=null,H=null;if(T!=null)for(te in T.ref!==void 0&&(H=T.ref),T.key!==void 0&&(ue=""+T.key),T)w.call(T,te)&&!E.hasOwnProperty(te)&&(ce[te]=T[te]);var L=arguments.length-2;if(L===1)ce.children=Q;else if(1<L){for(var Y=Array(L),X=0;X<L;X++)Y[X]=arguments[X+2];ce.children=Y}if(b&&b.defaultProps)for(te in L=b.defaultProps,L)ce[te]===void 0&&(ce[te]=L[te]);return{$$typeof:F,type:b,key:ue,ref:H,props:ce,_owner:y.current}}function R(b,T){return{$$typeof:F,type:b.type,key:T,ref:b.ref,props:b.props,_owner:b._owner}}function B(b){return typeof b=="object"&&b!==null&&b.$$typeof===F}function O(b){var T={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(Q){return T[Q]})}var j=/\/+/g;function A(b,T){return typeof b=="object"&&b!==null&&b.key!=null?O(""+b.key):T.toString(36)}function G(b,T,Q,te,ce){var ue=typeof b;(ue==="undefined"||ue==="boolean")&&(b=null);var H=!1;if(b===null)H=!0;else switch(ue){case"string":case"number":H=!0;break;case"object":switch(b.$$typeof){case F:case $:H=!0}}if(H)return H=b,ce=ce(H),b=te===""?"."+A(H,0):te,f(ce)?(Q="",b!=null&&(Q=b.replace(j,"$&/")+"/"),G(ce,T,Q,"",function(X){return X})):ce!=null&&(B(ce)&&(ce=R(ce,Q+(!ce.key||H&&H.key===ce.key?"":(""+ce.key).replace(j,"$&/")+"/")+b)),T.push(ce)),1;if(H=0,te=te===""?".":te+":",f(b))for(var L=0;L<b.length;L++){ue=b[L];var Y=te+A(ue,L);H+=G(ue,T,Q,Y,ce)}else if(Y=v(b),typeof Y=="function")for(b=Y.call(b),L=0;!(ue=b.next()).done;)ue=ue.value,Y=te+A(ue,L++),H+=G(ue,T,Q,Y,ce);else if(ue==="object")throw T=String(b),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.");return H}function J(b,T,Q){if(b==null)return b;var te=[],ce=0;return G(b,te,"","",function(ue){return T.call(Q,ue,ce++)}),te}function se(b){if(b._status===-1){var T=b._result;T=T(),T.then(function(Q){(b._status===0||b._status===-1)&&(b._status=1,b._result=Q)},function(Q){(b._status===0||b._status===-1)&&(b._status=2,b._result=Q)}),b._status===-1&&(b._status=0,b._result=T)}if(b._status===1)return b._result.default;throw b._result}var le={current:null},N={transition:null},C={ReactCurrentDispatcher:le,ReactCurrentBatchConfig:N,ReactCurrentOwner:y};function D(){throw Error("act(...) is not supported in production builds of React.")}return Ee.Children={map:J,forEach:function(b,T,Q){J(b,function(){T.apply(this,arguments)},Q)},count:function(b){var T=0;return J(b,function(){T++}),T},toArray:function(b){return J(b,function(T){return T})||[]},only:function(b){if(!B(b))throw Error("React.Children.only expected to receive a single React element child.");return b}},Ee.Component=n,Ee.Fragment=M,Ee.Profiler=ee,Ee.PureComponent=s,Ee.StrictMode=Z,Ee.Suspense=h,Ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=C,Ee.act=D,Ee.cloneElement=function(b,T,Q){if(b==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+b+".");var te=x({},b.props),ce=b.key,ue=b.ref,H=b._owner;if(T!=null){if(T.ref!==void 0&&(ue=T.ref,H=y.current),T.key!==void 0&&(ce=""+T.key),b.type&&b.type.defaultProps)var L=b.type.defaultProps;for(Y in T)w.call(T,Y)&&!E.hasOwnProperty(Y)&&(te[Y]=T[Y]===void 0&&L!==void 0?L[Y]:T[Y])}var Y=arguments.length-2;if(Y===1)te.children=Q;else if(1<Y){L=Array(Y);for(var X=0;X<Y;X++)L[X]=arguments[X+2];te.children=L}return{$$typeof:F,type:b.type,key:ce,ref:ue,props:te,_owner:H}},Ee.createContext=function(b){return b={$$typeof:K,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},b.Provider={$$typeof:oe,_context:b},b.Consumer=b},Ee.createElement=g,Ee.createFactory=function(b){var T=g.bind(null,b);return T.type=b,T},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(b){return{$$typeof:c,render:b}},Ee.isValidElement=B,Ee.lazy=function(b){return{$$typeof:m,_payload:{_status:-1,_result:b},_init:se}},Ee.memo=function(b,T){return{$$typeof:p,type:b,compare:T===void 0?null:T}},Ee.startTransition=function(b){var T=N.transition;N.transition={};try{b()}finally{N.transition=T}},Ee.unstable_act=D,Ee.useCallback=function(b,T){return le.current.useCallback(b,T)},Ee.useContext=function(b){return le.current.useContext(b)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(b){return le.current.useDeferredValue(b)},Ee.useEffect=function(b,T){return le.current.useEffect(b,T)},Ee.useId=function(){return le.current.useId()},Ee.useImperativeHandle=function(b,T,Q){return le.current.useImperativeHandle(b,T,Q)},Ee.useInsertionEffect=function(b,T){return le.current.useInsertionEffect(b,T)},Ee.useLayoutEffect=function(b,T){return le.current.useLayoutEffect(b,T)},Ee.useMemo=function(b,T){return le.current.useMemo(b,T)},Ee.useReducer=function(b,T,Q){return le.current.useReducer(b,T,Q)},Ee.useRef=function(b){return le.current.useRef(b)},Ee.useState=function(b){return le.current.useState(b)},Ee.useSyncExternalStore=function(b,T,Q){return le.current.useSyncExternalStore(b,T,Q)},Ee.useTransition=function(){return le.current.useTransition()},Ee.version="18.3.1",Ee}var Ic;function Xo(){return Ic||(Ic=1,Wo.exports=Yh()),Wo.exports}/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Nc;function Jh(){if(Nc)return Hi;Nc=1;var F=Xo(),$=Symbol.for("react.element"),M=Symbol.for("react.fragment"),Z=Object.prototype.hasOwnProperty,ee=F.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,oe={key:!0,ref:!0,__self:!0,__source:!0};function K(c,h,p){var m,u={},v=null,S=null;p!==void 0&&(v=""+p),h.key!==void 0&&(v=""+h.key),h.ref!==void 0&&(S=h.ref);for(m in h)Z.call(h,m)&&!oe.hasOwnProperty(m)&&(u[m]=h[m]);if(c&&c.defaultProps)for(m in h=c.defaultProps,h)u[m]===void 0&&(u[m]=h[m]);return{$$typeof:$,type:c,key:v,ref:S,props:u,_owner:ee.current}}return Hi.Fragment=M,Hi.jsx=K,Hi.jsxs=K,Hi}var Hc;function Zh(){return Hc||(Hc=1,zo.exports=Jh()),zo.exports}var W=Zh(),Ce=Xo();const qs=Qh(Ce);var Gs={},Uo={exports:{}},ut={},$o={exports:{}},Vo={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var Fc;function ed(){return Fc||(Fc=1,(function(F){function $(N,C){var D=N.length;N.push(C);e:for(;0<D;){var b=D-1>>>1,T=N[b];if(0<ee(T,C))N[b]=C,N[D]=T,D=b;else break e}}function M(N){return N.length===0?null:N[0]}function Z(N){if(N.length===0)return null;var C=N[0],D=N.pop();if(D!==C){N[0]=D;e:for(var b=0,T=N.length,Q=T>>>1;b<Q;){var te=2*(b+1)-1,ce=N[te],ue=te+1,H=N[ue];if(0>ee(ce,D))ue<T&&0>ee(H,ce)?(N[b]=H,N[ue]=D,b=ue):(N[b]=ce,N[te]=D,b=te);else if(ue<T&&0>ee(H,D))N[b]=H,N[ue]=D,b=ue;else break e}}return C}function ee(N,C){var D=N.sortIndex-C.sortIndex;return D!==0?D:N.id-C.id}if(typeof performance=="object"&&typeof performance.now=="function"){var oe=performance;F.unstable_now=function(){return oe.now()}}else{var K=Date,c=K.now();F.unstable_now=function(){return K.now()-c}}var h=[],p=[],m=1,u=null,v=3,S=!1,x=!1,_=!1,n=typeof setTimeout=="function"?setTimeout:null,l=typeof clearTimeout=="function"?clearTimeout:null,s=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function o(N){for(var C=M(p);C!==null;){if(C.callback===null)Z(p);else if(C.startTime<=N)Z(p),C.sortIndex=C.expirationTime,$(h,C);else break;C=M(p)}}function f(N){if(_=!1,o(N),!x)if(M(h)!==null)x=!0,se(w);else{var C=M(p);C!==null&&le(f,C.startTime-N)}}function w(N,C){x=!1,_&&(_=!1,l(g),g=-1),S=!0;var D=v;try{for(o(C),u=M(h);u!==null&&(!(u.expirationTime>C)||N&&!O());){var b=u.callback;if(typeof b=="function"){u.callback=null,v=u.priorityLevel;var T=b(u.expirationTime<=C);C=F.unstable_now(),typeof T=="function"?u.callback=T:u===M(h)&&Z(h),o(C)}else Z(h);u=M(h)}if(u!==null)var Q=!0;else{var te=M(p);te!==null&&le(f,te.startTime-C),Q=!1}return Q}finally{u=null,v=D,S=!1}}var y=!1,E=null,g=-1,R=5,B=-1;function O(){return!(F.unstable_now()-B<R)}function j(){if(E!==null){var N=F.unstable_now();B=N;var C=!0;try{C=E(!0,N)}finally{C?A():(y=!1,E=null)}}else y=!1}var A;if(typeof s=="function")A=function(){s(j)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,J=G.port2;G.port1.onmessage=j,A=function(){J.postMessage(null)}}else A=function(){n(j,0)};function se(N){E=N,y||(y=!0,A())}function le(N,C){g=n(function(){N(F.unstable_now())},C)}F.unstable_IdlePriority=5,F.unstable_ImmediatePriority=1,F.unstable_LowPriority=4,F.unstable_NormalPriority=3,F.unstable_Profiling=null,F.unstable_UserBlockingPriority=2,F.unstable_cancelCallback=function(N){N.callback=null},F.unstable_continueExecution=function(){x||S||(x=!0,se(w))},F.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<N?Math.floor(1e3/N):5},F.unstable_getCurrentPriorityLevel=function(){return v},F.unstable_getFirstCallbackNode=function(){return M(h)},F.unstable_next=function(N){switch(v){case 1:case 2:case 3:var C=3;break;default:C=v}var D=v;v=C;try{return N()}finally{v=D}},F.unstable_pauseExecution=function(){},F.unstable_requestPaint=function(){},F.unstable_runWithPriority=function(N,C){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var D=v;v=N;try{return C()}finally{v=D}},F.unstable_scheduleCallback=function(N,C,D){var b=F.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?b+D:b):D=b,N){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=D+T,N={id:m++,callback:C,priorityLevel:N,startTime:D,expirationTime:T,sortIndex:-1},D>b?(N.sortIndex=D,$(p,N),M(h)===null&&N===M(p)&&(_?(l(g),g=-1):_=!0,le(f,D-b))):(N.sortIndex=T,$(h,N),x||S||(x=!0,se(w))),N},F.unstable_shouldYield=O,F.unstable_wrapCallback=function(N){var C=v;return function(){var D=v;v=C;try{return N.apply(this,arguments)}finally{v=D}}}})(Vo)),Vo}var jc;function td(){return jc||(jc=1,$o.exports=ed()),$o.exports}/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var zc;function rd(){if(zc)return ut;zc=1;var F=Xo(),$=td();function M(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Z=new Set,ee={};function oe(e,t){K(e,t),K(e+"Capture",t)}function K(e,t){for(ee[e]=t,e=0;e<t.length;e++)Z.add(t[e])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,p=/^[: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]*$/,m={},u={};function v(e){return h.call(u,e)?!0:h.call(m,e)?!1:p.test(e)?u[e]=!0:(m[e]=!0,!1)}function S(e,t,r,i){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function x(e,t,r,i){if(t===null||typeof t>"u"||S(e,t,r,i))return!0;if(i)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function _(e,t,r,i,a,d,k){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=d,this.removeEmptyString=k}var n={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){n[e]=new _(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];n[t]=new _(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){n[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){n[e]=new _(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){n[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){n[e]=new _(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){n[e]=new _(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){n[e]=new _(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){n[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var l=/[\-:]([a-z])/g;function s(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(l,s);n[t]=new _(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(l,s);n[t]=new _(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(l,s);n[t]=new _(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){n[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),n.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){n[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function o(e,t,r,i){var a=n.hasOwnProperty(t)?n[t]:null;(a!==null?a.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(x(t,r,a,i)&&(r=null),i||a===null?v(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):a.mustUseProperty?e[a.propertyName]=r===null?a.type===3?!1:"":r:(t=a.attributeName,i=a.attributeNamespace,r===null?e.removeAttribute(t):(a=a.type,r=a===3||a===4&&r===!0?"":""+r,i?e.setAttributeNS(i,t,r):e.setAttribute(t,r))))}var f=F.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),y=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),B=Symbol.for("react.provider"),O=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),J=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),le=Symbol.for("react.offscreen"),N=Symbol.iterator;function C(e){return e===null||typeof e!="object"?null:(e=N&&e[N]||e["@@iterator"],typeof e=="function"?e:null)}var D=Object.assign,b;function T(e){if(b===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);b=t&&t[1]||""}return`
34
+ `+b+e}var Q=!1;function te(e,t){if(!e||Q)return"";Q=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(q){var i=q}Reflect.construct(e,[],t)}else{try{t.call()}catch(q){i=q}e.call(t.prototype)}else{try{throw Error()}catch(q){i=q}e()}}catch(q){if(q&&i&&typeof q.stack=="string"){for(var a=q.stack.split(`
35
+ `),d=i.stack.split(`
36
+ `),k=a.length-1,P=d.length-1;1<=k&&0<=P&&a[k]!==d[P];)P--;for(;1<=k&&0<=P;k--,P--)if(a[k]!==d[P]){if(k!==1||P!==1)do if(k--,P--,0>P||a[k]!==d[P]){var I=`
37
+ `+a[k].replace(" at new "," at ");return e.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",e.displayName)),I}while(1<=k&&0<=P);break}}}finally{Q=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?T(e):""}function ce(e){switch(e.tag){case 5:return T(e.type);case 16:return T("Lazy");case 13:return T("Suspense");case 19:return T("SuspenseList");case 0:case 2:case 15:return e=te(e.type,!1),e;case 11:return e=te(e.type.render,!1),e;case 1:return e=te(e.type,!0),e;default:return""}}function ue(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case y:return"Portal";case R:return"Profiler";case g:return"StrictMode";case A:return"Suspense";case G:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case O:return(e.displayName||"Context")+".Consumer";case B:return(e._context.displayName||"Context")+".Provider";case j:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case J:return t=e.displayName||null,t!==null?t:ue(e.type)||"Memo";case se:t=e._payload,e=e._init;try{return ue(e(t))}catch{}}return null}function H(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ue(t);case 8:return t===g?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function L(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Y(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function X(e){var t=Y(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,d=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(k){i=""+k,d.call(this,k)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(k){i=""+k},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function de(e){e._valueTracker||(e._valueTracker=X(e))}function he(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=Y(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function xe(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Le(e,t){var r=t.checked;return D({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Te(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=L(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ke(e,t){t=t.checked,t!=null&&o(e,"checked",t,!1)}function ye(e,t){Ke(e,t);var r=L(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?vr(e,t.type,r):t.hasOwnProperty("defaultValue")&&vr(e,t.type,L(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Kt(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function vr(e,t,r){(t!=="number"||xe(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Nt=Array.isArray;function At(e,t,r,i){if(e=e.options,t){t={};for(var a=0;a<r.length;a++)t["$"+r[a]]=!0;for(r=0;r<e.length;r++)a=t.hasOwnProperty("$"+e[r].value),e[r].selected!==a&&(e[r].selected=a),a&&i&&(e[r].defaultSelected=!0)}else{for(r=""+L(r),t=null,a=0;a<e.length;a++){if(e[a].value===r){e[a].selected=!0,i&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function qt(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(M(91));return D({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function et(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(M(92));if(Nt(r)){if(1<r.length)throw Error(M(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:L(r)}}function Gt(e,t){var r=L(t.value),i=L(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),i!=null&&(e.defaultValue=""+i)}function ht(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Xt(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function gr(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Xt(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var dt,mr=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,i,a){MSApp.execUnsafeLocalFunction(function(){return e(t,r,i,a)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(dt=dt||document.createElement("div"),dt.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=dt.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function st(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var xt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ae=["Webkit","ms","Moz","O"];Object.keys(xt).forEach(function(e){Ae.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),xt[t]=xt[e]})});function Fi(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||xt.hasOwnProperty(e)&&xt[e]?(""+t).trim():t+"px"}function Yo(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,a=Fi(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,a):e[r]=a}}var tu=D({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ys(e,t){if(t){if(tu[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(M(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(M(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(M(61))}if(t.style!=null&&typeof t.style!="object")throw Error(M(62))}}function Js(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Zs=null;function en(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var tn=null,Pr=null,Br=null;function Jo(e){if(e=xi(e)){if(typeof tn!="function")throw Error(M(280));var t=e.stateNode;t&&(t=as(t),tn(e.stateNode,e.type,t))}}function Zo(e){Pr?Br?Br.push(e):Br=[e]:Pr=e}function el(){if(Pr){var e=Pr,t=Br;if(Br=Pr=null,Jo(e),t)for(e=0;e<t.length;e++)Jo(t[e])}}function tl(e,t){return e(t)}function rl(){}var rn=!1;function il(e,t,r){if(rn)return e(t,r);rn=!0;try{return tl(e,t,r)}finally{rn=!1,(Pr!==null||Br!==null)&&(rl(),el())}}function ri(e,t){var r=e.stateNode;if(r===null)return null;var i=as(r);if(i===null)return null;r=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(M(231,t,typeof r));return r}var sn=!1;if(c)try{var ii={};Object.defineProperty(ii,"passive",{get:function(){sn=!0}}),window.addEventListener("test",ii,ii),window.removeEventListener("test",ii,ii)}catch{sn=!1}function ru(e,t,r,i,a,d,k,P,I){var q=Array.prototype.slice.call(arguments,3);try{t.apply(r,q)}catch(ie){this.onError(ie)}}var si=!1,ji=null,zi=!1,nn=null,iu={onError:function(e){si=!0,ji=e}};function su(e,t,r,i,a,d,k,P,I){si=!1,ji=null,ru.apply(iu,arguments)}function nu(e,t,r,i,a,d,k,P,I){if(su.apply(this,arguments),si){if(si){var q=ji;si=!1,ji=null}else throw Error(M(198));zi||(zi=!0,nn=q)}}function Sr(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function sl(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 nl(e){if(Sr(e)!==e)throw Error(M(188))}function ou(e){var t=e.alternate;if(!t){if(t=Sr(e),t===null)throw Error(M(188));return t!==e?null:e}for(var r=e,i=t;;){var a=r.return;if(a===null)break;var d=a.alternate;if(d===null){if(i=a.return,i!==null){r=i;continue}break}if(a.child===d.child){for(d=a.child;d;){if(d===r)return nl(a),e;if(d===i)return nl(a),t;d=d.sibling}throw Error(M(188))}if(r.return!==i.return)r=a,i=d;else{for(var k=!1,P=a.child;P;){if(P===r){k=!0,r=a,i=d;break}if(P===i){k=!0,i=a,r=d;break}P=P.sibling}if(!k){for(P=d.child;P;){if(P===r){k=!0,r=d,i=a;break}if(P===i){k=!0,i=d,r=a;break}P=P.sibling}if(!k)throw Error(M(189))}}if(r.alternate!==i)throw Error(M(190))}if(r.tag!==3)throw Error(M(188));return r.stateNode.current===r?e:t}function ol(e){return e=ou(e),e!==null?ll(e):null}function ll(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ll(e);if(t!==null)return t;e=e.sibling}return null}var al=$.unstable_scheduleCallback,cl=$.unstable_cancelCallback,lu=$.unstable_shouldYield,au=$.unstable_requestPaint,He=$.unstable_now,cu=$.unstable_getCurrentPriorityLevel,on=$.unstable_ImmediatePriority,ul=$.unstable_UserBlockingPriority,Wi=$.unstable_NormalPriority,uu=$.unstable_LowPriority,hl=$.unstable_IdlePriority,Ui=null,Pt=null;function hu(e){if(Pt&&typeof Pt.onCommitFiberRoot=="function")try{Pt.onCommitFiberRoot(Ui,e,void 0,(e.current.flags&128)===128)}catch{}}var Et=Math.clz32?Math.clz32:_u,du=Math.log,fu=Math.LN2;function _u(e){return e>>>=0,e===0?32:31-(du(e)/fu|0)|0}var $i=64,Vi=4194304;function ni(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ki(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,d=e.pingedLanes,k=r&268435455;if(k!==0){var P=k&~a;P!==0?i=ni(P):(d&=k,d!==0&&(i=ni(d)))}else k=r&~a,k!==0?i=ni(k):d!==0&&(i=ni(d));if(i===0)return 0;if(t!==0&&t!==i&&(t&a)===0&&(a=i&-i,d=t&-t,a>=d||a===16&&(d&4194240)!==0))return t;if((i&4)!==0&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)r=31-Et(t),a=1<<r,i|=e[r],t&=~a;return i}function pu(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function vu(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,a=e.expirationTimes,d=e.pendingLanes;0<d;){var k=31-Et(d),P=1<<k,I=a[k];I===-1?((P&r)===0||(P&i)!==0)&&(a[k]=pu(P,t)):I<=t&&(e.expiredLanes|=P),d&=~P}}function ln(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function dl(){var e=$i;return $i<<=1,($i&4194240)===0&&($i=64),e}function an(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function oi(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Et(t),e[t]=r}function gu(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<r;){var a=31-Et(r),d=1<<a;t[a]=0,i[a]=-1,e[a]=-1,r&=~d}}function cn(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-Et(r),a=1<<i;a&t|e[i]&t&&(e[i]|=t),r&=~a}}var Re=0;function fl(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var _l,un,pl,vl,gl,hn=!1,qi=[],Qt=null,Yt=null,Jt=null,li=new Map,ai=new Map,Zt=[],mu="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ml(e,t){switch(e){case"focusin":case"focusout":Qt=null;break;case"dragenter":case"dragleave":Yt=null;break;case"mouseover":case"mouseout":Jt=null;break;case"pointerover":case"pointerout":li.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ai.delete(t.pointerId)}}function ci(e,t,r,i,a,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:d,targetContainers:[a]},t!==null&&(t=xi(t),t!==null&&un(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Su(e,t,r,i,a){switch(t){case"focusin":return Qt=ci(Qt,e,t,r,i,a),!0;case"dragenter":return Yt=ci(Yt,e,t,r,i,a),!0;case"mouseover":return Jt=ci(Jt,e,t,r,i,a),!0;case"pointerover":var d=a.pointerId;return li.set(d,ci(li.get(d)||null,e,t,r,i,a)),!0;case"gotpointercapture":return d=a.pointerId,ai.set(d,ci(ai.get(d)||null,e,t,r,i,a)),!0}return!1}function Sl(e){var t=yr(e.target);if(t!==null){var r=Sr(t);if(r!==null){if(t=r.tag,t===13){if(t=sl(r),t!==null){e.blockedOn=t,gl(e.priority,function(){pl(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Gi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=fn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);Zs=i,r.target.dispatchEvent(i),Zs=null}else return t=xi(r),t!==null&&un(t),e.blockedOn=r,!1;t.shift()}return!0}function yl(e,t,r){Gi(e)&&r.delete(t)}function yu(){hn=!1,Qt!==null&&Gi(Qt)&&(Qt=null),Yt!==null&&Gi(Yt)&&(Yt=null),Jt!==null&&Gi(Jt)&&(Jt=null),li.forEach(yl),ai.forEach(yl)}function ui(e,t){e.blockedOn===t&&(e.blockedOn=null,hn||(hn=!0,$.unstable_scheduleCallback($.unstable_NormalPriority,yu)))}function hi(e){function t(a){return ui(a,e)}if(0<qi.length){ui(qi[0],e);for(var r=1;r<qi.length;r++){var i=qi[r];i.blockedOn===e&&(i.blockedOn=null)}}for(Qt!==null&&ui(Qt,e),Yt!==null&&ui(Yt,e),Jt!==null&&ui(Jt,e),li.forEach(t),ai.forEach(t),r=0;r<Zt.length;r++)i=Zt[r],i.blockedOn===e&&(i.blockedOn=null);for(;0<Zt.length&&(r=Zt[0],r.blockedOn===null);)Sl(r),r.blockedOn===null&&Zt.shift()}var Mr=f.ReactCurrentBatchConfig,Xi=!0;function wu(e,t,r,i){var a=Re,d=Mr.transition;Mr.transition=null;try{Re=1,dn(e,t,r,i)}finally{Re=a,Mr.transition=d}}function Cu(e,t,r,i){var a=Re,d=Mr.transition;Mr.transition=null;try{Re=4,dn(e,t,r,i)}finally{Re=a,Mr.transition=d}}function dn(e,t,r,i){if(Xi){var a=fn(e,t,r,i);if(a===null)Tn(e,t,i,Qi,r),ml(e,i);else if(Su(a,e,t,r,i))i.stopPropagation();else if(ml(e,i),t&4&&-1<mu.indexOf(e)){for(;a!==null;){var d=xi(a);if(d!==null&&_l(d),d=fn(e,t,r,i),d===null&&Tn(e,t,i,Qi,r),d===a)break;a=d}a!==null&&i.stopPropagation()}else Tn(e,t,i,null,r)}}var Qi=null;function fn(e,t,r,i){if(Qi=null,e=en(i),e=yr(e),e!==null)if(t=Sr(e),t===null)e=null;else if(r=t.tag,r===13){if(e=sl(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Qi=e,null}function wl(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(cu()){case on:return 1;case ul:return 4;case Wi:case uu:return 16;case hl:return 536870912;default:return 16}default:return 16}}var er=null,_n=null,Yi=null;function Cl(){if(Yi)return Yi;var e,t=_n,r=t.length,i,a="value"in er?er.value:er.textContent,d=a.length;for(e=0;e<r&&t[e]===a[e];e++);var k=r-e;for(i=1;i<=k&&t[r-i]===a[d-i];i++);return Yi=a.slice(e,1<i?1-i:void 0)}function Ji(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 Zi(){return!0}function xl(){return!1}function ft(e){function t(r,i,a,d,k){this._reactName=r,this._targetInst=a,this.type=i,this.nativeEvent=d,this.target=k,this.currentTarget=null;for(var P in e)e.hasOwnProperty(P)&&(r=e[P],this[P]=r?r(d):d[P]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Zi:xl,this.isPropagationStopped=xl,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Zi)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Zi)},persist:function(){},isPersistent:Zi}),t}var Or={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=ft(Or),di=D({},Or,{view:0,detail:0}),xu=ft(di),vn,gn,fi,es=D({},di,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sn,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!==fi&&(fi&&e.type==="mousemove"?(vn=e.screenX-fi.screenX,gn=e.screenY-fi.screenY):gn=vn=0,fi=e),vn)},movementY:function(e){return"movementY"in e?e.movementY:gn}}),El=ft(es),Eu=D({},es,{dataTransfer:0}),ku=ft(Eu),bu=D({},di,{relatedTarget:0}),mn=ft(bu),Ru=D({},Or,{animationName:0,elapsedTime:0,pseudoElement:0}),Lu=ft(Ru),Du=D({},Or,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Tu=ft(Du),Au=D({},Or,{data:0}),kl=ft(Au),Pu={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Bu={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"},Mu={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ou(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Mu[e])?!!t[e]:!1}function Sn(){return Ou}var Iu=D({},di,{key:function(e){if(e.key){var t=Pu[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ji(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Bu[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sn,charCode:function(e){return e.type==="keypress"?Ji(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ji(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Nu=ft(Iu),Hu=D({},es,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bl=ft(Hu),Fu=D({},di,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sn}),ju=ft(Fu),zu=D({},Or,{propertyName:0,elapsedTime:0,pseudoElement:0}),Wu=ft(zu),Uu=D({},es,{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}),$u=ft(Uu),Vu=[9,13,27,32],yn=c&&"CompositionEvent"in window,_i=null;c&&"documentMode"in document&&(_i=document.documentMode);var Ku=c&&"TextEvent"in window&&!_i,Rl=c&&(!yn||_i&&8<_i&&11>=_i),Ll=" ",Dl=!1;function Tl(e,t){switch(e){case"keyup":return Vu.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Al(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ir=!1;function qu(e,t){switch(e){case"compositionend":return Al(t);case"keypress":return t.which!==32?null:(Dl=!0,Ll);case"textInput":return e=t.data,e===Ll&&Dl?null:e;default:return null}}function Gu(e,t){if(Ir)return e==="compositionend"||!yn&&Tl(e,t)?(e=Cl(),Yi=_n=er=null,Ir=!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 Rl&&t.locale!=="ko"?null:t.data;default:return null}}var Xu={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 Pl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Xu[e.type]:t==="textarea"}function Bl(e,t,r,i){Zo(i),t=ns(t,"onChange"),0<t.length&&(r=new pn("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var pi=null,vi=null;function Qu(e){Yl(e,0)}function ts(e){var t=zr(e);if(he(t))return e}function Yu(e,t){if(e==="change")return t}var Ml=!1;if(c){var wn;if(c){var Cn="oninput"in document;if(!Cn){var Ol=document.createElement("div");Ol.setAttribute("oninput","return;"),Cn=typeof Ol.oninput=="function"}wn=Cn}else wn=!1;Ml=wn&&(!document.documentMode||9<document.documentMode)}function Il(){pi&&(pi.detachEvent("onpropertychange",Nl),vi=pi=null)}function Nl(e){if(e.propertyName==="value"&&ts(vi)){var t=[];Bl(t,vi,e,en(e)),il(Qu,t)}}function Ju(e,t,r){e==="focusin"?(Il(),pi=t,vi=r,pi.attachEvent("onpropertychange",Nl)):e==="focusout"&&Il()}function Zu(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ts(vi)}function eh(e,t){if(e==="click")return ts(t)}function th(e,t){if(e==="input"||e==="change")return ts(t)}function rh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:rh;function gi(e,t){if(kt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++){var a=r[i];if(!h.call(t,a)||!kt(e[a],t[a]))return!1}return!0}function Hl(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fl(e,t){var r=Hl(e);e=0;for(var i;r;){if(r.nodeType===3){if(i=e+r.textContent.length,e<=t&&i>=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Hl(r)}}function jl(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?jl(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zl(){for(var e=window,t=xe();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=xe(e.document)}return t}function xn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function ih(e){var t=zl(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&jl(r.ownerDocument.documentElement,r)){if(i!==null&&xn(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,d=Math.min(i.start,a);i=i.end===void 0?d:Math.min(i.end,a),!e.extend&&d>i&&(a=i,i=d,d=a),a=Fl(r,d);var k=Fl(r,i);a&&k&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==k.node||e.focusOffset!==k.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),d>i?(e.addRange(t),e.extend(k.node,k.offset)):(t.setEnd(k.node,k.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var sh=c&&"documentMode"in document&&11>=document.documentMode,Nr=null,En=null,mi=null,kn=!1;function Wl(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;kn||Nr==null||Nr!==xe(i)||(i=Nr,"selectionStart"in i&&xn(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),mi&&gi(mi,i)||(mi=i,i=ns(En,"onSelect"),0<i.length&&(t=new pn("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=Nr)))}function rs(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Hr={animationend:rs("Animation","AnimationEnd"),animationiteration:rs("Animation","AnimationIteration"),animationstart:rs("Animation","AnimationStart"),transitionend:rs("Transition","TransitionEnd")},bn={},Ul={};c&&(Ul=document.createElement("div").style,"AnimationEvent"in window||(delete Hr.animationend.animation,delete Hr.animationiteration.animation,delete Hr.animationstart.animation),"TransitionEvent"in window||delete Hr.transitionend.transition);function is(e){if(bn[e])return bn[e];if(!Hr[e])return e;var t=Hr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Ul)return bn[e]=t[r];return e}var $l=is("animationend"),Vl=is("animationiteration"),Kl=is("animationstart"),ql=is("transitionend"),Gl=new Map,Xl="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function tr(e,t){Gl.set(e,t),oe(t,[e])}for(var Rn=0;Rn<Xl.length;Rn++){var Ln=Xl[Rn],nh=Ln.toLowerCase(),oh=Ln[0].toUpperCase()+Ln.slice(1);tr(nh,"on"+oh)}tr($l,"onAnimationEnd"),tr(Vl,"onAnimationIteration"),tr(Kl,"onAnimationStart"),tr("dblclick","onDoubleClick"),tr("focusin","onFocus"),tr("focusout","onBlur"),tr(ql,"onTransitionEnd"),K("onMouseEnter",["mouseout","mouseover"]),K("onMouseLeave",["mouseout","mouseover"]),K("onPointerEnter",["pointerout","pointerover"]),K("onPointerLeave",["pointerout","pointerover"]),oe("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),oe("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),oe("onBeforeInput",["compositionend","keypress","textInput","paste"]),oe("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),oe("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),oe("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Si="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(" "),lh=new Set("cancel close invalid load scroll toggle".split(" ").concat(Si));function Ql(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,nu(i,t,void 0,e),e.currentTarget=null}function Yl(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],a=i.event;i=i.listeners;e:{var d=void 0;if(t)for(var k=i.length-1;0<=k;k--){var P=i[k],I=P.instance,q=P.currentTarget;if(P=P.listener,I!==d&&a.isPropagationStopped())break e;Ql(a,P,q),d=I}else for(k=0;k<i.length;k++){if(P=i[k],I=P.instance,q=P.currentTarget,P=P.listener,I!==d&&a.isPropagationStopped())break e;Ql(a,P,q),d=I}}}if(zi)throw e=nn,zi=!1,nn=null,e}function Pe(e,t){var r=t[In];r===void 0&&(r=t[In]=new Set);var i=e+"__bubble";r.has(i)||(Jl(t,e,2,!1),r.add(i))}function Dn(e,t,r){var i=0;t&&(i|=4),Jl(r,e,i,t)}var ss="_reactListening"+Math.random().toString(36).slice(2);function yi(e){if(!e[ss]){e[ss]=!0,Z.forEach(function(r){r!=="selectionchange"&&(lh.has(r)||Dn(r,!1,e),Dn(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ss]||(t[ss]=!0,Dn("selectionchange",!1,t))}}function Jl(e,t,r,i){switch(wl(t)){case 1:var a=wu;break;case 4:a=Cu;break;default:a=dn}r=a.bind(null,t,r,e),a=void 0,!sn||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),i?a!==void 0?e.addEventListener(t,r,{capture:!0,passive:a}):e.addEventListener(t,r,!0):a!==void 0?e.addEventListener(t,r,{passive:a}):e.addEventListener(t,r,!1)}function Tn(e,t,r,i,a){var d=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var k=i.tag;if(k===3||k===4){var P=i.stateNode.containerInfo;if(P===a||P.nodeType===8&&P.parentNode===a)break;if(k===4)for(k=i.return;k!==null;){var I=k.tag;if((I===3||I===4)&&(I=k.stateNode.containerInfo,I===a||I.nodeType===8&&I.parentNode===a))return;k=k.return}for(;P!==null;){if(k=yr(P),k===null)return;if(I=k.tag,I===5||I===6){i=d=k;continue e}P=P.parentNode}}i=i.return}il(function(){var q=d,ie=en(r),ne=[];e:{var re=Gl.get(e);if(re!==void 0){var fe=pn,pe=e;switch(e){case"keypress":if(Ji(r)===0)break e;case"keydown":case"keyup":fe=Nu;break;case"focusin":pe="focus",fe=mn;break;case"focusout":pe="blur",fe=mn;break;case"beforeblur":case"afterblur":fe=mn;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=El;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=ku;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=ju;break;case $l:case Vl:case Kl:fe=Lu;break;case ql:fe=Wu;break;case"scroll":fe=xu;break;case"wheel":fe=$u;break;case"copy":case"cut":case"paste":fe=Tu;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=bl}var ve=(t&4)!==0,Fe=!ve&&e==="scroll",U=ve?re!==null?re+"Capture":null:re;ve=[];for(var z=q,V;z!==null;){V=z;var ae=V.stateNode;if(V.tag===5&&ae!==null&&(V=ae,U!==null&&(ae=ri(z,U),ae!=null&&ve.push(wi(z,ae,V)))),Fe)break;z=z.return}0<ve.length&&(re=new fe(re,pe,null,r,ie),ne.push({event:re,listeners:ve}))}}if((t&7)===0){e:{if(re=e==="mouseover"||e==="pointerover",fe=e==="mouseout"||e==="pointerout",re&&r!==Zs&&(pe=r.relatedTarget||r.fromElement)&&(yr(pe)||pe[Ht]))break e;if((fe||re)&&(re=ie.window===ie?ie:(re=ie.ownerDocument)?re.defaultView||re.parentWindow:window,fe?(pe=r.relatedTarget||r.toElement,fe=q,pe=pe?yr(pe):null,pe!==null&&(Fe=Sr(pe),pe!==Fe||pe.tag!==5&&pe.tag!==6)&&(pe=null)):(fe=null,pe=q),fe!==pe)){if(ve=El,ae="onMouseLeave",U="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(ve=bl,ae="onPointerLeave",U="onPointerEnter",z="pointer"),Fe=fe==null?re:zr(fe),V=pe==null?re:zr(pe),re=new ve(ae,z+"leave",fe,r,ie),re.target=Fe,re.relatedTarget=V,ae=null,yr(ie)===q&&(ve=new ve(U,z+"enter",pe,r,ie),ve.target=V,ve.relatedTarget=Fe,ae=ve),Fe=ae,fe&&pe)t:{for(ve=fe,U=pe,z=0,V=ve;V;V=Fr(V))z++;for(V=0,ae=U;ae;ae=Fr(ae))V++;for(;0<z-V;)ve=Fr(ve),z--;for(;0<V-z;)U=Fr(U),V--;for(;z--;){if(ve===U||U!==null&&ve===U.alternate)break t;ve=Fr(ve),U=Fr(U)}ve=null}else ve=null;fe!==null&&Zl(ne,re,fe,ve,!1),pe!==null&&Fe!==null&&Zl(ne,Fe,pe,ve,!0)}}e:{if(re=q?zr(q):window,fe=re.nodeName&&re.nodeName.toLowerCase(),fe==="select"||fe==="input"&&re.type==="file")var ge=Yu;else if(Pl(re))if(Ml)ge=th;else{ge=Zu;var me=Ju}else(fe=re.nodeName)&&fe.toLowerCase()==="input"&&(re.type==="checkbox"||re.type==="radio")&&(ge=eh);if(ge&&(ge=ge(e,q))){Bl(ne,ge,r,ie);break e}me&&me(e,re,q),e==="focusout"&&(me=re._wrapperState)&&me.controlled&&re.type==="number"&&vr(re,"number",re.value)}switch(me=q?zr(q):window,e){case"focusin":(Pl(me)||me.contentEditable==="true")&&(Nr=me,En=q,mi=null);break;case"focusout":mi=En=Nr=null;break;case"mousedown":kn=!0;break;case"contextmenu":case"mouseup":case"dragend":kn=!1,Wl(ne,r,ie);break;case"selectionchange":if(sh)break;case"keydown":case"keyup":Wl(ne,r,ie)}var Se;if(yn)e:{switch(e){case"compositionstart":var we="onCompositionStart";break e;case"compositionend":we="onCompositionEnd";break e;case"compositionupdate":we="onCompositionUpdate";break e}we=void 0}else Ir?Tl(e,r)&&(we="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(we="onCompositionStart");we&&(Rl&&r.locale!=="ko"&&(Ir||we!=="onCompositionStart"?we==="onCompositionEnd"&&Ir&&(Se=Cl()):(er=ie,_n="value"in er?er.value:er.textContent,Ir=!0)),me=ns(q,we),0<me.length&&(we=new kl(we,e,null,r,ie),ne.push({event:we,listeners:me}),Se?we.data=Se:(Se=Al(r),Se!==null&&(we.data=Se)))),(Se=Ku?qu(e,r):Gu(e,r))&&(q=ns(q,"onBeforeInput"),0<q.length&&(ie=new kl("onBeforeInput","beforeinput",null,r,ie),ne.push({event:ie,listeners:q}),ie.data=Se))}Yl(ne,t)})}function wi(e,t,r){return{instance:e,listener:t,currentTarget:r}}function ns(e,t){for(var r=t+"Capture",i=[];e!==null;){var a=e,d=a.stateNode;a.tag===5&&d!==null&&(a=d,d=ri(e,r),d!=null&&i.unshift(wi(e,d,a)),d=ri(e,t),d!=null&&i.push(wi(e,d,a))),e=e.return}return i}function Fr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Zl(e,t,r,i,a){for(var d=t._reactName,k=[];r!==null&&r!==i;){var P=r,I=P.alternate,q=P.stateNode;if(I!==null&&I===i)break;P.tag===5&&q!==null&&(P=q,a?(I=ri(r,d),I!=null&&k.unshift(wi(r,I,P))):a||(I=ri(r,d),I!=null&&k.push(wi(r,I,P)))),r=r.return}k.length!==0&&e.push({event:t,listeners:k})}var ah=/\r\n?/g,ch=/\u0000|\uFFFD/g;function ea(e){return(typeof e=="string"?e:""+e).replace(ah,`
38
+ `).replace(ch,"")}function os(e,t,r){if(t=ea(t),ea(e)!==t&&r)throw Error(M(425))}function ls(){}var An=null,Pn=null;function Bn(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Mn=typeof setTimeout=="function"?setTimeout:void 0,uh=typeof clearTimeout=="function"?clearTimeout:void 0,ta=typeof Promise=="function"?Promise:void 0,hh=typeof queueMicrotask=="function"?queueMicrotask:typeof ta<"u"?function(e){return ta.resolve(null).then(e).catch(dh)}:Mn;function dh(e){setTimeout(function(){throw e})}function On(e,t){var r=t,i=0;do{var a=r.nextSibling;if(e.removeChild(r),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(i===0){e.removeChild(a),hi(t);return}i--}else r!=="$"&&r!=="$?"&&r!=="$!"||i++;r=a}while(r);hi(t)}function rr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ra(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var jr=Math.random().toString(36).slice(2),Bt="__reactFiber$"+jr,Ci="__reactProps$"+jr,Ht="__reactContainer$"+jr,In="__reactEvents$"+jr,fh="__reactListeners$"+jr,_h="__reactHandles$"+jr;function yr(e){var t=e[Bt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Ht]||r[Bt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=ra(e);e!==null;){if(r=e[Bt])return r;e=ra(e)}return t}e=r,r=e.parentNode}return null}function xi(e){return e=e[Bt]||e[Ht],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function zr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(M(33))}function as(e){return e[Ci]||null}var Nn=[],Wr=-1;function ir(e){return{current:e}}function Be(e){0>Wr||(e.current=Nn[Wr],Nn[Wr]=null,Wr--)}function De(e,t){Wr++,Nn[Wr]=e.current,e.current=t}var sr={},Qe=ir(sr),nt=ir(!1),wr=sr;function Ur(e,t){var r=e.type.contextTypes;if(!r)return sr;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var a={},d;for(d in r)a[d]=t[d];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function ot(e){return e=e.childContextTypes,e!=null}function cs(){Be(nt),Be(Qe)}function ia(e,t,r){if(Qe.current!==sr)throw Error(M(168));De(Qe,t),De(nt,r)}function sa(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var a in i)if(!(a in t))throw Error(M(108,H(e)||"Unknown",a));return D({},r,i)}function us(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||sr,wr=Qe.current,De(Qe,e),De(nt,nt.current),!0}function na(e,t,r){var i=e.stateNode;if(!i)throw Error(M(169));r?(e=sa(e,t,wr),i.__reactInternalMemoizedMergedChildContext=e,Be(nt),Be(Qe),De(Qe,e)):Be(nt),De(nt,r)}var Ft=null,hs=!1,Hn=!1;function oa(e){Ft===null?Ft=[e]:Ft.push(e)}function ph(e){hs=!0,oa(e)}function nr(){if(!Hn&&Ft!==null){Hn=!0;var e=0,t=Re;try{var r=Ft;for(Re=1;e<r.length;e++){var i=r[e];do i=i(!0);while(i!==null)}Ft=null,hs=!1}catch(a){throw Ft!==null&&(Ft=Ft.slice(e+1)),al(on,nr),a}finally{Re=t,Hn=!1}}return null}var $r=[],Vr=0,ds=null,fs=0,gt=[],mt=0,Cr=null,jt=1,zt="";function xr(e,t){$r[Vr++]=fs,$r[Vr++]=ds,ds=e,fs=t}function la(e,t,r){gt[mt++]=jt,gt[mt++]=zt,gt[mt++]=Cr,Cr=e;var i=jt;e=zt;var a=32-Et(i)-1;i&=~(1<<a),r+=1;var d=32-Et(t)+a;if(30<d){var k=a-a%5;d=(i&(1<<k)-1).toString(32),i>>=k,a-=k,jt=1<<32-Et(t)+a|r<<a|i,zt=d+e}else jt=1<<d|r<<a|i,zt=e}function Fn(e){e.return!==null&&(xr(e,1),la(e,1,0))}function jn(e){for(;e===ds;)ds=$r[--Vr],$r[Vr]=null,fs=$r[--Vr],$r[Vr]=null;for(;e===Cr;)Cr=gt[--mt],gt[mt]=null,zt=gt[--mt],gt[mt]=null,jt=gt[--mt],gt[mt]=null}var _t=null,pt=null,Me=!1,bt=null;function aa(e,t){var r=Ct(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function ca(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,_t=e,pt=rr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,_t=e,pt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Cr!==null?{id:jt,overflow:zt}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Ct(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,_t=e,pt=null,!0):!1;default:return!1}}function zn(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Wn(e){if(Me){var t=pt;if(t){var r=t;if(!ca(e,t)){if(zn(e))throw Error(M(418));t=rr(r.nextSibling);var i=_t;t&&ca(e,t)?aa(i,r):(e.flags=e.flags&-4097|2,Me=!1,_t=e)}}else{if(zn(e))throw Error(M(418));e.flags=e.flags&-4097|2,Me=!1,_t=e}}}function ua(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;_t=e}function _s(e){if(e!==_t)return!1;if(!Me)return ua(e),Me=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Bn(e.type,e.memoizedProps)),t&&(t=pt)){if(zn(e))throw ha(),Error(M(418));for(;t;)aa(e,t),t=rr(t.nextSibling)}if(ua(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(M(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){pt=rr(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}pt=null}}else pt=_t?rr(e.stateNode.nextSibling):null;return!0}function ha(){for(var e=pt;e;)e=rr(e.nextSibling)}function Kr(){pt=_t=null,Me=!1}function Un(e){bt===null?bt=[e]:bt.push(e)}var vh=f.ReactCurrentBatchConfig;function Ei(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(M(309));var i=r.stateNode}if(!i)throw Error(M(147,e));var a=i,d=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===d?t.ref:(t=function(k){var P=a.refs;k===null?delete P[d]:P[d]=k},t._stringRef=d,t)}if(typeof e!="string")throw Error(M(284));if(!r._owner)throw Error(M(290,e))}return e}function ps(e,t){throw e=Object.prototype.toString.call(t),Error(M(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function da(e){var t=e._init;return t(e._payload)}function fa(e){function t(U,z){if(e){var V=U.deletions;V===null?(U.deletions=[z],U.flags|=16):V.push(z)}}function r(U,z){if(!e)return null;for(;z!==null;)t(U,z),z=z.sibling;return null}function i(U,z){for(U=new Map;z!==null;)z.key!==null?U.set(z.key,z):U.set(z.index,z),z=z.sibling;return U}function a(U,z){return U=fr(U,z),U.index=0,U.sibling=null,U}function d(U,z,V){return U.index=V,e?(V=U.alternate,V!==null?(V=V.index,V<z?(U.flags|=2,z):V):(U.flags|=2,z)):(U.flags|=1048576,z)}function k(U){return e&&U.alternate===null&&(U.flags|=2),U}function P(U,z,V,ae){return z===null||z.tag!==6?(z=Oo(V,U.mode,ae),z.return=U,z):(z=a(z,V),z.return=U,z)}function I(U,z,V,ae){var ge=V.type;return ge===E?ie(U,z,V.props.children,ae,V.key):z!==null&&(z.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===se&&da(ge)===z.type)?(ae=a(z,V.props),ae.ref=Ei(U,z,V),ae.return=U,ae):(ae=Fs(V.type,V.key,V.props,null,U.mode,ae),ae.ref=Ei(U,z,V),ae.return=U,ae)}function q(U,z,V,ae){return z===null||z.tag!==4||z.stateNode.containerInfo!==V.containerInfo||z.stateNode.implementation!==V.implementation?(z=Io(V,U.mode,ae),z.return=U,z):(z=a(z,V.children||[]),z.return=U,z)}function ie(U,z,V,ae,ge){return z===null||z.tag!==7?(z=Ar(V,U.mode,ae,ge),z.return=U,z):(z=a(z,V),z.return=U,z)}function ne(U,z,V){if(typeof z=="string"&&z!==""||typeof z=="number")return z=Oo(""+z,U.mode,V),z.return=U,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case w:return V=Fs(z.type,z.key,z.props,null,U.mode,V),V.ref=Ei(U,null,z),V.return=U,V;case y:return z=Io(z,U.mode,V),z.return=U,z;case se:var ae=z._init;return ne(U,ae(z._payload),V)}if(Nt(z)||C(z))return z=Ar(z,U.mode,V,null),z.return=U,z;ps(U,z)}return null}function re(U,z,V,ae){var ge=z!==null?z.key:null;if(typeof V=="string"&&V!==""||typeof V=="number")return ge!==null?null:P(U,z,""+V,ae);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case w:return V.key===ge?I(U,z,V,ae):null;case y:return V.key===ge?q(U,z,V,ae):null;case se:return ge=V._init,re(U,z,ge(V._payload),ae)}if(Nt(V)||C(V))return ge!==null?null:ie(U,z,V,ae,null);ps(U,V)}return null}function fe(U,z,V,ae,ge){if(typeof ae=="string"&&ae!==""||typeof ae=="number")return U=U.get(V)||null,P(z,U,""+ae,ge);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case w:return U=U.get(ae.key===null?V:ae.key)||null,I(z,U,ae,ge);case y:return U=U.get(ae.key===null?V:ae.key)||null,q(z,U,ae,ge);case se:var me=ae._init;return fe(U,z,V,me(ae._payload),ge)}if(Nt(ae)||C(ae))return U=U.get(V)||null,ie(z,U,ae,ge,null);ps(z,ae)}return null}function pe(U,z,V,ae){for(var ge=null,me=null,Se=z,we=z=0,Ve=null;Se!==null&&we<V.length;we++){Se.index>we?(Ve=Se,Se=null):Ve=Se.sibling;var be=re(U,Se,V[we],ae);if(be===null){Se===null&&(Se=Ve);break}e&&Se&&be.alternate===null&&t(U,Se),z=d(be,z,we),me===null?ge=be:me.sibling=be,me=be,Se=Ve}if(we===V.length)return r(U,Se),Me&&xr(U,we),ge;if(Se===null){for(;we<V.length;we++)Se=ne(U,V[we],ae),Se!==null&&(z=d(Se,z,we),me===null?ge=Se:me.sibling=Se,me=Se);return Me&&xr(U,we),ge}for(Se=i(U,Se);we<V.length;we++)Ve=fe(Se,U,we,V[we],ae),Ve!==null&&(e&&Ve.alternate!==null&&Se.delete(Ve.key===null?we:Ve.key),z=d(Ve,z,we),me===null?ge=Ve:me.sibling=Ve,me=Ve);return e&&Se.forEach(function(_r){return t(U,_r)}),Me&&xr(U,we),ge}function ve(U,z,V,ae){var ge=C(V);if(typeof ge!="function")throw Error(M(150));if(V=ge.call(V),V==null)throw Error(M(151));for(var me=ge=null,Se=z,we=z=0,Ve=null,be=V.next();Se!==null&&!be.done;we++,be=V.next()){Se.index>we?(Ve=Se,Se=null):Ve=Se.sibling;var _r=re(U,Se,be.value,ae);if(_r===null){Se===null&&(Se=Ve);break}e&&Se&&_r.alternate===null&&t(U,Se),z=d(_r,z,we),me===null?ge=_r:me.sibling=_r,me=_r,Se=Ve}if(be.done)return r(U,Se),Me&&xr(U,we),ge;if(Se===null){for(;!be.done;we++,be=V.next())be=ne(U,be.value,ae),be!==null&&(z=d(be,z,we),me===null?ge=be:me.sibling=be,me=be);return Me&&xr(U,we),ge}for(Se=i(U,Se);!be.done;we++,be=V.next())be=fe(Se,U,we,be.value,ae),be!==null&&(e&&be.alternate!==null&&Se.delete(be.key===null?we:be.key),z=d(be,z,we),me===null?ge=be:me.sibling=be,me=be);return e&&Se.forEach(function(Xh){return t(U,Xh)}),Me&&xr(U,we),ge}function Fe(U,z,V,ae){if(typeof V=="object"&&V!==null&&V.type===E&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case w:e:{for(var ge=V.key,me=z;me!==null;){if(me.key===ge){if(ge=V.type,ge===E){if(me.tag===7){r(U,me.sibling),z=a(me,V.props.children),z.return=U,U=z;break e}}else if(me.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===se&&da(ge)===me.type){r(U,me.sibling),z=a(me,V.props),z.ref=Ei(U,me,V),z.return=U,U=z;break e}r(U,me);break}else t(U,me);me=me.sibling}V.type===E?(z=Ar(V.props.children,U.mode,ae,V.key),z.return=U,U=z):(ae=Fs(V.type,V.key,V.props,null,U.mode,ae),ae.ref=Ei(U,z,V),ae.return=U,U=ae)}return k(U);case y:e:{for(me=V.key;z!==null;){if(z.key===me)if(z.tag===4&&z.stateNode.containerInfo===V.containerInfo&&z.stateNode.implementation===V.implementation){r(U,z.sibling),z=a(z,V.children||[]),z.return=U,U=z;break e}else{r(U,z);break}else t(U,z);z=z.sibling}z=Io(V,U.mode,ae),z.return=U,U=z}return k(U);case se:return me=V._init,Fe(U,z,me(V._payload),ae)}if(Nt(V))return pe(U,z,V,ae);if(C(V))return ve(U,z,V,ae);ps(U,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,z!==null&&z.tag===6?(r(U,z.sibling),z=a(z,V),z.return=U,U=z):(r(U,z),z=Oo(V,U.mode,ae),z.return=U,U=z),k(U)):r(U,z)}return Fe}var qr=fa(!0),_a=fa(!1),vs=ir(null),gs=null,Gr=null,$n=null;function Vn(){$n=Gr=gs=null}function Kn(e){var t=vs.current;Be(vs),e._currentValue=t}function qn(e,t,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===r)break;e=e.return}}function Xr(e,t){gs=e,$n=Gr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(lt=!0),e.firstContext=null)}function St(e){var t=e._currentValue;if($n!==e)if(e={context:e,memoizedValue:t,next:null},Gr===null){if(gs===null)throw Error(M(308));Gr=e,gs.dependencies={lanes:0,firstContext:e}}else Gr=Gr.next=e;return t}var Er=null;function Gn(e){Er===null?Er=[e]:Er.push(e)}function pa(e,t,r,i){var a=t.interleaved;return a===null?(r.next=r,Gn(t)):(r.next=a.next,a.next=r),t.interleaved=r,Wt(e,i)}function Wt(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var or=!1;function Xn(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function va(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ut(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function lr(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(ke&2)!==0){var a=i.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),i.pending=t,Wt(e,r)}return a=i.interleaved,a===null?(t.next=t,Gn(i)):(t.next=a.next,a.next=t),i.interleaved=t,Wt(e,r)}function ms(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,cn(e,r)}}function ga(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var a=null,d=null;if(r=r.firstBaseUpdate,r!==null){do{var k={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};d===null?a=d=k:d=d.next=k,r=r.next}while(r!==null);d===null?a=d=t:d=d.next=t}else a=d=t;r={baseState:i.baseState,firstBaseUpdate:a,lastBaseUpdate:d,shared:i.shared,effects:i.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Ss(e,t,r,i){var a=e.updateQueue;or=!1;var d=a.firstBaseUpdate,k=a.lastBaseUpdate,P=a.shared.pending;if(P!==null){a.shared.pending=null;var I=P,q=I.next;I.next=null,k===null?d=q:k.next=q,k=I;var ie=e.alternate;ie!==null&&(ie=ie.updateQueue,P=ie.lastBaseUpdate,P!==k&&(P===null?ie.firstBaseUpdate=q:P.next=q,ie.lastBaseUpdate=I))}if(d!==null){var ne=a.baseState;k=0,ie=q=I=null,P=d;do{var re=P.lane,fe=P.eventTime;if((i&re)===re){ie!==null&&(ie=ie.next={eventTime:fe,lane:0,tag:P.tag,payload:P.payload,callback:P.callback,next:null});e:{var pe=e,ve=P;switch(re=t,fe=r,ve.tag){case 1:if(pe=ve.payload,typeof pe=="function"){ne=pe.call(fe,ne,re);break e}ne=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=ve.payload,re=typeof pe=="function"?pe.call(fe,ne,re):pe,re==null)break e;ne=D({},ne,re);break e;case 2:or=!0}}P.callback!==null&&P.lane!==0&&(e.flags|=64,re=a.effects,re===null?a.effects=[P]:re.push(P))}else fe={eventTime:fe,lane:re,tag:P.tag,payload:P.payload,callback:P.callback,next:null},ie===null?(q=ie=fe,I=ne):ie=ie.next=fe,k|=re;if(P=P.next,P===null){if(P=a.shared.pending,P===null)break;re=P,P=re.next,re.next=null,a.lastBaseUpdate=re,a.shared.pending=null}}while(!0);if(ie===null&&(I=ne),a.baseState=I,a.firstBaseUpdate=q,a.lastBaseUpdate=ie,t=a.shared.interleaved,t!==null){a=t;do k|=a.lane,a=a.next;while(a!==t)}else d===null&&(a.shared.lanes=0);Rr|=k,e.lanes=k,e.memoizedState=ne}}function ma(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=r,typeof a!="function")throw Error(M(191,a));a.call(i)}}}var ki={},Mt=ir(ki),bi=ir(ki),Ri=ir(ki);function kr(e){if(e===ki)throw Error(M(174));return e}function Qn(e,t){switch(De(Ri,t),De(bi,e),De(Mt,ki),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:gr(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=gr(t,e)}Be(Mt),De(Mt,t)}function Qr(){Be(Mt),Be(bi),Be(Ri)}function Sa(e){kr(Ri.current);var t=kr(Mt.current),r=gr(t,e.type);t!==r&&(De(bi,e),De(Mt,r))}function Yn(e){bi.current===e&&(Be(Mt),Be(bi))}var Oe=ir(0);function ys(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Jn=[];function Zn(){for(var e=0;e<Jn.length;e++)Jn[e]._workInProgressVersionPrimary=null;Jn.length=0}var ws=f.ReactCurrentDispatcher,eo=f.ReactCurrentBatchConfig,br=0,Ie=null,ze=null,Ue=null,Cs=!1,Li=!1,Di=0,gh=0;function Ye(){throw Error(M(321))}function to(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!kt(e[r],t[r]))return!1;return!0}function ro(e,t,r,i,a,d){if(br=d,Ie=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ws.current=e===null||e.memoizedState===null?wh:Ch,e=r(i,a),Li){d=0;do{if(Li=!1,Di=0,25<=d)throw Error(M(301));d+=1,Ue=ze=null,t.updateQueue=null,ws.current=xh,e=r(i,a)}while(Li)}if(ws.current=ks,t=ze!==null&&ze.next!==null,br=0,Ue=ze=Ie=null,Cs=!1,t)throw Error(M(300));return e}function io(){var e=Di!==0;return Di=0,e}function Ot(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ue===null?Ie.memoizedState=Ue=e:Ue=Ue.next=e,Ue}function yt(){if(ze===null){var e=Ie.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=Ue===null?Ie.memoizedState:Ue.next;if(t!==null)Ue=t,ze=e;else{if(e===null)throw Error(M(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},Ue===null?Ie.memoizedState=Ue=e:Ue=Ue.next=e}return Ue}function Ti(e,t){return typeof t=="function"?t(e):t}function so(e){var t=yt(),r=t.queue;if(r===null)throw Error(M(311));r.lastRenderedReducer=e;var i=ze,a=i.baseQueue,d=r.pending;if(d!==null){if(a!==null){var k=a.next;a.next=d.next,d.next=k}i.baseQueue=a=d,r.pending=null}if(a!==null){d=a.next,i=i.baseState;var P=k=null,I=null,q=d;do{var ie=q.lane;if((br&ie)===ie)I!==null&&(I=I.next={lane:0,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),i=q.hasEagerState?q.eagerState:e(i,q.action);else{var ne={lane:ie,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null};I===null?(P=I=ne,k=i):I=I.next=ne,Ie.lanes|=ie,Rr|=ie}q=q.next}while(q!==null&&q!==d);I===null?k=i:I.next=P,kt(i,t.memoizedState)||(lt=!0),t.memoizedState=i,t.baseState=k,t.baseQueue=I,r.lastRenderedState=i}if(e=r.interleaved,e!==null){a=e;do d=a.lane,Ie.lanes|=d,Rr|=d,a=a.next;while(a!==e)}else a===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function no(e){var t=yt(),r=t.queue;if(r===null)throw Error(M(311));r.lastRenderedReducer=e;var i=r.dispatch,a=r.pending,d=t.memoizedState;if(a!==null){r.pending=null;var k=a=a.next;do d=e(d,k.action),k=k.next;while(k!==a);kt(d,t.memoizedState)||(lt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),r.lastRenderedState=d}return[d,i]}function ya(){}function wa(e,t){var r=Ie,i=yt(),a=t(),d=!kt(i.memoizedState,a);if(d&&(i.memoizedState=a,lt=!0),i=i.queue,oo(Ea.bind(null,r,i,e),[e]),i.getSnapshot!==t||d||Ue!==null&&Ue.memoizedState.tag&1){if(r.flags|=2048,Ai(9,xa.bind(null,r,i,a,t),void 0,null),$e===null)throw Error(M(349));(br&30)!==0||Ca(r,t,a)}return a}function Ca(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ie.updateQueue,t===null?(t={lastEffect:null,stores:null},Ie.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function xa(e,t,r,i){t.value=r,t.getSnapshot=i,ka(t)&&ba(e)}function Ea(e,t,r){return r(function(){ka(t)&&ba(e)})}function ka(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!kt(e,r)}catch{return!0}}function ba(e){var t=Wt(e,1);t!==null&&Tt(t,e,1,-1)}function Ra(e){var t=Ot();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:e},t.queue=e,e=e.dispatch=yh.bind(null,Ie,e),[t.memoizedState,e]}function Ai(e,t,r,i){return e={tag:e,create:t,destroy:r,deps:i,next:null},t=Ie.updateQueue,t===null?(t={lastEffect:null,stores:null},Ie.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(i=r.next,r.next=e,e.next=i,t.lastEffect=e)),e}function La(){return yt().memoizedState}function xs(e,t,r,i){var a=Ot();Ie.flags|=e,a.memoizedState=Ai(1|t,r,void 0,i===void 0?null:i)}function Es(e,t,r,i){var a=yt();i=i===void 0?null:i;var d=void 0;if(ze!==null){var k=ze.memoizedState;if(d=k.destroy,i!==null&&to(i,k.deps)){a.memoizedState=Ai(t,r,d,i);return}}Ie.flags|=e,a.memoizedState=Ai(1|t,r,d,i)}function Da(e,t){return xs(8390656,8,e,t)}function oo(e,t){return Es(2048,8,e,t)}function Ta(e,t){return Es(4,2,e,t)}function Aa(e,t){return Es(4,4,e,t)}function Pa(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ba(e,t,r){return r=r!=null?r.concat([e]):null,Es(4,4,Pa.bind(null,t,e),r)}function lo(){}function Ma(e,t){var r=yt();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&to(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function Oa(e,t){var r=yt();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&to(t,i[1])?i[0]:(e=e(),r.memoizedState=[e,t],e)}function Ia(e,t,r){return(br&21)===0?(e.baseState&&(e.baseState=!1,lt=!0),e.memoizedState=r):(kt(r,t)||(r=dl(),Ie.lanes|=r,Rr|=r,e.baseState=!0),t)}function mh(e,t){var r=Re;Re=r!==0&&4>r?r:4,e(!0);var i=eo.transition;eo.transition={};try{e(!1),t()}finally{Re=r,eo.transition=i}}function Na(){return yt().memoizedState}function Sh(e,t,r){var i=hr(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},Ha(e))Fa(t,r);else if(r=pa(e,t,r,i),r!==null){var a=rt();Tt(r,e,i,a),ja(r,t,i)}}function yh(e,t,r){var i=hr(e),a={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(Ha(e))Fa(t,a);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var k=t.lastRenderedState,P=d(k,r);if(a.hasEagerState=!0,a.eagerState=P,kt(P,k)){var I=t.interleaved;I===null?(a.next=a,Gn(t)):(a.next=I.next,I.next=a),t.interleaved=a;return}}catch{}finally{}r=pa(e,t,a,i),r!==null&&(a=rt(),Tt(r,e,i,a),ja(r,t,i))}}function Ha(e){var t=e.alternate;return e===Ie||t!==null&&t===Ie}function Fa(e,t){Li=Cs=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function ja(e,t,r){if((r&4194240)!==0){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,cn(e,r)}}var ks={readContext:St,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useInsertionEffect:Ye,useLayoutEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useMutableSource:Ye,useSyncExternalStore:Ye,useId:Ye,unstable_isNewReconciler:!1},wh={readContext:St,useCallback:function(e,t){return Ot().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:Da,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,xs(4194308,4,Pa.bind(null,t,e),r)},useLayoutEffect:function(e,t){return xs(4194308,4,e,t)},useInsertionEffect:function(e,t){return xs(4,2,e,t)},useMemo:function(e,t){var r=Ot();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=Ot();return t=r!==void 0?r(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=Sh.bind(null,Ie,e),[i.memoizedState,e]},useRef:function(e){var t=Ot();return e={current:e},t.memoizedState=e},useState:Ra,useDebugValue:lo,useDeferredValue:function(e){return Ot().memoizedState=e},useTransition:function(){var e=Ra(!1),t=e[0];return e=mh.bind(null,e[1]),Ot().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=Ie,a=Ot();if(Me){if(r===void 0)throw Error(M(407));r=r()}else{if(r=t(),$e===null)throw Error(M(349));(br&30)!==0||Ca(i,t,r)}a.memoizedState=r;var d={value:r,getSnapshot:t};return a.queue=d,Da(Ea.bind(null,i,d,e),[e]),i.flags|=2048,Ai(9,xa.bind(null,i,d,r,t),void 0,null),r},useId:function(){var e=Ot(),t=$e.identifierPrefix;if(Me){var r=zt,i=jt;r=(i&~(1<<32-Et(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=Di++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=gh++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Ch={readContext:St,useCallback:Ma,useContext:St,useEffect:oo,useImperativeHandle:Ba,useInsertionEffect:Ta,useLayoutEffect:Aa,useMemo:Oa,useReducer:so,useRef:La,useState:function(){return so(Ti)},useDebugValue:lo,useDeferredValue:function(e){var t=yt();return Ia(t,ze.memoizedState,e)},useTransition:function(){var e=so(Ti)[0],t=yt().memoizedState;return[e,t]},useMutableSource:ya,useSyncExternalStore:wa,useId:Na,unstable_isNewReconciler:!1},xh={readContext:St,useCallback:Ma,useContext:St,useEffect:oo,useImperativeHandle:Ba,useInsertionEffect:Ta,useLayoutEffect:Aa,useMemo:Oa,useReducer:no,useRef:La,useState:function(){return no(Ti)},useDebugValue:lo,useDeferredValue:function(e){var t=yt();return ze===null?t.memoizedState=e:Ia(t,ze.memoizedState,e)},useTransition:function(){var e=no(Ti)[0],t=yt().memoizedState;return[e,t]},useMutableSource:ya,useSyncExternalStore:wa,useId:Na,unstable_isNewReconciler:!1};function Rt(e,t){if(e&&e.defaultProps){t=D({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function ao(e,t,r,i){t=e.memoizedState,r=r(i,t),r=r==null?t:D({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var bs={isMounted:function(e){return(e=e._reactInternals)?Sr(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var i=rt(),a=hr(e),d=Ut(i,a);d.payload=t,r!=null&&(d.callback=r),t=lr(e,d,a),t!==null&&(Tt(t,e,a,i),ms(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=rt(),a=hr(e),d=Ut(i,a);d.tag=1,d.payload=t,r!=null&&(d.callback=r),t=lr(e,d,a),t!==null&&(Tt(t,e,a,i),ms(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=rt(),i=hr(e),a=Ut(r,i);a.tag=2,t!=null&&(a.callback=t),t=lr(e,a,i),t!==null&&(Tt(t,e,i,r),ms(t,e,i))}};function za(e,t,r,i,a,d,k){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,d,k):t.prototype&&t.prototype.isPureReactComponent?!gi(r,i)||!gi(a,d):!0}function Wa(e,t,r){var i=!1,a=sr,d=t.contextType;return typeof d=="object"&&d!==null?d=St(d):(a=ot(t)?wr:Qe.current,i=t.contextTypes,d=(i=i!=null)?Ur(e,a):sr),t=new t(r,d),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=bs,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=d),t}function Ua(e,t,r,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,i),t.state!==e&&bs.enqueueReplaceState(t,t.state,null)}function co(e,t,r,i){var a=e.stateNode;a.props=r,a.state=e.memoizedState,a.refs={},Xn(e);var d=t.contextType;typeof d=="object"&&d!==null?a.context=St(d):(d=ot(t)?wr:Qe.current,a.context=Ur(e,d)),a.state=e.memoizedState,d=t.getDerivedStateFromProps,typeof d=="function"&&(ao(e,t,d,r),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&bs.enqueueReplaceState(a,a.state,null),Ss(e,r,a,i),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function Yr(e,t){try{var r="",i=t;do r+=ce(i),i=i.return;while(i);var a=r}catch(d){a=`
39
+ Error generating stack: `+d.message+`
40
+ `+d.stack}return{value:e,source:t,stack:a,digest:null}}function uo(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function ho(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Eh=typeof WeakMap=="function"?WeakMap:Map;function $a(e,t,r){r=Ut(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){Bs||(Bs=!0,Ro=i),ho(e,t)},r}function Va(e,t,r){r=Ut(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var a=t.value;r.payload=function(){return i(a)},r.callback=function(){ho(e,t)}}var d=e.stateNode;return d!==null&&typeof d.componentDidCatch=="function"&&(r.callback=function(){ho(e,t),typeof i!="function"&&(cr===null?cr=new Set([this]):cr.add(this));var k=t.stack;this.componentDidCatch(t.value,{componentStack:k!==null?k:""})}),r}function Ka(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new Eh;var a=new Set;i.set(t,a)}else a=i.get(t),a===void 0&&(a=new Set,i.set(t,a));a.has(r)||(a.add(r),e=Hh.bind(null,e,t,r),t.then(e,e))}function qa(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ga(e,t,r,i,a){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Ut(-1,1),t.tag=2,lr(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=a,e)}var kh=f.ReactCurrentOwner,lt=!1;function tt(e,t,r,i){t.child=e===null?_a(t,null,r,i):qr(t,e.child,r,i)}function Xa(e,t,r,i,a){r=r.render;var d=t.ref;return Xr(t,a),i=ro(e,t,r,i,d,a),r=io(),e!==null&&!lt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,$t(e,t,a)):(Me&&r&&Fn(t),t.flags|=1,tt(e,t,i,a),t.child)}function Qa(e,t,r,i,a){if(e===null){var d=r.type;return typeof d=="function"&&!Mo(d)&&d.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=d,Ya(e,t,d,i,a)):(e=Fs(r.type,null,i,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,(e.lanes&a)===0){var k=d.memoizedProps;if(r=r.compare,r=r!==null?r:gi,r(k,i)&&e.ref===t.ref)return $t(e,t,a)}return t.flags|=1,e=fr(d,i),e.ref=t.ref,e.return=t,t.child=e}function Ya(e,t,r,i,a){if(e!==null){var d=e.memoizedProps;if(gi(d,i)&&e.ref===t.ref)if(lt=!1,t.pendingProps=i=d,(e.lanes&a)!==0)(e.flags&131072)!==0&&(lt=!0);else return t.lanes=e.lanes,$t(e,t,a)}return fo(e,t,r,i,a)}function Ja(e,t,r){var i=t.pendingProps,a=i.children,d=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(Zr,vt),vt|=r;else{if((r&1073741824)===0)return e=d!==null?d.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,De(Zr,vt),vt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=d!==null?d.baseLanes:r,De(Zr,vt),vt|=i}else d!==null?(i=d.baseLanes|r,t.memoizedState=null):i=r,De(Zr,vt),vt|=i;return tt(e,t,a,r),t.child}function Za(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function fo(e,t,r,i,a){var d=ot(r)?wr:Qe.current;return d=Ur(t,d),Xr(t,a),r=ro(e,t,r,i,d,a),i=io(),e!==null&&!lt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,$t(e,t,a)):(Me&&i&&Fn(t),t.flags|=1,tt(e,t,r,a),t.child)}function ec(e,t,r,i,a){if(ot(r)){var d=!0;us(t)}else d=!1;if(Xr(t,a),t.stateNode===null)Ls(e,t),Wa(t,r,i),co(t,r,i,a),i=!0;else if(e===null){var k=t.stateNode,P=t.memoizedProps;k.props=P;var I=k.context,q=r.contextType;typeof q=="object"&&q!==null?q=St(q):(q=ot(r)?wr:Qe.current,q=Ur(t,q));var ie=r.getDerivedStateFromProps,ne=typeof ie=="function"||typeof k.getSnapshotBeforeUpdate=="function";ne||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(P!==i||I!==q)&&Ua(t,k,i,q),or=!1;var re=t.memoizedState;k.state=re,Ss(t,i,k,a),I=t.memoizedState,P!==i||re!==I||nt.current||or?(typeof ie=="function"&&(ao(t,r,ie,i),I=t.memoizedState),(P=or||za(t,r,P,i,re,I,q))?(ne||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(t.flags|=4194308)):(typeof k.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=I),k.props=i,k.state=I,k.context=q,i=P):(typeof k.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{k=t.stateNode,va(e,t),P=t.memoizedProps,q=t.type===t.elementType?P:Rt(t.type,P),k.props=q,ne=t.pendingProps,re=k.context,I=r.contextType,typeof I=="object"&&I!==null?I=St(I):(I=ot(r)?wr:Qe.current,I=Ur(t,I));var fe=r.getDerivedStateFromProps;(ie=typeof fe=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(P!==ne||re!==I)&&Ua(t,k,i,I),or=!1,re=t.memoizedState,k.state=re,Ss(t,i,k,a);var pe=t.memoizedState;P!==ne||re!==pe||nt.current||or?(typeof fe=="function"&&(ao(t,r,fe,i),pe=t.memoizedState),(q=or||za(t,r,q,i,re,pe,I)||!1)?(ie||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(i,pe,I),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(i,pe,I)),typeof k.componentDidUpdate=="function"&&(t.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof k.componentDidUpdate!="function"||P===e.memoizedProps&&re===e.memoizedState||(t.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||P===e.memoizedProps&&re===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=pe),k.props=i,k.state=pe,k.context=I,i=q):(typeof k.componentDidUpdate!="function"||P===e.memoizedProps&&re===e.memoizedState||(t.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||P===e.memoizedProps&&re===e.memoizedState||(t.flags|=1024),i=!1)}return _o(e,t,r,i,d,a)}function _o(e,t,r,i,a,d){Za(e,t);var k=(t.flags&128)!==0;if(!i&&!k)return a&&na(t,r,!1),$t(e,t,d);i=t.stateNode,kh.current=t;var P=k&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&k?(t.child=qr(t,e.child,null,d),t.child=qr(t,null,P,d)):tt(e,t,P,d),t.memoizedState=i.state,a&&na(t,r,!0),t.child}function tc(e){var t=e.stateNode;t.pendingContext?ia(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ia(e,t.context,!1),Qn(e,t.containerInfo)}function rc(e,t,r,i,a){return Kr(),Un(a),t.flags|=256,tt(e,t,r,i),t.child}var po={dehydrated:null,treeContext:null,retryLane:0};function vo(e){return{baseLanes:e,cachePool:null,transitions:null}}function ic(e,t,r){var i=t.pendingProps,a=Oe.current,d=!1,k=(t.flags&128)!==0,P;if((P=k)||(P=e!==null&&e.memoizedState===null?!1:(a&2)!==0),P?(d=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),De(Oe,a&1),e===null)return Wn(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(k=i.children,e=i.fallback,d?(i=t.mode,d=t.child,k={mode:"hidden",children:k},(i&1)===0&&d!==null?(d.childLanes=0,d.pendingProps=k):d=js(k,i,0,null),e=Ar(e,i,r,null),d.return=t,e.return=t,d.sibling=e,t.child=d,t.child.memoizedState=vo(r),t.memoizedState=po,e):go(t,k));if(a=e.memoizedState,a!==null&&(P=a.dehydrated,P!==null))return bh(e,t,k,i,P,a,r);if(d){d=i.fallback,k=t.mode,a=e.child,P=a.sibling;var I={mode:"hidden",children:i.children};return(k&1)===0&&t.child!==a?(i=t.child,i.childLanes=0,i.pendingProps=I,t.deletions=null):(i=fr(a,I),i.subtreeFlags=a.subtreeFlags&14680064),P!==null?d=fr(P,d):(d=Ar(d,k,r,null),d.flags|=2),d.return=t,i.return=t,i.sibling=d,t.child=i,i=d,d=t.child,k=e.child.memoizedState,k=k===null?vo(r):{baseLanes:k.baseLanes|r,cachePool:null,transitions:k.transitions},d.memoizedState=k,d.childLanes=e.childLanes&~r,t.memoizedState=po,i}return d=e.child,e=d.sibling,i=fr(d,{mode:"visible",children:i.children}),(t.mode&1)===0&&(i.lanes=r),i.return=t,i.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function go(e,t){return t=js({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Rs(e,t,r,i){return i!==null&&Un(i),qr(t,e.child,null,r),e=go(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bh(e,t,r,i,a,d,k){if(r)return t.flags&256?(t.flags&=-257,i=uo(Error(M(422))),Rs(e,t,k,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(d=i.fallback,a=t.mode,i=js({mode:"visible",children:i.children},a,0,null),d=Ar(d,a,k,null),d.flags|=2,i.return=t,d.return=t,i.sibling=d,t.child=i,(t.mode&1)!==0&&qr(t,e.child,null,k),t.child.memoizedState=vo(k),t.memoizedState=po,d);if((t.mode&1)===0)return Rs(e,t,k,null);if(a.data==="$!"){if(i=a.nextSibling&&a.nextSibling.dataset,i)var P=i.dgst;return i=P,d=Error(M(419)),i=uo(d,i,void 0),Rs(e,t,k,i)}if(P=(k&e.childLanes)!==0,lt||P){if(i=$e,i!==null){switch(k&-k){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|k))!==0?0:a,a!==0&&a!==d.retryLane&&(d.retryLane=a,Wt(e,a),Tt(i,e,a,-1))}return Bo(),i=uo(Error(M(421))),Rs(e,t,k,i)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=Fh.bind(null,e),a._reactRetry=t,null):(e=d.treeContext,pt=rr(a.nextSibling),_t=t,Me=!0,bt=null,e!==null&&(gt[mt++]=jt,gt[mt++]=zt,gt[mt++]=Cr,jt=e.id,zt=e.overflow,Cr=t),t=go(t,i.children),t.flags|=4096,t)}function sc(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),qn(e.return,t,r)}function mo(e,t,r,i,a){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:a}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=i,d.tail=r,d.tailMode=a)}function nc(e,t,r){var i=t.pendingProps,a=i.revealOrder,d=i.tail;if(tt(e,t,i.children,r),i=Oe.current,(i&2)!==0)i=i&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sc(e,r,t);else if(e.tag===19)sc(e,r,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}i&=1}if(De(Oe,i),(t.mode&1)===0)t.memoizedState=null;else switch(a){case"forwards":for(r=t.child,a=null;r!==null;)e=r.alternate,e!==null&&ys(e)===null&&(a=r),r=r.sibling;r=a,r===null?(a=t.child,t.child=null):(a=r.sibling,r.sibling=null),mo(t,!1,a,r,d);break;case"backwards":for(r=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&ys(e)===null){t.child=a;break}e=a.sibling,a.sibling=r,r=a,a=e}mo(t,!0,r,null,d);break;case"together":mo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ls(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function $t(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Rr|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(M(153));if(t.child!==null){for(e=t.child,r=fr(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=fr(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Rh(e,t,r){switch(t.tag){case 3:tc(t),Kr();break;case 5:Sa(t);break;case 1:ot(t.type)&&us(t);break;case 4:Qn(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,a=t.memoizedProps.value;De(vs,i._currentValue),i._currentValue=a;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(De(Oe,Oe.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?ic(e,t,r):(De(Oe,Oe.current&1),e=$t(e,t,r),e!==null?e.sibling:null);De(Oe,Oe.current&1);break;case 19:if(i=(r&t.childLanes)!==0,(e.flags&128)!==0){if(i)return nc(e,t,r);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),De(Oe,Oe.current),i)break;return null;case 22:case 23:return t.lanes=0,Ja(e,t,r)}return $t(e,t,r)}var oc,So,lc,ac;oc=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},So=function(){},lc=function(e,t,r,i){var a=e.memoizedProps;if(a!==i){e=t.stateNode,kr(Mt.current);var d=null;switch(r){case"input":a=Le(e,a),i=Le(e,i),d=[];break;case"select":a=D({},a,{value:void 0}),i=D({},i,{value:void 0}),d=[];break;case"textarea":a=qt(e,a),i=qt(e,i),d=[];break;default:typeof a.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=ls)}Ys(r,i);var k;r=null;for(q in a)if(!i.hasOwnProperty(q)&&a.hasOwnProperty(q)&&a[q]!=null)if(q==="style"){var P=a[q];for(k in P)P.hasOwnProperty(k)&&(r||(r={}),r[k]="")}else q!=="dangerouslySetInnerHTML"&&q!=="children"&&q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&q!=="autoFocus"&&(ee.hasOwnProperty(q)?d||(d=[]):(d=d||[]).push(q,null));for(q in i){var I=i[q];if(P=a!=null?a[q]:void 0,i.hasOwnProperty(q)&&I!==P&&(I!=null||P!=null))if(q==="style")if(P){for(k in P)!P.hasOwnProperty(k)||I&&I.hasOwnProperty(k)||(r||(r={}),r[k]="");for(k in I)I.hasOwnProperty(k)&&P[k]!==I[k]&&(r||(r={}),r[k]=I[k])}else r||(d||(d=[]),d.push(q,r)),r=I;else q==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,P=P?P.__html:void 0,I!=null&&P!==I&&(d=d||[]).push(q,I)):q==="children"?typeof I!="string"&&typeof I!="number"||(d=d||[]).push(q,""+I):q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&(ee.hasOwnProperty(q)?(I!=null&&q==="onScroll"&&Pe("scroll",e),d||P===I||(d=[])):(d=d||[]).push(q,I))}r&&(d=d||[]).push("style",r);var q=d;(t.updateQueue=q)&&(t.flags|=4)}},ac=function(e,t,r,i){r!==i&&(t.flags|=4)};function Pi(e,t){if(!Me)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var a=e.child;a!==null;)r|=a.lanes|a.childLanes,i|=a.subtreeFlags&14680064,i|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)r|=a.lanes|a.childLanes,i|=a.subtreeFlags,i|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function Lh(e,t,r){var i=t.pendingProps;switch(jn(t),t.tag){case 2: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 ot(t.type)&&cs(),Je(t),null;case 3:return i=t.stateNode,Qr(),Be(nt),Be(Qe),Zn(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(_s(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,bt!==null&&(To(bt),bt=null))),So(e,t),Je(t),null;case 5:Yn(t);var a=kr(Ri.current);if(r=t.type,e!==null&&t.stateNode!=null)lc(e,t,r,i,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(M(166));return Je(t),null}if(e=kr(Mt.current),_s(t)){i=t.stateNode,r=t.type;var d=t.memoizedProps;switch(i[Bt]=t,i[Ci]=d,e=(t.mode&1)!==0,r){case"dialog":Pe("cancel",i),Pe("close",i);break;case"iframe":case"object":case"embed":Pe("load",i);break;case"video":case"audio":for(a=0;a<Si.length;a++)Pe(Si[a],i);break;case"source":Pe("error",i);break;case"img":case"image":case"link":Pe("error",i),Pe("load",i);break;case"details":Pe("toggle",i);break;case"input":Te(i,d),Pe("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!d.multiple},Pe("invalid",i);break;case"textarea":et(i,d),Pe("invalid",i)}Ys(r,d),a=null;for(var k in d)if(d.hasOwnProperty(k)){var P=d[k];k==="children"?typeof P=="string"?i.textContent!==P&&(d.suppressHydrationWarning!==!0&&os(i.textContent,P,e),a=["children",P]):typeof P=="number"&&i.textContent!==""+P&&(d.suppressHydrationWarning!==!0&&os(i.textContent,P,e),a=["children",""+P]):ee.hasOwnProperty(k)&&P!=null&&k==="onScroll"&&Pe("scroll",i)}switch(r){case"input":de(i),Kt(i,d,!0);break;case"textarea":de(i),ht(i);break;case"select":case"option":break;default:typeof d.onClick=="function"&&(i.onclick=ls)}i=a,t.updateQueue=i,i!==null&&(t.flags|=4)}else{k=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Xt(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=k.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=k.createElement(r,{is:i.is}):(e=k.createElement(r),r==="select"&&(k=e,i.multiple?k.multiple=!0:i.size&&(k.size=i.size))):e=k.createElementNS(e,r),e[Bt]=t,e[Ci]=i,oc(e,t,!1,!1),t.stateNode=e;e:{switch(k=Js(r,i),r){case"dialog":Pe("cancel",e),Pe("close",e),a=i;break;case"iframe":case"object":case"embed":Pe("load",e),a=i;break;case"video":case"audio":for(a=0;a<Si.length;a++)Pe(Si[a],e);a=i;break;case"source":Pe("error",e),a=i;break;case"img":case"image":case"link":Pe("error",e),Pe("load",e),a=i;break;case"details":Pe("toggle",e),a=i;break;case"input":Te(e,i),a=Le(e,i),Pe("invalid",e);break;case"option":a=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},a=D({},i,{value:void 0}),Pe("invalid",e);break;case"textarea":et(e,i),a=qt(e,i),Pe("invalid",e);break;default:a=i}Ys(r,a),P=a;for(d in P)if(P.hasOwnProperty(d)){var I=P[d];d==="style"?Yo(e,I):d==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,I!=null&&mr(e,I)):d==="children"?typeof I=="string"?(r!=="textarea"||I!=="")&&st(e,I):typeof I=="number"&&st(e,""+I):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(ee.hasOwnProperty(d)?I!=null&&d==="onScroll"&&Pe("scroll",e):I!=null&&o(e,d,I,k))}switch(r){case"input":de(e),Kt(e,i,!1);break;case"textarea":de(e),ht(e);break;case"option":i.value!=null&&e.setAttribute("value",""+L(i.value));break;case"select":e.multiple=!!i.multiple,d=i.value,d!=null?At(e,!!i.multiple,d,!1):i.defaultValue!=null&&At(e,!!i.multiple,i.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=ls)}switch(r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Je(t),null;case 6:if(e&&t.stateNode!=null)ac(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(M(166));if(r=kr(Ri.current),kr(Mt.current),_s(t)){if(i=t.stateNode,r=t.memoizedProps,i[Bt]=t,(d=i.nodeValue!==r)&&(e=_t,e!==null))switch(e.tag){case 3:os(i.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&os(i.nodeValue,r,(e.mode&1)!==0)}d&&(t.flags|=4)}else i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[Bt]=t,t.stateNode=i}return Je(t),null;case 13:if(Be(Oe),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Me&&pt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)ha(),Kr(),t.flags|=98560,d=!1;else if(d=_s(t),i!==null&&i.dehydrated!==null){if(e===null){if(!d)throw Error(M(318));if(d=t.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(M(317));d[Bt]=t}else Kr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Je(t),d=!1}else bt!==null&&(To(bt),bt=null),d=!0;if(!d)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Oe.current&1)!==0?We===0&&(We=3):Bo())),t.updateQueue!==null&&(t.flags|=4),Je(t),null);case 4:return Qr(),So(e,t),e===null&&yi(t.stateNode.containerInfo),Je(t),null;case 10:return Kn(t.type._context),Je(t),null;case 17:return ot(t.type)&&cs(),Je(t),null;case 19:if(Be(Oe),d=t.memoizedState,d===null)return Je(t),null;if(i=(t.flags&128)!==0,k=d.rendering,k===null)if(i)Pi(d,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(k=ys(e),k!==null){for(t.flags|=128,Pi(d,!1),i=k.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;r!==null;)d=r,e=i,d.flags&=14680066,k=d.alternate,k===null?(d.childLanes=0,d.lanes=e,d.child=null,d.subtreeFlags=0,d.memoizedProps=null,d.memoizedState=null,d.updateQueue=null,d.dependencies=null,d.stateNode=null):(d.childLanes=k.childLanes,d.lanes=k.lanes,d.child=k.child,d.subtreeFlags=0,d.deletions=null,d.memoizedProps=k.memoizedProps,d.memoizedState=k.memoizedState,d.updateQueue=k.updateQueue,d.type=k.type,e=k.dependencies,d.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return De(Oe,Oe.current&1|2),t.child}e=e.sibling}d.tail!==null&&He()>ei&&(t.flags|=128,i=!0,Pi(d,!1),t.lanes=4194304)}else{if(!i)if(e=ys(k),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Pi(d,!0),d.tail===null&&d.tailMode==="hidden"&&!k.alternate&&!Me)return Je(t),null}else 2*He()-d.renderingStartTime>ei&&r!==1073741824&&(t.flags|=128,i=!0,Pi(d,!1),t.lanes=4194304);d.isBackwards?(k.sibling=t.child,t.child=k):(r=d.last,r!==null?r.sibling=k:t.child=k,d.last=k)}return d.tail!==null?(t=d.tail,d.rendering=t,d.tail=t.sibling,d.renderingStartTime=He(),t.sibling=null,r=Oe.current,De(Oe,i?r&1|2:r&1),t):(Je(t),null);case 22:case 23:return Po(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(vt&1073741824)!==0&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),null;case 24:return null;case 25:return null}throw Error(M(156,t.tag))}function Dh(e,t){switch(jn(t),t.tag){case 1:return ot(t.type)&&cs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qr(),Be(nt),Be(Qe),Zn(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Yn(t),null;case 13:if(Be(Oe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(M(340));Kr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Be(Oe),null;case 4:return Qr(),null;case 10:return Kn(t.type._context),null;case 22:case 23:return Po(),null;case 24:return null;default:return null}}var Ds=!1,Ze=!1,Th=typeof WeakSet=="function"?WeakSet:Set,_e=null;function Jr(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){Ne(e,t,i)}else r.current=null}function yo(e,t,r){try{r()}catch(i){Ne(e,t,i)}}var cc=!1;function Ah(e,t){if(An=Xi,e=zl(),xn(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,d=i.focusNode;i=i.focusOffset;try{r.nodeType,d.nodeType}catch{r=null;break e}var k=0,P=-1,I=-1,q=0,ie=0,ne=e,re=null;t:for(;;){for(var fe;ne!==r||a!==0&&ne.nodeType!==3||(P=k+a),ne!==d||i!==0&&ne.nodeType!==3||(I=k+i),ne.nodeType===3&&(k+=ne.nodeValue.length),(fe=ne.firstChild)!==null;)re=ne,ne=fe;for(;;){if(ne===e)break t;if(re===r&&++q===a&&(P=k),re===d&&++ie===i&&(I=k),(fe=ne.nextSibling)!==null)break;ne=re,re=ne.parentNode}ne=fe}r=P===-1||I===-1?null:{start:P,end:I}}else r=null}r=r||{start:0,end:0}}else r=null;for(Pn={focusedElem:e,selectionRange:r},Xi=!1,_e=t;_e!==null;)if(t=_e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_e=e;else for(;_e!==null;){t=_e;try{var pe=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(pe!==null){var ve=pe.memoizedProps,Fe=pe.memoizedState,U=t.stateNode,z=U.getSnapshotBeforeUpdate(t.elementType===t.type?ve:Rt(t.type,ve),Fe);U.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var V=t.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(M(163))}}catch(ae){Ne(t,t.return,ae)}if(e=t.sibling,e!==null){e.return=t.return,_e=e;break}_e=t.return}return pe=cc,cc=!1,pe}function Bi(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&e)===e){var d=a.destroy;a.destroy=void 0,d!==void 0&&yo(t,r,d)}a=a.next}while(a!==i)}}function Ts(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function wo(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function uc(e){var t=e.alternate;t!==null&&(e.alternate=null,uc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Bt],delete t[Ci],delete t[In],delete t[fh],delete t[_h])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function hc(e){return e.tag===5||e.tag===3||e.tag===4}function dc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Co(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ls));else if(i!==4&&(e=e.child,e!==null))for(Co(e,t,r),e=e.sibling;e!==null;)Co(e,t,r),e=e.sibling}function xo(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(xo(e,t,r),e=e.sibling;e!==null;)xo(e,t,r),e=e.sibling}var qe=null,Lt=!1;function ar(e,t,r){for(r=r.child;r!==null;)fc(e,t,r),r=r.sibling}function fc(e,t,r){if(Pt&&typeof Pt.onCommitFiberUnmount=="function")try{Pt.onCommitFiberUnmount(Ui,r)}catch{}switch(r.tag){case 5:Ze||Jr(r,t);case 6:var i=qe,a=Lt;qe=null,ar(e,t,r),qe=i,Lt=a,qe!==null&&(Lt?(e=qe,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):qe.removeChild(r.stateNode));break;case 18:qe!==null&&(Lt?(e=qe,r=r.stateNode,e.nodeType===8?On(e.parentNode,r):e.nodeType===1&&On(e,r),hi(e)):On(qe,r.stateNode));break;case 4:i=qe,a=Lt,qe=r.stateNode.containerInfo,Lt=!0,ar(e,t,r),qe=i,Lt=a;break;case 0:case 11:case 14:case 15:if(!Ze&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){a=i=i.next;do{var d=a,k=d.destroy;d=d.tag,k!==void 0&&((d&2)!==0||(d&4)!==0)&&yo(r,t,k),a=a.next}while(a!==i)}ar(e,t,r);break;case 1:if(!Ze&&(Jr(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(P){Ne(r,t,P)}ar(e,t,r);break;case 21:ar(e,t,r);break;case 22:r.mode&1?(Ze=(i=Ze)||r.memoizedState!==null,ar(e,t,r),Ze=i):ar(e,t,r);break;default:ar(e,t,r)}}function _c(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Th),t.forEach(function(i){var a=jh.bind(null,e,i);r.has(i)||(r.add(i),i.then(a,a))})}}function Dt(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var a=r[i];try{var d=e,k=t,P=k;e:for(;P!==null;){switch(P.tag){case 5:qe=P.stateNode,Lt=!1;break e;case 3:qe=P.stateNode.containerInfo,Lt=!0;break e;case 4:qe=P.stateNode.containerInfo,Lt=!0;break e}P=P.return}if(qe===null)throw Error(M(160));fc(d,k,a),qe=null,Lt=!1;var I=a.alternate;I!==null&&(I.return=null),a.return=null}catch(q){Ne(a,t,q)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)pc(t,e),t=t.sibling}function pc(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Dt(t,e),It(e),i&4){try{Bi(3,e,e.return),Ts(3,e)}catch(ve){Ne(e,e.return,ve)}try{Bi(5,e,e.return)}catch(ve){Ne(e,e.return,ve)}}break;case 1:Dt(t,e),It(e),i&512&&r!==null&&Jr(r,r.return);break;case 5:if(Dt(t,e),It(e),i&512&&r!==null&&Jr(r,r.return),e.flags&32){var a=e.stateNode;try{st(a,"")}catch(ve){Ne(e,e.return,ve)}}if(i&4&&(a=e.stateNode,a!=null)){var d=e.memoizedProps,k=r!==null?r.memoizedProps:d,P=e.type,I=e.updateQueue;if(e.updateQueue=null,I!==null)try{P==="input"&&d.type==="radio"&&d.name!=null&&Ke(a,d),Js(P,k);var q=Js(P,d);for(k=0;k<I.length;k+=2){var ie=I[k],ne=I[k+1];ie==="style"?Yo(a,ne):ie==="dangerouslySetInnerHTML"?mr(a,ne):ie==="children"?st(a,ne):o(a,ie,ne,q)}switch(P){case"input":ye(a,d);break;case"textarea":Gt(a,d);break;case"select":var re=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!d.multiple;var fe=d.value;fe!=null?At(a,!!d.multiple,fe,!1):re!==!!d.multiple&&(d.defaultValue!=null?At(a,!!d.multiple,d.defaultValue,!0):At(a,!!d.multiple,d.multiple?[]:"",!1))}a[Ci]=d}catch(ve){Ne(e,e.return,ve)}}break;case 6:if(Dt(t,e),It(e),i&4){if(e.stateNode===null)throw Error(M(162));a=e.stateNode,d=e.memoizedProps;try{a.nodeValue=d}catch(ve){Ne(e,e.return,ve)}}break;case 3:if(Dt(t,e),It(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{hi(t.containerInfo)}catch(ve){Ne(e,e.return,ve)}break;case 4:Dt(t,e),It(e);break;case 13:Dt(t,e),It(e),a=e.child,a.flags&8192&&(d=a.memoizedState!==null,a.stateNode.isHidden=d,!d||a.alternate!==null&&a.alternate.memoizedState!==null||(bo=He())),i&4&&_c(e);break;case 22:if(ie=r!==null&&r.memoizedState!==null,e.mode&1?(Ze=(q=Ze)||ie,Dt(t,e),Ze=q):Dt(t,e),It(e),i&8192){if(q=e.memoizedState!==null,(e.stateNode.isHidden=q)&&!ie&&(e.mode&1)!==0)for(_e=e,ie=e.child;ie!==null;){for(ne=_e=ie;_e!==null;){switch(re=_e,fe=re.child,re.tag){case 0:case 11:case 14:case 15:Bi(4,re,re.return);break;case 1:Jr(re,re.return);var pe=re.stateNode;if(typeof pe.componentWillUnmount=="function"){i=re,r=re.return;try{t=i,pe.props=t.memoizedProps,pe.state=t.memoizedState,pe.componentWillUnmount()}catch(ve){Ne(i,r,ve)}}break;case 5:Jr(re,re.return);break;case 22:if(re.memoizedState!==null){mc(ne);continue}}fe!==null?(fe.return=re,_e=fe):mc(ne)}ie=ie.sibling}e:for(ie=null,ne=e;;){if(ne.tag===5){if(ie===null){ie=ne;try{a=ne.stateNode,q?(d=a.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none"):(P=ne.stateNode,I=ne.memoizedProps.style,k=I!=null&&I.hasOwnProperty("display")?I.display:null,P.style.display=Fi("display",k))}catch(ve){Ne(e,e.return,ve)}}}else if(ne.tag===6){if(ie===null)try{ne.stateNode.nodeValue=q?"":ne.memoizedProps}catch(ve){Ne(e,e.return,ve)}}else if((ne.tag!==22&&ne.tag!==23||ne.memoizedState===null||ne===e)&&ne.child!==null){ne.child.return=ne,ne=ne.child;continue}if(ne===e)break e;for(;ne.sibling===null;){if(ne.return===null||ne.return===e)break e;ie===ne&&(ie=null),ne=ne.return}ie===ne&&(ie=null),ne.sibling.return=ne.return,ne=ne.sibling}}break;case 19:Dt(t,e),It(e),i&4&&_c(e);break;case 21:break;default:Dt(t,e),It(e)}}function It(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(hc(r)){var i=r;break e}r=r.return}throw Error(M(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(st(a,""),i.flags&=-33);var d=dc(e);xo(e,d,a);break;case 3:case 4:var k=i.stateNode.containerInfo,P=dc(e);Co(e,P,k);break;default:throw Error(M(161))}}catch(I){Ne(e,e.return,I)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ph(e,t,r){_e=e,vc(e)}function vc(e,t,r){for(var i=(e.mode&1)!==0;_e!==null;){var a=_e,d=a.child;if(a.tag===22&&i){var k=a.memoizedState!==null||Ds;if(!k){var P=a.alternate,I=P!==null&&P.memoizedState!==null||Ze;P=Ds;var q=Ze;if(Ds=k,(Ze=I)&&!q)for(_e=a;_e!==null;)k=_e,I=k.child,k.tag===22&&k.memoizedState!==null?Sc(a):I!==null?(I.return=k,_e=I):Sc(a);for(;d!==null;)_e=d,vc(d),d=d.sibling;_e=a,Ds=P,Ze=q}gc(e)}else(a.subtreeFlags&8772)!==0&&d!==null?(d.return=a,_e=d):gc(e)}}function gc(e){for(;_e!==null;){var t=_e;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Ze||Ts(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!Ze)if(r===null)i.componentDidMount();else{var a=t.elementType===t.type?r.memoizedProps:Rt(t.type,r.memoizedProps);i.componentDidUpdate(a,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var d=t.updateQueue;d!==null&&ma(t,d,i);break;case 3:var k=t.updateQueue;if(k!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}ma(t,k,r)}break;case 5:var P=t.stateNode;if(r===null&&t.flags&4){r=P;var I=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":I.autoFocus&&r.focus();break;case"img":I.src&&(r.src=I.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var q=t.alternate;if(q!==null){var ie=q.memoizedState;if(ie!==null){var ne=ie.dehydrated;ne!==null&&hi(ne)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(M(163))}Ze||t.flags&512&&wo(t)}catch(re){Ne(t,t.return,re)}}if(t===e){_e=null;break}if(r=t.sibling,r!==null){r.return=t.return,_e=r;break}_e=t.return}}function mc(e){for(;_e!==null;){var t=_e;if(t===e){_e=null;break}var r=t.sibling;if(r!==null){r.return=t.return,_e=r;break}_e=t.return}}function Sc(e){for(;_e!==null;){var t=_e;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Ts(4,t)}catch(I){Ne(t,r,I)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var a=t.return;try{i.componentDidMount()}catch(I){Ne(t,a,I)}}var d=t.return;try{wo(t)}catch(I){Ne(t,d,I)}break;case 5:var k=t.return;try{wo(t)}catch(I){Ne(t,k,I)}}}catch(I){Ne(t,t.return,I)}if(t===e){_e=null;break}var P=t.sibling;if(P!==null){P.return=t.return,_e=P;break}_e=t.return}}var Bh=Math.ceil,As=f.ReactCurrentDispatcher,Eo=f.ReactCurrentOwner,wt=f.ReactCurrentBatchConfig,ke=0,$e=null,je=null,Ge=0,vt=0,Zr=ir(0),We=0,Mi=null,Rr=0,Ps=0,ko=0,Oi=null,at=null,bo=0,ei=1/0,Vt=null,Bs=!1,Ro=null,cr=null,Ms=!1,ur=null,Os=0,Ii=0,Lo=null,Is=-1,Ns=0;function rt(){return(ke&6)!==0?He():Is!==-1?Is:Is=He()}function hr(e){return(e.mode&1)===0?1:(ke&2)!==0&&Ge!==0?Ge&-Ge:vh.transition!==null?(Ns===0&&(Ns=dl()),Ns):(e=Re,e!==0||(e=window.event,e=e===void 0?16:wl(e.type)),e)}function Tt(e,t,r,i){if(50<Ii)throw Ii=0,Lo=null,Error(M(185));oi(e,r,i),((ke&2)===0||e!==$e)&&(e===$e&&((ke&2)===0&&(Ps|=r),We===4&&dr(e,Ge)),ct(e,i),r===1&&ke===0&&(t.mode&1)===0&&(ei=He()+500,hs&&nr()))}function ct(e,t){var r=e.callbackNode;vu(e,t);var i=Ki(e,e===$e?Ge:0);if(i===0)r!==null&&cl(r),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(r!=null&&cl(r),t===1)e.tag===0?ph(wc.bind(null,e)):oa(wc.bind(null,e)),hh(function(){(ke&6)===0&&nr()}),r=null;else{switch(fl(i)){case 1:r=on;break;case 4:r=ul;break;case 16:r=Wi;break;case 536870912:r=hl;break;default:r=Wi}r=Dc(r,yc.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function yc(e,t){if(Is=-1,Ns=0,(ke&6)!==0)throw Error(M(327));var r=e.callbackNode;if(ti()&&e.callbackNode!==r)return null;var i=Ki(e,e===$e?Ge:0);if(i===0)return null;if((i&30)!==0||(i&e.expiredLanes)!==0||t)t=Hs(e,i);else{t=i;var a=ke;ke|=2;var d=xc();($e!==e||Ge!==t)&&(Vt=null,ei=He()+500,Dr(e,t));do try{Ih();break}catch(P){Cc(e,P)}while(!0);Vn(),As.current=d,ke=a,je!==null?t=0:($e=null,Ge=0,t=We)}if(t!==0){if(t===2&&(a=ln(e),a!==0&&(i=a,t=Do(e,a))),t===1)throw r=Mi,Dr(e,0),dr(e,i),ct(e,He()),r;if(t===6)dr(e,i);else{if(a=e.current.alternate,(i&30)===0&&!Mh(a)&&(t=Hs(e,i),t===2&&(d=ln(e),d!==0&&(i=d,t=Do(e,d))),t===1))throw r=Mi,Dr(e,0),dr(e,i),ct(e,He()),r;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(M(345));case 2:Tr(e,at,Vt);break;case 3:if(dr(e,i),(i&130023424)===i&&(t=bo+500-He(),10<t)){if(Ki(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){rt(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Mn(Tr.bind(null,e,at,Vt),t);break}Tr(e,at,Vt);break;case 4:if(dr(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var k=31-Et(i);d=1<<k,k=t[k],k>a&&(a=k),i&=~d}if(i=a,i=He()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Bh(i/1960))-i,10<i){e.timeoutHandle=Mn(Tr.bind(null,e,at,Vt),i);break}Tr(e,at,Vt);break;case 5:Tr(e,at,Vt);break;default:throw Error(M(329))}}}return ct(e,He()),e.callbackNode===r?yc.bind(null,e):null}function Do(e,t){var r=Oi;return e.current.memoizedState.isDehydrated&&(Dr(e,t).flags|=256),e=Hs(e,t),e!==2&&(t=at,at=r,t!==null&&To(t)),e}function To(e){at===null?at=e:at.push.apply(at,e)}function Mh(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var i=0;i<r.length;i++){var a=r[i],d=a.getSnapshot;a=a.value;try{if(!kt(d(),a))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 dr(e,t){for(t&=~ko,t&=~Ps,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Et(t),i=1<<r;e[r]=-1,t&=~i}}function wc(e){if((ke&6)!==0)throw Error(M(327));ti();var t=Ki(e,0);if((t&1)===0)return ct(e,He()),null;var r=Hs(e,t);if(e.tag!==0&&r===2){var i=ln(e);i!==0&&(t=i,r=Do(e,i))}if(r===1)throw r=Mi,Dr(e,0),dr(e,t),ct(e,He()),r;if(r===6)throw Error(M(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Tr(e,at,Vt),ct(e,He()),null}function Ao(e,t){var r=ke;ke|=1;try{return e(t)}finally{ke=r,ke===0&&(ei=He()+500,hs&&nr())}}function Lr(e){ur!==null&&ur.tag===0&&(ke&6)===0&&ti();var t=ke;ke|=1;var r=wt.transition,i=Re;try{if(wt.transition=null,Re=1,e)return e()}finally{Re=i,wt.transition=r,ke=t,(ke&6)===0&&nr()}}function Po(){vt=Zr.current,Be(Zr)}function Dr(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,uh(r)),je!==null)for(r=je.return;r!==null;){var i=r;switch(jn(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&cs();break;case 3:Qr(),Be(nt),Be(Qe),Zn();break;case 5:Yn(i);break;case 4:Qr();break;case 13:Be(Oe);break;case 19:Be(Oe);break;case 10:Kn(i.type._context);break;case 22:case 23:Po()}r=r.return}if($e=e,je=e=fr(e.current,null),Ge=vt=t,We=0,Mi=null,ko=Ps=Rr=0,at=Oi=null,Er!==null){for(t=0;t<Er.length;t++)if(r=Er[t],i=r.interleaved,i!==null){r.interleaved=null;var a=i.next,d=r.pending;if(d!==null){var k=d.next;d.next=a,i.next=k}r.pending=i}Er=null}return e}function Cc(e,t){do{var r=je;try{if(Vn(),ws.current=ks,Cs){for(var i=Ie.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Cs=!1}if(br=0,Ue=ze=Ie=null,Li=!1,Di=0,Eo.current=null,r===null||r.return===null){We=1,Mi=t,je=null;break}e:{var d=e,k=r.return,P=r,I=t;if(t=Ge,P.flags|=32768,I!==null&&typeof I=="object"&&typeof I.then=="function"){var q=I,ie=P,ne=ie.tag;if((ie.mode&1)===0&&(ne===0||ne===11||ne===15)){var re=ie.alternate;re?(ie.updateQueue=re.updateQueue,ie.memoizedState=re.memoizedState,ie.lanes=re.lanes):(ie.updateQueue=null,ie.memoizedState=null)}var fe=qa(k);if(fe!==null){fe.flags&=-257,Ga(fe,k,P,d,t),fe.mode&1&&Ka(d,q,t),t=fe,I=q;var pe=t.updateQueue;if(pe===null){var ve=new Set;ve.add(I),t.updateQueue=ve}else pe.add(I);break e}else{if((t&1)===0){Ka(d,q,t),Bo();break e}I=Error(M(426))}}else if(Me&&P.mode&1){var Fe=qa(k);if(Fe!==null){(Fe.flags&65536)===0&&(Fe.flags|=256),Ga(Fe,k,P,d,t),Un(Yr(I,P));break e}}d=I=Yr(I,P),We!==4&&(We=2),Oi===null?Oi=[d]:Oi.push(d),d=k;do{switch(d.tag){case 3:d.flags|=65536,t&=-t,d.lanes|=t;var U=$a(d,I,t);ga(d,U);break e;case 1:P=I;var z=d.type,V=d.stateNode;if((d.flags&128)===0&&(typeof z.getDerivedStateFromError=="function"||V!==null&&typeof V.componentDidCatch=="function"&&(cr===null||!cr.has(V)))){d.flags|=65536,t&=-t,d.lanes|=t;var ae=Va(d,P,t);ga(d,ae);break e}}d=d.return}while(d!==null)}kc(r)}catch(ge){t=ge,je===r&&r!==null&&(je=r=r.return);continue}break}while(!0)}function xc(){var e=As.current;return As.current=ks,e===null?ks:e}function Bo(){(We===0||We===3||We===2)&&(We=4),$e===null||(Rr&268435455)===0&&(Ps&268435455)===0||dr($e,Ge)}function Hs(e,t){var r=ke;ke|=2;var i=xc();($e!==e||Ge!==t)&&(Vt=null,Dr(e,t));do try{Oh();break}catch(a){Cc(e,a)}while(!0);if(Vn(),ke=r,As.current=i,je!==null)throw Error(M(261));return $e=null,Ge=0,We}function Oh(){for(;je!==null;)Ec(je)}function Ih(){for(;je!==null&&!lu();)Ec(je)}function Ec(e){var t=Lc(e.alternate,e,vt);e.memoizedProps=e.pendingProps,t===null?kc(e):je=t,Eo.current=null}function kc(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=Lh(r,t,vt),r!==null){je=r;return}}else{if(r=Dh(r,t),r!==null){r.flags&=32767,je=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{We=6,je=null;return}}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);We===0&&(We=5)}function Tr(e,t,r){var i=Re,a=wt.transition;try{wt.transition=null,Re=1,Nh(e,t,r,i)}finally{wt.transition=a,Re=i}return null}function Nh(e,t,r,i){do ti();while(ur!==null);if((ke&6)!==0)throw Error(M(327));r=e.finishedWork;var a=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(M(177));e.callbackNode=null,e.callbackPriority=0;var d=r.lanes|r.childLanes;if(gu(e,d),e===$e&&(je=$e=null,Ge=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||Ms||(Ms=!0,Dc(Wi,function(){return ti(),null})),d=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||d){d=wt.transition,wt.transition=null;var k=Re;Re=1;var P=ke;ke|=4,Eo.current=null,Ah(e,r),pc(r,e),ih(Pn),Xi=!!An,Pn=An=null,e.current=r,Ph(r),au(),ke=P,Re=k,wt.transition=d}else e.current=r;if(Ms&&(Ms=!1,ur=e,Os=a),d=e.pendingLanes,d===0&&(cr=null),hu(r.stateNode),ct(e,He()),t!==null)for(i=e.onRecoverableError,r=0;r<t.length;r++)a=t[r],i(a.value,{componentStack:a.stack,digest:a.digest});if(Bs)throw Bs=!1,e=Ro,Ro=null,e;return(Os&1)!==0&&e.tag!==0&&ti(),d=e.pendingLanes,(d&1)!==0?e===Lo?Ii++:(Ii=0,Lo=e):Ii=0,nr(),null}function ti(){if(ur!==null){var e=fl(Os),t=wt.transition,r=Re;try{if(wt.transition=null,Re=16>e?16:e,ur===null)var i=!1;else{if(e=ur,ur=null,Os=0,(ke&6)!==0)throw Error(M(331));var a=ke;for(ke|=4,_e=e.current;_e!==null;){var d=_e,k=d.child;if((_e.flags&16)!==0){var P=d.deletions;if(P!==null){for(var I=0;I<P.length;I++){var q=P[I];for(_e=q;_e!==null;){var ie=_e;switch(ie.tag){case 0:case 11:case 15:Bi(8,ie,d)}var ne=ie.child;if(ne!==null)ne.return=ie,_e=ne;else for(;_e!==null;){ie=_e;var re=ie.sibling,fe=ie.return;if(uc(ie),ie===q){_e=null;break}if(re!==null){re.return=fe,_e=re;break}_e=fe}}}var pe=d.alternate;if(pe!==null){var ve=pe.child;if(ve!==null){pe.child=null;do{var Fe=ve.sibling;ve.sibling=null,ve=Fe}while(ve!==null)}}_e=d}}if((d.subtreeFlags&2064)!==0&&k!==null)k.return=d,_e=k;else e:for(;_e!==null;){if(d=_e,(d.flags&2048)!==0)switch(d.tag){case 0:case 11:case 15:Bi(9,d,d.return)}var U=d.sibling;if(U!==null){U.return=d.return,_e=U;break e}_e=d.return}}var z=e.current;for(_e=z;_e!==null;){k=_e;var V=k.child;if((k.subtreeFlags&2064)!==0&&V!==null)V.return=k,_e=V;else e:for(k=z;_e!==null;){if(P=_e,(P.flags&2048)!==0)try{switch(P.tag){case 0:case 11:case 15:Ts(9,P)}}catch(ge){Ne(P,P.return,ge)}if(P===k){_e=null;break e}var ae=P.sibling;if(ae!==null){ae.return=P.return,_e=ae;break e}_e=P.return}}if(ke=a,nr(),Pt&&typeof Pt.onPostCommitFiberRoot=="function")try{Pt.onPostCommitFiberRoot(Ui,e)}catch{}i=!0}return i}finally{Re=r,wt.transition=t}}return!1}function bc(e,t,r){t=Yr(r,t),t=$a(e,t,1),e=lr(e,t,1),t=rt(),e!==null&&(oi(e,1,t),ct(e,t))}function Ne(e,t,r){if(e.tag===3)bc(e,e,r);else for(;t!==null;){if(t.tag===3){bc(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(cr===null||!cr.has(i))){e=Yr(r,e),e=Va(t,e,1),t=lr(t,e,1),e=rt(),t!==null&&(oi(t,1,e),ct(t,e));break}}t=t.return}}function Hh(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),t=rt(),e.pingedLanes|=e.suspendedLanes&r,$e===e&&(Ge&r)===r&&(We===4||We===3&&(Ge&130023424)===Ge&&500>He()-bo?Dr(e,0):ko|=r),ct(e,t)}function Rc(e,t){t===0&&((e.mode&1)===0?t=1:(t=Vi,Vi<<=1,(Vi&130023424)===0&&(Vi=4194304)));var r=rt();e=Wt(e,t),e!==null&&(oi(e,t,r),ct(e,r))}function Fh(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Rc(e,r)}function jh(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(M(314))}i!==null&&i.delete(t),Rc(e,r)}var Lc;Lc=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||nt.current)lt=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return lt=!1,Rh(e,t,r);lt=(e.flags&131072)!==0}else lt=!1,Me&&(t.flags&1048576)!==0&&la(t,fs,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Ls(e,t),e=t.pendingProps;var a=Ur(t,Qe.current);Xr(t,r),a=ro(null,t,i,e,a,r);var d=io();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ot(i)?(d=!0,us(t)):d=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,Xn(t),a.updater=bs,t.stateNode=a,a._reactInternals=t,co(t,i,e,r),t=_o(null,t,i,!0,d,r)):(t.tag=0,Me&&d&&Fn(t),tt(null,t,a,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Ls(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=Wh(i),e=Rt(i,e),a){case 0:t=fo(null,t,i,e,r);break e;case 1:t=ec(null,t,i,e,r);break e;case 11:t=Xa(null,t,i,e,r);break e;case 14:t=Qa(null,t,i,Rt(i.type,e),r);break e}throw Error(M(306,i,""))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Rt(i,a),fo(e,t,i,a,r);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Rt(i,a),ec(e,t,i,a,r);case 3:e:{if(tc(t),e===null)throw Error(M(387));i=t.pendingProps,d=t.memoizedState,a=d.element,va(e,t),Ss(t,i,null,r);var k=t.memoizedState;if(i=k.element,d.isDehydrated)if(d={element:i,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){a=Yr(Error(M(423)),t),t=rc(e,t,i,r,a);break e}else if(i!==a){a=Yr(Error(M(424)),t),t=rc(e,t,i,r,a);break e}else for(pt=rr(t.stateNode.containerInfo.firstChild),_t=t,Me=!0,bt=null,r=_a(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Kr(),i===a){t=$t(e,t,r);break e}tt(e,t,i,r)}t=t.child}return t;case 5:return Sa(t),e===null&&Wn(t),i=t.type,a=t.pendingProps,d=e!==null?e.memoizedProps:null,k=a.children,Bn(i,a)?k=null:d!==null&&Bn(i,d)&&(t.flags|=32),Za(e,t),tt(e,t,k,r),t.child;case 6:return e===null&&Wn(t),null;case 13:return ic(e,t,r);case 4:return Qn(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=qr(t,null,i,r):tt(e,t,i,r),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Rt(i,a),Xa(e,t,i,a,r);case 7:return tt(e,t,t.pendingProps,r),t.child;case 8:return tt(e,t,t.pendingProps.children,r),t.child;case 12:return tt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,a=t.pendingProps,d=t.memoizedProps,k=a.value,De(vs,i._currentValue),i._currentValue=k,d!==null)if(kt(d.value,k)){if(d.children===a.children&&!nt.current){t=$t(e,t,r);break e}}else for(d=t.child,d!==null&&(d.return=t);d!==null;){var P=d.dependencies;if(P!==null){k=d.child;for(var I=P.firstContext;I!==null;){if(I.context===i){if(d.tag===1){I=Ut(-1,r&-r),I.tag=2;var q=d.updateQueue;if(q!==null){q=q.shared;var ie=q.pending;ie===null?I.next=I:(I.next=ie.next,ie.next=I),q.pending=I}}d.lanes|=r,I=d.alternate,I!==null&&(I.lanes|=r),qn(d.return,r,t),P.lanes|=r;break}I=I.next}}else if(d.tag===10)k=d.type===t.type?null:d.child;else if(d.tag===18){if(k=d.return,k===null)throw Error(M(341));k.lanes|=r,P=k.alternate,P!==null&&(P.lanes|=r),qn(k,r,t),k=d.sibling}else k=d.child;if(k!==null)k.return=d;else for(k=d;k!==null;){if(k===t){k=null;break}if(d=k.sibling,d!==null){d.return=k.return,k=d;break}k=k.return}d=k}tt(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,Xr(t,r),a=St(a),i=i(a),t.flags|=1,tt(e,t,i,r),t.child;case 14:return i=t.type,a=Rt(i,t.pendingProps),a=Rt(i.type,a),Qa(e,t,i,a,r);case 15:return Ya(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Rt(i,a),Ls(e,t),t.tag=1,ot(i)?(e=!0,us(t)):e=!1,Xr(t,r),Wa(t,i,a),co(t,i,a,r),_o(null,t,i,!0,e,r);case 19:return nc(e,t,r);case 22:return Ja(e,t,r)}throw Error(M(156,t.tag))};function Dc(e,t){return al(e,t)}function zh(e,t,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ct(e,t,r,i){return new zh(e,t,r,i)}function Mo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wh(e){if(typeof e=="function")return Mo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===j)return 11;if(e===J)return 14}return 2}function fr(e,t){var r=e.alternate;return r===null?(r=Ct(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Fs(e,t,r,i,a,d){var k=2;if(i=e,typeof e=="function")Mo(e)&&(k=1);else if(typeof e=="string")k=5;else e:switch(e){case E:return Ar(r.children,a,d,t);case g:k=8,a|=8;break;case R:return e=Ct(12,r,t,a|2),e.elementType=R,e.lanes=d,e;case A:return e=Ct(13,r,t,a),e.elementType=A,e.lanes=d,e;case G:return e=Ct(19,r,t,a),e.elementType=G,e.lanes=d,e;case le:return js(r,a,d,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case B:k=10;break e;case O:k=9;break e;case j:k=11;break e;case J:k=14;break e;case se:k=16,i=null;break e}throw Error(M(130,e==null?e:typeof e,""))}return t=Ct(k,r,t,a),t.elementType=e,t.type=i,t.lanes=d,t}function Ar(e,t,r,i){return e=Ct(7,e,i,t),e.lanes=r,e}function js(e,t,r,i){return e=Ct(22,e,i,t),e.elementType=le,e.lanes=r,e.stateNode={isHidden:!1},e}function Oo(e,t,r){return e=Ct(6,e,null,t),e.lanes=r,e}function Io(e,t,r){return t=Ct(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Uh(e,t,r,i,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=an(0),this.expirationTimes=an(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=an(0),this.identifierPrefix=i,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function No(e,t,r,i,a,d,k,P,I){return e=new Uh(e,t,r,P,I),t===1?(t=1,d===!0&&(t|=8)):t=0,d=Ct(3,null,null,t),e.current=d,d.stateNode=e,d.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xn(d),e}function $h(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:y,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}function Tc(e){if(!e)return sr;e=e._reactInternals;e:{if(Sr(e)!==e||e.tag!==1)throw Error(M(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ot(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(M(171))}if(e.tag===1){var r=e.type;if(ot(r))return sa(e,r,t)}return t}function Ac(e,t,r,i,a,d,k,P,I){return e=No(r,i,!0,e,a,d,k,P,I),e.context=Tc(null),r=e.current,i=rt(),a=hr(r),d=Ut(i,a),d.callback=t??null,lr(r,d,a),e.current.lanes=a,oi(e,a,i),ct(e,i),e}function zs(e,t,r,i){var a=t.current,d=rt(),k=hr(a);return r=Tc(r),t.context===null?t.context=r:t.pendingContext=r,t=Ut(d,k),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=lr(a,t,k),e!==null&&(Tt(e,a,k,d),ms(e,a,k)),k}function Ws(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Pc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Ho(e,t){Pc(e,t),(e=e.alternate)&&Pc(e,t)}function Vh(){return null}var Bc=typeof reportError=="function"?reportError:function(e){console.error(e)};function Fo(e){this._internalRoot=e}Us.prototype.render=Fo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(M(409));zs(e,t,null,null)},Us.prototype.unmount=Fo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Lr(function(){zs(null,e,null,null)}),t[Ht]=null}};function Us(e){this._internalRoot=e}Us.prototype.unstable_scheduleHydration=function(e){if(e){var t=vl();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Zt.length&&t!==0&&t<Zt[r].priority;r++);Zt.splice(r,0,e),r===0&&Sl(e)}};function jo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function $s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Mc(){}function Kh(e,t,r,i,a){if(a){if(typeof i=="function"){var d=i;i=function(){var q=Ws(k);d.call(q)}}var k=Ac(t,i,e,0,null,!1,!1,"",Mc);return e._reactRootContainer=k,e[Ht]=k.current,yi(e.nodeType===8?e.parentNode:e),Lr(),k}for(;a=e.lastChild;)e.removeChild(a);if(typeof i=="function"){var P=i;i=function(){var q=Ws(I);P.call(q)}}var I=No(e,0,!1,null,null,!1,!1,"",Mc);return e._reactRootContainer=I,e[Ht]=I.current,yi(e.nodeType===8?e.parentNode:e),Lr(function(){zs(t,I,r,i)}),I}function Vs(e,t,r,i,a){var d=r._reactRootContainer;if(d){var k=d;if(typeof a=="function"){var P=a;a=function(){var I=Ws(k);P.call(I)}}zs(t,k,e,a)}else k=Kh(r,t,e,a,i);return Ws(k)}_l=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=ni(t.pendingLanes);r!==0&&(cn(t,r|1),ct(t,He()),(ke&6)===0&&(ei=He()+500,nr()))}break;case 13:Lr(function(){var i=Wt(e,1);if(i!==null){var a=rt();Tt(i,e,1,a)}}),Ho(e,1)}},un=function(e){if(e.tag===13){var t=Wt(e,134217728);if(t!==null){var r=rt();Tt(t,e,134217728,r)}Ho(e,134217728)}},pl=function(e){if(e.tag===13){var t=hr(e),r=Wt(e,t);if(r!==null){var i=rt();Tt(r,e,t,i)}Ho(e,t)}},vl=function(){return Re},gl=function(e,t){var r=Re;try{return Re=e,t()}finally{Re=r}},tn=function(e,t,r){switch(t){case"input":if(ye(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var a=as(i);if(!a)throw Error(M(90));he(i),ye(i,a)}}}break;case"textarea":Gt(e,r);break;case"select":t=r.value,t!=null&&At(e,!!r.multiple,t,!1)}},tl=Ao,rl=Lr;var qh={usingClientEntryPoint:!1,Events:[xi,zr,as,Zo,el,Ao]},Ni={findFiberByHostInstance:yr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Gh={bundleType:Ni.bundleType,version:Ni.version,rendererPackageName:Ni.rendererPackageName,rendererConfig:Ni.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:f.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ol(e),e===null?null:e.stateNode},findFiberByHostInstance:Ni.findFiberByHostInstance||Vh,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ks=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ks.isDisabled&&Ks.supportsFiber)try{Ui=Ks.inject(Gh),Pt=Ks}catch{}}return ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qh,ut.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jo(t))throw Error(M(200));return $h(e,t,null,r)},ut.createRoot=function(e,t){if(!jo(e))throw Error(M(299));var r=!1,i="",a=Bc;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=No(e,1,!1,null,null,r,!1,i,a),e[Ht]=t.current,yi(e.nodeType===8?e.parentNode:e),new Fo(t)},ut.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(M(188)):(e=Object.keys(e).join(","),Error(M(268,e)));return e=ol(t),e=e===null?null:e.stateNode,e},ut.flushSync=function(e){return Lr(e)},ut.hydrate=function(e,t,r){if(!$s(t))throw Error(M(200));return Vs(null,e,t,!0,r)},ut.hydrateRoot=function(e,t,r){if(!jo(e))throw Error(M(405));var i=r!=null&&r.hydratedSources||null,a=!1,d="",k=Bc;if(r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(d=r.identifierPrefix),r.onRecoverableError!==void 0&&(k=r.onRecoverableError)),t=Ac(t,null,e,1,r??null,a,!1,d,k),e[Ht]=t.current,yi(e),i)for(e=0;e<i.length;e++)r=i[e],a=r._getVersion,a=a(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,a]:t.mutableSourceEagerHydrationData.push(r,a);return new Us(t)},ut.render=function(e,t,r){if(!$s(t))throw Error(M(200));return Vs(null,e,t,!1,r)},ut.unmountComponentAtNode=function(e){if(!$s(e))throw Error(M(40));return e._reactRootContainer?(Lr(function(){Vs(null,null,e,!1,function(){e._reactRootContainer=null,e[Ht]=null})}),!0):!1},ut.unstable_batchedUpdates=Ao,ut.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!$s(r))throw Error(M(200));if(e==null||e._reactInternals===void 0)throw Error(M(38));return Vs(e,t,r,!1,i)},ut.version="18.3.1-next-f1338f8080-20240426",ut}var Wc;function id(){if(Wc)return Uo.exports;Wc=1;function F(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(F)}catch($){console.error($)}}return F(),Uo.exports=rd(),Uo.exports}var Uc;function sd(){if(Uc)return Gs;Uc=1;var F=id();return Gs.createRoot=F.createRoot,Gs.hydrateRoot=F.hydrateRoot,Gs}var nd=sd();const $c=F=>{let $;const M=new Set,Z=(p,m)=>{const u=typeof p=="function"?p($):p;if(!Object.is(u,$)){const v=$;$=m??(typeof u!="object"||u===null)?u:Object.assign({},$,u),M.forEach(S=>S($,v))}},ee=()=>$,c={setState:Z,getState:ee,getInitialState:()=>h,subscribe:p=>(M.add(p),()=>M.delete(p))},h=$=F(Z,ee,c);return c},od=(F=>F?$c(F):$c),ld=F=>F;function ad(F,$=ld){const M=qs.useSyncExternalStore(F.subscribe,qs.useCallback(()=>$(F.getState()),[F,$]),qs.useCallback(()=>$(F.getInitialState()),[F,$]));return qs.useDebugValue(M),M}const Vc=F=>{const $=od(F),M=Z=>ad($,Z);return Object.assign(M,$),M},Qo=(F=>F?Vc(F):Vc),Qs=Qo(F=>({status:"connecting",setStatus:$=>F({status:$})})),cd={connecting:{label:"Connecting…",className:"text-yellow-500"},connected:{label:"Connected",className:"text-green-500"},disconnected:{label:"Disconnected",className:"text-red-500"}};function ud(){const F=Qs(Z=>Z.status),{label:$,className:M}=cd[F];return W.jsxs("div",{"data-testid":"connection-status","aria-label":F,className:`flex items-center gap-1.5 text-sm font-medium ${M}`,children:[W.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-current"}),$]})}const pr=Qo(F=>({gates:{},setGate:$=>F(M=>({gates:{...M.gates,[$.runId]:$}})),clearGate:$=>F(M=>{if(!($ in M.gates))return M;const Z={...M.gates};return delete Z[$],{gates:Z}}),ingest:$=>{const M=typeof $.session=="string"?$.session:void 0;M!==void 0&&F(Z=>{switch($.type){case"awaitingHuman":return typeof $.ord=="number"&&typeof $.prompt=="string"?{gates:{...Z.gates,[M]:{runId:M,ord:$.ord,prompt:$.prompt,lifecycle:"open",receivedAt:Date.now()}}}:Z;case"resumed":case"sessionCompleted":case"runCancelled":case"sessionFailed":{if(!(M in Z.gates))return Z;const ee={...Z.gates};return delete ee[M],{gates:ee}}default:return Z}})},reconcile:$=>F(M=>{const Z=new Set($),ee={};let oe=!1;for(const[K,c]of Object.entries(M.gates))Z.has(K)?ee[K]=c:oe=!0;return oe?{gates:ee}:M})}));function hd({onSelect:F}){const $=pr(Z=>Z.gates),M=Object.values($);return M.length===0?W.jsx(W.Fragment,{}):W.jsx("div",{className:"fixed bottom-4 right-4 flex flex-col gap-2 z-50","data-testid":"gate-notification",children:M.map(Z=>W.jsxs("button",{type:"button",onClick:()=>F(Z.runId),"data-testid":"gate-toast","data-run-id":Z.runId,className:"w-72 rounded-lg border border-yellow-300 bg-white p-3 text-left shadow-lg hover:border-yellow-400",children:[W.jsx("p",{className:"text-xs font-semibold text-yellow-700",children:"Run awaiting human"}),W.jsxs("p",{className:"text-[11px] text-gray-400 font-mono",children:[Z.runId.slice(0,8)," · before unit #",Z.ord]}),W.jsx("p",{className:"mt-1 text-xs text-gray-600 line-clamp-2",children:Z.prompt}),W.jsx("p",{className:"mt-1 text-[11px] text-blue-600",children:"Review →"})]},Z.runId))})}const Qc={planning:{label:"Planning",className:"text-gray-500"},distributing:{label:"Distributing",className:"text-purple-600"},executing:{label:"Executing",className:"text-blue-600"},awaiting_human:{label:"Awaiting human",className:"text-yellow-600"},completed:{label:"Completed",className:"text-green-600"},cancelled:{label:"Cancelled",className:"text-gray-400"},failed:{label:"Failed",className:"text-red-600"}};function dd({view:F,selected:$,onSelect:M}){const{session:Z,units:ee}=F,oe=Qc[Z.status]??{label:Z.status,className:"text-gray-500"},K=Z.status==="awaiting_human";return W.jsxs("button",{type:"button",onClick:()=>M(Z.id),"data-testid":"run-card","data-run-id":Z.id,"data-status":Z.status,"aria-pressed":$,className:`w-full text-left rounded-lg border p-4 bg-white shadow-sm transition ${$?"border-blue-500 ring-1 ring-blue-300":"border-gray-200 hover:border-gray-300"}`,children:[W.jsxs("div",{className:"flex justify-between items-start gap-2 mb-1",children:[W.jsx("p",{className:"font-semibold text-sm line-clamp-2 flex-1",children:Z.problem}),K&&W.jsx("span",{"data-testid":"run-card-gate-flag",className:"shrink-0 rounded-full bg-yellow-100 px-2 py-0.5 text-[10px] font-semibold text-yellow-700",children:"gate"})]}),W.jsxs("div",{className:"flex justify-between items-center",children:[W.jsx("p",{className:"text-xs text-gray-400 font-mono",children:Z.id.slice(0,8)}),W.jsx("span",{className:`text-xs font-medium ${oe.className}`,children:oe.label})]}),W.jsxs("p",{className:"text-[11px] text-gray-400 mt-1",children:[ee.length," unit",ee.length===1?"":"s"]})]})}function fd({runs:F,selectedRunId:$,onSelect:M}){return Qs(ee=>ee.status)==="disconnected"?W.jsx("div",{"data-testid":"run-list",className:"p-4 text-sm text-gray-400 text-center",children:"Daemon not reachable — reconnecting…"}):F.length===0?W.jsx("div",{"data-testid":"run-list",className:"p-4 text-sm text-gray-400 text-center",children:"No runs yet"}):W.jsx("div",{"data-testid":"run-list",className:"flex flex-col gap-3 p-4",children:F.map(ee=>W.jsx(dd,{view:ee,selected:ee.session.id===$,onSelect:M},ee.session.id))})}const Ko={};function Yc(){const F=Ko==null?void 0:Ko.VITE_API_HOST;return typeof F=="string"&&F.length>0?F:void 0}function _d(){const F=Yc();return F?`http://${F}/api/v1`:`${window.location.origin}/api/v1`}function Jc(){const F=Yc();return F?`ws://${F}`:`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}`}const pd=F=>`${Jc()}/ws/terminals/${encodeURIComponent(F)}`;async function it(F,$){const M=($==null?void 0:$.body)!==void 0&&($==null?void 0:$.body)!==null?{"Content-Type":"application/json",...$==null?void 0:$.headers}:{...$==null?void 0:$.headers},Z=await fetch(`${_d()}${F}`,{...$,headers:M});if(!Z.ok)throw new Error(`API ${Z.status}: ${await Z.text()}`);return Z.json()}const Xe={listRuns:()=>it("/runs"),getRun:F=>it(`/runs/${encodeURIComponent(F)}`),launchRun:F=>it("/runs",{method:"POST",body:JSON.stringify(F)}),confirmGate:(F,$)=>it(`/runs/${encodeURIComponent(F)}/gate`,{method:"POST",body:JSON.stringify($)}),cancelRun:F=>it(`/runs/${encodeURIComponent(F)}/cancel`,{method:"POST"}),resumeRun:F=>it(`/runs/${encodeURIComponent(F)}/resume`,{method:"POST"}),getUnitOutput:(F,$)=>it(`/runs/${encodeURIComponent(F)}/units/${$}/output`),getGate:F=>it(`/runs/${encodeURIComponent(F)}/gate`),getRoster:()=>it("/roster"),listRepos:()=>it("/repos"),registerRepo:(F,$)=>it("/repos",{method:"POST",body:JSON.stringify({name:F,rootPath:$})}),getHealth:()=>it("/health"),openTerminal:F=>it("/terminals",{method:"POST",body:JSON.stringify(F)}),resizeTerminal:(F,$,M)=>it(`/terminals/${encodeURIComponent(F)}/resize`,{method:"POST",body:JSON.stringify({cols:$,rows:M})}),closeTerminal:F=>it(`/terminals/${encodeURIComponent(F)}/close`,{method:"POST"})},Kc=2e5,qc=500;function vd(F,$){return`${F}:u${$}`}function gd(F){switch(F.type){case"sessionStarted":return typeof F.problem=="string"?F.problem:"run started";case"unitPlanned":return typeof F.description=="string"?F.description:"unit planned";case"unitDistributed":return typeof F.cli=="string"?`assigned -> ${F.cli}`:"distributed";case"unitExecuting":return"executing";case"gateDecided":return F.allow===!0?"gate: allow":"gate: deny";case"unitDone":return"unit done";case"unitDenied":return"unit denied";case"awaitingHuman":return typeof F.prompt=="string"?`awaiting human: ${F.prompt}`:"awaiting human";case"resumed":return"resumed";case"runCancelled":return"run cancelled";case"sessionFailed":return"run failed";case"sessionCompleted":return"run completed";case"error":return typeof F.message=="string"?`error: ${F.message}`:"error";default:return F.type}}const Xs=Qo(F=>({outputs:{},logs:{},seq:0,ingest:$=>{const M=typeof $.session=="string"?$.session:void 0;M!==void 0&&F(Z=>{const ee=Z.seq+1;if($.type==="cliOutputDelta"&&typeof $.ord=="number"&&typeof $.chunk=="string"){const h=vd(M,$.ord);let m=(Z.outputs[h]??"")+$.chunk;return m.length>Kc&&(m=m.slice(m.length-Kc)),{seq:ee,outputs:{...Z.outputs,[h]:m}}}if($.type==="heartbeat")return{seq:ee};const oe={seq:ee,type:$.type,ts:Date.now(),detail:gd($)};typeof $.ord=="number"&&(oe.ord=$.ord);const c=[...Z.logs[M]??[],oe];return c.length>qc&&c.splice(0,c.length-qc),{seq:ee,logs:{...Z.logs,[M]:c}}})},clear:$=>F(M=>{const Z={...M.outputs};for(const oe of Object.keys(Z))oe.startsWith(`${$}:u`)&&delete Z[oe];const ee={...M.logs};return delete ee[$],{outputs:Z,logs:ee}})}));function md({runId:F,ord:$,prompt:M,onResolved:Z}){const ee=pr(n=>n.clearGate),[oe,K]=Ce.useState(""),[c,h]=Ce.useState(!1),[p,m]=Ce.useState(null);async function u(n){h(!0),m(null);try{await n(),ee(F),Z==null||Z()}catch(l){m(l instanceof Error?l.message:String(l))}finally{h(!1)}}const v=()=>u(()=>Xe.confirmGate(F,{approve:!0})),S=()=>{const n=oe.trim();if(!n)return Promise.resolve();const l={approve:!0,amend:n};return u(()=>Xe.confirmGate(F,l))},x=()=>u(()=>Xe.confirmGate(F,{approve:!1})),_=()=>u(()=>Xe.cancelRun(F));return W.jsxs("div",{className:"rounded-lg border border-yellow-300 bg-white p-4 shadow-lg","data-testid":"steering-gate","data-run-id":F,children:[W.jsx("p",{className:"font-semibold text-sm mb-1",children:"Awaiting human decision"}),W.jsxs("p",{className:"text-xs text-gray-400 font-mono mb-2",children:["run ",F.slice(0,8),typeof $=="number"?` · before unit #${$}`:""]}),W.jsx("p",{className:"text-xs text-gray-600 mb-3 whitespace-pre-wrap","data-testid":"steering-prompt",children:M??"Prompt unavailable (daemon restarted) — you can still approve, reject, or cancel."}),W.jsx("textarea",{"data-testid":"steering-amend",className:"w-full rounded border p-2 text-xs mb-2 resize-none",rows:2,placeholder:"Optional steer / amend — sent with Approve with steer to guide the next unit",value:oe,onChange:n=>K(n.target.value),disabled:c}),p&&W.jsx("p",{className:"text-xs text-red-600 mb-2","data-testid":"steering-error",children:p}),W.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[W.jsx("button",{"data-testid":"steering-approve",onClick:()=>void v(),disabled:c,className:"rounded bg-green-600 px-3 py-1.5 text-xs text-white hover:bg-green-700 disabled:opacity-50",children:"Approve"}),W.jsx("button",{"data-testid":"steering-approve-steer",onClick:()=>void S(),disabled:c||!oe.trim(),className:"rounded bg-amber-500 px-3 py-1.5 text-xs text-white hover:bg-amber-600 disabled:opacity-50",children:"Approve with steer"}),W.jsx("button",{"data-testid":"steering-reject",onClick:()=>void x(),disabled:c,className:"rounded bg-red-600 px-3 py-1.5 text-xs text-white hover:bg-red-700 disabled:opacity-50",children:"Reject"}),W.jsx("button",{"data-testid":"steering-cancel",onClick:()=>void _(),disabled:c,className:"rounded bg-gray-700 px-3 py-1.5 text-xs text-white hover:bg-gray-800 disabled:opacity-50",children:"Cancel run"})]})]})}function Sd({routing:F}){return F?F.method==="council"?W.jsxs("p",{className:"text-[11px] text-gray-500","data-testid":"routing-provenance",children:[W.jsx("span",{className:"font-medium",children:"Council:"})," ",F.winner," won ·"," ",F.agreement_pct,"% agreement · ",F.returned," returned · ",F.dissent," dissent"]}):F.method==="degraded"?W.jsxs("p",{className:"text-[11px] text-amber-600","data-testid":"routing-provenance",children:[W.jsx("span",{className:"font-medium",children:"Degraded:"})," ",F.reason]}):W.jsxs("p",{className:"text-[11px] text-indigo-600","data-testid":"routing-provenance",children:[W.jsx("span",{className:"font-medium",children:"Evaluator-distinct:"})," ",F.winner," (was ",F.was,")"]}):null}const yd={recon:"bg-blue-100 text-blue-700",build:"bg-green-100 text-green-700",review:"bg-indigo-100 text-indigo-700",test:"bg-amber-100 text-amber-700"},wd={pending:"text-gray-400",distributed:"text-blue-600",done:"text-green-600",rejected:"text-red-600"};function Cd({runId:F,unit:$,isGated:M,onResolved:Z}){const ee=pr(_=>_.clearGate),[oe,K]=Ce.useState(null),[c,h]=Ce.useState(!1),[p,m]=Ce.useState(!1),[u,v]=Ce.useState(!1);async function S(){if(c){h(!1);return}if(h(!0),oe===null){m(!0);try{const{output:_}=await Xe.getUnitOutput(F,$.ord);K(_??"(no transcript captured)")}catch(_){K(`(failed to load transcript: ${_ instanceof Error?_.message:String(_)})`)}finally{m(!1)}}}async function x(){v(!0);try{await Xe.confirmGate(F,{approve:!0}),ee(F),Z==null||Z()}finally{v(!1)}}return W.jsxs("li",{className:"rounded border border-gray-200 p-2","data-testid":"work-unit","data-ord":$.ord,children:[W.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[W.jsxs("span",{className:"w-6 text-center text-xs text-gray-400 shrink-0",children:["#",$.ord]}),W.jsx("span",{className:`rounded px-2 py-0.5 text-[10px] font-semibold uppercase ${yd[$.stage]??"bg-gray-100 text-gray-600"}`,children:$.stage}),W.jsx("span",{className:"flex-1 truncate text-xs text-gray-700",children:$.description}),W.jsx("span",{className:`text-[11px] font-medium ${wd[$.status]??"text-gray-500"}`,children:$.status})]}),W.jsxs("div",{className:"mt-1 pl-8 flex flex-col gap-0.5",children:[$.assigned_cli&&W.jsxs("p",{className:"text-[11px] text-gray-500",children:["CLI: ",W.jsx("span",{className:"font-mono",children:$.assigned_cli})]}),W.jsx(Sd,{routing:$.routing}),$.denial_reason&&W.jsxs("p",{className:"text-[11px] text-red-600","data-testid":"unit-denial-reason",children:["Denied: ",$.denial_reason]}),W.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[W.jsx("button",{type:"button","data-testid":"unit-transcript-toggle",onClick:()=>void S(),className:"text-[11px] text-blue-600 hover:underline",children:c?"Hide transcript":"View transcript"}),M&&W.jsx("button",{type:"button","data-testid":"unit-approve",onClick:()=>void x(),disabled:u,className:"rounded bg-green-600 px-2 py-0.5 text-[11px] text-white hover:bg-green-700 disabled:opacity-50",children:"Approve this unit"})]}),c&&W.jsx("pre",{"data-testid":"unit-transcript",className:"mt-1 max-h-48 overflow-auto rounded bg-gray-900 p-2 text-[10px] leading-tight text-gray-100 whitespace-pre-wrap",children:p?"Loading…":oe})]})]})}function xd({runId:F,units:$,gateOrd:M,onResolved:Z}){if($.length===0)return W.jsx("p",{"data-testid":"unit-list",className:"text-xs text-gray-400",children:"No units planned yet."});const ee=[...$].sort((oe,K)=>oe.ord-K.ord);return W.jsx("ol",{className:"flex flex-col gap-1.5","data-testid":"unit-list",children:ee.map(oe=>{const K=Z!==void 0?{runId:F,unit:oe,isGated:M===oe.ord,onResolved:Z}:{runId:F,unit:oe,isGated:M===oe.ord};return W.jsx(Cd,{...K},oe.id)})})}function Ed({runId:F}){const $=Xs(c=>c.outputs),M=Xs(c=>c.logs),Z=Ce.useRef(null),ee=`${F}:u`,oe=Ce.useMemo(()=>Object.entries($).filter(([c])=>c.startsWith(ee)).map(([c,h])=>({ord:Number(c.slice(ee.length)),text:h})).sort((c,h)=>c.ord-h.ord),[$,ee]),K=M[F]??[];return Ce.useEffect(()=>{const c=Z.current;c&&(c.scrollTop=c.scrollHeight)},[oe]),W.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3","data-testid":"live-output",children:[W.jsxs("section",{children:[W.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-gray-400 mb-1",children:"Live output"}),W.jsx("div",{ref:Z,"data-testid":"live-output-pane",className:"max-h-64 overflow-auto rounded bg-gray-900 p-2 text-[10px] leading-tight text-gray-100",children:oe.length===0?W.jsx("span",{className:"text-gray-500",children:"No output yet."}):oe.map(({ord:c,text:h})=>W.jsxs("div",{className:"mb-2",children:[W.jsxs("p",{className:"text-gray-500",children:["— unit #",c," —"]}),W.jsx("pre",{className:"whitespace-pre-wrap",children:h})]},c))})]}),W.jsxs("section",{children:[W.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-gray-400 mb-1",children:"Event log"}),W.jsx("ol",{"data-testid":"event-log",className:"max-h-64 overflow-auto rounded border border-gray-200 bg-white p-2 text-[11px]",children:K.length===0?W.jsx("li",{className:"text-gray-400",children:"No events yet."}):K.map(c=>W.jsxs("li",{className:"flex gap-2 border-b border-gray-50 py-0.5 last:border-0",children:[W.jsx("span",{className:"font-mono text-gray-400 shrink-0",children:typeof c.ord=="number"?`#${c.ord}`:"·"}),W.jsx("span",{className:"font-medium text-gray-600 shrink-0",children:c.type}),W.jsx("span",{className:"truncate text-gray-500",children:c.detail})]},c.seq))})]})]})}function kd({view:F,log:$}){const{status:M}=F.session;if(M!=="failed"&&M!=="cancelled")return null;const Z=[...$].reverse().find(oe=>oe.type==="error"),ee=F.units.filter(oe=>oe.denial_reason||oe.status==="rejected");return M==="cancelled"?W.jsx("div",{"data-testid":"failure-banner","data-kind":"cancelled",className:"rounded border border-gray-300 bg-gray-50 p-3 text-xs text-gray-600",children:"Run cancelled."}):W.jsxs("div",{"data-testid":"failure-banner","data-kind":"failed",className:"rounded border border-red-300 bg-red-50 p-3 text-xs text-red-700",children:[W.jsx("p",{className:"font-semibold",children:"Run halted."}),Z&&W.jsx("p",{className:"mt-1",children:Z.detail}),ee.length>0&&W.jsx("ul",{className:"mt-1 list-disc pl-4",children:ee.map(oe=>W.jsxs("li",{children:["Unit #",oe.ord,": ",oe.denial_reason??"rejected"]},oe.id))})]})}function bd(){return W.jsxs("div",{"data-testid":"campaign-dag-stub",className:"rounded-lg border border-dashed border-gray-300 bg-gray-50 p-4 text-xs text-gray-400",children:[W.jsx("p",{className:"font-semibold text-gray-500",children:"Campaign DAG — not wired"}),W.jsxs("p",{className:"mt-1",children:["Pending core's ",W.jsx("code",{children:"Campaign"})," primitive + ",W.jsx("code",{children:"RunFinished"})," /"," ",W.jsx("code",{children:"Campaign*"})," events (§4.3). Attaches to this same event stream when they land."]})]})}var qo={exports:{}},Gc;function Rd(){return Gc||(Gc=1,(function(F,$){(function(M,Z){F.exports=Z()})(globalThis,(()=>(()=>{var M={4567:function(K,c,h){var p=this&&this.__decorate||function(s,o,f,w){var y,E=arguments.length,g=E<3?o:w===null?w=Object.getOwnPropertyDescriptor(o,f):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(s,o,f,w);else for(var R=s.length-1;R>=0;R--)(y=s[R])&&(g=(E<3?y(g):E>3?y(o,f,g):y(o,f))||g);return E>3&&g&&Object.defineProperty(o,f,g),g},m=this&&this.__param||function(s,o){return function(f,w){o(f,w,s)}};Object.defineProperty(c,"__esModule",{value:!0}),c.AccessibilityManager=void 0;const u=h(9042),v=h(9924),S=h(844),x=h(4725),_=h(2585),n=h(3656);let l=c.AccessibilityManager=class extends S.Disposable{constructor(s,o,f,w){super(),this._terminal=s,this._coreBrowserService=f,this._renderService=w,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let y=0;y<this._terminal.rows;y++)this._rowElements[y]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[y]);if(this._topBoundaryFocusListener=y=>this._handleBoundaryFocus(y,0),this._bottomBoundaryFocusListener=y=>this._handleBoundaryFocus(y,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new v.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((y=>this._handleResize(y.rows)))),this.register(this._terminal.onRender((y=>this._refreshRows(y.start,y.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((y=>this._handleChar(y)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
41
+ `)))),this.register(this._terminal.onA11yTab((y=>this._handleTab(y)))),this.register(this._terminal.onKey((y=>this._handleKey(y.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,n.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,S.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(s){for(let o=0;o<s;o++)this._handleChar(" ")}_handleChar(s){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==s&&(this._charsToAnnounce+=s):this._charsToAnnounce+=s,s===`
42
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(s){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(s)||this._charsToConsume.push(s)}_refreshRows(s,o){this._liveRegionDebouncer.refresh(s,o,this._terminal.rows)}_renderRows(s,o){const f=this._terminal.buffer,w=f.lines.length.toString();for(let y=s;y<=o;y++){const E=f.lines.get(f.ydisp+y),g=[],R=(E==null?void 0:E.translateToString(!0,void 0,void 0,g))||"",B=(f.ydisp+y+1).toString(),O=this._rowElements[y];O&&(R.length===0?(O.innerText=" ",this._rowColumns.set(O,[0,1])):(O.textContent=R,this._rowColumns.set(O,g)),O.setAttribute("aria-posinset",B),O.setAttribute("aria-setsize",w))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(s,o){const f=s.target,w=this._rowElements[o===0?1:this._rowElements.length-2];if(f.getAttribute("aria-posinset")===(o===0?"1":`${this._terminal.buffer.lines.length}`)||s.relatedTarget!==w)return;let y,E;if(o===0?(y=f,E=this._rowElements.pop(),this._rowContainer.removeChild(E)):(y=this._rowElements.shift(),E=f,this._rowContainer.removeChild(y)),y.removeEventListener("focus",this._topBoundaryFocusListener),E.removeEventListener("focus",this._bottomBoundaryFocusListener),o===0){const g=this._createAccessibilityTreeNode();this._rowElements.unshift(g),this._rowContainer.insertAdjacentElement("afterbegin",g)}else{const g=this._createAccessibilityTreeNode();this._rowElements.push(g),this._rowContainer.appendChild(g)}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(),s.preventDefault(),s.stopImmediatePropagation()}_handleSelectionChange(){var R;if(this._rowElements.length===0)return;const s=document.getSelection();if(!s)return;if(s.isCollapsed)return void(this._rowContainer.contains(s.anchorNode)&&this._terminal.clearSelection());if(!s.anchorNode||!s.focusNode)return void console.error("anchorNode and/or focusNode are null");let o={node:s.anchorNode,offset:s.anchorOffset},f={node:s.focusNode,offset:s.focusOffset};if((o.node.compareDocumentPosition(f.node)&Node.DOCUMENT_POSITION_PRECEDING||o.node===f.node&&o.offset>f.offset)&&([o,f]=[f,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 w=this._rowElements.slice(-1)[0];if(f.node.compareDocumentPosition(w)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(f={node:w,offset:((R=w.textContent)==null?void 0:R.length)??0}),!this._rowContainer.contains(f.node))return;const y=({node:B,offset:O})=>{const j=B instanceof Text?B.parentNode:B;let A=parseInt(j==null?void 0:j.getAttribute("aria-posinset"),10)-1;if(isNaN(A))return console.warn("row is invalid. Race condition?"),null;const G=this._rowColumns.get(j);if(!G)return console.warn("columns is null. Race condition?"),null;let J=O<G.length?G[O]:G.slice(-1)[0]+1;return J>=this._terminal.cols&&(++A,J=0),{row:A,column:J}},E=y(o),g=y(f);if(E&&g){if(E.row>g.row||E.row===g.row&&E.column>=g.column)throw new Error("invalid range");this._terminal.select(E.column,E.row,(g.row-E.row)*this._terminal.cols-E.column+g.column)}}_handleResize(s){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>s;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const s=this._coreBrowserService.mainDocument.createElement("div");return s.setAttribute("role","listitem"),s.tabIndex=-1,this._refreshRowDimensions(s),s}_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 s=0;s<this._terminal.rows;s++)this._refreshRowDimensions(this._rowElements[s])}}_refreshRowDimensions(s){s.style.height=`${this._renderService.dimensions.css.cell.height}px`}};c.AccessibilityManager=l=p([m(1,_.IInstantiationService),m(2,x.ICoreBrowserService),m(3,x.IRenderService)],l)},3614:(K,c)=>{function h(v){return v.replace(/\r?\n/g,"\r")}function p(v,S){return S?"\x1B[200~"+v+"\x1B[201~":v}function m(v,S,x,_){v=p(v=h(v),x.decPrivateModes.bracketedPasteMode&&_.rawOptions.ignoreBracketedPasteMode!==!0),x.triggerDataEvent(v,!0),S.value=""}function u(v,S,x){const _=x.getBoundingClientRect(),n=v.clientX-_.left-10,l=v.clientY-_.top-10;S.style.width="20px",S.style.height="20px",S.style.left=`${n}px`,S.style.top=`${l}px`,S.style.zIndex="1000",S.focus()}Object.defineProperty(c,"__esModule",{value:!0}),c.rightClickHandler=c.moveTextAreaUnderMouseCursor=c.paste=c.handlePasteEvent=c.copyHandler=c.bracketTextForPaste=c.prepareTextForTerminal=void 0,c.prepareTextForTerminal=h,c.bracketTextForPaste=p,c.copyHandler=function(v,S){v.clipboardData&&v.clipboardData.setData("text/plain",S.selectionText),v.preventDefault()},c.handlePasteEvent=function(v,S,x,_){v.stopPropagation(),v.clipboardData&&m(v.clipboardData.getData("text/plain"),S,x,_)},c.paste=m,c.moveTextAreaUnderMouseCursor=u,c.rightClickHandler=function(v,S,x,_,n){u(v,S,x),n&&_.rightClickSelect(v),S.value=_.selectionText,S.select()}},7239:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ColorContrastCache=void 0;const p=h(1505);c.ColorContrastCache=class{constructor(){this._color=new p.TwoKeyMap,this._css=new p.TwoKeyMap}setCss(m,u,v){this._css.set(m,u,v)}getCss(m,u){return this._css.get(m,u)}setColor(m,u,v){this._color.set(m,u,v)}getColor(m,u){return this._color.get(m,u)}clear(){this._color.clear(),this._css.clear()}}},3656:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.addDisposableDomListener=void 0,c.addDisposableDomListener=function(h,p,m,u){h.addEventListener(p,m,u);let v=!1;return{dispose:()=>{v||(v=!0,h.removeEventListener(p,m,u))}}}},3551:function(K,c,h){var p=this&&this.__decorate||function(l,s,o,f){var w,y=arguments.length,E=y<3?s:f===null?f=Object.getOwnPropertyDescriptor(s,o):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(l,s,o,f);else for(var g=l.length-1;g>=0;g--)(w=l[g])&&(E=(y<3?w(E):y>3?w(s,o,E):w(s,o))||E);return y>3&&E&&Object.defineProperty(s,o,E),E},m=this&&this.__param||function(l,s){return function(o,f){s(o,f,l)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Linkifier=void 0;const u=h(3656),v=h(8460),S=h(844),x=h(2585),_=h(4725);let n=c.Linkifier=class extends S.Disposable{get currentLink(){return this._currentLink}constructor(l,s,o,f,w){super(),this._element=l,this._mouseService=s,this._renderService=o,this._bufferService=f,this._linkProviderService=w,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new v.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new v.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,S.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,S.toDisposable)((()=>{var y;this._lastMouseEvent=void 0,(y=this._activeProviderReplies)==null||y.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,u.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,u.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(l){this._lastMouseEvent=l;const s=this._positionFromMouseEvent(l,this._element,this._mouseService);if(!s)return;this._isMouseOut=!1;const o=l.composedPath();for(let f=0;f<o.length;f++){const w=o[f];if(w.classList.contains("xterm"))break;if(w.classList.contains("xterm-hover"))return}this._lastBufferCell&&s.x===this._lastBufferCell.x&&s.y===this._lastBufferCell.y||(this._handleHover(s),this._lastBufferCell=s)}_handleHover(l){if(this._activeLine!==l.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(l,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,l)||(this._clearCurrentLink(),this._askForLink(l,!0))}_askForLink(l,s){var f,w;this._activeProviderReplies&&s||((f=this._activeProviderReplies)==null||f.forEach((y=>{y==null||y.forEach((E=>{E.link.dispose&&E.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=l.y);let o=!1;for(const[y,E]of this._linkProviderService.linkProviders.entries())s?(w=this._activeProviderReplies)!=null&&w.get(y)&&(o=this._checkLinkProviderResult(y,l,o)):E.provideLinks(l.y,(g=>{var B,O;if(this._isMouseOut)return;const R=g==null?void 0:g.map((j=>({link:j})));(B=this._activeProviderReplies)==null||B.set(y,R),o=this._checkLinkProviderResult(y,l,o),((O=this._activeProviderReplies)==null?void 0:O.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(l.y,this._activeProviderReplies)}))}_removeIntersectingLinks(l,s){const o=new Set;for(let f=0;f<s.size;f++){const w=s.get(f);if(w)for(let y=0;y<w.length;y++){const E=w[y],g=E.link.range.start.y<l?0:E.link.range.start.x,R=E.link.range.end.y>l?this._bufferService.cols:E.link.range.end.x;for(let B=g;B<=R;B++){if(o.has(B)){w.splice(y--,1);break}o.add(B)}}}}_checkLinkProviderResult(l,s,o){var y;if(!this._activeProviderReplies)return o;const f=this._activeProviderReplies.get(l);let w=!1;for(let E=0;E<l;E++)this._activeProviderReplies.has(E)&&!this._activeProviderReplies.get(E)||(w=!0);if(!w&&f){const E=f.find((g=>this._linkAtPosition(g.link,s)));E&&(o=!0,this._handleNewLink(E))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!o)for(let E=0;E<this._activeProviderReplies.size;E++){const g=(y=this._activeProviderReplies.get(E))==null?void 0:y.find((R=>this._linkAtPosition(R.link,s)));if(g){o=!0,this._handleNewLink(g);break}}return o}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(l){if(!this._currentLink)return;const s=this._positionFromMouseEvent(l,this._element,this._mouseService);s&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,s)&&this._currentLink.link.activate(l,this._currentLink.link.text)}_clearCurrentLink(l,s){this._currentLink&&this._lastMouseEvent&&(!l||!s||this._currentLink.link.range.start.y>=l&&this._currentLink.link.range.end.y<=s)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,S.disposeArray)(this._linkCacheDisposables))}_handleNewLink(l){if(!this._lastMouseEvent)return;const s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(l.link,s)&&(this._currentLink=l,this._currentLink.state={decorations:{underline:l.link.decorations===void 0||l.link.decorations.underline,pointerCursor:l.link.decorations===void 0||l.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,l.link,this._lastMouseEvent),l.link.decorations={},Object.defineProperties(l.link.decorations,{pointerCursor:{get:()=>{var o,f;return(f=(o=this._currentLink)==null?void 0:o.state)==null?void 0:f.decorations.pointerCursor},set:o=>{var f;(f=this._currentLink)!=null&&f.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,f;return(f=(o=this._currentLink)==null?void 0:o.state)==null?void 0:f.decorations.underline},set:o=>{var f,w,y;(f=this._currentLink)!=null&&f.state&&((y=(w=this._currentLink)==null?void 0:w.state)==null?void 0:y.decorations.underline)!==o&&(this._currentLink.state.decorations.underline=o,this._currentLink.state.isHovered&&this._fireUnderlineEvent(l.link,o))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((o=>{if(!this._currentLink)return;const f=o.start===0?0:o.start+1+this._bufferService.buffer.ydisp,w=this._bufferService.buffer.ydisp+1+o.end;if(this._currentLink.link.range.start.y>=f&&this._currentLink.link.range.end.y<=w&&(this._clearCurrentLink(f,w),this._lastMouseEvent)){const y=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);y&&this._askForLink(y,!1)}}))))}_linkHover(l,s,o){var f;(f=this._currentLink)!=null&&f.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!0),this._currentLink.state.decorations.pointerCursor&&l.classList.add("xterm-cursor-pointer")),s.hover&&s.hover(o,s.text)}_fireUnderlineEvent(l,s){const o=l.range,f=this._bufferService.buffer.ydisp,w=this._createLinkUnderlineEvent(o.start.x-1,o.start.y-f-1,o.end.x,o.end.y-f-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(w)}_linkLeave(l,s,o){var f;(f=this._currentLink)!=null&&f.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!1),this._currentLink.state.decorations.pointerCursor&&l.classList.remove("xterm-cursor-pointer")),s.leave&&s.leave(o,s.text)}_linkAtPosition(l,s){const o=l.range.start.y*this._bufferService.cols+l.range.start.x,f=l.range.end.y*this._bufferService.cols+l.range.end.x,w=s.y*this._bufferService.cols+s.x;return o<=w&&w<=f}_positionFromMouseEvent(l,s,o){const f=o.getCoords(l,s,this._bufferService.cols,this._bufferService.rows);if(f)return{x:f[0],y:f[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(l,s,o,f,w){return{x1:l,y1:s,x2:o,y2:f,cols:this._bufferService.cols,fg:w}}};c.Linkifier=n=p([m(1,_.IMouseService),m(2,_.IRenderService),m(3,x.IBufferService),m(4,_.ILinkProviderService)],n)},9042:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.tooMuchOutput=c.promptLabel=void 0,c.promptLabel="Terminal input",c.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(K,c,h){var p=this&&this.__decorate||function(_,n,l,s){var o,f=arguments.length,w=f<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,l):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(_,n,l,s);else for(var y=_.length-1;y>=0;y--)(o=_[y])&&(w=(f<3?o(w):f>3?o(n,l,w):o(n,l))||w);return f>3&&w&&Object.defineProperty(n,l,w),w},m=this&&this.__param||function(_,n){return function(l,s){n(l,s,_)}};Object.defineProperty(c,"__esModule",{value:!0}),c.OscLinkProvider=void 0;const u=h(511),v=h(2585);let S=c.OscLinkProvider=class{constructor(_,n,l){this._bufferService=_,this._optionsService=n,this._oscLinkService=l}provideLinks(_,n){var R;const l=this._bufferService.buffer.lines.get(_-1);if(!l)return void n(void 0);const s=[],o=this._optionsService.rawOptions.linkHandler,f=new u.CellData,w=l.getTrimmedLength();let y=-1,E=-1,g=!1;for(let B=0;B<w;B++)if(E!==-1||l.hasContent(B)){if(l.loadCell(B,f),f.hasExtendedAttrs()&&f.extended.urlId){if(E===-1){E=B,y=f.extended.urlId;continue}g=f.extended.urlId!==y}else E!==-1&&(g=!0);if(g||E!==-1&&B===w-1){const O=(R=this._oscLinkService.getLinkData(y))==null?void 0:R.uri;if(O){const j={start:{x:E+1,y:_},end:{x:B+(g||B!==w-1?0:1),y:_}};let A=!1;if(!(o!=null&&o.allowNonHttpProtocols))try{const G=new URL(O);["http:","https:"].includes(G.protocol)||(A=!0)}catch{A=!0}A||s.push({text:O,range:j,activate:(G,J)=>o?o.activate(G,J,j):x(0,J),hover:(G,J)=>{var se;return(se=o==null?void 0:o.hover)==null?void 0:se.call(o,G,J,j)},leave:(G,J)=>{var se;return(se=o==null?void 0:o.leave)==null?void 0:se.call(o,G,J,j)}})}g=!1,f.hasExtendedAttrs()&&f.extended.urlId?(E=B,y=f.extended.urlId):(E=-1,y=-1)}}n(s)}};function x(_,n){if(confirm(`Do you want to navigate to ${n}?
43
+
44
+ WARNING: This link could potentially be dangerous`)){const l=window.open();if(l){try{l.opener=null}catch{}l.location.href=n}else console.warn("Opening link blocked as opener could not be cleared")}}c.OscLinkProvider=S=p([m(0,v.IBufferService),m(1,v.IOptionsService),m(2,v.IOscLinkService)],S)},6193:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.RenderDebouncer=void 0,c.RenderDebouncer=class{constructor(h,p){this._renderCallback=h,this._coreBrowserService=p,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(h){return this._refreshCallbacks.push(h),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(h,p,m){this._rowCount=m,h=h!==void 0?h:0,p=p!==void 0?p:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,p):p,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 h=Math.max(this._rowStart,0),p=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(h,p),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const h of this._refreshCallbacks)h(0);this._refreshCallbacks=[]}}},3236:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Terminal=void 0;const p=h(3614),m=h(3656),u=h(3551),v=h(9042),S=h(3730),x=h(1680),_=h(3107),n=h(5744),l=h(2950),s=h(1296),o=h(428),f=h(4269),w=h(5114),y=h(8934),E=h(3230),g=h(9312),R=h(4725),B=h(6731),O=h(8055),j=h(8969),A=h(8460),G=h(844),J=h(6114),se=h(8437),le=h(2584),N=h(7399),C=h(5941),D=h(9074),b=h(2585),T=h(5435),Q=h(4567),te=h(779);class ce extends j.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(H={}){super(H),this.browser=J,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new G.MutableDisposable),this._onCursorMove=this.register(new A.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new A.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new A.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new A.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new A.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new A.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new A.EventEmitter),this._onBlur=this.register(new A.EventEmitter),this._onA11yCharEmitter=this.register(new A.EventEmitter),this._onA11yTabEmitter=this.register(new A.EventEmitter),this._onWillOpen=this.register(new A.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(D.DecorationService),this._instantiationService.setService(b.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(te.LinkProviderService),this._instantiationService.setService(R.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(S.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((L,Y)=>this.refresh(L,Y)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((L=>this._reportWindowsOptions(L)))),this.register(this._inputHandler.onColor((L=>this._handleColorEvent(L)))),this.register((0,A.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,A.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,A.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,A.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((L=>this._afterResize(L.cols,L.rows)))),this.register((0,G.toDisposable)((()=>{var L,Y;this._customKeyEventHandler=void 0,(Y=(L=this.element)==null?void 0:L.parentNode)==null||Y.removeChild(this.element)})))}_handleColorEvent(H){if(this._themeService)for(const L of H){let Y,X="";switch(L.index){case 256:Y="foreground",X="10";break;case 257:Y="background",X="11";break;case 258:Y="cursor",X="12";break;default:Y="ansi",X="4;"+L.index}switch(L.type){case 0:const de=O.color.toColorRGB(Y==="ansi"?this._themeService.colors.ansi[L.index]:this._themeService.colors[Y]);this.coreService.triggerDataEvent(`${le.C0.ESC}]${X};${(0,C.toRgbString)(de)}${le.C1_ESCAPED.ST}`);break;case 1:if(Y==="ansi")this._themeService.modifyColors((he=>he.ansi[L.index]=O.channels.toColor(...L.color)));else{const he=Y;this._themeService.modifyColors((xe=>xe[he]=O.channels.toColor(...L.color)))}break;case 2:this._themeService.restoreColor(L.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(H){H?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(Q.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(H){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(le.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var H;return(H=this.textarea)==null?void 0:H.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(le.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 H=this.buffer.ybase+this.buffer.y,L=this.buffer.lines.get(H);if(!L)return;const Y=Math.min(this.buffer.x,this.cols-1),X=this._renderService.dimensions.css.cell.height,de=L.getWidth(Y),he=this._renderService.dimensions.css.cell.width*de,xe=this.buffer.y*this._renderService.dimensions.css.cell.height,Le=Y*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Le+"px",this.textarea.style.top=xe+"px",this.textarea.style.width=he+"px",this.textarea.style.height=X+"px",this.textarea.style.lineHeight=X+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,m.addDisposableDomListener)(this.element,"copy",(L=>{this.hasSelection()&&(0,p.copyHandler)(L,this._selectionService)})));const H=L=>(0,p.handlePasteEvent)(L,this.textarea,this.coreService,this.optionsService);this.register((0,m.addDisposableDomListener)(this.textarea,"paste",H)),this.register((0,m.addDisposableDomListener)(this.element,"paste",H)),J.isFirefox?this.register((0,m.addDisposableDomListener)(this.element,"mousedown",(L=>{L.button===2&&(0,p.rightClickHandler)(L,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,m.addDisposableDomListener)(this.element,"contextmenu",(L=>{(0,p.rightClickHandler)(L,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),J.isLinux&&this.register((0,m.addDisposableDomListener)(this.element,"auxclick",(L=>{L.button===1&&(0,p.moveTextAreaUnderMouseCursor)(L,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,m.addDisposableDomListener)(this.textarea,"keyup",(H=>this._keyUp(H)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keydown",(H=>this._keyDown(H)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keypress",(H=>this._keyPress(H)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionupdate",(H=>this._compositionHelper.compositionupdate(H)))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,m.addDisposableDomListener)(this.textarea,"input",(H=>this._inputEvent(H)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(H){var Y;if(!H)throw new Error("Terminal requires a parent element.");if(H.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((Y=this.element)==null?void 0:Y.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=H.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"),H.appendChild(this.element);const L=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),L.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,m.addDisposableDomListener)(this.screenElement,"mousemove",(X=>this.updateCursorStyle(X)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),L.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",v.promptLabel),J.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(w.CoreBrowserService,this.textarea,H.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(R.ICoreBrowserService,this._coreBrowserService),this.register((0,m.addDisposableDomListener)(this.textarea,"focus",(X=>this._handleTextAreaFocus(X)))),this.register((0,m.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(R.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(B.ThemeService),this._instantiationService.setService(R.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(f.CharacterJoinerService),this._instantiationService.setService(R.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(E.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(R.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((X=>this._onRender.fire(X)))),this.onResize((X=>this._renderService.resize(X.cols,X.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(l.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(y.MouseService),this._instantiationService.setService(R.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(u.Linkifier,this.screenElement)),this.element.appendChild(L);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(x.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((X=>this.scrollLines(X.amount,X.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(g.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(R.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((X=>this.scrollLines(X.amount,X.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((X=>this._renderService.handleSelectionChanged(X.start,X.end,X.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((X=>{this.textarea.value=X,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((X=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,m.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(_.BufferDecorationRenderer,this.screenElement)),this.register((0,m.addDisposableDomListener)(this.element,"mousedown",(X=>this._selectionService.handleMouseDown(X)))),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(Q.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(X=>this._handleScreenReaderModeOptionChange(X)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(n.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(X=>{!this._overviewRulerRenderer&&X&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(n.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(s.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const H=this,L=this.element;function Y(he){const xe=H._mouseService.getMouseReportCoords(he,H.screenElement);if(!xe)return!1;let Le,Te;switch(he.overrideType||he.type){case"mousemove":Te=32,he.buttons===void 0?(Le=3,he.button!==void 0&&(Le=he.button<3?he.button:3)):Le=1&he.buttons?0:4&he.buttons?1:2&he.buttons?2:3;break;case"mouseup":Te=0,Le=he.button<3?he.button:3;break;case"mousedown":Te=1,Le=he.button<3?he.button:3;break;case"wheel":if(H._customWheelEventHandler&&H._customWheelEventHandler(he)===!1||H.viewport.getLinesScrolled(he)===0)return!1;Te=he.deltaY<0?0:1,Le=4;break;default:return!1}return!(Te===void 0||Le===void 0||Le>4)&&H.coreMouseService.triggerMouseEvent({col:xe.col,row:xe.row,x:xe.x,y:xe.y,button:Le,action:Te,ctrl:he.ctrlKey,alt:he.altKey,shift:he.shiftKey})}const X={mouseup:null,wheel:null,mousedrag:null,mousemove:null},de={mouseup:he=>(Y(he),he.buttons||(this._document.removeEventListener("mouseup",X.mouseup),X.mousedrag&&this._document.removeEventListener("mousemove",X.mousedrag)),this.cancel(he)),wheel:he=>(Y(he),this.cancel(he,!0)),mousedrag:he=>{he.buttons&&Y(he)},mousemove:he=>{he.buttons||Y(he)}};this.register(this.coreMouseService.onProtocolChange((he=>{he?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(he)),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&he?X.mousemove||(L.addEventListener("mousemove",de.mousemove),X.mousemove=de.mousemove):(L.removeEventListener("mousemove",X.mousemove),X.mousemove=null),16&he?X.wheel||(L.addEventListener("wheel",de.wheel,{passive:!1}),X.wheel=de.wheel):(L.removeEventListener("wheel",X.wheel),X.wheel=null),2&he?X.mouseup||(X.mouseup=de.mouseup):(this._document.removeEventListener("mouseup",X.mouseup),X.mouseup=null),4&he?X.mousedrag||(X.mousedrag=de.mousedrag):(this._document.removeEventListener("mousemove",X.mousedrag),X.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,m.addDisposableDomListener)(L,"mousedown",(he=>{if(he.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(he))return Y(he),X.mouseup&&this._document.addEventListener("mouseup",X.mouseup),X.mousedrag&&this._document.addEventListener("mousemove",X.mousedrag),this.cancel(he)}))),this.register((0,m.addDisposableDomListener)(L,"wheel",(he=>{if(!X.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(he)===!1)return!1;if(!this.buffer.hasScrollback){const xe=this.viewport.getLinesScrolled(he);if(xe===0)return;const Le=le.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(he.deltaY<0?"A":"B");let Te="";for(let Ke=0;Ke<Math.abs(xe);Ke++)Te+=Le;return this.coreService.triggerDataEvent(Te,!0),this.cancel(he,!0)}return this.viewport.handleWheel(he)?this.cancel(he):void 0}}),{passive:!1})),this.register((0,m.addDisposableDomListener)(L,"touchstart",(he=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(he),this.cancel(he)}),{passive:!0})),this.register((0,m.addDisposableDomListener)(L,"touchmove",(he=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(he)?void 0:this.cancel(he)}),{passive:!1}))}refresh(H,L){var Y;(Y=this._renderService)==null||Y.refreshRows(H,L)}updateCursorStyle(H){var L;(L=this._selectionService)!=null&&L.shouldColumnSelect(H)?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(H,L,Y=0){var X;Y===1?(super.scrollLines(H,L,Y),this.refresh(0,this.rows-1)):(X=this.viewport)==null||X.scrollLines(H)}paste(H){(0,p.paste)(H,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(H){this._customKeyEventHandler=H}attachCustomWheelEventHandler(H){this._customWheelEventHandler=H}registerLinkProvider(H){return this._linkProviderService.registerLinkProvider(H)}registerCharacterJoiner(H){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const L=this._characterJoinerService.register(H);return this.refresh(0,this.rows-1),L}deregisterCharacterJoiner(H){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(H)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(H){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+H)}registerDecoration(H){return this._decorationService.registerDecoration(H)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(H,L,Y){this._selectionService.setSelection(H,L,Y)}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 H;(H=this._selectionService)==null||H.clearSelection()}selectAll(){var H;(H=this._selectionService)==null||H.selectAll()}selectLines(H,L){var Y;(Y=this._selectionService)==null||Y.selectLines(H,L)}_keyDown(H){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(H)===!1)return!1;const L=this.browser.isMac&&this.options.macOptionIsMeta&&H.altKey;if(!L&&!this._compositionHelper.keydown(H))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;L||H.key!=="Dead"&&H.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const Y=(0,N.evaluateKeyboardEvent)(H,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(H),Y.type===3||Y.type===2){const X=this.rows-1;return this.scrollLines(Y.type===2?-X:X),this.cancel(H,!0)}return Y.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,H)||(Y.cancel&&this.cancel(H,!0),!Y.key||!!(H.key&&!H.ctrlKey&&!H.altKey&&!H.metaKey&&H.key.length===1&&H.key.charCodeAt(0)>=65&&H.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(Y.key!==le.C0.ETX&&Y.key!==le.C0.CR||(this.textarea.value=""),this._onKey.fire({key:Y.key,domEvent:H}),this._showCursor(),this.coreService.triggerDataEvent(Y.key,!0),!this.optionsService.rawOptions.screenReaderMode||H.altKey||H.ctrlKey?this.cancel(H,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(H,L){const Y=H.isMac&&!this.options.macOptionIsMeta&&L.altKey&&!L.ctrlKey&&!L.metaKey||H.isWindows&&L.altKey&&L.ctrlKey&&!L.metaKey||H.isWindows&&L.getModifierState("AltGraph");return L.type==="keypress"?Y:Y&&(!L.keyCode||L.keyCode>47)}_keyUp(H){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(H)===!1||((function(L){return L.keyCode===16||L.keyCode===17||L.keyCode===18})(H)||this.focus(),this.updateCursorStyle(H),this._keyPressHandled=!1)}_keyPress(H){let L;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(H)===!1)return!1;if(this.cancel(H),H.charCode)L=H.charCode;else if(H.which===null||H.which===void 0)L=H.keyCode;else{if(H.which===0||H.charCode===0)return!1;L=H.which}return!(!L||(H.altKey||H.ctrlKey||H.metaKey)&&!this._isThirdLevelShift(this.browser,H)||(L=String.fromCharCode(L),this._onKey.fire({key:L,domEvent:H}),this._showCursor(),this.coreService.triggerDataEvent(L,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(H){if(H.data&&H.inputType==="insertText"&&(!H.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const L=H.data;return this.coreService.triggerDataEvent(L,!0),this.cancel(H),!0}return!1}resize(H,L){H!==this.cols||L!==this.rows?super.resize(H,L):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(H,L){var Y,X;(Y=this._charSizeService)==null||Y.measure(),(X=this.viewport)==null||X.syncScrollArea(!0)}clear(){var H;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 L=1;L<this.rows;L++)this.buffer.lines.push(this.buffer.getBlankLine(se.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(H=this.viewport)==null||H.reset(),this.refresh(0,this.rows-1)}}reset(){var L,Y;this.options.rows=this.rows,this.options.cols=this.cols;const H=this._customKeyEventHandler;this._setup(),super.reset(),(L=this._selectionService)==null||L.reset(),this._decorationService.reset(),(Y=this.viewport)==null||Y.reset(),this._customKeyEventHandler=H,this.refresh(0,this.rows-1)}clearTextureAtlas(){var H;(H=this._renderService)==null||H.clearTextureAtlas()}_reportFocus(){var H;(H=this.element)!=null&&H.classList.contains("focus")?this.coreService.triggerDataEvent(le.C0.ESC+"[I"):this.coreService.triggerDataEvent(le.C0.ESC+"[O")}_reportWindowsOptions(H){if(this._renderService)switch(H){case T.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const L=this._renderService.dimensions.css.canvas.width.toFixed(0),Y=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${le.C0.ESC}[4;${Y};${L}t`);break;case T.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const X=this._renderService.dimensions.css.cell.width.toFixed(0),de=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${le.C0.ESC}[6;${de};${X}t`)}}cancel(H,L){if(this.options.cancelEvents||L)return H.preventDefault(),H.stopPropagation(),!1}}c.Terminal=ce},9924:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.TimeBasedDebouncer=void 0,c.TimeBasedDebouncer=class{constructor(h,p=1e3){this._renderCallback=h,this._debounceThresholdMS=p,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(h,p,m){this._rowCount=m,h=h!==void 0?h:0,p=p!==void 0?p:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,p):p;const u=Date.now();if(u-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=u,this._innerRefresh();else if(!this._additionalRefreshRequested){const v=u-this._lastRefreshMs,S=this._debounceThresholdMS-v;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),S)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const h=Math.max(this._rowStart,0),p=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(h,p)}}},1680:function(K,c,h){var p=this&&this.__decorate||function(l,s,o,f){var w,y=arguments.length,E=y<3?s:f===null?f=Object.getOwnPropertyDescriptor(s,o):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(l,s,o,f);else for(var g=l.length-1;g>=0;g--)(w=l[g])&&(E=(y<3?w(E):y>3?w(s,o,E):w(s,o))||E);return y>3&&E&&Object.defineProperty(s,o,E),E},m=this&&this.__param||function(l,s){return function(o,f){s(o,f,l)}};Object.defineProperty(c,"__esModule",{value:!0}),c.Viewport=void 0;const u=h(3656),v=h(4725),S=h(8460),x=h(844),_=h(2585);let n=c.Viewport=class extends x.Disposable{constructor(l,s,o,f,w,y,E,g){super(),this._viewportElement=l,this._scrollArea=s,this._bufferService=o,this._optionsService=f,this._charSizeService=w,this._renderService=y,this._coreBrowserService=E,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new S.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,u.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((R=>this._activeBuffer=R.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((R=>this._renderDimensions=R))),this._handleThemeChange(g.colors),this.register(g.onChangeColors((R=>this._handleThemeChange(R)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(l){this._viewportElement.style.backgroundColor=l.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(l){if(l)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 s=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==s&&(this._lastRecordedBufferHeight=s,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const l=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==l&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=l),this._refreshAnimationFrame=null}syncScrollArea(l=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(l);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(l)}_handleScroll(l){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 s=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:s,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const l=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(l*(this._smoothScrollState.target-this._smoothScrollState.origin)),l<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(l,s){const o=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(s<0&&this._viewportElement.scrollTop!==0||s>0&&o<this._lastRecordedBufferHeight)||(l.cancelable&&l.preventDefault(),!1)}handleWheel(l){const s=this._getPixelsScrolled(l);return s!==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+s:this._smoothScrollState.target+=s,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=s,this._bubbleScroll(l,s))}scrollLines(l){if(l!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const s=l*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+s,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:l,suppressScrollEvent:!1})}_getPixelsScrolled(l){if(l.deltaY===0||l.shiftKey)return 0;let s=this._applyScrollModifier(l.deltaY,l);return l.deltaMode===WheelEvent.DOM_DELTA_LINE?s*=this._currentRowHeight:l.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(s*=this._currentRowHeight*this._bufferService.rows),s}getBufferElements(l,s){var g;let o,f="";const w=[],y=s??this._bufferService.buffer.lines.length,E=this._bufferService.buffer.lines;for(let R=l;R<y;R++){const B=E.get(R);if(!B)continue;const O=(g=E.get(R+1))==null?void 0:g.isWrapped;if(f+=B.translateToString(!O),!O||R===E.length-1){const j=document.createElement("div");j.textContent=f,w.push(j),f.length>0&&(o=j),f=""}}return{bufferElements:w,cursorElement:o}}getLinesScrolled(l){if(l.deltaY===0||l.shiftKey)return 0;let s=this._applyScrollModifier(l.deltaY,l);return l.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(s/=this._currentRowHeight+0,this._wheelPartialScroll+=s,s=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):l.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(s*=this._bufferService.rows),s}_applyScrollModifier(l,s){const o=this._optionsService.rawOptions.fastScrollModifier;return o==="alt"&&s.altKey||o==="ctrl"&&s.ctrlKey||o==="shift"&&s.shiftKey?l*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:l*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(l){this._lastTouchY=l.touches[0].pageY}handleTouchMove(l){const s=this._lastTouchY-l.touches[0].pageY;return this._lastTouchY=l.touches[0].pageY,s!==0&&(this._viewportElement.scrollTop+=s,this._bubbleScroll(l,s))}};c.Viewport=n=p([m(2,_.IBufferService),m(3,_.IOptionsService),m(4,v.ICharSizeService),m(5,v.IRenderService),m(6,v.ICoreBrowserService),m(7,v.IThemeService)],n)},3107:function(K,c,h){var p=this&&this.__decorate||function(_,n,l,s){var o,f=arguments.length,w=f<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,l):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(_,n,l,s);else for(var y=_.length-1;y>=0;y--)(o=_[y])&&(w=(f<3?o(w):f>3?o(n,l,w):o(n,l))||w);return f>3&&w&&Object.defineProperty(n,l,w),w},m=this&&this.__param||function(_,n){return function(l,s){n(l,s,_)}};Object.defineProperty(c,"__esModule",{value:!0}),c.BufferDecorationRenderer=void 0;const u=h(4725),v=h(844),S=h(2585);let x=c.BufferDecorationRenderer=class extends v.Disposable{constructor(_,n,l,s,o){super(),this._screenElement=_,this._bufferService=n,this._coreBrowserService=l,this._decorationService=s,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((f=>this._removeDecoration(f)))),this.register((0,v.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 _ of this._decorationService.decorations)this._renderDecoration(_);this._dimensionsChanged=!1}_renderDecoration(_){this._refreshStyle(_),this._dimensionsChanged&&this._refreshXPosition(_)}_createElement(_){var s;const n=this._coreBrowserService.mainDocument.createElement("div");n.classList.add("xterm-decoration"),n.classList.toggle("xterm-decoration-top-layer",((s=_==null?void 0:_.options)==null?void 0:s.layer)==="top"),n.style.width=`${Math.round((_.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,n.style.height=(_.options.height||1)*this._renderService.dimensions.css.cell.height+"px",n.style.top=(_.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",n.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const l=_.options.x??0;return l&&l>this._bufferService.cols&&(n.style.display="none"),this._refreshXPosition(_,n),n}_refreshStyle(_){const n=_.marker.line-this._bufferService.buffers.active.ydisp;if(n<0||n>=this._bufferService.rows)_.element&&(_.element.style.display="none",_.onRenderEmitter.fire(_.element));else{let l=this._decorationElements.get(_);l||(l=this._createElement(_),_.element=l,this._decorationElements.set(_,l),this._container.appendChild(l),_.onDispose((()=>{this._decorationElements.delete(_),l.remove()}))),l.style.top=n*this._renderService.dimensions.css.cell.height+"px",l.style.display=this._altBufferIsActive?"none":"block",_.onRenderEmitter.fire(l)}}_refreshXPosition(_,n=_.element){if(!n)return;const l=_.options.x??0;(_.options.anchor||"left")==="right"?n.style.right=l?l*this._renderService.dimensions.css.cell.width+"px":"":n.style.left=l?l*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(_){var n;(n=this._decorationElements.get(_))==null||n.remove(),this._decorationElements.delete(_),_.dispose()}};c.BufferDecorationRenderer=x=p([m(1,S.IBufferService),m(2,u.ICoreBrowserService),m(3,S.IDecorationService),m(4,u.IRenderService)],x)},5871:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ColorZoneStore=void 0,c.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(h){if(h.options.overviewRulerOptions){for(const p of this._zones)if(p.color===h.options.overviewRulerOptions.color&&p.position===h.options.overviewRulerOptions.position){if(this._lineIntersectsZone(p,h.marker.line))return;if(this._lineAdjacentToZone(p,h.marker.line,h.options.overviewRulerOptions.position))return void this._addLineToZone(p,h.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=h.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=h.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=h.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=h.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:h.options.overviewRulerOptions.color,position:h.options.overviewRulerOptions.position,startBufferLine:h.marker.line,endBufferLine:h.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(h){this._linePadding=h}_lineIntersectsZone(h,p){return p>=h.startBufferLine&&p<=h.endBufferLine}_lineAdjacentToZone(h,p,m){return p>=h.startBufferLine-this._linePadding[m||"full"]&&p<=h.endBufferLine+this._linePadding[m||"full"]}_addLineToZone(h,p){h.startBufferLine=Math.min(h.startBufferLine,p),h.endBufferLine=Math.max(h.endBufferLine,p)}}},5744:function(K,c,h){var p=this&&this.__decorate||function(o,f,w,y){var E,g=arguments.length,R=g<3?f:y===null?y=Object.getOwnPropertyDescriptor(f,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(o,f,w,y);else for(var B=o.length-1;B>=0;B--)(E=o[B])&&(R=(g<3?E(R):g>3?E(f,w,R):E(f,w))||R);return g>3&&R&&Object.defineProperty(f,w,R),R},m=this&&this.__param||function(o,f){return function(w,y){f(w,y,o)}};Object.defineProperty(c,"__esModule",{value:!0}),c.OverviewRulerRenderer=void 0;const u=h(5871),v=h(4725),S=h(844),x=h(2585),_={full:0,left:0,center:0,right:0},n={full:0,left:0,center:0,right:0},l={full:0,left:0,center:0,right:0};let s=c.OverviewRulerRenderer=class extends S.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(o,f,w,y,E,g,R){var O;super(),this._viewportElement=o,this._screenElement=f,this._bufferService=w,this._decorationService=y,this._renderService=E,this._optionsService=g,this._coreBrowserService=R,this._colorZoneStore=new u.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(O=this._viewportElement.parentElement)==null||O.insertBefore(this._canvas,this._viewportElement);const B=this._canvas.getContext("2d");if(!B)throw new Error("Ctx cannot be null");this._ctx=B,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,S.toDisposable)((()=>{var j;(j=this._canvas)==null||j.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),f=Math.ceil(this._canvas.width/3);n.full=this._canvas.width,n.left=o,n.center=f,n.right=o,this._refreshDrawHeightConstants(),l.full=0,l.left=0,l.center=n.left,l.right=n.left+n.center}_refreshDrawHeightConstants(){_.full=Math.round(2*this._coreBrowserService.dpr);const o=this._canvas.height/this._bufferService.buffer.lines.length,f=Math.round(Math.max(Math.min(o,12),6)*this._coreBrowserService.dpr);_.left=f,_.center=f,_.right=f}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.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 f of this._decorationService.decorations)this._colorZoneStore.addDecoration(f);this._ctx.lineWidth=1;const o=this._colorZoneStore.zones;for(const f of o)f.position!=="full"&&this._renderColorZone(f);for(const f of o)f.position==="full"&&this._renderColorZone(f);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(o){this._ctx.fillStyle=o.color,this._ctx.fillRect(l[o.position||"full"],Math.round((this._canvas.height-1)*(o.startBufferLine/this._bufferService.buffers.active.lines.length)-_[o.position||"full"]/2),n[o.position||"full"],Math.round((this._canvas.height-1)*((o.endBufferLine-o.startBufferLine)/this._bufferService.buffers.active.lines.length)+_[o.position||"full"]))}_queueRefresh(o,f){this._shouldUpdateDimensions=o||this._shouldUpdateDimensions,this._shouldUpdateAnchor=f||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};c.OverviewRulerRenderer=s=p([m(2,x.IBufferService),m(3,x.IDecorationService),m(4,v.IRenderService),m(5,x.IOptionsService),m(6,v.ICoreBrowserService)],s)},2950:function(K,c,h){var p=this&&this.__decorate||function(_,n,l,s){var o,f=arguments.length,w=f<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,l):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(_,n,l,s);else for(var y=_.length-1;y>=0;y--)(o=_[y])&&(w=(f<3?o(w):f>3?o(n,l,w):o(n,l))||w);return f>3&&w&&Object.defineProperty(n,l,w),w},m=this&&this.__param||function(_,n){return function(l,s){n(l,s,_)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CompositionHelper=void 0;const u=h(4725),v=h(2585),S=h(2584);let x=c.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(_,n,l,s,o,f){this._textarea=_,this._compositionView=n,this._bufferService=l,this._optionsService=s,this._coreService=o,this._renderService=f,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(_){this._compositionView.textContent=_.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(_){if(this._isComposing||this._isSendingComposition){if(_.keyCode===229||_.keyCode===16||_.keyCode===17||_.keyCode===18)return!1;this._finalizeComposition(!1)}return _.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(_){if(this._compositionView.classList.remove("active"),this._isComposing=!1,_){const n={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let l;this._isSendingComposition=!1,n.start+=this._dataAlreadySent.length,l=this._isComposing?this._textarea.value.substring(n.start,n.end):this._textarea.value.substring(n.start),l.length>0&&this._coreService.triggerDataEvent(l,!0)}}),0)}else{this._isSendingComposition=!1;const n=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(n,!0)}}_handleAnyTextareaChanges(){const _=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const n=this._textarea.value,l=n.replace(_,"");this._dataAlreadySent=l,n.length>_.length?this._coreService.triggerDataEvent(l,!0):n.length<_.length?this._coreService.triggerDataEvent(`${S.C0.DEL}`,!0):n.length===_.length&&n!==_&&this._coreService.triggerDataEvent(n,!0)}}),0)}updateCompositionElements(_){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const n=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),l=this._renderService.dimensions.css.cell.height,s=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,o=n*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=o+"px",this._compositionView.style.top=s+"px",this._compositionView.style.height=l+"px",this._compositionView.style.lineHeight=l+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const f=this._compositionView.getBoundingClientRect();this._textarea.style.left=o+"px",this._textarea.style.top=s+"px",this._textarea.style.width=Math.max(f.width,1)+"px",this._textarea.style.height=Math.max(f.height,1)+"px",this._textarea.style.lineHeight=f.height+"px"}_||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};c.CompositionHelper=x=p([m(2,v.IBufferService),m(3,v.IOptionsService),m(4,v.ICoreService),m(5,u.IRenderService)],x)},9806:(K,c)=>{function h(p,m,u){const v=u.getBoundingClientRect(),S=p.getComputedStyle(u),x=parseInt(S.getPropertyValue("padding-left")),_=parseInt(S.getPropertyValue("padding-top"));return[m.clientX-v.left-x,m.clientY-v.top-_]}Object.defineProperty(c,"__esModule",{value:!0}),c.getCoords=c.getCoordsRelativeToElement=void 0,c.getCoordsRelativeToElement=h,c.getCoords=function(p,m,u,v,S,x,_,n,l){if(!x)return;const s=h(p,m,u);return s?(s[0]=Math.ceil((s[0]+(l?_/2:0))/_),s[1]=Math.ceil(s[1]/n),s[0]=Math.min(Math.max(s[0],1),v+(l?1:0)),s[1]=Math.min(Math.max(s[1],1),S),s):void 0}},9504:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.moveToCellSequence=void 0;const p=h(2584);function m(n,l,s,o){const f=n-u(n,s),w=l-u(l,s),y=Math.abs(f-w)-(function(E,g,R){let B=0;const O=E-u(E,R),j=g-u(g,R);for(let A=0;A<Math.abs(O-j);A++){const G=v(E,g)==="A"?-1:1,J=R.buffer.lines.get(O+G*A);J!=null&&J.isWrapped&&B++}return B})(n,l,s);return _(y,x(v(n,l),o))}function u(n,l){let s=0,o=l.buffer.lines.get(n),f=o==null?void 0:o.isWrapped;for(;f&&n>=0&&n<l.rows;)s++,o=l.buffer.lines.get(--n),f=o==null?void 0:o.isWrapped;return s}function v(n,l){return n>l?"A":"B"}function S(n,l,s,o,f,w){let y=n,E=l,g="";for(;y!==s||E!==o;)y+=f?1:-1,f&&y>w.cols-1?(g+=w.buffer.translateBufferLineToString(E,!1,n,y),y=0,n=0,E++):!f&&y<0&&(g+=w.buffer.translateBufferLineToString(E,!1,0,n+1),y=w.cols-1,n=y,E--);return g+w.buffer.translateBufferLineToString(E,!1,n,y)}function x(n,l){const s=l?"O":"[";return p.C0.ESC+s+n}function _(n,l){n=Math.floor(n);let s="";for(let o=0;o<n;o++)s+=l;return s}c.moveToCellSequence=function(n,l,s,o){const f=s.buffer.x,w=s.buffer.y;if(!s.buffer.hasScrollback)return(function(g,R,B,O,j,A){return m(R,O,j,A).length===0?"":_(S(g,R,g,R-u(R,j),!1,j).length,x("D",A))})(f,w,0,l,s,o)+m(w,l,s,o)+(function(g,R,B,O,j,A){let G;G=m(R,O,j,A).length>0?O-u(O,j):R;const J=O,se=(function(le,N,C,D,b,T){let Q;return Q=m(C,D,b,T).length>0?D-u(D,b):N,le<C&&Q<=D||le>=C&&Q<D?"C":"D"})(g,R,B,O,j,A);return _(S(g,G,B,J,se==="C",j).length,x(se,A))})(f,w,n,l,s,o);let y;if(w===l)return y=f>n?"D":"C",_(Math.abs(f-n),x(y,o));y=w>l?"D":"C";const E=Math.abs(w-l);return _((function(g,R){return R.cols-g})(w>l?n:f,s)+(E-1)*s.cols+1+((w>l?f:n)-1),x(y,o))}},1296:function(K,c,h){var p=this&&this.__decorate||function(A,G,J,se){var le,N=arguments.length,C=N<3?G:se===null?se=Object.getOwnPropertyDescriptor(G,J):se;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(A,G,J,se);else for(var D=A.length-1;D>=0;D--)(le=A[D])&&(C=(N<3?le(C):N>3?le(G,J,C):le(G,J))||C);return N>3&&C&&Object.defineProperty(G,J,C),C},m=this&&this.__param||function(A,G){return function(J,se){G(J,se,A)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DomRenderer=void 0;const u=h(3787),v=h(2550),S=h(2223),x=h(6171),_=h(6052),n=h(4725),l=h(8055),s=h(8460),o=h(844),f=h(2585),w="xterm-dom-renderer-owner-",y="xterm-rows",E="xterm-fg-",g="xterm-bg-",R="xterm-focus",B="xterm-selection";let O=1,j=c.DomRenderer=class extends o.Disposable{constructor(A,G,J,se,le,N,C,D,b,T,Q,te,ce){super(),this._terminal=A,this._document=G,this._element=J,this._screenElement=se,this._viewportElement=le,this._helperContainer=N,this._linkifier2=C,this._charSizeService=b,this._optionsService=T,this._bufferService=Q,this._coreBrowserService=te,this._themeService=ce,this._terminalClass=O++,this._rowElements=[],this._selectionRenderModel=(0,_.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new s.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(y),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(B),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,x.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ue=>this._injectCss(ue)))),this._injectCss(this._themeService.colors),this._rowFactory=D.createInstance(u.DomRendererRowFactory,document),this._element.classList.add(w+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ue=>this._handleLinkHover(ue)))),this.register(this._linkifier2.onHideLinkUnderline((ue=>this._handleLinkLeave(ue)))),this.register((0,o.toDisposable)((()=>{this._element.classList.remove(w+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new v.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 A=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*A,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*A),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/A),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/A),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 J of this._rowElements)J.style.width=`${this.dimensions.css.canvas.width}px`,J.style.height=`${this.dimensions.css.cell.height}px`,J.style.lineHeight=`${this.dimensions.css.cell.height}px`,J.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const G=`${this._terminalSelector} .${y} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=G,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(A){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let G=`${this._terminalSelector} .${y} { color: ${A.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;G+=`${this._terminalSelector} .${y} .xterm-dim { color: ${l.color.multiplyOpacity(A.foreground,.5).css};}`,G+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const J=`blink_underline_${this._terminalClass}`,se=`blink_bar_${this._terminalClass}`,le=`blink_block_${this._terminalClass}`;G+=`@keyframes ${J} { 50% { border-bottom-style: hidden; }}`,G+=`@keyframes ${se} { 50% { box-shadow: none; }}`,G+=`@keyframes ${le} { 0% { background-color: ${A.cursor.css}; color: ${A.cursorAccent.css}; } 50% { background-color: inherit; color: ${A.cursor.css}; }}`,G+=`${this._terminalSelector} .${y}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${J} 1s step-end infinite;}${this._terminalSelector} .${y}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${se} 1s step-end infinite;}${this._terminalSelector} .${y}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${le} 1s step-end infinite;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-block { background-color: ${A.cursor.css}; color: ${A.cursorAccent.css};}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${A.cursor.css} !important; color: ${A.cursorAccent.css} !important;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${A.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${A.cursor.css} inset;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${A.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,G+=`${this._terminalSelector} .${B} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${B} div { position: absolute; background-color: ${A.selectionBackgroundOpaque.css};}${this._terminalSelector} .${B} div { position: absolute; background-color: ${A.selectionInactiveBackgroundOpaque.css};}`;for(const[N,C]of A.ansi.entries())G+=`${this._terminalSelector} .${E}${N} { color: ${C.css}; }${this._terminalSelector} .${E}${N}.xterm-dim { color: ${l.color.multiplyOpacity(C,.5).css}; }${this._terminalSelector} .${g}${N} { background-color: ${C.css}; }`;G+=`${this._terminalSelector} .${E}${S.INVERTED_DEFAULT_COLOR} { color: ${l.color.opaque(A.background).css}; }${this._terminalSelector} .${E}${S.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${l.color.multiplyOpacity(l.color.opaque(A.background),.5).css}; }${this._terminalSelector} .${g}${S.INVERTED_DEFAULT_COLOR} { background-color: ${A.foreground.css}; }`,this._themeStyleElement.textContent=G}_setDefaultSpacing(){const A=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${A}px`,this._rowFactory.defaultSpacing=A}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(A,G){for(let J=this._rowElements.length;J<=G;J++){const se=this._document.createElement("div");this._rowContainer.appendChild(se),this._rowElements.push(se)}for(;this._rowElements.length>G;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(A,G){this._refreshRowElements(A,G),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(R),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(R),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(A,G,J){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(A,G,J),this.renderRows(0,this._bufferService.rows-1),!A||!G)return;this._selectionRenderModel.update(this._terminal,A,G,J);const se=this._selectionRenderModel.viewportStartRow,le=this._selectionRenderModel.viewportEndRow,N=this._selectionRenderModel.viewportCappedStartRow,C=this._selectionRenderModel.viewportCappedEndRow;if(N>=this._bufferService.rows||C<0)return;const D=this._document.createDocumentFragment();if(J){const b=A[0]>G[0];D.appendChild(this._createSelectionElement(N,b?G[0]:A[0],b?A[0]:G[0],C-N+1))}else{const b=se===N?A[0]:0,T=N===le?G[0]:this._bufferService.cols;D.appendChild(this._createSelectionElement(N,b,T));const Q=C-N-1;if(D.appendChild(this._createSelectionElement(N+1,0,this._bufferService.cols,Q)),N!==C){const te=le===C?G[0]:this._bufferService.cols;D.appendChild(this._createSelectionElement(C,0,te))}}this._selectionContainer.appendChild(D)}_createSelectionElement(A,G,J,se=1){const le=this._document.createElement("div"),N=G*this.dimensions.css.cell.width;let C=this.dimensions.css.cell.width*(J-G);return N+C>this.dimensions.css.canvas.width&&(C=this.dimensions.css.canvas.width-N),le.style.height=se*this.dimensions.css.cell.height+"px",le.style.top=A*this.dimensions.css.cell.height+"px",le.style.left=`${N}px`,le.style.width=`${C}px`,le}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 A of this._rowElements)A.replaceChildren()}renderRows(A,G){const J=this._bufferService.buffer,se=J.ybase+J.y,le=Math.min(J.x,this._bufferService.cols-1),N=this._optionsService.rawOptions.cursorBlink,C=this._optionsService.rawOptions.cursorStyle,D=this._optionsService.rawOptions.cursorInactiveStyle;for(let b=A;b<=G;b++){const T=b+J.ydisp,Q=this._rowElements[b],te=J.lines.get(T);if(!Q||!te)break;Q.replaceChildren(...this._rowFactory.createRow(te,T,T===se,C,D,le,N,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${w}${this._terminalClass}`}_handleLinkHover(A){this._setCellUnderline(A.x1,A.x2,A.y1,A.y2,A.cols,!0)}_handleLinkLeave(A){this._setCellUnderline(A.x1,A.x2,A.y1,A.y2,A.cols,!1)}_setCellUnderline(A,G,J,se,le,N){J<0&&(A=0),se<0&&(G=0);const C=this._bufferService.rows-1;J=Math.max(Math.min(J,C),0),se=Math.max(Math.min(se,C),0),le=Math.min(le,this._bufferService.cols);const D=this._bufferService.buffer,b=D.ybase+D.y,T=Math.min(D.x,le-1),Q=this._optionsService.rawOptions.cursorBlink,te=this._optionsService.rawOptions.cursorStyle,ce=this._optionsService.rawOptions.cursorInactiveStyle;for(let ue=J;ue<=se;++ue){const H=ue+D.ydisp,L=this._rowElements[ue],Y=D.lines.get(H);if(!L||!Y)break;L.replaceChildren(...this._rowFactory.createRow(Y,H,H===b,te,ce,T,Q,this.dimensions.css.cell.width,this._widthCache,N?ue===J?A:0:-1,N?(ue===se?G:le)-1:-1))}}};c.DomRenderer=j=p([m(7,f.IInstantiationService),m(8,n.ICharSizeService),m(9,f.IOptionsService),m(10,f.IBufferService),m(11,n.ICoreBrowserService),m(12,n.IThemeService)],j)},3787:function(K,c,h){var p=this&&this.__decorate||function(y,E,g,R){var B,O=arguments.length,j=O<3?E:R===null?R=Object.getOwnPropertyDescriptor(E,g):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(y,E,g,R);else for(var A=y.length-1;A>=0;A--)(B=y[A])&&(j=(O<3?B(j):O>3?B(E,g,j):B(E,g))||j);return O>3&&j&&Object.defineProperty(E,g,j),j},m=this&&this.__param||function(y,E){return function(g,R){E(g,R,y)}};Object.defineProperty(c,"__esModule",{value:!0}),c.DomRendererRowFactory=void 0;const u=h(2223),v=h(643),S=h(511),x=h(2585),_=h(8055),n=h(4725),l=h(4269),s=h(6171),o=h(3734);let f=c.DomRendererRowFactory=class{constructor(y,E,g,R,B,O,j){this._document=y,this._characterJoinerService=E,this._optionsService=g,this._coreBrowserService=R,this._coreService=B,this._decorationService=O,this._themeService=j,this._workCell=new S.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(y,E,g){this._selectionStart=y,this._selectionEnd=E,this._columnSelectMode=g}createRow(y,E,g,R,B,O,j,A,G,J,se){const le=[],N=this._characterJoinerService.getJoinedCharacters(E),C=this._themeService.colors;let D,b=y.getNoBgTrimmedLength();g&&b<O+1&&(b=O+1);let T=0,Q="",te=0,ce=0,ue=0,H=!1,L=0,Y=!1,X=0;const de=[],he=J!==-1&&se!==-1;for(let xe=0;xe<b;xe++){y.loadCell(xe,this._workCell);let Le=this._workCell.getWidth();if(Le===0)continue;let Te=!1,Ke=xe,ye=this._workCell;if(N.length>0&&xe===N[0][0]){Te=!0;const Ae=N.shift();ye=new l.JoinedCellData(this._workCell,y.translateToString(!0,Ae[0],Ae[1]),Ae[1]-Ae[0]),Ke=Ae[1]-1,Le=ye.getWidth()}const Kt=this._isCellInSelection(xe,E),vr=g&&xe===O,Nt=he&&xe>=J&&xe<=se;let At=!1;this._decorationService.forEachDecorationAtCell(xe,E,void 0,(Ae=>{At=!0}));let qt=ye.getChars()||v.WHITESPACE_CELL_CHAR;if(qt===" "&&(ye.isUnderline()||ye.isOverline())&&(qt=" "),X=Le*A-G.get(qt,ye.isBold(),ye.isItalic()),D){if(T&&(Kt&&Y||!Kt&&!Y&&ye.bg===te)&&(Kt&&Y&&C.selectionForeground||ye.fg===ce)&&ye.extended.ext===ue&&Nt===H&&X===L&&!vr&&!Te&&!At){ye.isInvisible()?Q+=v.WHITESPACE_CELL_CHAR:Q+=qt,T++;continue}T&&(D.textContent=Q),D=this._document.createElement("span"),T=0,Q=""}else D=this._document.createElement("span");if(te=ye.bg,ce=ye.fg,ue=ye.extended.ext,H=Nt,L=X,Y=Kt,Te&&O>=xe&&O<=Ke&&(O=xe),!this._coreService.isCursorHidden&&vr&&this._coreService.isCursorInitialized){if(de.push("xterm-cursor"),this._coreBrowserService.isFocused)j&&de.push("xterm-cursor-blink"),de.push(R==="bar"?"xterm-cursor-bar":R==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(B)switch(B){case"outline":de.push("xterm-cursor-outline");break;case"block":de.push("xterm-cursor-block");break;case"bar":de.push("xterm-cursor-bar");break;case"underline":de.push("xterm-cursor-underline")}}if(ye.isBold()&&de.push("xterm-bold"),ye.isItalic()&&de.push("xterm-italic"),ye.isDim()&&de.push("xterm-dim"),Q=ye.isInvisible()?v.WHITESPACE_CELL_CHAR:ye.getChars()||v.WHITESPACE_CELL_CHAR,ye.isUnderline()&&(de.push(`xterm-underline-${ye.extended.underlineStyle}`),Q===" "&&(Q=" "),!ye.isUnderlineColorDefault()))if(ye.isUnderlineColorRGB())D.style.textDecorationColor=`rgb(${o.AttributeData.toColorRGB(ye.getUnderlineColor()).join(",")})`;else{let Ae=ye.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&ye.isBold()&&Ae<8&&(Ae+=8),D.style.textDecorationColor=C.ansi[Ae].css}ye.isOverline()&&(de.push("xterm-overline"),Q===" "&&(Q=" ")),ye.isStrikethrough()&&de.push("xterm-strikethrough"),Nt&&(D.style.textDecoration="underline");let et=ye.getFgColor(),Gt=ye.getFgColorMode(),ht=ye.getBgColor(),Xt=ye.getBgColorMode();const gr=!!ye.isInverse();if(gr){const Ae=et;et=ht,ht=Ae;const Fi=Gt;Gt=Xt,Xt=Fi}let dt,mr,st,xt=!1;switch(this._decorationService.forEachDecorationAtCell(xe,E,void 0,(Ae=>{Ae.options.layer!=="top"&&xt||(Ae.backgroundColorRGB&&(Xt=50331648,ht=Ae.backgroundColorRGB.rgba>>8&16777215,dt=Ae.backgroundColorRGB),Ae.foregroundColorRGB&&(Gt=50331648,et=Ae.foregroundColorRGB.rgba>>8&16777215,mr=Ae.foregroundColorRGB),xt=Ae.options.layer==="top")})),!xt&&Kt&&(dt=this._coreBrowserService.isFocused?C.selectionBackgroundOpaque:C.selectionInactiveBackgroundOpaque,ht=dt.rgba>>8&16777215,Xt=50331648,xt=!0,C.selectionForeground&&(Gt=50331648,et=C.selectionForeground.rgba>>8&16777215,mr=C.selectionForeground)),xt&&de.push("xterm-decoration-top"),Xt){case 16777216:case 33554432:st=C.ansi[ht],de.push(`xterm-bg-${ht}`);break;case 50331648:st=_.channels.toColor(ht>>16,ht>>8&255,255&ht),this._addStyle(D,`background-color:#${w((ht>>>0).toString(16),"0",6)}`);break;default:gr?(st=C.foreground,de.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):st=C.background}switch(dt||ye.isDim()&&(dt=_.color.multiplyOpacity(st,.5)),Gt){case 16777216:case 33554432:ye.isBold()&&et<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(et+=8),this._applyMinimumContrast(D,st,C.ansi[et],ye,dt,void 0)||de.push(`xterm-fg-${et}`);break;case 50331648:const Ae=_.channels.toColor(et>>16&255,et>>8&255,255&et);this._applyMinimumContrast(D,st,Ae,ye,dt,mr)||this._addStyle(D,`color:#${w(et.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(D,st,C.foreground,ye,dt,mr)||gr&&de.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}de.length&&(D.className=de.join(" "),de.length=0),vr||Te||At?D.textContent=Q:T++,X!==this.defaultSpacing&&(D.style.letterSpacing=`${X}px`),le.push(D),xe=Ke}return D&&T&&(D.textContent=Q),le}_applyMinimumContrast(y,E,g,R,B,O){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,s.treatGlyphAsBackgroundColor)(R.getCode()))return!1;const j=this._getContrastCache(R);let A;if(B||O||(A=j.getColor(E.rgba,g.rgba)),A===void 0){const G=this._optionsService.rawOptions.minimumContrastRatio/(R.isDim()?2:1);A=_.color.ensureContrastRatio(B||E,O||g,G),j.setColor((B||E).rgba,(O||g).rgba,A??null)}return!!A&&(this._addStyle(y,`color:${A.css}`),!0)}_getContrastCache(y){return y.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(y,E){y.setAttribute("style",`${y.getAttribute("style")||""}${E};`)}_isCellInSelection(y,E){const g=this._selectionStart,R=this._selectionEnd;return!(!g||!R)&&(this._columnSelectMode?g[0]<=R[0]?y>=g[0]&&E>=g[1]&&y<R[0]&&E<=R[1]:y<g[0]&&E>=g[1]&&y>=R[0]&&E<=R[1]:E>g[1]&&E<R[1]||g[1]===R[1]&&E===g[1]&&y>=g[0]&&y<R[0]||g[1]<R[1]&&E===R[1]&&y<R[0]||g[1]<R[1]&&E===g[1]&&y>=g[0])}};function w(y,E,g){for(;y.length<g;)y=E+y;return y}c.DomRendererRowFactory=f=p([m(1,n.ICharacterJoinerService),m(2,x.IOptionsService),m(3,n.ICoreBrowserService),m(4,x.ICoreService),m(5,x.IDecorationService),m(6,n.IThemeService)],f)},2550:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WidthCache=void 0,c.WidthCache=class{constructor(h,p){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=h.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 m=h.createElement("span");m.classList.add("xterm-char-measure-element");const u=h.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontWeight="bold";const v=h.createElement("span");v.classList.add("xterm-char-measure-element"),v.style.fontStyle="italic";const S=h.createElement("span");S.classList.add("xterm-char-measure-element"),S.style.fontWeight="bold",S.style.fontStyle="italic",this._measureElements=[m,u,v,S],this._container.appendChild(m),this._container.appendChild(u),this._container.appendChild(v),this._container.appendChild(S),p.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(h,p,m,u){h===this._font&&p===this._fontSize&&m===this._weight&&u===this._weightBold||(this._font=h,this._fontSize=p,this._weight=m,this._weightBold=u,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${m}`,this._measureElements[1].style.fontWeight=`${u}`,this._measureElements[2].style.fontWeight=`${m}`,this._measureElements[3].style.fontWeight=`${u}`,this.clear())}get(h,p,m){let u=0;if(!p&&!m&&h.length===1&&(u=h.charCodeAt(0))<256){if(this._flat[u]!==-9999)return this._flat[u];const x=this._measure(h,0);return x>0&&(this._flat[u]=x),x}let v=h;p&&(v+="B"),m&&(v+="I");let S=this._holey.get(v);if(S===void 0){let x=0;p&&(x|=1),m&&(x|=2),S=this._measure(h,x),S>0&&this._holey.set(v,S)}return S}_measure(h,p){const m=this._measureElements[p];return m.textContent=h.repeat(32),m.offsetWidth/32}}},2223:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.TEXT_BASELINE=c.DIM_OPACITY=c.INVERTED_DEFAULT_COLOR=void 0;const p=h(6114);c.INVERTED_DEFAULT_COLOR=257,c.DIM_OPACITY=.5,c.TEXT_BASELINE=p.isFirefox||p.isLegacyEdge?"bottom":"ideographic"},6171:(K,c)=>{function h(m){return 57508<=m&&m<=57558}function p(m){return m>=128512&&m<=128591||m>=127744&&m<=128511||m>=128640&&m<=128767||m>=9728&&m<=9983||m>=9984&&m<=10175||m>=65024&&m<=65039||m>=129280&&m<=129535||m>=127462&&m<=127487}Object.defineProperty(c,"__esModule",{value:!0}),c.computeNextVariantOffset=c.createRenderDimensions=c.treatGlyphAsBackgroundColor=c.allowRescaling=c.isEmoji=c.isRestrictedPowerlineGlyph=c.isPowerlineGlyph=c.throwIfFalsy=void 0,c.throwIfFalsy=function(m){if(!m)throw new Error("value must not be falsy");return m},c.isPowerlineGlyph=h,c.isRestrictedPowerlineGlyph=function(m){return 57520<=m&&m<=57527},c.isEmoji=p,c.allowRescaling=function(m,u,v,S){return u===1&&v>Math.ceil(1.5*S)&&m!==void 0&&m>255&&!p(m)&&!h(m)&&!(function(x){return 57344<=x&&x<=63743})(m)},c.treatGlyphAsBackgroundColor=function(m){return h(m)||(function(u){return 9472<=u&&u<=9631})(m)},c.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}}}},c.computeNextVariantOffset=function(m,u,v=0){return(m-(2*Math.round(u)-v))%(2*Math.round(u))}},6052:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.createSelectionRenderModel=void 0;class h{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(m,u,v,S=!1){if(this.selectionStart=u,this.selectionEnd=v,!u||!v||u[0]===v[0]&&u[1]===v[1])return void this.clear();const x=m.buffers.active.ydisp,_=u[1]-x,n=v[1]-x,l=Math.max(_,0),s=Math.min(n,m.rows-1);l>=m.rows||s<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=S,this.viewportStartRow=_,this.viewportEndRow=n,this.viewportCappedStartRow=l,this.viewportCappedEndRow=s,this.startCol=u[0],this.endCol=v[0])}isCellSelected(m,u,v){return!!this.hasSelection&&(v-=m.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&v>=this.viewportCappedStartRow&&u<this.endCol&&v<=this.viewportCappedEndRow:u<this.startCol&&v>=this.viewportCappedStartRow&&u>=this.endCol&&v<=this.viewportCappedEndRow:v>this.viewportStartRow&&v<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&v===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&v===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&v===this.viewportStartRow&&u>=this.startCol)}}c.createSelectionRenderModel=function(){return new h}},456:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionModel=void 0,c.SelectionModel=class{constructor(h){this._bufferService=h,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 h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?h%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)-1]:[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[h,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[Math.max(h,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const h=this.selectionStart,p=this.selectionEnd;return!(!h||!p)&&(h[1]>p[1]||h[1]===p[1]&&h[0]>p[0])}handleTrim(h){return this.selectionStart&&(this.selectionStart[1]-=h),this.selectionEnd&&(this.selectionEnd[1]-=h),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(K,c,h){var p=this&&this.__decorate||function(s,o,f,w){var y,E=arguments.length,g=E<3?o:w===null?w=Object.getOwnPropertyDescriptor(o,f):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(s,o,f,w);else for(var R=s.length-1;R>=0;R--)(y=s[R])&&(g=(E<3?y(g):E>3?y(o,f,g):y(o,f))||g);return E>3&&g&&Object.defineProperty(o,f,g),g},m=this&&this.__param||function(s,o){return function(f,w){o(f,w,s)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CharSizeService=void 0;const u=h(2585),v=h(8460),S=h(844);let x=c.CharSizeService=class extends S.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(s,o,f){super(),this._optionsService=f,this.width=0,this.height=0,this._onCharSizeChange=this.register(new v.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new l(this._optionsService))}catch{this._measureStrategy=this.register(new n(s,o,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const s=this._measureStrategy.measure();s.width===this.width&&s.height===this.height||(this.width=s.width,this.height=s.height,this._onCharSizeChange.fire())}};c.CharSizeService=x=p([m(2,u.IOptionsService)],x);class _ extends S.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(o,f){o!==void 0&&o>0&&f!==void 0&&f>0&&(this._result.width=o,this._result.height=f)}}class n extends _{constructor(o,f,w){super(),this._document=o,this._parentElement=f,this._optionsService=w,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class l extends _{constructor(o){super(),this._optionsService=o,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const f=this._ctx.measureText("W");if(!("width"in f&&"fontBoundingBoxAscent"in f&&"fontBoundingBoxDescent"in f))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(K,c,h){var p=this&&this.__decorate||function(l,s,o,f){var w,y=arguments.length,E=y<3?s:f===null?f=Object.getOwnPropertyDescriptor(s,o):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(l,s,o,f);else for(var g=l.length-1;g>=0;g--)(w=l[g])&&(E=(y<3?w(E):y>3?w(s,o,E):w(s,o))||E);return y>3&&E&&Object.defineProperty(s,o,E),E},m=this&&this.__param||function(l,s){return function(o,f){s(o,f,l)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CharacterJoinerService=c.JoinedCellData=void 0;const u=h(3734),v=h(643),S=h(511),x=h(2585);class _ extends u.AttributeData{constructor(s,o,f){super(),this.content=0,this.combinedData="",this.fg=s.fg,this.bg=s.bg,this.combinedData=o,this._width=f}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(s){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}c.JoinedCellData=_;let n=c.CharacterJoinerService=class Zc{constructor(s){this._bufferService=s,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new S.CellData}register(s){const o={id:this._nextCharacterJoinerId++,handler:s};return this._characterJoiners.push(o),o.id}deregister(s){for(let o=0;o<this._characterJoiners.length;o++)if(this._characterJoiners[o].id===s)return this._characterJoiners.splice(o,1),!0;return!1}getJoinedCharacters(s){if(this._characterJoiners.length===0)return[];const o=this._bufferService.buffer.lines.get(s);if(!o||o.length===0)return[];const f=[],w=o.translateToString(!0);let y=0,E=0,g=0,R=o.getFg(0),B=o.getBg(0);for(let O=0;O<o.getTrimmedLength();O++)if(o.loadCell(O,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==R||this._workCell.bg!==B){if(O-y>1){const j=this._getJoinedRanges(w,g,E,o,y);for(let A=0;A<j.length;A++)f.push(j[A])}y=O,g=E,R=this._workCell.fg,B=this._workCell.bg}E+=this._workCell.getChars().length||v.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-y>1){const O=this._getJoinedRanges(w,g,E,o,y);for(let j=0;j<O.length;j++)f.push(O[j])}return f}_getJoinedRanges(s,o,f,w,y){const E=s.substring(o,f);let g=[];try{g=this._characterJoiners[0].handler(E)}catch(R){console.error(R)}for(let R=1;R<this._characterJoiners.length;R++)try{const B=this._characterJoiners[R].handler(E);for(let O=0;O<B.length;O++)Zc._mergeRanges(g,B[O])}catch(B){console.error(B)}return this._stringRangesToCellRanges(g,w,y),g}_stringRangesToCellRanges(s,o,f){let w=0,y=!1,E=0,g=s[w];if(g){for(let R=f;R<this._bufferService.cols;R++){const B=o.getWidth(R),O=o.getString(R).length||v.WHITESPACE_CELL_CHAR.length;if(B!==0){if(!y&&g[0]<=E&&(g[0]=R,y=!0),g[1]<=E){if(g[1]=R,g=s[++w],!g)break;g[0]<=E?(g[0]=R,y=!0):y=!1}E+=O}}g&&(g[1]=this._bufferService.cols)}}static _mergeRanges(s,o){let f=!1;for(let w=0;w<s.length;w++){const y=s[w];if(f){if(o[1]<=y[0])return s[w-1][1]=o[1],s;if(o[1]<=y[1])return s[w-1][1]=Math.max(o[1],y[1]),s.splice(w,1),s;s.splice(w,1),w--}else{if(o[1]<=y[0])return s.splice(w,0,o),s;if(o[1]<=y[1])return y[0]=Math.min(o[0],y[0]),s;o[0]<y[1]&&(y[0]=Math.min(o[0],y[0]),f=!0)}}return f?s[s.length-1][1]=o[1]:s.push(o),s}};c.CharacterJoinerService=n=p([m(0,x.IBufferService)],n)},5114:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CoreBrowserService=void 0;const p=h(844),m=h(8460),u=h(3656);class v extends p.Disposable{constructor(_,n,l){super(),this._textarea=_,this._window=n,this.mainDocument=l,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new S(this._window),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new m.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((s=>this._screenDprMonitor.setWindow(s)))),this.register((0,m.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(_){this._window!==_&&(this._window=_,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}}c.CoreBrowserService=v;class S extends p.Disposable{constructor(_){super(),this._parentWindow=_,this._windowResizeListener=this.register(new p.MutableDisposable),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,p.toDisposable)((()=>this.clearListener())))}setWindow(_){this._parentWindow=_,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,u.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var _;this._outerListener&&((_=this._resolutionMediaMatchList)==null||_.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:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.LinkProviderService=void 0;const p=h(844);class m extends p.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,p.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(v){return this.linkProviders.push(v),{dispose:()=>{const S=this.linkProviders.indexOf(v);S!==-1&&this.linkProviders.splice(S,1)}}}}c.LinkProviderService=m},8934:function(K,c,h){var p=this&&this.__decorate||function(x,_,n,l){var s,o=arguments.length,f=o<3?_:l===null?l=Object.getOwnPropertyDescriptor(_,n):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(x,_,n,l);else for(var w=x.length-1;w>=0;w--)(s=x[w])&&(f=(o<3?s(f):o>3?s(_,n,f):s(_,n))||f);return o>3&&f&&Object.defineProperty(_,n,f),f},m=this&&this.__param||function(x,_){return function(n,l){_(n,l,x)}};Object.defineProperty(c,"__esModule",{value:!0}),c.MouseService=void 0;const u=h(4725),v=h(9806);let S=c.MouseService=class{constructor(x,_){this._renderService=x,this._charSizeService=_}getCoords(x,_,n,l,s){return(0,v.getCoords)(window,x,_,n,l,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,s)}getMouseReportCoords(x,_){const n=(0,v.getCoordsRelativeToElement)(window,x,_);if(this._charSizeService.hasValidSize)return n[0]=Math.min(Math.max(n[0],0),this._renderService.dimensions.css.canvas.width-1),n[1]=Math.min(Math.max(n[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(n[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(n[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(n[0]),y:Math.floor(n[1])}}};c.MouseService=S=p([m(0,u.IRenderService),m(1,u.ICharSizeService)],S)},3230:function(K,c,h){var p=this&&this.__decorate||function(s,o,f,w){var y,E=arguments.length,g=E<3?o:w===null?w=Object.getOwnPropertyDescriptor(o,f):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(s,o,f,w);else for(var R=s.length-1;R>=0;R--)(y=s[R])&&(g=(E<3?y(g):E>3?y(o,f,g):y(o,f))||g);return E>3&&g&&Object.defineProperty(o,f,g),g},m=this&&this.__param||function(s,o){return function(f,w){o(f,w,s)}};Object.defineProperty(c,"__esModule",{value:!0}),c.RenderService=void 0;const u=h(6193),v=h(4725),S=h(8460),x=h(844),_=h(7226),n=h(2585);let l=c.RenderService=class extends x.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(s,o,f,w,y,E,g,R){super(),this._rowCount=s,this._charSizeService=w,this._renderer=this.register(new x.MutableDisposable),this._pausedResizeTask=new _.DebouncedIdleTask,this._observerDisposable=this.register(new x.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new S.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new S.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new S.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new S.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new u.RenderDebouncer(((B,O)=>this._renderRows(B,O)),g),this.register(this._renderDebouncer),this.register(g.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(E.onResize((()=>this._fullRefresh()))),this.register(E.buffers.onBufferActivate((()=>{var B;return(B=this._renderer.value)==null?void 0:B.clear()}))),this.register(f.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(y.onDecorationRegistered((()=>this._fullRefresh()))),this.register(y.onDecorationRemoved((()=>this._fullRefresh()))),this.register(f.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(E.cols,E.rows),this._fullRefresh()}))),this.register(f.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(E.buffer.y,E.buffer.y,!0)))),this.register(R.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(g.window,o),this.register(g.onWindowChange((B=>this._registerIntersectionObserver(B,o))))}_registerIntersectionObserver(s,o){if("IntersectionObserver"in s){const f=new s.IntersectionObserver((w=>this._handleIntersectionChange(w[w.length-1])),{threshold:0});f.observe(o),this._observerDisposable.value=(0,x.toDisposable)((()=>f.disconnect()))}}_handleIntersectionChange(s){this._isPaused=s.isIntersecting===void 0?s.intersectionRatio===0:!s.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(s,o,f=!1){this._isPaused?this._needsFullRefresh=!0:(f||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(s,o,this._rowCount))}_renderRows(s,o){this._renderer.value&&(s=Math.min(s,this._rowCount-1),o=Math.min(o,this._rowCount-1),this._renderer.value.renderRows(s,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:s,end:o}),this._onRender.fire({start:s,end:o}),this._isNextRenderRedrawOnly=!0)}resize(s,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(s){this._renderer.value=s,this._renderer.value&&(this._renderer.value.onRequestRedraw((o=>this.refreshRows(o.start,o.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(s){return this._renderDebouncer.addRefreshCallback(s)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var s,o;this._renderer.value&&((o=(s=this._renderer.value).clearTextureAtlas)==null||o.call(s),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(s,o){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var f;return(f=this._renderer.value)==null?void 0:f.handleResize(s,o)})):this._renderer.value.handleResize(s,o),this._fullRefresh())}handleCharSizeChanged(){var s;(s=this._renderer.value)==null||s.handleCharSizeChanged()}handleBlur(){var s;(s=this._renderer.value)==null||s.handleBlur()}handleFocus(){var s;(s=this._renderer.value)==null||s.handleFocus()}handleSelectionChanged(s,o,f){var w;this._selectionState.start=s,this._selectionState.end=o,this._selectionState.columnSelectMode=f,(w=this._renderer.value)==null||w.handleSelectionChanged(s,o,f)}handleCursorMove(){var s;(s=this._renderer.value)==null||s.handleCursorMove()}clear(){var s;(s=this._renderer.value)==null||s.clear()}};c.RenderService=l=p([m(2,n.IOptionsService),m(3,v.ICharSizeService),m(4,n.IDecorationService),m(5,n.IBufferService),m(6,v.ICoreBrowserService),m(7,v.IThemeService)],l)},9312:function(K,c,h){var p=this&&this.__decorate||function(g,R,B,O){var j,A=arguments.length,G=A<3?R:O===null?O=Object.getOwnPropertyDescriptor(R,B):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(g,R,B,O);else for(var J=g.length-1;J>=0;J--)(j=g[J])&&(G=(A<3?j(G):A>3?j(R,B,G):j(R,B))||G);return A>3&&G&&Object.defineProperty(R,B,G),G},m=this&&this.__param||function(g,R){return function(B,O){R(B,O,g)}};Object.defineProperty(c,"__esModule",{value:!0}),c.SelectionService=void 0;const u=h(9806),v=h(9504),S=h(456),x=h(4725),_=h(8460),n=h(844),l=h(6114),s=h(4841),o=h(511),f=h(2585),w=" ",y=new RegExp(w,"g");let E=c.SelectionService=class extends n.Disposable{constructor(g,R,B,O,j,A,G,J,se){super(),this._element=g,this._screenElement=R,this._linkifier=B,this._bufferService=O,this._coreService=j,this._mouseService=A,this._optionsService=G,this._renderService=J,this._coreBrowserService=se,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 _.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new _.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new _.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new _.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=le=>this._handleMouseMove(le),this._mouseUpListener=le=>this._handleMouseUp(le),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((le=>this._handleTrim(le))),this.register(this._bufferService.buffers.onBufferActivate((le=>this._handleBufferActivate(le)))),this.enable(),this._model=new S.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,n.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 g=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!g||!R||g[0]===R[0]&&g[1]===R[1])}get selectionText(){const g=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;if(!g||!R)return"";const B=this._bufferService.buffer,O=[];if(this._activeSelectionMode===3){if(g[0]===R[0])return"";const j=g[0]<R[0]?g[0]:R[0],A=g[0]<R[0]?R[0]:g[0];for(let G=g[1];G<=R[1];G++){const J=B.translateBufferLineToString(G,!0,j,A);O.push(J)}}else{const j=g[1]===R[1]?R[0]:void 0;O.push(B.translateBufferLineToString(g[1],!0,g[0],j));for(let A=g[1]+1;A<=R[1]-1;A++){const G=B.lines.get(A),J=B.translateBufferLineToString(A,!0);G!=null&&G.isWrapped?O[O.length-1]+=J:O.push(J)}if(g[1]!==R[1]){const A=B.lines.get(R[1]),G=B.translateBufferLineToString(R[1],!0,0,R[0]);A&&A.isWrapped?O[O.length-1]+=G:O.push(G)}}return O.map((j=>j.replace(y," "))).join(l.isWindows?`\r
45
+ `:`
46
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(g){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),l.isLinux&&g&&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(g){const R=this._getMouseBufferCoords(g),B=this._model.finalSelectionStart,O=this._model.finalSelectionEnd;return!!(B&&O&&R)&&this._areCoordsInSelection(R,B,O)}isCellInSelection(g,R){const B=this._model.finalSelectionStart,O=this._model.finalSelectionEnd;return!(!B||!O)&&this._areCoordsInSelection([g,R],B,O)}_areCoordsInSelection(g,R,B){return g[1]>R[1]&&g[1]<B[1]||R[1]===B[1]&&g[1]===R[1]&&g[0]>=R[0]&&g[0]<B[0]||R[1]<B[1]&&g[1]===B[1]&&g[0]<B[0]||R[1]<B[1]&&g[1]===R[1]&&g[0]>=R[0]}_selectWordAtCursor(g,R){var j,A;const B=(A=(j=this._linkifier.currentLink)==null?void 0:j.link)==null?void 0:A.range;if(B)return this._model.selectionStart=[B.start.x-1,B.start.y-1],this._model.selectionStartLength=(0,s.getRangeLength)(B,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const O=this._getMouseBufferCoords(g);return!!O&&(this._selectWordAt(O,R),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(g,R){this._model.clearSelection(),g=Math.max(g,0),R=Math.min(R,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,g],this._model.selectionEnd=[this._bufferService.cols,R],this.refresh(),this._onSelectionChange.fire()}_handleTrim(g){this._model.handleTrim(g)&&this.refresh()}_getMouseBufferCoords(g){const R=this._mouseService.getCoords(g,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(R)return R[0]--,R[1]--,R[1]+=this._bufferService.buffer.ydisp,R}_getMouseEventScrollAmount(g){let R=(0,u.getCoordsRelativeToElement)(this._coreBrowserService.window,g,this._screenElement)[1];const B=this._renderService.dimensions.css.canvas.height;return R>=0&&R<=B?0:(R>B&&(R-=B),R=Math.min(Math.max(R,-50),50),R/=50,R/Math.abs(R)+Math.round(14*R))}shouldForceSelection(g){return l.isMac?g.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:g.shiftKey}handleMouseDown(g){if(this._mouseDownTimeStamp=g.timeStamp,(g.button!==2||!this.hasSelection)&&g.button===0){if(!this._enabled){if(!this.shouldForceSelection(g))return;g.stopPropagation()}g.preventDefault(),this._dragScrollAmount=0,this._enabled&&g.shiftKey?this._handleIncrementalClick(g):g.detail===1?this._handleSingleClick(g):g.detail===2?this._handleDoubleClick(g):g.detail===3&&this._handleTripleClick(g),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(g){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(g))}_handleSingleClick(g){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(g)?3:0,this._model.selectionStart=this._getMouseBufferCoords(g),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const R=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);R&&R.length!==this._model.selectionStart[0]&&R.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(g){this._selectWordAtCursor(g,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(g){const R=this._getMouseBufferCoords(g);R&&(this._activeSelectionMode=2,this._selectLineAt(R[1]))}shouldColumnSelect(g){return g.altKey&&!(l.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(g){if(g.stopImmediatePropagation(),!this._model.selectionStart)return;const R=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(g),!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(g),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const B=this._bufferService.buffer;if(this._model.selectionEnd[1]<B.lines.length){const O=B.lines.get(this._model.selectionEnd[1]);O&&O.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}R&&R[0]===this._model.selectionEnd[0]&&R[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 g=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(g.ydisp+this._bufferService.rows,g.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=g.ydisp),this.refresh()}}_handleMouseUp(g){const R=g.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&R<500&&g.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const B=this._mouseService.getCoords(g,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(B&&B[0]!==void 0&&B[1]!==void 0){const O=(0,v.moveToCellSequence)(B[0]-1,B[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(O,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const g=this._model.finalSelectionStart,R=this._model.finalSelectionEnd,B=!(!g||!R||g[0]===R[0]&&g[1]===R[1]);B?g&&R&&(this._oldSelectionStart&&this._oldSelectionEnd&&g[0]===this._oldSelectionStart[0]&&g[1]===this._oldSelectionStart[1]&&R[0]===this._oldSelectionEnd[0]&&R[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(g,R,B)):this._oldHasSelection&&this._fireOnSelectionChange(g,R,B)}_fireOnSelectionChange(g,R,B){this._oldSelectionStart=g,this._oldSelectionEnd=R,this._oldHasSelection=B,this._onSelectionChange.fire()}_handleBufferActivate(g){this.clearSelection(),this._trimListener.dispose(),this._trimListener=g.activeBuffer.lines.onTrim((R=>this._handleTrim(R)))}_convertViewportColToCharacterIndex(g,R){let B=R;for(let O=0;R>=O;O++){const j=g.loadCell(O,this._workCell).getChars().length;this._workCell.getWidth()===0?B--:j>1&&R!==O&&(B+=j-1)}return B}setSelection(g,R,B){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[g,R],this._model.selectionStartLength=B,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(g){this._isClickInSelection(g)||(this._selectWordAtCursor(g,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(g,R,B=!0,O=!0){if(g[0]>=this._bufferService.cols)return;const j=this._bufferService.buffer,A=j.lines.get(g[1]);if(!A)return;const G=j.translateBufferLineToString(g[1],!1);let J=this._convertViewportColToCharacterIndex(A,g[0]),se=J;const le=g[0]-J;let N=0,C=0,D=0,b=0;if(G.charAt(J)===" "){for(;J>0&&G.charAt(J-1)===" ";)J--;for(;se<G.length&&G.charAt(se+1)===" ";)se++}else{let te=g[0],ce=g[0];A.getWidth(te)===0&&(N++,te--),A.getWidth(ce)===2&&(C++,ce++);const ue=A.getString(ce).length;for(ue>1&&(b+=ue-1,se+=ue-1);te>0&&J>0&&!this._isCharWordSeparator(A.loadCell(te-1,this._workCell));){A.loadCell(te-1,this._workCell);const H=this._workCell.getChars().length;this._workCell.getWidth()===0?(N++,te--):H>1&&(D+=H-1,J-=H-1),J--,te--}for(;ce<A.length&&se+1<G.length&&!this._isCharWordSeparator(A.loadCell(ce+1,this._workCell));){A.loadCell(ce+1,this._workCell);const H=this._workCell.getChars().length;this._workCell.getWidth()===2?(C++,ce++):H>1&&(b+=H-1,se+=H-1),se++,ce++}}se++;let T=J+le-N+D,Q=Math.min(this._bufferService.cols,se-J+N+C-D-b);if(R||G.slice(J,se).trim()!==""){if(B&&T===0&&A.getCodePoint(0)!==32){const te=j.lines.get(g[1]-1);if(te&&A.isWrapped&&te.getCodePoint(this._bufferService.cols-1)!==32){const ce=this._getWordAt([this._bufferService.cols-1,g[1]-1],!1,!0,!1);if(ce){const ue=this._bufferService.cols-ce.start;T-=ue,Q+=ue}}}if(O&&T+Q===this._bufferService.cols&&A.getCodePoint(this._bufferService.cols-1)!==32){const te=j.lines.get(g[1]+1);if(te!=null&&te.isWrapped&&te.getCodePoint(0)!==32){const ce=this._getWordAt([0,g[1]+1],!1,!1,!0);ce&&(Q+=ce.length)}}return{start:T,length:Q}}}_selectWordAt(g,R){const B=this._getWordAt(g,R);if(B){for(;B.start<0;)B.start+=this._bufferService.cols,g[1]--;this._model.selectionStart=[B.start,g[1]],this._model.selectionStartLength=B.length}}_selectToWordAt(g){const R=this._getWordAt(g,!0);if(R){let B=g[1];for(;R.start<0;)R.start+=this._bufferService.cols,B--;if(!this._model.areSelectionValuesReversed())for(;R.start+R.length>this._bufferService.cols;)R.length-=this._bufferService.cols,B++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?R.start:R.start+R.length,B]}}_isCharWordSeparator(g){return g.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(g.getChars())>=0}_selectLineAt(g){const R=this._bufferService.buffer.getWrappedRangeForLine(g),B={start:{x:0,y:R.first},end:{x:this._bufferService.cols-1,y:R.last}};this._model.selectionStart=[0,R.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,s.getRangeLength)(B,this._bufferService.cols)}};c.SelectionService=E=p([m(3,f.IBufferService),m(4,f.ICoreService),m(5,x.IMouseService),m(6,f.IOptionsService),m(7,x.IRenderService),m(8,x.ICoreBrowserService)],E)},4725:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ILinkProviderService=c.IThemeService=c.ICharacterJoinerService=c.ISelectionService=c.IRenderService=c.IMouseService=c.ICoreBrowserService=c.ICharSizeService=void 0;const p=h(8343);c.ICharSizeService=(0,p.createDecorator)("CharSizeService"),c.ICoreBrowserService=(0,p.createDecorator)("CoreBrowserService"),c.IMouseService=(0,p.createDecorator)("MouseService"),c.IRenderService=(0,p.createDecorator)("RenderService"),c.ISelectionService=(0,p.createDecorator)("SelectionService"),c.ICharacterJoinerService=(0,p.createDecorator)("CharacterJoinerService"),c.IThemeService=(0,p.createDecorator)("ThemeService"),c.ILinkProviderService=(0,p.createDecorator)("LinkProviderService")},6731:function(K,c,h){var p=this&&this.__decorate||function(E,g,R,B){var O,j=arguments.length,A=j<3?g:B===null?B=Object.getOwnPropertyDescriptor(g,R):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(E,g,R,B);else for(var G=E.length-1;G>=0;G--)(O=E[G])&&(A=(j<3?O(A):j>3?O(g,R,A):O(g,R))||A);return j>3&&A&&Object.defineProperty(g,R,A),A},m=this&&this.__param||function(E,g){return function(R,B){g(R,B,E)}};Object.defineProperty(c,"__esModule",{value:!0}),c.ThemeService=c.DEFAULT_ANSI_COLORS=void 0;const u=h(7239),v=h(8055),S=h(8460),x=h(844),_=h(2585),n=v.css.toColor("#ffffff"),l=v.css.toColor("#000000"),s=v.css.toColor("#ffffff"),o=v.css.toColor("#000000"),f={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};c.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const E=[v.css.toColor("#2e3436"),v.css.toColor("#cc0000"),v.css.toColor("#4e9a06"),v.css.toColor("#c4a000"),v.css.toColor("#3465a4"),v.css.toColor("#75507b"),v.css.toColor("#06989a"),v.css.toColor("#d3d7cf"),v.css.toColor("#555753"),v.css.toColor("#ef2929"),v.css.toColor("#8ae234"),v.css.toColor("#fce94f"),v.css.toColor("#729fcf"),v.css.toColor("#ad7fa8"),v.css.toColor("#34e2e2"),v.css.toColor("#eeeeec")],g=[0,95,135,175,215,255];for(let R=0;R<216;R++){const B=g[R/36%6|0],O=g[R/6%6|0],j=g[R%6];E.push({css:v.channels.toCss(B,O,j),rgba:v.channels.toRgba(B,O,j)})}for(let R=0;R<24;R++){const B=8+10*R;E.push({css:v.channels.toCss(B,B,B),rgba:v.channels.toRgba(B,B,B)})}return E})());let w=c.ThemeService=class extends x.Disposable{get colors(){return this._colors}constructor(E){super(),this._optionsService=E,this._contrastCache=new u.ColorContrastCache,this._halfContrastCache=new u.ColorContrastCache,this._onChangeColors=this.register(new S.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:n,background:l,cursor:s,cursorAccent:o,selectionForeground:void 0,selectionBackgroundTransparent:f,selectionBackgroundOpaque:v.color.blend(l,f),selectionInactiveBackgroundTransparent:f,selectionInactiveBackgroundOpaque:v.color.blend(l,f),ansi:c.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(E={}){const g=this._colors;if(g.foreground=y(E.foreground,n),g.background=y(E.background,l),g.cursor=y(E.cursor,s),g.cursorAccent=y(E.cursorAccent,o),g.selectionBackgroundTransparent=y(E.selectionBackground,f),g.selectionBackgroundOpaque=v.color.blend(g.background,g.selectionBackgroundTransparent),g.selectionInactiveBackgroundTransparent=y(E.selectionInactiveBackground,g.selectionBackgroundTransparent),g.selectionInactiveBackgroundOpaque=v.color.blend(g.background,g.selectionInactiveBackgroundTransparent),g.selectionForeground=E.selectionForeground?y(E.selectionForeground,v.NULL_COLOR):void 0,g.selectionForeground===v.NULL_COLOR&&(g.selectionForeground=void 0),v.color.isOpaque(g.selectionBackgroundTransparent)&&(g.selectionBackgroundTransparent=v.color.opacity(g.selectionBackgroundTransparent,.3)),v.color.isOpaque(g.selectionInactiveBackgroundTransparent)&&(g.selectionInactiveBackgroundTransparent=v.color.opacity(g.selectionInactiveBackgroundTransparent,.3)),g.ansi=c.DEFAULT_ANSI_COLORS.slice(),g.ansi[0]=y(E.black,c.DEFAULT_ANSI_COLORS[0]),g.ansi[1]=y(E.red,c.DEFAULT_ANSI_COLORS[1]),g.ansi[2]=y(E.green,c.DEFAULT_ANSI_COLORS[2]),g.ansi[3]=y(E.yellow,c.DEFAULT_ANSI_COLORS[3]),g.ansi[4]=y(E.blue,c.DEFAULT_ANSI_COLORS[4]),g.ansi[5]=y(E.magenta,c.DEFAULT_ANSI_COLORS[5]),g.ansi[6]=y(E.cyan,c.DEFAULT_ANSI_COLORS[6]),g.ansi[7]=y(E.white,c.DEFAULT_ANSI_COLORS[7]),g.ansi[8]=y(E.brightBlack,c.DEFAULT_ANSI_COLORS[8]),g.ansi[9]=y(E.brightRed,c.DEFAULT_ANSI_COLORS[9]),g.ansi[10]=y(E.brightGreen,c.DEFAULT_ANSI_COLORS[10]),g.ansi[11]=y(E.brightYellow,c.DEFAULT_ANSI_COLORS[11]),g.ansi[12]=y(E.brightBlue,c.DEFAULT_ANSI_COLORS[12]),g.ansi[13]=y(E.brightMagenta,c.DEFAULT_ANSI_COLORS[13]),g.ansi[14]=y(E.brightCyan,c.DEFAULT_ANSI_COLORS[14]),g.ansi[15]=y(E.brightWhite,c.DEFAULT_ANSI_COLORS[15]),E.extendedAnsi){const R=Math.min(g.ansi.length-16,E.extendedAnsi.length);for(let B=0;B<R;B++)g.ansi[B+16]=y(E.extendedAnsi[B],c.DEFAULT_ANSI_COLORS[B+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(E){this._restoreColor(E),this._onChangeColors.fire(this.colors)}_restoreColor(E){if(E!==void 0)switch(E){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[E]=this._restoreColors.ansi[E]}else for(let g=0;g<this._restoreColors.ansi.length;++g)this._colors.ansi[g]=this._restoreColors.ansi[g]}modifyColors(E){E(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function y(E,g){if(E!==void 0)try{return v.css.toColor(E)}catch{}return g}c.ThemeService=w=p([m(0,_.IOptionsService)],w)},6349:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CircularList=void 0;const p=h(8460),m=h(844);class u extends m.Disposable{constructor(S){super(),this._maxLength=S,this.onDeleteEmitter=this.register(new p.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new p.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new p.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(S){if(this._maxLength===S)return;const x=new Array(S);for(let _=0;_<Math.min(S,this.length);_++)x[_]=this._array[this._getCyclicIndex(_)];this._array=x,this._maxLength=S,this._startIndex=0}get length(){return this._length}set length(S){if(S>this._length)for(let x=this._length;x<S;x++)this._array[x]=void 0;this._length=S}get(S){return this._array[this._getCyclicIndex(S)]}set(S,x){this._array[this._getCyclicIndex(S)]=x}push(S){this._array[this._getCyclicIndex(this._length)]=S,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(S,x,..._){if(x){for(let n=S;n<this._length-x;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+x)];this._length-=x,this.onDeleteEmitter.fire({index:S,amount:x})}for(let n=this._length-1;n>=S;n--)this._array[this._getCyclicIndex(n+_.length)]=this._array[this._getCyclicIndex(n)];for(let n=0;n<_.length;n++)this._array[this._getCyclicIndex(S+n)]=_[n];if(_.length&&this.onInsertEmitter.fire({index:S,amount:_.length}),this._length+_.length>this._maxLength){const n=this._length+_.length-this._maxLength;this._startIndex+=n,this._length=this._maxLength,this.onTrimEmitter.fire(n)}else this._length+=_.length}trimStart(S){S>this._length&&(S=this._length),this._startIndex+=S,this._length-=S,this.onTrimEmitter.fire(S)}shiftElements(S,x,_){if(!(x<=0)){if(S<0||S>=this._length)throw new Error("start argument out of range");if(S+_<0)throw new Error("Cannot shift elements in list beyond index 0");if(_>0){for(let l=x-1;l>=0;l--)this.set(S+l+_,this.get(S+l));const n=S+x+_-this._length;if(n>0)for(this._length+=n;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let n=0;n<x;n++)this.set(S+n+_,this.get(S+n))}}_getCyclicIndex(S){return(this._startIndex+S)%this._maxLength}}c.CircularList=u},1439:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.clone=void 0,c.clone=function h(p,m=5){if(typeof p!="object")return p;const u=Array.isArray(p)?[]:{};for(const v in p)u[v]=m<=1?p[v]:p[v]&&h(p[v],m-1);return u}},8055:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.contrastRatio=c.toPaddedHex=c.rgba=c.rgb=c.css=c.color=c.channels=c.NULL_COLOR=void 0;let h=0,p=0,m=0,u=0;var v,S,x,_,n;function l(o){const f=o.toString(16);return f.length<2?"0"+f:f}function s(o,f){return o<f?(f+.05)/(o+.05):(o+.05)/(f+.05)}c.NULL_COLOR={css:"#00000000",rgba:0},(function(o){o.toCss=function(f,w,y,E){return E!==void 0?`#${l(f)}${l(w)}${l(y)}${l(E)}`:`#${l(f)}${l(w)}${l(y)}`},o.toRgba=function(f,w,y,E=255){return(f<<24|w<<16|y<<8|E)>>>0},o.toColor=function(f,w,y,E){return{css:o.toCss(f,w,y,E),rgba:o.toRgba(f,w,y,E)}}})(v||(c.channels=v={})),(function(o){function f(w,y){return u=Math.round(255*y),[h,p,m]=n.toChannels(w.rgba),{css:v.toCss(h,p,m,u),rgba:v.toRgba(h,p,m,u)}}o.blend=function(w,y){if(u=(255&y.rgba)/255,u===1)return{css:y.css,rgba:y.rgba};const E=y.rgba>>24&255,g=y.rgba>>16&255,R=y.rgba>>8&255,B=w.rgba>>24&255,O=w.rgba>>16&255,j=w.rgba>>8&255;return h=B+Math.round((E-B)*u),p=O+Math.round((g-O)*u),m=j+Math.round((R-j)*u),{css:v.toCss(h,p,m),rgba:v.toRgba(h,p,m)}},o.isOpaque=function(w){return(255&w.rgba)==255},o.ensureContrastRatio=function(w,y,E){const g=n.ensureContrastRatio(w.rgba,y.rgba,E);if(g)return v.toColor(g>>24&255,g>>16&255,g>>8&255)},o.opaque=function(w){const y=(255|w.rgba)>>>0;return[h,p,m]=n.toChannels(y),{css:v.toCss(h,p,m),rgba:y}},o.opacity=f,o.multiplyOpacity=function(w,y){return u=255&w.rgba,f(w,u*y/255)},o.toColorRGB=function(w){return[w.rgba>>24&255,w.rgba>>16&255,w.rgba>>8&255]}})(S||(c.color=S={})),(function(o){let f,w;try{const y=document.createElement("canvas");y.width=1,y.height=1;const E=y.getContext("2d",{willReadFrequently:!0});E&&(f=E,f.globalCompositeOperation="copy",w=f.createLinearGradient(0,0,1,1))}catch{}o.toColor=function(y){if(y.match(/#[\da-f]{3,8}/i))switch(y.length){case 4:return h=parseInt(y.slice(1,2).repeat(2),16),p=parseInt(y.slice(2,3).repeat(2),16),m=parseInt(y.slice(3,4).repeat(2),16),v.toColor(h,p,m);case 5:return h=parseInt(y.slice(1,2).repeat(2),16),p=parseInt(y.slice(2,3).repeat(2),16),m=parseInt(y.slice(3,4).repeat(2),16),u=parseInt(y.slice(4,5).repeat(2),16),v.toColor(h,p,m,u);case 7:return{css:y,rgba:(parseInt(y.slice(1),16)<<8|255)>>>0};case 9:return{css:y,rgba:parseInt(y.slice(1),16)>>>0}}const E=y.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(E)return h=parseInt(E[1]),p=parseInt(E[2]),m=parseInt(E[3]),u=Math.round(255*(E[5]===void 0?1:parseFloat(E[5]))),v.toColor(h,p,m,u);if(!f||!w)throw new Error("css.toColor: Unsupported css format");if(f.fillStyle=w,f.fillStyle=y,typeof f.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(f.fillRect(0,0,1,1),[h,p,m,u]=f.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:v.toRgba(h,p,m,u),css:y}}})(x||(c.css=x={})),(function(o){function f(w,y,E){const g=w/255,R=y/255,B=E/255;return .2126*(g<=.03928?g/12.92:Math.pow((g+.055)/1.055,2.4))+.7152*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.0722*(B<=.03928?B/12.92:Math.pow((B+.055)/1.055,2.4))}o.relativeLuminance=function(w){return f(w>>16&255,w>>8&255,255&w)},o.relativeLuminance2=f})(_||(c.rgb=_={})),(function(o){function f(y,E,g){const R=y>>24&255,B=y>>16&255,O=y>>8&255;let j=E>>24&255,A=E>>16&255,G=E>>8&255,J=s(_.relativeLuminance2(j,A,G),_.relativeLuminance2(R,B,O));for(;J<g&&(j>0||A>0||G>0);)j-=Math.max(0,Math.ceil(.1*j)),A-=Math.max(0,Math.ceil(.1*A)),G-=Math.max(0,Math.ceil(.1*G)),J=s(_.relativeLuminance2(j,A,G),_.relativeLuminance2(R,B,O));return(j<<24|A<<16|G<<8|255)>>>0}function w(y,E,g){const R=y>>24&255,B=y>>16&255,O=y>>8&255;let j=E>>24&255,A=E>>16&255,G=E>>8&255,J=s(_.relativeLuminance2(j,A,G),_.relativeLuminance2(R,B,O));for(;J<g&&(j<255||A<255||G<255);)j=Math.min(255,j+Math.ceil(.1*(255-j))),A=Math.min(255,A+Math.ceil(.1*(255-A))),G=Math.min(255,G+Math.ceil(.1*(255-G))),J=s(_.relativeLuminance2(j,A,G),_.relativeLuminance2(R,B,O));return(j<<24|A<<16|G<<8|255)>>>0}o.blend=function(y,E){if(u=(255&E)/255,u===1)return E;const g=E>>24&255,R=E>>16&255,B=E>>8&255,O=y>>24&255,j=y>>16&255,A=y>>8&255;return h=O+Math.round((g-O)*u),p=j+Math.round((R-j)*u),m=A+Math.round((B-A)*u),v.toRgba(h,p,m)},o.ensureContrastRatio=function(y,E,g){const R=_.relativeLuminance(y>>8),B=_.relativeLuminance(E>>8);if(s(R,B)<g){if(B<R){const A=f(y,E,g),G=s(R,_.relativeLuminance(A>>8));if(G<g){const J=w(y,E,g);return G>s(R,_.relativeLuminance(J>>8))?A:J}return A}const O=w(y,E,g),j=s(R,_.relativeLuminance(O>>8));if(j<g){const A=f(y,E,g);return j>s(R,_.relativeLuminance(A>>8))?O:A}return O}},o.reduceLuminance=f,o.increaseLuminance=w,o.toChannels=function(y){return[y>>24&255,y>>16&255,y>>8&255,255&y]}})(n||(c.rgba=n={})),c.toPaddedHex=l,c.contrastRatio=s},8969:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CoreTerminal=void 0;const p=h(844),m=h(2585),u=h(4348),v=h(7866),S=h(744),x=h(7302),_=h(6975),n=h(8460),l=h(1753),s=h(1480),o=h(7994),f=h(9282),w=h(5435),y=h(5981),E=h(2660);let g=!1;class R extends p.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new n.EventEmitter),this._onScroll.event((O=>{var j;(j=this._onScrollApi)==null||j.fire(O.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(O){for(const j in O)this.optionsService.options[j]=O[j]}constructor(O){super(),this._windowsWrappingHeuristics=this.register(new p.MutableDisposable),this._onBinary=this.register(new n.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new n.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new n.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new n.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new n.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new n.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new x.OptionsService(O)),this._instantiationService.setService(m.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(S.BufferService)),this._instantiationService.setService(m.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(v.LogService)),this._instantiationService.setService(m.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(_.CoreService)),this._instantiationService.setService(m.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(l.CoreMouseService)),this._instantiationService.setService(m.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(s.UnicodeService)),this._instantiationService.setService(m.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(o.CharsetService),this._instantiationService.setService(m.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(E.OscLinkService),this._instantiationService.setService(m.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new w.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,n.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,n.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,n.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,n.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((j=>{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((j=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new y.WriteBuffer(((j,A)=>this._inputHandler.parse(j,A)))),this.register((0,n.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(O,j){this._writeBuffer.write(O,j)}writeSync(O,j){this._logService.logLevel<=m.LogLevelEnum.WARN&&!g&&(this._logService.warn("writeSync is unreliable and will be removed soon."),g=!0),this._writeBuffer.writeSync(O,j)}input(O,j=!0){this.coreService.triggerDataEvent(O,j)}resize(O,j){isNaN(O)||isNaN(j)||(O=Math.max(O,S.MINIMUM_COLS),j=Math.max(j,S.MINIMUM_ROWS),this._bufferService.resize(O,j))}scroll(O,j=!1){this._bufferService.scroll(O,j)}scrollLines(O,j,A){this._bufferService.scrollLines(O,j,A)}scrollPages(O){this.scrollLines(O*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(O){const j=O-this._bufferService.buffer.ydisp;j!==0&&this.scrollLines(j)}registerEscHandler(O,j){return this._inputHandler.registerEscHandler(O,j)}registerDcsHandler(O,j){return this._inputHandler.registerDcsHandler(O,j)}registerCsiHandler(O,j){return this._inputHandler.registerCsiHandler(O,j)}registerOscHandler(O,j){return this._inputHandler.registerOscHandler(O,j)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let O=!1;const j=this.optionsService.rawOptions.windowsPty;j&&j.buildNumber!==void 0&&j.buildNumber!==void 0?O=j.backend==="conpty"&&j.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(O=!0),O?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const O=[];O.push(this.onLineFeed(f.updateWindowsModeWrappedState.bind(null,this._bufferService))),O.push(this.registerCsiHandler({final:"H"},(()=>((0,f.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,p.toDisposable)((()=>{for(const j of O)j.dispose()}))}}}c.CoreTerminal=R},8460:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.runAndSubscribe=c.forwardEvent=c.EventEmitter=void 0,c.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=h=>(this._listeners.push(h),{dispose:()=>{if(!this._disposed){for(let p=0;p<this._listeners.length;p++)if(this._listeners[p]===h)return void this._listeners.splice(p,1)}}})),this._event}fire(h,p){const m=[];for(let u=0;u<this._listeners.length;u++)m.push(this._listeners[u]);for(let u=0;u<m.length;u++)m[u].call(void 0,h,p)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},c.forwardEvent=function(h,p){return h((m=>p.fire(m)))},c.runAndSubscribe=function(h,p){return p(void 0),h((m=>p(m)))}},5435:function(K,c,h){var p=this&&this.__decorate||function(N,C,D,b){var T,Q=arguments.length,te=Q<3?C:b===null?b=Object.getOwnPropertyDescriptor(C,D):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")te=Reflect.decorate(N,C,D,b);else for(var ce=N.length-1;ce>=0;ce--)(T=N[ce])&&(te=(Q<3?T(te):Q>3?T(C,D,te):T(C,D))||te);return Q>3&&te&&Object.defineProperty(C,D,te),te},m=this&&this.__param||function(N,C){return function(D,b){C(D,b,N)}};Object.defineProperty(c,"__esModule",{value:!0}),c.InputHandler=c.WindowsOptionsReportType=void 0;const u=h(2584),v=h(7116),S=h(2015),x=h(844),_=h(482),n=h(8437),l=h(8460),s=h(643),o=h(511),f=h(3734),w=h(2585),y=h(1480),E=h(6242),g=h(6351),R=h(5941),B={"(":0,")":1,"*":2,"+":3,"-":1,".":2},O=131072;function j(N,C){if(N>24)return C.setWinLines||!1;switch(N){case 1:return!!C.restoreWin;case 2:return!!C.minimizeWin;case 3:return!!C.setWinPosition;case 4:return!!C.setWinSizePixels;case 5:return!!C.raiseWin;case 6:return!!C.lowerWin;case 7:return!!C.refreshWin;case 8:return!!C.setWinSizeChars;case 9:return!!C.maximizeWin;case 10:return!!C.fullscreenWin;case 11:return!!C.getWinState;case 13:return!!C.getWinPosition;case 14:return!!C.getWinSizePixels;case 15:return!!C.getScreenSizePixels;case 16:return!!C.getCellSizePixels;case 18:return!!C.getWinSizeChars;case 19:return!!C.getScreenSizeChars;case 20:return!!C.getIconTitle;case 21:return!!C.getWinTitle;case 22:return!!C.pushTitle;case 23:return!!C.popTitle;case 24:return!!C.setWinLines}return!1}var A;(function(N){N[N.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",N[N.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(A||(c.WindowsOptionsReportType=A={}));let G=0;class J extends x.Disposable{getAttrData(){return this._curAttrData}constructor(C,D,b,T,Q,te,ce,ue,H=new S.EscapeSequenceParser){super(),this._bufferService=C,this._charsetService=D,this._coreService=b,this._logService=T,this._optionsService=Q,this._oscLinkService=te,this._coreMouseService=ce,this._unicodeService=ue,this._parser=H,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new _.StringToUtf32,this._utf8Decoder=new _.Utf8ToUtf32,this._workCell=new o.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=n.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=n.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new l.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new l.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new l.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new l.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new l.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new l.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new l.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new l.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new l.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new l.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new l.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new l.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new l.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 se(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((L=>this._activeBuffer=L.activeBuffer))),this._parser.setCsiHandlerFallback(((L,Y)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(L),params:Y.toArray()})})),this._parser.setEscHandlerFallback((L=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(L)})})),this._parser.setExecuteHandlerFallback((L=>{this._logService.debug("Unknown EXECUTE code: ",{code:L})})),this._parser.setOscHandlerFallback(((L,Y,X)=>{this._logService.debug("Unknown OSC code: ",{identifier:L,action:Y,data:X})})),this._parser.setDcsHandlerFallback(((L,Y,X)=>{Y==="HOOK"&&(X=X.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(L),action:Y,payload:X})})),this._parser.setPrintHandler(((L,Y,X)=>this.print(L,Y,X))),this._parser.registerCsiHandler({final:"@"},(L=>this.insertChars(L))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(L=>this.scrollLeft(L))),this._parser.registerCsiHandler({final:"A"},(L=>this.cursorUp(L))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(L=>this.scrollRight(L))),this._parser.registerCsiHandler({final:"B"},(L=>this.cursorDown(L))),this._parser.registerCsiHandler({final:"C"},(L=>this.cursorForward(L))),this._parser.registerCsiHandler({final:"D"},(L=>this.cursorBackward(L))),this._parser.registerCsiHandler({final:"E"},(L=>this.cursorNextLine(L))),this._parser.registerCsiHandler({final:"F"},(L=>this.cursorPrecedingLine(L))),this._parser.registerCsiHandler({final:"G"},(L=>this.cursorCharAbsolute(L))),this._parser.registerCsiHandler({final:"H"},(L=>this.cursorPosition(L))),this._parser.registerCsiHandler({final:"I"},(L=>this.cursorForwardTab(L))),this._parser.registerCsiHandler({final:"J"},(L=>this.eraseInDisplay(L,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(L=>this.eraseInDisplay(L,!0))),this._parser.registerCsiHandler({final:"K"},(L=>this.eraseInLine(L,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(L=>this.eraseInLine(L,!0))),this._parser.registerCsiHandler({final:"L"},(L=>this.insertLines(L))),this._parser.registerCsiHandler({final:"M"},(L=>this.deleteLines(L))),this._parser.registerCsiHandler({final:"P"},(L=>this.deleteChars(L))),this._parser.registerCsiHandler({final:"S"},(L=>this.scrollUp(L))),this._parser.registerCsiHandler({final:"T"},(L=>this.scrollDown(L))),this._parser.registerCsiHandler({final:"X"},(L=>this.eraseChars(L))),this._parser.registerCsiHandler({final:"Z"},(L=>this.cursorBackwardTab(L))),this._parser.registerCsiHandler({final:"`"},(L=>this.charPosAbsolute(L))),this._parser.registerCsiHandler({final:"a"},(L=>this.hPositionRelative(L))),this._parser.registerCsiHandler({final:"b"},(L=>this.repeatPrecedingCharacter(L))),this._parser.registerCsiHandler({final:"c"},(L=>this.sendDeviceAttributesPrimary(L))),this._parser.registerCsiHandler({prefix:">",final:"c"},(L=>this.sendDeviceAttributesSecondary(L))),this._parser.registerCsiHandler({final:"d"},(L=>this.linePosAbsolute(L))),this._parser.registerCsiHandler({final:"e"},(L=>this.vPositionRelative(L))),this._parser.registerCsiHandler({final:"f"},(L=>this.hVPosition(L))),this._parser.registerCsiHandler({final:"g"},(L=>this.tabClear(L))),this._parser.registerCsiHandler({final:"h"},(L=>this.setMode(L))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(L=>this.setModePrivate(L))),this._parser.registerCsiHandler({final:"l"},(L=>this.resetMode(L))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(L=>this.resetModePrivate(L))),this._parser.registerCsiHandler({final:"m"},(L=>this.charAttributes(L))),this._parser.registerCsiHandler({final:"n"},(L=>this.deviceStatus(L))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(L=>this.deviceStatusPrivate(L))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(L=>this.softReset(L))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(L=>this.setCursorStyle(L))),this._parser.registerCsiHandler({final:"r"},(L=>this.setScrollRegion(L))),this._parser.registerCsiHandler({final:"s"},(L=>this.saveCursor(L))),this._parser.registerCsiHandler({final:"t"},(L=>this.windowOptions(L))),this._parser.registerCsiHandler({final:"u"},(L=>this.restoreCursor(L))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(L=>this.insertColumns(L))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(L=>this.deleteColumns(L))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(L=>this.selectProtected(L))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(L=>this.requestMode(L,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(L=>this.requestMode(L,!1))),this._parser.setExecuteHandler(u.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(u.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(u.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(u.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(u.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(u.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(u.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(u.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(u.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new E.OscHandler((L=>(this.setTitle(L),this.setIconName(L),!0)))),this._parser.registerOscHandler(1,new E.OscHandler((L=>this.setIconName(L)))),this._parser.registerOscHandler(2,new E.OscHandler((L=>this.setTitle(L)))),this._parser.registerOscHandler(4,new E.OscHandler((L=>this.setOrReportIndexedColor(L)))),this._parser.registerOscHandler(8,new E.OscHandler((L=>this.setHyperlink(L)))),this._parser.registerOscHandler(10,new E.OscHandler((L=>this.setOrReportFgColor(L)))),this._parser.registerOscHandler(11,new E.OscHandler((L=>this.setOrReportBgColor(L)))),this._parser.registerOscHandler(12,new E.OscHandler((L=>this.setOrReportCursorColor(L)))),this._parser.registerOscHandler(104,new E.OscHandler((L=>this.restoreIndexedColor(L)))),this._parser.registerOscHandler(110,new E.OscHandler((L=>this.restoreFgColor(L)))),this._parser.registerOscHandler(111,new E.OscHandler((L=>this.restoreBgColor(L)))),this._parser.registerOscHandler(112,new E.OscHandler((L=>this.restoreCursorColor(L)))),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 L in v.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:L},(()=>this.selectCharset("("+L))),this._parser.registerEscHandler({intermediates:")",final:L},(()=>this.selectCharset(")"+L))),this._parser.registerEscHandler({intermediates:"*",final:L},(()=>this.selectCharset("*"+L))),this._parser.registerEscHandler({intermediates:"+",final:L},(()=>this.selectCharset("+"+L))),this._parser.registerEscHandler({intermediates:"-",final:L},(()=>this.selectCharset("-"+L))),this._parser.registerEscHandler({intermediates:".",final:L},(()=>this.selectCharset("."+L))),this._parser.registerEscHandler({intermediates:"/",final:L},(()=>this.selectCharset("/"+L)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((L=>(this._logService.error("Parsing error: ",L),L))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new g.DcsHandler(((L,Y)=>this.requestStatusString(L,Y))))}_preserveStack(C,D,b,T){this._parseStack.paused=!0,this._parseStack.cursorStartX=C,this._parseStack.cursorStartY=D,this._parseStack.decodedLength=b,this._parseStack.position=T}_logSlowResolvingAsync(C){this._logService.logLevel<=w.LogLevelEnum.WARN&&Promise.race([C,new Promise(((D,b)=>setTimeout((()=>b("#SLOW_TIMEOUT")),5e3)))]).catch((D=>{if(D!=="#SLOW_TIMEOUT")throw D;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(C,D){let b,T=this._activeBuffer.x,Q=this._activeBuffer.y,te=0;const ce=this._parseStack.paused;if(ce){if(b=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,D))return this._logSlowResolvingAsync(b),b;T=this._parseStack.cursorStartX,Q=this._parseStack.cursorStartY,this._parseStack.paused=!1,C.length>O&&(te=this._parseStack.position+O)}if(this._logService.logLevel<=w.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof C=="string"?` "${C}"`:` "${Array.prototype.map.call(C,(L=>String.fromCharCode(L))).join("")}"`),typeof C=="string"?C.split("").map((L=>L.charCodeAt(0))):C),this._parseBuffer.length<C.length&&this._parseBuffer.length<O&&(this._parseBuffer=new Uint32Array(Math.min(C.length,O))),ce||this._dirtyRowTracker.clearRange(),C.length>O)for(let L=te;L<C.length;L+=O){const Y=L+O<C.length?L+O:C.length,X=typeof C=="string"?this._stringDecoder.decode(C.substring(L,Y),this._parseBuffer):this._utf8Decoder.decode(C.subarray(L,Y),this._parseBuffer);if(b=this._parser.parse(this._parseBuffer,X))return this._preserveStack(T,Q,X,L),this._logSlowResolvingAsync(b),b}else if(!ce){const L=typeof C=="string"?this._stringDecoder.decode(C,this._parseBuffer):this._utf8Decoder.decode(C,this._parseBuffer);if(b=this._parser.parse(this._parseBuffer,L))return this._preserveStack(T,Q,L,0),this._logSlowResolvingAsync(b),b}this._activeBuffer.x===T&&this._activeBuffer.y===Q||this._onCursorMove.fire();const ue=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),H=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);H<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(H,this._bufferService.rows-1),Math.min(ue,this._bufferService.rows-1))}print(C,D,b){let T,Q;const te=this._charsetService.charset,ce=this._optionsService.rawOptions.screenReaderMode,ue=this._bufferService.cols,H=this._coreService.decPrivateModes.wraparound,L=this._coreService.modes.insertMode,Y=this._curAttrData;let X=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&b-D>0&&X.getWidth(this._activeBuffer.x-1)===2&&X.setCellFromCodepoint(this._activeBuffer.x-1,0,1,Y);let de=this._parser.precedingJoinState;for(let he=D;he<b;++he){if(T=C[he],T<127&&te){const Ke=te[String.fromCharCode(T)];Ke&&(T=Ke.charCodeAt(0))}const xe=this._unicodeService.charProperties(T,de);Q=y.UnicodeService.extractWidth(xe);const Le=y.UnicodeService.extractShouldJoin(xe),Te=Le?y.UnicodeService.extractWidth(de):0;if(de=xe,ce&&this._onA11yChar.fire((0,_.stringFromCodePoint)(T)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+Q-Te>ue){if(H){const Ke=X;let ye=this._activeBuffer.x-Te;for(this._activeBuffer.x=Te,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),X=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Te>0&&X instanceof n.BufferLine&&X.copyCellsFrom(Ke,ye,0,Te,!1);ye<ue;)Ke.setCellFromCodepoint(ye++,0,1,Y)}else if(this._activeBuffer.x=ue-1,Q===2)continue}if(Le&&this._activeBuffer.x){const Ke=X.getWidth(this._activeBuffer.x-1)?1:2;X.addCodepointToCell(this._activeBuffer.x-Ke,T,Q);for(let ye=Q-Te;--ye>=0;)X.setCellFromCodepoint(this._activeBuffer.x++,0,0,Y)}else if(L&&(X.insertCells(this._activeBuffer.x,Q-Te,this._activeBuffer.getNullCell(Y)),X.getWidth(ue-1)===2&&X.setCellFromCodepoint(ue-1,s.NULL_CELL_CODE,s.NULL_CELL_WIDTH,Y)),X.setCellFromCodepoint(this._activeBuffer.x++,T,Q,Y),Q>0)for(;--Q;)X.setCellFromCodepoint(this._activeBuffer.x++,0,0,Y)}this._parser.precedingJoinState=de,this._activeBuffer.x<ue&&b-D>0&&X.getWidth(this._activeBuffer.x)===0&&!X.hasContent(this._activeBuffer.x)&&X.setCellFromCodepoint(this._activeBuffer.x,0,1,Y),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(C,D){return C.final!=="t"||C.prefix||C.intermediates?this._parser.registerCsiHandler(C,D):this._parser.registerCsiHandler(C,(b=>!j(b.params[0],this._optionsService.rawOptions.windowOptions)||D(b)))}registerDcsHandler(C,D){return this._parser.registerDcsHandler(C,new g.DcsHandler(D))}registerEscHandler(C,D){return this._parser.registerEscHandler(C,D)}registerOscHandler(C,D){return this._parser.registerOscHandler(C,new E.OscHandler(D))}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 C;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&&((C=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&C.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);D.hasWidth(this._activeBuffer.x)&&!D.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const C=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-C),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(C=this._bufferService.cols-1){this._activeBuffer.x=Math.min(C,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(C,D){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=C,this._activeBuffer.y=this._activeBuffer.scrollTop+D):(this._activeBuffer.x=C,this._activeBuffer.y=D),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(C,D){this._restrictCursor(),this._setCursor(this._activeBuffer.x+C,this._activeBuffer.y+D)}cursorUp(C){const D=this._activeBuffer.y-this._activeBuffer.scrollTop;return D>=0?this._moveCursor(0,-Math.min(D,C.params[0]||1)):this._moveCursor(0,-(C.params[0]||1)),!0}cursorDown(C){const D=this._activeBuffer.scrollBottom-this._activeBuffer.y;return D>=0?this._moveCursor(0,Math.min(D,C.params[0]||1)):this._moveCursor(0,C.params[0]||1),!0}cursorForward(C){return this._moveCursor(C.params[0]||1,0),!0}cursorBackward(C){return this._moveCursor(-(C.params[0]||1),0),!0}cursorNextLine(C){return this.cursorDown(C),this._activeBuffer.x=0,!0}cursorPrecedingLine(C){return this.cursorUp(C),this._activeBuffer.x=0,!0}cursorCharAbsolute(C){return this._setCursor((C.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(C){return this._setCursor(C.length>=2?(C.params[1]||1)-1:0,(C.params[0]||1)-1),!0}charPosAbsolute(C){return this._setCursor((C.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(C){return this._moveCursor(C.params[0]||1,0),!0}linePosAbsolute(C){return this._setCursor(this._activeBuffer.x,(C.params[0]||1)-1),!0}vPositionRelative(C){return this._moveCursor(0,C.params[0]||1),!0}hVPosition(C){return this.cursorPosition(C),!0}tabClear(C){const D=C.params[0];return D===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:D===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(C){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let D=C.params[0]||1;for(;D--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(C){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let D=C.params[0]||1;for(;D--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(C){const D=C.params[0];return D===1&&(this._curAttrData.bg|=536870912),D!==2&&D!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(C,D,b,T=!1,Q=!1){const te=this._activeBuffer.lines.get(this._activeBuffer.ybase+C);te.replaceCells(D,b,this._activeBuffer.getNullCell(this._eraseAttrData()),Q),T&&(te.isWrapped=!1)}_resetBufferLine(C,D=!1){const b=this._activeBuffer.lines.get(this._activeBuffer.ybase+C);b&&(b.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),D),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+C),b.isWrapped=!1)}eraseInDisplay(C,D=!1){let b;switch(this._restrictCursor(this._bufferService.cols),C.params[0]){case 0:for(b=this._activeBuffer.y,this._dirtyRowTracker.markDirty(b),this._eraseInBufferLine(b++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,D);b<this._bufferService.rows;b++)this._resetBufferLine(b,D);this._dirtyRowTracker.markDirty(b);break;case 1:for(b=this._activeBuffer.y,this._dirtyRowTracker.markDirty(b),this._eraseInBufferLine(b,0,this._activeBuffer.x+1,!0,D),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(b+1).isWrapped=!1);b--;)this._resetBufferLine(b,D);this._dirtyRowTracker.markDirty(0);break;case 2:for(b=this._bufferService.rows,this._dirtyRowTracker.markDirty(b-1);b--;)this._resetBufferLine(b,D);this._dirtyRowTracker.markDirty(0);break;case 3:const T=this._activeBuffer.lines.length-this._bufferService.rows;T>0&&(this._activeBuffer.lines.trimStart(T),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-T,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-T,0),this._onScroll.fire(0))}return!0}eraseInLine(C,D=!1){switch(this._restrictCursor(this._bufferService.cols),C.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,D);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,D);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,D)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(C){this._restrictCursor();let D=C.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const b=this._activeBuffer.ybase+this._activeBuffer.y,T=this._bufferService.rows-1-this._activeBuffer.scrollBottom,Q=this._bufferService.rows-1+this._activeBuffer.ybase-T+1;for(;D--;)this._activeBuffer.lines.splice(Q-1,1),this._activeBuffer.lines.splice(b,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(C){this._restrictCursor();let D=C.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const b=this._activeBuffer.ybase+this._activeBuffer.y;let T;for(T=this._bufferService.rows-1-this._activeBuffer.scrollBottom,T=this._bufferService.rows-1+this._activeBuffer.ybase-T;D--;)this._activeBuffer.lines.splice(b,1),this._activeBuffer.lines.splice(T,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(C){this._restrictCursor();const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.insertCells(this._activeBuffer.x,C.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(C){this._restrictCursor();const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.deleteCells(this._activeBuffer.x,C.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(C){let D=C.params[0]||1;for(;D--;)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(C){let D=C.params[0]||1;for(;D--;)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(n.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(C){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=C.params[0]||1;for(let b=this._activeBuffer.scrollTop;b<=this._activeBuffer.scrollBottom;++b){const T=this._activeBuffer.lines.get(this._activeBuffer.ybase+b);T.deleteCells(0,D,this._activeBuffer.getNullCell(this._eraseAttrData())),T.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(C){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=C.params[0]||1;for(let b=this._activeBuffer.scrollTop;b<=this._activeBuffer.scrollBottom;++b){const T=this._activeBuffer.lines.get(this._activeBuffer.ybase+b);T.insertCells(0,D,this._activeBuffer.getNullCell(this._eraseAttrData())),T.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(C){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=C.params[0]||1;for(let b=this._activeBuffer.scrollTop;b<=this._activeBuffer.scrollBottom;++b){const T=this._activeBuffer.lines.get(this._activeBuffer.ybase+b);T.insertCells(this._activeBuffer.x,D,this._activeBuffer.getNullCell(this._eraseAttrData())),T.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(C){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=C.params[0]||1;for(let b=this._activeBuffer.scrollTop;b<=this._activeBuffer.scrollBottom;++b){const T=this._activeBuffer.lines.get(this._activeBuffer.ybase+b);T.deleteCells(this._activeBuffer.x,D,this._activeBuffer.getNullCell(this._eraseAttrData())),T.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(C){this._restrictCursor();const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(C.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(C){const D=this._parser.precedingJoinState;if(!D)return!0;const b=C.params[0]||1,T=y.UnicodeService.extractWidth(D),Q=this._activeBuffer.x-T,te=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(Q),ce=new Uint32Array(te.length*b);let ue=0;for(let L=0;L<te.length;){const Y=te.codePointAt(L)||0;ce[ue++]=Y,L+=Y>65535?2:1}let H=ue;for(let L=1;L<b;++L)ce.copyWithin(H,0,ue),H+=ue;return this.print(ce,0,H),!0}sendDeviceAttributesPrimary(C){return C.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(u.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(u.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(C){return C.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(u.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(u.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(C.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(C){return(this._optionsService.rawOptions.termName+"").indexOf(C)===0}setMode(C){for(let D=0;D<C.length;D++)switch(C.params[D]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(C){for(let D=0;D<C.length;D++)switch(C.params[D]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,v.DEFAULT_CHARSET),this._charsetService.setgCharset(1,v.DEFAULT_CHARSET),this._charsetService.setgCharset(2,v.DEFAULT_CHARSET),this._charsetService.setgCharset(3,v.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(C){for(let D=0;D<C.length;D++)switch(C.params[D]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(C){for(let D=0;D<C.length;D++)switch(C.params[D]){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(),C.params[D]===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(C,D){const b=this._coreService.decPrivateModes,{activeProtocol:T,activeEncoding:Q}=this._coreMouseService,te=this._coreService,{buffers:ce,cols:ue}=this._bufferService,{active:H,alt:L}=ce,Y=this._optionsService.rawOptions,X=Le=>Le?1:2,de=C.params[0];return he=de,xe=D?de===2?4:de===4?X(te.modes.insertMode):de===12?3:de===20?X(Y.convertEol):0:de===1?X(b.applicationCursorKeys):de===3?Y.windowOptions.setWinLines?ue===80?2:ue===132?1:0:0:de===6?X(b.origin):de===7?X(b.wraparound):de===8?3:de===9?X(T==="X10"):de===12?X(Y.cursorBlink):de===25?X(!te.isCursorHidden):de===45?X(b.reverseWraparound):de===66?X(b.applicationKeypad):de===67?4:de===1e3?X(T==="VT200"):de===1002?X(T==="DRAG"):de===1003?X(T==="ANY"):de===1004?X(b.sendFocus):de===1005?4:de===1006?X(Q==="SGR"):de===1015?4:de===1016?X(Q==="SGR_PIXELS"):de===1048?1:de===47||de===1047||de===1049?X(H===L):de===2004?X(b.bracketedPasteMode):0,te.triggerDataEvent(`${u.C0.ESC}[${D?"":"?"}${he};${xe}$y`),!0;var he,xe}_updateAttrColor(C,D,b,T,Q){return D===2?(C|=50331648,C&=-16777216,C|=f.AttributeData.fromColorRGB([b,T,Q])):D===5&&(C&=-50331904,C|=33554432|255&b),C}_extractColor(C,D,b){const T=[0,0,-1,0,0,0];let Q=0,te=0;do{if(T[te+Q]=C.params[D+te],C.hasSubParams(D+te)){const ce=C.getSubParams(D+te);let ue=0;do T[1]===5&&(Q=1),T[te+ue+1+Q]=ce[ue];while(++ue<ce.length&&ue+te+1+Q<T.length);break}if(T[1]===5&&te+Q>=2||T[1]===2&&te+Q>=5)break;T[1]&&(Q=1)}while(++te+D<C.length&&te+Q<T.length);for(let ce=2;ce<T.length;++ce)T[ce]===-1&&(T[ce]=0);switch(T[0]){case 38:b.fg=this._updateAttrColor(b.fg,T[1],T[3],T[4],T[5]);break;case 48:b.bg=this._updateAttrColor(b.bg,T[1],T[3],T[4],T[5]);break;case 58:b.extended=b.extended.clone(),b.extended.underlineColor=this._updateAttrColor(b.extended.underlineColor,T[1],T[3],T[4],T[5])}return te}_processUnderline(C,D){D.extended=D.extended.clone(),(!~C||C>5)&&(C=1),D.extended.underlineStyle=C,D.fg|=268435456,C===0&&(D.fg&=-268435457),D.updateExtended()}_processSGR0(C){C.fg=n.DEFAULT_ATTR_DATA.fg,C.bg=n.DEFAULT_ATTR_DATA.bg,C.extended=C.extended.clone(),C.extended.underlineStyle=0,C.extended.underlineColor&=-67108864,C.updateExtended()}charAttributes(C){if(C.length===1&&C.params[0]===0)return this._processSGR0(this._curAttrData),!0;const D=C.length;let b;const T=this._curAttrData;for(let Q=0;Q<D;Q++)b=C.params[Q],b>=30&&b<=37?(T.fg&=-50331904,T.fg|=16777216|b-30):b>=40&&b<=47?(T.bg&=-50331904,T.bg|=16777216|b-40):b>=90&&b<=97?(T.fg&=-50331904,T.fg|=16777224|b-90):b>=100&&b<=107?(T.bg&=-50331904,T.bg|=16777224|b-100):b===0?this._processSGR0(T):b===1?T.fg|=134217728:b===3?T.bg|=67108864:b===4?(T.fg|=268435456,this._processUnderline(C.hasSubParams(Q)?C.getSubParams(Q)[0]:1,T)):b===5?T.fg|=536870912:b===7?T.fg|=67108864:b===8?T.fg|=1073741824:b===9?T.fg|=2147483648:b===2?T.bg|=134217728:b===21?this._processUnderline(2,T):b===22?(T.fg&=-134217729,T.bg&=-134217729):b===23?T.bg&=-67108865:b===24?(T.fg&=-268435457,this._processUnderline(0,T)):b===25?T.fg&=-536870913:b===27?T.fg&=-67108865:b===28?T.fg&=-1073741825:b===29?T.fg&=2147483647:b===39?(T.fg&=-67108864,T.fg|=16777215&n.DEFAULT_ATTR_DATA.fg):b===49?(T.bg&=-67108864,T.bg|=16777215&n.DEFAULT_ATTR_DATA.bg):b===38||b===48||b===58?Q+=this._extractColor(C,Q,T):b===53?T.bg|=1073741824:b===55?T.bg&=-1073741825:b===59?(T.extended=T.extended.clone(),T.extended.underlineColor=-1,T.updateExtended()):b===100?(T.fg&=-67108864,T.fg|=16777215&n.DEFAULT_ATTR_DATA.fg,T.bg&=-67108864,T.bg|=16777215&n.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",b);return!0}deviceStatus(C){switch(C.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:const D=this._activeBuffer.y+1,b=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${D};${b}R`)}return!0}deviceStatusPrivate(C){if(C.params[0]===6){const D=this._activeBuffer.y+1,b=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${D};${b}R`)}return!0}softReset(C){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=n.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(C){const D=C.params[0]||1;switch(D){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const b=D%2==1;return this._optionsService.options.cursorBlink=b,!0}setScrollRegion(C){const D=C.params[0]||1;let b;return(C.length<2||(b=C.params[1])>this._bufferService.rows||b===0)&&(b=this._bufferService.rows),b>D&&(this._activeBuffer.scrollTop=D-1,this._activeBuffer.scrollBottom=b-1,this._setCursor(0,0)),!0}windowOptions(C){if(!j(C.params[0],this._optionsService.rawOptions.windowOptions))return!0;const D=C.length>1?C.params[1]:0;switch(C.params[0]){case 14:D!==2&&this._onRequestWindowsOptionsReport.fire(A.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(A.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${u.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:D!==0&&D!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),D!==0&&D!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:D!==0&&D!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),D!==0&&D!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(C){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(C){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(C){return this._windowTitle=C,this._onTitleChange.fire(C),!0}setIconName(C){return this._iconName=C,!0}setOrReportIndexedColor(C){const D=[],b=C.split(";");for(;b.length>1;){const T=b.shift(),Q=b.shift();if(/^\d+$/.exec(T)){const te=parseInt(T);if(le(te))if(Q==="?")D.push({type:0,index:te});else{const ce=(0,R.parseColor)(Q);ce&&D.push({type:1,index:te,color:ce})}}}return D.length&&this._onColor.fire(D),!0}setHyperlink(C){const D=C.split(";");return!(D.length<2)&&(D[1]?this._createHyperlink(D[0],D[1]):!D[0]&&this._finishHyperlink())}_createHyperlink(C,D){this._getCurrentLinkId()&&this._finishHyperlink();const b=C.split(":");let T;const Q=b.findIndex((te=>te.startsWith("id=")));return Q!==-1&&(T=b[Q].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:T,uri:D}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(C,D){const b=C.split(";");for(let T=0;T<b.length&&!(D>=this._specialColors.length);++T,++D)if(b[T]==="?")this._onColor.fire([{type:0,index:this._specialColors[D]}]);else{const Q=(0,R.parseColor)(b[T]);Q&&this._onColor.fire([{type:1,index:this._specialColors[D],color:Q}])}return!0}setOrReportFgColor(C){return this._setOrReportSpecialColor(C,0)}setOrReportBgColor(C){return this._setOrReportSpecialColor(C,1)}setOrReportCursorColor(C){return this._setOrReportSpecialColor(C,2)}restoreIndexedColor(C){if(!C)return this._onColor.fire([{type:2}]),!0;const D=[],b=C.split(";");for(let T=0;T<b.length;++T)if(/^\d+$/.exec(b[T])){const Q=parseInt(b[T]);le(Q)&&D.push({type:2,index:Q})}return D.length&&this._onColor.fire(D),!0}restoreFgColor(C){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(C){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(C){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,v.DEFAULT_CHARSET),!0}selectCharset(C){return C.length!==2?(this.selectDefaultCharset(),!0):(C[0]==="/"||this._charsetService.setgCharset(B[C[0]],v.CHARSETS[C[1]]||v.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 C=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,C,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=n.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=n.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(C){return this._charsetService.setgLevel(C),!0}screenAlignmentPattern(){const C=new o.CellData;C.content=4194373,C.fg=this._curAttrData.fg,C.bg=this._curAttrData.bg,this._setCursor(0,0);for(let D=0;D<this._bufferService.rows;++D){const b=this._activeBuffer.ybase+this._activeBuffer.y+D,T=this._activeBuffer.lines.get(b);T&&(T.fill(C),T.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(C,D){const b=this._bufferService.buffer,T=this._optionsService.rawOptions;return(Q=>(this._coreService.triggerDataEvent(`${u.C0.ESC}${Q}${u.C0.ESC}\\`),!0))(C==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:C==='"p'?'P1$r61;1"p':C==="r"?`P1$r${b.scrollTop+1};${b.scrollBottom+1}r`:C==="m"?"P1$r0m":C===" q"?`P1$r${{block:2,underline:4,bar:6}[T.cursorStyle]-(T.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(C,D){this._dirtyRowTracker.markRangeDirty(C,D)}}c.InputHandler=J;let se=class{constructor(N){this._bufferService=N,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(N){N<this.start?this.start=N:N>this.end&&(this.end=N)}markRangeDirty(N,C){N>C&&(G=N,N=C,C=G),N<this.start&&(this.start=N),C>this.end&&(this.end=C)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function le(N){return 0<=N&&N<256}se=p([m(0,w.IBufferService)],se)},844:(K,c)=>{function h(p){for(const m of p)m.dispose();p.length=0}Object.defineProperty(c,"__esModule",{value:!0}),c.getDisposeArrayDisposable=c.disposeArray=c.toDisposable=c.MutableDisposable=c.Disposable=void 0,c.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const p of this._disposables)p.dispose();this._disposables.length=0}register(p){return this._disposables.push(p),p}unregister(p){const m=this._disposables.indexOf(p);m!==-1&&this._disposables.splice(m,1)}},c.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(p){var m;this._isDisposed||p===this._value||((m=this._value)==null||m.dispose(),this._value=p)}clear(){this.value=void 0}dispose(){var p;this._isDisposed=!0,(p=this._value)==null||p.dispose(),this._value=void 0}},c.toDisposable=function(p){return{dispose:p}},c.disposeArray=h,c.getDisposeArrayDisposable=function(p){return{dispose:()=>h(p)}}},1505:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.FourKeyMap=c.TwoKeyMap=void 0;class h{constructor(){this._data={}}set(m,u,v){this._data[m]||(this._data[m]={}),this._data[m][u]=v}get(m,u){return this._data[m]?this._data[m][u]:void 0}clear(){this._data={}}}c.TwoKeyMap=h,c.FourKeyMap=class{constructor(){this._data=new h}set(p,m,u,v,S){this._data.get(p,m)||this._data.set(p,m,new h),this._data.get(p,m).set(u,v,S)}get(p,m,u,v){var S;return(S=this._data.get(p,m))==null?void 0:S.get(u,v)}clear(){this._data.clear()}}},6114:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.isChromeOS=c.isLinux=c.isWindows=c.isIphone=c.isIpad=c.isMac=c.getSafariVersion=c.isSafari=c.isLegacyEdge=c.isFirefox=c.isNode=void 0,c.isNode=typeof process<"u"&&"title"in process;const h=c.isNode?"node":navigator.userAgent,p=c.isNode?"node":navigator.platform;c.isFirefox=h.includes("Firefox"),c.isLegacyEdge=h.includes("Edge"),c.isSafari=/^((?!chrome|android).)*safari/i.test(h),c.getSafariVersion=function(){if(!c.isSafari)return 0;const m=h.match(/Version\/(\d+)/);return m===null||m.length<2?0:parseInt(m[1])},c.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(p),c.isIpad=p==="iPad",c.isIphone=p==="iPhone",c.isWindows=["Windows","Win16","Win32","WinCE"].includes(p),c.isLinux=p.indexOf("Linux")>=0,c.isChromeOS=/\bCrOS\b/.test(h)},6106:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.SortedList=void 0;let h=0;c.SortedList=class{constructor(p){this._getKey=p,this._array=[]}clear(){this._array.length=0}insert(p){this._array.length!==0?(h=this._search(this._getKey(p)),this._array.splice(h,0,p)):this._array.push(p)}delete(p){if(this._array.length===0)return!1;const m=this._getKey(p);if(m===void 0||(h=this._search(m),h===-1)||this._getKey(this._array[h])!==m)return!1;do if(this._array[h]===p)return this._array.splice(h,1),!0;while(++h<this._array.length&&this._getKey(this._array[h])===m);return!1}*getKeyIterator(p){if(this._array.length!==0&&(h=this._search(p),!(h<0||h>=this._array.length)&&this._getKey(this._array[h])===p))do yield this._array[h];while(++h<this._array.length&&this._getKey(this._array[h])===p)}forEachByKey(p,m){if(this._array.length!==0&&(h=this._search(p),!(h<0||h>=this._array.length)&&this._getKey(this._array[h])===p))do m(this._array[h]);while(++h<this._array.length&&this._getKey(this._array[h])===p)}values(){return[...this._array].values()}_search(p){let m=0,u=this._array.length-1;for(;u>=m;){let v=m+u>>1;const S=this._getKey(this._array[v]);if(S>p)u=v-1;else{if(!(S<p)){for(;v>0&&this._getKey(this._array[v-1])===p;)v--;return v}m=v+1}}return m}}},7226:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DebouncedIdleTask=c.IdleTaskQueue=c.PriorityTaskQueue=void 0;const p=h(6114);class m{constructor(){this._tasks=[],this._i=0}enqueue(S){this._tasks.push(S),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(S){this._idleCallback=void 0;let x=0,_=0,n=S.timeRemaining(),l=0;for(;this._i<this._tasks.length;){if(x=Date.now(),this._tasks[this._i]()||this._i++,x=Math.max(1,Date.now()-x),_=Math.max(x,_),l=S.timeRemaining(),1.5*_>l)return n-x<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(n-x))}ms`),void this._start();n=l}this.clear()}}class u extends m{_requestCallback(S){return setTimeout((()=>S(this._createDeadline(16))))}_cancelCallback(S){clearTimeout(S)}_createDeadline(S){const x=Date.now()+S;return{timeRemaining:()=>Math.max(0,x-Date.now())}}}c.PriorityTaskQueue=u,c.IdleTaskQueue=!p.isNode&&"requestIdleCallback"in window?class extends m{_requestCallback(v){return requestIdleCallback(v)}_cancelCallback(v){cancelIdleCallback(v)}}:u,c.DebouncedIdleTask=class{constructor(){this._queue=new c.IdleTaskQueue}set(v){this._queue.clear(),this._queue.enqueue(v)}flush(){this._queue.flush()}}},9282:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.updateWindowsModeWrappedState=void 0;const p=h(643);c.updateWindowsModeWrappedState=function(m){const u=m.buffer.lines.get(m.buffer.ybase+m.buffer.y-1),v=u==null?void 0:u.get(m.cols-1),S=m.buffer.lines.get(m.buffer.ybase+m.buffer.y);S&&v&&(S.isWrapped=v[p.CHAR_DATA_CODE_INDEX]!==p.NULL_CELL_CODE&&v[p.CHAR_DATA_CODE_INDEX]!==p.WHITESPACE_CELL_CODE)}},3734:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ExtendedAttrs=c.AttributeData=void 0;class h{constructor(){this.fg=0,this.bg=0,this.extended=new p}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){const u=new h;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}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}}c.AttributeData=h;class p{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){const u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,v=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=v}clone(){return new p(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}c.ExtendedAttrs=p},9092:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Buffer=c.MAX_BUFFER_SIZE=void 0;const p=h(6349),m=h(7226),u=h(3734),v=h(8437),S=h(4634),x=h(511),_=h(643),n=h(4863),l=h(7116);c.MAX_BUFFER_SIZE=4294967295,c.Buffer=class{constructor(s,o,f){this._hasScrollback=s,this._optionsService=o,this._bufferService=f,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=v.DEFAULT_ATTR_DATA.clone(),this.savedCharset=l.DEFAULT_CHARSET,this.markers=[],this._nullCell=x.CellData.fromCharData([0,_.NULL_CELL_CHAR,_.NULL_CELL_WIDTH,_.NULL_CELL_CODE]),this._whitespaceCell=x.CellData.fromCharData([0,_.WHITESPACE_CELL_CHAR,_.WHITESPACE_CELL_WIDTH,_.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new m.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new p.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(s){return s?(this._nullCell.fg=s.fg,this._nullCell.bg=s.bg,this._nullCell.extended=s.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new u.ExtendedAttrs),this._nullCell}getWhitespaceCell(s){return s?(this._whitespaceCell.fg=s.fg,this._whitespaceCell.bg=s.bg,this._whitespaceCell.extended=s.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new u.ExtendedAttrs),this._whitespaceCell}getBlankLine(s,o){return new v.BufferLine(this._bufferService.cols,this.getNullCell(s),o)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const s=this.ybase+this.y-this.ydisp;return s>=0&&s<this._rows}_getCorrectBufferLength(s){if(!this._hasScrollback)return s;const o=s+this._optionsService.rawOptions.scrollback;return o>c.MAX_BUFFER_SIZE?c.MAX_BUFFER_SIZE:o}fillViewportRows(s){if(this.lines.length===0){s===void 0&&(s=v.DEFAULT_ATTR_DATA);let o=this._rows;for(;o--;)this.lines.push(this.getBlankLine(s))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new p.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(s,o){const f=this.getNullCell(v.DEFAULT_ATTR_DATA);let w=0;const y=this._getCorrectBufferLength(o);if(y>this.lines.maxLength&&(this.lines.maxLength=y),this.lines.length>0){if(this._cols<s)for(let g=0;g<this.lines.length;g++)w+=+this.lines.get(g).resize(s,f);let E=0;if(this._rows<o)for(let g=this._rows;g<o;g++)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 v.BufferLine(s,f)):this.ybase>0&&this.lines.length<=this.ybase+this.y+E+1?(this.ybase--,E++,this.ydisp>0&&this.ydisp--):this.lines.push(new v.BufferLine(s,f)));else for(let g=this._rows;g>o;g--)this.lines.length>o+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(y<this.lines.maxLength){const g=this.lines.length-y;g>0&&(this.lines.trimStart(g),this.ybase=Math.max(this.ybase-g,0),this.ydisp=Math.max(this.ydisp-g,0),this.savedY=Math.max(this.savedY-g,0)),this.lines.maxLength=y}this.x=Math.min(this.x,s-1),this.y=Math.min(this.y,o-1),E&&(this.y+=E),this.savedX=Math.min(this.savedX,s-1),this.scrollTop=0}if(this.scrollBottom=o-1,this._isReflowEnabled&&(this._reflow(s,o),this._cols>s))for(let E=0;E<this.lines.length;E++)w+=+this.lines.get(E).resize(s,f);this._cols=s,this._rows=o,this._memoryCleanupQueue.clear(),w>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let s=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,s=!1);let o=0;for(;this._memoryCleanupPosition<this.lines.length;)if(o+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),o>100)return!0;return s}get _isReflowEnabled(){const s=this._optionsService.rawOptions.windowsPty;return s&&s.buildNumber?this._hasScrollback&&s.backend==="conpty"&&s.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(s,o){this._cols!==s&&(s>this._cols?this._reflowLarger(s,o):this._reflowSmaller(s,o))}_reflowLarger(s,o){const f=(0,S.reflowLargerGetLinesToRemove)(this.lines,this._cols,s,this.ybase+this.y,this.getNullCell(v.DEFAULT_ATTR_DATA));if(f.length>0){const w=(0,S.reflowLargerCreateNewLayout)(this.lines,f);(0,S.reflowLargerApplyNewLayout)(this.lines,w.layout),this._reflowLargerAdjustViewport(s,o,w.countRemoved)}}_reflowLargerAdjustViewport(s,o,f){const w=this.getNullCell(v.DEFAULT_ATTR_DATA);let y=f;for(;y-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<o&&this.lines.push(new v.BufferLine(s,w))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-f,0)}_reflowSmaller(s,o){const f=this.getNullCell(v.DEFAULT_ATTR_DATA),w=[];let y=0;for(let E=this.lines.length-1;E>=0;E--){let g=this.lines.get(E);if(!g||!g.isWrapped&&g.getTrimmedLength()<=s)continue;const R=[g];for(;g.isWrapped&&E>0;)g=this.lines.get(--E),R.unshift(g);const B=this.ybase+this.y;if(B>=E&&B<E+R.length)continue;const O=R[R.length-1].getTrimmedLength(),j=(0,S.reflowSmallerGetNewLineLengths)(R,this._cols,s),A=j.length-R.length;let G;G=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+A):Math.max(0,this.lines.length-this.lines.maxLength+A);const J=[];for(let b=0;b<A;b++){const T=this.getBlankLine(v.DEFAULT_ATTR_DATA,!0);J.push(T)}J.length>0&&(w.push({start:E+R.length+y,newLines:J}),y+=J.length),R.push(...J);let se=j.length-1,le=j[se];le===0&&(se--,le=j[se]);let N=R.length-A-1,C=O;for(;N>=0;){const b=Math.min(C,le);if(R[se]===void 0)break;if(R[se].copyCellsFrom(R[N],C-b,le-b,b,!0),le-=b,le===0&&(se--,le=j[se]),C-=b,C===0){N--;const T=Math.max(N,0);C=(0,S.getWrappedLineTrimmedLength)(R,T,this._cols)}}for(let b=0;b<R.length;b++)j[b]<s&&R[b].setCell(j[b],f);let D=A-G;for(;D-- >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+y)-o&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+A,this.ybase+o-1)}if(w.length>0){const E=[],g=[];for(let se=0;se<this.lines.length;se++)g.push(this.lines.get(se));const R=this.lines.length;let B=R-1,O=0,j=w[O];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+y);let A=0;for(let se=Math.min(this.lines.maxLength-1,R+y-1);se>=0;se--)if(j&&j.start>B+A){for(let le=j.newLines.length-1;le>=0;le--)this.lines.set(se--,j.newLines[le]);se++,E.push({index:B+1,amount:j.newLines.length}),A+=j.newLines.length,j=w[++O]}else this.lines.set(se,g[B--]);let G=0;for(let se=E.length-1;se>=0;se--)E[se].index+=G,this.lines.onInsertEmitter.fire(E[se]),G+=E[se].amount;const J=Math.max(0,R+y-this.lines.maxLength);J>0&&this.lines.onTrimEmitter.fire(J)}}translateBufferLineToString(s,o,f=0,w){const y=this.lines.get(s);return y?y.translateToString(o,f,w):""}getWrappedRangeForLine(s){let o=s,f=s;for(;o>0&&this.lines.get(o).isWrapped;)o--;for(;f+1<this.lines.length&&this.lines.get(f+1).isWrapped;)f++;return{first:o,last:f}}setupTabStops(s){for(s!=null?this.tabs[s]||(s=this.prevStop(s)):(this.tabs={},s=0);s<this._cols;s+=this._optionsService.rawOptions.tabStopWidth)this.tabs[s]=!0}prevStop(s){for(s==null&&(s=this.x);!this.tabs[--s]&&s>0;);return s>=this._cols?this._cols-1:s<0?0:s}nextStop(s){for(s==null&&(s=this.x);!this.tabs[++s]&&s<this._cols;);return s>=this._cols?this._cols-1:s<0?0:s}clearMarkers(s){this._isClearing=!0;for(let o=0;o<this.markers.length;o++)this.markers[o].line===s&&(this.markers[o].dispose(),this.markers.splice(o--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let s=0;s<this.markers.length;s++)this.markers[s].dispose(),this.markers.splice(s--,1);this._isClearing=!1}addMarker(s){const o=new n.Marker(s);return this.markers.push(o),o.register(this.lines.onTrim((f=>{o.line-=f,o.line<0&&o.dispose()}))),o.register(this.lines.onInsert((f=>{o.line>=f.index&&(o.line+=f.amount)}))),o.register(this.lines.onDelete((f=>{o.line>=f.index&&o.line<f.index+f.amount&&o.dispose(),o.line>f.index&&(o.line-=f.amount)}))),o.register(o.onDispose((()=>this._removeMarker(o)))),o}_removeMarker(s){this._isClearing||this.markers.splice(this.markers.indexOf(s),1)}}},8437:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferLine=c.DEFAULT_ATTR_DATA=void 0;const p=h(3734),m=h(511),u=h(643),v=h(482);c.DEFAULT_ATTR_DATA=Object.freeze(new p.AttributeData);let S=0;class x{constructor(n,l,s=!1){this.isWrapped=s,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*n);const o=l||m.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let f=0;f<n;++f)this.setCell(f,o);this.length=n}get(n){const l=this._data[3*n+0],s=2097151&l;return[this._data[3*n+1],2097152&l?this._combined[n]:s?(0,v.stringFromCodePoint)(s):"",l>>22,2097152&l?this._combined[n].charCodeAt(this._combined[n].length-1):s]}set(n,l){this._data[3*n+1]=l[u.CHAR_DATA_ATTR_INDEX],l[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[n]=l[1],this._data[3*n+0]=2097152|n|l[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*n+0]=l[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|l[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(n){return this._data[3*n+0]>>22}hasWidth(n){return 12582912&this._data[3*n+0]}getFg(n){return this._data[3*n+1]}getBg(n){return this._data[3*n+2]}hasContent(n){return 4194303&this._data[3*n+0]}getCodePoint(n){const l=this._data[3*n+0];return 2097152&l?this._combined[n].charCodeAt(this._combined[n].length-1):2097151&l}isCombined(n){return 2097152&this._data[3*n+0]}getString(n){const l=this._data[3*n+0];return 2097152&l?this._combined[n]:2097151&l?(0,v.stringFromCodePoint)(2097151&l):""}isProtected(n){return 536870912&this._data[3*n+2]}loadCell(n,l){return S=3*n,l.content=this._data[S+0],l.fg=this._data[S+1],l.bg=this._data[S+2],2097152&l.content&&(l.combinedData=this._combined[n]),268435456&l.bg&&(l.extended=this._extendedAttrs[n]),l}setCell(n,l){2097152&l.content&&(this._combined[n]=l.combinedData),268435456&l.bg&&(this._extendedAttrs[n]=l.extended),this._data[3*n+0]=l.content,this._data[3*n+1]=l.fg,this._data[3*n+2]=l.bg}setCellFromCodepoint(n,l,s,o){268435456&o.bg&&(this._extendedAttrs[n]=o.extended),this._data[3*n+0]=l|s<<22,this._data[3*n+1]=o.fg,this._data[3*n+2]=o.bg}addCodepointToCell(n,l,s){let o=this._data[3*n+0];2097152&o?this._combined[n]+=(0,v.stringFromCodePoint)(l):2097151&o?(this._combined[n]=(0,v.stringFromCodePoint)(2097151&o)+(0,v.stringFromCodePoint)(l),o&=-2097152,o|=2097152):o=l|4194304,s&&(o&=-12582913,o|=s<<22),this._data[3*n+0]=o}insertCells(n,l,s){if((n%=this.length)&&this.getWidth(n-1)===2&&this.setCellFromCodepoint(n-1,0,1,s),l<this.length-n){const o=new m.CellData;for(let f=this.length-n-l-1;f>=0;--f)this.setCell(n+l+f,this.loadCell(n+f,o));for(let f=0;f<l;++f)this.setCell(n+f,s)}else for(let o=n;o<this.length;++o)this.setCell(o,s);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,s)}deleteCells(n,l,s){if(n%=this.length,l<this.length-n){const o=new m.CellData;for(let f=0;f<this.length-n-l;++f)this.setCell(n+f,this.loadCell(n+l+f,o));for(let f=this.length-l;f<this.length;++f)this.setCell(f,s)}else for(let o=n;o<this.length;++o)this.setCell(o,s);n&&this.getWidth(n-1)===2&&this.setCellFromCodepoint(n-1,0,1,s),this.getWidth(n)!==0||this.hasContent(n)||this.setCellFromCodepoint(n,0,1,s)}replaceCells(n,l,s,o=!1){if(o)for(n&&this.getWidth(n-1)===2&&!this.isProtected(n-1)&&this.setCellFromCodepoint(n-1,0,1,s),l<this.length&&this.getWidth(l-1)===2&&!this.isProtected(l)&&this.setCellFromCodepoint(l,0,1,s);n<l&&n<this.length;)this.isProtected(n)||this.setCell(n,s),n++;else for(n&&this.getWidth(n-1)===2&&this.setCellFromCodepoint(n-1,0,1,s),l<this.length&&this.getWidth(l-1)===2&&this.setCellFromCodepoint(l,0,1,s);n<l&&n<this.length;)this.setCell(n++,s)}resize(n,l){if(n===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const s=3*n;if(n>this.length){if(this._data.buffer.byteLength>=4*s)this._data=new Uint32Array(this._data.buffer,0,s);else{const o=new Uint32Array(s);o.set(this._data),this._data=o}for(let o=this.length;o<n;++o)this.setCell(o,l)}else{this._data=this._data.subarray(0,s);const o=Object.keys(this._combined);for(let w=0;w<o.length;w++){const y=parseInt(o[w],10);y>=n&&delete this._combined[y]}const f=Object.keys(this._extendedAttrs);for(let w=0;w<f.length;w++){const y=parseInt(f[w],10);y>=n&&delete this._extendedAttrs[y]}}return this.length=n,4*s*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const n=new Uint32Array(this._data.length);return n.set(this._data),this._data=n,1}return 0}fill(n,l=!1){if(l)for(let s=0;s<this.length;++s)this.isProtected(s)||this.setCell(s,n);else{this._combined={},this._extendedAttrs={};for(let s=0;s<this.length;++s)this.setCell(s,n)}}copyFrom(n){this.length!==n.length?this._data=new Uint32Array(n._data):this._data.set(n._data),this.length=n.length,this._combined={};for(const l in n._combined)this._combined[l]=n._combined[l];this._extendedAttrs={};for(const l in n._extendedAttrs)this._extendedAttrs[l]=n._extendedAttrs[l];this.isWrapped=n.isWrapped}clone(){const n=new x(0);n._data=new Uint32Array(this._data),n.length=this.length;for(const l in this._combined)n._combined[l]=this._combined[l];for(const l in this._extendedAttrs)n._extendedAttrs[l]=this._extendedAttrs[l];return n.isWrapped=this.isWrapped,n}getTrimmedLength(){for(let n=this.length-1;n>=0;--n)if(4194303&this._data[3*n+0])return n+(this._data[3*n+0]>>22);return 0}getNoBgTrimmedLength(){for(let n=this.length-1;n>=0;--n)if(4194303&this._data[3*n+0]||50331648&this._data[3*n+2])return n+(this._data[3*n+0]>>22);return 0}copyCellsFrom(n,l,s,o,f){const w=n._data;if(f)for(let E=o-1;E>=0;E--){for(let g=0;g<3;g++)this._data[3*(s+E)+g]=w[3*(l+E)+g];268435456&w[3*(l+E)+2]&&(this._extendedAttrs[s+E]=n._extendedAttrs[l+E])}else for(let E=0;E<o;E++){for(let g=0;g<3;g++)this._data[3*(s+E)+g]=w[3*(l+E)+g];268435456&w[3*(l+E)+2]&&(this._extendedAttrs[s+E]=n._extendedAttrs[l+E])}const y=Object.keys(n._combined);for(let E=0;E<y.length;E++){const g=parseInt(y[E],10);g>=l&&(this._combined[g-l+s]=n._combined[g])}}translateToString(n,l,s,o){l=l??0,s=s??this.length,n&&(s=Math.min(s,this.getTrimmedLength())),o&&(o.length=0);let f="";for(;l<s;){const w=this._data[3*l+0],y=2097151&w,E=2097152&w?this._combined[l]:y?(0,v.stringFromCodePoint)(y):u.WHITESPACE_CELL_CHAR;if(f+=E,o)for(let g=0;g<E.length;++g)o.push(l);l+=w>>22||1}return o&&o.push(l),f}}c.BufferLine=x},4841:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.getRangeLength=void 0,c.getRangeLength=function(h,p){if(h.start.y>h.end.y)throw new Error(`Buffer range end (${h.end.x}, ${h.end.y}) cannot be before start (${h.start.x}, ${h.start.y})`);return p*(h.end.y-h.start.y)+(h.end.x-h.start.x+1)}},4634:(K,c)=>{function h(p,m,u){if(m===p.length-1)return p[m].getTrimmedLength();const v=!p[m].hasContent(u-1)&&p[m].getWidth(u-1)===1,S=p[m+1].getWidth(0)===2;return v&&S?u-1:u}Object.defineProperty(c,"__esModule",{value:!0}),c.getWrappedLineTrimmedLength=c.reflowSmallerGetNewLineLengths=c.reflowLargerApplyNewLayout=c.reflowLargerCreateNewLayout=c.reflowLargerGetLinesToRemove=void 0,c.reflowLargerGetLinesToRemove=function(p,m,u,v,S){const x=[];for(let _=0;_<p.length-1;_++){let n=_,l=p.get(++n);if(!l.isWrapped)continue;const s=[p.get(_)];for(;n<p.length&&l.isWrapped;)s.push(l),l=p.get(++n);if(v>=_&&v<n){_+=s.length-1;continue}let o=0,f=h(s,o,m),w=1,y=0;for(;w<s.length;){const g=h(s,w,m),R=g-y,B=u-f,O=Math.min(R,B);s[o].copyCellsFrom(s[w],y,f,O,!1),f+=O,f===u&&(o++,f=0),y+=O,y===g&&(w++,y=0),f===0&&o!==0&&s[o-1].getWidth(u-1)===2&&(s[o].copyCellsFrom(s[o-1],u-1,f++,1,!1),s[o-1].setCell(u-1,S))}s[o].replaceCells(f,u,S);let E=0;for(let g=s.length-1;g>0&&(g>o||s[g].getTrimmedLength()===0);g--)E++;E>0&&(x.push(_+s.length-E),x.push(E)),_+=s.length-1}return x},c.reflowLargerCreateNewLayout=function(p,m){const u=[];let v=0,S=m[v],x=0;for(let _=0;_<p.length;_++)if(S===_){const n=m[++v];p.onDeleteEmitter.fire({index:_-x,amount:n}),_+=n-1,x+=n,S=m[++v]}else u.push(_);return{layout:u,countRemoved:x}},c.reflowLargerApplyNewLayout=function(p,m){const u=[];for(let v=0;v<m.length;v++)u.push(p.get(m[v]));for(let v=0;v<u.length;v++)p.set(v,u[v]);p.length=m.length},c.reflowSmallerGetNewLineLengths=function(p,m,u){const v=[],S=p.map(((l,s)=>h(p,s,m))).reduce(((l,s)=>l+s));let x=0,_=0,n=0;for(;n<S;){if(S-n<u){v.push(S-n);break}x+=u;const l=h(p,_,m);x>l&&(x-=l,_++);const s=p[_].getWidth(x-1)===2;s&&x--;const o=s?u-1:u;v.push(o),n+=o}return v},c.getWrappedLineTrimmedLength=h},5295:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferSet=void 0;const p=h(8460),m=h(844),u=h(9092);class v extends m.Disposable{constructor(x,_){super(),this._optionsService=x,this._bufferService=_,this._onBufferActivate=this.register(new p.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 u.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new u.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(x){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(x),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(x,_){this._normal.resize(x,_),this._alt.resize(x,_),this.setupTabStops(x)}setupTabStops(x){this._normal.setupTabStops(x),this._alt.setupTabStops(x)}}c.BufferSet=v},511:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CellData=void 0;const p=h(482),m=h(643),u=h(3734);class v extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(x){const _=new v;return _.setFromCharData(x),_}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,p.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(x){this.fg=x[m.CHAR_DATA_ATTR_INDEX],this.bg=0;let _=!1;if(x[m.CHAR_DATA_CHAR_INDEX].length>2)_=!0;else if(x[m.CHAR_DATA_CHAR_INDEX].length===2){const n=x[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=n&&n<=56319){const l=x[m.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=l&&l<=57343?this.content=1024*(n-55296)+l-56320+65536|x[m.CHAR_DATA_WIDTH_INDEX]<<22:_=!0}else _=!0}else this.content=x[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|x[m.CHAR_DATA_WIDTH_INDEX]<<22;_&&(this.combinedData=x[m.CHAR_DATA_CHAR_INDEX],this.content=2097152|x[m.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}c.CellData=v},643:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WHITESPACE_CELL_CODE=c.WHITESPACE_CELL_WIDTH=c.WHITESPACE_CELL_CHAR=c.NULL_CELL_CODE=c.NULL_CELL_WIDTH=c.NULL_CELL_CHAR=c.CHAR_DATA_CODE_INDEX=c.CHAR_DATA_WIDTH_INDEX=c.CHAR_DATA_CHAR_INDEX=c.CHAR_DATA_ATTR_INDEX=c.DEFAULT_EXT=c.DEFAULT_ATTR=c.DEFAULT_COLOR=void 0,c.DEFAULT_COLOR=0,c.DEFAULT_ATTR=256|c.DEFAULT_COLOR<<9,c.DEFAULT_EXT=0,c.CHAR_DATA_ATTR_INDEX=0,c.CHAR_DATA_CHAR_INDEX=1,c.CHAR_DATA_WIDTH_INDEX=2,c.CHAR_DATA_CODE_INDEX=3,c.NULL_CELL_CHAR="",c.NULL_CELL_WIDTH=1,c.NULL_CELL_CODE=0,c.WHITESPACE_CELL_CHAR=" ",c.WHITESPACE_CELL_WIDTH=1,c.WHITESPACE_CELL_CODE=32},4863:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Marker=void 0;const p=h(8460),m=h(844);class u{get id(){return this._id}constructor(S){this.line=S,this.isDisposed=!1,this._disposables=[],this._id=u._nextId++,this._onDispose=this.register(new p.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,m.disposeArray)(this._disposables),this._disposables.length=0)}register(S){return this._disposables.push(S),S}}c.Marker=u,u._nextId=1},7116:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DEFAULT_CHARSET=c.CHARSETS=void 0,c.CHARSETS={},c.DEFAULT_CHARSET=c.CHARSETS.B,c.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:"≥","{":"π","|":"≠","}":"£","~":"·"},c.CHARSETS.A={"#":"£"},c.CHARSETS.B=void 0,c.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},c.CHARSETS.C=c.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},c.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},c.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},c.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},c.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},c.CHARSETS.E=c.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},c.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},c.CHARSETS.H=c.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},c.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(K,c)=>{var h,p,m;Object.defineProperty(c,"__esModule",{value:!0}),c.C1_ESCAPED=c.C1=c.C0=void 0,(function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=`
47
+ `,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL=""})(h||(c.C0=h={})),(function(u){u.PAD="€",u.HOP="",u.BPH="‚",u.NBH="ƒ",u.IND="„",u.NEL="…",u.SSA="†",u.ESA="‡",u.HTS="ˆ",u.HTJ="‰",u.VTS="Š",u.PLD="‹",u.PLU="Œ",u.RI="",u.SS2="Ž",u.SS3="",u.DCS="",u.PU1="‘",u.PU2="’",u.STS="“",u.CCH="”",u.MW="•",u.SPA="–",u.EPA="—",u.SOS="˜",u.SGCI="™",u.SCI="š",u.CSI="›",u.ST="œ",u.OSC="",u.PM="ž",u.APC="Ÿ"})(p||(c.C1=p={})),(function(u){u.ST=`${h.ESC}\\`})(m||(c.C1_ESCAPED=m={}))},7399:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.evaluateKeyboardEvent=void 0;const p=h(2584),m={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:["'",'"']};c.evaluateKeyboardEvent=function(u,v,S,x){const _={type:0,cancel:!1,key:void 0},n=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?_.key=v?p.C0.ESC+"OA":p.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?_.key=v?p.C0.ESC+"OD":p.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?_.key=v?p.C0.ESC+"OC":p.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(_.key=v?p.C0.ESC+"OB":p.C0.ESC+"[B");break;case 8:_.key=u.ctrlKey?"\b":p.C0.DEL,u.altKey&&(_.key=p.C0.ESC+_.key);break;case 9:if(u.shiftKey){_.key=p.C0.ESC+"[Z";break}_.key=p.C0.HT,_.cancel=!0;break;case 13:_.key=u.altKey?p.C0.ESC+p.C0.CR:p.C0.CR,_.cancel=!0;break;case 27:_.key=p.C0.ESC,u.altKey&&(_.key=p.C0.ESC+p.C0.ESC),_.cancel=!0;break;case 37:if(u.metaKey)break;n?(_.key=p.C0.ESC+"[1;"+(n+1)+"D",_.key===p.C0.ESC+"[1;3D"&&(_.key=p.C0.ESC+(S?"b":"[1;5D"))):_.key=v?p.C0.ESC+"OD":p.C0.ESC+"[D";break;case 39:if(u.metaKey)break;n?(_.key=p.C0.ESC+"[1;"+(n+1)+"C",_.key===p.C0.ESC+"[1;3C"&&(_.key=p.C0.ESC+(S?"f":"[1;5C"))):_.key=v?p.C0.ESC+"OC":p.C0.ESC+"[C";break;case 38:if(u.metaKey)break;n?(_.key=p.C0.ESC+"[1;"+(n+1)+"A",S||_.key!==p.C0.ESC+"[1;3A"||(_.key=p.C0.ESC+"[1;5A")):_.key=v?p.C0.ESC+"OA":p.C0.ESC+"[A";break;case 40:if(u.metaKey)break;n?(_.key=p.C0.ESC+"[1;"+(n+1)+"B",S||_.key!==p.C0.ESC+"[1;3B"||(_.key=p.C0.ESC+"[1;5B")):_.key=v?p.C0.ESC+"OB":p.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(_.key=p.C0.ESC+"[2~");break;case 46:_.key=n?p.C0.ESC+"[3;"+(n+1)+"~":p.C0.ESC+"[3~";break;case 36:_.key=n?p.C0.ESC+"[1;"+(n+1)+"H":v?p.C0.ESC+"OH":p.C0.ESC+"[H";break;case 35:_.key=n?p.C0.ESC+"[1;"+(n+1)+"F":v?p.C0.ESC+"OF":p.C0.ESC+"[F";break;case 33:u.shiftKey?_.type=2:u.ctrlKey?_.key=p.C0.ESC+"[5;"+(n+1)+"~":_.key=p.C0.ESC+"[5~";break;case 34:u.shiftKey?_.type=3:u.ctrlKey?_.key=p.C0.ESC+"[6;"+(n+1)+"~":_.key=p.C0.ESC+"[6~";break;case 112:_.key=n?p.C0.ESC+"[1;"+(n+1)+"P":p.C0.ESC+"OP";break;case 113:_.key=n?p.C0.ESC+"[1;"+(n+1)+"Q":p.C0.ESC+"OQ";break;case 114:_.key=n?p.C0.ESC+"[1;"+(n+1)+"R":p.C0.ESC+"OR";break;case 115:_.key=n?p.C0.ESC+"[1;"+(n+1)+"S":p.C0.ESC+"OS";break;case 116:_.key=n?p.C0.ESC+"[15;"+(n+1)+"~":p.C0.ESC+"[15~";break;case 117:_.key=n?p.C0.ESC+"[17;"+(n+1)+"~":p.C0.ESC+"[17~";break;case 118:_.key=n?p.C0.ESC+"[18;"+(n+1)+"~":p.C0.ESC+"[18~";break;case 119:_.key=n?p.C0.ESC+"[19;"+(n+1)+"~":p.C0.ESC+"[19~";break;case 120:_.key=n?p.C0.ESC+"[20;"+(n+1)+"~":p.C0.ESC+"[20~";break;case 121:_.key=n?p.C0.ESC+"[21;"+(n+1)+"~":p.C0.ESC+"[21~";break;case 122:_.key=n?p.C0.ESC+"[23;"+(n+1)+"~":p.C0.ESC+"[23~";break;case 123:_.key=n?p.C0.ESC+"[24;"+(n+1)+"~":p.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(S&&!x||!u.altKey||u.metaKey)!S||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?_.key=u.key:u.key&&u.ctrlKey&&(u.key==="_"&&(_.key=p.C0.US),u.key==="@"&&(_.key=p.C0.NUL)):u.keyCode===65&&(_.type=1);else{const l=m[u.keyCode],s=l==null?void 0:l[u.shiftKey?1:0];if(s)_.key=p.C0.ESC+s;else if(u.keyCode>=65&&u.keyCode<=90){const o=u.ctrlKey?u.keyCode-64:u.keyCode+32;let f=String.fromCharCode(o);u.shiftKey&&(f=f.toUpperCase()),_.key=p.C0.ESC+f}else if(u.keyCode===32)_.key=p.C0.ESC+(u.ctrlKey?p.C0.NUL:" ");else if(u.key==="Dead"&&u.code.startsWith("Key")){let o=u.code.slice(3,4);u.shiftKey||(o=o.toLowerCase()),_.key=p.C0.ESC+o,_.cancel=!0}}else u.keyCode>=65&&u.keyCode<=90?_.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?_.key=p.C0.NUL:u.keyCode>=51&&u.keyCode<=55?_.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?_.key=p.C0.DEL:u.keyCode===219?_.key=p.C0.ESC:u.keyCode===220?_.key=p.C0.FS:u.keyCode===221&&(_.key=p.C0.GS)}return _}},482:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Utf8ToUtf32=c.StringToUtf32=c.utf32ToString=c.stringFromCodePoint=void 0,c.stringFromCodePoint=function(h){return h>65535?(h-=65536,String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):String.fromCharCode(h)},c.utf32ToString=function(h,p=0,m=h.length){let u="";for(let v=p;v<m;++v){let S=h[v];S>65535?(S-=65536,u+=String.fromCharCode(55296+(S>>10))+String.fromCharCode(S%1024+56320)):u+=String.fromCharCode(S)}return u},c.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(h,p){const m=h.length;if(!m)return 0;let u=0,v=0;if(this._interim){const S=h.charCodeAt(v++);56320<=S&&S<=57343?p[u++]=1024*(this._interim-55296)+S-56320+65536:(p[u++]=this._interim,p[u++]=S),this._interim=0}for(let S=v;S<m;++S){const x=h.charCodeAt(S);if(55296<=x&&x<=56319){if(++S>=m)return this._interim=x,u;const _=h.charCodeAt(S);56320<=_&&_<=57343?p[u++]=1024*(x-55296)+_-56320+65536:(p[u++]=x,p[u++]=_)}else x!==65279&&(p[u++]=x)}return u}},c.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(h,p){const m=h.length;if(!m)return 0;let u,v,S,x,_=0,n=0,l=0;if(this.interim[0]){let f=!1,w=this.interim[0];w&=(224&w)==192?31:(240&w)==224?15:7;let y,E=0;for(;(y=63&this.interim[++E])&&E<4;)w<<=6,w|=y;const g=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,R=g-E;for(;l<R;){if(l>=m)return 0;if(y=h[l++],(192&y)!=128){l--,f=!0;break}this.interim[E++]=y,w<<=6,w|=63&y}f||(g===2?w<128?l--:p[_++]=w:g===3?w<2048||w>=55296&&w<=57343||w===65279||(p[_++]=w):w<65536||w>1114111||(p[_++]=w)),this.interim.fill(0)}const s=m-4;let o=l;for(;o<m;){for(;!(!(o<s)||128&(u=h[o])||128&(v=h[o+1])||128&(S=h[o+2])||128&(x=h[o+3]));)p[_++]=u,p[_++]=v,p[_++]=S,p[_++]=x,o+=4;if(u=h[o++],u<128)p[_++]=u;else if((224&u)==192){if(o>=m)return this.interim[0]=u,_;if(v=h[o++],(192&v)!=128){o--;continue}if(n=(31&u)<<6|63&v,n<128){o--;continue}p[_++]=n}else if((240&u)==224){if(o>=m)return this.interim[0]=u,_;if(v=h[o++],(192&v)!=128){o--;continue}if(o>=m)return this.interim[0]=u,this.interim[1]=v,_;if(S=h[o++],(192&S)!=128){o--;continue}if(n=(15&u)<<12|(63&v)<<6|63&S,n<2048||n>=55296&&n<=57343||n===65279)continue;p[_++]=n}else if((248&u)==240){if(o>=m)return this.interim[0]=u,_;if(v=h[o++],(192&v)!=128){o--;continue}if(o>=m)return this.interim[0]=u,this.interim[1]=v,_;if(S=h[o++],(192&S)!=128){o--;continue}if(o>=m)return this.interim[0]=u,this.interim[1]=v,this.interim[2]=S,_;if(x=h[o++],(192&x)!=128){o--;continue}if(n=(7&u)<<18|(63&v)<<12|(63&S)<<6|63&x,n<65536||n>1114111)continue;p[_++]=n}}return _}}},225:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeV6=void 0;const p=h(1480),m=[[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]],u=[[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 v;c.UnicodeV6=class{constructor(){if(this.version="6",!v){v=new Uint8Array(65536),v.fill(1),v[0]=0,v.fill(0,1,32),v.fill(0,127,160),v.fill(2,4352,4448),v[9001]=2,v[9002]=2,v.fill(2,11904,42192),v[12351]=1,v.fill(2,44032,55204),v.fill(2,63744,64256),v.fill(2,65040,65050),v.fill(2,65072,65136),v.fill(2,65280,65377),v.fill(2,65504,65511);for(let S=0;S<m.length;++S)v.fill(0,m[S][0],m[S][1]+1)}}wcwidth(S){return S<32?0:S<127?1:S<65536?v[S]:(function(x,_){let n,l=0,s=_.length-1;if(x<_[0][0]||x>_[s][1])return!1;for(;s>=l;)if(n=l+s>>1,x>_[n][1])l=n+1;else{if(!(x<_[n][0]))return!0;s=n-1}return!1})(S,u)?0:S>=131072&&S<=196605||S>=196608&&S<=262141?2:1}charProperties(S,x){let _=this.wcwidth(S),n=_===0&&x!==0;if(n){const l=p.UnicodeService.extractWidth(x);l===0?n=!1:l>_&&(_=l)}return p.UnicodeService.createPropertyValue(0,_,n)}}},5981:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.WriteBuffer=void 0;const p=h(8460),m=h(844);class u extends m.Disposable{constructor(S){super(),this._action=S,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new p.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(S,x){if(x!==void 0&&this._syncCalls>x)return void(this._syncCalls=0);if(this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let _;for(this._isSyncWriting=!0;_=this._writeBuffer.shift();){this._action(_);const n=this._callbacks.shift();n&&n()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(S,x){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(x),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(x)}_innerWrite(S=0,x=!0){const _=S||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const n=this._writeBuffer[this._bufferOffset],l=this._action(n,x);if(l){const o=f=>Date.now()-_>=12?setTimeout((()=>this._innerWrite(0,f))):this._innerWrite(_,f);return void l.catch((f=>(queueMicrotask((()=>{throw f})),Promise.resolve(!1)))).then(o)}const s=this._callbacks[this._bufferOffset];if(s&&s(),this._bufferOffset++,this._pendingData-=n.length,Date.now()-_>=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()}}c.WriteBuffer=u},5941:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.toRgbString=c.parseColor=void 0;const h=/^([\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})$/,p=/^[\da-f]+$/;function m(u,v){const S=u.toString(16),x=S.length<2?"0"+S:S;switch(v){case 4:return S[0];case 8:return x;case 12:return(x+x).slice(0,3);default:return x+x}}c.parseColor=function(u){if(!u)return;let v=u.toLowerCase();if(v.indexOf("rgb:")===0){v=v.slice(4);const S=h.exec(v);if(S){const x=S[1]?15:S[4]?255:S[7]?4095:65535;return[Math.round(parseInt(S[1]||S[4]||S[7]||S[10],16)/x*255),Math.round(parseInt(S[2]||S[5]||S[8]||S[11],16)/x*255),Math.round(parseInt(S[3]||S[6]||S[9]||S[12],16)/x*255)]}}else if(v.indexOf("#")===0&&(v=v.slice(1),p.exec(v)&&[3,6,9,12].includes(v.length))){const S=v.length/3,x=[0,0,0];for(let _=0;_<3;++_){const n=parseInt(v.slice(S*_,S*_+S),16);x[_]=S===1?n<<4:S===2?n:S===3?n>>4:n>>8}return x}},c.toRgbString=function(u,v=16){const[S,x,_]=u;return`rgb:${m(S,v)}/${m(x,v)}/${m(_,v)}`}},5770:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.PAYLOAD_LIMIT=void 0,c.PAYLOAD_LIMIT=1e7},6351:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DcsHandler=c.DcsParser=void 0;const p=h(482),m=h(8742),u=h(5770),v=[];c.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=v,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=v}registerHandler(x,_){this._handlers[x]===void 0&&(this._handlers[x]=[]);const n=this._handlers[x];return n.push(_),{dispose:()=>{const l=n.indexOf(_);l!==-1&&n.splice(l,1)}}}clearHandler(x){this._handlers[x]&&delete this._handlers[x]}setHandlerFallback(x){this._handlerFb=x}reset(){if(this._active.length)for(let x=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;x>=0;--x)this._active[x].unhook(!1);this._stack.paused=!1,this._active=v,this._ident=0}hook(x,_){if(this.reset(),this._ident=x,this._active=this._handlers[x]||v,this._active.length)for(let n=this._active.length-1;n>=0;n--)this._active[n].hook(_);else this._handlerFb(this._ident,"HOOK",_)}put(x,_,n){if(this._active.length)for(let l=this._active.length-1;l>=0;l--)this._active[l].put(x,_,n);else this._handlerFb(this._ident,"PUT",(0,p.utf32ToString)(x,_,n))}unhook(x,_=!0){if(this._active.length){let n=!1,l=this._active.length-1,s=!1;if(this._stack.paused&&(l=this._stack.loopPosition-1,n=_,s=this._stack.fallThrough,this._stack.paused=!1),!s&&n===!1){for(;l>=0&&(n=this._active[l].unhook(x),n!==!0);l--)if(n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=l,this._stack.fallThrough=!1,n;l--}for(;l>=0;l--)if(n=this._active[l].unhook(!1),n instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=l,this._stack.fallThrough=!0,n}else this._handlerFb(this._ident,"UNHOOK",x);this._active=v,this._ident=0}};const S=new m.Params;S.addParam(0),c.DcsHandler=class{constructor(x){this._handler=x,this._data="",this._params=S,this._hitLimit=!1}hook(x){this._params=x.length>1||x.params[0]?x.clone():S,this._data="",this._hitLimit=!1}put(x,_,n){this._hitLimit||(this._data+=(0,p.utf32ToString)(x,_,n),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(x){let _=!1;if(this._hitLimit)_=!1;else if(x&&(_=this._handler(this._data,this._params),_ instanceof Promise))return _.then((n=>(this._params=S,this._data="",this._hitLimit=!1,n)));return this._params=S,this._data="",this._hitLimit=!1,_}}},2015:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.EscapeSequenceParser=c.VT500_TRANSITION_TABLE=c.TransitionTable=void 0;const p=h(844),m=h(8742),u=h(6242),v=h(6351);class S{constructor(l){this.table=new Uint8Array(l)}setDefault(l,s){this.table.fill(l<<4|s)}add(l,s,o,f){this.table[s<<8|l]=o<<4|f}addMany(l,s,o,f){for(let w=0;w<l.length;w++)this.table[s<<8|l[w]]=o<<4|f}}c.TransitionTable=S;const x=160;c.VT500_TRANSITION_TABLE=(function(){const n=new S(4095),l=Array.apply(null,Array(256)).map(((E,g)=>g)),s=(E,g)=>l.slice(E,g),o=s(32,127),f=s(0,24);f.push(25),f.push.apply(f,s(28,32));const w=s(0,14);let y;for(y in n.setDefault(1,0),n.addMany(o,0,2,0),w)n.addMany([24,26,153,154],y,3,0),n.addMany(s(128,144),y,3,0),n.addMany(s(144,152),y,3,0),n.add(156,y,0,0),n.add(27,y,11,1),n.add(157,y,4,8),n.addMany([152,158,159],y,0,7),n.add(155,y,11,3),n.add(144,y,11,9);return n.addMany(f,0,3,0),n.addMany(f,1,3,1),n.add(127,1,0,1),n.addMany(f,8,0,8),n.addMany(f,3,3,3),n.add(127,3,0,3),n.addMany(f,4,3,4),n.add(127,4,0,4),n.addMany(f,6,3,6),n.addMany(f,5,3,5),n.add(127,5,0,5),n.addMany(f,2,3,2),n.add(127,2,0,2),n.add(93,1,4,8),n.addMany(o,8,5,8),n.add(127,8,5,8),n.addMany([156,27,24,26,7],8,6,0),n.addMany(s(28,32),8,0,8),n.addMany([88,94,95],1,0,7),n.addMany(o,7,0,7),n.addMany(f,7,0,7),n.add(156,7,0,0),n.add(127,7,0,7),n.add(91,1,11,3),n.addMany(s(64,127),3,7,0),n.addMany(s(48,60),3,8,4),n.addMany([60,61,62,63],3,9,4),n.addMany(s(48,60),4,8,4),n.addMany(s(64,127),4,7,0),n.addMany([60,61,62,63],4,0,6),n.addMany(s(32,64),6,0,6),n.add(127,6,0,6),n.addMany(s(64,127),6,0,0),n.addMany(s(32,48),3,9,5),n.addMany(s(32,48),5,9,5),n.addMany(s(48,64),5,0,6),n.addMany(s(64,127),5,7,0),n.addMany(s(32,48),4,9,5),n.addMany(s(32,48),1,9,2),n.addMany(s(32,48),2,9,2),n.addMany(s(48,127),2,10,0),n.addMany(s(48,80),1,10,0),n.addMany(s(81,88),1,10,0),n.addMany([89,90,92],1,10,0),n.addMany(s(96,127),1,10,0),n.add(80,1,11,9),n.addMany(f,9,0,9),n.add(127,9,0,9),n.addMany(s(28,32),9,0,9),n.addMany(s(32,48),9,9,12),n.addMany(s(48,60),9,8,10),n.addMany([60,61,62,63],9,9,10),n.addMany(f,11,0,11),n.addMany(s(32,128),11,0,11),n.addMany(s(28,32),11,0,11),n.addMany(f,10,0,10),n.add(127,10,0,10),n.addMany(s(28,32),10,0,10),n.addMany(s(48,60),10,8,10),n.addMany([60,61,62,63],10,0,11),n.addMany(s(32,48),10,9,12),n.addMany(f,12,0,12),n.add(127,12,0,12),n.addMany(s(28,32),12,0,12),n.addMany(s(32,48),12,9,12),n.addMany(s(48,64),12,0,11),n.addMany(s(64,127),12,12,13),n.addMany(s(64,127),10,12,13),n.addMany(s(64,127),9,12,13),n.addMany(f,13,13,13),n.addMany(o,13,13,13),n.add(127,13,0,13),n.addMany([27,156,24,26],13,14,0),n.add(x,0,2,0),n.add(x,8,5,8),n.add(x,6,0,6),n.add(x,11,0,11),n.add(x,13,13,13),n})();class _ extends p.Disposable{constructor(l=c.VT500_TRANSITION_TABLE){super(),this._transitions=l,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new m.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(s,o,f)=>{},this._executeHandlerFb=s=>{},this._csiHandlerFb=(s,o)=>{},this._escHandlerFb=s=>{},this._errorHandlerFb=s=>s,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,p.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new u.OscParser),this._dcsParser=this.register(new v.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(l,s=[64,126]){let o=0;if(l.prefix){if(l.prefix.length>1)throw new Error("only one byte as prefix supported");if(o=l.prefix.charCodeAt(0),o&&60>o||o>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(l.intermediates){if(l.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let w=0;w<l.intermediates.length;++w){const y=l.intermediates.charCodeAt(w);if(32>y||y>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");o<<=8,o|=y}}if(l.final.length!==1)throw new Error("final must be a single byte");const f=l.final.charCodeAt(0);if(s[0]>f||f>s[1])throw new Error(`final must be in range ${s[0]} .. ${s[1]}`);return o<<=8,o|=f,o}identToString(l){const s=[];for(;l;)s.push(String.fromCharCode(255&l)),l>>=8;return s.reverse().join("")}setPrintHandler(l){this._printHandler=l}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(l,s){const o=this._identifier(l,[48,126]);this._escHandlers[o]===void 0&&(this._escHandlers[o]=[]);const f=this._escHandlers[o];return f.push(s),{dispose:()=>{const w=f.indexOf(s);w!==-1&&f.splice(w,1)}}}clearEscHandler(l){this._escHandlers[this._identifier(l,[48,126])]&&delete this._escHandlers[this._identifier(l,[48,126])]}setEscHandlerFallback(l){this._escHandlerFb=l}setExecuteHandler(l,s){this._executeHandlers[l.charCodeAt(0)]=s}clearExecuteHandler(l){this._executeHandlers[l.charCodeAt(0)]&&delete this._executeHandlers[l.charCodeAt(0)]}setExecuteHandlerFallback(l){this._executeHandlerFb=l}registerCsiHandler(l,s){const o=this._identifier(l);this._csiHandlers[o]===void 0&&(this._csiHandlers[o]=[]);const f=this._csiHandlers[o];return f.push(s),{dispose:()=>{const w=f.indexOf(s);w!==-1&&f.splice(w,1)}}}clearCsiHandler(l){this._csiHandlers[this._identifier(l)]&&delete this._csiHandlers[this._identifier(l)]}setCsiHandlerFallback(l){this._csiHandlerFb=l}registerDcsHandler(l,s){return this._dcsParser.registerHandler(this._identifier(l),s)}clearDcsHandler(l){this._dcsParser.clearHandler(this._identifier(l))}setDcsHandlerFallback(l){this._dcsParser.setHandlerFallback(l)}registerOscHandler(l,s){return this._oscParser.registerHandler(l,s)}clearOscHandler(l){this._oscParser.clearHandler(l)}setOscHandlerFallback(l){this._oscParser.setHandlerFallback(l)}setErrorHandler(l){this._errorHandler=l}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(l,s,o,f,w){this._parseStack.state=l,this._parseStack.handlers=s,this._parseStack.handlerPos=o,this._parseStack.transition=f,this._parseStack.chunkPos=w}parse(l,s,o){let f,w=0,y=0,E=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,E=this._parseStack.chunkPos+1;else{if(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 g=this._parseStack.handlers;let R=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(o===!1&&R>-1){for(;R>=0&&(f=g[R](this._params),f!==!0);R--)if(f instanceof Promise)return this._parseStack.handlerPos=R,f}this._parseStack.handlers=[];break;case 4:if(o===!1&&R>-1){for(;R>=0&&(f=g[R](),f!==!0);R--)if(f instanceof Promise)return this._parseStack.handlerPos=R,f}this._parseStack.handlers=[];break;case 6:if(w=l[this._parseStack.chunkPos],f=this._dcsParser.unhook(w!==24&&w!==26,o),f)return f;w===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(w=l[this._parseStack.chunkPos],f=this._oscParser.end(w!==24&&w!==26,o),f)return f;w===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,E=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let g=E;g<s;++g){switch(w=l[g],y=this._transitions.table[this.currentState<<8|(w<160?w:x)],y>>4){case 2:for(let A=g+1;;++A){if(A>=s||(w=l[A])<32||w>126&&w<x){this._printHandler(l,g,A),g=A-1;break}if(++A>=s||(w=l[A])<32||w>126&&w<x){this._printHandler(l,g,A),g=A-1;break}if(++A>=s||(w=l[A])<32||w>126&&w<x){this._printHandler(l,g,A),g=A-1;break}if(++A>=s||(w=l[A])<32||w>126&&w<x){this._printHandler(l,g,A),g=A-1;break}}break;case 3:this._executeHandlers[w]?this._executeHandlers[w]():this._executeHandlerFb(w),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:g,code:w,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const R=this._csiHandlers[this._collect<<8|w];let B=R?R.length-1:-1;for(;B>=0&&(f=R[B](this._params),f!==!0);B--)if(f instanceof Promise)return this._preserveStack(3,R,B,y,g),f;B<0&&this._csiHandlerFb(this._collect<<8|w,this._params),this.precedingJoinState=0;break;case 8:do switch(w){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(w-48)}while(++g<s&&(w=l[g])>47&&w<60);g--;break;case 9:this._collect<<=8,this._collect|=w;break;case 10:const O=this._escHandlers[this._collect<<8|w];let j=O?O.length-1:-1;for(;j>=0&&(f=O[j](),f!==!0);j--)if(f instanceof Promise)return this._preserveStack(4,O,j,y,g),f;j<0&&this._escHandlerFb(this._collect<<8|w),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|w,this._params);break;case 13:for(let A=g+1;;++A)if(A>=s||(w=l[A])===24||w===26||w===27||w>127&&w<x){this._dcsParser.put(l,g,A),g=A-1;break}break;case 14:if(f=this._dcsParser.unhook(w!==24&&w!==26),f)return this._preserveStack(6,[],0,y,g),f;w===27&&(y|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let A=g+1;;A++)if(A>=s||(w=l[A])<32||w>127&&w<x){this._oscParser.put(l,g,A),g=A-1;break}break;case 6:if(f=this._oscParser.end(w!==24&&w!==26),f)return this._preserveStack(5,[],0,y,g),f;w===27&&(y|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&y}}}c.EscapeSequenceParser=_},6242:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.OscHandler=c.OscParser=void 0;const p=h(5770),m=h(482),u=[];c.OscParser=class{constructor(){this._state=0,this._active=u,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(v,S){this._handlers[v]===void 0&&(this._handlers[v]=[]);const x=this._handlers[v];return x.push(S),{dispose:()=>{const _=x.indexOf(S);_!==-1&&x.splice(_,1)}}}clearHandler(v){this._handlers[v]&&delete this._handlers[v]}setHandlerFallback(v){this._handlerFb=v}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=u}reset(){if(this._state===2)for(let v=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;v>=0;--v)this._active[v].end(!1);this._stack.paused=!1,this._active=u,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||u,this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].start();else this._handlerFb(this._id,"START")}_put(v,S,x){if(this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].put(v,S,x);else this._handlerFb(this._id,"PUT",(0,m.utf32ToString)(v,S,x))}start(){this.reset(),this._state=1}put(v,S,x){if(this._state!==3){if(this._state===1)for(;S<x;){const _=v[S++];if(_===59){this._state=2,this._start();break}if(_<48||57<_)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+_-48}this._state===2&&x-S>0&&this._put(v,S,x)}}end(v,S=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let x=!1,_=this._active.length-1,n=!1;if(this._stack.paused&&(_=this._stack.loopPosition-1,x=S,n=this._stack.fallThrough,this._stack.paused=!1),!n&&x===!1){for(;_>=0&&(x=this._active[_].end(v),x!==!0);_--)if(x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!1,x;_--}for(;_>=0;_--)if(x=this._active[_].end(!1),x instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!0,x}else this._handlerFb(this._id,"END",v);this._active=u,this._id=-1,this._state=0}}},c.OscHandler=class{constructor(v){this._handler=v,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(v,S,x){this._hitLimit||(this._data+=(0,m.utf32ToString)(v,S,x),this._data.length>p.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(v){let S=!1;if(this._hitLimit)S=!1;else if(v&&(S=this._handler(this._data),S instanceof Promise))return S.then((x=>(this._data="",this._hitLimit=!1,x)));return this._data="",this._hitLimit=!1,S}}},8742:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.Params=void 0;const h=2147483647;class p{static fromArray(u){const v=new p;if(!u.length)return v;for(let S=Array.isArray(u[0])?1:0;S<u.length;++S){const x=u[S];if(Array.isArray(x))for(let _=0;_<x.length;++_)v.addSubParam(x[_]);else v.addParam(x)}return v}constructor(u=32,v=32){if(this.maxLength=u,this.maxSubParamsLength=v,v>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(v),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const u=new p(this.maxLength,this.maxSubParamsLength);return u.params.set(this.params),u.length=this.length,u._subParams.set(this._subParams),u._subParamsLength=this._subParamsLength,u._subParamsIdx.set(this._subParamsIdx),u._rejectDigits=this._rejectDigits,u._rejectSubDigits=this._rejectSubDigits,u._digitIsSub=this._digitIsSub,u}toArray(){const u=[];for(let v=0;v<this.length;++v){u.push(this.params[v]);const S=this._subParamsIdx[v]>>8,x=255&this._subParamsIdx[v];x-S>0&&u.push(Array.prototype.slice.call(this._subParams,S,x))}return u}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(u){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=u>h?h:u}}addSubParam(u){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=u>h?h:u,this._subParamsIdx[this.length-1]++}}hasSubParams(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0}getSubParams(u){const v=this._subParamsIdx[u]>>8,S=255&this._subParamsIdx[u];return S-v>0?this._subParams.subarray(v,S):null}getSubParamsAll(){const u={};for(let v=0;v<this.length;++v){const S=this._subParamsIdx[v]>>8,x=255&this._subParamsIdx[v];x-S>0&&(u[v]=this._subParams.slice(S,x))}return u}addDigit(u){let v;if(this._rejectDigits||!(v=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const S=this._digitIsSub?this._subParams:this.params,x=S[v-1];S[v-1]=~x?Math.min(10*x+u,h):u}}c.Params=p},5741:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.AddonManager=void 0,c.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let h=this._addons.length-1;h>=0;h--)this._addons[h].instance.dispose()}loadAddon(h,p){const m={instance:p,dispose:p.dispose,isDisposed:!1};this._addons.push(m),p.dispose=()=>this._wrappedAddonDispose(m),p.activate(h)}_wrappedAddonDispose(h){if(h.isDisposed)return;let p=-1;for(let m=0;m<this._addons.length;m++)if(this._addons[m]===h){p=m;break}if(p===-1)throw new Error("Could not dispose an addon that has not been loaded");h.isDisposed=!0,h.dispose.apply(h.instance),this._addons.splice(p,1)}}},8771:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferApiView=void 0;const p=h(3785),m=h(511);c.BufferApiView=class{constructor(u,v){this._buffer=u,this.type=v}init(u){return this._buffer=u,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(u){const v=this._buffer.lines.get(u);if(v)return new p.BufferLineApiView(v)}getNullCell(){return new m.CellData}}},3785:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferLineApiView=void 0;const p=h(511);c.BufferLineApiView=class{constructor(m){this._line=m}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(m,u){if(!(m<0||m>=this._line.length))return u?(this._line.loadCell(m,u),u):this._line.loadCell(m,new p.CellData)}translateToString(m,u,v){return this._line.translateToString(m,u,v)}}},8285:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.BufferNamespaceApi=void 0;const p=h(8771),m=h(8460),u=h(844);class v extends u.Disposable{constructor(x){super(),this._core=x,this._onBufferChange=this.register(new m.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new p.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new p.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)}}c.BufferNamespaceApi=v},7975:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.ParserApi=void 0,c.ParserApi=class{constructor(h){this._core=h}registerCsiHandler(h,p){return this._core.registerCsiHandler(h,(m=>p(m.toArray())))}addCsiHandler(h,p){return this.registerCsiHandler(h,p)}registerDcsHandler(h,p){return this._core.registerDcsHandler(h,((m,u)=>p(m,u.toArray())))}addDcsHandler(h,p){return this.registerDcsHandler(h,p)}registerEscHandler(h,p){return this._core.registerEscHandler(h,p)}addEscHandler(h,p){return this.registerEscHandler(h,p)}registerOscHandler(h,p){return this._core.registerOscHandler(h,p)}addOscHandler(h,p){return this.registerOscHandler(h,p)}}},7090:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeApi=void 0,c.UnicodeApi=class{constructor(h){this._core=h}register(h){this._core.unicodeService.register(h)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(h){this._core.unicodeService.activeVersion=h}}},744:function(K,c,h){var p=this&&this.__decorate||function(n,l,s,o){var f,w=arguments.length,y=w<3?l:o===null?o=Object.getOwnPropertyDescriptor(l,s):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(n,l,s,o);else for(var E=n.length-1;E>=0;E--)(f=n[E])&&(y=(w<3?f(y):w>3?f(l,s,y):f(l,s))||y);return w>3&&y&&Object.defineProperty(l,s,y),y},m=this&&this.__param||function(n,l){return function(s,o){l(s,o,n)}};Object.defineProperty(c,"__esModule",{value:!0}),c.BufferService=c.MINIMUM_ROWS=c.MINIMUM_COLS=void 0;const u=h(8460),v=h(844),S=h(5295),x=h(2585);c.MINIMUM_COLS=2,c.MINIMUM_ROWS=1;let _=c.BufferService=class extends v.Disposable{get buffer(){return this.buffers.active}constructor(n){super(),this.isUserScrolling=!1,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new u.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(n.rawOptions.cols||0,c.MINIMUM_COLS),this.rows=Math.max(n.rawOptions.rows||0,c.MINIMUM_ROWS),this.buffers=this.register(new S.BufferSet(n,this))}resize(n,l){this.cols=n,this.rows=l,this.buffers.resize(n,l),this._onResize.fire({cols:n,rows:l})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(n,l=!1){const s=this.buffer;let o;o=this._cachedBlankLine,o&&o.length===this.cols&&o.getFg(0)===n.fg&&o.getBg(0)===n.bg||(o=s.getBlankLine(n,l),this._cachedBlankLine=o),o.isWrapped=l;const f=s.ybase+s.scrollTop,w=s.ybase+s.scrollBottom;if(s.scrollTop===0){const y=s.lines.isFull;w===s.lines.length-1?y?s.lines.recycle().copyFrom(o):s.lines.push(o.clone()):s.lines.splice(w+1,0,o.clone()),y?this.isUserScrolling&&(s.ydisp=Math.max(s.ydisp-1,0)):(s.ybase++,this.isUserScrolling||s.ydisp++)}else{const y=w-f+1;s.lines.shiftElements(f+1,y-1,-1),s.lines.set(w,o.clone())}this.isUserScrolling||(s.ydisp=s.ybase),this._onScroll.fire(s.ydisp)}scrollLines(n,l,s){const o=this.buffer;if(n<0){if(o.ydisp===0)return;this.isUserScrolling=!0}else n+o.ydisp>=o.ybase&&(this.isUserScrolling=!1);const f=o.ydisp;o.ydisp=Math.max(Math.min(o.ydisp+n,o.ybase),0),f!==o.ydisp&&(l||this._onScroll.fire(o.ydisp))}};c.BufferService=_=p([m(0,x.IOptionsService)],_)},7994:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.CharsetService=void 0,c.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(h){this.glevel=h,this.charset=this._charsets[h]}setgCharset(h,p){this._charsets[h]=p,this.glevel===h&&(this.charset=p)}}},1753:function(K,c,h){var p=this&&this.__decorate||function(o,f,w,y){var E,g=arguments.length,R=g<3?f:y===null?y=Object.getOwnPropertyDescriptor(f,w):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(o,f,w,y);else for(var B=o.length-1;B>=0;B--)(E=o[B])&&(R=(g<3?E(R):g>3?E(f,w,R):E(f,w))||R);return g>3&&R&&Object.defineProperty(f,w,R),R},m=this&&this.__param||function(o,f){return function(w,y){f(w,y,o)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreMouseService=void 0;const u=h(2585),v=h(8460),S=h(844),x={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 _(o,f){let w=(o.ctrl?16:0)|(o.shift?4:0)|(o.alt?8:0);return o.button===4?(w|=64,w|=o.action):(w|=3&o.button,4&o.button&&(w|=64),8&o.button&&(w|=128),o.action===32?w|=32:o.action!==0||f||(w|=3)),w}const n=String.fromCharCode,l={DEFAULT:o=>{const f=[_(o,!1)+32,o.col+32,o.row+32];return f[0]>255||f[1]>255||f[2]>255?"":`\x1B[M${n(f[0])}${n(f[1])}${n(f[2])}`},SGR:o=>{const f=o.action===0&&o.button!==4?"m":"M";return`\x1B[<${_(o,!0)};${o.col};${o.row}${f}`},SGR_PIXELS:o=>{const f=o.action===0&&o.button!==4?"m":"M";return`\x1B[<${_(o,!0)};${o.x};${o.y}${f}`}};let s=c.CoreMouseService=class extends S.Disposable{constructor(o,f){super(),this._bufferService=o,this._coreService=f,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new v.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const w of Object.keys(x))this.addProtocol(w,x[w]);for(const w of Object.keys(l))this.addEncoding(w,l[w]);this.reset()}addProtocol(o,f){this._protocols[o]=f}addEncoding(o,f){this._encodings[o]=f}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 f=this._encodings[this._activeEncoding](o);return f&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(f):this._coreService.triggerDataEvent(f,!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,f,w){if(w){if(o.x!==f.x||o.y!==f.y)return!1}else if(o.col!==f.col||o.row!==f.row)return!1;return o.button===f.button&&o.action===f.action&&o.ctrl===f.ctrl&&o.alt===f.alt&&o.shift===f.shift}};c.CoreMouseService=s=p([m(0,u.IBufferService),m(1,u.ICoreService)],s)},6975:function(K,c,h){var p=this&&this.__decorate||function(s,o,f,w){var y,E=arguments.length,g=E<3?o:w===null?w=Object.getOwnPropertyDescriptor(o,f):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(s,o,f,w);else for(var R=s.length-1;R>=0;R--)(y=s[R])&&(g=(E<3?y(g):E>3?y(o,f,g):y(o,f))||g);return E>3&&g&&Object.defineProperty(o,f,g),g},m=this&&this.__param||function(s,o){return function(f,w){o(f,w,s)}};Object.defineProperty(c,"__esModule",{value:!0}),c.CoreService=void 0;const u=h(1439),v=h(8460),S=h(844),x=h(2585),_=Object.freeze({insertMode:!1}),n=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let l=c.CoreService=class extends S.Disposable{constructor(s,o,f){super(),this._bufferService=s,this._logService=o,this._optionsService=f,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new v.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new v.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,u.clone)(_),this.decPrivateModes=(0,u.clone)(n)}reset(){this.modes=(0,u.clone)(_),this.decPrivateModes=(0,u.clone)(n)}triggerDataEvent(s,o=!1){if(this._optionsService.rawOptions.disableStdin)return;const f=this._bufferService.buffer;o&&this._optionsService.rawOptions.scrollOnUserInput&&f.ybase!==f.ydisp&&this._onRequestScrollToBottom.fire(),o&&this._onUserInput.fire(),this._logService.debug(`sending data "${s}"`,(()=>s.split("").map((w=>w.charCodeAt(0))))),this._onData.fire(s)}triggerBinaryEvent(s){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${s}"`,(()=>s.split("").map((o=>o.charCodeAt(0))))),this._onBinary.fire(s))}};c.CoreService=l=p([m(0,x.IBufferService),m(1,x.ILogService),m(2,x.IOptionsService)],l)},9074:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.DecorationService=void 0;const p=h(8055),m=h(8460),u=h(844),v=h(6106);let S=0,x=0;class _ extends u.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new v.SortedList((s=>s==null?void 0:s.marker.line)),this._onDecorationRegistered=this.register(new m.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new m.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,u.toDisposable)((()=>this.reset())))}registerDecoration(s){if(s.marker.isDisposed)return;const o=new n(s);if(o){const f=o.marker.onDispose((()=>o.dispose()));o.onDispose((()=>{o&&(this._decorations.delete(o)&&this._onDecorationRemoved.fire(o),f.dispose())})),this._decorations.insert(o),this._onDecorationRegistered.fire(o)}return o}reset(){for(const s of this._decorations.values())s.dispose();this._decorations.clear()}*getDecorationsAtCell(s,o,f){let w=0,y=0;for(const E of this._decorations.getKeyIterator(o))w=E.options.x??0,y=w+(E.options.width??1),s>=w&&s<y&&(!f||(E.options.layer??"bottom")===f)&&(yield E)}forEachDecorationAtCell(s,o,f,w){this._decorations.forEachByKey(o,(y=>{S=y.options.x??0,x=S+(y.options.width??1),s>=S&&s<x&&(!f||(y.options.layer??"bottom")===f)&&w(y)}))}}c.DecorationService=_;class n extends u.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=p.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=p.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(s){super(),this.options=s,this.onRenderEmitter=this.register(new m.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new m.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=s.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.InstantiationService=c.ServiceCollection=void 0;const p=h(2585),m=h(8343);class u{constructor(...S){this._entries=new Map;for(const[x,_]of S)this.set(x,_)}set(S,x){const _=this._entries.get(S);return this._entries.set(S,x),_}forEach(S){for(const[x,_]of this._entries.entries())S(x,_)}has(S){return this._entries.has(S)}get(S){return this._entries.get(S)}}c.ServiceCollection=u,c.InstantiationService=class{constructor(){this._services=new u,this._services.set(p.IInstantiationService,this)}setService(v,S){this._services.set(v,S)}getService(v){return this._services.get(v)}createInstance(v,...S){const x=(0,m.getServiceDependencies)(v).sort(((l,s)=>l.index-s.index)),_=[];for(const l of x){const s=this._services.get(l.id);if(!s)throw new Error(`[createInstance] ${v.name} depends on UNKNOWN service ${l.id}.`);_.push(s)}const n=x.length>0?x[0].index:S.length;if(S.length!==n)throw new Error(`[createInstance] First service dependency of ${v.name} at position ${n+1} conflicts with ${S.length} static arguments`);return new v(...S,..._)}}},7866:function(K,c,h){var p=this&&this.__decorate||function(n,l,s,o){var f,w=arguments.length,y=w<3?l:o===null?o=Object.getOwnPropertyDescriptor(l,s):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(n,l,s,o);else for(var E=n.length-1;E>=0;E--)(f=n[E])&&(y=(w<3?f(y):w>3?f(l,s,y):f(l,s))||y);return w>3&&y&&Object.defineProperty(l,s,y),y},m=this&&this.__param||function(n,l){return function(s,o){l(s,o,n)}};Object.defineProperty(c,"__esModule",{value:!0}),c.traceCall=c.setTraceLogger=c.LogService=void 0;const u=h(844),v=h(2585),S={trace:v.LogLevelEnum.TRACE,debug:v.LogLevelEnum.DEBUG,info:v.LogLevelEnum.INFO,warn:v.LogLevelEnum.WARN,error:v.LogLevelEnum.ERROR,off:v.LogLevelEnum.OFF};let x,_=c.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(n){super(),this._optionsService=n,this._logLevel=v.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),x=this}_updateLogLevel(){this._logLevel=S[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(n){for(let l=0;l<n.length;l++)typeof n[l]=="function"&&(n[l]=n[l]())}_log(n,l,s){this._evalLazyOptionalParams(s),n.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+l,...s)}trace(n,...l){var s;this._logLevel<=v.LogLevelEnum.TRACE&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.trace.bind(this._optionsService.options.logger))??console.log,n,l)}debug(n,...l){var s;this._logLevel<=v.LogLevelEnum.DEBUG&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.debug.bind(this._optionsService.options.logger))??console.log,n,l)}info(n,...l){var s;this._logLevel<=v.LogLevelEnum.INFO&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.info.bind(this._optionsService.options.logger))??console.info,n,l)}warn(n,...l){var s;this._logLevel<=v.LogLevelEnum.WARN&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.warn.bind(this._optionsService.options.logger))??console.warn,n,l)}error(n,...l){var s;this._logLevel<=v.LogLevelEnum.ERROR&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.error.bind(this._optionsService.options.logger))??console.error,n,l)}};c.LogService=_=p([m(0,v.IOptionsService)],_),c.setTraceLogger=function(n){x=n},c.traceCall=function(n,l,s){if(typeof s.value!="function")throw new Error("not supported");const o=s.value;s.value=function(...f){if(x.logLevel!==v.LogLevelEnum.TRACE)return o.apply(this,f);x.trace(`GlyphRenderer#${o.name}(${f.map((y=>JSON.stringify(y))).join(", ")})`);const w=o.apply(this,f);return x.trace(`GlyphRenderer#${o.name} return`,w),w}}},7302:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.OptionsService=c.DEFAULT_OPTIONS=void 0;const p=h(8460),m=h(844),u=h(6114);c.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:u.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const v=["normal","bold","100","200","300","400","500","600","700","800","900"];class S extends m.Disposable{constructor(_){super(),this._onOptionChange=this.register(new p.EventEmitter),this.onOptionChange=this._onOptionChange.event;const n={...c.DEFAULT_OPTIONS};for(const l in _)if(l in n)try{const s=_[l];n[l]=this._sanitizeAndValidateOption(l,s)}catch(s){console.error(s)}this.rawOptions=n,this.options={...n},this._setupOptions(),this.register((0,m.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(_,n){return this.onOptionChange((l=>{l===_&&n(this.rawOptions[_])}))}onMultipleOptionChange(_,n){return this.onOptionChange((l=>{_.indexOf(l)!==-1&&n()}))}_setupOptions(){const _=l=>{if(!(l in c.DEFAULT_OPTIONS))throw new Error(`No option with key "${l}"`);return this.rawOptions[l]},n=(l,s)=>{if(!(l in c.DEFAULT_OPTIONS))throw new Error(`No option with key "${l}"`);s=this._sanitizeAndValidateOption(l,s),this.rawOptions[l]!==s&&(this.rawOptions[l]=s,this._onOptionChange.fire(l))};for(const l in this.rawOptions){const s={get:_.bind(this,l),set:n.bind(this,l)};Object.defineProperty(this.options,l,s)}}_sanitizeAndValidateOption(_,n){switch(_){case"cursorStyle":if(n||(n=c.DEFAULT_OPTIONS[_]),!(function(l){return l==="block"||l==="underline"||l==="bar"})(n))throw new Error(`"${n}" is not a valid value for ${_}`);break;case"wordSeparator":n||(n=c.DEFAULT_OPTIONS[_]);break;case"fontWeight":case"fontWeightBold":if(typeof n=="number"&&1<=n&&n<=1e3)break;n=v.includes(n)?n:c.DEFAULT_OPTIONS[_];break;case"cursorWidth":n=Math.floor(n);case"lineHeight":case"tabStopWidth":if(n<1)throw new Error(`${_} cannot be less than 1, value: ${n}`);break;case"minimumContrastRatio":n=Math.max(1,Math.min(21,Math.round(10*n)/10));break;case"scrollback":if((n=Math.min(n,4294967295))<0)throw new Error(`${_} cannot be less than 0, value: ${n}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(n<=0)throw new Error(`${_} cannot be less than or equal to 0, value: ${n}`);break;case"rows":case"cols":if(!n&&n!==0)throw new Error(`${_} must be numeric, value: ${n}`);break;case"windowsPty":n=n??{}}return n}}c.OptionsService=S},2660:function(K,c,h){var p=this&&this.__decorate||function(S,x,_,n){var l,s=arguments.length,o=s<3?x:n===null?n=Object.getOwnPropertyDescriptor(x,_):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(S,x,_,n);else for(var f=S.length-1;f>=0;f--)(l=S[f])&&(o=(s<3?l(o):s>3?l(x,_,o):l(x,_))||o);return s>3&&o&&Object.defineProperty(x,_,o),o},m=this&&this.__param||function(S,x){return function(_,n){x(_,n,S)}};Object.defineProperty(c,"__esModule",{value:!0}),c.OscLinkService=void 0;const u=h(2585);let v=c.OscLinkService=class{constructor(S){this._bufferService=S,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(S){const x=this._bufferService.buffer;if(S.id===void 0){const f=x.addMarker(x.ybase+x.y),w={data:S,id:this._nextId++,lines:[f]};return f.onDispose((()=>this._removeMarkerFromLink(w,f))),this._dataByLinkId.set(w.id,w),w.id}const _=S,n=this._getEntryIdKey(_),l=this._entriesWithId.get(n);if(l)return this.addLineToLink(l.id,x.ybase+x.y),l.id;const s=x.addMarker(x.ybase+x.y),o={id:this._nextId++,key:this._getEntryIdKey(_),data:_,lines:[s]};return s.onDispose((()=>this._removeMarkerFromLink(o,s))),this._entriesWithId.set(o.key,o),this._dataByLinkId.set(o.id,o),o.id}addLineToLink(S,x){const _=this._dataByLinkId.get(S);if(_&&_.lines.every((n=>n.line!==x))){const n=this._bufferService.buffer.addMarker(x);_.lines.push(n),n.onDispose((()=>this._removeMarkerFromLink(_,n)))}}getLinkData(S){var x;return(x=this._dataByLinkId.get(S))==null?void 0:x.data}_getEntryIdKey(S){return`${S.id};;${S.uri}`}_removeMarkerFromLink(S,x){const _=S.lines.indexOf(x);_!==-1&&(S.lines.splice(_,1),S.lines.length===0&&(S.data.id!==void 0&&this._entriesWithId.delete(S.key),this._dataByLinkId.delete(S.id)))}};c.OscLinkService=v=p([m(0,u.IBufferService)],v)},8343:(K,c)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.createDecorator=c.getServiceDependencies=c.serviceRegistry=void 0;const h="di$target",p="di$dependencies";c.serviceRegistry=new Map,c.getServiceDependencies=function(m){return m[p]||[]},c.createDecorator=function(m){if(c.serviceRegistry.has(m))return c.serviceRegistry.get(m);const u=function(v,S,x){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(_,n,l){n[h]===n?n[p].push({id:_,index:l}):(n[p]=[{id:_,index:l}],n[h]=n)})(u,v,x)};return u.toString=()=>m,c.serviceRegistry.set(m,u),u}},2585:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.IDecorationService=c.IUnicodeService=c.IOscLinkService=c.IOptionsService=c.ILogService=c.LogLevelEnum=c.IInstantiationService=c.ICharsetService=c.ICoreService=c.ICoreMouseService=c.IBufferService=void 0;const p=h(8343);var m;c.IBufferService=(0,p.createDecorator)("BufferService"),c.ICoreMouseService=(0,p.createDecorator)("CoreMouseService"),c.ICoreService=(0,p.createDecorator)("CoreService"),c.ICharsetService=(0,p.createDecorator)("CharsetService"),c.IInstantiationService=(0,p.createDecorator)("InstantiationService"),(function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"})(m||(c.LogLevelEnum=m={})),c.ILogService=(0,p.createDecorator)("LogService"),c.IOptionsService=(0,p.createDecorator)("OptionsService"),c.IOscLinkService=(0,p.createDecorator)("OscLinkService"),c.IUnicodeService=(0,p.createDecorator)("UnicodeService"),c.IDecorationService=(0,p.createDecorator)("DecorationService")},1480:(K,c,h)=>{Object.defineProperty(c,"__esModule",{value:!0}),c.UnicodeService=void 0;const p=h(8460),m=h(225);class u{static extractShouldJoin(S){return(1&S)!=0}static extractWidth(S){return S>>1&3}static extractCharKind(S){return S>>3}static createPropertyValue(S,x,_=!1){return(16777215&S)<<3|(3&x)<<1|(_?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new p.EventEmitter,this.onChange=this._onChange.event;const S=new m.UnicodeV6;this.register(S),this._active=S.version,this._activeProvider=S}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(S){if(!this._providers[S])throw new Error(`unknown Unicode version "${S}"`);this._active=S,this._activeProvider=this._providers[S],this._onChange.fire(S)}register(S){this._providers[S.version]=S}wcwidth(S){return this._activeProvider.wcwidth(S)}getStringCellWidth(S){let x=0,_=0;const n=S.length;for(let l=0;l<n;++l){let s=S.charCodeAt(l);if(55296<=s&&s<=56319){if(++l>=n)return x+this.wcwidth(s);const w=S.charCodeAt(l);56320<=w&&w<=57343?s=1024*(s-55296)+w-56320+65536:x+=this.wcwidth(w)}const o=this.charProperties(s,_);let f=u.extractWidth(o);u.extractShouldJoin(o)&&(f-=u.extractWidth(_)),x+=f,_=o}return x}charProperties(S,x){return this._activeProvider.charProperties(S,x)}}c.UnicodeService=u}},Z={};function ee(K){var c=Z[K];if(c!==void 0)return c.exports;var h=Z[K]={exports:{}};return M[K].call(h.exports,h,h.exports,ee),h.exports}var oe={};return(()=>{var K=oe;Object.defineProperty(K,"__esModule",{value:!0}),K.Terminal=void 0;const c=ee(9042),h=ee(3236),p=ee(844),m=ee(5741),u=ee(8285),v=ee(7975),S=ee(7090),x=["cols","rows"];class _ extends p.Disposable{constructor(l){super(),this._core=this.register(new h.Terminal(l)),this._addonManager=this.register(new m.AddonManager),this._publicOptions={...this._core.options};const s=f=>this._core.options[f],o=(f,w)=>{this._checkReadonlyOptions(f),this._core.options[f]=w};for(const f in this._core.options){const w={get:s.bind(this,f),set:o.bind(this,f)};Object.defineProperty(this._publicOptions,f,w)}}_checkReadonlyOptions(l){if(x.includes(l))throw new Error(`Option "${l}" 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 v.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new S.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new u.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const l=this._core.coreService.decPrivateModes;let s="none";switch(this._core.coreMouseService.activeProtocol){case"X10":s="x10";break;case"VT200":s="vt200";break;case"DRAG":s="drag";break;case"ANY":s="any"}return{applicationCursorKeysMode:l.applicationCursorKeys,applicationKeypadMode:l.applicationKeypad,bracketedPasteMode:l.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:s,originMode:l.origin,reverseWraparoundMode:l.reverseWraparound,sendFocusMode:l.sendFocus,wraparoundMode:l.wraparound}}get options(){return this._publicOptions}set options(l){for(const s in l)this._publicOptions[s]=l[s]}blur(){this._core.blur()}focus(){this._core.focus()}input(l,s=!0){this._core.input(l,s)}resize(l,s){this._verifyIntegers(l,s),this._core.resize(l,s)}open(l){this._core.open(l)}attachCustomKeyEventHandler(l){this._core.attachCustomKeyEventHandler(l)}attachCustomWheelEventHandler(l){this._core.attachCustomWheelEventHandler(l)}registerLinkProvider(l){return this._core.registerLinkProvider(l)}registerCharacterJoiner(l){return this._checkProposedApi(),this._core.registerCharacterJoiner(l)}deregisterCharacterJoiner(l){this._checkProposedApi(),this._core.deregisterCharacterJoiner(l)}registerMarker(l=0){return this._verifyIntegers(l),this._core.registerMarker(l)}registerDecoration(l){return this._checkProposedApi(),this._verifyPositiveIntegers(l.x??0,l.width??0,l.height??0),this._core.registerDecoration(l)}hasSelection(){return this._core.hasSelection()}select(l,s,o){this._verifyIntegers(l,s,o),this._core.select(l,s,o)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(l,s){this._verifyIntegers(l,s),this._core.selectLines(l,s)}dispose(){super.dispose()}scrollLines(l){this._verifyIntegers(l),this._core.scrollLines(l)}scrollPages(l){this._verifyIntegers(l),this._core.scrollPages(l)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(l){this._verifyIntegers(l),this._core.scrollToLine(l)}clear(){this._core.clear()}write(l,s){this._core.write(l,s)}writeln(l,s){this._core.write(l),this._core.write(`\r
48
+ `,s)}paste(l){this._core.paste(l)}refresh(l,s){this._verifyIntegers(l,s),this._core.refresh(l,s)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(l){this._addonManager.loadAddon(this,l)}static get strings(){return c}_verifyIntegers(...l){for(const s of l)if(s===1/0||isNaN(s)||s%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...l){for(const s of l)if(s&&(s===1/0||isNaN(s)||s%1!=0||s<0))throw new Error("This API only accepts positive integers")}}K.Terminal=_})(),oe})()))})(qo)),qo.exports}var Ld=Rd(),Go={exports:{}},Xc;function Dd(){return Xc||(Xc=1,(function(F,$){(function(M,Z){F.exports=Z()})(self,(()=>(()=>{var M={};return(()=>{var Z=M;Object.defineProperty(Z,"__esModule",{value:!0}),Z.FitAddon=void 0,Z.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 oe=this._terminal._core;this._terminal.rows===ee.rows&&this._terminal.cols===ee.cols||(oe._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,oe=ee._renderService.dimensions;if(oe.css.cell.width===0||oe.css.cell.height===0)return;const K=this._terminal.options.scrollback===0?0:ee.viewport.scrollBarWidth,c=window.getComputedStyle(this._terminal.element.parentElement),h=parseInt(c.getPropertyValue("height")),p=Math.max(0,parseInt(c.getPropertyValue("width"))),m=window.getComputedStyle(this._terminal.element),u=h-(parseInt(m.getPropertyValue("padding-top"))+parseInt(m.getPropertyValue("padding-bottom"))),v=p-(parseInt(m.getPropertyValue("padding-right"))+parseInt(m.getPropertyValue("padding-left")))-K;return{cols:Math.max(2,Math.floor(v/oe.css.cell.width)),rows:Math.max(1,Math.floor(u/oe.css.cell.height))}}}})(),M})()))})(Go)),Go.exports}var Td=Dd();function Ad({cwd:F,cmd:$,governed:M=!0}){const Z=Ce.useRef(null),ee=Ce.useRef({cwd:F,cmd:$,governed:M});return ee.current={cwd:F,cmd:$,governed:M},Ce.useEffect(()=>{const oe=Z.current;if(!oe)return;let K=!1,c,h;const p=new Ld.Terminal({convertEol:!1,cursorBlink:!0,fontSize:12,fontFamily:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",theme:{background:"#111827",foreground:"#e5e7eb"}}),m=new Td.FitAddon;p.loadAddon(m),p.open(oe);try{m.fit()}catch{}const u=p.onData(S=>{c&&c.readyState===WebSocket.OPEN&&c.send(S)});(async()=>{const S=ee.current;let x;try{const n={cwd:S.cwd,cols:p.cols,rows:p.rows,governed:S.governed};S.cmd!==void 0&&(n.cmd=S.cmd),x=(await Xe.openTerminal(n)).id}catch(n){const l=n instanceof Error?n.message:String(n);p.write(`\r
49
+ \x1B[31m[failed to open terminal: ${l}]\x1B[0m\r
50
+ `);return}if(K){Xe.closeTerminal(x).catch(()=>{});return}h=x;const _=new WebSocket(pd(x));_.binaryType="arraybuffer",_.onmessage=n=>{typeof n.data=="string"?p.write(n.data):p.write(new Uint8Array(n.data))},c=_})();const v=typeof ResizeObserver<"u"?new ResizeObserver(()=>{try{m.fit()}catch{}h&&Xe.resizeTerminal(h,p.cols,p.rows).catch(()=>{})}):void 0;return v==null||v.observe(oe),()=>{K=!0,v==null||v.disconnect(),u.dispose();try{c==null||c.close()}catch{}h&&Xe.closeTerminal(h).catch(()=>{}),p.dispose()}},[]),W.jsxs("div",{"data-testid":"terminal",className:"flex flex-col gap-1",children:[W.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[W.jsx("span",{className:"font-semibold text-gray-500",children:"Terminal"}),W.jsx("span",{"data-testid":"terminal-governed",className:M?"text-gray-400":"font-semibold text-amber-600",children:M?"governed":"ungoverned operator shell"})]}),W.jsx("div",{ref:Z,"data-testid":"terminal-host",className:"h-64 w-full overflow-hidden rounded bg-gray-900 p-1"})]})}const Pd=new Set(["completed","cancelled","failed"]);function Bd(F){return F==="none"?"none":F==="all"?"every unit":`before #${F.before}`}function Md({view:F,onRefresh:$}){const{session:M}=F,Z=pr(_=>_.gates[M.id]),ee=Xs(_=>_.logs[M.id])??[],[oe,K]=Ce.useState(!1),[c,h]=Ce.useState(!1),[p,m]=Ce.useState(!1),u=Qc[M.status]??{label:M.status,className:"text-gray-500"},S=!Pd.has(M.status)&&M.status!=="awaiting_human";async function x(){K(!0);try{await Xe.resumeRun(M.id),$()}finally{K(!1)}}return W.jsxs("div",{className:"flex flex-col gap-4","data-testid":"run-detail","data-run-id":M.id,children:[W.jsxs("header",{children:[W.jsxs("div",{className:"flex items-start justify-between gap-3",children:[W.jsx("h2",{className:"text-base font-semibold",children:M.problem}),W.jsx("span",{className:`text-sm font-medium shrink-0 ${u.className}`,children:u.label})]}),W.jsxs("div",{className:"mt-1 flex flex-wrap gap-x-4 gap-y-0.5 text-[11px] text-gray-400",children:[W.jsx("span",{className:"font-mono",children:M.id}),W.jsxs("span",{children:["gate: ",Bd(M.human_confirm)]}),W.jsxs("span",{children:["entity: ",M.entity_mode]}),M.repo_ref&&W.jsxs("span",{children:["repo: ",M.repo_ref]}),W.jsxs("span",{children:["cursor: unit #",M.unit_ix]})]})]}),W.jsx(kd,{view:F,log:ee}),M.status==="awaiting_human"&&W.jsx(md,{runId:M.id,...Z?{ord:Z.ord,prompt:Z.prompt}:{},onResolved:$}),S&&W.jsx("button",{type:"button","data-testid":"run-resume",onClick:()=>void x(),disabled:oe,className:"self-start rounded border border-gray-300 px-3 py-1 text-xs text-gray-600 hover:bg-gray-50 disabled:opacity-50",children:oe?"Resuming…":"Resume from cursor"}),W.jsxs("section",{children:[W.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-gray-400 mb-1",children:"Work units"}),W.jsx(xd,{runId:M.id,units:F.units,onResolved:$,...Z?{gateOrd:Z.ord}:{}})]}),W.jsx(Ed,{runId:M.id}),W.jsxs("section",{"data-testid":"terminal-section",children:[W.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-gray-400 mb-1",children:"Terminal"}),c?W.jsxs("div",{className:"flex flex-col gap-2",children:[W.jsx(Ad,{cwd:M.workdir??".",governed:!p},`${M.id}:${p?"ungoverned":"governed"}`),W.jsx("button",{type:"button","data-testid":"terminal-close",onClick:()=>h(!1),className:"self-start rounded border border-gray-300 px-3 py-1 text-xs text-gray-600 hover:bg-gray-50",children:"Close terminal"})]}):W.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[W.jsx("button",{type:"button","data-testid":"terminal-open",onClick:()=>h(!0),className:"rounded border border-gray-300 px-3 py-1 text-xs text-gray-600 hover:bg-gray-50",children:"Open terminal"}),W.jsxs("label",{className:"flex items-center gap-1.5 text-[11px] text-gray-500",children:[W.jsx("input",{type:"checkbox","data-testid":"terminal-ungoverned",checked:p,onChange:_=>m(_.target.checked)}),W.jsx("span",{className:p?"font-semibold text-amber-600":"",children:"ungoverned operator shell (bypasses the gate-hook)"})]})]})]}),W.jsxs("details",{className:"text-xs",children:[W.jsx("summary",{className:"cursor-pointer text-gray-400",children:"Deferred surfaces"}),W.jsx("div",{className:"mt-2 flex flex-col gap-2",children:W.jsx(bd,{})})]})]})}function Od({onLaunched:F,onCancel:$}){const[M,Z]=Ce.useState(""),[ee,oe]=Ce.useState([]),[K,c]=Ce.useState(new Set),[h,p]=Ce.useState([]),[m,u]=Ce.useState(""),[v,S]=Ce.useState("shared"),[x,_]=Ce.useState("none"),[n,l]=Ce.useState(1),[s,o]=Ce.useState(!1),[f,w]=Ce.useState(""),[y,E]=Ce.useState(""),[g,R]=Ce.useState(null),[B,O]=Ce.useState(!1),[j,A]=Ce.useState(null);Ce.useEffect(()=>{Xe.getRoster().then(({roster:N})=>{oe(N),c(new Set(N.filter(C=>C.enabled_for_council).map(C=>C.key)))}).catch(()=>A("Could not load the council roster.")),Xe.listRepos().then(({repos:N})=>p(N)).catch(()=>{})},[]);function G(N){c(C=>{const D=new Set(C);return D.has(N)?D.delete(N):D.add(N),D})}async function J(){if(!(!f.trim()||!y.trim())){R(null);try{const{repo:N}=await Xe.registerRepo(f.trim(),y.trim());p(C=>[...C,N]),u(N.id),o(!1),w(""),E("")}catch(N){R(N instanceof Error?N.message:String(N))}}}async function se(){if(!M.trim()||K.size===0)return;O(!0),A(null);const N={problem:M.trim()},C=ee.filter(D=>K.has(D.key));C.length>0&&(N.clisJson=JSON.stringify(C)),N.entityMode=v,x==="all"?N.humanConfirm="all":x==="before"&&(N.humanConfirm=`before:${n}`),m&&(N.repoRef=m);try{const{runId:D}=await Xe.launchRun(N);F(D)}catch(D){A(D instanceof Error?D.message:String(D))}finally{O(!1)}}const le=M.trim().length>0&&K.size>0&&!B;return W.jsxs("div",{className:"rounded-lg border bg-white p-4 shadow-sm","data-testid":"launch-form",children:[W.jsxs("div",{className:"flex items-center justify-between mb-3",children:[W.jsx("p",{className:"font-semibold text-sm",children:"Launch a run"}),W.jsx("button",{type:"button",onClick:$,className:"text-xs text-gray-400 hover:text-gray-600",children:"Cancel"})]}),W.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Brief"}),W.jsx("textarea",{"data-testid":"launch-problem",className:"w-full rounded border p-2 text-xs mb-1 resize-none",rows:3,placeholder:"Describe the problem — decomposed into ordered work units.",value:M,onChange:N=>Z(N.target.value)}),W.jsxs("div",{className:"mb-3",children:[W.jsx("input",{"data-testid":"launch-recall",disabled:!0,placeholder:"Memory / knowledge recall on the brief",className:"w-full rounded border border-dashed bg-gray-50 p-2 text-xs text-gray-400"}),W.jsx("p",{className:"text-[10px] text-gray-400 mt-0.5",children:"Recall is disabled — pending the core-ts memory/knowledge binding (DES-STUDIO-001 §4.4)."})]}),W.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Council roster"}),W.jsx("div",{className:"mb-3 flex flex-col gap-1 max-h-40 overflow-auto rounded border p-2","data-testid":"launch-roster",children:ee.length===0?W.jsx("span",{className:"text-xs text-gray-400",children:"No roster loaded."}):ee.map(N=>W.jsxs("label",{className:"flex items-center gap-2 text-xs",children:[W.jsx("input",{type:"checkbox",checked:K.has(N.key),onChange:()=>G(N.key),"data-testid":`launch-seat-${N.key}`}),W.jsx("span",{children:N.display_name}),W.jsx("span",{className:"font-mono text-gray-400",children:N.key})]},N.key))}),W.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Target repo"}),W.jsxs("div",{className:"mb-3",children:[W.jsxs("select",{"data-testid":"launch-repo",className:"w-full rounded border p-2 text-xs",value:m,onChange:N=>u(N.target.value),children:[W.jsx("option",{value:"",children:"(repo-less run)"}),h.map(N=>W.jsxs("option",{value:N.id,children:[N.name," — ",N.root_path]},N.id))]}),W.jsx("button",{type:"button",onClick:()=>o(N=>!N),className:"text-[11px] text-blue-600 hover:underline mt-1",children:s?"Close":"Register a repo"}),s&&W.jsxs("div",{className:"mt-1 flex flex-col gap-1",children:[W.jsx("input",{"data-testid":"launch-repo-name",className:"rounded border p-1.5 text-xs",placeholder:"Repo name",value:f,onChange:N=>w(N.target.value)}),W.jsx("input",{"data-testid":"launch-repo-path",className:"rounded border p-1.5 text-xs",placeholder:"Absolute path to a git repo (>=1 commit)",value:y,onChange:N=>E(N.target.value)}),g&&W.jsx("p",{className:"text-[11px] text-red-600",children:g}),W.jsx("button",{type:"button",onClick:()=>void J(),className:"self-start rounded bg-blue-600 px-2 py-1 text-[11px] text-white hover:bg-blue-700",children:"Register"})]})]}),W.jsxs("div",{className:"mb-3 grid grid-cols-2 gap-3",children:[W.jsxs("div",{children:[W.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Human-confirm gate"}),W.jsxs("select",{"data-testid":"launch-confirm",className:"w-full rounded border p-2 text-xs",value:x,onChange:N=>_(N.target.value),children:[W.jsx("option",{value:"none",children:"None"}),W.jsx("option",{value:"all",children:"Before every unit"}),W.jsx("option",{value:"before",children:"Before unit…"})]}),x==="before"&&W.jsx("input",{"data-testid":"launch-confirm-ord",type:"number",min:1,className:"mt-1 w-full rounded border p-1.5 text-xs",value:n,onChange:N=>l(Math.max(1,Number(N.target.value)||1))})]}),W.jsxs("div",{children:[W.jsx("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Entity mode"}),W.jsxs("select",{"data-testid":"launch-entity",className:"w-full rounded border p-2 text-xs",value:v,onChange:N=>S(N.target.value),children:[W.jsx("option",{value:"shared",children:"Shared"}),W.jsx("option",{value:"isolated",children:"Isolated (worktree)"})]})]})]}),j&&W.jsx("p",{className:"text-xs text-red-600 mb-2","data-testid":"launch-error",children:j}),W.jsx("button",{type:"button","data-testid":"launch-submit",onClick:()=>void se(),disabled:!le,className:"w-full rounded bg-blue-600 px-3 py-2 text-xs font-semibold text-white hover:bg-blue-700 disabled:opacity-50",children:B?"Launching…":"Launch run"})]})}function Id(F){const $=Qs(ee=>ee.setStatus),M=Ce.useRef(F);M.current=F;const Z=Ce.useCallback(()=>{const ee=new WebSocket(`${Jc()}/ws`);ee.onopen=()=>$("connected"),ee.onmessage=oe=>{try{const K=JSON.parse(String(oe.data));K!==null&&typeof K=="object"&&typeof K.type=="string"&&M.current(K)}catch{}},ee.onclose=()=>{$("disconnected"),setTimeout(Z,3e3)},ee.onerror=()=>{$("disconnected"),ee.close()}},[$]);Ce.useEffect(()=>{Z()},[Z])}function Nd(){const F=Qs(h=>h.status),$=pr(h=>h.setGate),M=pr(h=>h.reconcile),[Z,ee]=Ce.useState([]),[oe,K]=Ce.useState(0),c=Ce.useCallback(()=>K(h=>h+1),[]);return Ce.useEffect(()=>{if(F!=="connected")return;let h=!1;return(async()=>{let p;try{({runs:p}=await Xe.listRuns())}catch{return}if(h)return;ee(p);const m=p.filter(u=>u.session.status==="awaiting_human").map(u=>u.session.id);M(m);for(const u of m)if(!pr.getState().gates[u])try{const v=await Xe.getGate(u);if(h)return;$({runId:v.runId,ord:v.ord,prompt:v.prompt,lifecycle:v.lifecycle,receivedAt:Date.parse(v.receivedAt)||Date.now()})}catch{}})(),()=>{h=!0}},[F,oe,$,M]),{runs:Z,refresh:c}}const Hd=new Set(["sessionStarted","unitPlanned","unitDistributed","unitExecuting","gateDecided","unitDone","unitDenied","awaitingHuman","resumed","runCancelled","sessionFailed","sessionCompleted"]);function Fd(){const{runs:F,refresh:$}=Nd(),M=pr(v=>v.ingest),Z=Xs(v=>v.ingest),[ee,oe]=Ce.useState(null),[K,c]=Ce.useState(!1),h=Ce.useCallback(v=>{M(v),Z(v),Hd.has(v.type)&&$()},[M,Z,$]);Id(h);const p=Ce.useCallback(v=>{oe(v),c(!1)},[]),m=Ce.useCallback(v=>{oe(v),c(!1),$()},[$]),u=F.find(v=>v.session.id===ee)??null;return W.jsxs("div",{className:"min-h-screen bg-gray-50 flex flex-col",children:[W.jsxs("header",{className:"h-12 flex items-center justify-between px-4 bg-white border-b shadow-sm",children:[W.jsx("span",{className:"font-bold text-sm tracking-tight",children:"wicked-studio"}),W.jsx(ud,{})]}),W.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[W.jsxs("aside",{className:"w-80 border-r bg-white overflow-y-auto flex flex-col",children:[W.jsxs("div",{className:"flex items-center justify-between px-4 pt-4 pb-2",children:[W.jsx("p",{className:"text-xs font-semibold uppercase tracking-wider text-gray-400",children:"Runs"}),W.jsx("button",{type:"button","data-testid":"new-run",onClick:()=>{c(!0),oe(null)},className:"rounded bg-blue-600 px-2 py-1 text-[11px] font-semibold text-white hover:bg-blue-700",children:"New run"})]}),W.jsx(fd,{runs:F,selectedRunId:ee,onSelect:p})]}),W.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:K?W.jsx(Od,{onLaunched:m,onCancel:()=>c(!1)}):u?W.jsx(Md,{view:u,onRefresh:$}):W.jsx("p",{className:"text-sm text-gray-400",children:"Select a run, or launch a new one."})})]}),W.jsx(hd,{onSelect:p})]})}const eu=document.getElementById("root");if(!eu)throw new Error("Root element not found");nd.createRoot(eu).render(W.jsx(Ce.StrictMode,{children:W.jsx(Fd,{})}));