vibe-coding-master 0.3.23 → 0.3.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backend/adapters/filesystem.js +16 -1
- package/dist/backend/adapters/git-adapter.js +53 -0
- package/dist/backend/api/artifact-routes.js +1 -28
- package/dist/backend/api/codex-translation-routes.js +3 -1
- package/dist/backend/api/harness-routes.js +10 -0
- package/dist/backend/api/task-routes.js +2 -6
- package/dist/backend/gateway/gateway-service.js +3 -16
- package/dist/backend/server.js +3 -1
- package/dist/backend/services/artifact-service.js +1 -30
- package/dist/backend/services/codex-translation-service.js +23 -2
- package/dist/backend/services/harness-service.js +106 -0
- package/dist/backend/services/session-service.js +1 -4
- package/dist/backend/services/status-service.js +1 -6
- package/dist/backend/services/task-service.js +42 -110
- package/dist/backend/templates/harness/project-manager-agent.js +10 -1
- package/dist/backend/templates/harness/vcm-route-message-skill.js +8 -2
- package/dist-frontend/assets/{index-C2xTNLmb.js → index-CKWy15WL.js} +46 -47
- package/dist-frontend/index.html +1 -1
- package/docs/cc-best-practices.md +1 -1
- package/docs/full-harness-baseline.md +0 -1
- package/docs/gateway-design.md +9 -13
- package/docs/product-design.md +18 -39
- package/docs/vcm-cc-best-practices.md +0 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var U0=Object.defineProperty;var P0=(n,r,s)=>r in n?U0(n,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[r]=s;var Qp=(n,r,s)=>P0(n,typeof r!="symbol"?r+"":r,s);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const
|
|
1
|
+
var U0=Object.defineProperty;var P0=(n,r,s)=>r in n?U0(n,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[r]=s;var Qp=(n,r,s)=>P0(n,typeof r!="symbol"?r+"":r,s);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))o(d);new MutationObserver(d=>{for(const v of d)if(v.type==="childList")for(const f of v.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function s(d){const v={};return d.integrity&&(v.integrity=d.integrity),d.referrerPolicy&&(v.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?v.credentials="include":d.crossOrigin==="anonymous"?v.credentials="omit":v.credentials="same-origin",v}function o(d){if(d.ep)return;d.ep=!0;const v=s(d);fetch(d.href,v)}})();function ug(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var eu={exports:{}},Xs={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@ var U0=Object.defineProperty;var P0=(n,r,s)=>r in n?U0(n,r,{enumerable:!0,config
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Zp;function F0(){if(Zp)return
|
|
9
|
+
*/var Zp;function F0(){if(Zp)return Xs;Zp=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function s(o,d,v){var f=null;if(v!==void 0&&(f=""+v),d.key!==void 0&&(f=""+d.key),"key"in d){v={};for(var a in d)a!=="key"&&(v[a]=d[a])}else v=d;return d=v.ref,{$$typeof:n,type:o,key:f,ref:d!==void 0?d:null,props:v}}return Xs.Fragment=r,Xs.jsx=s,Xs.jsxs=s,Xs}var Jp;function q0(){return Jp||(Jp=1,eu.exports=F0()),eu.exports}var O=q0(),tu={exports:{}},Ne={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react.production.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@ var U0=Object.defineProperty;var P0=(n,r,s)=>r in n?U0(n,r,{enumerable:!0,config
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var em;function
|
|
17
|
+
*/var em;function G0(){if(em)return Ne;em=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),f=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),u=Symbol.for("react.activity"),_=Symbol.iterator;function C(z){return z===null||typeof z!="object"?null:(z=_&&z[_]||z["@@iterator"],typeof z=="function"?z:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,b={};function S(z,G,j){this.props=z,this.context=G,this.refs=b,this.updater=j||E}S.prototype.isReactComponent={},S.prototype.setState=function(z,G){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,G,"setState")},S.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function g(){}g.prototype=S.prototype;function y(z,G,j){this.props=z,this.context=G,this.refs=b,this.updater=j||E}var A=y.prototype=new g;A.constructor=y,x(A,S.prototype),A.isPureReactComponent=!0;var M=Array.isArray;function D(){}var T={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function R(z,G,j){var te=j.ref;return{$$typeof:n,type:z,key:G,ref:te!==void 0?te:null,props:j}}function N(z,G){return R(z.type,G,z.props)}function I(z){return typeof z=="object"&&z!==null&&z.$$typeof===n}function P(z){var G={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(j){return G[j]})}var F=/\/+/g;function K(z,G){return typeof z=="object"&&z!==null&&z.key!=null?P(""+z.key):G.toString(36)}function W(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(D,D):(z.status="pending",z.then(function(G){z.status==="pending"&&(z.status="fulfilled",z.value=G)},function(G){z.status==="pending"&&(z.status="rejected",z.reason=G)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function V(z,G,j,te,he){var me=typeof z;(me==="undefined"||me==="boolean")&&(z=null);var Y=!1;if(z===null)Y=!0;else switch(me){case"bigint":case"string":case"number":Y=!0;break;case"object":switch(z.$$typeof){case n:case r:Y=!0;break;case m:return Y=z._init,V(Y(z._payload),G,j,te,he)}}if(Y)return he=he(z),Y=te===""?"."+K(z,0):te,M(he)?(j="",Y!=null&&(j=Y.replace(F,"$&/")+"/"),V(he,G,j,"",function(Z){return Z})):he!=null&&(I(he)&&(he=N(he,j+(he.key==null||z&&z.key===he.key?"":(""+he.key).replace(F,"$&/")+"/")+Y)),G.push(he)),1;Y=0;var q=te===""?".":te+":";if(M(z))for(var oe=0;oe<z.length;oe++)te=z[oe],me=q+K(te,oe),Y+=V(te,G,j,me,he);else if(oe=C(z),typeof oe=="function")for(z=oe.call(z),oe=0;!(te=z.next()).done;)te=te.value,me=q+K(te,oe++),Y+=V(te,G,j,me,he);else if(me==="object"){if(typeof z.then=="function")return V(W(z),G,j,te,he);throw G=String(z),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return Y}function $(z,G,j){if(z==null)return z;var te=[],he=0;return V(z,te,"","",function(me){return G.call(j,me,he++)}),te}function J(z){if(z._status===-1){var G=z._result;G=G(),G.then(function(j){(z._status===0||z._status===-1)&&(z._status=1,z._result=j)},function(j){(z._status===0||z._status===-1)&&(z._status=2,z._result=j)}),z._status===-1&&(z._status=0,z._result=G)}if(z._status===1)return z._result.default;throw z._result}var H=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},B={map:$,forEach:function(z,G,j){$(z,function(){G.apply(this,arguments)},j)},count:function(z){var G=0;return $(z,function(){G++}),G},toArray:function(z){return $(z,function(G){return G})||[]},only:function(z){if(!I(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return Ne.Activity=u,Ne.Children=B,Ne.Component=S,Ne.Fragment=s,Ne.Profiler=d,Ne.PureComponent=y,Ne.StrictMode=o,Ne.Suspense=c,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(z){return T.H.useMemoCache(z)}},Ne.cache=function(z){return function(){return z.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(z,G,j){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var te=x({},z.props),he=z.key;if(G!=null)for(me in G.key!==void 0&&(he=""+G.key),G)!k.call(G,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&G.ref===void 0||(te[me]=G[me]);var me=arguments.length-2;if(me===1)te.children=j;else if(1<me){for(var Y=Array(me),q=0;q<me;q++)Y[q]=arguments[q+2];te.children=Y}return R(z.type,he,te)},Ne.createContext=function(z){return z={$$typeof:f,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:v,_context:z},z},Ne.createElement=function(z,G,j){var te,he={},me=null;if(G!=null)for(te in G.key!==void 0&&(me=""+G.key),G)k.call(G,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(he[te]=G[te]);var Y=arguments.length-2;if(Y===1)he.children=j;else if(1<Y){for(var q=Array(Y),oe=0;oe<Y;oe++)q[oe]=arguments[oe+2];he.children=q}if(z&&z.defaultProps)for(te in Y=z.defaultProps,Y)he[te]===void 0&&(he[te]=Y[te]);return R(z,me,he)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(z){return{$$typeof:a,render:z}},Ne.isValidElement=I,Ne.lazy=function(z){return{$$typeof:m,_payload:{_status:-1,_result:z},_init:J}},Ne.memo=function(z,G){return{$$typeof:h,type:z,compare:G===void 0?null:G}},Ne.startTransition=function(z){var G=T.T,j={};T.T=j;try{var te=z(),he=T.S;he!==null&&he(j,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(D,H)}catch(me){H(me)}finally{G!==null&&j.types!==null&&(G.types=j.types),T.T=G}},Ne.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},Ne.use=function(z){return T.H.use(z)},Ne.useActionState=function(z,G,j){return T.H.useActionState(z,G,j)},Ne.useCallback=function(z,G){return T.H.useCallback(z,G)},Ne.useContext=function(z){return T.H.useContext(z)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(z,G){return T.H.useDeferredValue(z,G)},Ne.useEffect=function(z,G){return T.H.useEffect(z,G)},Ne.useEffectEvent=function(z){return T.H.useEffectEvent(z)},Ne.useId=function(){return T.H.useId()},Ne.useImperativeHandle=function(z,G,j){return T.H.useImperativeHandle(z,G,j)},Ne.useInsertionEffect=function(z,G){return T.H.useInsertionEffect(z,G)},Ne.useLayoutEffect=function(z,G){return T.H.useLayoutEffect(z,G)},Ne.useMemo=function(z,G){return T.H.useMemo(z,G)},Ne.useOptimistic=function(z,G){return T.H.useOptimistic(z,G)},Ne.useReducer=function(z,G,j){return T.H.useReducer(z,G,j)},Ne.useRef=function(z){return T.H.useRef(z)},Ne.useState=function(z){return T.H.useState(z)},Ne.useSyncExternalStore=function(z,G,j){return T.H.useSyncExternalStore(z,G,j)},Ne.useTransition=function(){return T.H.useTransition()},Ne.version="19.2.6",Ne}var tm;function Iu(){return tm||(tm=1,tu.exports=G0()),tu.exports}var ae=Iu(),nu={exports:{}},Qs={},iu={exports:{}},ru={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@ var U0=Object.defineProperty;var P0=(n,r,s)=>r in n?U0(n,r,{enumerable:!0,config
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var nm;function
|
|
25
|
+
*/var nm;function V0(){return nm||(nm=1,(function(n){function r(V,$){var J=V.length;V.push($);e:for(;0<J;){var H=J-1>>>1,B=V[H];if(0<d(B,$))V[H]=$,V[J]=B,J=H;else break e}}function s(V){return V.length===0?null:V[0]}function o(V){if(V.length===0)return null;var $=V[0],J=V.pop();if(J!==$){V[0]=J;e:for(var H=0,B=V.length,z=B>>>1;H<z;){var G=2*(H+1)-1,j=V[G],te=G+1,he=V[te];if(0>d(j,J))te<B&&0>d(he,j)?(V[H]=he,V[te]=J,H=te):(V[H]=j,V[G]=J,H=G);else if(te<B&&0>d(he,J))V[H]=he,V[te]=J,H=te;else break e}}return $}function d(V,$){var J=V.sortIndex-$.sortIndex;return J!==0?J:V.id-$.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var v=performance;n.unstable_now=function(){return v.now()}}else{var f=Date,a=f.now();n.unstable_now=function(){return f.now()-a}}var c=[],h=[],m=1,u=null,_=3,C=!1,E=!1,x=!1,b=!1,S=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function A(V){for(var $=s(h);$!==null;){if($.callback===null)o(h);else if($.startTime<=V)o(h),$.sortIndex=$.expirationTime,r(c,$);else break;$=s(h)}}function M(V){if(x=!1,A(V),!E)if(s(c)!==null)E=!0,D||(D=!0,P());else{var $=s(h);$!==null&&W(M,$.startTime-V)}}var D=!1,T=-1,k=5,R=-1;function N(){return b?!0:!(n.unstable_now()-R<k)}function I(){if(b=!1,D){var V=n.unstable_now();R=V;var $=!0;try{e:{E=!1,x&&(x=!1,g(T),T=-1),C=!0;var J=_;try{t:{for(A(V),u=s(c);u!==null&&!(u.expirationTime>V&&N());){var H=u.callback;if(typeof H=="function"){u.callback=null,_=u.priorityLevel;var B=H(u.expirationTime<=V);if(V=n.unstable_now(),typeof B=="function"){u.callback=B,A(V),$=!0;break t}u===s(c)&&o(c),A(V)}else o(c);u=s(c)}if(u!==null)$=!0;else{var z=s(h);z!==null&&W(M,z.startTime-V),$=!1}}break e}finally{u=null,_=J,C=!1}$=void 0}}finally{$?P():D=!1}}}var P;if(typeof y=="function")P=function(){y(I)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,K=F.port2;F.port1.onmessage=I,P=function(){K.postMessage(null)}}else P=function(){S(I,0)};function W(V,$){T=S(function(){V(n.unstable_now())},$)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(V){V.callback=null},n.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<V?Math.floor(1e3/V):5},n.unstable_getCurrentPriorityLevel=function(){return _},n.unstable_next=function(V){switch(_){case 1:case 2:case 3:var $=3;break;default:$=_}var J=_;_=$;try{return V()}finally{_=J}},n.unstable_requestPaint=function(){b=!0},n.unstable_runWithPriority=function(V,$){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var J=_;_=V;try{return $()}finally{_=J}},n.unstable_scheduleCallback=function(V,$,J){var H=n.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?H+J:H):J=H,V){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=J+B,V={id:m++,callback:$,priorityLevel:V,startTime:J,expirationTime:B,sortIndex:-1},J>H?(V.sortIndex=J,r(h,V),s(c)===null&&V===s(h)&&(x?(g(T),T=-1):x=!0,W(M,J-H))):(V.sortIndex=B,r(c,V),E||C||(E=!0,D||(D=!0,P()))),V},n.unstable_shouldYield=N,n.unstable_wrapCallback=function(V){var $=_;return function(){var J=_;_=$;try{return V.apply(this,arguments)}finally{_=J}}}})(ru)),ru}var im;function $0(){return im||(im=1,iu.exports=V0()),iu.exports}var su={exports:{}},qt={};/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.js
|
|
28
28
|
*
|
|
@@ -30,7 +30,7 @@ var U0=Object.defineProperty;var P0=(n,r,s)=>r in n?U0(n,r,{enumerable:!0,config
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var rm;function K0(){if(rm)return
|
|
33
|
+
*/var rm;function K0(){if(rm)return qt;rm=1;var n=Iu();function r(c){var h="https://react.dev/errors/"+c;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)h+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+c+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var o={d:{f:s,r:function(){throw Error(r(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},d=Symbol.for("react.portal");function v(c,h,m){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:u==null?null:""+u,children:c,containerInfo:h,implementation:m}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(c,h){if(c==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,qt.createPortal=function(c,h){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(r(299));return v(c,h,null,m)},qt.flushSync=function(c){var h=f.T,m=o.p;try{if(f.T=null,o.p=2,c)return c()}finally{f.T=h,o.p=m,o.d.f()}},qt.preconnect=function(c,h){typeof c=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(c,h))},qt.prefetchDNS=function(c){typeof c=="string"&&o.d.D(c)},qt.preinit=function(c,h){if(typeof c=="string"&&h&&typeof h.as=="string"){var m=h.as,u=a(m,h.crossOrigin),_=typeof h.integrity=="string"?h.integrity:void 0,C=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;m==="style"?o.d.S(c,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:u,integrity:_,fetchPriority:C}):m==="script"&&o.d.X(c,{crossOrigin:u,integrity:_,fetchPriority:C,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},qt.preinitModule=function(c,h){if(typeof c=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var m=a(h.as,h.crossOrigin);o.d.M(c,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(c)},qt.preload=function(c,h){if(typeof c=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var m=h.as,u=a(m,h.crossOrigin);o.d.L(c,m,{crossOrigin:u,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},qt.preloadModule=function(c,h){if(typeof c=="string")if(h){var m=a(h.as,h.crossOrigin);o.d.m(c,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(c)},qt.requestFormReset=function(c){o.d.r(c)},qt.unstable_batchedUpdates=function(c,h){return c(h)},qt.useFormState=function(c,h,m){return f.H.useFormState(c,h,m)},qt.useFormStatus=function(){return f.H.useHostTransitionStatus()},qt.version="19.2.6",qt}var sm;function Y0(){if(sm)return su.exports;sm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),su.exports=K0(),su.exports}/**
|
|
34
34
|
* @license React
|
|
35
35
|
* react-dom-client.production.js
|
|
36
36
|
*
|
|
@@ -38,58 +38,57 @@ var U0=Object.defineProperty;var P0=(n,r,s)=>r in n?U0(n,r,{enumerable:!0,config
|
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the MIT license found in the
|
|
40
40
|
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var lm;function W0(){if(lm)return
|
|
41
|
+
*/var lm;function W0(){if(lm)return Qs;lm=1;var n=$0(),r=Iu(),s=Y0();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function v(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function f(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 a(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(v(e)!==e)throw Error(o(188))}function h(e){var t=e.alternate;if(!t){if(t=v(e),t===null)throw Error(o(188));return t!==e?null:e}for(var i=e,l=t;;){var p=i.return;if(p===null)break;var w=p.alternate;if(w===null){if(l=p.return,l!==null){i=l;continue}break}if(p.child===w.child){for(w=p.child;w;){if(w===i)return c(p),e;if(w===l)return c(p),t;w=w.sibling}throw Error(o(188))}if(i.return!==l.return)i=p,l=w;else{for(var L=!1,U=p.child;U;){if(U===i){L=!0,i=p,l=w;break}if(U===l){L=!0,l=p,i=w;break}U=U.sibling}if(!L){for(U=w.child;U;){if(U===i){L=!0,i=w,l=p;break}if(U===l){L=!0,l=w,i=p;break}U=U.sibling}if(!L)throw Error(o(189))}}if(i.alternate!==l)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var u=Object.assign,_=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),y=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),N=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function P(e){return e===null||typeof e!="object"?null:(e=I&&e[I]||e["@@iterator"],typeof e=="function"?e:null)}var F=Symbol.for("react.client.reference");function K(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===F?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case x:return"Fragment";case S:return"Profiler";case b:return"StrictMode";case M:return"Suspense";case D:return"SuspenseList";case R:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case y:return e.displayName||"Context";case g:return(e._context.displayName||"Context")+".Consumer";case A:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case T:return t=e.displayName||null,t!==null?t:K(e.type)||"Memo";case k:t=e._payload,e=e._init;try{return K(e(t))}catch{}}return null}var W=Array.isArray,V=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},H=[],B=-1;function z(e){return{current:e}}function G(e){0>B||(e.current=H[B],H[B]=null,B--)}function j(e,t){B++,H[B]=e.current,e.current=t}var te=z(null),he=z(null),me=z(null),Y=z(null);function q(e,t){switch(j(me,t),j(he,e),j(te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Sp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Sp(t),e=bp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(te),j(te,e)}function oe(){G(te),G(he),G(me)}function Z(e){e.memoizedState!==null&&j(Y,e);var t=te.current,i=bp(t,e.type);t!==i&&(j(he,e),j(te,i))}function ie(e){he.current===e&&(G(te),G(he)),Y.current===e&&(G(Y),$s._currentValue=J)}var de,Ce;function we(e){if(de===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||"",Ce=-1<i.stack.indexOf(`
|
|
42
42
|
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+de+e+
|
|
43
|
+
`+de+e+Ce}var $e=!1;function at(e,t){if(!e||$e)return"";$e=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(ce){var le=ce}Reflect.construct(e,[],ge)}else{try{ge.call()}catch(ce){le=ce}e.call(ge.prototype)}}else{try{throw Error()}catch(ce){le=ce}(ge=e())&&typeof ge.catch=="function"&&ge.catch(function(){})}}catch(ce){if(ce&&le&&typeof ce.stack=="string")return[ce.stack,le.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=l.DetermineComponentFrameRoot(),L=w[0],U=w[1];if(L&&U){var X=L.split(`
|
|
44
44
|
`),se=U.split(`
|
|
45
|
-
`);for(
|
|
46
|
-
`+X[l].replace(" at new "," at ");return e.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",e.displayName)),fe}while(1<=l&&0<=
|
|
45
|
+
`);for(p=l=0;l<X.length&&!X[l].includes("DetermineComponentFrameRoot");)l++;for(;p<se.length&&!se[p].includes("DetermineComponentFrameRoot");)p++;if(l===X.length||p===se.length)for(l=X.length-1,p=se.length-1;1<=l&&0<=p&&X[l]!==se[p];)p--;for(;1<=l&&0<=p;l--,p--)if(X[l]!==se[p]){if(l!==1||p!==1)do if(l--,p--,0>p||X[l]!==se[p]){var fe=`
|
|
46
|
+
`+X[l].replace(" at new "," at ");return e.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",e.displayName)),fe}while(1<=l&&0<=p);break}}}finally{$e=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?we(i):""}function Re(e,t){switch(e.tag){case 26:case 27:case 5:return we(e.type);case 16:return we("Lazy");case 13:return e.child!==t&&t!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return at(e.type,!1);case 11:return at(e.type.render,!1);case 1:return at(e.type,!0);case 31:return we("Activity");default:return""}}function Bt(e){try{var t="",i=null;do t+=Re(e,i),i=e,e=e.return;while(e);return t}catch(l){return`
|
|
47
47
|
Error generating stack: `+l.message+`
|
|
48
|
-
`+l.stack}}var Ut=Object.prototype.hasOwnProperty,Rt=n.unstable_scheduleCallback,Pt=n.unstable_cancelCallback,Yt=n.unstable_shouldYield,mt=n.unstable_requestPaint,et=n.unstable_now,Mt=n.unstable_getCurrentPriorityLevel,he=n.unstable_ImmediatePriority,ye=n.unstable_UserBlockingPriority,ke=n.unstable_NormalPriority,Re=n.unstable_LowPriority,Be=n.unstable_IdlePriority,pt=n.log,Ne=n.unstable_setDisableYieldValue,ft=null,We=null;function lt(e){if(typeof pt=="function"&&Ne(e),We&&typeof We.setStrictMode=="function")try{We.setStrictMode(ft,e)}catch{}}var xe=Math.clz32?Math.clz32:ur,At=Math.log,Nt=Math.LN2;function ur(e){return e>>>=0,e===0?32:31-(At(e)/Nt|0)|0}var Se=256,Lt=262144,hr=4194304;function Un(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ot(e,t,i){var l=e.pendingLanes;if(l===0)return 0;var m=0,C=e.suspendedLanes,L=e.pingedLanes;e=e.warmLanes;var U=l&134217727;return U!==0?(l=U&~C,l!==0?m=Un(l):(L&=U,L!==0?m=Un(L):i||(i=U&~e,i!==0&&(m=Un(i))))):(U=l&~C,U!==0?m=Un(U):L!==0?m=Un(L):i||(i=l&~e,i!==0&&(m=Un(i)))),m===0?0:t!==0&&t!==m&&(t&C)===0&&(C=m&-m,i=t&-t,C>=i||C===32&&(i&4194048)!==0)?t:m}function Ft(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function hl(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function rs(){var e=hr;return hr<<=1,(hr&62914560)===0&&(hr=4194304),e}function Ii(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Ui(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function fr(e,t,i,l,m,C){var L=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var U=e.entanglements,X=e.expirationTimes,se=e.hiddenUpdates;for(i=L&~i;0<i;){var fe=31-xe(i),ge=1<<fe;U[fe]=0,X[fe]=-1;var le=se[fe];if(le!==null)for(se[fe]=null,fe=0;fe<le.length;fe++){var ce=le[fe];ce!==null&&(ce.lane&=-536870913)}i&=~ge}l!==0&&fl(e,l,0),C!==0&&m===0&&e.tag!==0&&(e.suspendedLanes|=C&~(L&~t))}function fl(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-xe(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|i&261930}function dl(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var l=31-xe(i),m=1<<l;m&t|e[l]&t&&(e[l]|=t),i&=~m}}function pl(e,t){var i=t&-t;return i=(i&42)!==0?1:ss(i),(i&(e.suspendedLanes|t))!==0?0:i}function ss(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ls(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ai(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:Vp(e.type))}function Pi(e,t){var i=$.p;try{return $.p=e,t()}finally{$.p=i}}var an=Math.random().toString(36).slice(2),vt="__reactFiber$"+an,qt="__reactProps$"+an,Ln="__reactContainer$"+an,Fi="__reactEvents$"+an,dr="__reactListeners$"+an,Ye="__reactHandles$"+an,ml="__reactResources$"+an,qi="__reactMarker$"+an;function as(e){delete e[vt],delete e[qt],delete e[Fi],delete e[dr],delete e[Ye]}function oi(e){var t=e[vt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Ln]||i[vt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Tp(e);e!==null;){if(i=e[vt])return i;e=Tp(e)}return t}e=i,i=e.parentNode}return null}function On(e){if(e=e[vt]||e[Ln]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ci(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function ee(e){var t=e[ml];return t||(t=e[ml]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function _e(e){e[qi]=!0}var yt=new Set,Wt={};function Vi(e,t){pr(e,t),pr(e+"Capture",t)}function pr(e,t){for(Wt[e]=t,e=0;e<t.length;e++)yt.add(t[e])}var M_=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),ch={},uh={};function L_(e){return Ut.call(uh,e)?!0:Ut.call(ch,e)?!1:M_.test(e)?uh[e]=!0:(ch[e]=!0,!1)}function gl(e,t,i){if(L_(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function _l(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function Pn(e,t,i,l){if(l===null)e.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+l)}}function _n(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function O_(e,t,i){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var m=l.get,C=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return m.call(this)},set:function(L){i=""+L,C.call(this,L)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(L){i=""+L},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $a(e){if(!e._valueTracker){var t=hh(e)?"checked":"value";e._valueTracker=O_(e,t,""+e[t])}}function fh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),l="";return e&&(l=hh(e)?e.checked?"true":"false":e.value),e=l,e!==i?(t.setValue(e),!0):!1}function vl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var B_=/[\n"\\]/g;function vn(e){return e.replace(B_,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ka(e,t,i,l,m,C,L,U){e.name="",L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?e.type=L:e.removeAttribute("type"),t!=null?L==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+_n(t)):e.value!==""+_n(t)&&(e.value=""+_n(t)):L!=="submit"&&L!=="reset"||e.removeAttribute("value"),t!=null?Ya(e,L,_n(t)):i!=null?Ya(e,L,_n(i)):l!=null&&e.removeAttribute("value"),m==null&&C!=null&&(e.defaultChecked=!!C),m!=null&&(e.checked=m&&typeof m!="function"&&typeof m!="symbol"),U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?e.name=""+_n(U):e.removeAttribute("name")}function dh(e,t,i,l,m,C,L,U){if(C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(e.type=C),t!=null||i!=null){if(!(C!=="submit"&&C!=="reset"||t!=null)){$a(e);return}i=i!=null?""+_n(i):"",t=t!=null?""+_n(t):i,U||t===e.value||(e.value=t),e.defaultValue=t}l=l??m,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=U?e.checked:!!l,e.defaultChecked=!!l,L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"&&(e.name=L),$a(e)}function Ya(e,t,i){t==="number"&&vl(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function mr(e,t,i,l){if(e=e.options,t){t={};for(var m=0;m<i.length;m++)t["$"+i[m]]=!0;for(i=0;i<e.length;i++)m=t.hasOwnProperty("$"+e[i].value),e[i].selected!==m&&(e[i].selected=m),m&&l&&(e[i].defaultSelected=!0)}else{for(i=""+_n(i),t=null,m=0;m<e.length;m++){if(e[m].value===i){e[m].selected=!0,l&&(e[m].defaultSelected=!0);return}t!==null||e[m].disabled||(t=e[m])}t!==null&&(t.selected=!0)}}function ph(e,t,i){if(t!=null&&(t=""+_n(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+_n(i):""}function mh(e,t,i,l){if(t==null){if(l!=null){if(i!=null)throw Error(o(92));if(W(l)){if(1<l.length)throw Error(o(93));l=l[0]}i=l}i==null&&(i=""),t=i}i=_n(t),e.defaultValue=i,l=e.textContent,l===i&&l!==""&&l!==null&&(e.value=l),$a(e)}function gr(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var N_=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function gh(e,t,i){var l=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,i):typeof i!="number"||i===0||N_.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function _h(e,t,i){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var m in t)l=t[m],t.hasOwnProperty(m)&&i[m]!==l&&gh(e,m,l)}else for(var C in t)t.hasOwnProperty(C)&&gh(e,C,t[C])}function Wa(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var j_=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),z_=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function yl(e){return z_.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Fn(){}var Xa=null;function Qa(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _r=null,vr=null;function vh(e){var t=On(e);if(t&&(e=t.stateNode)){var i=e[qt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ka(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+vn(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var l=i[t];if(l!==e&&l.form===e.form){var m=l[qt]||null;if(!m)throw Error(o(90));Ka(l,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(t=0;t<i.length;t++)l=i[t],l.form===e.form&&fh(l)}break e;case"textarea":ph(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&mr(e,!!i.multiple,t,!1)}}}var Za=!1;function yh(e,t,i){if(Za)return e(t,i);Za=!0;try{var l=e(t);return l}finally{if(Za=!1,(_r!==null||vr!==null)&&(la(),_r&&(t=_r,e=vr,vr=_r=null,vh(t),e)))for(t=0;t<e.length;t++)vh(e[t])}}function os(e,t){var i=e.stateNode;if(i===null)return null;var l=i[qt]||null;if(l===null)return null;i=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(o(231,t,typeof i));return i}var qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ja=!1;if(qn)try{var cs={};Object.defineProperty(cs,"passive",{get:function(){Ja=!0}}),window.addEventListener("test",cs,cs),window.removeEventListener("test",cs,cs)}catch{Ja=!1}var ui=null,eo=null,Sl=null;function Sh(){if(Sl)return Sl;var e,t=eo,i=t.length,l,m="value"in ui?ui.value:ui.textContent,C=m.length;for(e=0;e<i&&t[e]===m[e];e++);var L=i-e;for(l=1;l<=L&&t[i-l]===m[C-l];l++);return Sl=m.slice(e,1<l?1-l:void 0)}function bl(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 Cl(){return!0}function bh(){return!1}function Zt(e){function t(i,l,m,C,L){this._reactName=i,this._targetInst=m,this.type=l,this.nativeEvent=C,this.target=L,this.currentTarget=null;for(var U in e)e.hasOwnProperty(U)&&(i=e[U],this[U]=i?i(C):C[U]);return this.isDefaultPrevented=(C.defaultPrevented!=null?C.defaultPrevented:C.returnValue===!1)?Cl:bh,this.isPropagationStopped=bh,this}return u(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Cl)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Cl)},persist:function(){},isPersistent:Cl}),t}var Gi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wl=Zt(Gi),us=u({},Gi,{view:0,detail:0}),H_=Zt(us),to,no,hs,xl=u({},us,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ro,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!==hs&&(hs&&e.type==="mousemove"?(to=e.screenX-hs.screenX,no=e.screenY-hs.screenY):no=to=0,hs=e),to)},movementY:function(e){return"movementY"in e?e.movementY:no}}),Ch=Zt(xl),I_=u({},xl,{dataTransfer:0}),U_=Zt(I_),P_=u({},us,{relatedTarget:0}),io=Zt(P_),F_=u({},Gi,{animationName:0,elapsedTime:0,pseudoElement:0}),q_=Zt(F_),V_=u({},Gi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),G_=Zt(V_),$_=u({},Gi,{data:0}),wh=Zt($_),K_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Y_={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"},W_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function X_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=W_[e])?!!t[e]:!1}function ro(){return X_}var Q_=u({},us,{key:function(e){if(e.key){var t=K_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Y_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ro,charCode:function(e){return e.type==="keypress"?bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Z_=Zt(Q_),J_=u({},xl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xh=Zt(J_),ev=u({},us,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ro}),tv=Zt(ev),nv=u({},Gi,{propertyName:0,elapsedTime:0,pseudoElement:0}),iv=Zt(nv),rv=u({},xl,{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}),sv=Zt(rv),lv=u({},Gi,{newState:0,oldState:0}),av=Zt(lv),ov=[9,13,27,32],so=qn&&"CompositionEvent"in window,fs=null;qn&&"documentMode"in document&&(fs=document.documentMode);var cv=qn&&"TextEvent"in window&&!fs,Eh=qn&&(!so||fs&&8<fs&&11>=fs),kh=" ",Ah=!1;function Th(e,t){switch(e){case"keyup":return ov.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yr=!1;function uv(e,t){switch(e){case"compositionend":return Dh(t);case"keypress":return t.which!==32?null:(Ah=!0,kh);case"textInput":return e=t.data,e===kh&&Ah?null:e;default:return null}}function hv(e,t){if(yr)return e==="compositionend"||!so&&Th(e,t)?(e=Sh(),Sl=eo=ui=null,yr=!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 Eh&&t.locale!=="ko"?null:t.data;default:return null}}var fv={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 Rh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fv[e.type]:t==="textarea"}function Mh(e,t,i,l){_r?vr?vr.push(l):vr=[l]:_r=l,t=da(t,"onChange"),0<t.length&&(i=new wl("onChange","change",null,i,l),e.push({event:i,listeners:t}))}var ds=null,ps=null;function dv(e){pp(e,0)}function El(e){var t=ci(e);if(fh(t))return e}function Lh(e,t){if(e==="change")return t}var Oh=!1;if(qn){var lo;if(qn){var ao="oninput"in document;if(!ao){var Bh=document.createElement("div");Bh.setAttribute("oninput","return;"),ao=typeof Bh.oninput=="function"}lo=ao}else lo=!1;Oh=lo&&(!document.documentMode||9<document.documentMode)}function Nh(){ds&&(ds.detachEvent("onpropertychange",jh),ps=ds=null)}function jh(e){if(e.propertyName==="value"&&El(ps)){var t=[];Mh(t,ps,e,Qa(e)),yh(dv,t)}}function pv(e,t,i){e==="focusin"?(Nh(),ds=t,ps=i,ds.attachEvent("onpropertychange",jh)):e==="focusout"&&Nh()}function mv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return El(ps)}function gv(e,t){if(e==="click")return El(t)}function _v(e,t){if(e==="input"||e==="change")return El(t)}function vv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var on=typeof Object.is=="function"?Object.is:vv;function ms(e,t){if(on(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),l=Object.keys(t);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var m=i[l];if(!Ut.call(t,m)||!on(e[m],t[m]))return!1}return!0}function zh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hh(e,t){var i=zh(e);e=0;for(var l;i;){if(i.nodeType===3){if(l=e+i.textContent.length,e<=t&&l>=t)return{node:i,offset:t-e};e=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=zh(i)}}function Ih(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ih(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Uh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=vl(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=vl(e.document)}return t}function oo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var yv=qn&&"documentMode"in document&&11>=document.documentMode,Sr=null,co=null,gs=null,uo=!1;function Ph(e,t,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;uo||Sr==null||Sr!==vl(l)||(l=Sr,"selectionStart"in l&&oo(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),gs&&ms(gs,l)||(gs=l,l=da(co,"onSelect"),0<l.length&&(t=new wl("onSelect","select",null,t,i),e.push({event:t,listeners:l}),t.target=Sr)))}function $i(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var br={animationend:$i("Animation","AnimationEnd"),animationiteration:$i("Animation","AnimationIteration"),animationstart:$i("Animation","AnimationStart"),transitionrun:$i("Transition","TransitionRun"),transitionstart:$i("Transition","TransitionStart"),transitioncancel:$i("Transition","TransitionCancel"),transitionend:$i("Transition","TransitionEnd")},ho={},Fh={};qn&&(Fh=document.createElement("div").style,"AnimationEvent"in window||(delete br.animationend.animation,delete br.animationiteration.animation,delete br.animationstart.animation),"TransitionEvent"in window||delete br.transitionend.transition);function Ki(e){if(ho[e])return ho[e];if(!br[e])return e;var t=br[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Fh)return ho[e]=t[i];return e}var qh=Ki("animationend"),Vh=Ki("animationiteration"),Gh=Ki("animationstart"),Sv=Ki("transitionrun"),bv=Ki("transitionstart"),Cv=Ki("transitioncancel"),$h=Ki("transitionend"),Kh=new Map,fo="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");fo.push("scrollEnd");function Tn(e,t){Kh.set(e,t),Vi(t,[e])}var kl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},yn=[],Cr=0,po=0;function Al(){for(var e=Cr,t=po=Cr=0;t<e;){var i=yn[t];yn[t++]=null;var l=yn[t];yn[t++]=null;var m=yn[t];yn[t++]=null;var C=yn[t];if(yn[t++]=null,l!==null&&m!==null){var L=l.pending;L===null?m.next=m:(m.next=L.next,L.next=m),l.pending=m}C!==0&&Yh(i,m,C)}}function Tl(e,t,i,l){yn[Cr++]=e,yn[Cr++]=t,yn[Cr++]=i,yn[Cr++]=l,po|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function mo(e,t,i,l){return Tl(e,t,i,l),Dl(e)}function Yi(e,t){return Tl(e,null,null,t),Dl(e)}function Yh(e,t,i){e.lanes|=i;var l=e.alternate;l!==null&&(l.lanes|=i);for(var m=!1,C=e.return;C!==null;)C.childLanes|=i,l=C.alternate,l!==null&&(l.childLanes|=i),C.tag===22&&(e=C.stateNode,e===null||e._visibility&1||(m=!0)),e=C,C=C.return;return e.tag===3?(C=e.stateNode,m&&t!==null&&(m=31-xe(i),e=C.hiddenUpdates,l=e[m],l===null?e[m]=[t]:l.push(t),t.lane=i|536870912),C):null}function Dl(e){if(50<Hs)throw Hs=0,xc=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var wr={};function wv(e,t,i,l){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cn(e,t,i,l){return new wv(e,t,i,l)}function go(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Vn(e,t){var i=e.alternate;return i===null?(i=cn(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Wh(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Rl(e,t,i,l,m,C){var L=0;if(l=e,typeof e=="function")go(e)&&(L=1);else if(typeof e=="string")L=T0(e,i,te.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case R:return e=cn(31,i,t,m),e.elementType=R,e.lanes=C,e;case x:return Wi(i.children,m,C,t);case S:L=8,m|=24;break;case _:return e=cn(12,i,t,m|2),e.elementType=_,e.lanes=C,e;case M:return e=cn(13,i,t,m),e.elementType=M,e.lanes=C,e;case D:return e=cn(19,i,t,m),e.elementType=D,e.lanes=C,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case y:L=10;break e;case g:L=9;break e;case A:L=11;break e;case T:L=14;break e;case k:L=16,l=null;break e}L=29,i=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=cn(L,i,t,m),t.elementType=e,t.type=l,t.lanes=C,t}function Wi(e,t,i,l){return e=cn(7,e,l,t),e.lanes=i,e}function _o(e,t,i){return e=cn(6,e,null,t),e.lanes=i,e}function Xh(e){var t=cn(18,null,null,0);return t.stateNode=e,t}function vo(e,t,i){return t=cn(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Qh=new WeakMap;function Sn(e,t){if(typeof e=="object"&&e!==null){var i=Qh.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Dt(t)},Qh.set(e,t),t)}return{value:e,source:t,stack:Dt(t)}}var xr=[],Er=0,Ml=null,_s=0,bn=[],Cn=0,hi=null,Bn=1,Nn="";function Gn(e,t){xr[Er++]=_s,xr[Er++]=Ml,Ml=e,_s=t}function Zh(e,t,i){bn[Cn++]=Bn,bn[Cn++]=Nn,bn[Cn++]=hi,hi=e;var l=Bn;e=Nn;var m=32-xe(l)-1;l&=~(1<<m),i+=1;var C=32-xe(t)+m;if(30<C){var L=m-m%5;C=(l&(1<<L)-1).toString(32),l>>=L,m-=L,Bn=1<<32-xe(t)+m|i<<m|l,Nn=C+e}else Bn=1<<C|i<<m|l,Nn=e}function yo(e){e.return!==null&&(Gn(e,1),Zh(e,1,0))}function So(e){for(;e===Ml;)Ml=xr[--Er],xr[Er]=null,_s=xr[--Er],xr[Er]=null;for(;e===hi;)hi=bn[--Cn],bn[Cn]=null,Nn=bn[--Cn],bn[Cn]=null,Bn=bn[--Cn],bn[Cn]=null}function Jh(e,t){bn[Cn++]=Bn,bn[Cn++]=Nn,bn[Cn++]=hi,Bn=t.id,Nn=t.overflow,hi=e}var jt=null,ut=null,Ge=!1,fi=null,wn=!1,bo=Error(o(519));function di(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw vs(Sn(t,e)),bo}function ef(e){var t=e.stateNode,i=e.type,l=e.memoizedProps;switch(t[vt]=e,t[qt]=l,i){case"dialog":Pe("cancel",t),Pe("close",t);break;case"iframe":case"object":case"embed":Pe("load",t);break;case"video":case"audio":for(i=0;i<Us.length;i++)Pe(Us[i],t);break;case"source":Pe("error",t);break;case"img":case"image":case"link":Pe("error",t),Pe("load",t);break;case"details":Pe("toggle",t);break;case"input":Pe("invalid",t),dh(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Pe("invalid",t);break;case"textarea":Pe("invalid",t),mh(t,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||l.suppressHydrationWarning===!0||vp(t.textContent,i)?(l.popover!=null&&(Pe("beforetoggle",t),Pe("toggle",t)),l.onScroll!=null&&Pe("scroll",t),l.onScrollEnd!=null&&Pe("scrollend",t),l.onClick!=null&&(t.onclick=Fn),t=!0):t=!1,t||di(e,!0)}function tf(e){for(jt=e.return;jt;)switch(jt.tag){case 5:case 31:case 13:wn=!1;return;case 27:case 3:wn=!0;return;default:jt=jt.return}}function kr(e){if(e!==jt)return!1;if(!Ge)return tf(e),Ge=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Ic(e.type,e.memoizedProps)),i=!i),i&&ut&&di(e),tf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ut=Ap(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ut=Ap(e)}else t===27?(t=ut,Ai(e.type)?(e=Vc,Vc=null,ut=e):ut=t):ut=jt?En(e.stateNode.nextSibling):null;return!0}function Xi(){ut=jt=null,Ge=!1}function Co(){var e=fi;return e!==null&&(nn===null?nn=e:nn.push.apply(nn,e),fi=null),e}function vs(e){fi===null?fi=[e]:fi.push(e)}var wo=z(null),Qi=null,$n=null;function pi(e,t,i){j(wo,t._currentValue),t._currentValue=i}function Kn(e){e._currentValue=wo.current,V(wo)}function xo(e,t,i){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===i)break;e=e.return}}function Eo(e,t,i,l){var m=e.child;for(m!==null&&(m.return=e);m!==null;){var C=m.dependencies;if(C!==null){var L=m.child;C=C.firstContext;e:for(;C!==null;){var U=C;C=m;for(var X=0;X<t.length;X++)if(U.context===t[X]){C.lanes|=i,U=C.alternate,U!==null&&(U.lanes|=i),xo(C.return,i,e),l||(L=null);break e}C=U.next}}else if(m.tag===18){if(L=m.return,L===null)throw Error(o(341));L.lanes|=i,C=L.alternate,C!==null&&(C.lanes|=i),xo(L,i,e),L=null}else L=m.child;if(L!==null)L.return=m;else for(L=m;L!==null;){if(L===e){L=null;break}if(m=L.sibling,m!==null){m.return=L.return,L=m;break}L=L.return}m=L}}function Ar(e,t,i,l){e=null;for(var m=t,C=!1;m!==null;){if(!C){if((m.flags&524288)!==0)C=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var L=m.alternate;if(L===null)throw Error(o(387));if(L=L.memoizedProps,L!==null){var U=m.type;on(m.pendingProps.value,L.value)||(e!==null?e.push(U):e=[U])}}else if(m===Y.current){if(L=m.alternate,L===null)throw Error(o(387));L.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(e!==null?e.push(Gs):e=[Gs])}m=m.return}e!==null&&Eo(t,e,i,l),t.flags|=262144}function Ll(e){for(e=e.firstContext;e!==null;){if(!on(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zi(e){Qi=e,$n=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function zt(e){return nf(Qi,e)}function Ol(e,t){return Qi===null&&Zi(e),nf(e,t)}function nf(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},$n===null){if(e===null)throw Error(o(308));$n=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else $n=$n.next=t;return i}var xv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},Ev=n.unstable_scheduleCallback,kv=n.unstable_NormalPriority,Ct={$$typeof:y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ko(){return{controller:new xv,data:new Map,refCount:0}}function ys(e){e.refCount--,e.refCount===0&&Ev(kv,function(){e.controller.abort()})}var Ss=null,Ao=0,Tr=0,Dr=null;function Av(e,t){if(Ss===null){var i=Ss=[];Ao=0,Tr=Rc(),Dr={status:"pending",value:void 0,then:function(l){i.push(l)}}}return Ao++,t.then(rf,rf),t}function rf(){if(--Ao===0&&Ss!==null){Dr!==null&&(Dr.status="fulfilled");var e=Ss;Ss=null,Tr=0,Dr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Tv(e,t){var i=[],l={status:"pending",value:null,reason:null,then:function(m){i.push(m)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var m=0;m<i.length;m++)(0,i[m])(t)},function(m){for(l.status="rejected",l.reason=m,m=0;m<i.length;m++)(0,i[m])(void 0)}),l}var sf=G.S;G.S=function(e,t){Fd=et(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Av(e,t),sf!==null&&sf(e,t)};var Ji=z(null);function To(){var e=Ji.current;return e!==null?e:at.pooledCache}function Bl(e,t){t===null?j(Ji,Ji.current):j(Ji,t.pool)}function lf(){var e=To();return e===null?null:{parent:Ct._currentValue,pool:e}}var Rr=Error(o(460)),Do=Error(o(474)),Nl=Error(o(542)),jl={then:function(){}};function af(e){return e=e.status,e==="fulfilled"||e==="rejected"}function of(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Fn,Fn),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,uf(e),e;default:if(typeof t.status=="string")t.then(Fn,Fn);else{if(e=at,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var m=t;m.status="fulfilled",m.value=l}},function(l){if(t.status==="pending"){var m=t;m.status="rejected",m.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,uf(e),e}throw tr=t,Rr}}function er(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(tr=i,Rr):i}}var tr=null;function cf(){if(tr===null)throw Error(o(459));var e=tr;return tr=null,e}function uf(e){if(e===Rr||e===Nl)throw Error(o(483))}var Mr=null,bs=0;function zl(e){var t=bs;return bs+=1,Mr===null&&(Mr=[]),of(Mr,e,t)}function Cs(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Hl(e,t){throw t.$$typeof===b?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function hf(e){function t(ne,Q){if(e){var re=ne.deletions;re===null?(ne.deletions=[Q],ne.flags|=16):re.push(Q)}}function i(ne,Q){if(!e)return null;for(;Q!==null;)t(ne,Q),Q=Q.sibling;return null}function l(ne){for(var Q=new Map;ne!==null;)ne.key!==null?Q.set(ne.key,ne):Q.set(ne.index,ne),ne=ne.sibling;return Q}function m(ne,Q){return ne=Vn(ne,Q),ne.index=0,ne.sibling=null,ne}function C(ne,Q,re){return ne.index=re,e?(re=ne.alternate,re!==null?(re=re.index,re<Q?(ne.flags|=67108866,Q):re):(ne.flags|=67108866,Q)):(ne.flags|=1048576,Q)}function L(ne){return e&&ne.alternate===null&&(ne.flags|=67108866),ne}function U(ne,Q,re,pe){return Q===null||Q.tag!==6?(Q=_o(re,ne.mode,pe),Q.return=ne,Q):(Q=m(Q,re),Q.return=ne,Q)}function X(ne,Q,re,pe){var Me=re.type;return Me===x?fe(ne,Q,re.props.children,pe,re.key):Q!==null&&(Q.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===k&&er(Me)===Q.type)?(Q=m(Q,re.props),Cs(Q,re),Q.return=ne,Q):(Q=Rl(re.type,re.key,re.props,null,ne.mode,pe),Cs(Q,re),Q.return=ne,Q)}function se(ne,Q,re,pe){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==re.containerInfo||Q.stateNode.implementation!==re.implementation?(Q=vo(re,ne.mode,pe),Q.return=ne,Q):(Q=m(Q,re.children||[]),Q.return=ne,Q)}function fe(ne,Q,re,pe,Me){return Q===null||Q.tag!==7?(Q=Wi(re,ne.mode,pe,Me),Q.return=ne,Q):(Q=m(Q,re),Q.return=ne,Q)}function ge(ne,Q,re){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=_o(""+Q,ne.mode,re),Q.return=ne,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case w:return re=Rl(Q.type,Q.key,Q.props,null,ne.mode,re),Cs(re,Q),re.return=ne,re;case E:return Q=vo(Q,ne.mode,re),Q.return=ne,Q;case k:return Q=er(Q),ge(ne,Q,re)}if(W(Q)||P(Q))return Q=Wi(Q,ne.mode,re,null),Q.return=ne,Q;if(typeof Q.then=="function")return ge(ne,zl(Q),re);if(Q.$$typeof===y)return ge(ne,Ol(ne,Q),re);Hl(ne,Q)}return null}function le(ne,Q,re,pe){var Me=Q!==null?Q.key:null;if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return Me!==null?null:U(ne,Q,""+re,pe);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case w:return re.key===Me?X(ne,Q,re,pe):null;case E:return re.key===Me?se(ne,Q,re,pe):null;case k:return re=er(re),le(ne,Q,re,pe)}if(W(re)||P(re))return Me!==null?null:fe(ne,Q,re,pe,null);if(typeof re.then=="function")return le(ne,Q,zl(re),pe);if(re.$$typeof===y)return le(ne,Q,Ol(ne,re),pe);Hl(ne,re)}return null}function ce(ne,Q,re,pe,Me){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return ne=ne.get(re)||null,U(Q,ne,""+pe,Me);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case w:return ne=ne.get(pe.key===null?re:pe.key)||null,X(Q,ne,pe,Me);case E:return ne=ne.get(pe.key===null?re:pe.key)||null,se(Q,ne,pe,Me);case k:return pe=er(pe),ce(ne,Q,re,pe,Me)}if(W(pe)||P(pe))return ne=ne.get(re)||null,fe(Q,ne,pe,Me,null);if(typeof pe.then=="function")return ce(ne,Q,re,zl(pe),Me);if(pe.$$typeof===y)return ce(ne,Q,re,Ol(Q,pe),Me);Hl(Q,pe)}return null}function Ee(ne,Q,re,pe){for(var Me=null,Xe=null,Ae=Q,He=Q=0,Ve=null;Ae!==null&&He<re.length;He++){Ae.index>He?(Ve=Ae,Ae=null):Ve=Ae.sibling;var Qe=le(ne,Ae,re[He],pe);if(Qe===null){Ae===null&&(Ae=Ve);break}e&&Ae&&Qe.alternate===null&&t(ne,Ae),Q=C(Qe,Q,He),Xe===null?Me=Qe:Xe.sibling=Qe,Xe=Qe,Ae=Ve}if(He===re.length)return i(ne,Ae),Ge&&Gn(ne,He),Me;if(Ae===null){for(;He<re.length;He++)Ae=ge(ne,re[He],pe),Ae!==null&&(Q=C(Ae,Q,He),Xe===null?Me=Ae:Xe.sibling=Ae,Xe=Ae);return Ge&&Gn(ne,He),Me}for(Ae=l(Ae);He<re.length;He++)Ve=ce(Ae,ne,He,re[He],pe),Ve!==null&&(e&&Ve.alternate!==null&&Ae.delete(Ve.key===null?He:Ve.key),Q=C(Ve,Q,He),Xe===null?Me=Ve:Xe.sibling=Ve,Xe=Ve);return e&&Ae.forEach(function(Li){return t(ne,Li)}),Ge&&Gn(ne,He),Me}function Oe(ne,Q,re,pe){if(re==null)throw Error(o(151));for(var Me=null,Xe=null,Ae=Q,He=Q=0,Ve=null,Qe=re.next();Ae!==null&&!Qe.done;He++,Qe=re.next()){Ae.index>He?(Ve=Ae,Ae=null):Ve=Ae.sibling;var Li=le(ne,Ae,Qe.value,pe);if(Li===null){Ae===null&&(Ae=Ve);break}e&&Ae&&Li.alternate===null&&t(ne,Ae),Q=C(Li,Q,He),Xe===null?Me=Li:Xe.sibling=Li,Xe=Li,Ae=Ve}if(Qe.done)return i(ne,Ae),Ge&&Gn(ne,He),Me;if(Ae===null){for(;!Qe.done;He++,Qe=re.next())Qe=ge(ne,Qe.value,pe),Qe!==null&&(Q=C(Qe,Q,He),Xe===null?Me=Qe:Xe.sibling=Qe,Xe=Qe);return Ge&&Gn(ne,He),Me}for(Ae=l(Ae);!Qe.done;He++,Qe=re.next())Qe=ce(Ae,ne,He,Qe.value,pe),Qe!==null&&(e&&Qe.alternate!==null&&Ae.delete(Qe.key===null?He:Qe.key),Q=C(Qe,Q,He),Xe===null?Me=Qe:Xe.sibling=Qe,Xe=Qe);return e&&Ae.forEach(function(I0){return t(ne,I0)}),Ge&&Gn(ne,He),Me}function st(ne,Q,re,pe){if(typeof re=="object"&&re!==null&&re.type===x&&re.key===null&&(re=re.props.children),typeof re=="object"&&re!==null){switch(re.$$typeof){case w:e:{for(var Me=re.key;Q!==null;){if(Q.key===Me){if(Me=re.type,Me===x){if(Q.tag===7){i(ne,Q.sibling),pe=m(Q,re.props.children),pe.return=ne,ne=pe;break e}}else if(Q.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===k&&er(Me)===Q.type){i(ne,Q.sibling),pe=m(Q,re.props),Cs(pe,re),pe.return=ne,ne=pe;break e}i(ne,Q);break}else t(ne,Q);Q=Q.sibling}re.type===x?(pe=Wi(re.props.children,ne.mode,pe,re.key),pe.return=ne,ne=pe):(pe=Rl(re.type,re.key,re.props,null,ne.mode,pe),Cs(pe,re),pe.return=ne,ne=pe)}return L(ne);case E:e:{for(Me=re.key;Q!==null;){if(Q.key===Me)if(Q.tag===4&&Q.stateNode.containerInfo===re.containerInfo&&Q.stateNode.implementation===re.implementation){i(ne,Q.sibling),pe=m(Q,re.children||[]),pe.return=ne,ne=pe;break e}else{i(ne,Q);break}else t(ne,Q);Q=Q.sibling}pe=vo(re,ne.mode,pe),pe.return=ne,ne=pe}return L(ne);case k:return re=er(re),st(ne,Q,re,pe)}if(W(re))return Ee(ne,Q,re,pe);if(P(re)){if(Me=P(re),typeof Me!="function")throw Error(o(150));return re=Me.call(re),Oe(ne,Q,re,pe)}if(typeof re.then=="function")return st(ne,Q,zl(re),pe);if(re.$$typeof===y)return st(ne,Q,Ol(ne,re),pe);Hl(ne,re)}return typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint"?(re=""+re,Q!==null&&Q.tag===6?(i(ne,Q.sibling),pe=m(Q,re),pe.return=ne,ne=pe):(i(ne,Q),pe=_o(re,ne.mode,pe),pe.return=ne,ne=pe),L(ne)):i(ne,Q)}return function(ne,Q,re,pe){try{bs=0;var Me=st(ne,Q,re,pe);return Mr=null,Me}catch(Ae){if(Ae===Rr||Ae===Nl)throw Ae;var Xe=cn(29,Ae,null,ne.mode);return Xe.lanes=pe,Xe.return=ne,Xe}finally{}}}var nr=hf(!0),ff=hf(!1),mi=!1;function Ro(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Mo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function gi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _i(e,t,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ze&2)!==0){var m=l.pending;return m===null?t.next=t:(t.next=m.next,m.next=t),l.pending=t,t=Dl(e),Yh(e,null,i),t}return Tl(e,l,t,i),Dl(e)}function ws(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,dl(e,i)}}function Lo(e,t){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var m=null,C=null;if(i=i.firstBaseUpdate,i!==null){do{var L={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};C===null?m=C=L:C=C.next=L,i=i.next}while(i!==null);C===null?m=C=t:C=C.next=t}else m=C=t;i={baseState:l.baseState,firstBaseUpdate:m,lastBaseUpdate:C,shared:l.shared,callbacks:l.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var Oo=!1;function xs(){if(Oo){var e=Dr;if(e!==null)throw e}}function Es(e,t,i,l){Oo=!1;var m=e.updateQueue;mi=!1;var C=m.firstBaseUpdate,L=m.lastBaseUpdate,U=m.shared.pending;if(U!==null){m.shared.pending=null;var X=U,se=X.next;X.next=null,L===null?C=se:L.next=se,L=X;var fe=e.alternate;fe!==null&&(fe=fe.updateQueue,U=fe.lastBaseUpdate,U!==L&&(U===null?fe.firstBaseUpdate=se:U.next=se,fe.lastBaseUpdate=X))}if(C!==null){var ge=m.baseState;L=0,fe=se=X=null,U=C;do{var le=U.lane&-536870913,ce=le!==U.lane;if(ce?(qe&le)===le:(l&le)===le){le!==0&&le===Tr&&(Oo=!0),fe!==null&&(fe=fe.next={lane:0,tag:U.tag,payload:U.payload,callback:null,next:null});e:{var Ee=e,Oe=U;le=t;var st=i;switch(Oe.tag){case 1:if(Ee=Oe.payload,typeof Ee=="function"){ge=Ee.call(st,ge,le);break e}ge=Ee;break e;case 3:Ee.flags=Ee.flags&-65537|128;case 0:if(Ee=Oe.payload,le=typeof Ee=="function"?Ee.call(st,ge,le):Ee,le==null)break e;ge=u({},ge,le);break e;case 2:mi=!0}}le=U.callback,le!==null&&(e.flags|=64,ce&&(e.flags|=8192),ce=m.callbacks,ce===null?m.callbacks=[le]:ce.push(le))}else ce={lane:le,tag:U.tag,payload:U.payload,callback:U.callback,next:null},fe===null?(se=fe=ce,X=ge):fe=fe.next=ce,L|=le;if(U=U.next,U===null){if(U=m.shared.pending,U===null)break;ce=U,U=ce.next,ce.next=null,m.lastBaseUpdate=ce,m.shared.pending=null}}while(!0);fe===null&&(X=ge),m.baseState=X,m.firstBaseUpdate=se,m.lastBaseUpdate=fe,C===null&&(m.shared.lanes=0),Ci|=L,e.lanes=L,e.memoizedState=ge}}function df(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function pf(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)df(i[e],t)}var Lr=z(null),Il=z(0);function mf(e,t){e=ni,j(Il,e),j(Lr,t),ni=e|t.baseLanes}function Bo(){j(Il,ni),j(Lr,Lr.current)}function No(){ni=Il.current,V(Lr),V(Il)}var un=z(null),xn=null;function vi(e){var t=e.alternate;j(St,St.current&1),j(un,e),xn===null&&(t===null||Lr.current!==null||t.memoizedState!==null)&&(xn=e)}function jo(e){j(St,St.current),j(un,e),xn===null&&(xn=e)}function gf(e){e.tag===22?(j(St,St.current),j(un,e),xn===null&&(xn=e)):yi()}function yi(){j(St,St.current),j(un,un.current)}function hn(e){V(un),xn===e&&(xn=null),V(St)}var St=z(0);function Ul(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Fc(i)||qc(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Yn=0,ze=null,it=null,wt=null,Pl=!1,Or=!1,ir=!1,Fl=0,ks=0,Br=null,Dv=0;function gt(){throw Error(o(321))}function zo(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!on(e[i],t[i]))return!1;return!0}function Ho(e,t,i,l,m,C){return Yn=C,ze=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?Jf:Jo,ir=!1,C=i(l,m),ir=!1,Or&&(C=vf(t,i,l,m)),_f(e),C}function _f(e){G.H=Ds;var t=it!==null&&it.next!==null;if(Yn=0,wt=it=ze=null,Pl=!1,ks=0,Br=null,t)throw Error(o(300));e===null||xt||(e=e.dependencies,e!==null&&Ll(e)&&(xt=!0))}function vf(e,t,i,l){ze=e;var m=0;do{if(Or&&(Br=null),ks=0,Or=!1,25<=m)throw Error(o(301));if(m+=1,wt=it=null,e.updateQueue!=null){var C=e.updateQueue;C.lastEffect=null,C.events=null,C.stores=null,C.memoCache!=null&&(C.memoCache.index=0)}G.H=ed,C=t(i,l)}while(Or);return C}function Rv(){var e=G.H,t=e.useState()[0];return t=typeof t.then=="function"?As(t):t,e=e.useState()[0],(it!==null?it.memoizedState:null)!==e&&(ze.flags|=1024),t}function Io(){var e=Fl!==0;return Fl=0,e}function Uo(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Po(e){if(Pl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Pl=!1}Yn=0,wt=it=ze=null,Or=!1,ks=Fl=0,Br=null}function Xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?ze.memoizedState=wt=e:wt=wt.next=e,wt}function bt(){if(it===null){var e=ze.alternate;e=e!==null?e.memoizedState:null}else e=it.next;var t=wt===null?ze.memoizedState:wt.next;if(t!==null)wt=t,it=e;else{if(e===null)throw ze.alternate===null?Error(o(467)):Error(o(310));it=e,e={memoizedState:it.memoizedState,baseState:it.baseState,baseQueue:it.baseQueue,queue:it.queue,next:null},wt===null?ze.memoizedState=wt=e:wt=wt.next=e}return wt}function ql(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function As(e){var t=ks;return ks+=1,Br===null&&(Br=[]),e=of(Br,e,t),t=ze,(wt===null?t.memoizedState:wt.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?Jf:Jo),e}function Vl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return As(e);if(e.$$typeof===y)return zt(e)}throw Error(o(438,String(e)))}function Fo(e){var t=null,i=ze.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var l=ze.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(m){return m.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=ql(),ze.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),l=0;l<e;l++)i[l]=N;return t.index++,i}function Wn(e,t){return typeof t=="function"?t(e):t}function Gl(e){var t=bt();return qo(t,it,e)}function qo(e,t,i){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=i;var m=e.baseQueue,C=l.pending;if(C!==null){if(m!==null){var L=m.next;m.next=C.next,C.next=L}t.baseQueue=m=C,l.pending=null}if(C=e.baseState,m===null)e.memoizedState=C;else{t=m.next;var U=L=null,X=null,se=t,fe=!1;do{var ge=se.lane&-536870913;if(ge!==se.lane?(qe&ge)===ge:(Yn&ge)===ge){var le=se.revertLane;if(le===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),ge===Tr&&(fe=!0);else if((Yn&le)===le){se=se.next,le===Tr&&(fe=!0);continue}else ge={lane:0,revertLane:se.revertLane,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},X===null?(U=X=ge,L=C):X=X.next=ge,ze.lanes|=le,Ci|=le;ge=se.action,ir&&i(C,ge),C=se.hasEagerState?se.eagerState:i(C,ge)}else le={lane:ge,revertLane:se.revertLane,gesture:se.gesture,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},X===null?(U=X=le,L=C):X=X.next=le,ze.lanes|=ge,Ci|=ge;se=se.next}while(se!==null&&se!==t);if(X===null?L=C:X.next=U,!on(C,e.memoizedState)&&(xt=!0,fe&&(i=Dr,i!==null)))throw i;e.memoizedState=C,e.baseState=L,e.baseQueue=X,l.lastRenderedState=C}return m===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Vo(e){var t=bt(),i=t.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=e;var l=i.dispatch,m=i.pending,C=t.memoizedState;if(m!==null){i.pending=null;var L=m=m.next;do C=e(C,L.action),L=L.next;while(L!==m);on(C,t.memoizedState)||(xt=!0),t.memoizedState=C,t.baseQueue===null&&(t.baseState=C),i.lastRenderedState=C}return[C,l]}function yf(e,t,i){var l=ze,m=bt(),C=Ge;if(C){if(i===void 0)throw Error(o(407));i=i()}else i=t();var L=!on((it||m).memoizedState,i);if(L&&(m.memoizedState=i,xt=!0),m=m.queue,Ko(Cf.bind(null,l,m,e),[e]),m.getSnapshot!==t||L||wt!==null&&wt.memoizedState.tag&1){if(l.flags|=2048,Nr(9,{destroy:void 0},bf.bind(null,l,m,i,t),null),at===null)throw Error(o(349));C||(Yn&127)!==0||Sf(l,t,i)}return i}function Sf(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=ze.updateQueue,t===null?(t=ql(),ze.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function bf(e,t,i,l){t.value=i,t.getSnapshot=l,wf(t)&&xf(e)}function Cf(e,t,i){return i(function(){wf(t)&&xf(e)})}function wf(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!on(e,i)}catch{return!0}}function xf(e){var t=Yi(e,2);t!==null&&rn(t,e,2)}function Go(e){var t=Xt();if(typeof e=="function"){var i=e;if(e=i(),ir){lt(!0);try{i()}finally{lt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:e},t}function Ef(e,t,i,l){return e.baseState=i,qo(e,it,typeof l=="function"?l:Wn)}function Mv(e,t,i,l,m){if(Yl(e))throw Error(o(485));if(e=t.action,e!==null){var C={payload:m,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(L){C.listeners.push(L)}};G.T!==null?i(!0):C.isTransition=!1,l(C),i=t.pending,i===null?(C.next=t.pending=C,kf(t,C)):(C.next=i.next,t.pending=i.next=C)}}function kf(e,t){var i=t.action,l=t.payload,m=e.state;if(t.isTransition){var C=G.T,L={};G.T=L;try{var U=i(m,l),X=G.S;X!==null&&X(L,U),Af(e,t,U)}catch(se){$o(e,t,se)}finally{C!==null&&L.types!==null&&(C.types=L.types),G.T=C}}else try{C=i(m,l),Af(e,t,C)}catch(se){$o(e,t,se)}}function Af(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){Tf(e,t,l)},function(l){return $o(e,t,l)}):Tf(e,t,i)}function Tf(e,t,i){t.status="fulfilled",t.value=i,Df(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,kf(e,i)))}function $o(e,t,i){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=i,Df(t),t=t.next;while(t!==l)}e.action=null}function Df(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Rf(e,t){return t}function Mf(e,t){if(Ge){var i=at.formState;if(i!==null){e:{var l=ze;if(Ge){if(ut){t:{for(var m=ut,C=wn;m.nodeType!==8;){if(!C){m=null;break t}if(m=En(m.nextSibling),m===null){m=null;break t}}C=m.data,m=C==="F!"||C==="F"?m:null}if(m){ut=En(m.nextSibling),l=m.data==="F!";break e}}di(l)}l=!1}l&&(t=i[0])}}return i=Xt(),i.memoizedState=i.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rf,lastRenderedState:t},i.queue=l,i=Xf.bind(null,ze,l),l.dispatch=i,l=Go(!1),C=Zo.bind(null,ze,!1,l.queue),l=Xt(),m={state:t,dispatch:null,action:e,pending:null},l.queue=m,i=Mv.bind(null,ze,m,C,i),m.dispatch=i,l.memoizedState=e,[t,i,!1]}function Lf(e){var t=bt();return Of(t,it,e)}function Of(e,t,i){if(t=qo(e,t,Rf)[0],e=Gl(Wn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=As(t)}catch(L){throw L===Rr?Nl:L}else l=t;t=bt();var m=t.queue,C=m.dispatch;return i!==t.memoizedState&&(ze.flags|=2048,Nr(9,{destroy:void 0},Lv.bind(null,m,i),null)),[l,C,e]}function Lv(e,t){e.action=t}function Bf(e){var t=bt(),i=it;if(i!==null)return Of(t,i,e);bt(),t=t.memoizedState,i=bt();var l=i.queue.dispatch;return i.memoizedState=e,[t,l,!1]}function Nr(e,t,i,l){return e={tag:e,create:i,deps:l,inst:t,next:null},t=ze.updateQueue,t===null&&(t=ql(),ze.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(l=i.next,i.next=e,e.next=l,t.lastEffect=e),e}function Nf(){return bt().memoizedState}function $l(e,t,i,l){var m=Xt();ze.flags|=e,m.memoizedState=Nr(1|t,{destroy:void 0},i,l===void 0?null:l)}function Kl(e,t,i,l){var m=bt();l=l===void 0?null:l;var C=m.memoizedState.inst;it!==null&&l!==null&&zo(l,it.memoizedState.deps)?m.memoizedState=Nr(t,C,i,l):(ze.flags|=e,m.memoizedState=Nr(1|t,C,i,l))}function jf(e,t){$l(8390656,8,e,t)}function Ko(e,t){Kl(2048,8,e,t)}function Ov(e){ze.flags|=4;var t=ze.updateQueue;if(t===null)t=ql(),ze.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function zf(e){var t=bt().memoizedState;return Ov({ref:t,nextImpl:e}),function(){if((Ze&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Hf(e,t){return Kl(4,2,e,t)}function If(e,t){return Kl(4,4,e,t)}function Uf(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Pf(e,t,i){i=i!=null?i.concat([e]):null,Kl(4,4,Uf.bind(null,t,e),i)}function Yo(){}function Ff(e,t){var i=bt();t=t===void 0?null:t;var l=i.memoizedState;return t!==null&&zo(t,l[1])?l[0]:(i.memoizedState=[e,t],e)}function qf(e,t){var i=bt();t=t===void 0?null:t;var l=i.memoizedState;if(t!==null&&zo(t,l[1]))return l[0];if(l=e(),ir){lt(!0);try{e()}finally{lt(!1)}}return i.memoizedState=[l,t],l}function Wo(e,t,i){return i===void 0||(Yn&1073741824)!==0&&(qe&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Vd(),ze.lanes|=e,Ci|=e,i)}function Vf(e,t,i,l){return on(i,t)?i:Lr.current!==null?(e=Wo(e,i,l),on(e,t)||(xt=!0),e):(Yn&42)===0||(Yn&1073741824)!==0&&(qe&261930)===0?(xt=!0,e.memoizedState=i):(e=Vd(),ze.lanes|=e,Ci|=e,t)}function Gf(e,t,i,l,m){var C=$.p;$.p=C!==0&&8>C?C:8;var L=G.T,U={};G.T=U,Zo(e,!1,t,i);try{var X=m(),se=G.S;if(se!==null&&se(U,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var fe=Tv(X,l);Ts(e,t,fe,pn(e))}else Ts(e,t,l,pn(e))}catch(ge){Ts(e,t,{then:function(){},status:"rejected",reason:ge},pn())}finally{$.p=C,L!==null&&U.types!==null&&(L.types=U.types),G.T=L}}function Bv(){}function Xo(e,t,i,l){if(e.tag!==5)throw Error(o(476));var m=$f(e).queue;Gf(e,m,t,J,i===null?Bv:function(){return Kf(e),i(l)})}function $f(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:J},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Kf(e){var t=$f(e);t.next===null&&(t=e.alternate.memoizedState),Ts(e,t.next.queue,{},pn())}function Qo(){return zt(Gs)}function Yf(){return bt().memoizedState}function Wf(){return bt().memoizedState}function Nv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=pn();e=gi(i);var l=_i(t,e,i);l!==null&&(rn(l,t,i),ws(l,t,i)),t={cache:ko()},e.payload=t;return}t=t.return}}function jv(e,t,i){var l=pn();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Yl(e)?Qf(t,i):(i=mo(e,t,i,l),i!==null&&(rn(i,e,l),Zf(i,t,l)))}function Xf(e,t,i){var l=pn();Ts(e,t,i,l)}function Ts(e,t,i,l){var m={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Yl(e))Qf(t,m);else{var C=e.alternate;if(e.lanes===0&&(C===null||C.lanes===0)&&(C=t.lastRenderedReducer,C!==null))try{var L=t.lastRenderedState,U=C(L,i);if(m.hasEagerState=!0,m.eagerState=U,on(U,L))return Tl(e,t,m,0),at===null&&Al(),!1}catch{}finally{}if(i=mo(e,t,m,l),i!==null)return rn(i,e,l),Zf(i,t,l),!0}return!1}function Zo(e,t,i,l){if(l={lane:2,revertLane:Rc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Yl(e)){if(t)throw Error(o(479))}else t=mo(e,i,l,2),t!==null&&rn(t,e,2)}function Yl(e){var t=e.alternate;return e===ze||t!==null&&t===ze}function Qf(e,t){Or=Pl=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Zf(e,t,i){if((i&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,dl(e,i)}}var Ds={readContext:zt,use:Vl,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useLayoutEffect:gt,useInsertionEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useSyncExternalStore:gt,useId:gt,useHostTransitionStatus:gt,useFormState:gt,useActionState:gt,useOptimistic:gt,useMemoCache:gt,useCacheRefresh:gt};Ds.useEffectEvent=gt;var Jf={readContext:zt,use:Vl,useCallback:function(e,t){return Xt().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:jf,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,$l(4194308,4,Uf.bind(null,t,e),i)},useLayoutEffect:function(e,t){return $l(4194308,4,e,t)},useInsertionEffect:function(e,t){$l(4,2,e,t)},useMemo:function(e,t){var i=Xt();t=t===void 0?null:t;var l=e();if(ir){lt(!0);try{e()}finally{lt(!1)}}return i.memoizedState=[l,t],l},useReducer:function(e,t,i){var l=Xt();if(i!==void 0){var m=i(t);if(ir){lt(!0);try{i(t)}finally{lt(!1)}}}else m=t;return l.memoizedState=l.baseState=m,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:m},l.queue=e,e=e.dispatch=jv.bind(null,ze,e),[l.memoizedState,e]},useRef:function(e){var t=Xt();return e={current:e},t.memoizedState=e},useState:function(e){e=Go(e);var t=e.queue,i=Xf.bind(null,ze,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Yo,useDeferredValue:function(e,t){var i=Xt();return Wo(i,e,t)},useTransition:function(){var e=Go(!1);return e=Gf.bind(null,ze,e.queue,!0,!1),Xt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var l=ze,m=Xt();if(Ge){if(i===void 0)throw Error(o(407));i=i()}else{if(i=t(),at===null)throw Error(o(349));(qe&127)!==0||Sf(l,t,i)}m.memoizedState=i;var C={value:i,getSnapshot:t};return m.queue=C,jf(Cf.bind(null,l,C,e),[e]),l.flags|=2048,Nr(9,{destroy:void 0},bf.bind(null,l,C,i,t),null),i},useId:function(){var e=Xt(),t=at.identifierPrefix;if(Ge){var i=Nn,l=Bn;i=(l&~(1<<32-xe(l)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Fl++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Dv++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Qo,useFormState:Mf,useActionState:Mf,useOptimistic:function(e){var t=Xt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Zo.bind(null,ze,!0,i),i.dispatch=t,[e,t]},useMemoCache:Fo,useCacheRefresh:function(){return Xt().memoizedState=Nv.bind(null,ze)},useEffectEvent:function(e){var t=Xt(),i={impl:e};return t.memoizedState=i,function(){if((Ze&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},Jo={readContext:zt,use:Vl,useCallback:Ff,useContext:zt,useEffect:Ko,useImperativeHandle:Pf,useInsertionEffect:Hf,useLayoutEffect:If,useMemo:qf,useReducer:Gl,useRef:Nf,useState:function(){return Gl(Wn)},useDebugValue:Yo,useDeferredValue:function(e,t){var i=bt();return Vf(i,it.memoizedState,e,t)},useTransition:function(){var e=Gl(Wn)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:As(e),t]},useSyncExternalStore:yf,useId:Yf,useHostTransitionStatus:Qo,useFormState:Lf,useActionState:Lf,useOptimistic:function(e,t){var i=bt();return Ef(i,it,e,t)},useMemoCache:Fo,useCacheRefresh:Wf};Jo.useEffectEvent=zf;var ed={readContext:zt,use:Vl,useCallback:Ff,useContext:zt,useEffect:Ko,useImperativeHandle:Pf,useInsertionEffect:Hf,useLayoutEffect:If,useMemo:qf,useReducer:Vo,useRef:Nf,useState:function(){return Vo(Wn)},useDebugValue:Yo,useDeferredValue:function(e,t){var i=bt();return it===null?Wo(i,e,t):Vf(i,it.memoizedState,e,t)},useTransition:function(){var e=Vo(Wn)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:As(e),t]},useSyncExternalStore:yf,useId:Yf,useHostTransitionStatus:Qo,useFormState:Bf,useActionState:Bf,useOptimistic:function(e,t){var i=bt();return it!==null?Ef(i,it,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Fo,useCacheRefresh:Wf};ed.useEffectEvent=zf;function ec(e,t,i,l){t=e.memoizedState,i=i(l,t),i=i==null?t:u({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var tc={enqueueSetState:function(e,t,i){e=e._reactInternals;var l=pn(),m=gi(l);m.payload=t,i!=null&&(m.callback=i),t=_i(e,m,l),t!==null&&(rn(t,e,l),ws(t,e,l))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var l=pn(),m=gi(l);m.tag=1,m.payload=t,i!=null&&(m.callback=i),t=_i(e,m,l),t!==null&&(rn(t,e,l),ws(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=pn(),l=gi(i);l.tag=2,t!=null&&(l.callback=t),t=_i(e,l,i),t!==null&&(rn(t,e,i),ws(t,e,i))}};function td(e,t,i,l,m,C,L){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,C,L):t.prototype&&t.prototype.isPureReactComponent?!ms(i,l)||!ms(m,C):!0}function nd(e,t,i,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,l),t.state!==e&&tc.enqueueReplaceState(t,t.state,null)}function rr(e,t){var i=t;if("ref"in t){i={};for(var l in t)l!=="ref"&&(i[l]=t[l])}if(e=e.defaultProps){i===t&&(i=u({},i));for(var m in e)i[m]===void 0&&(i[m]=e[m])}return i}function id(e){kl(e)}function rd(e){console.error(e)}function sd(e){kl(e)}function Wl(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function ld(e,t,i){try{var l=e.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function nc(e,t,i){return i=gi(i),i.tag=3,i.payload={element:null},i.callback=function(){Wl(e,t)},i}function ad(e){return e=gi(e),e.tag=3,e}function od(e,t,i,l){var m=i.type.getDerivedStateFromError;if(typeof m=="function"){var C=l.value;e.payload=function(){return m(C)},e.callback=function(){ld(t,i,l)}}var L=i.stateNode;L!==null&&typeof L.componentDidCatch=="function"&&(e.callback=function(){ld(t,i,l),typeof m!="function"&&(wi===null?wi=new Set([this]):wi.add(this));var U=l.stack;this.componentDidCatch(l.value,{componentStack:U!==null?U:""})})}function zv(e,t,i,l,m){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=i.alternate,t!==null&&Ar(t,i,m,!0),i=un.current,i!==null){switch(i.tag){case 31:case 13:return xn===null?aa():i.alternate===null&&_t===0&&(_t=3),i.flags&=-257,i.flags|=65536,i.lanes=m,l===jl?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([l]):t.add(l),Ac(e,l,m)),!1;case 22:return i.flags|=65536,l===jl?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([l]):i.add(l)),Ac(e,l,m)),!1}throw Error(o(435,i.tag))}return Ac(e,l,m),aa(),!1}if(Ge)return t=un.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=m,l!==bo&&(e=Error(o(422),{cause:l}),vs(Sn(e,i)))):(l!==bo&&(t=Error(o(423),{cause:l}),vs(Sn(t,i))),e=e.current.alternate,e.flags|=65536,m&=-m,e.lanes|=m,l=Sn(l,i),m=nc(e.stateNode,l,m),Lo(e,m),_t!==4&&(_t=2)),!1;var C=Error(o(520),{cause:l});if(C=Sn(C,i),zs===null?zs=[C]:zs.push(C),_t!==4&&(_t=2),t===null)return!0;l=Sn(l,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=m&-m,i.lanes|=e,e=nc(i.stateNode,l,e),Lo(i,e),!1;case 1:if(t=i.type,C=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(wi===null||!wi.has(C))))return i.flags|=65536,m&=-m,i.lanes|=m,m=ad(m),od(m,e,i,l),Lo(i,m),!1}i=i.return}while(i!==null);return!1}var ic=Error(o(461)),xt=!1;function Ht(e,t,i,l){t.child=e===null?ff(t,null,i,l):nr(t,e.child,i,l)}function cd(e,t,i,l,m){i=i.render;var C=t.ref;if("ref"in l){var L={};for(var U in l)U!=="ref"&&(L[U]=l[U])}else L=l;return Zi(t),l=Ho(e,t,i,L,C,m),U=Io(),e!==null&&!xt?(Uo(e,t,m),Xn(e,t,m)):(Ge&&U&&yo(t),t.flags|=1,Ht(e,t,l,m),t.child)}function ud(e,t,i,l,m){if(e===null){var C=i.type;return typeof C=="function"&&!go(C)&&C.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=C,hd(e,t,C,l,m)):(e=Rl(i.type,null,l,t,t.mode,m),e.ref=t.ref,e.return=t,t.child=e)}if(C=e.child,!hc(e,m)){var L=C.memoizedProps;if(i=i.compare,i=i!==null?i:ms,i(L,l)&&e.ref===t.ref)return Xn(e,t,m)}return t.flags|=1,e=Vn(C,l),e.ref=t.ref,e.return=t,t.child=e}function hd(e,t,i,l,m){if(e!==null){var C=e.memoizedProps;if(ms(C,l)&&e.ref===t.ref)if(xt=!1,t.pendingProps=l=C,hc(e,m))(e.flags&131072)!==0&&(xt=!0);else return t.lanes=e.lanes,Xn(e,t,m)}return rc(e,t,i,l,m)}function fd(e,t,i,l){var m=l.children,C=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(C=C!==null?C.baseLanes|i:i,e!==null){for(l=t.child=e.child,m=0;l!==null;)m=m|l.lanes|l.childLanes,l=l.sibling;l=m&~C}else l=0,t.child=null;return dd(e,t,C,i,l)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Bl(t,C!==null?C.cachePool:null),C!==null?mf(t,C):Bo(),gf(t);else return l=t.lanes=536870912,dd(e,t,C!==null?C.baseLanes|i:i,i,l)}else C!==null?(Bl(t,C.cachePool),mf(t,C),yi(),t.memoizedState=null):(e!==null&&Bl(t,null),Bo(),yi());return Ht(e,t,m,i),t.child}function Rs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function dd(e,t,i,l,m){var C=To();return C=C===null?null:{parent:Ct._currentValue,pool:C},t.memoizedState={baseLanes:i,cachePool:C},e!==null&&Bl(t,null),Bo(),gf(t),e!==null&&Ar(e,t,l,!0),t.childLanes=m,null}function Xl(e,t){return t=Zl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function pd(e,t,i){return nr(t,e.child,null,i),e=Xl(t,t.pendingProps),e.flags|=2,hn(t),t.memoizedState=null,e}function Hv(e,t,i){var l=t.pendingProps,m=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ge){if(l.mode==="hidden")return e=Xl(t,l),t.lanes=536870912,Rs(null,e);if(jo(t),(e=ut)?(e=kp(e,wn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:hi!==null?{id:Bn,overflow:Nn}:null,retryLane:536870912,hydrationErrors:null},i=Xh(e),i.return=t,t.child=i,jt=t,ut=null)):e=null,e===null)throw di(t);return t.lanes=536870912,null}return Xl(t,l)}var C=e.memoizedState;if(C!==null){var L=C.dehydrated;if(jo(t),m)if(t.flags&256)t.flags&=-257,t=pd(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(xt||Ar(e,t,i,!1),m=(i&e.childLanes)!==0,xt||m){if(l=at,l!==null&&(L=pl(l,i),L!==0&&L!==C.retryLane))throw C.retryLane=L,Yi(e,L),rn(l,e,L),ic;aa(),t=pd(e,t,i)}else e=C.treeContext,ut=En(L.nextSibling),jt=t,Ge=!0,fi=null,wn=!1,e!==null&&Jh(t,e),t=Xl(t,l),t.flags|=4096;return t}return e=Vn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ql(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(o(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function rc(e,t,i,l,m){return Zi(t),i=Ho(e,t,i,l,void 0,m),l=Io(),e!==null&&!xt?(Uo(e,t,m),Xn(e,t,m)):(Ge&&l&&yo(t),t.flags|=1,Ht(e,t,i,m),t.child)}function md(e,t,i,l,m,C){return Zi(t),t.updateQueue=null,i=vf(t,l,i,m),_f(e),l=Io(),e!==null&&!xt?(Uo(e,t,C),Xn(e,t,C)):(Ge&&l&&yo(t),t.flags|=1,Ht(e,t,i,C),t.child)}function gd(e,t,i,l,m){if(Zi(t),t.stateNode===null){var C=wr,L=i.contextType;typeof L=="object"&&L!==null&&(C=zt(L)),C=new i(l,C),t.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,C.updater=tc,t.stateNode=C,C._reactInternals=t,C=t.stateNode,C.props=l,C.state=t.memoizedState,C.refs={},Ro(t),L=i.contextType,C.context=typeof L=="object"&&L!==null?zt(L):wr,C.state=t.memoizedState,L=i.getDerivedStateFromProps,typeof L=="function"&&(ec(t,i,L,l),C.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof C.getSnapshotBeforeUpdate=="function"||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(L=C.state,typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount(),L!==C.state&&tc.enqueueReplaceState(C,C.state,null),Es(t,l,C,m),xs(),C.state=t.memoizedState),typeof C.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){C=t.stateNode;var U=t.memoizedProps,X=rr(i,U);C.props=X;var se=C.context,fe=i.contextType;L=wr,typeof fe=="object"&&fe!==null&&(L=zt(fe));var ge=i.getDerivedStateFromProps;fe=typeof ge=="function"||typeof C.getSnapshotBeforeUpdate=="function",U=t.pendingProps!==U,fe||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(U||se!==L)&&nd(t,C,l,L),mi=!1;var le=t.memoizedState;C.state=le,Es(t,l,C,m),xs(),se=t.memoizedState,U||le!==se||mi?(typeof ge=="function"&&(ec(t,i,ge,l),se=t.memoizedState),(X=mi||td(t,i,X,l,le,se,L))?(fe||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(t.flags|=4194308)):(typeof C.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=se),C.props=l,C.state=se,C.context=L,l=X):(typeof C.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{C=t.stateNode,Mo(e,t),L=t.memoizedProps,fe=rr(i,L),C.props=fe,ge=t.pendingProps,le=C.context,se=i.contextType,X=wr,typeof se=="object"&&se!==null&&(X=zt(se)),U=i.getDerivedStateFromProps,(se=typeof U=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(L!==ge||le!==X)&&nd(t,C,l,X),mi=!1,le=t.memoizedState,C.state=le,Es(t,l,C,m),xs();var ce=t.memoizedState;L!==ge||le!==ce||mi||e!==null&&e.dependencies!==null&&Ll(e.dependencies)?(typeof U=="function"&&(ec(t,i,U,l),ce=t.memoizedState),(fe=mi||td(t,i,fe,l,le,ce,X)||e!==null&&e.dependencies!==null&&Ll(e.dependencies))?(se||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(l,ce,X),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(l,ce,X)),typeof C.componentDidUpdate=="function"&&(t.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof C.componentDidUpdate!="function"||L===e.memoizedProps&&le===e.memoizedState||(t.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||L===e.memoizedProps&&le===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=ce),C.props=l,C.state=ce,C.context=X,l=fe):(typeof C.componentDidUpdate!="function"||L===e.memoizedProps&&le===e.memoizedState||(t.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||L===e.memoizedProps&&le===e.memoizedState||(t.flags|=1024),l=!1)}return C=l,Ql(e,t),l=(t.flags&128)!==0,C||l?(C=t.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:C.render(),t.flags|=1,e!==null&&l?(t.child=nr(t,e.child,null,m),t.child=nr(t,null,i,m)):Ht(e,t,i,m),t.memoizedState=C.state,e=t.child):e=Xn(e,t,m),e}function _d(e,t,i,l){return Xi(),t.flags|=256,Ht(e,t,i,l),t.child}var sc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function lc(e){return{baseLanes:e,cachePool:lf()}}function ac(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=dn),e}function vd(e,t,i){var l=t.pendingProps,m=!1,C=(t.flags&128)!==0,L;if((L=C)||(L=e!==null&&e.memoizedState===null?!1:(St.current&2)!==0),L&&(m=!0,t.flags&=-129),L=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ge){if(m?vi(t):yi(),(e=ut)?(e=kp(e,wn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:hi!==null?{id:Bn,overflow:Nn}:null,retryLane:536870912,hydrationErrors:null},i=Xh(e),i.return=t,t.child=i,jt=t,ut=null)):e=null,e===null)throw di(t);return qc(e)?t.lanes=32:t.lanes=536870912,null}var U=l.children;return l=l.fallback,m?(yi(),m=t.mode,U=Zl({mode:"hidden",children:U},m),l=Wi(l,m,i,null),U.return=t,l.return=t,U.sibling=l,t.child=U,l=t.child,l.memoizedState=lc(i),l.childLanes=ac(e,L,i),t.memoizedState=sc,Rs(null,l)):(vi(t),oc(t,U))}var X=e.memoizedState;if(X!==null&&(U=X.dehydrated,U!==null)){if(C)t.flags&256?(vi(t),t.flags&=-257,t=cc(e,t,i)):t.memoizedState!==null?(yi(),t.child=e.child,t.flags|=128,t=null):(yi(),U=l.fallback,m=t.mode,l=Zl({mode:"visible",children:l.children},m),U=Wi(U,m,i,null),U.flags|=2,l.return=t,U.return=t,l.sibling=U,t.child=l,nr(t,e.child,null,i),l=t.child,l.memoizedState=lc(i),l.childLanes=ac(e,L,i),t.memoizedState=sc,t=Rs(null,l));else if(vi(t),qc(U)){if(L=U.nextSibling&&U.nextSibling.dataset,L)var se=L.dgst;L=se,l=Error(o(419)),l.stack="",l.digest=L,vs({value:l,source:null,stack:null}),t=cc(e,t,i)}else if(xt||Ar(e,t,i,!1),L=(i&e.childLanes)!==0,xt||L){if(L=at,L!==null&&(l=pl(L,i),l!==0&&l!==X.retryLane))throw X.retryLane=l,Yi(e,l),rn(L,e,l),ic;Fc(U)||aa(),t=cc(e,t,i)}else Fc(U)?(t.flags|=192,t.child=e.child,t=null):(e=X.treeContext,ut=En(U.nextSibling),jt=t,Ge=!0,fi=null,wn=!1,e!==null&&Jh(t,e),t=oc(t,l.children),t.flags|=4096);return t}return m?(yi(),U=l.fallback,m=t.mode,X=e.child,se=X.sibling,l=Vn(X,{mode:"hidden",children:l.children}),l.subtreeFlags=X.subtreeFlags&65011712,se!==null?U=Vn(se,U):(U=Wi(U,m,i,null),U.flags|=2),U.return=t,l.return=t,l.sibling=U,t.child=l,Rs(null,l),l=t.child,U=e.child.memoizedState,U===null?U=lc(i):(m=U.cachePool,m!==null?(X=Ct._currentValue,m=m.parent!==X?{parent:X,pool:X}:m):m=lf(),U={baseLanes:U.baseLanes|i,cachePool:m}),l.memoizedState=U,l.childLanes=ac(e,L,i),t.memoizedState=sc,Rs(e.child,l)):(vi(t),i=e.child,e=i.sibling,i=Vn(i,{mode:"visible",children:l.children}),i.return=t,i.sibling=null,e!==null&&(L=t.deletions,L===null?(t.deletions=[e],t.flags|=16):L.push(e)),t.child=i,t.memoizedState=null,i)}function oc(e,t){return t=Zl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Zl(e,t){return e=cn(22,e,null,t),e.lanes=0,e}function cc(e,t,i){return nr(t,e.child,null,i),e=oc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function yd(e,t,i){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),xo(e.return,t,i)}function uc(e,t,i,l,m,C){var L=e.memoizedState;L===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:m,treeForkCount:C}:(L.isBackwards=t,L.rendering=null,L.renderingStartTime=0,L.last=l,L.tail=i,L.tailMode=m,L.treeForkCount=C)}function Sd(e,t,i){var l=t.pendingProps,m=l.revealOrder,C=l.tail;l=l.children;var L=St.current,U=(L&2)!==0;if(U?(L=L&1|2,t.flags|=128):L&=1,j(St,L),Ht(e,t,l,i),l=Ge?_s:0,!U&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&yd(e,i,t);else if(e.tag===19)yd(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(m){case"forwards":for(i=t.child,m=null;i!==null;)e=i.alternate,e!==null&&Ul(e)===null&&(m=i),i=i.sibling;i=m,i===null?(m=t.child,t.child=null):(m=i.sibling,i.sibling=null),uc(t,!1,m,i,C,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,m=t.child,t.child=null;m!==null;){if(e=m.alternate,e!==null&&Ul(e)===null){t.child=m;break}e=m.sibling,m.sibling=i,i=m,m=e}uc(t,!0,i,null,C,l);break;case"together":uc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Xn(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Ci|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Ar(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,i=Vn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Vn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function hc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ll(e)))}function Iv(e,t,i){switch(t.tag){case 3:q(t,t.stateNode.containerInfo),pi(t,Ct,e.memoizedState.cache),Xi();break;case 27:case 5:Z(t);break;case 4:q(t,t.stateNode.containerInfo);break;case 10:pi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,jo(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(vi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?vd(e,t,i):(vi(t),e=Xn(e,t,i),e!==null?e.sibling:null);vi(t);break;case 19:var m=(e.flags&128)!==0;if(l=(i&t.childLanes)!==0,l||(Ar(e,t,i,!1),l=(i&t.childLanes)!==0),m){if(l)return Sd(e,t,i);t.flags|=128}if(m=t.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),j(St,St.current),l)break;return null;case 22:return t.lanes=0,fd(e,t,i,t.pendingProps);case 24:pi(t,Ct,e.memoizedState.cache)}return Xn(e,t,i)}function bd(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)xt=!0;else{if(!hc(e,i)&&(t.flags&128)===0)return xt=!1,Iv(e,t,i);xt=(e.flags&131072)!==0}else xt=!1,Ge&&(t.flags&1048576)!==0&&Zh(t,_s,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=er(t.elementType),t.type=e,typeof e=="function")go(e)?(l=rr(e,l),t.tag=1,t=gd(null,t,e,l,i)):(t.tag=0,t=rc(null,t,e,l,i));else{if(e!=null){var m=e.$$typeof;if(m===A){t.tag=11,t=cd(null,t,e,l,i);break e}else if(m===T){t.tag=14,t=ud(null,t,e,l,i);break e}}throw t=K(e)||e,Error(o(306,t,""))}}return t;case 0:return rc(e,t,t.type,t.pendingProps,i);case 1:return l=t.type,m=rr(l,t.pendingProps),gd(e,t,l,m,i);case 3:e:{if(q(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var C=t.memoizedState;m=C.element,Mo(e,t),Es(t,l,null,i);var L=t.memoizedState;if(l=L.cache,pi(t,Ct,l),l!==C.cache&&Eo(t,[Ct],i,!0),xs(),l=L.element,C.isDehydrated)if(C={element:l,isDehydrated:!1,cache:L.cache},t.updateQueue.baseState=C,t.memoizedState=C,t.flags&256){t=_d(e,t,l,i);break e}else if(l!==m){m=Sn(Error(o(424)),t),vs(m),t=_d(e,t,l,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ut=En(e.firstChild),jt=t,Ge=!0,fi=null,wn=!0,i=ff(t,null,l,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Xi(),l===m){t=Xn(e,t,i);break e}Ht(e,t,l,i)}t=t.child}return t;case 26:return Ql(e,t),e===null?(i=Lp(t.type,null,t.pendingProps,null))?t.memoizedState=i:Ge||(i=t.type,e=t.pendingProps,l=pa(me.current).createElement(i),l[vt]=t,l[qt]=e,It(l,i,e),_e(l),t.stateNode=l):t.memoizedState=Lp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Z(t),e===null&&Ge&&(l=t.stateNode=Dp(t.type,t.pendingProps,me.current),jt=t,wn=!0,m=ut,Ai(t.type)?(Vc=m,ut=En(l.firstChild)):ut=m),Ht(e,t,t.pendingProps.children,i),Ql(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ge&&((m=l=ut)&&(l=m0(l,t.type,t.pendingProps,wn),l!==null?(t.stateNode=l,jt=t,ut=En(l.firstChild),wn=!1,m=!0):m=!1),m||di(t)),Z(t),m=t.type,C=t.pendingProps,L=e!==null?e.memoizedProps:null,l=C.children,Ic(m,C)?l=null:L!==null&&Ic(m,L)&&(t.flags|=32),t.memoizedState!==null&&(m=Ho(e,t,Rv,null,null,i),Gs._currentValue=m),Ql(e,t),Ht(e,t,l,i),t.child;case 6:return e===null&&Ge&&((e=i=ut)&&(i=g0(i,t.pendingProps,wn),i!==null?(t.stateNode=i,jt=t,ut=null,e=!0):e=!1),e||di(t)),null;case 13:return vd(e,t,i);case 4:return q(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=nr(t,null,l,i):Ht(e,t,l,i),t.child;case 11:return cd(e,t,t.type,t.pendingProps,i);case 7:return Ht(e,t,t.pendingProps,i),t.child;case 8:return Ht(e,t,t.pendingProps.children,i),t.child;case 12:return Ht(e,t,t.pendingProps.children,i),t.child;case 10:return l=t.pendingProps,pi(t,t.type,l.value),Ht(e,t,l.children,i),t.child;case 9:return m=t.type._context,l=t.pendingProps.children,Zi(t),m=zt(m),l=l(m),t.flags|=1,Ht(e,t,l,i),t.child;case 14:return ud(e,t,t.type,t.pendingProps,i);case 15:return hd(e,t,t.type,t.pendingProps,i);case 19:return Sd(e,t,i);case 31:return Hv(e,t,i);case 22:return fd(e,t,i,t.pendingProps);case 24:return Zi(t),l=zt(Ct),e===null?(m=To(),m===null&&(m=at,C=ko(),m.pooledCache=C,C.refCount++,C!==null&&(m.pooledCacheLanes|=i),m=C),t.memoizedState={parent:l,cache:m},Ro(t),pi(t,Ct,m)):((e.lanes&i)!==0&&(Mo(e,t),Es(t,null,null,i),xs()),m=e.memoizedState,C=t.memoizedState,m.parent!==l?(m={parent:l,cache:l},t.memoizedState=m,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=m),pi(t,Ct,l)):(l=C.cache,pi(t,Ct,l),l!==m.cache&&Eo(t,[Ct],i,!0))),Ht(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Qn(e){e.flags|=4}function fc(e,t,i,l,m){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(m&335544128)===m)if(e.stateNode.complete)e.flags|=8192;else if(Yd())e.flags|=8192;else throw tr=jl,Do}else e.flags&=-16777217}function Cd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!zp(t))if(Yd())e.flags|=8192;else throw tr=jl,Do}function Jl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?rs():536870912,e.lanes|=t,Ir|=t)}function Ms(e,t){if(!Ge)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function ht(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,l=0;if(t)for(var m=e.child;m!==null;)i|=m.lanes|m.childLanes,l|=m.subtreeFlags&65011712,l|=m.flags&65011712,m.return=e,m=m.sibling;else for(m=e.child;m!==null;)i|=m.lanes|m.childLanes,l|=m.subtreeFlags,l|=m.flags,m.return=e,m=m.sibling;return e.subtreeFlags|=l,e.childLanes=i,t}function Uv(e,t,i){var l=t.pendingProps;switch(So(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(t),null;case 1:return ht(t),null;case 3:return i=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Kn(Ct),oe(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(kr(t)?Qn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Co())),ht(t),null;case 26:var m=t.type,C=t.memoizedState;return e===null?(Qn(t),C!==null?(ht(t),Cd(t,C)):(ht(t),fc(t,m,null,l,i))):C?C!==e.memoizedState?(Qn(t),ht(t),Cd(t,C)):(ht(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Qn(t),ht(t),fc(t,m,e,l,i)),null;case 27:if(ie(t),i=me.current,m=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Qn(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return ht(t),null}e=te.current,kr(t)?ef(t):(e=Dp(m,l,i),t.stateNode=e,Qn(t))}return ht(t),null;case 5:if(ie(t),m=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Qn(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return ht(t),null}if(C=te.current,kr(t))ef(t);else{var L=pa(me.current);switch(C){case 1:C=L.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:C=L.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":C=L.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":C=L.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":C=L.createElement("div"),C.innerHTML="<script><\/script>",C=C.removeChild(C.firstChild);break;case"select":C=typeof l.is=="string"?L.createElement("select",{is:l.is}):L.createElement("select"),l.multiple?C.multiple=!0:l.size&&(C.size=l.size);break;default:C=typeof l.is=="string"?L.createElement(m,{is:l.is}):L.createElement(m)}}C[vt]=t,C[qt]=l;e:for(L=t.child;L!==null;){if(L.tag===5||L.tag===6)C.appendChild(L.stateNode);else if(L.tag!==4&&L.tag!==27&&L.child!==null){L.child.return=L,L=L.child;continue}if(L===t)break e;for(;L.sibling===null;){if(L.return===null||L.return===t)break e;L=L.return}L.sibling.return=L.return,L=L.sibling}t.stateNode=C;e:switch(It(C,m,l),m){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Qn(t)}}return ht(t),fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Qn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=me.current,kr(t)){if(e=t.stateNode,i=t.memoizedProps,l=null,m=jt,m!==null)switch(m.tag){case 27:case 5:l=m.memoizedProps}e[vt]=t,e=!!(e.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||vp(e.nodeValue,i)),e||di(t,!0)}else e=pa(e).createTextNode(l),e[vt]=t,t.stateNode=e}return ht(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(l=kr(t),i!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[vt]=t}else Xi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),e=!1}else i=Co(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(hn(t),t):(hn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return ht(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(m=kr(t),l!==null&&l.dehydrated!==null){if(e===null){if(!m)throw Error(o(318));if(m=t.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(o(317));m[vt]=t}else Xi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),m=!1}else m=Co(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=m),m=!0;if(!m)return t.flags&256?(hn(t),t):(hn(t),null)}return hn(t),(t.flags&128)!==0?(t.lanes=i,t):(i=l!==null,e=e!==null&&e.memoizedState!==null,i&&(l=t.child,m=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(m=l.alternate.memoizedState.cachePool.pool),C=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(C=l.memoizedState.cachePool.pool),C!==m&&(l.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Jl(t,t.updateQueue),ht(t),null);case 4:return oe(),e===null&&Bc(t.stateNode.containerInfo),ht(t),null;case 10:return Kn(t.type),ht(t),null;case 19:if(V(St),l=t.memoizedState,l===null)return ht(t),null;if(m=(t.flags&128)!==0,C=l.rendering,C===null)if(m)Ms(l,!1);else{if(_t!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(C=Ul(e),C!==null){for(t.flags|=128,Ms(l,!1),e=C.updateQueue,t.updateQueue=e,Jl(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Wh(i,e),i=i.sibling;return j(St,St.current&1|2),Ge&&Gn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&et()>ra&&(t.flags|=128,m=!0,Ms(l,!1),t.lanes=4194304)}else{if(!m)if(e=Ul(C),e!==null){if(t.flags|=128,m=!0,e=e.updateQueue,t.updateQueue=e,Jl(t,e),Ms(l,!0),l.tail===null&&l.tailMode==="hidden"&&!C.alternate&&!Ge)return ht(t),null}else 2*et()-l.renderingStartTime>ra&&i!==536870912&&(t.flags|=128,m=!0,Ms(l,!1),t.lanes=4194304);l.isBackwards?(C.sibling=t.child,t.child=C):(e=l.last,e!==null?e.sibling=C:t.child=C,l.last=C)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=et(),e.sibling=null,i=St.current,j(St,m?i&1|2:i&1),Ge&&Gn(t,l.treeForkCount),e):(ht(t),null);case 22:case 23:return hn(t),No(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(i&536870912)!==0&&(t.flags&128)===0&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),i=t.updateQueue,i!==null&&Jl(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==i&&(t.flags|=2048),e!==null&&V(Ji),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Kn(Ct),ht(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Pv(e,t){switch(So(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Kn(Ct),oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ie(t),null;case 31:if(t.memoizedState!==null){if(hn(t),t.alternate===null)throw Error(o(340));Xi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(hn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Xi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(St),null;case 4:return oe(),null;case 10:return Kn(t.type),null;case 22:case 23:return hn(t),No(),e!==null&&V(Ji),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Kn(Ct),null;case 25:return null;default:return null}}function wd(e,t){switch(So(t),t.tag){case 3:Kn(Ct),oe();break;case 26:case 27:case 5:ie(t);break;case 4:oe();break;case 31:t.memoizedState!==null&&hn(t);break;case 13:hn(t);break;case 19:V(St);break;case 10:Kn(t.type);break;case 22:case 23:hn(t),No(),e!==null&&V(Ji);break;case 24:Kn(Ct)}}function Ls(e,t){try{var i=t.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var m=l.next;i=m;do{if((i.tag&e)===e){l=void 0;var C=i.create,L=i.inst;l=C(),L.destroy=l}i=i.next}while(i!==m)}}catch(U){nt(t,t.return,U)}}function Si(e,t,i){try{var l=t.updateQueue,m=l!==null?l.lastEffect:null;if(m!==null){var C=m.next;l=C;do{if((l.tag&e)===e){var L=l.inst,U=L.destroy;if(U!==void 0){L.destroy=void 0,m=t;var X=i,se=U;try{se()}catch(fe){nt(m,X,fe)}}}l=l.next}while(l!==C)}}catch(fe){nt(t,t.return,fe)}}function xd(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{pf(t,i)}catch(l){nt(e,e.return,l)}}}function Ed(e,t,i){i.props=rr(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(l){nt(e,t,l)}}function Os(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof i=="function"?e.refCleanup=i(l):i.current=l}}catch(m){nt(e,t,m)}}function jn(e,t){var i=e.ref,l=e.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(m){nt(e,t,m)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(m){nt(e,t,m)}else i.current=null}function kd(e){var t=e.type,i=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(m){nt(e,e.return,m)}}function dc(e,t,i){try{var l=e.stateNode;c0(l,e.type,i,t),l[qt]=t}catch(m){nt(e,e.return,m)}}function Ad(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ai(e.type)||e.tag===4}function pc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ad(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ai(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function mc(e,t,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Fn));else if(l!==4&&(l===27&&Ai(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(mc(e,t,i),e=e.sibling;e!==null;)mc(e,t,i),e=e.sibling}function ea(e,t,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(l!==4&&(l===27&&Ai(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(ea(e,t,i),e=e.sibling;e!==null;)ea(e,t,i),e=e.sibling}function Td(e){var t=e.stateNode,i=e.memoizedProps;try{for(var l=e.type,m=t.attributes;m.length;)t.removeAttributeNode(m[0]);It(t,l,i),t[vt]=e,t[qt]=i}catch(C){nt(e,e.return,C)}}var Zn=!1,Et=!1,gc=!1,Dd=typeof WeakSet=="function"?WeakSet:Set,Bt=null;function Fv(e,t){if(e=e.containerInfo,zc=ba,e=Uh(e),oo(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var m=l.anchorOffset,C=l.focusNode;l=l.focusOffset;try{i.nodeType,C.nodeType}catch{i=null;break e}var L=0,U=-1,X=-1,se=0,fe=0,ge=e,le=null;t:for(;;){for(var ce;ge!==i||m!==0&&ge.nodeType!==3||(U=L+m),ge!==C||l!==0&&ge.nodeType!==3||(X=L+l),ge.nodeType===3&&(L+=ge.nodeValue.length),(ce=ge.firstChild)!==null;)le=ge,ge=ce;for(;;){if(ge===e)break t;if(le===i&&++se===m&&(U=L),le===C&&++fe===l&&(X=L),(ce=ge.nextSibling)!==null)break;ge=le,le=ge.parentNode}ge=ce}i=U===-1||X===-1?null:{start:U,end:X}}else i=null}i=i||{start:0,end:0}}else i=null;for(Hc={focusedElem:e,selectionRange:i},ba=!1,Bt=t;Bt!==null;)if(t=Bt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Bt=e;else for(;Bt!==null;){switch(t=Bt,C=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)m=e[i],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&C!==null){e=void 0,i=t,m=C.memoizedProps,C=C.memoizedState,l=i.stateNode;try{var Ee=rr(i.type,m);e=l.getSnapshotBeforeUpdate(Ee,C),l.__reactInternalSnapshotBeforeUpdate=e}catch(Oe){nt(i,i.return,Oe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Pc(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Pc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Bt=e;break}Bt=t.return}}function Rd(e,t,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:ei(e,i),l&4&&Ls(5,i);break;case 1:if(ei(e,i),l&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(L){nt(i,i.return,L)}else{var m=rr(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(m,t,e.__reactInternalSnapshotBeforeUpdate)}catch(L){nt(i,i.return,L)}}l&64&&xd(i),l&512&&Os(i,i.return);break;case 3:if(ei(e,i),l&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{pf(e,t)}catch(L){nt(i,i.return,L)}}break;case 27:t===null&&l&4&&Td(i);case 26:case 5:ei(e,i),t===null&&l&4&&kd(i),l&512&&Os(i,i.return);break;case 12:ei(e,i);break;case 31:ei(e,i),l&4&&Od(e,i);break;case 13:ei(e,i),l&4&&Bd(e,i),l&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Qv.bind(null,i),_0(e,i))));break;case 22:if(l=i.memoizedState!==null||Zn,!l){t=t!==null&&t.memoizedState!==null||Et,m=Zn;var C=Et;Zn=l,(Et=t)&&!C?ti(e,i,(i.subtreeFlags&8772)!==0):ei(e,i),Zn=m,Et=C}break;case 30:break;default:ei(e,i)}}function Md(e){var t=e.alternate;t!==null&&(e.alternate=null,Md(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&as(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var dt=null,Jt=!1;function Jn(e,t,i){for(i=i.child;i!==null;)Ld(e,t,i),i=i.sibling}function Ld(e,t,i){if(We&&typeof We.onCommitFiberUnmount=="function")try{We.onCommitFiberUnmount(ft,i)}catch{}switch(i.tag){case 26:Et||jn(i,t),Jn(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Et||jn(i,t);var l=dt,m=Jt;Ai(i.type)&&(dt=i.stateNode,Jt=!1),Jn(e,t,i),Fs(i.stateNode),dt=l,Jt=m;break;case 5:Et||jn(i,t);case 6:if(l=dt,m=Jt,dt=null,Jn(e,t,i),dt=l,Jt=m,dt!==null)if(Jt)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(i.stateNode)}catch(C){nt(i,t,C)}else try{dt.removeChild(i.stateNode)}catch(C){nt(i,t,C)}break;case 18:dt!==null&&(Jt?(e=dt,xp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Kr(e)):xp(dt,i.stateNode));break;case 4:l=dt,m=Jt,dt=i.stateNode.containerInfo,Jt=!0,Jn(e,t,i),dt=l,Jt=m;break;case 0:case 11:case 14:case 15:Si(2,i,t),Et||Si(4,i,t),Jn(e,t,i);break;case 1:Et||(jn(i,t),l=i.stateNode,typeof l.componentWillUnmount=="function"&&Ed(i,t,l)),Jn(e,t,i);break;case 21:Jn(e,t,i);break;case 22:Et=(l=Et)||i.memoizedState!==null,Jn(e,t,i),Et=l;break;default:Jn(e,t,i)}}function Od(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kr(e)}catch(i){nt(t,t.return,i)}}}function Bd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kr(e)}catch(i){nt(t,t.return,i)}}function qv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Dd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Dd),t;default:throw Error(o(435,e.tag))}}function ta(e,t){var i=qv(e);t.forEach(function(l){if(!i.has(l)){i.add(l);var m=Zv.bind(null,e,l);l.then(m,m)}})}function en(e,t){var i=t.deletions;if(i!==null)for(var l=0;l<i.length;l++){var m=i[l],C=e,L=t,U=L;e:for(;U!==null;){switch(U.tag){case 27:if(Ai(U.type)){dt=U.stateNode,Jt=!1;break e}break;case 5:dt=U.stateNode,Jt=!1;break e;case 3:case 4:dt=U.stateNode.containerInfo,Jt=!0;break e}U=U.return}if(dt===null)throw Error(o(160));Ld(C,L,m),dt=null,Jt=!1,C=m.alternate,C!==null&&(C.return=null),m.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Nd(t,e),t=t.sibling}var Dn=null;function Nd(e,t){var i=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:en(t,e),tn(e),l&4&&(Si(3,e,e.return),Ls(3,e),Si(5,e,e.return));break;case 1:en(t,e),tn(e),l&512&&(Et||i===null||jn(i,i.return)),l&64&&Zn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var m=Dn;if(en(t,e),tn(e),l&512&&(Et||i===null||jn(i,i.return)),l&4){var C=i!==null?i.memoizedState:null;if(l=e.memoizedState,i===null)if(l===null)if(e.stateNode===null){e:{l=e.type,i=e.memoizedProps,m=m.ownerDocument||m;t:switch(l){case"title":C=m.getElementsByTagName("title")[0],(!C||C[qi]||C[vt]||C.namespaceURI==="http://www.w3.org/2000/svg"||C.hasAttribute("itemprop"))&&(C=m.createElement(l),m.head.insertBefore(C,m.querySelector("head > title"))),It(C,l,i),C[vt]=e,_e(C),l=C;break e;case"link":var L=Np("link","href",m).get(l+(i.href||""));if(L){for(var U=0;U<L.length;U++)if(C=L[U],C.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&C.getAttribute("rel")===(i.rel==null?null:i.rel)&&C.getAttribute("title")===(i.title==null?null:i.title)&&C.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){L.splice(U,1);break t}}C=m.createElement(l),It(C,l,i),m.head.appendChild(C);break;case"meta":if(L=Np("meta","content",m).get(l+(i.content||""))){for(U=0;U<L.length;U++)if(C=L[U],C.getAttribute("content")===(i.content==null?null:""+i.content)&&C.getAttribute("name")===(i.name==null?null:i.name)&&C.getAttribute("property")===(i.property==null?null:i.property)&&C.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&C.getAttribute("charset")===(i.charSet==null?null:i.charSet)){L.splice(U,1);break t}}C=m.createElement(l),It(C,l,i),m.head.appendChild(C);break;default:throw Error(o(468,l))}C[vt]=e,_e(C),l=C}e.stateNode=l}else jp(m,e.type,e.stateNode);else e.stateNode=Bp(m,l,e.memoizedProps);else C!==l?(C===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):C.count--,l===null?jp(m,e.type,e.stateNode):Bp(m,l,e.memoizedProps)):l===null&&e.stateNode!==null&&dc(e,e.memoizedProps,i.memoizedProps)}break;case 27:en(t,e),tn(e),l&512&&(Et||i===null||jn(i,i.return)),i!==null&&l&4&&dc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(en(t,e),tn(e),l&512&&(Et||i===null||jn(i,i.return)),e.flags&32){m=e.stateNode;try{gr(m,"")}catch(Ee){nt(e,e.return,Ee)}}l&4&&e.stateNode!=null&&(m=e.memoizedProps,dc(e,m,i!==null?i.memoizedProps:m)),l&1024&&(gc=!0);break;case 6:if(en(t,e),tn(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,i=e.stateNode;try{i.nodeValue=l}catch(Ee){nt(e,e.return,Ee)}}break;case 3:if(_a=null,m=Dn,Dn=ma(t.containerInfo),en(t,e),Dn=m,tn(e),l&4&&i!==null&&i.memoizedState.isDehydrated)try{Kr(t.containerInfo)}catch(Ee){nt(e,e.return,Ee)}gc&&(gc=!1,jd(e));break;case 4:l=Dn,Dn=ma(e.stateNode.containerInfo),en(t,e),tn(e),Dn=l;break;case 12:en(t,e),tn(e);break;case 31:en(t,e),tn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ta(e,l)));break;case 13:en(t,e),tn(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(ia=et()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ta(e,l)));break;case 22:m=e.memoizedState!==null;var X=i!==null&&i.memoizedState!==null,se=Zn,fe=Et;if(Zn=se||m,Et=fe||X,en(t,e),Et=fe,Zn=se,tn(e),l&8192)e:for(t=e.stateNode,t._visibility=m?t._visibility&-2:t._visibility|1,m&&(i===null||X||Zn||Et||sr(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){X=i=t;try{if(C=X.stateNode,m)L=C.style,typeof L.setProperty=="function"?L.setProperty("display","none","important"):L.display="none";else{U=X.stateNode;var ge=X.memoizedProps.style,le=ge!=null&&ge.hasOwnProperty("display")?ge.display:null;U.style.display=le==null||typeof le=="boolean"?"":(""+le).trim()}}catch(Ee){nt(X,X.return,Ee)}}}else if(t.tag===6){if(i===null){X=t;try{X.stateNode.nodeValue=m?"":X.memoizedProps}catch(Ee){nt(X,X.return,Ee)}}}else if(t.tag===18){if(i===null){X=t;try{var ce=X.stateNode;m?Ep(ce,!0):Ep(X.stateNode,!1)}catch(Ee){nt(X,X.return,Ee)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,ta(e,i))));break;case 19:en(t,e),tn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ta(e,l)));break;case 30:break;case 21:break;default:en(t,e),tn(e)}}function tn(e){var t=e.flags;if(t&2){try{for(var i,l=e.return;l!==null;){if(Ad(l)){i=l;break}l=l.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var m=i.stateNode,C=pc(e);ea(e,C,m);break;case 5:var L=i.stateNode;i.flags&32&&(gr(L,""),i.flags&=-33);var U=pc(e);ea(e,U,L);break;case 3:case 4:var X=i.stateNode.containerInfo,se=pc(e);mc(e,se,X);break;default:throw Error(o(161))}}catch(fe){nt(e,e.return,fe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;jd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ei(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Rd(e,t.alternate,t),t=t.sibling}function sr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Si(4,t,t.return),sr(t);break;case 1:jn(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Ed(t,t.return,i),sr(t);break;case 27:Fs(t.stateNode);case 26:case 5:jn(t,t.return),sr(t);break;case 22:t.memoizedState===null&&sr(t);break;case 30:sr(t);break;default:sr(t)}e=e.sibling}}function ti(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,m=e,C=t,L=C.flags;switch(C.tag){case 0:case 11:case 15:ti(m,C,i),Ls(4,C);break;case 1:if(ti(m,C,i),l=C,m=l.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(se){nt(l,l.return,se)}if(l=C,m=l.updateQueue,m!==null){var U=l.stateNode;try{var X=m.shared.hiddenCallbacks;if(X!==null)for(m.shared.hiddenCallbacks=null,m=0;m<X.length;m++)df(X[m],U)}catch(se){nt(l,l.return,se)}}i&&L&64&&xd(C),Os(C,C.return);break;case 27:Td(C);case 26:case 5:ti(m,C,i),i&&l===null&&L&4&&kd(C),Os(C,C.return);break;case 12:ti(m,C,i);break;case 31:ti(m,C,i),i&&L&4&&Od(m,C);break;case 13:ti(m,C,i),i&&L&4&&Bd(m,C);break;case 22:C.memoizedState===null&&ti(m,C,i),Os(C,C.return);break;case 30:break;default:ti(m,C,i)}t=t.sibling}}function _c(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&ys(i))}function vc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ys(e))}function Rn(e,t,i,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)zd(e,t,i,l),t=t.sibling}function zd(e,t,i,l){var m=t.flags;switch(t.tag){case 0:case 11:case 15:Rn(e,t,i,l),m&2048&&Ls(9,t);break;case 1:Rn(e,t,i,l);break;case 3:Rn(e,t,i,l),m&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ys(e)));break;case 12:if(m&2048){Rn(e,t,i,l),e=t.stateNode;try{var C=t.memoizedProps,L=C.id,U=C.onPostCommit;typeof U=="function"&&U(L,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(X){nt(t,t.return,X)}}else Rn(e,t,i,l);break;case 31:Rn(e,t,i,l);break;case 13:Rn(e,t,i,l);break;case 23:break;case 22:C=t.stateNode,L=t.alternate,t.memoizedState!==null?C._visibility&2?Rn(e,t,i,l):Bs(e,t):C._visibility&2?Rn(e,t,i,l):(C._visibility|=2,jr(e,t,i,l,(t.subtreeFlags&10256)!==0||!1)),m&2048&&_c(L,t);break;case 24:Rn(e,t,i,l),m&2048&&vc(t.alternate,t);break;default:Rn(e,t,i,l)}}function jr(e,t,i,l,m){for(m=m&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var C=e,L=t,U=i,X=l,se=L.flags;switch(L.tag){case 0:case 11:case 15:jr(C,L,U,X,m),Ls(8,L);break;case 23:break;case 22:var fe=L.stateNode;L.memoizedState!==null?fe._visibility&2?jr(C,L,U,X,m):Bs(C,L):(fe._visibility|=2,jr(C,L,U,X,m)),m&&se&2048&&_c(L.alternate,L);break;case 24:jr(C,L,U,X,m),m&&se&2048&&vc(L.alternate,L);break;default:jr(C,L,U,X,m)}t=t.sibling}}function Bs(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,l=t,m=l.flags;switch(l.tag){case 22:Bs(i,l),m&2048&&_c(l.alternate,l);break;case 24:Bs(i,l),m&2048&&vc(l.alternate,l);break;default:Bs(i,l)}t=t.sibling}}var Ns=8192;function zr(e,t,i){if(e.subtreeFlags&Ns)for(e=e.child;e!==null;)Hd(e,t,i),e=e.sibling}function Hd(e,t,i){switch(e.tag){case 26:zr(e,t,i),e.flags&Ns&&e.memoizedState!==null&&D0(i,Dn,e.memoizedState,e.memoizedProps);break;case 5:zr(e,t,i);break;case 3:case 4:var l=Dn;Dn=ma(e.stateNode.containerInfo),zr(e,t,i),Dn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ns,Ns=16777216,zr(e,t,i),Ns=l):zr(e,t,i));break;default:zr(e,t,i)}}function Id(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function js(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var l=t[i];Bt=l,Pd(l,e)}Id(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ud(e),e=e.sibling}function Ud(e){switch(e.tag){case 0:case 11:case 15:js(e),e.flags&2048&&Si(9,e,e.return);break;case 3:js(e);break;case 12:js(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,na(e)):js(e);break;default:js(e)}}function na(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var l=t[i];Bt=l,Pd(l,e)}Id(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Si(8,t,t.return),na(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,na(t));break;default:na(t)}e=e.sibling}}function Pd(e,t){for(;Bt!==null;){var i=Bt;switch(i.tag){case 0:case 11:case 15:Si(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ys(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,Bt=l;else e:for(i=e;Bt!==null;){l=Bt;var m=l.sibling,C=l.return;if(Md(l),l===i){Bt=null;break e}if(m!==null){m.return=C,Bt=m;break e}Bt=C}}}var Vv={getCacheForType:function(e){var t=zt(Ct),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return zt(Ct).controller.signal}},Gv=typeof WeakMap=="function"?WeakMap:Map,Ze=0,at=null,Ue=null,qe=0,tt=0,fn=null,bi=!1,Hr=!1,yc=!1,ni=0,_t=0,Ci=0,lr=0,Sc=0,dn=0,Ir=0,zs=null,nn=null,bc=!1,ia=0,Fd=0,ra=1/0,sa=null,wi=null,Tt=0,xi=null,Ur=null,ii=0,Cc=0,wc=null,qd=null,Hs=0,xc=null;function pn(){return(Ze&2)!==0&&qe!==0?qe&-qe:G.T!==null?Rc():ai()}function Vd(){if(dn===0)if((qe&536870912)===0||Ge){var e=Lt;Lt<<=1,(Lt&3932160)===0&&(Lt=262144),dn=e}else dn=536870912;return e=un.current,e!==null&&(e.flags|=32),dn}function rn(e,t,i){(e===at&&(tt===2||tt===9)||e.cancelPendingCommit!==null)&&(Pr(e,0),Ei(e,qe,dn,!1)),Ui(e,i),((Ze&2)===0||e!==at)&&(e===at&&((Ze&2)===0&&(lr|=i),_t===4&&Ei(e,qe,dn,!1)),zn(e))}function Gd(e,t,i){if((Ze&6)!==0)throw Error(o(327));var l=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Ft(e,t),m=l?Yv(e,t):kc(e,t,!0),C=l;do{if(m===0){Hr&&!l&&Ei(e,t,0,!1);break}else{if(i=e.current.alternate,C&&!$v(i)){m=kc(e,t,!1),C=!1;continue}if(m===2){if(C=t,e.errorRecoveryDisabledLanes&C)var L=0;else L=e.pendingLanes&-536870913,L=L!==0?L:L&536870912?536870912:0;if(L!==0){t=L;e:{var U=e;m=zs;var X=U.current.memoizedState.isDehydrated;if(X&&(Pr(U,L).flags|=256),L=kc(U,L,!1),L!==2){if(yc&&!X){U.errorRecoveryDisabledLanes|=C,lr|=C,m=4;break e}C=nn,nn=m,C!==null&&(nn===null?nn=C:nn.push.apply(nn,C))}m=L}if(C=!1,m!==2)continue}}if(m===1){Pr(e,0),Ei(e,t,0,!0);break}e:{switch(l=e,C=m,C){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Ei(l,t,dn,!bi);break e;case 2:nn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(m=ia+300-et(),10<m)){if(Ei(l,t,dn,!bi),Ot(l,0,!0)!==0)break e;ii=t,l.timeoutHandle=Cp($d.bind(null,l,i,nn,sa,bc,t,dn,lr,Ir,bi,C,"Throttled",-0,0),m);break e}$d(l,i,nn,sa,bc,t,dn,lr,Ir,bi,C,null,-0,0)}}break}while(!0);zn(e)}function $d(e,t,i,l,m,C,L,U,X,se,fe,ge,le,ce){if(e.timeoutHandle=-1,ge=t.subtreeFlags,ge&8192||(ge&16785408)===16785408){ge={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Fn},Hd(t,C,ge);var Ee=(C&62914560)===C?ia-et():(C&4194048)===C?Fd-et():0;if(Ee=R0(ge,Ee),Ee!==null){ii=C,e.cancelPendingCommit=Ee(ep.bind(null,e,t,C,i,l,m,L,U,X,fe,ge,null,le,ce)),Ei(e,C,L,!se);return}}ep(e,t,C,i,l,m,L,U,X)}function $v(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var m=i[l],C=m.getSnapshot;m=m.value;try{if(!on(C(),m))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ei(e,t,i,l){t&=~Sc,t&=~lr,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var m=t;0<m;){var C=31-xe(m),L=1<<C;l[C]=-1,m&=~L}i!==0&&fl(e,i,t)}function la(){return(Ze&6)===0?(Is(0),!1):!0}function Ec(){if(Ue!==null){if(tt===0)var e=Ue.return;else e=Ue,$n=Qi=null,Po(e),Mr=null,bs=0,e=Ue;for(;e!==null;)wd(e.alternate,e),e=e.return;Ue=null}}function Pr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,f0(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),ii=0,Ec(),at=e,Ue=i=Vn(e.current,null),qe=t,tt=0,fn=null,bi=!1,Hr=Ft(e,t),yc=!1,Ir=dn=Sc=lr=Ci=_t=0,nn=zs=null,bc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var m=31-xe(l),C=1<<m;t|=e[m],l&=~C}return ni=t,Al(),i}function Kd(e,t){ze=null,G.H=Ds,t===Rr||t===Nl?(t=cf(),tt=3):t===Do?(t=cf(),tt=4):tt=t===ic?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,fn=t,Ue===null&&(_t=1,Wl(e,Sn(t,e.current)))}function Yd(){var e=un.current;return e===null?!0:(qe&4194048)===qe?xn===null:(qe&62914560)===qe||(qe&536870912)!==0?e===xn:!1}function Wd(){var e=G.H;return G.H=Ds,e===null?Ds:e}function Xd(){var e=G.A;return G.A=Vv,e}function aa(){_t=4,bi||(qe&4194048)!==qe&&un.current!==null||(Hr=!0),(Ci&134217727)===0&&(lr&134217727)===0||at===null||Ei(at,qe,dn,!1)}function kc(e,t,i){var l=Ze;Ze|=2;var m=Wd(),C=Xd();(at!==e||qe!==t)&&(sa=null,Pr(e,t)),t=!1;var L=_t;e:do try{if(tt!==0&&Ue!==null){var U=Ue,X=fn;switch(tt){case 8:Ec(),L=6;break e;case 3:case 2:case 9:case 6:un.current===null&&(t=!0);var se=tt;if(tt=0,fn=null,Fr(e,U,X,se),i&&Hr){L=0;break e}break;default:se=tt,tt=0,fn=null,Fr(e,U,X,se)}}Kv(),L=_t;break}catch(fe){Kd(e,fe)}while(!0);return t&&e.shellSuspendCounter++,$n=Qi=null,Ze=l,G.H=m,G.A=C,Ue===null&&(at=null,qe=0,Al()),L}function Kv(){for(;Ue!==null;)Qd(Ue)}function Yv(e,t){var i=Ze;Ze|=2;var l=Wd(),m=Xd();at!==e||qe!==t?(sa=null,ra=et()+500,Pr(e,t)):Hr=Ft(e,t);e:do try{if(tt!==0&&Ue!==null){t=Ue;var C=fn;t:switch(tt){case 1:tt=0,fn=null,Fr(e,t,C,1);break;case 2:case 9:if(af(C)){tt=0,fn=null,Zd(t);break}t=function(){tt!==2&&tt!==9||at!==e||(tt=7),zn(e)},C.then(t,t);break e;case 3:tt=7;break e;case 4:tt=5;break e;case 7:af(C)?(tt=0,fn=null,Zd(t)):(tt=0,fn=null,Fr(e,t,C,7));break;case 5:var L=null;switch(Ue.tag){case 26:L=Ue.memoizedState;case 5:case 27:var U=Ue;if(L?zp(L):U.stateNode.complete){tt=0,fn=null;var X=U.sibling;if(X!==null)Ue=X;else{var se=U.return;se!==null?(Ue=se,oa(se)):Ue=null}break t}}tt=0,fn=null,Fr(e,t,C,5);break;case 6:tt=0,fn=null,Fr(e,t,C,6);break;case 8:Ec(),_t=6;break e;default:throw Error(o(462))}}Wv();break}catch(fe){Kd(e,fe)}while(!0);return $n=Qi=null,G.H=l,G.A=m,Ze=i,Ue!==null?0:(at=null,qe=0,Al(),_t)}function Wv(){for(;Ue!==null&&!Yt();)Qd(Ue)}function Qd(e){var t=bd(e.alternate,e,ni);e.memoizedProps=e.pendingProps,t===null?oa(e):Ue=t}function Zd(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=md(i,t,t.pendingProps,t.type,void 0,qe);break;case 11:t=md(i,t,t.pendingProps,t.type.render,t.ref,qe);break;case 5:Po(t);default:wd(i,t),t=Ue=Wh(t,ni),t=bd(i,t,ni)}e.memoizedProps=e.pendingProps,t===null?oa(e):Ue=t}function Fr(e,t,i,l){$n=Qi=null,Po(t),Mr=null,bs=0;var m=t.return;try{if(zv(e,m,t,i,qe)){_t=1,Wl(e,Sn(i,e.current)),Ue=null;return}}catch(C){if(m!==null)throw Ue=m,C;_t=1,Wl(e,Sn(i,e.current)),Ue=null;return}t.flags&32768?(Ge||l===1?e=!0:Hr||(qe&536870912)!==0?e=!1:(bi=e=!0,(l===2||l===9||l===3||l===6)&&(l=un.current,l!==null&&l.tag===13&&(l.flags|=16384))),Jd(t,e)):oa(t)}function oa(e){var t=e;do{if((t.flags&32768)!==0){Jd(t,bi);return}e=t.return;var i=Uv(t.alternate,t,ni);if(i!==null){Ue=i;return}if(t=t.sibling,t!==null){Ue=t;return}Ue=t=e}while(t!==null);_t===0&&(_t=5)}function Jd(e,t){do{var i=Pv(e.alternate,e);if(i!==null){i.flags&=32767,Ue=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Ue=e;return}Ue=e=i}while(e!==null);_t=6,Ue=null}function ep(e,t,i,l,m,C,L,U,X){e.cancelPendingCommit=null;do ca();while(Tt!==0);if((Ze&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(C=t.lanes|t.childLanes,C|=po,fr(e,i,C,L,U,X),e===at&&(Ue=at=null,qe=0),Ur=t,xi=e,ii=i,Cc=C,wc=m,qd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Jv(ke,function(){return sp(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=G.T,G.T=null,m=$.p,$.p=2,L=Ze,Ze|=4;try{Fv(e,t,i)}finally{Ze=L,$.p=m,G.T=l}}Tt=1,tp(),np(),ip()}}function tp(){if(Tt===1){Tt=0;var e=xi,t=Ur,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=G.T,G.T=null;var l=$.p;$.p=2;var m=Ze;Ze|=4;try{Nd(t,e);var C=Hc,L=Uh(e.containerInfo),U=C.focusedElem,X=C.selectionRange;if(L!==U&&U&&U.ownerDocument&&Ih(U.ownerDocument.documentElement,U)){if(X!==null&&oo(U)){var se=X.start,fe=X.end;if(fe===void 0&&(fe=se),"selectionStart"in U)U.selectionStart=se,U.selectionEnd=Math.min(fe,U.value.length);else{var ge=U.ownerDocument||document,le=ge&&ge.defaultView||window;if(le.getSelection){var ce=le.getSelection(),Ee=U.textContent.length,Oe=Math.min(X.start,Ee),st=X.end===void 0?Oe:Math.min(X.end,Ee);!ce.extend&&Oe>st&&(L=st,st=Oe,Oe=L);var ne=Hh(U,Oe),Q=Hh(U,st);if(ne&&Q&&(ce.rangeCount!==1||ce.anchorNode!==ne.node||ce.anchorOffset!==ne.offset||ce.focusNode!==Q.node||ce.focusOffset!==Q.offset)){var re=ge.createRange();re.setStart(ne.node,ne.offset),ce.removeAllRanges(),Oe>st?(ce.addRange(re),ce.extend(Q.node,Q.offset)):(re.setEnd(Q.node,Q.offset),ce.addRange(re))}}}}for(ge=[],ce=U;ce=ce.parentNode;)ce.nodeType===1&&ge.push({element:ce,left:ce.scrollLeft,top:ce.scrollTop});for(typeof U.focus=="function"&&U.focus(),U=0;U<ge.length;U++){var pe=ge[U];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}ba=!!zc,Hc=zc=null}finally{Ze=m,$.p=l,G.T=i}}e.current=t,Tt=2}}function np(){if(Tt===2){Tt=0;var e=xi,t=Ur,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=G.T,G.T=null;var l=$.p;$.p=2;var m=Ze;Ze|=4;try{Rd(e,t.alternate,t)}finally{Ze=m,$.p=l,G.T=i}}Tt=3}}function ip(){if(Tt===4||Tt===3){Tt=0,mt();var e=xi,t=Ur,i=ii,l=qd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Tt=5:(Tt=0,Ur=xi=null,rp(e,e.pendingLanes));var m=e.pendingLanes;if(m===0&&(wi=null),ls(i),t=t.stateNode,We&&typeof We.onCommitFiberRoot=="function")try{We.onCommitFiberRoot(ft,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=G.T,m=$.p,$.p=2,G.T=null;try{for(var C=e.onRecoverableError,L=0;L<l.length;L++){var U=l[L];C(U.value,{componentStack:U.stack})}}finally{G.T=t,$.p=m}}(ii&3)!==0&&ca(),zn(e),m=e.pendingLanes,(i&261930)!==0&&(m&42)!==0?e===xc?Hs++:(Hs=0,xc=e):Hs=0,Is(0)}}function rp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ys(t)))}function ca(){return tp(),np(),ip(),sp()}function sp(){if(Tt!==5)return!1;var e=xi,t=Cc;Cc=0;var i=ls(ii),l=G.T,m=$.p;try{$.p=32>i?32:i,G.T=null,i=wc,wc=null;var C=xi,L=ii;if(Tt=0,Ur=xi=null,ii=0,(Ze&6)!==0)throw Error(o(331));var U=Ze;if(Ze|=4,Ud(C.current),zd(C,C.current,L,i),Ze=U,Is(0,!1),We&&typeof We.onPostCommitFiberRoot=="function")try{We.onPostCommitFiberRoot(ft,C)}catch{}return!0}finally{$.p=m,G.T=l,rp(e,t)}}function lp(e,t,i){t=Sn(i,t),t=nc(e.stateNode,t,2),e=_i(e,t,2),e!==null&&(Ui(e,2),zn(e))}function nt(e,t,i){if(e.tag===3)lp(e,e,i);else for(;t!==null;){if(t.tag===3){lp(t,e,i);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(wi===null||!wi.has(l))){e=Sn(i,e),i=ad(2),l=_i(t,i,2),l!==null&&(od(i,l,t,e),Ui(l,2),zn(l));break}}t=t.return}}function Ac(e,t,i){var l=e.pingCache;if(l===null){l=e.pingCache=new Gv;var m=new Set;l.set(t,m)}else m=l.get(t),m===void 0&&(m=new Set,l.set(t,m));m.has(i)||(yc=!0,m.add(i),e=Xv.bind(null,e,t,i),t.then(e,e))}function Xv(e,t,i){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,at===e&&(qe&i)===i&&(_t===4||_t===3&&(qe&62914560)===qe&&300>et()-ia?(Ze&2)===0&&Pr(e,0):Sc|=i,Ir===qe&&(Ir=0)),zn(e)}function ap(e,t){t===0&&(t=rs()),e=Yi(e,t),e!==null&&(Ui(e,t),zn(e))}function Qv(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),ap(e,i)}function Zv(e,t){var i=0;switch(e.tag){case 31:case 13:var l=e.stateNode,m=e.memoizedState;m!==null&&(i=m.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),ap(e,i)}function Jv(e,t){return Rt(e,t)}var ua=null,qr=null,Tc=!1,ha=!1,Dc=!1,ki=0;function zn(e){e!==qr&&e.next===null&&(qr===null?ua=qr=e:qr=qr.next=e),ha=!0,Tc||(Tc=!0,t0())}function Is(e,t){if(!Dc&&ha){Dc=!0;do for(var i=!1,l=ua;l!==null;){if(e!==0){var m=l.pendingLanes;if(m===0)var C=0;else{var L=l.suspendedLanes,U=l.pingedLanes;C=(1<<31-xe(42|e)+1)-1,C&=m&~(L&~U),C=C&201326741?C&201326741|1:C?C|2:0}C!==0&&(i=!0,hp(l,C))}else C=qe,C=Ot(l,l===at?C:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(C&3)===0||Ft(l,C)||(i=!0,hp(l,C));l=l.next}while(i);Dc=!1}}function e0(){op()}function op(){ha=Tc=!1;var e=0;ki!==0&&h0()&&(e=ki);for(var t=et(),i=null,l=ua;l!==null;){var m=l.next,C=cp(l,t);C===0?(l.next=null,i===null?ua=m:i.next=m,m===null&&(qr=i)):(i=l,(e!==0||(C&3)!==0)&&(ha=!0)),l=m}Tt!==0&&Tt!==5||Is(e),ki!==0&&(ki=0)}function cp(e,t){for(var i=e.suspendedLanes,l=e.pingedLanes,m=e.expirationTimes,C=e.pendingLanes&-62914561;0<C;){var L=31-xe(C),U=1<<L,X=m[L];X===-1?((U&i)===0||(U&l)!==0)&&(m[L]=hl(U,t)):X<=t&&(e.expiredLanes|=U),C&=~U}if(t=at,i=qe,i=Ot(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,i===0||e===t&&(tt===2||tt===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Pt(l),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Ft(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(l!==null&&Pt(l),ls(i)){case 2:case 8:i=ye;break;case 32:i=ke;break;case 268435456:i=Be;break;default:i=ke}return l=up.bind(null,e),i=Rt(i,l),e.callbackPriority=t,e.callbackNode=i,t}return l!==null&&l!==null&&Pt(l),e.callbackPriority=2,e.callbackNode=null,2}function up(e,t){if(Tt!==0&&Tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(ca()&&e.callbackNode!==i)return null;var l=qe;return l=Ot(e,e===at?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Gd(e,l,t),cp(e,et()),e.callbackNode!=null&&e.callbackNode===i?up.bind(null,e):null)}function hp(e,t){if(ca())return null;Gd(e,t,!0)}function t0(){d0(function(){(Ze&6)!==0?Rt(he,e0):op()})}function Rc(){if(ki===0){var e=Tr;e===0&&(e=Se,Se<<=1,(Se&261888)===0&&(Se=256)),ki=e}return ki}function fp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:yl(""+e)}function dp(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function n0(e,t,i,l,m){if(t==="submit"&&i&&i.stateNode===m){var C=fp((m[qt]||null).action),L=l.submitter;L&&(t=(t=L[qt]||null)?fp(t.formAction):L.getAttribute("formAction"),t!==null&&(C=t,L=null));var U=new wl("action","action",null,l,m);e.push({event:U,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(ki!==0){var X=L?dp(m,L):new FormData(m);Xo(i,{pending:!0,data:X,method:m.method,action:C},null,X)}}else typeof C=="function"&&(U.preventDefault(),X=L?dp(m,L):new FormData(m),Xo(i,{pending:!0,data:X,method:m.method,action:C},C,X))},currentTarget:m}]})}}for(var Mc=0;Mc<fo.length;Mc++){var Lc=fo[Mc],i0=Lc.toLowerCase(),r0=Lc[0].toUpperCase()+Lc.slice(1);Tn(i0,"on"+r0)}Tn(qh,"onAnimationEnd"),Tn(Vh,"onAnimationIteration"),Tn(Gh,"onAnimationStart"),Tn("dblclick","onDoubleClick"),Tn("focusin","onFocus"),Tn("focusout","onBlur"),Tn(Sv,"onTransitionRun"),Tn(bv,"onTransitionStart"),Tn(Cv,"onTransitionCancel"),Tn($h,"onTransitionEnd"),pr("onMouseEnter",["mouseout","mouseover"]),pr("onMouseLeave",["mouseout","mouseover"]),pr("onPointerEnter",["pointerout","pointerover"]),pr("onPointerLeave",["pointerout","pointerover"]),Vi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Us="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(" "),s0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Us));function pp(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var l=e[i],m=l.event;l=l.listeners;e:{var C=void 0;if(t)for(var L=l.length-1;0<=L;L--){var U=l[L],X=U.instance,se=U.currentTarget;if(U=U.listener,X!==C&&m.isPropagationStopped())break e;C=U,m.currentTarget=se;try{C(m)}catch(fe){kl(fe)}m.currentTarget=null,C=X}else for(L=0;L<l.length;L++){if(U=l[L],X=U.instance,se=U.currentTarget,U=U.listener,X!==C&&m.isPropagationStopped())break e;C=U,m.currentTarget=se;try{C(m)}catch(fe){kl(fe)}m.currentTarget=null,C=X}}}}function Pe(e,t){var i=t[Fi];i===void 0&&(i=t[Fi]=new Set);var l=e+"__bubble";i.has(l)||(mp(t,e,2,!1),i.add(l))}function Oc(e,t,i){var l=0;t&&(l|=4),mp(i,e,l,t)}var fa="_reactListening"+Math.random().toString(36).slice(2);function Bc(e){if(!e[fa]){e[fa]=!0,yt.forEach(function(i){i!=="selectionchange"&&(s0.has(i)||Oc(i,!1,e),Oc(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fa]||(t[fa]=!0,Oc("selectionchange",!1,t))}}function mp(e,t,i,l){switch(Vp(t)){case 2:var m=O0;break;case 8:m=B0;break;default:m=Wc}i=m.bind(null,t,i,e),m=void 0,!Ja||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(m=!0),l?m!==void 0?e.addEventListener(t,i,{capture:!0,passive:m}):e.addEventListener(t,i,!0):m!==void 0?e.addEventListener(t,i,{passive:m}):e.addEventListener(t,i,!1)}function Nc(e,t,i,l,m){var C=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var L=l.tag;if(L===3||L===4){var U=l.stateNode.containerInfo;if(U===m)break;if(L===4)for(L=l.return;L!==null;){var X=L.tag;if((X===3||X===4)&&L.stateNode.containerInfo===m)return;L=L.return}for(;U!==null;){if(L=oi(U),L===null)return;if(X=L.tag,X===5||X===6||X===26||X===27){l=C=L;continue e}U=U.parentNode}}l=l.return}yh(function(){var se=C,fe=Qa(i),ge=[];e:{var le=Kh.get(e);if(le!==void 0){var ce=wl,Ee=e;switch(e){case"keypress":if(bl(i)===0)break e;case"keydown":case"keyup":ce=Z_;break;case"focusin":Ee="focus",ce=io;break;case"focusout":Ee="blur",ce=io;break;case"beforeblur":case"afterblur":ce=io;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=Ch;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=U_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=tv;break;case qh:case Vh:case Gh:ce=q_;break;case $h:ce=iv;break;case"scroll":case"scrollend":ce=H_;break;case"wheel":ce=sv;break;case"copy":case"cut":case"paste":ce=G_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=xh;break;case"toggle":case"beforetoggle":ce=av}var Oe=(t&4)!==0,st=!Oe&&(e==="scroll"||e==="scrollend"),ne=Oe?le!==null?le+"Capture":null:le;Oe=[];for(var Q=se,re;Q!==null;){var pe=Q;if(re=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||re===null||ne===null||(pe=os(Q,ne),pe!=null&&Oe.push(Ps(Q,pe,re))),st)break;Q=Q.return}0<Oe.length&&(le=new ce(le,Ee,null,i,fe),ge.push({event:le,listeners:Oe}))}}if((t&7)===0){e:{if(le=e==="mouseover"||e==="pointerover",ce=e==="mouseout"||e==="pointerout",le&&i!==Xa&&(Ee=i.relatedTarget||i.fromElement)&&(oi(Ee)||Ee[Ln]))break e;if((ce||le)&&(le=fe.window===fe?fe:(le=fe.ownerDocument)?le.defaultView||le.parentWindow:window,ce?(Ee=i.relatedTarget||i.toElement,ce=se,Ee=Ee?oi(Ee):null,Ee!==null&&(st=v(Ee),Oe=Ee.tag,Ee!==st||Oe!==5&&Oe!==27&&Oe!==6)&&(Ee=null)):(ce=null,Ee=se),ce!==Ee)){if(Oe=Ch,pe="onMouseLeave",ne="onMouseEnter",Q="mouse",(e==="pointerout"||e==="pointerover")&&(Oe=xh,pe="onPointerLeave",ne="onPointerEnter",Q="pointer"),st=ce==null?le:ci(ce),re=Ee==null?le:ci(Ee),le=new Oe(pe,Q+"leave",ce,i,fe),le.target=st,le.relatedTarget=re,pe=null,oi(fe)===se&&(Oe=new Oe(ne,Q+"enter",Ee,i,fe),Oe.target=re,Oe.relatedTarget=st,pe=Oe),st=pe,ce&&Ee)t:{for(Oe=l0,ne=ce,Q=Ee,re=0,pe=ne;pe;pe=Oe(pe))re++;pe=0;for(var Me=Q;Me;Me=Oe(Me))pe++;for(;0<re-pe;)ne=Oe(ne),re--;for(;0<pe-re;)Q=Oe(Q),pe--;for(;re--;){if(ne===Q||Q!==null&&ne===Q.alternate){Oe=ne;break t}ne=Oe(ne),Q=Oe(Q)}Oe=null}else Oe=null;ce!==null&&gp(ge,le,ce,Oe,!1),Ee!==null&&st!==null&&gp(ge,st,Ee,Oe,!0)}}e:{if(le=se?ci(se):window,ce=le.nodeName&&le.nodeName.toLowerCase(),ce==="select"||ce==="input"&&le.type==="file")var Xe=Lh;else if(Rh(le))if(Oh)Xe=_v;else{Xe=mv;var Ae=pv}else ce=le.nodeName,!ce||ce.toLowerCase()!=="input"||le.type!=="checkbox"&&le.type!=="radio"?se&&Wa(se.elementType)&&(Xe=Lh):Xe=gv;if(Xe&&(Xe=Xe(e,se))){Mh(ge,Xe,i,fe);break e}Ae&&Ae(e,le,se),e==="focusout"&&se&&le.type==="number"&&se.memoizedProps.value!=null&&Ya(le,"number",le.value)}switch(Ae=se?ci(se):window,e){case"focusin":(Rh(Ae)||Ae.contentEditable==="true")&&(Sr=Ae,co=se,gs=null);break;case"focusout":gs=co=Sr=null;break;case"mousedown":uo=!0;break;case"contextmenu":case"mouseup":case"dragend":uo=!1,Ph(ge,i,fe);break;case"selectionchange":if(yv)break;case"keydown":case"keyup":Ph(ge,i,fe)}var He;if(so)e:{switch(e){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else yr?Th(e,i)&&(Ve="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ve="onCompositionStart");Ve&&(Eh&&i.locale!=="ko"&&(yr||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&yr&&(He=Sh()):(ui=fe,eo="value"in ui?ui.value:ui.textContent,yr=!0)),Ae=da(se,Ve),0<Ae.length&&(Ve=new wh(Ve,e,null,i,fe),ge.push({event:Ve,listeners:Ae}),He?Ve.data=He:(He=Dh(i),He!==null&&(Ve.data=He)))),(He=cv?uv(e,i):hv(e,i))&&(Ve=da(se,"onBeforeInput"),0<Ve.length&&(Ae=new wh("onBeforeInput","beforeinput",null,i,fe),ge.push({event:Ae,listeners:Ve}),Ae.data=He)),n0(ge,e,se,i,fe)}pp(ge,t)})}function Ps(e,t,i){return{instance:e,listener:t,currentTarget:i}}function da(e,t){for(var i=t+"Capture",l=[];e!==null;){var m=e,C=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||C===null||(m=os(e,i),m!=null&&l.unshift(Ps(e,m,C)),m=os(e,t),m!=null&&l.push(Ps(e,m,C))),e.tag===3)return l;e=e.return}return[]}function l0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function gp(e,t,i,l,m){for(var C=t._reactName,L=[];i!==null&&i!==l;){var U=i,X=U.alternate,se=U.stateNode;if(U=U.tag,X!==null&&X===l)break;U!==5&&U!==26&&U!==27||se===null||(X=se,m?(se=os(i,C),se!=null&&L.unshift(Ps(i,se,X))):m||(se=os(i,C),se!=null&&L.push(Ps(i,se,X)))),i=i.return}L.length!==0&&e.push({event:t,listeners:L})}var a0=/\r\n?/g,o0=/\u0000|\uFFFD/g;function _p(e){return(typeof e=="string"?e:""+e).replace(a0,`
|
|
49
|
-
`).replace(o0,"")}function vp(e,t){return t=_p(t),_p(e)===t}function rt(e,t,i,l,m,C){switch(i){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||gr(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&gr(e,""+l);break;case"className":_l(e,"class",l);break;case"tabIndex":_l(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":_l(e,i,l);break;case"style":_h(e,l,C);break;case"data":if(t!=="object"){_l(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=yl(""+l),e.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof C=="function"&&(i==="formAction"?(t!=="input"&&rt(e,t,"name",m.name,m,null),rt(e,t,"formEncType",m.formEncType,m,null),rt(e,t,"formMethod",m.formMethod,m,null),rt(e,t,"formTarget",m.formTarget,m,null)):(rt(e,t,"encType",m.encType,m,null),rt(e,t,"method",m.method,m,null),rt(e,t,"target",m.target,m,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=yl(""+l),e.setAttribute(i,l);break;case"onClick":l!=null&&(e.onclick=Fn);break;case"onScroll":l!=null&&Pe("scroll",e);break;case"onScrollEnd":l!=null&&Pe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(m.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}i=yl(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""+l):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":l===!0?e.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,l):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(i,l):e.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(i):e.setAttribute(i,l);break;case"popover":Pe("beforetoggle",e),Pe("toggle",e),gl(e,"popover",l);break;case"xlinkActuate":Pn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Pn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Pn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Pn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Pn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Pn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":gl(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=j_.get(i)||i,gl(e,i,l))}}function jc(e,t,i,l,m,C){switch(i){case"style":_h(e,l,C);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(m.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"children":typeof l=="string"?gr(e,l):(typeof l=="number"||typeof l=="bigint")&&gr(e,""+l);break;case"onScroll":l!=null&&Pe("scroll",e);break;case"onScrollEnd":l!=null&&Pe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Fn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Wt.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(m=i.endsWith("Capture"),t=i.slice(2,m?i.length-7:void 0),C=e[qt]||null,C=C!=null?C[i]:null,typeof C=="function"&&e.removeEventListener(t,C,m),typeof l=="function")){typeof C!="function"&&C!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,l,m);break e}i in e?e[i]=l:l===!0?e.setAttribute(i,""):gl(e,i,l)}}}function It(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Pe("error",e),Pe("load",e);var l=!1,m=!1,C;for(C in i)if(i.hasOwnProperty(C)){var L=i[C];if(L!=null)switch(C){case"src":l=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:rt(e,t,C,L,i,null)}}m&&rt(e,t,"srcSet",i.srcSet,i,null),l&&rt(e,t,"src",i.src,i,null);return;case"input":Pe("invalid",e);var U=C=L=m=null,X=null,se=null;for(l in i)if(i.hasOwnProperty(l)){var fe=i[l];if(fe!=null)switch(l){case"name":m=fe;break;case"type":L=fe;break;case"checked":X=fe;break;case"defaultChecked":se=fe;break;case"value":C=fe;break;case"defaultValue":U=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(o(137,t));break;default:rt(e,t,l,fe,i,null)}}dh(e,C,U,X,se,L,m,!1);return;case"select":Pe("invalid",e),l=L=C=null;for(m in i)if(i.hasOwnProperty(m)&&(U=i[m],U!=null))switch(m){case"value":C=U;break;case"defaultValue":L=U;break;case"multiple":l=U;default:rt(e,t,m,U,i,null)}t=C,i=L,e.multiple=!!l,t!=null?mr(e,!!l,t,!1):i!=null&&mr(e,!!l,i,!0);return;case"textarea":Pe("invalid",e),C=m=l=null;for(L in i)if(i.hasOwnProperty(L)&&(U=i[L],U!=null))switch(L){case"value":l=U;break;case"defaultValue":m=U;break;case"children":C=U;break;case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(91));break;default:rt(e,t,L,U,i,null)}mh(e,l,m,C);return;case"option":for(X in i)if(i.hasOwnProperty(X)&&(l=i[X],l!=null))switch(X){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:rt(e,t,X,l,i,null)}return;case"dialog":Pe("beforetoggle",e),Pe("toggle",e),Pe("cancel",e),Pe("close",e);break;case"iframe":case"object":Pe("load",e);break;case"video":case"audio":for(l=0;l<Us.length;l++)Pe(Us[l],e);break;case"image":Pe("error",e),Pe("load",e);break;case"details":Pe("toggle",e);break;case"embed":case"source":case"link":Pe("error",e),Pe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(se in i)if(i.hasOwnProperty(se)&&(l=i[se],l!=null))switch(se){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:rt(e,t,se,l,i,null)}return;default:if(Wa(t)){for(fe in i)i.hasOwnProperty(fe)&&(l=i[fe],l!==void 0&&jc(e,t,fe,l,i,void 0));return}}for(U in i)i.hasOwnProperty(U)&&(l=i[U],l!=null&&rt(e,t,U,l,i,null))}function c0(e,t,i,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,C=null,L=null,U=null,X=null,se=null,fe=null;for(ce in i){var ge=i[ce];if(i.hasOwnProperty(ce)&&ge!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":X=ge;default:l.hasOwnProperty(ce)||rt(e,t,ce,null,l,ge)}}for(var le in l){var ce=l[le];if(ge=i[le],l.hasOwnProperty(le)&&(ce!=null||ge!=null))switch(le){case"type":C=ce;break;case"name":m=ce;break;case"checked":se=ce;break;case"defaultChecked":fe=ce;break;case"value":L=ce;break;case"defaultValue":U=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(o(137,t));break;default:ce!==ge&&rt(e,t,le,ce,l,ge)}}Ka(e,L,U,X,se,fe,C,m);return;case"select":ce=L=U=le=null;for(C in i)if(X=i[C],i.hasOwnProperty(C)&&X!=null)switch(C){case"value":break;case"multiple":ce=X;default:l.hasOwnProperty(C)||rt(e,t,C,null,l,X)}for(m in l)if(C=l[m],X=i[m],l.hasOwnProperty(m)&&(C!=null||X!=null))switch(m){case"value":le=C;break;case"defaultValue":U=C;break;case"multiple":L=C;default:C!==X&&rt(e,t,m,C,l,X)}t=U,i=L,l=ce,le!=null?mr(e,!!i,le,!1):!!l!=!!i&&(t!=null?mr(e,!!i,t,!0):mr(e,!!i,i?[]:"",!1));return;case"textarea":ce=le=null;for(U in i)if(m=i[U],i.hasOwnProperty(U)&&m!=null&&!l.hasOwnProperty(U))switch(U){case"value":break;case"children":break;default:rt(e,t,U,null,l,m)}for(L in l)if(m=l[L],C=i[L],l.hasOwnProperty(L)&&(m!=null||C!=null))switch(L){case"value":le=m;break;case"defaultValue":ce=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(o(91));break;default:m!==C&&rt(e,t,L,m,l,C)}ph(e,le,ce);return;case"option":for(var Ee in i)if(le=i[Ee],i.hasOwnProperty(Ee)&&le!=null&&!l.hasOwnProperty(Ee))switch(Ee){case"selected":e.selected=!1;break;default:rt(e,t,Ee,null,l,le)}for(X in l)if(le=l[X],ce=i[X],l.hasOwnProperty(X)&&le!==ce&&(le!=null||ce!=null))switch(X){case"selected":e.selected=le&&typeof le!="function"&&typeof le!="symbol";break;default:rt(e,t,X,le,l,ce)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Oe in i)le=i[Oe],i.hasOwnProperty(Oe)&&le!=null&&!l.hasOwnProperty(Oe)&&rt(e,t,Oe,null,l,le);for(se in l)if(le=l[se],ce=i[se],l.hasOwnProperty(se)&&le!==ce&&(le!=null||ce!=null))switch(se){case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(o(137,t));break;default:rt(e,t,se,le,l,ce)}return;default:if(Wa(t)){for(var st in i)le=i[st],i.hasOwnProperty(st)&&le!==void 0&&!l.hasOwnProperty(st)&&jc(e,t,st,void 0,l,le);for(fe in l)le=l[fe],ce=i[fe],!l.hasOwnProperty(fe)||le===ce||le===void 0&&ce===void 0||jc(e,t,fe,le,l,ce);return}}for(var ne in i)le=i[ne],i.hasOwnProperty(ne)&&le!=null&&!l.hasOwnProperty(ne)&&rt(e,t,ne,null,l,le);for(ge in l)le=l[ge],ce=i[ge],!l.hasOwnProperty(ge)||le===ce||le==null&&ce==null||rt(e,t,ge,le,l,ce)}function yp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function u0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var m=i[l],C=m.transferSize,L=m.initiatorType,U=m.duration;if(C&&U&&yp(L)){for(L=0,U=m.responseEnd,l+=1;l<i.length;l++){var X=i[l],se=X.startTime;if(se>U)break;var fe=X.transferSize,ge=X.initiatorType;fe&&yp(ge)&&(X=X.responseEnd,L+=fe*(X<U?1:(U-se)/(X-se)))}if(--l,t+=8*(C+L)/(m.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var zc=null,Hc=null;function pa(e){return e.nodeType===9?e:e.ownerDocument}function Sp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function bp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Ic(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Uc=null;function h0(){var e=window.event;return e&&e.type==="popstate"?e===Uc?!1:(Uc=e,!0):(Uc=null,!1)}var Cp=typeof setTimeout=="function"?setTimeout:void 0,f0=typeof clearTimeout=="function"?clearTimeout:void 0,wp=typeof Promise=="function"?Promise:void 0,d0=typeof queueMicrotask=="function"?queueMicrotask:typeof wp<"u"?function(e){return wp.resolve(null).then(e).catch(p0)}:Cp;function p0(e){setTimeout(function(){throw e})}function Ai(e){return e==="head"}function xp(e,t){var i=t,l=0;do{var m=i.nextSibling;if(e.removeChild(i),m&&m.nodeType===8)if(i=m.data,i==="/$"||i==="/&"){if(l===0){e.removeChild(m),Kr(t);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")Fs(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Fs(i);for(var C=i.firstChild;C;){var L=C.nextSibling,U=C.nodeName;C[qi]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&C.rel.toLowerCase()==="stylesheet"||i.removeChild(C),C=L}}else i==="body"&&Fs(e.ownerDocument.body);i=m}while(i);Kr(t)}function Ep(e,t){var i=e;e=0;do{var l=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=l}while(i)}function Pc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Pc(i),as(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function m0(e,t,i,l){for(;e.nodeType===1;){var m=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[qi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(C=e.getAttribute("rel"),C==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(C!==m.rel||e.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||e.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||e.getAttribute("title")!==(m.title==null?null:m.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(C=e.getAttribute("src"),(C!==(m.src==null?null:m.src)||e.getAttribute("type")!==(m.type==null?null:m.type)||e.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&C&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var C=m.name==null?null:""+m.name;if(m.type==="hidden"&&e.getAttribute("name")===C)return e}else return e;if(e=En(e.nextSibling),e===null)break}return null}function g0(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=En(e.nextSibling),e===null))return null;return e}function kp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=En(e.nextSibling),e===null))return null;return e}function Fc(e){return e.data==="$?"||e.data==="$~"}function qc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function _0(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var l=function(){t(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function En(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Vc=null;function Ap(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return En(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function Tp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function Dp(e,t,i){switch(t=pa(i),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Fs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);as(e)}var kn=new Map,Rp=new Set;function ma(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ri=$.d;$.d={f:v0,r:y0,D:S0,C:b0,L:C0,m:w0,X:E0,S:x0,M:k0};function v0(){var e=ri.f(),t=la();return e||t}function y0(e){var t=On(e);t!==null&&t.tag===5&&t.type==="form"?Kf(t):ri.r(e)}var Vr=typeof document>"u"?null:document;function Mp(e,t,i){var l=Vr;if(l&&typeof t=="string"&&t){var m=vn(t);m='link[rel="'+e+'"][href="'+m+'"]',typeof i=="string"&&(m+='[crossorigin="'+i+'"]'),Rp.has(m)||(Rp.add(m),e={rel:e,crossOrigin:i,href:t},l.querySelector(m)===null&&(t=l.createElement("link"),It(t,"link",e),_e(t),l.head.appendChild(t)))}}function S0(e){ri.D(e),Mp("dns-prefetch",e,null)}function b0(e,t){ri.C(e,t),Mp("preconnect",e,t)}function C0(e,t,i){ri.L(e,t,i);var l=Vr;if(l&&e&&t){var m='link[rel="preload"][as="'+vn(t)+'"]';t==="image"&&i&&i.imageSrcSet?(m+='[imagesrcset="'+vn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(m+='[imagesizes="'+vn(i.imageSizes)+'"]')):m+='[href="'+vn(e)+'"]';var C=m;switch(t){case"style":C=Gr(e);break;case"script":C=$r(e)}kn.has(C)||(e=u({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),kn.set(C,e),l.querySelector(m)!==null||t==="style"&&l.querySelector(qs(C))||t==="script"&&l.querySelector(Vs(C))||(t=l.createElement("link"),It(t,"link",e),_e(t),l.head.appendChild(t)))}}function w0(e,t){ri.m(e,t);var i=Vr;if(i&&e){var l=t&&typeof t.as=="string"?t.as:"script",m='link[rel="modulepreload"][as="'+vn(l)+'"][href="'+vn(e)+'"]',C=m;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":C=$r(e)}if(!kn.has(C)&&(e=u({rel:"modulepreload",href:e},t),kn.set(C,e),i.querySelector(m)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Vs(C)))return}l=i.createElement("link"),It(l,"link",e),_e(l),i.head.appendChild(l)}}}function x0(e,t,i){ri.S(e,t,i);var l=Vr;if(l&&e){var m=ee(l).hoistableStyles,C=Gr(e);t=t||"default";var L=m.get(C);if(!L){var U={loading:0,preload:null};if(L=l.querySelector(qs(C)))U.loading=5;else{e=u({rel:"stylesheet",href:e,"data-precedence":t},i),(i=kn.get(C))&&Gc(e,i);var X=L=l.createElement("link");_e(X),It(X,"link",e),X._p=new Promise(function(se,fe){X.onload=se,X.onerror=fe}),X.addEventListener("load",function(){U.loading|=1}),X.addEventListener("error",function(){U.loading|=2}),U.loading|=4,ga(L,t,l)}L={type:"stylesheet",instance:L,count:1,state:U},m.set(C,L)}}}function E0(e,t){ri.X(e,t);var i=Vr;if(i&&e){var l=ee(i).hoistableScripts,m=$r(e),C=l.get(m);C||(C=i.querySelector(Vs(m)),C||(e=u({src:e,async:!0},t),(t=kn.get(m))&&$c(e,t),C=i.createElement("script"),_e(C),It(C,"link",e),i.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},l.set(m,C))}}function k0(e,t){ri.M(e,t);var i=Vr;if(i&&e){var l=ee(i).hoistableScripts,m=$r(e),C=l.get(m);C||(C=i.querySelector(Vs(m)),C||(e=u({src:e,async:!0,type:"module"},t),(t=kn.get(m))&&$c(e,t),C=i.createElement("script"),_e(C),It(C,"link",e),i.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},l.set(m,C))}}function Lp(e,t,i,l){var m=(m=me.current)?ma(m):null;if(!m)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Gr(i.href),i=ee(m).hoistableStyles,l=i.get(t),l||(l={type:"style",instance:null,count:0,state:null},i.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Gr(i.href);var C=ee(m).hoistableStyles,L=C.get(e);if(L||(m=m.ownerDocument||m,L={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},C.set(e,L),(C=m.querySelector(qs(e)))&&!C._p&&(L.instance=C,L.state.loading=5),kn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},kn.set(e,i),C||A0(m,e,i,L.state))),t&&l===null)throw Error(o(528,""));return L}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=$r(i),i=ee(m).hoistableScripts,l=i.get(t),l||(l={type:"script",instance:null,count:0,state:null},i.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Gr(e){return'href="'+vn(e)+'"'}function qs(e){return'link[rel="stylesheet"]['+e+"]"}function Op(e){return u({},e,{"data-precedence":e.precedence,precedence:null})}function A0(e,t,i,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),It(t,"link",i),_e(t),e.head.appendChild(t))}function $r(e){return'[src="'+vn(e)+'"]'}function Vs(e){return"script[async]"+e}function Bp(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+vn(i.href)+'"]');if(l)return t.instance=l,_e(l),l;var m=u({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),_e(l),It(l,"style",m),ga(l,i.precedence,e),t.instance=l;case"stylesheet":m=Gr(i.href);var C=e.querySelector(qs(m));if(C)return t.state.loading|=4,t.instance=C,_e(C),C;l=Op(i),(m=kn.get(m))&&Gc(l,m),C=(e.ownerDocument||e).createElement("link"),_e(C);var L=C;return L._p=new Promise(function(U,X){L.onload=U,L.onerror=X}),It(C,"link",l),t.state.loading|=4,ga(C,i.precedence,e),t.instance=C;case"script":return C=$r(i.src),(m=e.querySelector(Vs(C)))?(t.instance=m,_e(m),m):(l=i,(m=kn.get(C))&&(l=u({},i),$c(l,m)),e=e.ownerDocument||e,m=e.createElement("script"),_e(m),It(m,"link",l),e.head.appendChild(m),t.instance=m);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,ga(l,i.precedence,e));return t.instance}function ga(e,t,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=l.length?l[l.length-1]:null,C=m,L=0;L<l.length;L++){var U=l[L];if(U.dataset.precedence===t)C=U;else if(C!==m)break}C?C.parentNode.insertBefore(e,C.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Gc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function $c(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var _a=null;function Np(e,t,i){if(_a===null){var l=new Map,m=_a=new Map;m.set(i,l)}else m=_a,l=m.get(i),l||(l=new Map,m.set(i,l));if(l.has(e))return l;for(l.set(e,null),i=i.getElementsByTagName(e),m=0;m<i.length;m++){var C=i[m];if(!(C[qi]||C[vt]||e==="link"&&C.getAttribute("rel")==="stylesheet")&&C.namespaceURI!=="http://www.w3.org/2000/svg"){var L=C.getAttribute(t)||"";L=e+L;var U=l.get(L);U?U.push(C):l.set(L,[C])}}return l}function jp(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function T0(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function zp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function D0(e,t,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var m=Gr(l.href),C=t.querySelector(qs(m));if(C){t=C._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=va.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=C,_e(C);return}C=t.ownerDocument||t,l=Op(l),(m=kn.get(m))&&Gc(l,m),C=C.createElement("link"),_e(C);var L=C;L._p=new Promise(function(U,X){L.onload=U,L.onerror=X}),It(C,"link",l),i.instance=C}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=va.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Kc=0;function R0(e,t){return e.stylesheets&&e.count===0&&Sa(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var l=setTimeout(function(){if(e.stylesheets&&Sa(e,e.stylesheets),e.unsuspend){var C=e.unsuspend;e.unsuspend=null,C()}},6e4+t);0<e.imgBytes&&Kc===0&&(Kc=62500*u0());var m=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Sa(e,e.stylesheets),e.unsuspend)){var C=e.unsuspend;e.unsuspend=null,C()}},(e.imgBytes>Kc?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(m)}}:null}function va(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Sa(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ya=null;function Sa(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ya=new Map,t.forEach(M0,e),ya=null,va.call(e))}function M0(e,t){if(!(t.state.loading&4)){var i=ya.get(e);if(i)var l=i.get(null);else{i=new Map,ya.set(e,i);for(var m=e.querySelectorAll("link[data-precedence],style[data-precedence]"),C=0;C<m.length;C++){var L=m[C];(L.nodeName==="LINK"||L.getAttribute("media")!=="not all")&&(i.set(L.dataset.precedence,L),l=L)}l&&i.set(null,l)}m=t.instance,L=m.getAttribute("data-precedence"),C=i.get(L)||l,C===l&&i.set(null,m),i.set(L,m),this.count++,l=va.bind(this),m.addEventListener("load",l),m.addEventListener("error",l),C?C.parentNode.insertBefore(m,C.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(m,e.firstChild)),t.state.loading|=4}}var Gs={$$typeof:y,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function L0(e,t,i,l,m,C,L,U,X){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ii(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ii(0),this.hiddenUpdates=Ii(null),this.identifierPrefix=l,this.onUncaughtError=m,this.onCaughtError=C,this.onRecoverableError=L,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function Hp(e,t,i,l,m,C,L,U,X,se,fe,ge){return e=new L0(e,t,i,L,X,se,fe,ge,U),t=1,C===!0&&(t|=24),C=cn(3,null,null,t),e.current=C,C.stateNode=e,t=ko(),t.refCount++,e.pooledCache=t,t.refCount++,C.memoizedState={element:l,isDehydrated:i,cache:t},Ro(C),e}function Ip(e){return e?(e=wr,e):wr}function Up(e,t,i,l,m,C){m=Ip(m),l.context===null?l.context=m:l.pendingContext=m,l=gi(t),l.payload={element:i},C=C===void 0?null:C,C!==null&&(l.callback=C),i=_i(e,l,t),i!==null&&(rn(i,e,t),ws(i,e,t))}function Pp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Yc(e,t){Pp(e,t),(e=e.alternate)&&Pp(e,t)}function Fp(e){if(e.tag===13||e.tag===31){var t=Yi(e,67108864);t!==null&&rn(t,e,67108864),Yc(e,67108864)}}function qp(e){if(e.tag===13||e.tag===31){var t=pn();t=ss(t);var i=Yi(e,t);i!==null&&rn(i,e,t),Yc(e,t)}}var ba=!0;function O0(e,t,i,l){var m=G.T;G.T=null;var C=$.p;try{$.p=2,Wc(e,t,i,l)}finally{$.p=C,G.T=m}}function B0(e,t,i,l){var m=G.T;G.T=null;var C=$.p;try{$.p=8,Wc(e,t,i,l)}finally{$.p=C,G.T=m}}function Wc(e,t,i,l){if(ba){var m=Xc(l);if(m===null)Nc(e,t,l,Ca,i),Gp(e,l);else if(j0(m,e,t,i,l))l.stopPropagation();else if(Gp(e,l),t&4&&-1<N0.indexOf(e)){for(;m!==null;){var C=On(m);if(C!==null)switch(C.tag){case 3:if(C=C.stateNode,C.current.memoizedState.isDehydrated){var L=Un(C.pendingLanes);if(L!==0){var U=C;for(U.pendingLanes|=2,U.entangledLanes|=2;L;){var X=1<<31-xe(L);U.entanglements[1]|=X,L&=~X}zn(C),(Ze&6)===0&&(ra=et()+500,Is(0))}}break;case 31:case 13:U=Yi(C,2),U!==null&&rn(U,C,2),la(),Yc(C,2)}if(C=Xc(l),C===null&&Nc(e,t,l,Ca,i),C===m)break;m=C}m!==null&&l.stopPropagation()}else Nc(e,t,l,null,i)}}function Xc(e){return e=Qa(e),Qc(e)}var Ca=null;function Qc(e){if(Ca=null,e=oi(e),e!==null){var t=v(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=f(t),e!==null)return e;e=null}else if(i===31){if(e=a(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ca=e,null}function Vp(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Mt()){case he:return 2;case ye:return 8;case ke:case Re:return 32;case Be:return 268435456;default:return 32}default:return 32}}var Zc=!1,Ti=null,Di=null,Ri=null,$s=new Map,Ks=new Map,Mi=[],N0="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Gp(e,t){switch(e){case"focusin":case"focusout":Ti=null;break;case"dragenter":case"dragleave":Di=null;break;case"mouseover":case"mouseout":Ri=null;break;case"pointerover":case"pointerout":$s.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ks.delete(t.pointerId)}}function Ys(e,t,i,l,m,C){return e===null||e.nativeEvent!==C?(e={blockedOn:t,domEventName:i,eventSystemFlags:l,nativeEvent:C,targetContainers:[m]},t!==null&&(t=On(t),t!==null&&Fp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,m!==null&&t.indexOf(m)===-1&&t.push(m),e)}function j0(e,t,i,l,m){switch(t){case"focusin":return Ti=Ys(Ti,e,t,i,l,m),!0;case"dragenter":return Di=Ys(Di,e,t,i,l,m),!0;case"mouseover":return Ri=Ys(Ri,e,t,i,l,m),!0;case"pointerover":var C=m.pointerId;return $s.set(C,Ys($s.get(C)||null,e,t,i,l,m)),!0;case"gotpointercapture":return C=m.pointerId,Ks.set(C,Ys(Ks.get(C)||null,e,t,i,l,m)),!0}return!1}function $p(e){var t=oi(e.target);if(t!==null){var i=v(t);if(i!==null){if(t=i.tag,t===13){if(t=f(i),t!==null){e.blockedOn=t,Pi(e.priority,function(){qp(i)});return}}else if(t===31){if(t=a(i),t!==null){e.blockedOn=t,Pi(e.priority,function(){qp(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function wa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Xc(e.nativeEvent);if(i===null){i=e.nativeEvent;var l=new i.constructor(i.type,i);Xa=l,i.target.dispatchEvent(l),Xa=null}else return t=On(i),t!==null&&Fp(t),e.blockedOn=i,!1;t.shift()}return!0}function Kp(e,t,i){wa(e)&&i.delete(t)}function z0(){Zc=!1,Ti!==null&&wa(Ti)&&(Ti=null),Di!==null&&wa(Di)&&(Di=null),Ri!==null&&wa(Ri)&&(Ri=null),$s.forEach(Kp),Ks.forEach(Kp)}function xa(e,t){e.blockedOn===t&&(e.blockedOn=null,Zc||(Zc=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,z0)))}var Ea=null;function Yp(e){Ea!==e&&(Ea=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Ea===e&&(Ea=null);for(var t=0;t<e.length;t+=3){var i=e[t],l=e[t+1],m=e[t+2];if(typeof l!="function"){if(Qc(l||i)===null)continue;break}var C=On(i);C!==null&&(e.splice(t,3),t-=3,Xo(C,{pending:!0,data:m,method:i.method,action:l},l,m))}}))}function Kr(e){function t(X){return xa(X,e)}Ti!==null&&xa(Ti,e),Di!==null&&xa(Di,e),Ri!==null&&xa(Ri,e),$s.forEach(t),Ks.forEach(t);for(var i=0;i<Mi.length;i++){var l=Mi[i];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Mi.length&&(i=Mi[0],i.blockedOn===null);)$p(i),i.blockedOn===null&&Mi.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var m=i[l],C=i[l+1],L=m[qt]||null;if(typeof C=="function")L||Yp(i);else if(L){var U=null;if(C&&C.hasAttribute("formAction")){if(m=C,L=C[qt]||null)U=L.formAction;else if(Qc(m)!==null)continue}else U=L.action;typeof U=="function"?i[l+1]=U:(i.splice(l,3),l-=3),Yp(i)}}}function Wp(){function e(C){C.canIntercept&&C.info==="react-transition"&&C.intercept({handler:function(){return new Promise(function(L){return m=L})},focusReset:"manual",scroll:"manual"})}function t(){m!==null&&(m(),m=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var C=navigation.currentEntry;C&&C.url!=null&&navigation.navigate(C.url,{state:C.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,m=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),m!==null&&(m(),m=null)}}}function Jc(e){this._internalRoot=e}ka.prototype.render=Jc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var i=t.current,l=pn();Up(i,l,e,t,null,null)},ka.prototype.unmount=Jc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Up(e.current,2,null,e,null,null),la(),t[Ln]=null}};function ka(e){this._internalRoot=e}ka.prototype.unstable_scheduleHydration=function(e){if(e){var t=ai();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Mi.length&&t!==0&&t<Mi[i].priority;i++);Mi.splice(i,0,e),i===0&&$p(e)}};var Xp=r.version;if(Xp!=="19.2.6")throw Error(o(527,Xp,"19.2.6"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=h(t),e=e!==null?d(e):null,e=e===null?null:e.stateNode,e};var H0={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Aa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Aa.isDisabled&&Aa.supportsFiber)try{ft=Aa.inject(H0),We=Aa}catch{}}return Xs.createRoot=function(e,t){if(!p(e))throw Error(o(299));var i=!1,l="",m=id,C=rd,L=sd;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(m=t.onUncaughtError),t.onCaughtError!==void 0&&(C=t.onCaughtError),t.onRecoverableError!==void 0&&(L=t.onRecoverableError)),t=Hp(e,1,!1,null,null,i,l,null,m,C,L,Wp),e[Ln]=t.current,Bc(e),new Jc(t)},Xs.hydrateRoot=function(e,t,i){if(!p(e))throw Error(o(299));var l=!1,m="",C=id,L=rd,U=sd,X=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(m=i.identifierPrefix),i.onUncaughtError!==void 0&&(C=i.onUncaughtError),i.onCaughtError!==void 0&&(L=i.onCaughtError),i.onRecoverableError!==void 0&&(U=i.onRecoverableError),i.formState!==void 0&&(X=i.formState)),t=Hp(e,1,!0,t,i??null,l,m,X,C,L,U,Wp),t.context=Ip(null),i=t.current,l=pn(),l=ss(l),m=gi(l),m.callback=null,_i(i,m,l),i=l,t.current.lanes=i,Ui(t,i),zn(t),e[Ln]=t.current,Bc(e),new ka(t)},Xs.version="19.2.6",Xs}var am;function X0(){if(am)return nu.exports;am=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),nu.exports=W0(),nu.exports}var Q0=X0();const ts=function(n,r){let p=n;const v=tl[r];let f=null,a=0,c=null;const h=[],d={},u=function(T,k){a=p*4+17,f=(function(R){const N=new Array(R);for(let I=0;I<R;I+=1){N[I]=new Array(R);for(let P=0;P<R;P+=1)N[I][P]=null}return N})(a),b(0,0),b(a-7,0),b(0,a-7),x(),E(),_(T,k),p>=7&&S(T),c==null&&(c=A(p,v,h)),g(c,k)},b=function(T,k){for(let R=-1;R<=7;R+=1)if(!(T+R<=-1||a<=T+R))for(let N=-1;N<=7;N+=1)k+N<=-1||a<=k+N||(0<=R&&R<=6&&(N==0||N==6)||0<=N&&N<=6&&(R==0||R==6)||2<=R&&R<=4&&2<=N&&N<=4?f[T+R][k+N]=!0:f[T+R][k+N]=!1)},w=function(){let T=0,k=0;for(let R=0;R<8;R+=1){u(!0,R);const N=Bi.getLostPoint(d);(R==0||T>N)&&(T=N,k=R)}return k},E=function(){for(let T=8;T<a-8;T+=1)f[T][6]==null&&(f[T][6]=T%2==0);for(let T=8;T<a-8;T+=1)f[6][T]==null&&(f[6][T]=T%2==0)},x=function(){const T=Bi.getPatternPosition(p);for(let k=0;k<T.length;k+=1)for(let R=0;R<T.length;R+=1){const N=T[k],I=T[R];if(f[N][I]==null)for(let P=-2;P<=2;P+=1)for(let F=-2;F<=2;F+=1)P==-2||P==2||F==-2||F==2||P==0&&F==0?f[N+P][I+F]=!0:f[N+P][I+F]=!1}},S=function(T){const k=Bi.getBCHTypeNumber(p);for(let R=0;R<18;R+=1){const N=!T&&(k>>R&1)==1;f[Math.floor(R/3)][R%3+a-8-3]=N}for(let R=0;R<18;R+=1){const N=!T&&(k>>R&1)==1;f[R%3+a-8-3][Math.floor(R/3)]=N}},_=function(T,k){const R=v<<3|k,N=Bi.getBCHTypeInfo(R);for(let I=0;I<15;I+=1){const P=!T&&(N>>I&1)==1;I<6?f[I][8]=P:I<8?f[I+1][8]=P:f[a-15+I][8]=P}for(let I=0;I<15;I+=1){const P=!T&&(N>>I&1)==1;I<8?f[8][a-I-1]=P:I<9?f[8][15-I-1+1]=P:f[8][15-I-1]=P}f[a-8][8]=!T},g=function(T,k){let R=-1,N=a-1,I=7,P=0;const F=Bi.getMaskFunction(k);for(let K=a-1;K>0;K-=2)for(K==6&&(K-=1);;){for(let W=0;W<2;W+=1)if(f[N][K-W]==null){let G=!1;P<T.length&&(G=(T[P]>>>I&1)==1),F(N,K-W)&&(G=!G),f[N][K-W]=G,I-=1,I==-1&&(P+=1,I=7)}if(N+=R,N<0||a<=N){N-=R,R=-R;break}}},y=function(T,k){let R=0,N=0,I=0;const P=new Array(k.length),F=new Array(k.length);for(let $=0;$<k.length;$+=1){const J=k[$].dataCount,H=k[$].totalCount-J;N=Math.max(N,J),I=Math.max(I,H),P[$]=new Array(J);for(let j=0;j<P[$].length;j+=1)P[$][j]=255&T.getBuffer()[j+R];R+=J;const B=Bi.getErrorCorrectPolynomial(H),V=sl(P[$],B.getLength()-1).mod(B);F[$]=new Array(B.getLength()-1);for(let j=0;j<F[$].length;j+=1){const te=j+V.getLength()-F[$].length;F[$][j]=te>=0?V.getAt(te):0}}let K=0;for(let $=0;$<k.length;$+=1)K+=k[$].totalCount;const W=new Array(K);let G=0;for(let $=0;$<N;$+=1)for(let J=0;J<k.length;J+=1)$<P[J].length&&(W[G]=P[J][$],G+=1);for(let $=0;$<I;$+=1)for(let J=0;J<k.length;J+=1)$<F[J].length&&(W[G]=F[J][$],G+=1);return W},A=function(T,k,R){const N=om.getRSBlocks(T,k),I=cm();for(let F=0;F<R.length;F+=1){const K=R[F];I.put(K.getMode(),4),I.put(K.getLength(),Bi.getLengthInBits(K.getMode(),T)),K.write(I)}let P=0;for(let F=0;F<N.length;F+=1)P+=N[F].dataCount;if(I.getLengthInBits()>P*8)throw"code length overflow. ("+I.getLengthInBits()+">"+P*8+")";for(I.getLengthInBits()+4<=P*8&&I.put(0,4);I.getLengthInBits()%8!=0;)I.putBit(!1);for(;!(I.getLengthInBits()>=P*8||(I.put(236,8),I.getLengthInBits()>=P*8));)I.put(17,8);return y(I,N)};d.addData=function(T,k){k=k||"Byte";let R=null;switch(k){case"Numeric":R=Z0(T);break;case"Alphanumeric":R=J0(T);break;case"Byte":R=e1(T);break;case"Kanji":R=t1(T);break;default:throw"mode:"+k}h.push(R),c=null},d.isDark=function(T,k){if(T<0||a<=T||k<0||a<=k)throw T+","+k;return f[T][k]},d.getModuleCount=function(){return a},d.make=function(){if(p<1){let T=1;for(;T<40;T++){const k=om.getRSBlocks(T,v),R=cm();for(let I=0;I<h.length;I++){const P=h[I];R.put(P.getMode(),4),R.put(P.getLength(),Bi.getLengthInBits(P.getMode(),T)),P.write(R)}let N=0;for(let I=0;I<k.length;I++)N+=k[I].dataCount;if(R.getLengthInBits()<=N*8)break}p=T}u(!1,w())},d.createTableTag=function(T,k){T=T||2,k=typeof k>"u"?T*4:k;let R="";R+='<table style="',R+=" border-width: 0px; border-style: none;",R+=" border-collapse: collapse;",R+=" padding: 0px; margin: "+k+"px;",R+='">',R+="<tbody>";for(let N=0;N<d.getModuleCount();N+=1){R+="<tr>";for(let I=0;I<d.getModuleCount();I+=1)R+='<td style="',R+=" border-width: 0px; border-style: none;",R+=" border-collapse: collapse;",R+=" padding: 0px; margin: 0px;",R+=" width: "+T+"px;",R+=" height: "+T+"px;",R+=" background-color: ",R+=d.isDark(N,I)?"#000000":"#ffffff",R+=";",R+='"/>';R+="</tr>"}return R+="</tbody>",R+="</table>",R},d.createSvgTag=function(T,k,R,N){let I={};typeof arguments[0]=="object"&&(I=arguments[0],T=I.cellSize,k=I.margin,R=I.alt,N=I.title),T=T||2,k=typeof k>"u"?T*4:k,R=typeof R=="string"?{text:R}:R||{},R.text=R.text||null,R.id=R.text?R.id||"qrcode-description":null,N=typeof N=="string"?{text:N}:N||{},N.text=N.text||null,N.id=N.text?N.id||"qrcode-title":null;const P=d.getModuleCount()*T+k*2;let F,K,W,G,$="",J;for(J="l"+T+",0 0,"+T+" -"+T+",0 0,-"+T+"z ",$+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',$+=I.scalable?"":' width="'+P+'px" height="'+P+'px"',$+=' viewBox="0 0 '+P+" "+P+'" ',$+=' preserveAspectRatio="xMinYMin meet"',$+=N.text||R.text?' role="img" aria-labelledby="'+M([N.id,R.id].join(" ").trim())+'"':"",$+=">",$+=N.text?'<title id="'+M(N.id)+'">'+M(N.text)+"</title>":"",$+=R.text?'<description id="'+M(R.id)+'">'+M(R.text)+"</description>":"",$+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',$+='<path d="',W=0;W<d.getModuleCount();W+=1)for(G=W*T+k,F=0;F<d.getModuleCount();F+=1)d.isDark(W,F)&&(K=F*T+k,$+="M"+K+","+G+J);return $+='" stroke="transparent" fill="black"/>',$+="</svg>",$},d.createDataURL=function(T,k){T=T||2,k=typeof k>"u"?T*4:k;const R=d.getModuleCount()*T+k*2,N=k,I=R-k;return s1(R,R,function(P,F){if(N<=P&&P<I&&N<=F&&F<I){const K=Math.floor((P-N)/T),W=Math.floor((F-N)/T);return d.isDark(W,K)?0:1}else return 1})},d.createImgTag=function(T,k,R){T=T||2,k=typeof k>"u"?T*4:k;const N=d.getModuleCount()*T+k*2;let I="";return I+="<img",I+=' src="',I+=d.createDataURL(T,k),I+='"',I+=' width="',I+=N,I+='"',I+=' height="',I+=N,I+='"',R&&(I+=' alt="',I+=M(R),I+='"'),I+="/>",I};const M=function(T){let k="";for(let R=0;R<T.length;R+=1){const N=T.charAt(R);switch(N){case"<":k+="<";break;case">":k+=">";break;case"&":k+="&";break;case'"':k+=""";break;default:k+=N;break}}return k},D=function(T){T=typeof T>"u"?2:T;const R=d.getModuleCount()*1+T*2,N=T,I=R-T;let P,F,K,W,G;const $={"██":"█","█ ":"▀"," █":"▄"," ":" "},J={"██":"▀","█ ":"▀"," █":" "," ":" "};let H="";for(P=0;P<R;P+=2){for(K=Math.floor((P-N)/1),W=Math.floor((P+1-N)/1),F=0;F<R;F+=1)G="█",N<=F&&F<I&&N<=P&&P<I&&d.isDark(K,Math.floor((F-N)/1))&&(G=" "),N<=F&&F<I&&N<=P+1&&P+1<I&&d.isDark(W,Math.floor((F-N)/1))?G+=" ":G+="█",H+=T<1&&P+1>=I?J[G]:$[G];H+=`
|
|
50
|
-
`}return R%2&&T>0?H.substring(0,H.length-R-1)+Array(R+1).join("▀"):H.substring(0,H.length-1)};return
|
|
51
|
-
`}return J.substring(0,J.length-1)},d.renderTo2dContext=function(T,k){k=k||2;const R=d.getModuleCount();for(let N=0;N<R;N++)for(let I=0;I<R;I++)T.fillStyle=d.isDark(N,I)?"black":"white",T.fillRect(I*k,N*k,k,k)},d};ts.stringToBytes=function(n){const r=[];for(let s=0;s<n.length;s+=1){const o=n.charCodeAt(s);r.push(o&255)}return r};ts.createStringToBytes=function(n,r){const s=(function(){const p=i1(n),v=function(){const c=p.read();if(c==-1)throw"eof";return c};let f=0;const a={};for(;;){const c=p.read();if(c==-1)break;const h=v(),d=v(),u=v(),b=String.fromCharCode(c<<8|h),w=d<<8|u;a[b]=w,f+=1}if(f!=r)throw f+" != "+r;return a})(),o=63;return function(p){const v=[];for(let f=0;f<p.length;f+=1){const a=p.charCodeAt(f);if(a<128)v.push(a);else{const c=s[p.charAt(f)];typeof c=="number"?(c&255)==c?v.push(c):(v.push(c>>>8),v.push(c&255)):v.push(o)}}return v}};const Gt={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},tl={L:1,M:0,Q:3,H:2},Oi={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},Bi=(function(){const n=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],r=1335,s=7973,o=21522,p={},v=function(f){let a=0;for(;f!=0;)a+=1,f>>>=1;return a};return p.getBCHTypeInfo=function(f){let a=f<<10;for(;v(a)-v(r)>=0;)a^=r<<v(a)-v(r);return(f<<10|a)^o},p.getBCHTypeNumber=function(f){let a=f<<12;for(;v(a)-v(s)>=0;)a^=s<<v(a)-v(s);return f<<12|a},p.getPatternPosition=function(f){return n[f-1]},p.getMaskFunction=function(f){switch(f){case Oi.PATTERN000:return function(a,c){return(a+c)%2==0};case Oi.PATTERN001:return function(a,c){return a%2==0};case Oi.PATTERN010:return function(a,c){return c%3==0};case Oi.PATTERN011:return function(a,c){return(a+c)%3==0};case Oi.PATTERN100:return function(a,c){return(Math.floor(a/2)+Math.floor(c/3))%2==0};case Oi.PATTERN101:return function(a,c){return a*c%2+a*c%3==0};case Oi.PATTERN110:return function(a,c){return(a*c%2+a*c%3)%2==0};case Oi.PATTERN111:return function(a,c){return(a*c%3+(a+c)%2)%2==0};default:throw"bad maskPattern:"+f}},p.getErrorCorrectPolynomial=function(f){let a=sl([1],0);for(let c=0;c<f;c+=1)a=a.multiply(sl([1,ji.gexp(c)],0));return a},p.getLengthInBits=function(f,a){if(1<=a&&a<10)switch(f){case Gt.MODE_NUMBER:return 10;case Gt.MODE_ALPHA_NUM:return 9;case Gt.MODE_8BIT_BYTE:return 8;case Gt.MODE_KANJI:return 8;default:throw"mode:"+f}else if(a<27)switch(f){case Gt.MODE_NUMBER:return 12;case Gt.MODE_ALPHA_NUM:return 11;case Gt.MODE_8BIT_BYTE:return 16;case Gt.MODE_KANJI:return 10;default:throw"mode:"+f}else if(a<41)switch(f){case Gt.MODE_NUMBER:return 14;case Gt.MODE_ALPHA_NUM:return 13;case Gt.MODE_8BIT_BYTE:return 16;case Gt.MODE_KANJI:return 12;default:throw"mode:"+f}else throw"type:"+a},p.getLostPoint=function(f){const a=f.getModuleCount();let c=0;for(let u=0;u<a;u+=1)for(let b=0;b<a;b+=1){let w=0;const E=f.isDark(u,b);for(let x=-1;x<=1;x+=1)if(!(u+x<0||a<=u+x))for(let S=-1;S<=1;S+=1)b+S<0||a<=b+S||x==0&&S==0||E==f.isDark(u+x,b+S)&&(w+=1);w>5&&(c+=3+w-5)}for(let u=0;u<a-1;u+=1)for(let b=0;b<a-1;b+=1){let w=0;f.isDark(u,b)&&(w+=1),f.isDark(u+1,b)&&(w+=1),f.isDark(u,b+1)&&(w+=1),f.isDark(u+1,b+1)&&(w+=1),(w==0||w==4)&&(c+=3)}for(let u=0;u<a;u+=1)for(let b=0;b<a-6;b+=1)f.isDark(u,b)&&!f.isDark(u,b+1)&&f.isDark(u,b+2)&&f.isDark(u,b+3)&&f.isDark(u,b+4)&&!f.isDark(u,b+5)&&f.isDark(u,b+6)&&(c+=40);for(let u=0;u<a;u+=1)for(let b=0;b<a-6;b+=1)f.isDark(b,u)&&!f.isDark(b+1,u)&&f.isDark(b+2,u)&&f.isDark(b+3,u)&&f.isDark(b+4,u)&&!f.isDark(b+5,u)&&f.isDark(b+6,u)&&(c+=40);let h=0;for(let u=0;u<a;u+=1)for(let b=0;b<a;b+=1)f.isDark(b,u)&&(h+=1);const d=Math.abs(100*h/a/a-50)/5;return c+=d*10,c},p})(),ji=(function(){const n=new Array(256),r=new Array(256);for(let o=0;o<8;o+=1)n[o]=1<<o;for(let o=8;o<256;o+=1)n[o]=n[o-4]^n[o-5]^n[o-6]^n[o-8];for(let o=0;o<255;o+=1)r[n[o]]=o;const s={};return s.glog=function(o){if(o<1)throw"glog("+o+")";return r[o]},s.gexp=function(o){for(;o<0;)o+=255;for(;o>=256;)o-=255;return n[o]},s})(),sl=function(n,r){if(typeof n.length>"u")throw n.length+"/"+r;const s=(function(){let p=0;for(;p<n.length&&n[p]==0;)p+=1;const v=new Array(n.length-p+r);for(let f=0;f<n.length-p;f+=1)v[f]=n[f+p];return v})(),o={};return o.getAt=function(p){return s[p]},o.getLength=function(){return s.length},o.multiply=function(p){const v=new Array(o.getLength()+p.getLength()-1);for(let f=0;f<o.getLength();f+=1)for(let a=0;a<p.getLength();a+=1)v[f+a]^=ji.gexp(ji.glog(o.getAt(f))+ji.glog(p.getAt(a)));return sl(v,0)},o.mod=function(p){if(o.getLength()-p.getLength()<0)return o;const v=ji.glog(o.getAt(0))-ji.glog(p.getAt(0)),f=new Array(o.getLength());for(let a=0;a<o.getLength();a+=1)f[a]=o.getAt(a);for(let a=0;a<p.getLength();a+=1)f[a]^=ji.gexp(ji.glog(p.getAt(a))+v);return sl(f,0).mod(p)},o},om=(function(){const n=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],r=function(p,v){const f={};return f.totalCount=p,f.dataCount=v,f},s={},o=function(p,v){switch(v){case tl.L:return n[(p-1)*4+0];case tl.M:return n[(p-1)*4+1];case tl.Q:return n[(p-1)*4+2];case tl.H:return n[(p-1)*4+3];default:return}};return s.getRSBlocks=function(p,v){const f=o(p,v);if(typeof f>"u")throw"bad rs block @ typeNumber:"+p+"/errorCorrectionLevel:"+v;const a=f.length/3,c=[];for(let h=0;h<a;h+=1){const d=f[h*3+0],u=f[h*3+1],b=f[h*3+2];for(let w=0;w<d;w+=1)c.push(r(u,b))}return c},s})(),cm=function(){const n=[];let r=0;const s={};return s.getBuffer=function(){return n},s.getAt=function(o){const p=Math.floor(o/8);return(n[p]>>>7-o%8&1)==1},s.put=function(o,p){for(let v=0;v<p;v+=1)s.putBit((o>>>p-v-1&1)==1)},s.getLengthInBits=function(){return r},s.putBit=function(o){const p=Math.floor(r/8);n.length<=p&&n.push(0),o&&(n[p]|=128>>>r%8),r+=1},s},Z0=function(n){const r=Gt.MODE_NUMBER,s=n,o={};o.getMode=function(){return r},o.getLength=function(f){return s.length},o.write=function(f){const a=s;let c=0;for(;c+2<a.length;)f.put(p(a.substring(c,c+3)),10),c+=3;c<a.length&&(a.length-c==1?f.put(p(a.substring(c,c+1)),4):a.length-c==2&&f.put(p(a.substring(c,c+2)),7))};const p=function(f){let a=0;for(let c=0;c<f.length;c+=1)a=a*10+v(f.charAt(c));return a},v=function(f){if("0"<=f&&f<="9")return f.charCodeAt(0)-48;throw"illegal char :"+f};return o},J0=function(n){const r=Gt.MODE_ALPHA_NUM,s=n,o={};o.getMode=function(){return r},o.getLength=function(v){return s.length},o.write=function(v){const f=s;let a=0;for(;a+1<f.length;)v.put(p(f.charAt(a))*45+p(f.charAt(a+1)),11),a+=2;a<f.length&&v.put(p(f.charAt(a)),6)};const p=function(v){if("0"<=v&&v<="9")return v.charCodeAt(0)-48;if("A"<=v&&v<="Z")return v.charCodeAt(0)-65+10;switch(v){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+v}};return o},e1=function(n){const r=Gt.MODE_8BIT_BYTE,s=ts.stringToBytes(n),o={};return o.getMode=function(){return r},o.getLength=function(p){return s.length},o.write=function(p){for(let v=0;v<s.length;v+=1)p.put(s[v],8)},o},t1=function(n){const r=Gt.MODE_KANJI,s=ts.stringToBytes;(function(v,f){const a=s(v);if(a.length!=2||(a[0]<<8|a[1])!=f)throw"sjis not supported."})("友",38726);const o=s(n),p={};return p.getMode=function(){return r},p.getLength=function(v){return~~(o.length/2)},p.write=function(v){const f=o;let a=0;for(;a+1<f.length;){let c=(255&f[a])<<8|255&f[a+1];if(33088<=c&&c<=40956)c-=33088;else if(57408<=c&&c<=60351)c-=49472;else throw"illegal char at "+(a+1)+"/"+c;c=(c>>>8&255)*192+(c&255),v.put(c,13),a+=2}if(a<f.length)throw"illegal char at "+(a+1)},p},hg=function(){const n=[],r={};return r.writeByte=function(s){n.push(s&255)},r.writeShort=function(s){r.writeByte(s),r.writeByte(s>>>8)},r.writeBytes=function(s,o,p){o=o||0,p=p||s.length;for(let v=0;v<p;v+=1)r.writeByte(s[v+o])},r.writeString=function(s){for(let o=0;o<s.length;o+=1)r.writeByte(s.charCodeAt(o))},r.toByteArray=function(){return n},r.toString=function(){let s="";s+="[";for(let o=0;o<n.length;o+=1)o>0&&(s+=","),s+=n[o];return s+="]",s},r},n1=function(){let n=0,r=0,s=0,o="";const p={},v=function(a){o+=String.fromCharCode(f(a&63))},f=function(a){if(a<0)throw"n:"+a;if(a<26)return 65+a;if(a<52)return 97+(a-26);if(a<62)return 48+(a-52);if(a==62)return 43;if(a==63)return 47;throw"n:"+a};return p.writeByte=function(a){for(n=n<<8|a&255,r+=8,s+=1;r>=6;)v(n>>>r-6),r-=6},p.flush=function(){if(r>0&&(v(n<<6-r),n=0,r=0),s%3!=0){const a=3-s%3;for(let c=0;c<a;c+=1)o+="="}},p.toString=function(){return o},p},i1=function(n){const r=n;let s=0,o=0,p=0;const v={};v.read=function(){for(;p<8;){if(s>=r.length){if(p==0)return-1;throw"unexpected end of file./"+p}const c=r.charAt(s);if(s+=1,c=="=")return p=0,-1;if(c.match(/^\s$/))continue;o=o<<6|f(c.charCodeAt(0)),p+=6}const a=o>>>p-8&255;return p-=8,a};const f=function(a){if(65<=a&&a<=90)return a-65;if(97<=a&&a<=122)return a-97+26;if(48<=a&&a<=57)return a-48+52;if(a==43)return 62;if(a==47)return 63;throw"c:"+a};return v},r1=function(n,r){const s=n,o=r,p=new Array(n*r),v={};v.setPixel=function(h,d,u){p[d*s+h]=u},v.write=function(h){h.writeString("GIF87a"),h.writeShort(s),h.writeShort(o),h.writeByte(128),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(255),h.writeByte(255),h.writeByte(255),h.writeString(","),h.writeShort(0),h.writeShort(0),h.writeShort(s),h.writeShort(o),h.writeByte(0);const d=2,u=a(d);h.writeByte(d);let b=0;for(;u.length-b>255;)h.writeByte(255),h.writeBytes(u,b,255),b+=255;h.writeByte(u.length-b),h.writeBytes(u,b,u.length-b),h.writeByte(0),h.writeString(";")};const f=function(h){const d=h;let u=0,b=0;const w={};return w.write=function(E,x){if(E>>>x)throw"length over";for(;u+x>=8;)d.writeByte(255&(E<<u|b)),x-=8-u,E>>>=8-u,b=0,u=0;b=E<<u|b,u=u+x},w.flush=function(){u>0&&d.writeByte(b)},w},a=function(h){const d=1<<h,u=(1<<h)+1;let b=h+1;const w=c();for(let g=0;g<d;g+=1)w.add(String.fromCharCode(g));w.add(String.fromCharCode(d)),w.add(String.fromCharCode(u));const E=hg(),x=f(E);x.write(d,b);let S=0,_=String.fromCharCode(p[S]);for(S+=1;S<p.length;){const g=String.fromCharCode(p[S]);S+=1,w.contains(_+g)?_=_+g:(x.write(w.indexOf(_),b),w.size()<4095&&(w.size()==1<<b&&(b+=1),w.add(_+g)),_=g)}return x.write(w.indexOf(_),b),x.write(u,b),x.flush(),E.toByteArray()},c=function(){const h={};let d=0;const u={};return u.add=function(b){if(u.contains(b))throw"dup key:"+b;h[b]=d,d+=1},u.size=function(){return d},u.indexOf=function(b){return h[b]},u.contains=function(b){return typeof h[b]<"u"},u};return v},s1=function(n,r,s){const o=r1(n,r);for(let a=0;a<r;a+=1)for(let c=0;c<n;c+=1)o.setPixel(c,a,s(c,a));const p=hg();o.write(p);const v=n1(),f=p.toByteArray();for(let a=0;a<f.length;a+=1)v.writeByte(f[a]);return v.flush(),"data:image/gif;base64,"+v};ts.stringToBytes;const Zr=[{name:"project-manager",label:"Project Manager",commandAgent:"project-manager",dispatchable:!1},{name:"architect",label:"Architect",commandAgent:"architect",dispatchable:!0},{name:"coder",label:"Coder",commandAgent:"coder",dispatchable:!0},{name:"reviewer",label:"Reviewer",commandAgent:"reviewer",dispatchable:!0}],fg={name:"codex-reviewer",label:"Codex Reviewer",commandAgent:"codex-reviewer",dispatchable:!1},l1={name:"codex-translator",label:"Codex Translator",commandAgent:"codex-translator",dispatchable:!1},dg=[fg,l1],Uu=[...Zr,...dg],a1=Zr.map(n=>n.name),o1=dg.map(n=>n.name);Uu.map(n=>n.name);Uu.filter(n=>n.dispatchable).map(n=>n.name);function Pu(n){return o1.includes(n)}const c1="zh-CN",u1="final-only",pg=[{value:"zh-CN",label:"Chinese"},{value:"ja",label:"Japanese"},{value:"ko",label:"Korean"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"es",label:"Spanish"}],h1=[{value:"pm-final-only",label:"PM final reply"},{value:"final-only",label:"Each role final reply"},{value:"all",label:"All replies"}];function f1(){const n={};for(const r of a1)n[r]={permissionMode:"default",model:"default",effort:"default"};return{version:1,roles:n,autoOrchestration:!0}}function d1({sidebar:n,children:r}){const[s,o]=ae.useState(!1);return O.jsxs("div",{className:s?"app-shell is-sidebar-collapsed":"app-shell",children:[O.jsxs("aside",{className:"app-sidebar",children:[O.jsx("button",{className:"sidebar-toggle",type:"button","aria-label":s?"Expand sidebar":"Collapse sidebar",title:s?"Expand sidebar":"Collapse sidebar",onClick:()=>o(p=>!p)}),O.jsx("div",{className:"sidebar-content",children:n})]}),O.jsx("main",{className:"app-main",children:r})]})}const p1=[{value:"default",label:"Default",description:"Account default"},{value:"best",label:"Best",description:"Fable 5 or latest Opus"},{value:"fable",label:"Fable 5",description:"1M context, v2.1.170+"},{value:"opus",label:"Opus",description:"latest Opus"},{value:"opus[1m]",label:"Opus 1M",description:"Force 1M context"},{value:"claude-opus-4-8",label:"Opus 4.8",description:"Current Opus"},{value:"claude-opus-4-8[1m]",label:"Opus 4.8 1M",description:"Opus 4.8 + 1M context"}],m1=[{value:"gpt-5.5",label:"GPT-5.5",description:"Strong Codex reviewer default"},{value:"default",label:"Default",description:"Codex account default"}],mg=[{value:"default",label:"Default",description:"CLI or project default"},{value:"low",label:"Low",description:"Fastest reasoning"},{value:"medium",label:"Medium",description:"Balanced reasoning"},{value:"high",label:"High",description:"Deeper reasoning"},{value:"xhigh",label:"XHigh",description:"Extra high reasoning"}],g1=[...mg,{value:"max",label:"Max",description:"Maximum reasoning"},{value:"ultracode",label:"Ultracode",description:"Claude Code dynamic workflows with xhigh reasoning"}];function gg({role:n,session:r,permissionMode:s,model:o,effort:p,busy:v=!1,onPermissionModeChange:f,onModelChange:a,onEffortChange:c,onStart:h,onResume:d,onStop:u,onRestart:b}){const w=(r==null?void 0:r.status)==="running",E=!!(r!=null&&r.claudeSessionId&&!w),x=!w&&!(r!=null&&r.claudeSessionId),S=Pu(n),_=S?m1:p1,g=S?mg:g1;return O.jsxs("div",{className:"session-controls",children:[S?null:O.jsxs("label",{className:"session-option-field permission-mode-field",children:[O.jsx("span",{children:"Permission"}),O.jsxs("select",{value:s,onChange:y=>f(y.target.value),children:[O.jsx("option",{value:"default",children:"默认"}),O.jsx("option",{value:"bypassPermissions",children:"bypassPermissions"})]})]}),O.jsxs("label",{className:"session-option-field model-field",children:[O.jsx("span",{children:"Model"}),O.jsx("select",{value:o,onChange:y=>a(y.target.value),children:_.map(y=>O.jsx("option",{value:y.value,children:y.label},y.value))})]}),O.jsxs("label",{className:"session-option-field effort-field",children:[O.jsx("span",{children:"Effort"}),O.jsx("select",{value:p,onChange:y=>c(y.target.value),children:g.map(y=>O.jsx("option",{value:y.value,children:y.label},y.value))})]}),O.jsxs("div",{className:"session-toolbar",children:[O.jsx("button",{type:"button",disabled:v||!x,onClick:h,children:"Start"}),O.jsx("button",{type:"button",disabled:v||!E,onClick:d,children:"Resume"}),O.jsx("button",{type:"button",disabled:v||!r,onClick:b,children:"Restart"}),O.jsx("button",{type:"button",disabled:v||!r,onClick:u,children:"Stop"})]})]})}var lu={exports:{}},um;function _1(){return um||(um=1,(function(n,r){(function(s,o){n.exports=o()})(self,(()=>(()=>{var s={};return(()=>{var o=s;Object.defineProperty(o,"__esModule",{value:!0}),o.FitAddon=void 0,o.FitAddon=class{activate(p){this._terminal=p}dispose(){}fit(){const p=this.proposeDimensions();if(!p||!this._terminal||isNaN(p.cols)||isNaN(p.rows))return;const v=this._terminal._core;this._terminal.rows===p.rows&&this._terminal.cols===p.cols||(v._renderService.clear(),this._terminal.resize(p.cols,p.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const p=this._terminal._core,v=p._renderService.dimensions;if(v.css.cell.width===0||v.css.cell.height===0)return;const f=this._terminal.options.scrollback===0?0:p.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(a.getPropertyValue("height")),h=Math.max(0,parseInt(a.getPropertyValue("width"))),d=window.getComputedStyle(this._terminal.element),u=c-(parseInt(d.getPropertyValue("padding-top"))+parseInt(d.getPropertyValue("padding-bottom"))),b=h-(parseInt(d.getPropertyValue("padding-right"))+parseInt(d.getPropertyValue("padding-left")))-f;return{cols:Math.max(2,Math.floor(b/v.css.cell.width)),rows:Math.max(1,Math.floor(u/v.css.cell.height))}}}})(),s})()))})(lu)),lu.exports}var v1=_1(),au={exports:{}},hm;function y1(){return hm||(hm=1,(function(n,r){(function(s,o){n.exports=o()})(self,(()=>(()=>{var s={6:(f,a)=>{function c(d){try{const u=new URL(d),b=u.password&&u.username?`${u.protocol}//${u.username}:${u.password}@${u.host}`:u.username?`${u.protocol}//${u.username}@${u.host}`:`${u.protocol}//${u.host}`;return d.toLocaleLowerCase().startsWith(b.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(d,u,b,w={}){this._terminal=d,this._regex=u,this._handler=b,this._options=w}provideLinks(d,u){const b=h.computeLink(d,this._regex,this._terminal,this._handler);u(this._addCallbacks(b))}_addCallbacks(d){return d.map((u=>(u.leave=this._options.leave,u.hover=(b,w)=>{if(this._options.hover){const{range:E}=u;this._options.hover(b,w,E)}},u)))}};class h{static computeLink(u,b,w,E){const x=new RegExp(b.source,(b.flags||"")+"g"),[S,_]=h._getWindowedLineStrings(u-1,w),g=S.join("");let y;const A=[];for(;y=x.exec(g);){const M=y[0];if(!c(M))continue;const[D,T]=h._mapStrIdx(w,_,0,y.index),[k,R]=h._mapStrIdx(w,D,T,M.length);if(D===-1||T===-1||k===-1||R===-1)continue;const N={start:{x:T+1,y:D+1},end:{x:R,y:k+1}};A.push({range:N,text:M,activate:E})}return A}static _getWindowedLineStrings(u,b){let w,E=u,x=u,S=0,_="";const g=[];if(w=b.buffer.active.getLine(u)){const y=w.translateToString(!0);if(w.isWrapped&&y[0]!==" "){for(S=0;(w=b.buffer.active.getLine(--E))&&S<2048&&(_=w.translateToString(!0),S+=_.length,g.push(_),w.isWrapped&&_.indexOf(" ")===-1););g.reverse()}for(g.push(y),S=0;(w=b.buffer.active.getLine(++x))&&w.isWrapped&&S<2048&&(_=w.translateToString(!0),S+=_.length,g.push(_),_.indexOf(" ")===-1););}return[g,E]}static _mapStrIdx(u,b,w,E){const x=u.buffer.active,S=x.getNullCell();let _=w;for(;E;){const g=x.getLine(b);if(!g)return[-1,-1];for(let y=_;y<g.length;++y){g.getCell(y,S);const A=S.getChars();if(S.getWidth()&&(E-=A.length||1,y===g.length-1&&A==="")){const M=x.getLine(b+1);M&&M.isWrapped&&(M.getCell(0,S),S.getWidth()===2&&(E+=1))}if(E<0)return[b,y]}b++,_=0}return[b,_]}}a.LinkComputer=h}},o={};function p(f){var a=o[f];if(a!==void 0)return a.exports;var c=o[f]={exports:{}};return s[f](c,c.exports,p),c.exports}var v={};return(()=>{var f=v;Object.defineProperty(f,"__esModule",{value:!0}),f.WebLinksAddon=void 0;const a=p(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function h(d,u){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=u}else console.warn("Opening link blocked as opener could not be cleared")}f.WebLinksAddon=class{constructor(d=h,u={}){this._handler=d,this._options=u}activate(d){this._terminal=d;const u=this._options,b=u.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,b,this._handler,u))}dispose(){var d;(d=this._linkProvider)==null||d.dispose()}}})(),v})()))})(au)),au.exports}var S1=y1(),ou={exports:{}},fm;function b1(){return fm||(fm=1,(function(n,r){(function(s,o){n.exports=o()})(globalThis,(()=>(()=>{var s={4567:function(f,a,c){var h=this&&this.__decorate||function(g,y,A,M){var D,T=arguments.length,k=T<3?y:M===null?M=Object.getOwnPropertyDescriptor(y,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(g,y,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(k=(T<3?D(k):T>3?D(y,A,k):D(y,A))||k);return T>3&&k&&Object.defineProperty(y,A,k),k},d=this&&this.__param||function(g,y){return function(A,M){y(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const u=c(9042),b=c(9924),w=c(844),E=c(4725),x=c(2585),S=c(3656);let _=a.AccessibilityManager=class extends w.Disposable{constructor(g,y,A,M){super(),this._terminal=g,this._coreBrowserService=A,this._renderService=M,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 D=0;D<this._terminal.rows;D++)this._rowElements[D]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[D]);if(this._topBoundaryFocusListener=D=>this._handleBoundaryFocus(D,0),this._bottomBoundaryFocusListener=D=>this._handleBoundaryFocus(D,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 b.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((D=>this._handleResize(D.rows)))),this.register(this._terminal.onRender((D=>this._refreshRows(D.start,D.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((D=>this._handleChar(D)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
52
|
-
`)))),this.register(this._terminal.onA11yTab((D=>this._handleTab(D)))),this.register(this._terminal.onKey((D=>this._handleKey(D.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,
|
|
53
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(g){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(g)||this._charsToConsume.push(g)}_refreshRows(g,y){this._liveRegionDebouncer.refresh(g,y,this._terminal.rows)}_renderRows(g,y){const A=this._terminal.buffer,M=A.lines.length.toString();for(let D=g;D<=y;D++){const T=A.lines.get(A.ydisp+D),k=[],R=(T==null?void 0:T.translateToString(!0,void 0,void 0,k))||"",N=(A.ydisp+D+1).toString(),I=this._rowElements[D];I&&(R.length===0?(I.innerText=" ",this._rowColumns.set(I,[0,1])):(I.textContent=R,this._rowColumns.set(I,k)),I.setAttribute("aria-posinset",N),I.setAttribute("aria-setsize",M))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(g,y){const A=g.target,M=this._rowElements[y===0?1:this._rowElements.length-2];if(A.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||g.relatedTarget!==M)return;let D,T;if(y===0?(D=A,T=this._rowElements.pop(),this._rowContainer.removeChild(T)):(D=this._rowElements.shift(),T=A,this._rowContainer.removeChild(D)),D.removeEventListener("focus",this._topBoundaryFocusListener),T.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){const k=this._createAccessibilityTreeNode();this._rowElements.unshift(k),this._rowContainer.insertAdjacentElement("afterbegin",k)}else{const k=this._createAccessibilityTreeNode();this._rowElements.push(k),this._rowContainer.appendChild(k)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),g.preventDefault(),g.stopImmediatePropagation()}_handleSelectionChange(){var R;if(this._rowElements.length===0)return;const g=document.getSelection();if(!g)return;if(g.isCollapsed)return void(this._rowContainer.contains(g.anchorNode)&&this._terminal.clearSelection());if(!g.anchorNode||!g.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:g.anchorNode,offset:g.anchorOffset},A={node:g.focusNode,offset:g.focusOffset};if((y.node.compareDocumentPosition(A.node)&Node.DOCUMENT_POSITION_PRECEDING||y.node===A.node&&y.offset>A.offset)&&([y,A]=[A,y]),y.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(y={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(y.node))return;const M=this._rowElements.slice(-1)[0];if(A.node.compareDocumentPosition(M)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(A={node:M,offset:((R=M.textContent)==null?void 0:R.length)??0}),!this._rowContainer.contains(A.node))return;const D=({node:N,offset:I})=>{const P=N instanceof Text?N.parentNode:N;let F=parseInt(P==null?void 0:P.getAttribute("aria-posinset"),10)-1;if(isNaN(F))return console.warn("row is invalid. Race condition?"),null;const K=this._rowColumns.get(P);if(!K)return console.warn("columns is null. Race condition?"),null;let W=I<K.length?K[I]:K.slice(-1)[0]+1;return W>=this._terminal.cols&&(++F,W=0),{row:F,column:W}},T=D(y),k=D(A);if(T&&k){if(T.row>k.row||T.row===k.row&&T.column>=k.column)throw new Error("invalid range");this._terminal.select(T.column,T.row,(k.row-T.row)*this._terminal.cols-T.column+k.column)}}_handleResize(g){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;y<this._terminal.rows;y++)this._rowElements[y]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[y]);for(;this._rowElements.length>g;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const g=this._coreBrowserService.mainDocument.createElement("div");return g.setAttribute("role","listitem"),g.tabIndex=-1,this._refreshRowDimensions(g),g}_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 g=0;g<this._terminal.rows;g++)this._refreshRowDimensions(this._rowElements[g])}}_refreshRowDimensions(g){g.style.height=`${this._renderService.dimensions.css.cell.height}px`}};a.AccessibilityManager=_=h([d(1,x.IInstantiationService),d(2,E.ICoreBrowserService),d(3,E.IRenderService)],_)},3614:(f,a)=>{function c(b){return b.replace(/\r?\n/g,"\r")}function h(b,w){return w?"\x1B[200~"+b+"\x1B[201~":b}function d(b,w,E,x){b=h(b=c(b),E.decPrivateModes.bracketedPasteMode&&x.rawOptions.ignoreBracketedPasteMode!==!0),E.triggerDataEvent(b,!0),w.value=""}function u(b,w,E){const x=E.getBoundingClientRect(),S=b.clientX-x.left-10,_=b.clientY-x.top-10;w.style.width="20px",w.style.height="20px",w.style.left=`${S}px`,w.style.top=`${_}px`,w.style.zIndex="1000",w.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=c,a.bracketTextForPaste=h,a.copyHandler=function(b,w){b.clipboardData&&b.clipboardData.setData("text/plain",w.selectionText),b.preventDefault()},a.handlePasteEvent=function(b,w,E,x){b.stopPropagation(),b.clipboardData&&d(b.clipboardData.getData("text/plain"),w,E,x)},a.paste=d,a.moveTextAreaUnderMouseCursor=u,a.rightClickHandler=function(b,w,E,x,S){u(b,w,E),S&&x.rightClickSelect(b),w.value=x.selectionText,w.select()}},7239:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const h=c(1505);a.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(d,u,b){this._css.set(d,u,b)}getCss(d,u){return this._css.get(d,u)}setColor(d,u,b){this._color.set(d,u,b)}getColor(d,u){return this._color.get(d,u)}clear(){this._color.clear(),this._css.clear()}}},3656:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(c,h,d,u){c.addEventListener(h,d,u);let b=!1;return{dispose:()=>{b||(b=!0,c.removeEventListener(h,d,u))}}}},3551:function(f,a,c){var h=this&&this.__decorate||function(_,g,y,A){var M,D=arguments.length,T=D<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,y):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,g,y,A);else for(var k=_.length-1;k>=0;k--)(M=_[k])&&(T=(D<3?M(T):D>3?M(g,y,T):M(g,y))||T);return D>3&&T&&Object.defineProperty(g,y,T),T},d=this&&this.__param||function(_,g){return function(y,A){g(y,A,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const u=c(3656),b=c(8460),w=c(844),E=c(2585),x=c(4725);let S=a.Linkifier=class extends w.Disposable{get currentLink(){return this._currentLink}constructor(_,g,y,A,M){super(),this._element=_,this._mouseService=g,this._renderService=y,this._bufferService=A,this._linkProviderService=M,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new b.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new b.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,w.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,w.toDisposable)((()=>{var D;this._lastMouseEvent=void 0,(D=this._activeProviderReplies)==null||D.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(_){this._lastMouseEvent=_;const g=this._positionFromMouseEvent(_,this._element,this._mouseService);if(!g)return;this._isMouseOut=!1;const y=_.composedPath();for(let A=0;A<y.length;A++){const M=y[A];if(M.classList.contains("xterm"))break;if(M.classList.contains("xterm-hover"))return}this._lastBufferCell&&g.x===this._lastBufferCell.x&&g.y===this._lastBufferCell.y||(this._handleHover(g),this._lastBufferCell=g)}_handleHover(_){if(this._activeLine!==_.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(_,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,_)||(this._clearCurrentLink(),this._askForLink(_,!0))}_askForLink(_,g){var A,M;this._activeProviderReplies&&g||((A=this._activeProviderReplies)==null||A.forEach((D=>{D==null||D.forEach((T=>{T.link.dispose&&T.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=_.y);let y=!1;for(const[D,T]of this._linkProviderService.linkProviders.entries())g?(M=this._activeProviderReplies)!=null&&M.get(D)&&(y=this._checkLinkProviderResult(D,_,y)):T.provideLinks(_.y,(k=>{var N,I;if(this._isMouseOut)return;const R=k==null?void 0:k.map((P=>({link:P})));(N=this._activeProviderReplies)==null||N.set(D,R),y=this._checkLinkProviderResult(D,_,y),((I=this._activeProviderReplies)==null?void 0:I.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(_.y,this._activeProviderReplies)}))}_removeIntersectingLinks(_,g){const y=new Set;for(let A=0;A<g.size;A++){const M=g.get(A);if(M)for(let D=0;D<M.length;D++){const T=M[D],k=T.link.range.start.y<_?0:T.link.range.start.x,R=T.link.range.end.y>_?this._bufferService.cols:T.link.range.end.x;for(let N=k;N<=R;N++){if(y.has(N)){M.splice(D--,1);break}y.add(N)}}}}_checkLinkProviderResult(_,g,y){var D;if(!this._activeProviderReplies)return y;const A=this._activeProviderReplies.get(_);let M=!1;for(let T=0;T<_;T++)this._activeProviderReplies.has(T)&&!this._activeProviderReplies.get(T)||(M=!0);if(!M&&A){const T=A.find((k=>this._linkAtPosition(k.link,g)));T&&(y=!0,this._handleNewLink(T))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let T=0;T<this._activeProviderReplies.size;T++){const k=(D=this._activeProviderReplies.get(T))==null?void 0:D.find((R=>this._linkAtPosition(R.link,g)));if(k){y=!0,this._handleNewLink(k);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(_){if(!this._currentLink)return;const g=this._positionFromMouseEvent(_,this._element,this._mouseService);g&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,g)&&this._currentLink.link.activate(_,this._currentLink.link.text)}_clearCurrentLink(_,g){this._currentLink&&this._lastMouseEvent&&(!_||!g||this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=g)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,w.disposeArray)(this._linkCacheDisposables))}_handleNewLink(_){if(!this._lastMouseEvent)return;const g=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);g&&this._linkAtPosition(_.link,g)&&(this._currentLink=_,this._currentLink.state={decorations:{underline:_.link.decorations===void 0||_.link.decorations.underline,pointerCursor:_.link.decorations===void 0||_.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,_.link,this._lastMouseEvent),_.link.decorations={},Object.defineProperties(_.link.decorations,{pointerCursor:{get:()=>{var y,A;return(A=(y=this._currentLink)==null?void 0:y.state)==null?void 0:A.decorations.pointerCursor},set:y=>{var A;(A=this._currentLink)!=null&&A.state&&this._currentLink.state.decorations.pointerCursor!==y&&(this._currentLink.state.decorations.pointerCursor=y,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",y))}},underline:{get:()=>{var y,A;return(A=(y=this._currentLink)==null?void 0:y.state)==null?void 0:A.decorations.underline},set:y=>{var A,M,D;(A=this._currentLink)!=null&&A.state&&((D=(M=this._currentLink)==null?void 0:M.state)==null?void 0:D.decorations.underline)!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(_.link,y))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((y=>{if(!this._currentLink)return;const A=y.start===0?0:y.start+1+this._bufferService.buffer.ydisp,M=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=A&&this._currentLink.link.range.end.y<=M&&(this._clearCurrentLink(A,M),this._lastMouseEvent)){const D=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);D&&this._askForLink(D,!1)}}))))}_linkHover(_,g,y){var A;(A=this._currentLink)!=null&&A.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(g,!0),this._currentLink.state.decorations.pointerCursor&&_.classList.add("xterm-cursor-pointer")),g.hover&&g.hover(y,g.text)}_fireUnderlineEvent(_,g){const y=_.range,A=this._bufferService.buffer.ydisp,M=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-A-1,y.end.x,y.end.y-A-1,void 0);(g?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(M)}_linkLeave(_,g,y){var A;(A=this._currentLink)!=null&&A.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(g,!1),this._currentLink.state.decorations.pointerCursor&&_.classList.remove("xterm-cursor-pointer")),g.leave&&g.leave(y,g.text)}_linkAtPosition(_,g){const y=_.range.start.y*this._bufferService.cols+_.range.start.x,A=_.range.end.y*this._bufferService.cols+_.range.end.x,M=g.y*this._bufferService.cols+g.x;return y<=M&&M<=A}_positionFromMouseEvent(_,g,y){const A=y.getCoords(_,g,this._bufferService.cols,this._bufferService.rows);if(A)return{x:A[0],y:A[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(_,g,y,A,M){return{x1:_,y1:g,x2:y,y2:A,cols:this._bufferService.cols,fg:M}}};a.Linkifier=S=h([d(1,x.IMouseService),d(2,x.IRenderService),d(3,E.IBufferService),d(4,x.ILinkProviderService)],S)},9042:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(f,a,c){var h=this&&this.__decorate||function(x,S,_,g){var y,A=arguments.length,M=A<3?S:g===null?g=Object.getOwnPropertyDescriptor(S,_):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,S,_,g);else for(var D=x.length-1;D>=0;D--)(y=x[D])&&(M=(A<3?y(M):A>3?y(S,_,M):y(S,_))||M);return A>3&&M&&Object.defineProperty(S,_,M),M},d=this&&this.__param||function(x,S){return function(_,g){S(_,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const u=c(511),b=c(2585);let w=a.OscLinkProvider=class{constructor(x,S,_){this._bufferService=x,this._optionsService=S,this._oscLinkService=_}provideLinks(x,S){var R;const _=this._bufferService.buffer.lines.get(x-1);if(!_)return void S(void 0);const g=[],y=this._optionsService.rawOptions.linkHandler,A=new u.CellData,M=_.getTrimmedLength();let D=-1,T=-1,k=!1;for(let N=0;N<M;N++)if(T!==-1||_.hasContent(N)){if(_.loadCell(N,A),A.hasExtendedAttrs()&&A.extended.urlId){if(T===-1){T=N,D=A.extended.urlId;continue}k=A.extended.urlId!==D}else T!==-1&&(k=!0);if(k||T!==-1&&N===M-1){const I=(R=this._oscLinkService.getLinkData(D))==null?void 0:R.uri;if(I){const P={start:{x:T+1,y:x},end:{x:N+(k||N!==M-1?0:1),y:x}};let F=!1;if(!(y!=null&&y.allowNonHttpProtocols))try{const K=new URL(I);["http:","https:"].includes(K.protocol)||(F=!0)}catch{F=!0}F||g.push({text:I,range:P,activate:(K,W)=>y?y.activate(K,W,P):E(0,W),hover:(K,W)=>{var G;return(G=y==null?void 0:y.hover)==null?void 0:G.call(y,K,W,P)},leave:(K,W)=>{var G;return(G=y==null?void 0:y.leave)==null?void 0:G.call(y,K,W,P)}})}k=!1,A.hasExtendedAttrs()&&A.extended.urlId?(T=N,D=A.extended.urlId):(T=-1,D=-1)}}S(g)}};function E(x,S){if(confirm(`Do you want to navigate to ${S}?
|
|
48
|
+
`+l.stack}}var xt=Object.prototype.hasOwnProperty,Nt=n.unstable_scheduleCallback,Kt=n.unstable_cancelCallback,Ft=n.unstable_shouldYield,pt=n.unstable_requestPaint,tt=n.unstable_now,jt=n.unstable_getCurrentPriorityLevel,ue=n.unstable_ImmediatePriority,ye=n.unstable_UserBlockingPriority,ke=n.unstable_NormalPriority,Me=n.unstable_LowPriority,Be=n.unstable_IdlePriority,ot=n.log,je=n.unstable_setDisableYieldValue,mt=null,We=null;function Rt(e){if(typeof ot=="function"&&je(e),We&&typeof We.setStrictMode=="function")try{We.setStrictMode(mt,e)}catch{}}var Ee=Math.clz32?Math.clz32:On,yt=Math.log,Zt=Math.LN2;function On(e){return e>>>=0,e===0?32:31-(yt(e)/Zt|0)|0}var Bn=256,qn=262144,_e=4194304;function St(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function hr(e,t,i){var l=e.pendingLanes;if(l===0)return 0;var p=0,w=e.suspendedLanes,L=e.pingedLanes;e=e.warmLanes;var U=l&134217727;return U!==0?(l=U&~w,l!==0?p=St(l):(L&=U,L!==0?p=St(L):i||(i=U&~e,i!==0&&(p=St(i))))):(U=l&~w,U!==0?p=St(U):L!==0?p=St(L):i||(i=l&~e,i!==0&&(p=St(i)))),p===0?0:t!==0&&t!==p&&(t&w)===0&&(w=p&-p,i=t&-t,w>=i||w===32&&(i&4194048)!==0)?t:p}function Fi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Yt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function on(){var e=_e;return _e<<=1,(_e&62914560)===0&&(_e=4194304),e}function fr(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function ui(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ns(e,t,i,l,p,w){var L=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var U=e.entanglements,X=e.expirationTimes,se=e.hiddenUpdates;for(i=L&~i;0<i;){var fe=31-Ee(i),ge=1<<fe;U[fe]=0,X[fe]=-1;var le=se[fe];if(le!==null)for(se[fe]=null,fe=0;fe<le.length;fe++){var ce=le[fe];ce!==null&&(ce.lane&=-536870913)}i&=~ge}l!==0&&fl(e,l,0),w!==0&&p===0&&e.tag!==0&&(e.suspendedLanes|=w&~(L&~t))}function fl(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Ee(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|i&261930}function qi(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var l=31-Ee(i),p=1<<l;p&t|e[l]&t&&(e[l]|=t),i&=~p}}function dl(e,t){var i=t&-t;return i=(i&42)!==0?1:is(i),(i&(e.suspendedLanes|t))!==0?0:i}function is(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function rs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function pl(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:Gp(e.type))}function ml(e,t){var i=$.p;try{return $.p=e,t()}finally{$.p=i}}var Wt=Math.random().toString(36).slice(2),gt="__reactFiber$"+Wt,Mt="__reactProps$"+Wt,Nn="__reactContainer$"+Wt,ss="__reactEvents$"+Wt,ls="__reactListeners$"+Wt,as="__reactHandles$"+Wt,Gi="__reactResources$"+Wt,Ue="__reactMarker$"+Wt;function os(e){delete e[gt],delete e[Mt],delete e[ss],delete e[ls],delete e[as]}function hi(e){var t=e[gt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Nn]||i[gt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Tp(e);e!==null;){if(i=e[gt])return i;e=Tp(e)}return t}e=i,i=e.parentNode}return null}function fi(e){if(e=e[gt]||e[Nn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Vi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function jn(e){var t=e[Gi];return t||(t=e[Gi]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function bt(e){e[Ue]=!0}var ee=new Set,Se={};function ct(e,t){Lt(e,t),Lt(e+"Capture",t)}function Lt(e,t){for(Se[e]=t,e=0;e<t.length;e++)ee.add(t[e])}var M_=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),ch={},uh={};function L_(e){return xt.call(uh,e)?!0:xt.call(ch,e)?!1:M_.test(e)?uh[e]=!0:(ch[e]=!0,!1)}function gl(e,t,i){if(L_(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function _l(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function Gn(e,t,i,l){if(l===null)e.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+l)}}function vn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function O_(e,t,i){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var p=l.get,w=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return p.call(this)},set:function(L){i=""+L,w.call(this,L)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return i},setValue:function(L){i=""+L},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $a(e){if(!e._valueTracker){var t=hh(e)?"checked":"value";e._valueTracker=O_(e,t,""+e[t])}}function fh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),l="";return e&&(l=hh(e)?e.checked?"true":"false":e.value),e=l,e!==i?(t.setValue(e),!0):!1}function vl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var B_=/[\n"\\]/g;function yn(e){return e.replace(B_,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ka(e,t,i,l,p,w,L,U){e.name="",L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?e.type=L:e.removeAttribute("type"),t!=null?L==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+vn(t)):e.value!==""+vn(t)&&(e.value=""+vn(t)):L!=="submit"&&L!=="reset"||e.removeAttribute("value"),t!=null?Ya(e,L,vn(t)):i!=null?Ya(e,L,vn(i)):l!=null&&e.removeAttribute("value"),p==null&&w!=null&&(e.defaultChecked=!!w),p!=null&&(e.checked=p&&typeof p!="function"&&typeof p!="symbol"),U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?e.name=""+vn(U):e.removeAttribute("name")}function dh(e,t,i,l,p,w,L,U){if(w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(e.type=w),t!=null||i!=null){if(!(w!=="submit"&&w!=="reset"||t!=null)){$a(e);return}i=i!=null?""+vn(i):"",t=t!=null?""+vn(t):i,U||t===e.value||(e.value=t),e.defaultValue=t}l=l??p,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=U?e.checked:!!l,e.defaultChecked=!!l,L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"&&(e.name=L),$a(e)}function Ya(e,t,i){t==="number"&&vl(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function dr(e,t,i,l){if(e=e.options,t){t={};for(var p=0;p<i.length;p++)t["$"+i[p]]=!0;for(i=0;i<e.length;i++)p=t.hasOwnProperty("$"+e[i].value),e[i].selected!==p&&(e[i].selected=p),p&&l&&(e[i].defaultSelected=!0)}else{for(i=""+vn(i),t=null,p=0;p<e.length;p++){if(e[p].value===i){e[p].selected=!0,l&&(e[p].defaultSelected=!0);return}t!==null||e[p].disabled||(t=e[p])}t!==null&&(t.selected=!0)}}function ph(e,t,i){if(t!=null&&(t=""+vn(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+vn(i):""}function mh(e,t,i,l){if(t==null){if(l!=null){if(i!=null)throw Error(o(92));if(W(l)){if(1<l.length)throw Error(o(93));l=l[0]}i=l}i==null&&(i=""),t=i}i=vn(t),e.defaultValue=i,l=e.textContent,l===i&&l!==""&&l!==null&&(e.value=l),$a(e)}function pr(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var N_=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function gh(e,t,i){var l=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,i):typeof i!="number"||i===0||N_.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function _h(e,t,i){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,i!=null){for(var l in i)!i.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var p in t)l=t[p],t.hasOwnProperty(p)&&i[p]!==l&&gh(e,p,l)}else for(var w in t)t.hasOwnProperty(w)&&gh(e,w,t[w])}function Wa(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var j_=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),z_=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function yl(e){return z_.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Vn(){}var Xa=null;function Qa(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mr=null,gr=null;function vh(e){var t=fi(e);if(t&&(e=t.stateNode)){var i=e[Mt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ka(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+yn(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var l=i[t];if(l!==e&&l.form===e.form){var p=l[Mt]||null;if(!p)throw Error(o(90));Ka(l,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(t=0;t<i.length;t++)l=i[t],l.form===e.form&&fh(l)}break e;case"textarea":ph(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&dr(e,!!i.multiple,t,!1)}}}var Za=!1;function yh(e,t,i){if(Za)return e(t,i);Za=!0;try{var l=e(t);return l}finally{if(Za=!1,(mr!==null||gr!==null)&&(la(),mr&&(t=mr,e=gr,gr=mr=null,vh(t),e)))for(t=0;t<e.length;t++)vh(e[t])}}function cs(e,t){var i=e.stateNode;if(i===null)return null;var l=i[Mt]||null;if(l===null)return null;i=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(o(231,t,typeof i));return i}var $n=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ja=!1;if($n)try{var us={};Object.defineProperty(us,"passive",{get:function(){Ja=!0}}),window.addEventListener("test",us,us),window.removeEventListener("test",us,us)}catch{Ja=!1}var di=null,eo=null,Sl=null;function Sh(){if(Sl)return Sl;var e,t=eo,i=t.length,l,p="value"in di?di.value:di.textContent,w=p.length;for(e=0;e<i&&t[e]===p[e];e++);var L=i-e;for(l=1;l<=L&&t[i-l]===p[w-l];l++);return Sl=p.slice(e,1<l?1-l:void 0)}function bl(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 Cl(){return!0}function bh(){return!1}function Jt(e){function t(i,l,p,w,L){this._reactName=i,this._targetInst=p,this.type=l,this.nativeEvent=w,this.target=L,this.currentTarget=null;for(var U in e)e.hasOwnProperty(U)&&(i=e[U],this[U]=i?i(w):w[U]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?Cl:bh,this.isPropagationStopped=bh,this}return u(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Cl)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Cl)},persist:function(){},isPersistent:Cl}),t}var $i={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wl=Jt($i),hs=u({},$i,{view:0,detail:0}),H_=Jt(hs),to,no,fs,xl=u({},hs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ro,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!==fs&&(fs&&e.type==="mousemove"?(to=e.screenX-fs.screenX,no=e.screenY-fs.screenY):no=to=0,fs=e),to)},movementY:function(e){return"movementY"in e?e.movementY:no}}),Ch=Jt(xl),I_=u({},xl,{dataTransfer:0}),U_=Jt(I_),P_=u({},hs,{relatedTarget:0}),io=Jt(P_),F_=u({},$i,{animationName:0,elapsedTime:0,pseudoElement:0}),q_=Jt(F_),G_=u({},$i,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),V_=Jt(G_),$_=u({},$i,{data:0}),wh=Jt($_),K_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Y_={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"},W_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function X_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=W_[e])?!!t[e]:!1}function ro(){return X_}var Q_=u({},hs,{key:function(e){if(e.key){var t=K_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Y_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ro,charCode:function(e){return e.type==="keypress"?bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Z_=Jt(Q_),J_=u({},xl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xh=Jt(J_),ev=u({},hs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ro}),tv=Jt(ev),nv=u({},$i,{propertyName:0,elapsedTime:0,pseudoElement:0}),iv=Jt(nv),rv=u({},xl,{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}),sv=Jt(rv),lv=u({},$i,{newState:0,oldState:0}),av=Jt(lv),ov=[9,13,27,32],so=$n&&"CompositionEvent"in window,ds=null;$n&&"documentMode"in document&&(ds=document.documentMode);var cv=$n&&"TextEvent"in window&&!ds,Eh=$n&&(!so||ds&&8<ds&&11>=ds),kh=" ",Ah=!1;function Th(e,t){switch(e){case"keyup":return ov.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _r=!1;function uv(e,t){switch(e){case"compositionend":return Dh(t);case"keypress":return t.which!==32?null:(Ah=!0,kh);case"textInput":return e=t.data,e===kh&&Ah?null:e;default:return null}}function hv(e,t){if(_r)return e==="compositionend"||!so&&Th(e,t)?(e=Sh(),Sl=eo=di=null,_r=!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 Eh&&t.locale!=="ko"?null:t.data;default:return null}}var fv={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 Rh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!fv[e.type]:t==="textarea"}function Mh(e,t,i,l){mr?gr?gr.push(l):gr=[l]:mr=l,t=da(t,"onChange"),0<t.length&&(i=new wl("onChange","change",null,i,l),e.push({event:i,listeners:t}))}var ps=null,ms=null;function dv(e){pp(e,0)}function El(e){var t=Vi(e);if(fh(t))return e}function Lh(e,t){if(e==="change")return t}var Oh=!1;if($n){var lo;if($n){var ao="oninput"in document;if(!ao){var Bh=document.createElement("div");Bh.setAttribute("oninput","return;"),ao=typeof Bh.oninput=="function"}lo=ao}else lo=!1;Oh=lo&&(!document.documentMode||9<document.documentMode)}function Nh(){ps&&(ps.detachEvent("onpropertychange",jh),ms=ps=null)}function jh(e){if(e.propertyName==="value"&&El(ms)){var t=[];Mh(t,ms,e,Qa(e)),yh(dv,t)}}function pv(e,t,i){e==="focusin"?(Nh(),ps=t,ms=i,ps.attachEvent("onpropertychange",jh)):e==="focusout"&&Nh()}function mv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return El(ms)}function gv(e,t){if(e==="click")return El(t)}function _v(e,t){if(e==="input"||e==="change")return El(t)}function vv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var cn=typeof Object.is=="function"?Object.is:vv;function gs(e,t){if(cn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),l=Object.keys(t);if(i.length!==l.length)return!1;for(l=0;l<i.length;l++){var p=i[l];if(!xt.call(t,p)||!cn(e[p],t[p]))return!1}return!0}function zh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hh(e,t){var i=zh(e);e=0;for(var l;i;){if(i.nodeType===3){if(l=e+i.textContent.length,e<=t&&l>=t)return{node:i,offset:t-e};e=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=zh(i)}}function Ih(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ih(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Uh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=vl(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=vl(e.document)}return t}function oo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var yv=$n&&"documentMode"in document&&11>=document.documentMode,vr=null,co=null,_s=null,uo=!1;function Ph(e,t,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;uo||vr==null||vr!==vl(l)||(l=vr,"selectionStart"in l&&oo(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),_s&&gs(_s,l)||(_s=l,l=da(co,"onSelect"),0<l.length&&(t=new wl("onSelect","select",null,t,i),e.push({event:t,listeners:l}),t.target=vr)))}function Ki(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var yr={animationend:Ki("Animation","AnimationEnd"),animationiteration:Ki("Animation","AnimationIteration"),animationstart:Ki("Animation","AnimationStart"),transitionrun:Ki("Transition","TransitionRun"),transitionstart:Ki("Transition","TransitionStart"),transitioncancel:Ki("Transition","TransitionCancel"),transitionend:Ki("Transition","TransitionEnd")},ho={},Fh={};$n&&(Fh=document.createElement("div").style,"AnimationEvent"in window||(delete yr.animationend.animation,delete yr.animationiteration.animation,delete yr.animationstart.animation),"TransitionEvent"in window||delete yr.transitionend.transition);function Yi(e){if(ho[e])return ho[e];if(!yr[e])return e;var t=yr[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Fh)return ho[e]=t[i];return e}var qh=Yi("animationend"),Gh=Yi("animationiteration"),Vh=Yi("animationstart"),Sv=Yi("transitionrun"),bv=Yi("transitionstart"),Cv=Yi("transitioncancel"),$h=Yi("transitionend"),Kh=new Map,fo="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");fo.push("scrollEnd");function Dn(e,t){Kh.set(e,t),ct(t,[e])}var kl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Sn=[],Sr=0,po=0;function Al(){for(var e=Sr,t=po=Sr=0;t<e;){var i=Sn[t];Sn[t++]=null;var l=Sn[t];Sn[t++]=null;var p=Sn[t];Sn[t++]=null;var w=Sn[t];if(Sn[t++]=null,l!==null&&p!==null){var L=l.pending;L===null?p.next=p:(p.next=L.next,L.next=p),l.pending=p}w!==0&&Yh(i,p,w)}}function Tl(e,t,i,l){Sn[Sr++]=e,Sn[Sr++]=t,Sn[Sr++]=i,Sn[Sr++]=l,po|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function mo(e,t,i,l){return Tl(e,t,i,l),Dl(e)}function Wi(e,t){return Tl(e,null,null,t),Dl(e)}function Yh(e,t,i){e.lanes|=i;var l=e.alternate;l!==null&&(l.lanes|=i);for(var p=!1,w=e.return;w!==null;)w.childLanes|=i,l=w.alternate,l!==null&&(l.childLanes|=i),w.tag===22&&(e=w.stateNode,e===null||e._visibility&1||(p=!0)),e=w,w=w.return;return e.tag===3?(w=e.stateNode,p&&t!==null&&(p=31-Ee(i),e=w.hiddenUpdates,l=e[p],l===null?e[p]=[t]:l.push(t),t.lane=i|536870912),w):null}function Dl(e){if(50<Is)throw Is=0,xc=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var br={};function wv(e,t,i,l){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function un(e,t,i,l){return new wv(e,t,i,l)}function go(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kn(e,t){var i=e.alternate;return i===null?(i=un(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Wh(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Rl(e,t,i,l,p,w){var L=0;if(l=e,typeof e=="function")go(e)&&(L=1);else if(typeof e=="string")L=T0(e,i,te.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case R:return e=un(31,i,t,p),e.elementType=R,e.lanes=w,e;case x:return Xi(i.children,p,w,t);case b:L=8,p|=24;break;case S:return e=un(12,i,t,p|2),e.elementType=S,e.lanes=w,e;case M:return e=un(13,i,t,p),e.elementType=M,e.lanes=w,e;case D:return e=un(19,i,t,p),e.elementType=D,e.lanes=w,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case y:L=10;break e;case g:L=9;break e;case A:L=11;break e;case T:L=14;break e;case k:L=16,l=null;break e}L=29,i=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=un(L,i,t,p),t.elementType=e,t.type=l,t.lanes=w,t}function Xi(e,t,i,l){return e=un(7,e,l,t),e.lanes=i,e}function _o(e,t,i){return e=un(6,e,null,t),e.lanes=i,e}function Xh(e){var t=un(18,null,null,0);return t.stateNode=e,t}function vo(e,t,i){return t=un(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Qh=new WeakMap;function bn(e,t){if(typeof e=="object"&&e!==null){var i=Qh.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Bt(t)},Qh.set(e,t),t)}return{value:e,source:t,stack:Bt(t)}}var Cr=[],wr=0,Ml=null,vs=0,Cn=[],wn=0,pi=null,zn=1,Hn="";function Yn(e,t){Cr[wr++]=vs,Cr[wr++]=Ml,Ml=e,vs=t}function Zh(e,t,i){Cn[wn++]=zn,Cn[wn++]=Hn,Cn[wn++]=pi,pi=e;var l=zn;e=Hn;var p=32-Ee(l)-1;l&=~(1<<p),i+=1;var w=32-Ee(t)+p;if(30<w){var L=p-p%5;w=(l&(1<<L)-1).toString(32),l>>=L,p-=L,zn=1<<32-Ee(t)+p|i<<p|l,Hn=w+e}else zn=1<<w|i<<p|l,Hn=e}function yo(e){e.return!==null&&(Yn(e,1),Zh(e,1,0))}function So(e){for(;e===Ml;)Ml=Cr[--wr],Cr[wr]=null,vs=Cr[--wr],Cr[wr]=null;for(;e===pi;)pi=Cn[--wn],Cn[wn]=null,Hn=Cn[--wn],Cn[wn]=null,zn=Cn[--wn],Cn[wn]=null}function Jh(e,t){Cn[wn++]=zn,Cn[wn++]=Hn,Cn[wn++]=pi,zn=t.id,Hn=t.overflow,pi=e}var Ht=null,ht=null,Ke=!1,mi=null,xn=!1,bo=Error(o(519));function gi(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ys(bn(t,e)),bo}function ef(e){var t=e.stateNode,i=e.type,l=e.memoizedProps;switch(t[gt]=e,t[Mt]=l,i){case"dialog":Fe("cancel",t),Fe("close",t);break;case"iframe":case"object":case"embed":Fe("load",t);break;case"video":case"audio":for(i=0;i<Ps.length;i++)Fe(Ps[i],t);break;case"source":Fe("error",t);break;case"img":case"image":case"link":Fe("error",t),Fe("load",t);break;case"details":Fe("toggle",t);break;case"input":Fe("invalid",t),dh(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Fe("invalid",t);break;case"textarea":Fe("invalid",t),mh(t,l.value,l.defaultValue,l.children)}i=l.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||l.suppressHydrationWarning===!0||vp(t.textContent,i)?(l.popover!=null&&(Fe("beforetoggle",t),Fe("toggle",t)),l.onScroll!=null&&Fe("scroll",t),l.onScrollEnd!=null&&Fe("scrollend",t),l.onClick!=null&&(t.onclick=Vn),t=!0):t=!1,t||gi(e,!0)}function tf(e){for(Ht=e.return;Ht;)switch(Ht.tag){case 5:case 31:case 13:xn=!1;return;case 27:case 3:xn=!0;return;default:Ht=Ht.return}}function xr(e){if(e!==Ht)return!1;if(!Ke)return tf(e),Ke=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Ic(e.type,e.memoizedProps)),i=!i),i&&ht&&gi(e),tf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ht=Ap(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ht=Ap(e)}else t===27?(t=ht,Ri(e.type)?(e=Gc,Gc=null,ht=e):ht=t):ht=Ht?kn(e.stateNode.nextSibling):null;return!0}function Qi(){ht=Ht=null,Ke=!1}function Co(){var e=mi;return e!==null&&(rn===null?rn=e:rn.push.apply(rn,e),mi=null),e}function ys(e){mi===null?mi=[e]:mi.push(e)}var wo=z(null),Zi=null,Wn=null;function _i(e,t,i){j(wo,t._currentValue),t._currentValue=i}function Xn(e){e._currentValue=wo.current,G(wo)}function xo(e,t,i){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===i)break;e=e.return}}function Eo(e,t,i,l){var p=e.child;for(p!==null&&(p.return=e);p!==null;){var w=p.dependencies;if(w!==null){var L=p.child;w=w.firstContext;e:for(;w!==null;){var U=w;w=p;for(var X=0;X<t.length;X++)if(U.context===t[X]){w.lanes|=i,U=w.alternate,U!==null&&(U.lanes|=i),xo(w.return,i,e),l||(L=null);break e}w=U.next}}else if(p.tag===18){if(L=p.return,L===null)throw Error(o(341));L.lanes|=i,w=L.alternate,w!==null&&(w.lanes|=i),xo(L,i,e),L=null}else L=p.child;if(L!==null)L.return=p;else for(L=p;L!==null;){if(L===e){L=null;break}if(p=L.sibling,p!==null){p.return=L.return,L=p;break}L=L.return}p=L}}function Er(e,t,i,l){e=null;for(var p=t,w=!1;p!==null;){if(!w){if((p.flags&524288)!==0)w=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var L=p.alternate;if(L===null)throw Error(o(387));if(L=L.memoizedProps,L!==null){var U=p.type;cn(p.pendingProps.value,L.value)||(e!==null?e.push(U):e=[U])}}else if(p===Y.current){if(L=p.alternate,L===null)throw Error(o(387));L.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(e!==null?e.push($s):e=[$s])}p=p.return}e!==null&&Eo(t,e,i,l),t.flags|=262144}function Ll(e){for(e=e.firstContext;e!==null;){if(!cn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ji(e){Zi=e,Wn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function It(e){return nf(Zi,e)}function Ol(e,t){return Zi===null&&Ji(e),nf(e,t)}function nf(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Wn===null){if(e===null)throw Error(o(308));Wn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wn=Wn.next=t;return i}var xv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},Ev=n.unstable_scheduleCallback,kv=n.unstable_NormalPriority,Et={$$typeof:y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ko(){return{controller:new xv,data:new Map,refCount:0}}function Ss(e){e.refCount--,e.refCount===0&&Ev(kv,function(){e.controller.abort()})}var bs=null,Ao=0,kr=0,Ar=null;function Av(e,t){if(bs===null){var i=bs=[];Ao=0,kr=Rc(),Ar={status:"pending",value:void 0,then:function(l){i.push(l)}}}return Ao++,t.then(rf,rf),t}function rf(){if(--Ao===0&&bs!==null){Ar!==null&&(Ar.status="fulfilled");var e=bs;bs=null,kr=0,Ar=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Tv(e,t){var i=[],l={status:"pending",value:null,reason:null,then:function(p){i.push(p)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var p=0;p<i.length;p++)(0,i[p])(t)},function(p){for(l.status="rejected",l.reason=p,p=0;p<i.length;p++)(0,i[p])(void 0)}),l}var sf=V.S;V.S=function(e,t){Fd=tt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Av(e,t),sf!==null&&sf(e,t)};var er=z(null);function To(){var e=er.current;return e!==null?e:st.pooledCache}function Bl(e,t){t===null?j(er,er.current):j(er,t.pool)}function lf(){var e=To();return e===null?null:{parent:Et._currentValue,pool:e}}var Tr=Error(o(460)),Do=Error(o(474)),Nl=Error(o(542)),jl={then:function(){}};function af(e){return e=e.status,e==="fulfilled"||e==="rejected"}function of(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Vn,Vn),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,uf(e),e;default:if(typeof t.status=="string")t.then(Vn,Vn);else{if(e=st,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var p=t;p.status="fulfilled",p.value=l}},function(l){if(t.status==="pending"){var p=t;p.status="rejected",p.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,uf(e),e}throw nr=t,Tr}}function tr(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(nr=i,Tr):i}}var nr=null;function cf(){if(nr===null)throw Error(o(459));var e=nr;return nr=null,e}function uf(e){if(e===Tr||e===Nl)throw Error(o(483))}var Dr=null,Cs=0;function zl(e){var t=Cs;return Cs+=1,Dr===null&&(Dr=[]),of(Dr,e,t)}function ws(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Hl(e,t){throw t.$$typeof===_?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function hf(e){function t(ne,Q){if(e){var re=ne.deletions;re===null?(ne.deletions=[Q],ne.flags|=16):re.push(Q)}}function i(ne,Q){if(!e)return null;for(;Q!==null;)t(ne,Q),Q=Q.sibling;return null}function l(ne){for(var Q=new Map;ne!==null;)ne.key!==null?Q.set(ne.key,ne):Q.set(ne.index,ne),ne=ne.sibling;return Q}function p(ne,Q){return ne=Kn(ne,Q),ne.index=0,ne.sibling=null,ne}function w(ne,Q,re){return ne.index=re,e?(re=ne.alternate,re!==null?(re=re.index,re<Q?(ne.flags|=67108866,Q):re):(ne.flags|=67108866,Q)):(ne.flags|=1048576,Q)}function L(ne){return e&&ne.alternate===null&&(ne.flags|=67108866),ne}function U(ne,Q,re,pe){return Q===null||Q.tag!==6?(Q=_o(re,ne.mode,pe),Q.return=ne,Q):(Q=p(Q,re),Q.return=ne,Q)}function X(ne,Q,re,pe){var De=re.type;return De===x?fe(ne,Q,re.props.children,pe,re.key):Q!==null&&(Q.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===k&&tr(De)===Q.type)?(Q=p(Q,re.props),ws(Q,re),Q.return=ne,Q):(Q=Rl(re.type,re.key,re.props,null,ne.mode,pe),ws(Q,re),Q.return=ne,Q)}function se(ne,Q,re,pe){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==re.containerInfo||Q.stateNode.implementation!==re.implementation?(Q=vo(re,ne.mode,pe),Q.return=ne,Q):(Q=p(Q,re.children||[]),Q.return=ne,Q)}function fe(ne,Q,re,pe,De){return Q===null||Q.tag!==7?(Q=Xi(re,ne.mode,pe,De),Q.return=ne,Q):(Q=p(Q,re),Q.return=ne,Q)}function ge(ne,Q,re){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=_o(""+Q,ne.mode,re),Q.return=ne,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case C:return re=Rl(Q.type,Q.key,Q.props,null,ne.mode,re),ws(re,Q),re.return=ne,re;case E:return Q=vo(Q,ne.mode,re),Q.return=ne,Q;case k:return Q=tr(Q),ge(ne,Q,re)}if(W(Q)||P(Q))return Q=Xi(Q,ne.mode,re,null),Q.return=ne,Q;if(typeof Q.then=="function")return ge(ne,zl(Q),re);if(Q.$$typeof===y)return ge(ne,Ol(ne,Q),re);Hl(ne,Q)}return null}function le(ne,Q,re,pe){var De=Q!==null?Q.key:null;if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return De!==null?null:U(ne,Q,""+re,pe);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case C:return re.key===De?X(ne,Q,re,pe):null;case E:return re.key===De?se(ne,Q,re,pe):null;case k:return re=tr(re),le(ne,Q,re,pe)}if(W(re)||P(re))return De!==null?null:fe(ne,Q,re,pe,null);if(typeof re.then=="function")return le(ne,Q,zl(re),pe);if(re.$$typeof===y)return le(ne,Q,Ol(ne,re),pe);Hl(ne,re)}return null}function ce(ne,Q,re,pe,De){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return ne=ne.get(re)||null,U(Q,ne,""+pe,De);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case C:return ne=ne.get(pe.key===null?re:pe.key)||null,X(Q,ne,pe,De);case E:return ne=ne.get(pe.key===null?re:pe.key)||null,se(Q,ne,pe,De);case k:return pe=tr(pe),ce(ne,Q,re,pe,De)}if(W(pe)||P(pe))return ne=ne.get(re)||null,fe(Q,ne,pe,De,null);if(typeof pe.then=="function")return ce(ne,Q,re,zl(pe),De);if(pe.$$typeof===y)return ce(ne,Q,re,Ol(Q,pe),De);Hl(Q,pe)}return null}function xe(ne,Q,re,pe){for(var De=null,Xe=null,Te=Q,He=Q=0,Ve=null;Te!==null&&He<re.length;He++){Te.index>He?(Ve=Te,Te=null):Ve=Te.sibling;var Qe=le(ne,Te,re[He],pe);if(Qe===null){Te===null&&(Te=Ve);break}e&&Te&&Qe.alternate===null&&t(ne,Te),Q=w(Qe,Q,He),Xe===null?De=Qe:Xe.sibling=Qe,Xe=Qe,Te=Ve}if(He===re.length)return i(ne,Te),Ke&&Yn(ne,He),De;if(Te===null){for(;He<re.length;He++)Te=ge(ne,re[He],pe),Te!==null&&(Q=w(Te,Q,He),Xe===null?De=Te:Xe.sibling=Te,Xe=Te);return Ke&&Yn(ne,He),De}for(Te=l(Te);He<re.length;He++)Ve=ce(Te,ne,He,re[He],pe),Ve!==null&&(e&&Ve.alternate!==null&&Te.delete(Ve.key===null?He:Ve.key),Q=w(Ve,Q,He),Xe===null?De=Ve:Xe.sibling=Ve,Xe=Ve);return e&&Te.forEach(function(Ni){return t(ne,Ni)}),Ke&&Yn(ne,He),De}function Oe(ne,Q,re,pe){if(re==null)throw Error(o(151));for(var De=null,Xe=null,Te=Q,He=Q=0,Ve=null,Qe=re.next();Te!==null&&!Qe.done;He++,Qe=re.next()){Te.index>He?(Ve=Te,Te=null):Ve=Te.sibling;var Ni=le(ne,Te,Qe.value,pe);if(Ni===null){Te===null&&(Te=Ve);break}e&&Te&&Ni.alternate===null&&t(ne,Te),Q=w(Ni,Q,He),Xe===null?De=Ni:Xe.sibling=Ni,Xe=Ni,Te=Ve}if(Qe.done)return i(ne,Te),Ke&&Yn(ne,He),De;if(Te===null){for(;!Qe.done;He++,Qe=re.next())Qe=ge(ne,Qe.value,pe),Qe!==null&&(Q=w(Qe,Q,He),Xe===null?De=Qe:Xe.sibling=Qe,Xe=Qe);return Ke&&Yn(ne,He),De}for(Te=l(Te);!Qe.done;He++,Qe=re.next())Qe=ce(Te,ne,He,Qe.value,pe),Qe!==null&&(e&&Qe.alternate!==null&&Te.delete(Qe.key===null?He:Qe.key),Q=w(Qe,Q,He),Xe===null?De=Qe:Xe.sibling=Qe,Xe=Qe);return e&&Te.forEach(function(I0){return t(ne,I0)}),Ke&&Yn(ne,He),De}function rt(ne,Q,re,pe){if(typeof re=="object"&&re!==null&&re.type===x&&re.key===null&&(re=re.props.children),typeof re=="object"&&re!==null){switch(re.$$typeof){case C:e:{for(var De=re.key;Q!==null;){if(Q.key===De){if(De=re.type,De===x){if(Q.tag===7){i(ne,Q.sibling),pe=p(Q,re.props.children),pe.return=ne,ne=pe;break e}}else if(Q.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===k&&tr(De)===Q.type){i(ne,Q.sibling),pe=p(Q,re.props),ws(pe,re),pe.return=ne,ne=pe;break e}i(ne,Q);break}else t(ne,Q);Q=Q.sibling}re.type===x?(pe=Xi(re.props.children,ne.mode,pe,re.key),pe.return=ne,ne=pe):(pe=Rl(re.type,re.key,re.props,null,ne.mode,pe),ws(pe,re),pe.return=ne,ne=pe)}return L(ne);case E:e:{for(De=re.key;Q!==null;){if(Q.key===De)if(Q.tag===4&&Q.stateNode.containerInfo===re.containerInfo&&Q.stateNode.implementation===re.implementation){i(ne,Q.sibling),pe=p(Q,re.children||[]),pe.return=ne,ne=pe;break e}else{i(ne,Q);break}else t(ne,Q);Q=Q.sibling}pe=vo(re,ne.mode,pe),pe.return=ne,ne=pe}return L(ne);case k:return re=tr(re),rt(ne,Q,re,pe)}if(W(re))return xe(ne,Q,re,pe);if(P(re)){if(De=P(re),typeof De!="function")throw Error(o(150));return re=De.call(re),Oe(ne,Q,re,pe)}if(typeof re.then=="function")return rt(ne,Q,zl(re),pe);if(re.$$typeof===y)return rt(ne,Q,Ol(ne,re),pe);Hl(ne,re)}return typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint"?(re=""+re,Q!==null&&Q.tag===6?(i(ne,Q.sibling),pe=p(Q,re),pe.return=ne,ne=pe):(i(ne,Q),pe=_o(re,ne.mode,pe),pe.return=ne,ne=pe),L(ne)):i(ne,Q)}return function(ne,Q,re,pe){try{Cs=0;var De=rt(ne,Q,re,pe);return Dr=null,De}catch(Te){if(Te===Tr||Te===Nl)throw Te;var Xe=un(29,Te,null,ne.mode);return Xe.lanes=pe,Xe.return=ne,Xe}finally{}}}var ir=hf(!0),ff=hf(!1),vi=!1;function Ro(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Mo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function yi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Si(e,t,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ze&2)!==0){var p=l.pending;return p===null?t.next=t:(t.next=p.next,p.next=t),l.pending=t,t=Dl(e),Yh(e,null,i),t}return Tl(e,l,t,i),Dl(e)}function xs(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,qi(e,i)}}function Lo(e,t){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var p=null,w=null;if(i=i.firstBaseUpdate,i!==null){do{var L={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};w===null?p=w=L:w=w.next=L,i=i.next}while(i!==null);w===null?p=w=t:w=w.next=t}else p=w=t;i={baseState:l.baseState,firstBaseUpdate:p,lastBaseUpdate:w,shared:l.shared,callbacks:l.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var Oo=!1;function Es(){if(Oo){var e=Ar;if(e!==null)throw e}}function ks(e,t,i,l){Oo=!1;var p=e.updateQueue;vi=!1;var w=p.firstBaseUpdate,L=p.lastBaseUpdate,U=p.shared.pending;if(U!==null){p.shared.pending=null;var X=U,se=X.next;X.next=null,L===null?w=se:L.next=se,L=X;var fe=e.alternate;fe!==null&&(fe=fe.updateQueue,U=fe.lastBaseUpdate,U!==L&&(U===null?fe.firstBaseUpdate=se:U.next=se,fe.lastBaseUpdate=X))}if(w!==null){var ge=p.baseState;L=0,fe=se=X=null,U=w;do{var le=U.lane&-536870913,ce=le!==U.lane;if(ce?(Ge&le)===le:(l&le)===le){le!==0&&le===kr&&(Oo=!0),fe!==null&&(fe=fe.next={lane:0,tag:U.tag,payload:U.payload,callback:null,next:null});e:{var xe=e,Oe=U;le=t;var rt=i;switch(Oe.tag){case 1:if(xe=Oe.payload,typeof xe=="function"){ge=xe.call(rt,ge,le);break e}ge=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Oe.payload,le=typeof xe=="function"?xe.call(rt,ge,le):xe,le==null)break e;ge=u({},ge,le);break e;case 2:vi=!0}}le=U.callback,le!==null&&(e.flags|=64,ce&&(e.flags|=8192),ce=p.callbacks,ce===null?p.callbacks=[le]:ce.push(le))}else ce={lane:le,tag:U.tag,payload:U.payload,callback:U.callback,next:null},fe===null?(se=fe=ce,X=ge):fe=fe.next=ce,L|=le;if(U=U.next,U===null){if(U=p.shared.pending,U===null)break;ce=U,U=ce.next,ce.next=null,p.lastBaseUpdate=ce,p.shared.pending=null}}while(!0);fe===null&&(X=ge),p.baseState=X,p.firstBaseUpdate=se,p.lastBaseUpdate=fe,w===null&&(p.shared.lanes=0),Ei|=L,e.lanes=L,e.memoizedState=ge}}function df(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function pf(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)df(i[e],t)}var Rr=z(null),Il=z(0);function mf(e,t){e=si,j(Il,e),j(Rr,t),si=e|t.baseLanes}function Bo(){j(Il,si),j(Rr,Rr.current)}function No(){si=Il.current,G(Rr),G(Il)}var hn=z(null),En=null;function bi(e){var t=e.alternate;j(Ct,Ct.current&1),j(hn,e),En===null&&(t===null||Rr.current!==null||t.memoizedState!==null)&&(En=e)}function jo(e){j(Ct,Ct.current),j(hn,e),En===null&&(En=e)}function gf(e){e.tag===22?(j(Ct,Ct.current),j(hn,e),En===null&&(En=e)):Ci()}function Ci(){j(Ct,Ct.current),j(hn,hn.current)}function fn(e){G(hn),En===e&&(En=null),G(Ct)}var Ct=z(0);function Ul(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Fc(i)||qc(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Qn=0,ze=null,nt=null,kt=null,Pl=!1,Mr=!1,rr=!1,Fl=0,As=0,Lr=null,Dv=0;function _t(){throw Error(o(321))}function zo(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!cn(e[i],t[i]))return!1;return!0}function Ho(e,t,i,l,p,w){return Qn=w,ze=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,V.H=e===null||e.memoizedState===null?Jf:Jo,rr=!1,w=i(l,p),rr=!1,Mr&&(w=vf(t,i,l,p)),_f(e),w}function _f(e){V.H=Rs;var t=nt!==null&&nt.next!==null;if(Qn=0,kt=nt=ze=null,Pl=!1,As=0,Lr=null,t)throw Error(o(300));e===null||At||(e=e.dependencies,e!==null&&Ll(e)&&(At=!0))}function vf(e,t,i,l){ze=e;var p=0;do{if(Mr&&(Lr=null),As=0,Mr=!1,25<=p)throw Error(o(301));if(p+=1,kt=nt=null,e.updateQueue!=null){var w=e.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}V.H=ed,w=t(i,l)}while(Mr);return w}function Rv(){var e=V.H,t=e.useState()[0];return t=typeof t.then=="function"?Ts(t):t,e=e.useState()[0],(nt!==null?nt.memoizedState:null)!==e&&(ze.flags|=1024),t}function Io(){var e=Fl!==0;return Fl=0,e}function Uo(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Po(e){if(Pl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Pl=!1}Qn=0,kt=nt=ze=null,Mr=!1,As=Fl=0,Lr=null}function Xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kt===null?ze.memoizedState=kt=e:kt=kt.next=e,kt}function wt(){if(nt===null){var e=ze.alternate;e=e!==null?e.memoizedState:null}else e=nt.next;var t=kt===null?ze.memoizedState:kt.next;if(t!==null)kt=t,nt=e;else{if(e===null)throw ze.alternate===null?Error(o(467)):Error(o(310));nt=e,e={memoizedState:nt.memoizedState,baseState:nt.baseState,baseQueue:nt.baseQueue,queue:nt.queue,next:null},kt===null?ze.memoizedState=kt=e:kt=kt.next=e}return kt}function ql(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ts(e){var t=As;return As+=1,Lr===null&&(Lr=[]),e=of(Lr,e,t),t=ze,(kt===null?t.memoizedState:kt.next)===null&&(t=t.alternate,V.H=t===null||t.memoizedState===null?Jf:Jo),e}function Gl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ts(e);if(e.$$typeof===y)return It(e)}throw Error(o(438,String(e)))}function Fo(e){var t=null,i=ze.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var l=ze.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(p){return p.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=ql(),ze.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),l=0;l<e;l++)i[l]=N;return t.index++,i}function Zn(e,t){return typeof t=="function"?t(e):t}function Vl(e){var t=wt();return qo(t,nt,e)}function qo(e,t,i){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=i;var p=e.baseQueue,w=l.pending;if(w!==null){if(p!==null){var L=p.next;p.next=w.next,w.next=L}t.baseQueue=p=w,l.pending=null}if(w=e.baseState,p===null)e.memoizedState=w;else{t=p.next;var U=L=null,X=null,se=t,fe=!1;do{var ge=se.lane&-536870913;if(ge!==se.lane?(Ge&ge)===ge:(Qn&ge)===ge){var le=se.revertLane;if(le===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),ge===kr&&(fe=!0);else if((Qn&le)===le){se=se.next,le===kr&&(fe=!0);continue}else ge={lane:0,revertLane:se.revertLane,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},X===null?(U=X=ge,L=w):X=X.next=ge,ze.lanes|=le,Ei|=le;ge=se.action,rr&&i(w,ge),w=se.hasEagerState?se.eagerState:i(w,ge)}else le={lane:ge,revertLane:se.revertLane,gesture:se.gesture,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},X===null?(U=X=le,L=w):X=X.next=le,ze.lanes|=ge,Ei|=ge;se=se.next}while(se!==null&&se!==t);if(X===null?L=w:X.next=U,!cn(w,e.memoizedState)&&(At=!0,fe&&(i=Ar,i!==null)))throw i;e.memoizedState=w,e.baseState=L,e.baseQueue=X,l.lastRenderedState=w}return p===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Go(e){var t=wt(),i=t.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=e;var l=i.dispatch,p=i.pending,w=t.memoizedState;if(p!==null){i.pending=null;var L=p=p.next;do w=e(w,L.action),L=L.next;while(L!==p);cn(w,t.memoizedState)||(At=!0),t.memoizedState=w,t.baseQueue===null&&(t.baseState=w),i.lastRenderedState=w}return[w,l]}function yf(e,t,i){var l=ze,p=wt(),w=Ke;if(w){if(i===void 0)throw Error(o(407));i=i()}else i=t();var L=!cn((nt||p).memoizedState,i);if(L&&(p.memoizedState=i,At=!0),p=p.queue,Ko(Cf.bind(null,l,p,e),[e]),p.getSnapshot!==t||L||kt!==null&&kt.memoizedState.tag&1){if(l.flags|=2048,Or(9,{destroy:void 0},bf.bind(null,l,p,i,t),null),st===null)throw Error(o(349));w||(Qn&127)!==0||Sf(l,t,i)}return i}function Sf(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=ze.updateQueue,t===null?(t=ql(),ze.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function bf(e,t,i,l){t.value=i,t.getSnapshot=l,wf(t)&&xf(e)}function Cf(e,t,i){return i(function(){wf(t)&&xf(e)})}function wf(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!cn(e,i)}catch{return!0}}function xf(e){var t=Wi(e,2);t!==null&&sn(t,e,2)}function Vo(e){var t=Xt();if(typeof e=="function"){var i=e;if(e=i(),rr){Rt(!0);try{i()}finally{Rt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:e},t}function Ef(e,t,i,l){return e.baseState=i,qo(e,nt,typeof l=="function"?l:Zn)}function Mv(e,t,i,l,p){if(Yl(e))throw Error(o(485));if(e=t.action,e!==null){var w={payload:p,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(L){w.listeners.push(L)}};V.T!==null?i(!0):w.isTransition=!1,l(w),i=t.pending,i===null?(w.next=t.pending=w,kf(t,w)):(w.next=i.next,t.pending=i.next=w)}}function kf(e,t){var i=t.action,l=t.payload,p=e.state;if(t.isTransition){var w=V.T,L={};V.T=L;try{var U=i(p,l),X=V.S;X!==null&&X(L,U),Af(e,t,U)}catch(se){$o(e,t,se)}finally{w!==null&&L.types!==null&&(w.types=L.types),V.T=w}}else try{w=i(p,l),Af(e,t,w)}catch(se){$o(e,t,se)}}function Af(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(l){Tf(e,t,l)},function(l){return $o(e,t,l)}):Tf(e,t,i)}function Tf(e,t,i){t.status="fulfilled",t.value=i,Df(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,kf(e,i)))}function $o(e,t,i){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=i,Df(t),t=t.next;while(t!==l)}e.action=null}function Df(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Rf(e,t){return t}function Mf(e,t){if(Ke){var i=st.formState;if(i!==null){e:{var l=ze;if(Ke){if(ht){t:{for(var p=ht,w=xn;p.nodeType!==8;){if(!w){p=null;break t}if(p=kn(p.nextSibling),p===null){p=null;break t}}w=p.data,p=w==="F!"||w==="F"?p:null}if(p){ht=kn(p.nextSibling),l=p.data==="F!";break e}}gi(l)}l=!1}l&&(t=i[0])}}return i=Xt(),i.memoizedState=i.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rf,lastRenderedState:t},i.queue=l,i=Xf.bind(null,ze,l),l.dispatch=i,l=Vo(!1),w=Zo.bind(null,ze,!1,l.queue),l=Xt(),p={state:t,dispatch:null,action:e,pending:null},l.queue=p,i=Mv.bind(null,ze,p,w,i),p.dispatch=i,l.memoizedState=e,[t,i,!1]}function Lf(e){var t=wt();return Of(t,nt,e)}function Of(e,t,i){if(t=qo(e,t,Rf)[0],e=Vl(Zn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Ts(t)}catch(L){throw L===Tr?Nl:L}else l=t;t=wt();var p=t.queue,w=p.dispatch;return i!==t.memoizedState&&(ze.flags|=2048,Or(9,{destroy:void 0},Lv.bind(null,p,i),null)),[l,w,e]}function Lv(e,t){e.action=t}function Bf(e){var t=wt(),i=nt;if(i!==null)return Of(t,i,e);wt(),t=t.memoizedState,i=wt();var l=i.queue.dispatch;return i.memoizedState=e,[t,l,!1]}function Or(e,t,i,l){return e={tag:e,create:i,deps:l,inst:t,next:null},t=ze.updateQueue,t===null&&(t=ql(),ze.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(l=i.next,i.next=e,e.next=l,t.lastEffect=e),e}function Nf(){return wt().memoizedState}function $l(e,t,i,l){var p=Xt();ze.flags|=e,p.memoizedState=Or(1|t,{destroy:void 0},i,l===void 0?null:l)}function Kl(e,t,i,l){var p=wt();l=l===void 0?null:l;var w=p.memoizedState.inst;nt!==null&&l!==null&&zo(l,nt.memoizedState.deps)?p.memoizedState=Or(t,w,i,l):(ze.flags|=e,p.memoizedState=Or(1|t,w,i,l))}function jf(e,t){$l(8390656,8,e,t)}function Ko(e,t){Kl(2048,8,e,t)}function Ov(e){ze.flags|=4;var t=ze.updateQueue;if(t===null)t=ql(),ze.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function zf(e){var t=wt().memoizedState;return Ov({ref:t,nextImpl:e}),function(){if((Ze&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Hf(e,t){return Kl(4,2,e,t)}function If(e,t){return Kl(4,4,e,t)}function Uf(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Pf(e,t,i){i=i!=null?i.concat([e]):null,Kl(4,4,Uf.bind(null,t,e),i)}function Yo(){}function Ff(e,t){var i=wt();t=t===void 0?null:t;var l=i.memoizedState;return t!==null&&zo(t,l[1])?l[0]:(i.memoizedState=[e,t],e)}function qf(e,t){var i=wt();t=t===void 0?null:t;var l=i.memoizedState;if(t!==null&&zo(t,l[1]))return l[0];if(l=e(),rr){Rt(!0);try{e()}finally{Rt(!1)}}return i.memoizedState=[l,t],l}function Wo(e,t,i){return i===void 0||(Qn&1073741824)!==0&&(Ge&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Gd(),ze.lanes|=e,Ei|=e,i)}function Gf(e,t,i,l){return cn(i,t)?i:Rr.current!==null?(e=Wo(e,i,l),cn(e,t)||(At=!0),e):(Qn&42)===0||(Qn&1073741824)!==0&&(Ge&261930)===0?(At=!0,e.memoizedState=i):(e=Gd(),ze.lanes|=e,Ei|=e,t)}function Vf(e,t,i,l,p){var w=$.p;$.p=w!==0&&8>w?w:8;var L=V.T,U={};V.T=U,Zo(e,!1,t,i);try{var X=p(),se=V.S;if(se!==null&&se(U,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var fe=Tv(X,l);Ds(e,t,fe,mn(e))}else Ds(e,t,l,mn(e))}catch(ge){Ds(e,t,{then:function(){},status:"rejected",reason:ge},mn())}finally{$.p=w,L!==null&&U.types!==null&&(L.types=U.types),V.T=L}}function Bv(){}function Xo(e,t,i,l){if(e.tag!==5)throw Error(o(476));var p=$f(e).queue;Vf(e,p,t,J,i===null?Bv:function(){return Kf(e),i(l)})}function $f(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:J},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zn,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Kf(e){var t=$f(e);t.next===null&&(t=e.alternate.memoizedState),Ds(e,t.next.queue,{},mn())}function Qo(){return It($s)}function Yf(){return wt().memoizedState}function Wf(){return wt().memoizedState}function Nv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=mn();e=yi(i);var l=Si(t,e,i);l!==null&&(sn(l,t,i),xs(l,t,i)),t={cache:ko()},e.payload=t;return}t=t.return}}function jv(e,t,i){var l=mn();i={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Yl(e)?Qf(t,i):(i=mo(e,t,i,l),i!==null&&(sn(i,e,l),Zf(i,t,l)))}function Xf(e,t,i){var l=mn();Ds(e,t,i,l)}function Ds(e,t,i,l){var p={lane:l,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Yl(e))Qf(t,p);else{var w=e.alternate;if(e.lanes===0&&(w===null||w.lanes===0)&&(w=t.lastRenderedReducer,w!==null))try{var L=t.lastRenderedState,U=w(L,i);if(p.hasEagerState=!0,p.eagerState=U,cn(U,L))return Tl(e,t,p,0),st===null&&Al(),!1}catch{}finally{}if(i=mo(e,t,p,l),i!==null)return sn(i,e,l),Zf(i,t,l),!0}return!1}function Zo(e,t,i,l){if(l={lane:2,revertLane:Rc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Yl(e)){if(t)throw Error(o(479))}else t=mo(e,i,l,2),t!==null&&sn(t,e,2)}function Yl(e){var t=e.alternate;return e===ze||t!==null&&t===ze}function Qf(e,t){Mr=Pl=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Zf(e,t,i){if((i&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,i|=l,t.lanes=i,qi(e,i)}}var Rs={readContext:It,use:Gl,useCallback:_t,useContext:_t,useEffect:_t,useImperativeHandle:_t,useLayoutEffect:_t,useInsertionEffect:_t,useMemo:_t,useReducer:_t,useRef:_t,useState:_t,useDebugValue:_t,useDeferredValue:_t,useTransition:_t,useSyncExternalStore:_t,useId:_t,useHostTransitionStatus:_t,useFormState:_t,useActionState:_t,useOptimistic:_t,useMemoCache:_t,useCacheRefresh:_t};Rs.useEffectEvent=_t;var Jf={readContext:It,use:Gl,useCallback:function(e,t){return Xt().memoizedState=[e,t===void 0?null:t],e},useContext:It,useEffect:jf,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,$l(4194308,4,Uf.bind(null,t,e),i)},useLayoutEffect:function(e,t){return $l(4194308,4,e,t)},useInsertionEffect:function(e,t){$l(4,2,e,t)},useMemo:function(e,t){var i=Xt();t=t===void 0?null:t;var l=e();if(rr){Rt(!0);try{e()}finally{Rt(!1)}}return i.memoizedState=[l,t],l},useReducer:function(e,t,i){var l=Xt();if(i!==void 0){var p=i(t);if(rr){Rt(!0);try{i(t)}finally{Rt(!1)}}}else p=t;return l.memoizedState=l.baseState=p,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:p},l.queue=e,e=e.dispatch=jv.bind(null,ze,e),[l.memoizedState,e]},useRef:function(e){var t=Xt();return e={current:e},t.memoizedState=e},useState:function(e){e=Vo(e);var t=e.queue,i=Xf.bind(null,ze,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Yo,useDeferredValue:function(e,t){var i=Xt();return Wo(i,e,t)},useTransition:function(){var e=Vo(!1);return e=Vf.bind(null,ze,e.queue,!0,!1),Xt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var l=ze,p=Xt();if(Ke){if(i===void 0)throw Error(o(407));i=i()}else{if(i=t(),st===null)throw Error(o(349));(Ge&127)!==0||Sf(l,t,i)}p.memoizedState=i;var w={value:i,getSnapshot:t};return p.queue=w,jf(Cf.bind(null,l,w,e),[e]),l.flags|=2048,Or(9,{destroy:void 0},bf.bind(null,l,w,i,t),null),i},useId:function(){var e=Xt(),t=st.identifierPrefix;if(Ke){var i=Hn,l=zn;i=(l&~(1<<32-Ee(l)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Fl++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Dv++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Qo,useFormState:Mf,useActionState:Mf,useOptimistic:function(e){var t=Xt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Zo.bind(null,ze,!0,i),i.dispatch=t,[e,t]},useMemoCache:Fo,useCacheRefresh:function(){return Xt().memoizedState=Nv.bind(null,ze)},useEffectEvent:function(e){var t=Xt(),i={impl:e};return t.memoizedState=i,function(){if((Ze&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},Jo={readContext:It,use:Gl,useCallback:Ff,useContext:It,useEffect:Ko,useImperativeHandle:Pf,useInsertionEffect:Hf,useLayoutEffect:If,useMemo:qf,useReducer:Vl,useRef:Nf,useState:function(){return Vl(Zn)},useDebugValue:Yo,useDeferredValue:function(e,t){var i=wt();return Gf(i,nt.memoizedState,e,t)},useTransition:function(){var e=Vl(Zn)[0],t=wt().memoizedState;return[typeof e=="boolean"?e:Ts(e),t]},useSyncExternalStore:yf,useId:Yf,useHostTransitionStatus:Qo,useFormState:Lf,useActionState:Lf,useOptimistic:function(e,t){var i=wt();return Ef(i,nt,e,t)},useMemoCache:Fo,useCacheRefresh:Wf};Jo.useEffectEvent=zf;var ed={readContext:It,use:Gl,useCallback:Ff,useContext:It,useEffect:Ko,useImperativeHandle:Pf,useInsertionEffect:Hf,useLayoutEffect:If,useMemo:qf,useReducer:Go,useRef:Nf,useState:function(){return Go(Zn)},useDebugValue:Yo,useDeferredValue:function(e,t){var i=wt();return nt===null?Wo(i,e,t):Gf(i,nt.memoizedState,e,t)},useTransition:function(){var e=Go(Zn)[0],t=wt().memoizedState;return[typeof e=="boolean"?e:Ts(e),t]},useSyncExternalStore:yf,useId:Yf,useHostTransitionStatus:Qo,useFormState:Bf,useActionState:Bf,useOptimistic:function(e,t){var i=wt();return nt!==null?Ef(i,nt,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Fo,useCacheRefresh:Wf};ed.useEffectEvent=zf;function ec(e,t,i,l){t=e.memoizedState,i=i(l,t),i=i==null?t:u({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var tc={enqueueSetState:function(e,t,i){e=e._reactInternals;var l=mn(),p=yi(l);p.payload=t,i!=null&&(p.callback=i),t=Si(e,p,l),t!==null&&(sn(t,e,l),xs(t,e,l))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var l=mn(),p=yi(l);p.tag=1,p.payload=t,i!=null&&(p.callback=i),t=Si(e,p,l),t!==null&&(sn(t,e,l),xs(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=mn(),l=yi(i);l.tag=2,t!=null&&(l.callback=t),t=Si(e,l,i),t!==null&&(sn(t,e,i),xs(t,e,i))}};function td(e,t,i,l,p,w,L){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,w,L):t.prototype&&t.prototype.isPureReactComponent?!gs(i,l)||!gs(p,w):!0}function nd(e,t,i,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,l),t.state!==e&&tc.enqueueReplaceState(t,t.state,null)}function sr(e,t){var i=t;if("ref"in t){i={};for(var l in t)l!=="ref"&&(i[l]=t[l])}if(e=e.defaultProps){i===t&&(i=u({},i));for(var p in e)i[p]===void 0&&(i[p]=e[p])}return i}function id(e){kl(e)}function rd(e){console.error(e)}function sd(e){kl(e)}function Wl(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function ld(e,t,i){try{var l=e.onCaughtError;l(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function nc(e,t,i){return i=yi(i),i.tag=3,i.payload={element:null},i.callback=function(){Wl(e,t)},i}function ad(e){return e=yi(e),e.tag=3,e}function od(e,t,i,l){var p=i.type.getDerivedStateFromError;if(typeof p=="function"){var w=l.value;e.payload=function(){return p(w)},e.callback=function(){ld(t,i,l)}}var L=i.stateNode;L!==null&&typeof L.componentDidCatch=="function"&&(e.callback=function(){ld(t,i,l),typeof p!="function"&&(ki===null?ki=new Set([this]):ki.add(this));var U=l.stack;this.componentDidCatch(l.value,{componentStack:U!==null?U:""})})}function zv(e,t,i,l,p){if(i.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=i.alternate,t!==null&&Er(t,i,p,!0),i=hn.current,i!==null){switch(i.tag){case 31:case 13:return En===null?aa():i.alternate===null&&vt===0&&(vt=3),i.flags&=-257,i.flags|=65536,i.lanes=p,l===jl?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([l]):t.add(l),Ac(e,l,p)),!1;case 22:return i.flags|=65536,l===jl?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([l]):i.add(l)),Ac(e,l,p)),!1}throw Error(o(435,i.tag))}return Ac(e,l,p),aa(),!1}if(Ke)return t=hn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=p,l!==bo&&(e=Error(o(422),{cause:l}),ys(bn(e,i)))):(l!==bo&&(t=Error(o(423),{cause:l}),ys(bn(t,i))),e=e.current.alternate,e.flags|=65536,p&=-p,e.lanes|=p,l=bn(l,i),p=nc(e.stateNode,l,p),Lo(e,p),vt!==4&&(vt=2)),!1;var w=Error(o(520),{cause:l});if(w=bn(w,i),Hs===null?Hs=[w]:Hs.push(w),vt!==4&&(vt=2),t===null)return!0;l=bn(l,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=p&-p,i.lanes|=e,e=nc(i.stateNode,l,e),Lo(i,e),!1;case 1:if(t=i.type,w=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(ki===null||!ki.has(w))))return i.flags|=65536,p&=-p,i.lanes|=p,p=ad(p),od(p,e,i,l),Lo(i,p),!1}i=i.return}while(i!==null);return!1}var ic=Error(o(461)),At=!1;function Ut(e,t,i,l){t.child=e===null?ff(t,null,i,l):ir(t,e.child,i,l)}function cd(e,t,i,l,p){i=i.render;var w=t.ref;if("ref"in l){var L={};for(var U in l)U!=="ref"&&(L[U]=l[U])}else L=l;return Ji(t),l=Ho(e,t,i,L,w,p),U=Io(),e!==null&&!At?(Uo(e,t,p),Jn(e,t,p)):(Ke&&U&&yo(t),t.flags|=1,Ut(e,t,l,p),t.child)}function ud(e,t,i,l,p){if(e===null){var w=i.type;return typeof w=="function"&&!go(w)&&w.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=w,hd(e,t,w,l,p)):(e=Rl(i.type,null,l,t,t.mode,p),e.ref=t.ref,e.return=t,t.child=e)}if(w=e.child,!hc(e,p)){var L=w.memoizedProps;if(i=i.compare,i=i!==null?i:gs,i(L,l)&&e.ref===t.ref)return Jn(e,t,p)}return t.flags|=1,e=Kn(w,l),e.ref=t.ref,e.return=t,t.child=e}function hd(e,t,i,l,p){if(e!==null){var w=e.memoizedProps;if(gs(w,l)&&e.ref===t.ref)if(At=!1,t.pendingProps=l=w,hc(e,p))(e.flags&131072)!==0&&(At=!0);else return t.lanes=e.lanes,Jn(e,t,p)}return rc(e,t,i,l,p)}function fd(e,t,i,l){var p=l.children,w=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(w=w!==null?w.baseLanes|i:i,e!==null){for(l=t.child=e.child,p=0;l!==null;)p=p|l.lanes|l.childLanes,l=l.sibling;l=p&~w}else l=0,t.child=null;return dd(e,t,w,i,l)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Bl(t,w!==null?w.cachePool:null),w!==null?mf(t,w):Bo(),gf(t);else return l=t.lanes=536870912,dd(e,t,w!==null?w.baseLanes|i:i,i,l)}else w!==null?(Bl(t,w.cachePool),mf(t,w),Ci(),t.memoizedState=null):(e!==null&&Bl(t,null),Bo(),Ci());return Ut(e,t,p,i),t.child}function Ms(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function dd(e,t,i,l,p){var w=To();return w=w===null?null:{parent:Et._currentValue,pool:w},t.memoizedState={baseLanes:i,cachePool:w},e!==null&&Bl(t,null),Bo(),gf(t),e!==null&&Er(e,t,l,!0),t.childLanes=p,null}function Xl(e,t){return t=Zl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function pd(e,t,i){return ir(t,e.child,null,i),e=Xl(t,t.pendingProps),e.flags|=2,fn(t),t.memoizedState=null,e}function Hv(e,t,i){var l=t.pendingProps,p=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ke){if(l.mode==="hidden")return e=Xl(t,l),t.lanes=536870912,Ms(null,e);if(jo(t),(e=ht)?(e=kp(e,xn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pi!==null?{id:zn,overflow:Hn}:null,retryLane:536870912,hydrationErrors:null},i=Xh(e),i.return=t,t.child=i,Ht=t,ht=null)):e=null,e===null)throw gi(t);return t.lanes=536870912,null}return Xl(t,l)}var w=e.memoizedState;if(w!==null){var L=w.dehydrated;if(jo(t),p)if(t.flags&256)t.flags&=-257,t=pd(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(At||Er(e,t,i,!1),p=(i&e.childLanes)!==0,At||p){if(l=st,l!==null&&(L=dl(l,i),L!==0&&L!==w.retryLane))throw w.retryLane=L,Wi(e,L),sn(l,e,L),ic;aa(),t=pd(e,t,i)}else e=w.treeContext,ht=kn(L.nextSibling),Ht=t,Ke=!0,mi=null,xn=!1,e!==null&&Jh(t,e),t=Xl(t,l),t.flags|=4096;return t}return e=Kn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ql(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(o(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function rc(e,t,i,l,p){return Ji(t),i=Ho(e,t,i,l,void 0,p),l=Io(),e!==null&&!At?(Uo(e,t,p),Jn(e,t,p)):(Ke&&l&&yo(t),t.flags|=1,Ut(e,t,i,p),t.child)}function md(e,t,i,l,p,w){return Ji(t),t.updateQueue=null,i=vf(t,l,i,p),_f(e),l=Io(),e!==null&&!At?(Uo(e,t,w),Jn(e,t,w)):(Ke&&l&&yo(t),t.flags|=1,Ut(e,t,i,w),t.child)}function gd(e,t,i,l,p){if(Ji(t),t.stateNode===null){var w=br,L=i.contextType;typeof L=="object"&&L!==null&&(w=It(L)),w=new i(l,w),t.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=tc,t.stateNode=w,w._reactInternals=t,w=t.stateNode,w.props=l,w.state=t.memoizedState,w.refs={},Ro(t),L=i.contextType,w.context=typeof L=="object"&&L!==null?It(L):br,w.state=t.memoizedState,L=i.getDerivedStateFromProps,typeof L=="function"&&(ec(t,i,L,l),w.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(L=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),L!==w.state&&tc.enqueueReplaceState(w,w.state,null),ks(t,l,w,p),Es(),w.state=t.memoizedState),typeof w.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){w=t.stateNode;var U=t.memoizedProps,X=sr(i,U);w.props=X;var se=w.context,fe=i.contextType;L=br,typeof fe=="object"&&fe!==null&&(L=It(fe));var ge=i.getDerivedStateFromProps;fe=typeof ge=="function"||typeof w.getSnapshotBeforeUpdate=="function",U=t.pendingProps!==U,fe||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(U||se!==L)&&nd(t,w,l,L),vi=!1;var le=t.memoizedState;w.state=le,ks(t,l,w,p),Es(),se=t.memoizedState,U||le!==se||vi?(typeof ge=="function"&&(ec(t,i,ge,l),se=t.memoizedState),(X=vi||td(t,i,X,l,le,se,L))?(fe||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(t.flags|=4194308)):(typeof w.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=se),w.props=l,w.state=se,w.context=L,l=X):(typeof w.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{w=t.stateNode,Mo(e,t),L=t.memoizedProps,fe=sr(i,L),w.props=fe,ge=t.pendingProps,le=w.context,se=i.contextType,X=br,typeof se=="object"&&se!==null&&(X=It(se)),U=i.getDerivedStateFromProps,(se=typeof U=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(L!==ge||le!==X)&&nd(t,w,l,X),vi=!1,le=t.memoizedState,w.state=le,ks(t,l,w,p),Es();var ce=t.memoizedState;L!==ge||le!==ce||vi||e!==null&&e.dependencies!==null&&Ll(e.dependencies)?(typeof U=="function"&&(ec(t,i,U,l),ce=t.memoizedState),(fe=vi||td(t,i,fe,l,le,ce,X)||e!==null&&e.dependencies!==null&&Ll(e.dependencies))?(se||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(l,ce,X),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(l,ce,X)),typeof w.componentDidUpdate=="function"&&(t.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof w.componentDidUpdate!="function"||L===e.memoizedProps&&le===e.memoizedState||(t.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||L===e.memoizedProps&&le===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=ce),w.props=l,w.state=ce,w.context=X,l=fe):(typeof w.componentDidUpdate!="function"||L===e.memoizedProps&&le===e.memoizedState||(t.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||L===e.memoizedProps&&le===e.memoizedState||(t.flags|=1024),l=!1)}return w=l,Ql(e,t),l=(t.flags&128)!==0,w||l?(w=t.stateNode,i=l&&typeof i.getDerivedStateFromError!="function"?null:w.render(),t.flags|=1,e!==null&&l?(t.child=ir(t,e.child,null,p),t.child=ir(t,null,i,p)):Ut(e,t,i,p),t.memoizedState=w.state,e=t.child):e=Jn(e,t,p),e}function _d(e,t,i,l){return Qi(),t.flags|=256,Ut(e,t,i,l),t.child}var sc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function lc(e){return{baseLanes:e,cachePool:lf()}}function ac(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=pn),e}function vd(e,t,i){var l=t.pendingProps,p=!1,w=(t.flags&128)!==0,L;if((L=w)||(L=e!==null&&e.memoizedState===null?!1:(Ct.current&2)!==0),L&&(p=!0,t.flags&=-129),L=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ke){if(p?bi(t):Ci(),(e=ht)?(e=kp(e,xn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pi!==null?{id:zn,overflow:Hn}:null,retryLane:536870912,hydrationErrors:null},i=Xh(e),i.return=t,t.child=i,Ht=t,ht=null)):e=null,e===null)throw gi(t);return qc(e)?t.lanes=32:t.lanes=536870912,null}var U=l.children;return l=l.fallback,p?(Ci(),p=t.mode,U=Zl({mode:"hidden",children:U},p),l=Xi(l,p,i,null),U.return=t,l.return=t,U.sibling=l,t.child=U,l=t.child,l.memoizedState=lc(i),l.childLanes=ac(e,L,i),t.memoizedState=sc,Ms(null,l)):(bi(t),oc(t,U))}var X=e.memoizedState;if(X!==null&&(U=X.dehydrated,U!==null)){if(w)t.flags&256?(bi(t),t.flags&=-257,t=cc(e,t,i)):t.memoizedState!==null?(Ci(),t.child=e.child,t.flags|=128,t=null):(Ci(),U=l.fallback,p=t.mode,l=Zl({mode:"visible",children:l.children},p),U=Xi(U,p,i,null),U.flags|=2,l.return=t,U.return=t,l.sibling=U,t.child=l,ir(t,e.child,null,i),l=t.child,l.memoizedState=lc(i),l.childLanes=ac(e,L,i),t.memoizedState=sc,t=Ms(null,l));else if(bi(t),qc(U)){if(L=U.nextSibling&&U.nextSibling.dataset,L)var se=L.dgst;L=se,l=Error(o(419)),l.stack="",l.digest=L,ys({value:l,source:null,stack:null}),t=cc(e,t,i)}else if(At||Er(e,t,i,!1),L=(i&e.childLanes)!==0,At||L){if(L=st,L!==null&&(l=dl(L,i),l!==0&&l!==X.retryLane))throw X.retryLane=l,Wi(e,l),sn(L,e,l),ic;Fc(U)||aa(),t=cc(e,t,i)}else Fc(U)?(t.flags|=192,t.child=e.child,t=null):(e=X.treeContext,ht=kn(U.nextSibling),Ht=t,Ke=!0,mi=null,xn=!1,e!==null&&Jh(t,e),t=oc(t,l.children),t.flags|=4096);return t}return p?(Ci(),U=l.fallback,p=t.mode,X=e.child,se=X.sibling,l=Kn(X,{mode:"hidden",children:l.children}),l.subtreeFlags=X.subtreeFlags&65011712,se!==null?U=Kn(se,U):(U=Xi(U,p,i,null),U.flags|=2),U.return=t,l.return=t,l.sibling=U,t.child=l,Ms(null,l),l=t.child,U=e.child.memoizedState,U===null?U=lc(i):(p=U.cachePool,p!==null?(X=Et._currentValue,p=p.parent!==X?{parent:X,pool:X}:p):p=lf(),U={baseLanes:U.baseLanes|i,cachePool:p}),l.memoizedState=U,l.childLanes=ac(e,L,i),t.memoizedState=sc,Ms(e.child,l)):(bi(t),i=e.child,e=i.sibling,i=Kn(i,{mode:"visible",children:l.children}),i.return=t,i.sibling=null,e!==null&&(L=t.deletions,L===null?(t.deletions=[e],t.flags|=16):L.push(e)),t.child=i,t.memoizedState=null,i)}function oc(e,t){return t=Zl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Zl(e,t){return e=un(22,e,null,t),e.lanes=0,e}function cc(e,t,i){return ir(t,e.child,null,i),e=oc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function yd(e,t,i){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),xo(e.return,t,i)}function uc(e,t,i,l,p,w){var L=e.memoizedState;L===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:i,tailMode:p,treeForkCount:w}:(L.isBackwards=t,L.rendering=null,L.renderingStartTime=0,L.last=l,L.tail=i,L.tailMode=p,L.treeForkCount=w)}function Sd(e,t,i){var l=t.pendingProps,p=l.revealOrder,w=l.tail;l=l.children;var L=Ct.current,U=(L&2)!==0;if(U?(L=L&1|2,t.flags|=128):L&=1,j(Ct,L),Ut(e,t,l,i),l=Ke?vs:0,!U&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&yd(e,i,t);else if(e.tag===19)yd(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(p){case"forwards":for(i=t.child,p=null;i!==null;)e=i.alternate,e!==null&&Ul(e)===null&&(p=i),i=i.sibling;i=p,i===null?(p=t.child,t.child=null):(p=i.sibling,i.sibling=null),uc(t,!1,p,i,w,l);break;case"backwards":case"unstable_legacy-backwards":for(i=null,p=t.child,t.child=null;p!==null;){if(e=p.alternate,e!==null&&Ul(e)===null){t.child=p;break}e=p.sibling,p.sibling=i,i=p,p=e}uc(t,!0,i,null,w,l);break;case"together":uc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Jn(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Ei|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Er(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,i=Kn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Kn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function hc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ll(e)))}function Iv(e,t,i){switch(t.tag){case 3:q(t,t.stateNode.containerInfo),_i(t,Et,e.memoizedState.cache),Qi();break;case 27:case 5:Z(t);break;case 4:q(t,t.stateNode.containerInfo);break;case 10:_i(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,jo(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(bi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?vd(e,t,i):(bi(t),e=Jn(e,t,i),e!==null?e.sibling:null);bi(t);break;case 19:var p=(e.flags&128)!==0;if(l=(i&t.childLanes)!==0,l||(Er(e,t,i,!1),l=(i&t.childLanes)!==0),p){if(l)return Sd(e,t,i);t.flags|=128}if(p=t.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),j(Ct,Ct.current),l)break;return null;case 22:return t.lanes=0,fd(e,t,i,t.pendingProps);case 24:_i(t,Et,e.memoizedState.cache)}return Jn(e,t,i)}function bd(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)At=!0;else{if(!hc(e,i)&&(t.flags&128)===0)return At=!1,Iv(e,t,i);At=(e.flags&131072)!==0}else At=!1,Ke&&(t.flags&1048576)!==0&&Zh(t,vs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=tr(t.elementType),t.type=e,typeof e=="function")go(e)?(l=sr(e,l),t.tag=1,t=gd(null,t,e,l,i)):(t.tag=0,t=rc(null,t,e,l,i));else{if(e!=null){var p=e.$$typeof;if(p===A){t.tag=11,t=cd(null,t,e,l,i);break e}else if(p===T){t.tag=14,t=ud(null,t,e,l,i);break e}}throw t=K(e)||e,Error(o(306,t,""))}}return t;case 0:return rc(e,t,t.type,t.pendingProps,i);case 1:return l=t.type,p=sr(l,t.pendingProps),gd(e,t,l,p,i);case 3:e:{if(q(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var w=t.memoizedState;p=w.element,Mo(e,t),ks(t,l,null,i);var L=t.memoizedState;if(l=L.cache,_i(t,Et,l),l!==w.cache&&Eo(t,[Et],i,!0),Es(),l=L.element,w.isDehydrated)if(w={element:l,isDehydrated:!1,cache:L.cache},t.updateQueue.baseState=w,t.memoizedState=w,t.flags&256){t=_d(e,t,l,i);break e}else if(l!==p){p=bn(Error(o(424)),t),ys(p),t=_d(e,t,l,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ht=kn(e.firstChild),Ht=t,Ke=!0,mi=null,xn=!0,i=ff(t,null,l,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Qi(),l===p){t=Jn(e,t,i);break e}Ut(e,t,l,i)}t=t.child}return t;case 26:return Ql(e,t),e===null?(i=Lp(t.type,null,t.pendingProps,null))?t.memoizedState=i:Ke||(i=t.type,e=t.pendingProps,l=pa(me.current).createElement(i),l[gt]=t,l[Mt]=e,Pt(l,i,e),bt(l),t.stateNode=l):t.memoizedState=Lp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Z(t),e===null&&Ke&&(l=t.stateNode=Dp(t.type,t.pendingProps,me.current),Ht=t,xn=!0,p=ht,Ri(t.type)?(Gc=p,ht=kn(l.firstChild)):ht=p),Ut(e,t,t.pendingProps.children,i),Ql(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ke&&((p=l=ht)&&(l=m0(l,t.type,t.pendingProps,xn),l!==null?(t.stateNode=l,Ht=t,ht=kn(l.firstChild),xn=!1,p=!0):p=!1),p||gi(t)),Z(t),p=t.type,w=t.pendingProps,L=e!==null?e.memoizedProps:null,l=w.children,Ic(p,w)?l=null:L!==null&&Ic(p,L)&&(t.flags|=32),t.memoizedState!==null&&(p=Ho(e,t,Rv,null,null,i),$s._currentValue=p),Ql(e,t),Ut(e,t,l,i),t.child;case 6:return e===null&&Ke&&((e=i=ht)&&(i=g0(i,t.pendingProps,xn),i!==null?(t.stateNode=i,Ht=t,ht=null,e=!0):e=!1),e||gi(t)),null;case 13:return vd(e,t,i);case 4:return q(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=ir(t,null,l,i):Ut(e,t,l,i),t.child;case 11:return cd(e,t,t.type,t.pendingProps,i);case 7:return Ut(e,t,t.pendingProps,i),t.child;case 8:return Ut(e,t,t.pendingProps.children,i),t.child;case 12:return Ut(e,t,t.pendingProps.children,i),t.child;case 10:return l=t.pendingProps,_i(t,t.type,l.value),Ut(e,t,l.children,i),t.child;case 9:return p=t.type._context,l=t.pendingProps.children,Ji(t),p=It(p),l=l(p),t.flags|=1,Ut(e,t,l,i),t.child;case 14:return ud(e,t,t.type,t.pendingProps,i);case 15:return hd(e,t,t.type,t.pendingProps,i);case 19:return Sd(e,t,i);case 31:return Hv(e,t,i);case 22:return fd(e,t,i,t.pendingProps);case 24:return Ji(t),l=It(Et),e===null?(p=To(),p===null&&(p=st,w=ko(),p.pooledCache=w,w.refCount++,w!==null&&(p.pooledCacheLanes|=i),p=w),t.memoizedState={parent:l,cache:p},Ro(t),_i(t,Et,p)):((e.lanes&i)!==0&&(Mo(e,t),ks(t,null,null,i),Es()),p=e.memoizedState,w=t.memoizedState,p.parent!==l?(p={parent:l,cache:l},t.memoizedState=p,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=p),_i(t,Et,l)):(l=w.cache,_i(t,Et,l),l!==p.cache&&Eo(t,[Et],i,!0))),Ut(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function ei(e){e.flags|=4}function fc(e,t,i,l,p){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(p&335544128)===p)if(e.stateNode.complete)e.flags|=8192;else if(Yd())e.flags|=8192;else throw nr=jl,Do}else e.flags&=-16777217}function Cd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!zp(t))if(Yd())e.flags|=8192;else throw nr=jl,Do}function Jl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?on():536870912,e.lanes|=t,zr|=t)}function Ls(e,t){if(!Ke)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function ft(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,l=0;if(t)for(var p=e.child;p!==null;)i|=p.lanes|p.childLanes,l|=p.subtreeFlags&65011712,l|=p.flags&65011712,p.return=e,p=p.sibling;else for(p=e.child;p!==null;)i|=p.lanes|p.childLanes,l|=p.subtreeFlags,l|=p.flags,p.return=e,p=p.sibling;return e.subtreeFlags|=l,e.childLanes=i,t}function Uv(e,t,i){var l=t.pendingProps;switch(So(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(t),null;case 1:return ft(t),null;case 3:return i=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Xn(Et),oe(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(xr(t)?ei(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Co())),ft(t),null;case 26:var p=t.type,w=t.memoizedState;return e===null?(ei(t),w!==null?(ft(t),Cd(t,w)):(ft(t),fc(t,p,null,l,i))):w?w!==e.memoizedState?(ei(t),ft(t),Cd(t,w)):(ft(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&ei(t),ft(t),fc(t,p,e,l,i)),null;case 27:if(ie(t),i=me.current,p=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ei(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return ft(t),null}e=te.current,xr(t)?ef(t):(e=Dp(p,l,i),t.stateNode=e,ei(t))}return ft(t),null;case 5:if(ie(t),p=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ei(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return ft(t),null}if(w=te.current,xr(t))ef(t);else{var L=pa(me.current);switch(w){case 1:w=L.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:w=L.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":w=L.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":w=L.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":w=L.createElement("div"),w.innerHTML="<script><\/script>",w=w.removeChild(w.firstChild);break;case"select":w=typeof l.is=="string"?L.createElement("select",{is:l.is}):L.createElement("select"),l.multiple?w.multiple=!0:l.size&&(w.size=l.size);break;default:w=typeof l.is=="string"?L.createElement(p,{is:l.is}):L.createElement(p)}}w[gt]=t,w[Mt]=l;e:for(L=t.child;L!==null;){if(L.tag===5||L.tag===6)w.appendChild(L.stateNode);else if(L.tag!==4&&L.tag!==27&&L.child!==null){L.child.return=L,L=L.child;continue}if(L===t)break e;for(;L.sibling===null;){if(L.return===null||L.return===t)break e;L=L.return}L.sibling.return=L.return,L=L.sibling}t.stateNode=w;e:switch(Pt(w,p,l),p){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&ei(t)}}return ft(t),fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ei(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=me.current,xr(t)){if(e=t.stateNode,i=t.memoizedProps,l=null,p=Ht,p!==null)switch(p.tag){case 27:case 5:l=p.memoizedProps}e[gt]=t,e=!!(e.nodeValue===i||l!==null&&l.suppressHydrationWarning===!0||vp(e.nodeValue,i)),e||gi(t,!0)}else e=pa(e).createTextNode(l),e[gt]=t,t.stateNode=e}return ft(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(l=xr(t),i!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[gt]=t}else Qi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ft(t),e=!1}else i=Co(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(fn(t),t):(fn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return ft(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(p=xr(t),l!==null&&l.dehydrated!==null){if(e===null){if(!p)throw Error(o(318));if(p=t.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(o(317));p[gt]=t}else Qi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ft(t),p=!1}else p=Co(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=p),p=!0;if(!p)return t.flags&256?(fn(t),t):(fn(t),null)}return fn(t),(t.flags&128)!==0?(t.lanes=i,t):(i=l!==null,e=e!==null&&e.memoizedState!==null,i&&(l=t.child,p=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(p=l.alternate.memoizedState.cachePool.pool),w=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(w=l.memoizedState.cachePool.pool),w!==p&&(l.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Jl(t,t.updateQueue),ft(t),null);case 4:return oe(),e===null&&Bc(t.stateNode.containerInfo),ft(t),null;case 10:return Xn(t.type),ft(t),null;case 19:if(G(Ct),l=t.memoizedState,l===null)return ft(t),null;if(p=(t.flags&128)!==0,w=l.rendering,w===null)if(p)Ls(l,!1);else{if(vt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(w=Ul(e),w!==null){for(t.flags|=128,Ls(l,!1),e=w.updateQueue,t.updateQueue=e,Jl(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Wh(i,e),i=i.sibling;return j(Ct,Ct.current&1|2),Ke&&Yn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&tt()>ra&&(t.flags|=128,p=!0,Ls(l,!1),t.lanes=4194304)}else{if(!p)if(e=Ul(w),e!==null){if(t.flags|=128,p=!0,e=e.updateQueue,t.updateQueue=e,Jl(t,e),Ls(l,!0),l.tail===null&&l.tailMode==="hidden"&&!w.alternate&&!Ke)return ft(t),null}else 2*tt()-l.renderingStartTime>ra&&i!==536870912&&(t.flags|=128,p=!0,Ls(l,!1),t.lanes=4194304);l.isBackwards?(w.sibling=t.child,t.child=w):(e=l.last,e!==null?e.sibling=w:t.child=w,l.last=w)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=tt(),e.sibling=null,i=Ct.current,j(Ct,p?i&1|2:i&1),Ke&&Yn(t,l.treeForkCount),e):(ft(t),null);case 22:case 23:return fn(t),No(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(i&536870912)!==0&&(t.flags&128)===0&&(ft(t),t.subtreeFlags&6&&(t.flags|=8192)):ft(t),i=t.updateQueue,i!==null&&Jl(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==i&&(t.flags|=2048),e!==null&&G(er),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Xn(Et),ft(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Pv(e,t){switch(So(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xn(Et),oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ie(t),null;case 31:if(t.memoizedState!==null){if(fn(t),t.alternate===null)throw Error(o(340));Qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(Ct),null;case 4:return oe(),null;case 10:return Xn(t.type),null;case 22:case 23:return fn(t),No(),e!==null&&G(er),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Xn(Et),null;case 25:return null;default:return null}}function wd(e,t){switch(So(t),t.tag){case 3:Xn(Et),oe();break;case 26:case 27:case 5:ie(t);break;case 4:oe();break;case 31:t.memoizedState!==null&&fn(t);break;case 13:fn(t);break;case 19:G(Ct);break;case 10:Xn(t.type);break;case 22:case 23:fn(t),No(),e!==null&&G(er);break;case 24:Xn(Et)}}function Os(e,t){try{var i=t.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var p=l.next;i=p;do{if((i.tag&e)===e){l=void 0;var w=i.create,L=i.inst;l=w(),L.destroy=l}i=i.next}while(i!==p)}}catch(U){et(t,t.return,U)}}function wi(e,t,i){try{var l=t.updateQueue,p=l!==null?l.lastEffect:null;if(p!==null){var w=p.next;l=w;do{if((l.tag&e)===e){var L=l.inst,U=L.destroy;if(U!==void 0){L.destroy=void 0,p=t;var X=i,se=U;try{se()}catch(fe){et(p,X,fe)}}}l=l.next}while(l!==w)}}catch(fe){et(t,t.return,fe)}}function xd(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{pf(t,i)}catch(l){et(e,e.return,l)}}}function Ed(e,t,i){i.props=sr(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(l){et(e,t,l)}}function Bs(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof i=="function"?e.refCleanup=i(l):i.current=l}}catch(p){et(e,t,p)}}function In(e,t){var i=e.ref,l=e.refCleanup;if(i!==null)if(typeof l=="function")try{l()}catch(p){et(e,t,p)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(p){et(e,t,p)}else i.current=null}function kd(e){var t=e.type,i=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&l.focus();break e;case"img":i.src?l.src=i.src:i.srcSet&&(l.srcset=i.srcSet)}}catch(p){et(e,e.return,p)}}function dc(e,t,i){try{var l=e.stateNode;c0(l,e.type,i,t),l[Mt]=t}catch(p){et(e,e.return,p)}}function Ad(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ri(e.type)||e.tag===4}function pc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ad(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ri(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function mc(e,t,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Vn));else if(l!==4&&(l===27&&Ri(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(mc(e,t,i),e=e.sibling;e!==null;)mc(e,t,i),e=e.sibling}function ea(e,t,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(l!==4&&(l===27&&Ri(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(ea(e,t,i),e=e.sibling;e!==null;)ea(e,t,i),e=e.sibling}function Td(e){var t=e.stateNode,i=e.memoizedProps;try{for(var l=e.type,p=t.attributes;p.length;)t.removeAttributeNode(p[0]);Pt(t,l,i),t[gt]=e,t[Mt]=i}catch(w){et(e,e.return,w)}}var ti=!1,Tt=!1,gc=!1,Dd=typeof WeakSet=="function"?WeakSet:Set,zt=null;function Fv(e,t){if(e=e.containerInfo,zc=ba,e=Uh(e),oo(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var p=l.anchorOffset,w=l.focusNode;l=l.focusOffset;try{i.nodeType,w.nodeType}catch{i=null;break e}var L=0,U=-1,X=-1,se=0,fe=0,ge=e,le=null;t:for(;;){for(var ce;ge!==i||p!==0&&ge.nodeType!==3||(U=L+p),ge!==w||l!==0&&ge.nodeType!==3||(X=L+l),ge.nodeType===3&&(L+=ge.nodeValue.length),(ce=ge.firstChild)!==null;)le=ge,ge=ce;for(;;){if(ge===e)break t;if(le===i&&++se===p&&(U=L),le===w&&++fe===l&&(X=L),(ce=ge.nextSibling)!==null)break;ge=le,le=ge.parentNode}ge=ce}i=U===-1||X===-1?null:{start:U,end:X}}else i=null}i=i||{start:0,end:0}}else i=null;for(Hc={focusedElem:e,selectionRange:i},ba=!1,zt=t;zt!==null;)if(t=zt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,zt=e;else for(;zt!==null;){switch(t=zt,w=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)p=e[i],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&w!==null){e=void 0,i=t,p=w.memoizedProps,w=w.memoizedState,l=i.stateNode;try{var xe=sr(i.type,p);e=l.getSnapshotBeforeUpdate(xe,w),l.__reactInternalSnapshotBeforeUpdate=e}catch(Oe){et(i,i.return,Oe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Pc(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Pc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,zt=e;break}zt=t.return}}function Rd(e,t,i){var l=i.flags;switch(i.tag){case 0:case 11:case 15:ii(e,i),l&4&&Os(5,i);break;case 1:if(ii(e,i),l&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(L){et(i,i.return,L)}else{var p=sr(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(p,t,e.__reactInternalSnapshotBeforeUpdate)}catch(L){et(i,i.return,L)}}l&64&&xd(i),l&512&&Bs(i,i.return);break;case 3:if(ii(e,i),l&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{pf(e,t)}catch(L){et(i,i.return,L)}}break;case 27:t===null&&l&4&&Td(i);case 26:case 5:ii(e,i),t===null&&l&4&&kd(i),l&512&&Bs(i,i.return);break;case 12:ii(e,i);break;case 31:ii(e,i),l&4&&Od(e,i);break;case 13:ii(e,i),l&4&&Bd(e,i),l&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Qv.bind(null,i),_0(e,i))));break;case 22:if(l=i.memoizedState!==null||ti,!l){t=t!==null&&t.memoizedState!==null||Tt,p=ti;var w=Tt;ti=l,(Tt=t)&&!w?ri(e,i,(i.subtreeFlags&8772)!==0):ii(e,i),ti=p,Tt=w}break;case 30:break;default:ii(e,i)}}function Md(e){var t=e.alternate;t!==null&&(e.alternate=null,Md(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&os(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var dt=null,en=!1;function ni(e,t,i){for(i=i.child;i!==null;)Ld(e,t,i),i=i.sibling}function Ld(e,t,i){if(We&&typeof We.onCommitFiberUnmount=="function")try{We.onCommitFiberUnmount(mt,i)}catch{}switch(i.tag){case 26:Tt||In(i,t),ni(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Tt||In(i,t);var l=dt,p=en;Ri(i.type)&&(dt=i.stateNode,en=!1),ni(e,t,i),qs(i.stateNode),dt=l,en=p;break;case 5:Tt||In(i,t);case 6:if(l=dt,p=en,dt=null,ni(e,t,i),dt=l,en=p,dt!==null)if(en)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(i.stateNode)}catch(w){et(i,t,w)}else try{dt.removeChild(i.stateNode)}catch(w){et(i,t,w)}break;case 18:dt!==null&&(en?(e=dt,xp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Vr(e)):xp(dt,i.stateNode));break;case 4:l=dt,p=en,dt=i.stateNode.containerInfo,en=!0,ni(e,t,i),dt=l,en=p;break;case 0:case 11:case 14:case 15:wi(2,i,t),Tt||wi(4,i,t),ni(e,t,i);break;case 1:Tt||(In(i,t),l=i.stateNode,typeof l.componentWillUnmount=="function"&&Ed(i,t,l)),ni(e,t,i);break;case 21:ni(e,t,i);break;case 22:Tt=(l=Tt)||i.memoizedState!==null,ni(e,t,i),Tt=l;break;default:ni(e,t,i)}}function Od(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Vr(e)}catch(i){et(t,t.return,i)}}}function Bd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Vr(e)}catch(i){et(t,t.return,i)}}function qv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Dd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Dd),t;default:throw Error(o(435,e.tag))}}function ta(e,t){var i=qv(e);t.forEach(function(l){if(!i.has(l)){i.add(l);var p=Zv.bind(null,e,l);l.then(p,p)}})}function tn(e,t){var i=t.deletions;if(i!==null)for(var l=0;l<i.length;l++){var p=i[l],w=e,L=t,U=L;e:for(;U!==null;){switch(U.tag){case 27:if(Ri(U.type)){dt=U.stateNode,en=!1;break e}break;case 5:dt=U.stateNode,en=!1;break e;case 3:case 4:dt=U.stateNode.containerInfo,en=!0;break e}U=U.return}if(dt===null)throw Error(o(160));Ld(w,L,p),dt=null,en=!1,w=p.alternate,w!==null&&(w.return=null),p.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Nd(t,e),t=t.sibling}var Rn=null;function Nd(e,t){var i=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:tn(t,e),nn(e),l&4&&(wi(3,e,e.return),Os(3,e),wi(5,e,e.return));break;case 1:tn(t,e),nn(e),l&512&&(Tt||i===null||In(i,i.return)),l&64&&ti&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?l:i.concat(l))));break;case 26:var p=Rn;if(tn(t,e),nn(e),l&512&&(Tt||i===null||In(i,i.return)),l&4){var w=i!==null?i.memoizedState:null;if(l=e.memoizedState,i===null)if(l===null)if(e.stateNode===null){e:{l=e.type,i=e.memoizedProps,p=p.ownerDocument||p;t:switch(l){case"title":w=p.getElementsByTagName("title")[0],(!w||w[Ue]||w[gt]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=p.createElement(l),p.head.insertBefore(w,p.querySelector("head > title"))),Pt(w,l,i),w[gt]=e,bt(w),l=w;break e;case"link":var L=Np("link","href",p).get(l+(i.href||""));if(L){for(var U=0;U<L.length;U++)if(w=L[U],w.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&w.getAttribute("rel")===(i.rel==null?null:i.rel)&&w.getAttribute("title")===(i.title==null?null:i.title)&&w.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){L.splice(U,1);break t}}w=p.createElement(l),Pt(w,l,i),p.head.appendChild(w);break;case"meta":if(L=Np("meta","content",p).get(l+(i.content||""))){for(U=0;U<L.length;U++)if(w=L[U],w.getAttribute("content")===(i.content==null?null:""+i.content)&&w.getAttribute("name")===(i.name==null?null:i.name)&&w.getAttribute("property")===(i.property==null?null:i.property)&&w.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&w.getAttribute("charset")===(i.charSet==null?null:i.charSet)){L.splice(U,1);break t}}w=p.createElement(l),Pt(w,l,i),p.head.appendChild(w);break;default:throw Error(o(468,l))}w[gt]=e,bt(w),l=w}e.stateNode=l}else jp(p,e.type,e.stateNode);else e.stateNode=Bp(p,l,e.memoizedProps);else w!==l?(w===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):w.count--,l===null?jp(p,e.type,e.stateNode):Bp(p,l,e.memoizedProps)):l===null&&e.stateNode!==null&&dc(e,e.memoizedProps,i.memoizedProps)}break;case 27:tn(t,e),nn(e),l&512&&(Tt||i===null||In(i,i.return)),i!==null&&l&4&&dc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(tn(t,e),nn(e),l&512&&(Tt||i===null||In(i,i.return)),e.flags&32){p=e.stateNode;try{pr(p,"")}catch(xe){et(e,e.return,xe)}}l&4&&e.stateNode!=null&&(p=e.memoizedProps,dc(e,p,i!==null?i.memoizedProps:p)),l&1024&&(gc=!0);break;case 6:if(tn(t,e),nn(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,i=e.stateNode;try{i.nodeValue=l}catch(xe){et(e,e.return,xe)}}break;case 3:if(_a=null,p=Rn,Rn=ma(t.containerInfo),tn(t,e),Rn=p,nn(e),l&4&&i!==null&&i.memoizedState.isDehydrated)try{Vr(t.containerInfo)}catch(xe){et(e,e.return,xe)}gc&&(gc=!1,jd(e));break;case 4:l=Rn,Rn=ma(e.stateNode.containerInfo),tn(t,e),nn(e),Rn=l;break;case 12:tn(t,e),nn(e);break;case 31:tn(t,e),nn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ta(e,l)));break;case 13:tn(t,e),nn(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(ia=tt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ta(e,l)));break;case 22:p=e.memoizedState!==null;var X=i!==null&&i.memoizedState!==null,se=ti,fe=Tt;if(ti=se||p,Tt=fe||X,tn(t,e),Tt=fe,ti=se,nn(e),l&8192)e:for(t=e.stateNode,t._visibility=p?t._visibility&-2:t._visibility|1,p&&(i===null||X||ti||Tt||lr(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){X=i=t;try{if(w=X.stateNode,p)L=w.style,typeof L.setProperty=="function"?L.setProperty("display","none","important"):L.display="none";else{U=X.stateNode;var ge=X.memoizedProps.style,le=ge!=null&&ge.hasOwnProperty("display")?ge.display:null;U.style.display=le==null||typeof le=="boolean"?"":(""+le).trim()}}catch(xe){et(X,X.return,xe)}}}else if(t.tag===6){if(i===null){X=t;try{X.stateNode.nodeValue=p?"":X.memoizedProps}catch(xe){et(X,X.return,xe)}}}else if(t.tag===18){if(i===null){X=t;try{var ce=X.stateNode;p?Ep(ce,!0):Ep(X.stateNode,!1)}catch(xe){et(X,X.return,xe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(i=l.retryQueue,i!==null&&(l.retryQueue=null,ta(e,i))));break;case 19:tn(t,e),nn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ta(e,l)));break;case 30:break;case 21:break;default:tn(t,e),nn(e)}}function nn(e){var t=e.flags;if(t&2){try{for(var i,l=e.return;l!==null;){if(Ad(l)){i=l;break}l=l.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var p=i.stateNode,w=pc(e);ea(e,w,p);break;case 5:var L=i.stateNode;i.flags&32&&(pr(L,""),i.flags&=-33);var U=pc(e);ea(e,U,L);break;case 3:case 4:var X=i.stateNode.containerInfo,se=pc(e);mc(e,se,X);break;default:throw Error(o(161))}}catch(fe){et(e,e.return,fe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;jd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ii(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Rd(e,t.alternate,t),t=t.sibling}function lr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:wi(4,t,t.return),lr(t);break;case 1:In(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Ed(t,t.return,i),lr(t);break;case 27:qs(t.stateNode);case 26:case 5:In(t,t.return),lr(t);break;case 22:t.memoizedState===null&&lr(t);break;case 30:lr(t);break;default:lr(t)}e=e.sibling}}function ri(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,p=e,w=t,L=w.flags;switch(w.tag){case 0:case 11:case 15:ri(p,w,i),Os(4,w);break;case 1:if(ri(p,w,i),l=w,p=l.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(se){et(l,l.return,se)}if(l=w,p=l.updateQueue,p!==null){var U=l.stateNode;try{var X=p.shared.hiddenCallbacks;if(X!==null)for(p.shared.hiddenCallbacks=null,p=0;p<X.length;p++)df(X[p],U)}catch(se){et(l,l.return,se)}}i&&L&64&&xd(w),Bs(w,w.return);break;case 27:Td(w);case 26:case 5:ri(p,w,i),i&&l===null&&L&4&&kd(w),Bs(w,w.return);break;case 12:ri(p,w,i);break;case 31:ri(p,w,i),i&&L&4&&Od(p,w);break;case 13:ri(p,w,i),i&&L&4&&Bd(p,w);break;case 22:w.memoizedState===null&&ri(p,w,i),Bs(w,w.return);break;case 30:break;default:ri(p,w,i)}t=t.sibling}}function _c(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&Ss(i))}function vc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ss(e))}function Mn(e,t,i,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)zd(e,t,i,l),t=t.sibling}function zd(e,t,i,l){var p=t.flags;switch(t.tag){case 0:case 11:case 15:Mn(e,t,i,l),p&2048&&Os(9,t);break;case 1:Mn(e,t,i,l);break;case 3:Mn(e,t,i,l),p&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ss(e)));break;case 12:if(p&2048){Mn(e,t,i,l),e=t.stateNode;try{var w=t.memoizedProps,L=w.id,U=w.onPostCommit;typeof U=="function"&&U(L,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(X){et(t,t.return,X)}}else Mn(e,t,i,l);break;case 31:Mn(e,t,i,l);break;case 13:Mn(e,t,i,l);break;case 23:break;case 22:w=t.stateNode,L=t.alternate,t.memoizedState!==null?w._visibility&2?Mn(e,t,i,l):Ns(e,t):w._visibility&2?Mn(e,t,i,l):(w._visibility|=2,Br(e,t,i,l,(t.subtreeFlags&10256)!==0||!1)),p&2048&&_c(L,t);break;case 24:Mn(e,t,i,l),p&2048&&vc(t.alternate,t);break;default:Mn(e,t,i,l)}}function Br(e,t,i,l,p){for(p=p&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var w=e,L=t,U=i,X=l,se=L.flags;switch(L.tag){case 0:case 11:case 15:Br(w,L,U,X,p),Os(8,L);break;case 23:break;case 22:var fe=L.stateNode;L.memoizedState!==null?fe._visibility&2?Br(w,L,U,X,p):Ns(w,L):(fe._visibility|=2,Br(w,L,U,X,p)),p&&se&2048&&_c(L.alternate,L);break;case 24:Br(w,L,U,X,p),p&&se&2048&&vc(L.alternate,L);break;default:Br(w,L,U,X,p)}t=t.sibling}}function Ns(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,l=t,p=l.flags;switch(l.tag){case 22:Ns(i,l),p&2048&&_c(l.alternate,l);break;case 24:Ns(i,l),p&2048&&vc(l.alternate,l);break;default:Ns(i,l)}t=t.sibling}}var js=8192;function Nr(e,t,i){if(e.subtreeFlags&js)for(e=e.child;e!==null;)Hd(e,t,i),e=e.sibling}function Hd(e,t,i){switch(e.tag){case 26:Nr(e,t,i),e.flags&js&&e.memoizedState!==null&&D0(i,Rn,e.memoizedState,e.memoizedProps);break;case 5:Nr(e,t,i);break;case 3:case 4:var l=Rn;Rn=ma(e.stateNode.containerInfo),Nr(e,t,i),Rn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=js,js=16777216,Nr(e,t,i),js=l):Nr(e,t,i));break;default:Nr(e,t,i)}}function Id(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function zs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var l=t[i];zt=l,Pd(l,e)}Id(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ud(e),e=e.sibling}function Ud(e){switch(e.tag){case 0:case 11:case 15:zs(e),e.flags&2048&&wi(9,e,e.return);break;case 3:zs(e);break;case 12:zs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,na(e)):zs(e);break;default:zs(e)}}function na(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var l=t[i];zt=l,Pd(l,e)}Id(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:wi(8,t,t.return),na(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,na(t));break;default:na(t)}e=e.sibling}}function Pd(e,t){for(;zt!==null;){var i=zt;switch(i.tag){case 0:case 11:case 15:wi(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var l=i.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Ss(i.memoizedState.cache)}if(l=i.child,l!==null)l.return=i,zt=l;else e:for(i=e;zt!==null;){l=zt;var p=l.sibling,w=l.return;if(Md(l),l===i){zt=null;break e}if(p!==null){p.return=w,zt=p;break e}zt=w}}}var Gv={getCacheForType:function(e){var t=It(Et),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return It(Et).controller.signal}},Vv=typeof WeakMap=="function"?WeakMap:Map,Ze=0,st=null,Pe=null,Ge=0,Je=0,dn=null,xi=!1,jr=!1,yc=!1,si=0,vt=0,Ei=0,ar=0,Sc=0,pn=0,zr=0,Hs=null,rn=null,bc=!1,ia=0,Fd=0,ra=1/0,sa=null,ki=null,Ot=0,Ai=null,Hr=null,li=0,Cc=0,wc=null,qd=null,Is=0,xc=null;function mn(){return(Ze&2)!==0&&Ge!==0?Ge&-Ge:V.T!==null?Rc():pl()}function Gd(){if(pn===0)if((Ge&536870912)===0||Ke){var e=qn;qn<<=1,(qn&3932160)===0&&(qn=262144),pn=e}else pn=536870912;return e=hn.current,e!==null&&(e.flags|=32),pn}function sn(e,t,i){(e===st&&(Je===2||Je===9)||e.cancelPendingCommit!==null)&&(Ir(e,0),Ti(e,Ge,pn,!1)),ui(e,i),((Ze&2)===0||e!==st)&&(e===st&&((Ze&2)===0&&(ar|=i),vt===4&&Ti(e,Ge,pn,!1)),Un(e))}function Vd(e,t,i){if((Ze&6)!==0)throw Error(o(327));var l=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Fi(e,t),p=l?Yv(e,t):kc(e,t,!0),w=l;do{if(p===0){jr&&!l&&Ti(e,t,0,!1);break}else{if(i=e.current.alternate,w&&!$v(i)){p=kc(e,t,!1),w=!1;continue}if(p===2){if(w=t,e.errorRecoveryDisabledLanes&w)var L=0;else L=e.pendingLanes&-536870913,L=L!==0?L:L&536870912?536870912:0;if(L!==0){t=L;e:{var U=e;p=Hs;var X=U.current.memoizedState.isDehydrated;if(X&&(Ir(U,L).flags|=256),L=kc(U,L,!1),L!==2){if(yc&&!X){U.errorRecoveryDisabledLanes|=w,ar|=w,p=4;break e}w=rn,rn=p,w!==null&&(rn===null?rn=w:rn.push.apply(rn,w))}p=L}if(w=!1,p!==2)continue}}if(p===1){Ir(e,0),Ti(e,t,0,!0);break}e:{switch(l=e,w=p,w){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Ti(l,t,pn,!xi);break e;case 2:rn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(p=ia+300-tt(),10<p)){if(Ti(l,t,pn,!xi),hr(l,0,!0)!==0)break e;li=t,l.timeoutHandle=Cp($d.bind(null,l,i,rn,sa,bc,t,pn,ar,zr,xi,w,"Throttled",-0,0),p);break e}$d(l,i,rn,sa,bc,t,pn,ar,zr,xi,w,null,-0,0)}}break}while(!0);Un(e)}function $d(e,t,i,l,p,w,L,U,X,se,fe,ge,le,ce){if(e.timeoutHandle=-1,ge=t.subtreeFlags,ge&8192||(ge&16785408)===16785408){ge={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vn},Hd(t,w,ge);var xe=(w&62914560)===w?ia-tt():(w&4194048)===w?Fd-tt():0;if(xe=R0(ge,xe),xe!==null){li=w,e.cancelPendingCommit=xe(ep.bind(null,e,t,w,i,l,p,L,U,X,fe,ge,null,le,ce)),Ti(e,w,L,!se);return}}ep(e,t,w,i,l,p,L,U,X)}function $v(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var l=0;l<i.length;l++){var p=i[l],w=p.getSnapshot;p=p.value;try{if(!cn(w(),p))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ti(e,t,i,l){t&=~Sc,t&=~ar,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var p=t;0<p;){var w=31-Ee(p),L=1<<w;l[w]=-1,p&=~L}i!==0&&fl(e,i,t)}function la(){return(Ze&6)===0?(Us(0),!1):!0}function Ec(){if(Pe!==null){if(Je===0)var e=Pe.return;else e=Pe,Wn=Zi=null,Po(e),Dr=null,Cs=0,e=Pe;for(;e!==null;)wd(e.alternate,e),e=e.return;Pe=null}}function Ir(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,f0(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),li=0,Ec(),st=e,Pe=i=Kn(e.current,null),Ge=t,Je=0,dn=null,xi=!1,jr=Fi(e,t),yc=!1,zr=pn=Sc=ar=Ei=vt=0,rn=Hs=null,bc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var p=31-Ee(l),w=1<<p;t|=e[p],l&=~w}return si=t,Al(),i}function Kd(e,t){ze=null,V.H=Rs,t===Tr||t===Nl?(t=cf(),Je=3):t===Do?(t=cf(),Je=4):Je=t===ic?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,dn=t,Pe===null&&(vt=1,Wl(e,bn(t,e.current)))}function Yd(){var e=hn.current;return e===null?!0:(Ge&4194048)===Ge?En===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?e===En:!1}function Wd(){var e=V.H;return V.H=Rs,e===null?Rs:e}function Xd(){var e=V.A;return V.A=Gv,e}function aa(){vt=4,xi||(Ge&4194048)!==Ge&&hn.current!==null||(jr=!0),(Ei&134217727)===0&&(ar&134217727)===0||st===null||Ti(st,Ge,pn,!1)}function kc(e,t,i){var l=Ze;Ze|=2;var p=Wd(),w=Xd();(st!==e||Ge!==t)&&(sa=null,Ir(e,t)),t=!1;var L=vt;e:do try{if(Je!==0&&Pe!==null){var U=Pe,X=dn;switch(Je){case 8:Ec(),L=6;break e;case 3:case 2:case 9:case 6:hn.current===null&&(t=!0);var se=Je;if(Je=0,dn=null,Ur(e,U,X,se),i&&jr){L=0;break e}break;default:se=Je,Je=0,dn=null,Ur(e,U,X,se)}}Kv(),L=vt;break}catch(fe){Kd(e,fe)}while(!0);return t&&e.shellSuspendCounter++,Wn=Zi=null,Ze=l,V.H=p,V.A=w,Pe===null&&(st=null,Ge=0,Al()),L}function Kv(){for(;Pe!==null;)Qd(Pe)}function Yv(e,t){var i=Ze;Ze|=2;var l=Wd(),p=Xd();st!==e||Ge!==t?(sa=null,ra=tt()+500,Ir(e,t)):jr=Fi(e,t);e:do try{if(Je!==0&&Pe!==null){t=Pe;var w=dn;t:switch(Je){case 1:Je=0,dn=null,Ur(e,t,w,1);break;case 2:case 9:if(af(w)){Je=0,dn=null,Zd(t);break}t=function(){Je!==2&&Je!==9||st!==e||(Je=7),Un(e)},w.then(t,t);break e;case 3:Je=7;break e;case 4:Je=5;break e;case 7:af(w)?(Je=0,dn=null,Zd(t)):(Je=0,dn=null,Ur(e,t,w,7));break;case 5:var L=null;switch(Pe.tag){case 26:L=Pe.memoizedState;case 5:case 27:var U=Pe;if(L?zp(L):U.stateNode.complete){Je=0,dn=null;var X=U.sibling;if(X!==null)Pe=X;else{var se=U.return;se!==null?(Pe=se,oa(se)):Pe=null}break t}}Je=0,dn=null,Ur(e,t,w,5);break;case 6:Je=0,dn=null,Ur(e,t,w,6);break;case 8:Ec(),vt=6;break e;default:throw Error(o(462))}}Wv();break}catch(fe){Kd(e,fe)}while(!0);return Wn=Zi=null,V.H=l,V.A=p,Ze=i,Pe!==null?0:(st=null,Ge=0,Al(),vt)}function Wv(){for(;Pe!==null&&!Ft();)Qd(Pe)}function Qd(e){var t=bd(e.alternate,e,si);e.memoizedProps=e.pendingProps,t===null?oa(e):Pe=t}function Zd(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=md(i,t,t.pendingProps,t.type,void 0,Ge);break;case 11:t=md(i,t,t.pendingProps,t.type.render,t.ref,Ge);break;case 5:Po(t);default:wd(i,t),t=Pe=Wh(t,si),t=bd(i,t,si)}e.memoizedProps=e.pendingProps,t===null?oa(e):Pe=t}function Ur(e,t,i,l){Wn=Zi=null,Po(t),Dr=null,Cs=0;var p=t.return;try{if(zv(e,p,t,i,Ge)){vt=1,Wl(e,bn(i,e.current)),Pe=null;return}}catch(w){if(p!==null)throw Pe=p,w;vt=1,Wl(e,bn(i,e.current)),Pe=null;return}t.flags&32768?(Ke||l===1?e=!0:jr||(Ge&536870912)!==0?e=!1:(xi=e=!0,(l===2||l===9||l===3||l===6)&&(l=hn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Jd(t,e)):oa(t)}function oa(e){var t=e;do{if((t.flags&32768)!==0){Jd(t,xi);return}e=t.return;var i=Uv(t.alternate,t,si);if(i!==null){Pe=i;return}if(t=t.sibling,t!==null){Pe=t;return}Pe=t=e}while(t!==null);vt===0&&(vt=5)}function Jd(e,t){do{var i=Pv(e.alternate,e);if(i!==null){i.flags&=32767,Pe=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Pe=e;return}Pe=e=i}while(e!==null);vt=6,Pe=null}function ep(e,t,i,l,p,w,L,U,X){e.cancelPendingCommit=null;do ca();while(Ot!==0);if((Ze&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(w=t.lanes|t.childLanes,w|=po,ns(e,i,w,L,U,X),e===st&&(Pe=st=null,Ge=0),Hr=t,Ai=e,li=i,Cc=w,wc=p,qd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Jv(ke,function(){return sp(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=V.T,V.T=null,p=$.p,$.p=2,L=Ze,Ze|=4;try{Fv(e,t,i)}finally{Ze=L,$.p=p,V.T=l}}Ot=1,tp(),np(),ip()}}function tp(){if(Ot===1){Ot=0;var e=Ai,t=Hr,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=V.T,V.T=null;var l=$.p;$.p=2;var p=Ze;Ze|=4;try{Nd(t,e);var w=Hc,L=Uh(e.containerInfo),U=w.focusedElem,X=w.selectionRange;if(L!==U&&U&&U.ownerDocument&&Ih(U.ownerDocument.documentElement,U)){if(X!==null&&oo(U)){var se=X.start,fe=X.end;if(fe===void 0&&(fe=se),"selectionStart"in U)U.selectionStart=se,U.selectionEnd=Math.min(fe,U.value.length);else{var ge=U.ownerDocument||document,le=ge&&ge.defaultView||window;if(le.getSelection){var ce=le.getSelection(),xe=U.textContent.length,Oe=Math.min(X.start,xe),rt=X.end===void 0?Oe:Math.min(X.end,xe);!ce.extend&&Oe>rt&&(L=rt,rt=Oe,Oe=L);var ne=Hh(U,Oe),Q=Hh(U,rt);if(ne&&Q&&(ce.rangeCount!==1||ce.anchorNode!==ne.node||ce.anchorOffset!==ne.offset||ce.focusNode!==Q.node||ce.focusOffset!==Q.offset)){var re=ge.createRange();re.setStart(ne.node,ne.offset),ce.removeAllRanges(),Oe>rt?(ce.addRange(re),ce.extend(Q.node,Q.offset)):(re.setEnd(Q.node,Q.offset),ce.addRange(re))}}}}for(ge=[],ce=U;ce=ce.parentNode;)ce.nodeType===1&&ge.push({element:ce,left:ce.scrollLeft,top:ce.scrollTop});for(typeof U.focus=="function"&&U.focus(),U=0;U<ge.length;U++){var pe=ge[U];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}ba=!!zc,Hc=zc=null}finally{Ze=p,$.p=l,V.T=i}}e.current=t,Ot=2}}function np(){if(Ot===2){Ot=0;var e=Ai,t=Hr,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=V.T,V.T=null;var l=$.p;$.p=2;var p=Ze;Ze|=4;try{Rd(e,t.alternate,t)}finally{Ze=p,$.p=l,V.T=i}}Ot=3}}function ip(){if(Ot===4||Ot===3){Ot=0,pt();var e=Ai,t=Hr,i=li,l=qd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ot=5:(Ot=0,Hr=Ai=null,rp(e,e.pendingLanes));var p=e.pendingLanes;if(p===0&&(ki=null),rs(i),t=t.stateNode,We&&typeof We.onCommitFiberRoot=="function")try{We.onCommitFiberRoot(mt,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=V.T,p=$.p,$.p=2,V.T=null;try{for(var w=e.onRecoverableError,L=0;L<l.length;L++){var U=l[L];w(U.value,{componentStack:U.stack})}}finally{V.T=t,$.p=p}}(li&3)!==0&&ca(),Un(e),p=e.pendingLanes,(i&261930)!==0&&(p&42)!==0?e===xc?Is++:(Is=0,xc=e):Is=0,Us(0)}}function rp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ss(t)))}function ca(){return tp(),np(),ip(),sp()}function sp(){if(Ot!==5)return!1;var e=Ai,t=Cc;Cc=0;var i=rs(li),l=V.T,p=$.p;try{$.p=32>i?32:i,V.T=null,i=wc,wc=null;var w=Ai,L=li;if(Ot=0,Hr=Ai=null,li=0,(Ze&6)!==0)throw Error(o(331));var U=Ze;if(Ze|=4,Ud(w.current),zd(w,w.current,L,i),Ze=U,Us(0,!1),We&&typeof We.onPostCommitFiberRoot=="function")try{We.onPostCommitFiberRoot(mt,w)}catch{}return!0}finally{$.p=p,V.T=l,rp(e,t)}}function lp(e,t,i){t=bn(i,t),t=nc(e.stateNode,t,2),e=Si(e,t,2),e!==null&&(ui(e,2),Un(e))}function et(e,t,i){if(e.tag===3)lp(e,e,i);else for(;t!==null;){if(t.tag===3){lp(t,e,i);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ki===null||!ki.has(l))){e=bn(i,e),i=ad(2),l=Si(t,i,2),l!==null&&(od(i,l,t,e),ui(l,2),Un(l));break}}t=t.return}}function Ac(e,t,i){var l=e.pingCache;if(l===null){l=e.pingCache=new Vv;var p=new Set;l.set(t,p)}else p=l.get(t),p===void 0&&(p=new Set,l.set(t,p));p.has(i)||(yc=!0,p.add(i),e=Xv.bind(null,e,t,i),t.then(e,e))}function Xv(e,t,i){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,st===e&&(Ge&i)===i&&(vt===4||vt===3&&(Ge&62914560)===Ge&&300>tt()-ia?(Ze&2)===0&&Ir(e,0):Sc|=i,zr===Ge&&(zr=0)),Un(e)}function ap(e,t){t===0&&(t=on()),e=Wi(e,t),e!==null&&(ui(e,t),Un(e))}function Qv(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),ap(e,i)}function Zv(e,t){var i=0;switch(e.tag){case 31:case 13:var l=e.stateNode,p=e.memoizedState;p!==null&&(i=p.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),ap(e,i)}function Jv(e,t){return Nt(e,t)}var ua=null,Pr=null,Tc=!1,ha=!1,Dc=!1,Di=0;function Un(e){e!==Pr&&e.next===null&&(Pr===null?ua=Pr=e:Pr=Pr.next=e),ha=!0,Tc||(Tc=!0,t0())}function Us(e,t){if(!Dc&&ha){Dc=!0;do for(var i=!1,l=ua;l!==null;){if(e!==0){var p=l.pendingLanes;if(p===0)var w=0;else{var L=l.suspendedLanes,U=l.pingedLanes;w=(1<<31-Ee(42|e)+1)-1,w&=p&~(L&~U),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(i=!0,hp(l,w))}else w=Ge,w=hr(l,l===st?w:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(w&3)===0||Fi(l,w)||(i=!0,hp(l,w));l=l.next}while(i);Dc=!1}}function e0(){op()}function op(){ha=Tc=!1;var e=0;Di!==0&&h0()&&(e=Di);for(var t=tt(),i=null,l=ua;l!==null;){var p=l.next,w=cp(l,t);w===0?(l.next=null,i===null?ua=p:i.next=p,p===null&&(Pr=i)):(i=l,(e!==0||(w&3)!==0)&&(ha=!0)),l=p}Ot!==0&&Ot!==5||Us(e),Di!==0&&(Di=0)}function cp(e,t){for(var i=e.suspendedLanes,l=e.pingedLanes,p=e.expirationTimes,w=e.pendingLanes&-62914561;0<w;){var L=31-Ee(w),U=1<<L,X=p[L];X===-1?((U&i)===0||(U&l)!==0)&&(p[L]=Yt(U,t)):X<=t&&(e.expiredLanes|=U),w&=~U}if(t=st,i=Ge,i=hr(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,i===0||e===t&&(Je===2||Je===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Kt(l),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Fi(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(l!==null&&Kt(l),rs(i)){case 2:case 8:i=ye;break;case 32:i=ke;break;case 268435456:i=Be;break;default:i=ke}return l=up.bind(null,e),i=Nt(i,l),e.callbackPriority=t,e.callbackNode=i,t}return l!==null&&l!==null&&Kt(l),e.callbackPriority=2,e.callbackNode=null,2}function up(e,t){if(Ot!==0&&Ot!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(ca()&&e.callbackNode!==i)return null;var l=Ge;return l=hr(e,e===st?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Vd(e,l,t),cp(e,tt()),e.callbackNode!=null&&e.callbackNode===i?up.bind(null,e):null)}function hp(e,t){if(ca())return null;Vd(e,t,!0)}function t0(){d0(function(){(Ze&6)!==0?Nt(ue,e0):op()})}function Rc(){if(Di===0){var e=kr;e===0&&(e=Bn,Bn<<=1,(Bn&261888)===0&&(Bn=256)),Di=e}return Di}function fp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:yl(""+e)}function dp(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function n0(e,t,i,l,p){if(t==="submit"&&i&&i.stateNode===p){var w=fp((p[Mt]||null).action),L=l.submitter;L&&(t=(t=L[Mt]||null)?fp(t.formAction):L.getAttribute("formAction"),t!==null&&(w=t,L=null));var U=new wl("action","action",null,l,p);e.push({event:U,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Di!==0){var X=L?dp(p,L):new FormData(p);Xo(i,{pending:!0,data:X,method:p.method,action:w},null,X)}}else typeof w=="function"&&(U.preventDefault(),X=L?dp(p,L):new FormData(p),Xo(i,{pending:!0,data:X,method:p.method,action:w},w,X))},currentTarget:p}]})}}for(var Mc=0;Mc<fo.length;Mc++){var Lc=fo[Mc],i0=Lc.toLowerCase(),r0=Lc[0].toUpperCase()+Lc.slice(1);Dn(i0,"on"+r0)}Dn(qh,"onAnimationEnd"),Dn(Gh,"onAnimationIteration"),Dn(Vh,"onAnimationStart"),Dn("dblclick","onDoubleClick"),Dn("focusin","onFocus"),Dn("focusout","onBlur"),Dn(Sv,"onTransitionRun"),Dn(bv,"onTransitionStart"),Dn(Cv,"onTransitionCancel"),Dn($h,"onTransitionEnd"),Lt("onMouseEnter",["mouseout","mouseover"]),Lt("onMouseLeave",["mouseout","mouseover"]),Lt("onPointerEnter",["pointerout","pointerover"]),Lt("onPointerLeave",["pointerout","pointerover"]),ct("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ct("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ct("onBeforeInput",["compositionend","keypress","textInput","paste"]),ct("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ct("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ct("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ps="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(" "),s0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ps));function pp(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var l=e[i],p=l.event;l=l.listeners;e:{var w=void 0;if(t)for(var L=l.length-1;0<=L;L--){var U=l[L],X=U.instance,se=U.currentTarget;if(U=U.listener,X!==w&&p.isPropagationStopped())break e;w=U,p.currentTarget=se;try{w(p)}catch(fe){kl(fe)}p.currentTarget=null,w=X}else for(L=0;L<l.length;L++){if(U=l[L],X=U.instance,se=U.currentTarget,U=U.listener,X!==w&&p.isPropagationStopped())break e;w=U,p.currentTarget=se;try{w(p)}catch(fe){kl(fe)}p.currentTarget=null,w=X}}}}function Fe(e,t){var i=t[ss];i===void 0&&(i=t[ss]=new Set);var l=e+"__bubble";i.has(l)||(mp(t,e,2,!1),i.add(l))}function Oc(e,t,i){var l=0;t&&(l|=4),mp(i,e,l,t)}var fa="_reactListening"+Math.random().toString(36).slice(2);function Bc(e){if(!e[fa]){e[fa]=!0,ee.forEach(function(i){i!=="selectionchange"&&(s0.has(i)||Oc(i,!1,e),Oc(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fa]||(t[fa]=!0,Oc("selectionchange",!1,t))}}function mp(e,t,i,l){switch(Gp(t)){case 2:var p=O0;break;case 8:p=B0;break;default:p=Wc}i=p.bind(null,t,i,e),p=void 0,!Ja||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(p=!0),l?p!==void 0?e.addEventListener(t,i,{capture:!0,passive:p}):e.addEventListener(t,i,!0):p!==void 0?e.addEventListener(t,i,{passive:p}):e.addEventListener(t,i,!1)}function Nc(e,t,i,l,p){var w=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var L=l.tag;if(L===3||L===4){var U=l.stateNode.containerInfo;if(U===p)break;if(L===4)for(L=l.return;L!==null;){var X=L.tag;if((X===3||X===4)&&L.stateNode.containerInfo===p)return;L=L.return}for(;U!==null;){if(L=hi(U),L===null)return;if(X=L.tag,X===5||X===6||X===26||X===27){l=w=L;continue e}U=U.parentNode}}l=l.return}yh(function(){var se=w,fe=Qa(i),ge=[];e:{var le=Kh.get(e);if(le!==void 0){var ce=wl,xe=e;switch(e){case"keypress":if(bl(i)===0)break e;case"keydown":case"keyup":ce=Z_;break;case"focusin":xe="focus",ce=io;break;case"focusout":xe="blur",ce=io;break;case"beforeblur":case"afterblur":ce=io;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=Ch;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=U_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=tv;break;case qh:case Gh:case Vh:ce=q_;break;case $h:ce=iv;break;case"scroll":case"scrollend":ce=H_;break;case"wheel":ce=sv;break;case"copy":case"cut":case"paste":ce=V_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=xh;break;case"toggle":case"beforetoggle":ce=av}var Oe=(t&4)!==0,rt=!Oe&&(e==="scroll"||e==="scrollend"),ne=Oe?le!==null?le+"Capture":null:le;Oe=[];for(var Q=se,re;Q!==null;){var pe=Q;if(re=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||re===null||ne===null||(pe=cs(Q,ne),pe!=null&&Oe.push(Fs(Q,pe,re))),rt)break;Q=Q.return}0<Oe.length&&(le=new ce(le,xe,null,i,fe),ge.push({event:le,listeners:Oe}))}}if((t&7)===0){e:{if(le=e==="mouseover"||e==="pointerover",ce=e==="mouseout"||e==="pointerout",le&&i!==Xa&&(xe=i.relatedTarget||i.fromElement)&&(hi(xe)||xe[Nn]))break e;if((ce||le)&&(le=fe.window===fe?fe:(le=fe.ownerDocument)?le.defaultView||le.parentWindow:window,ce?(xe=i.relatedTarget||i.toElement,ce=se,xe=xe?hi(xe):null,xe!==null&&(rt=v(xe),Oe=xe.tag,xe!==rt||Oe!==5&&Oe!==27&&Oe!==6)&&(xe=null)):(ce=null,xe=se),ce!==xe)){if(Oe=Ch,pe="onMouseLeave",ne="onMouseEnter",Q="mouse",(e==="pointerout"||e==="pointerover")&&(Oe=xh,pe="onPointerLeave",ne="onPointerEnter",Q="pointer"),rt=ce==null?le:Vi(ce),re=xe==null?le:Vi(xe),le=new Oe(pe,Q+"leave",ce,i,fe),le.target=rt,le.relatedTarget=re,pe=null,hi(fe)===se&&(Oe=new Oe(ne,Q+"enter",xe,i,fe),Oe.target=re,Oe.relatedTarget=rt,pe=Oe),rt=pe,ce&&xe)t:{for(Oe=l0,ne=ce,Q=xe,re=0,pe=ne;pe;pe=Oe(pe))re++;pe=0;for(var De=Q;De;De=Oe(De))pe++;for(;0<re-pe;)ne=Oe(ne),re--;for(;0<pe-re;)Q=Oe(Q),pe--;for(;re--;){if(ne===Q||Q!==null&&ne===Q.alternate){Oe=ne;break t}ne=Oe(ne),Q=Oe(Q)}Oe=null}else Oe=null;ce!==null&&gp(ge,le,ce,Oe,!1),xe!==null&&rt!==null&&gp(ge,rt,xe,Oe,!0)}}e:{if(le=se?Vi(se):window,ce=le.nodeName&&le.nodeName.toLowerCase(),ce==="select"||ce==="input"&&le.type==="file")var Xe=Lh;else if(Rh(le))if(Oh)Xe=_v;else{Xe=mv;var Te=pv}else ce=le.nodeName,!ce||ce.toLowerCase()!=="input"||le.type!=="checkbox"&&le.type!=="radio"?se&&Wa(se.elementType)&&(Xe=Lh):Xe=gv;if(Xe&&(Xe=Xe(e,se))){Mh(ge,Xe,i,fe);break e}Te&&Te(e,le,se),e==="focusout"&&se&&le.type==="number"&&se.memoizedProps.value!=null&&Ya(le,"number",le.value)}switch(Te=se?Vi(se):window,e){case"focusin":(Rh(Te)||Te.contentEditable==="true")&&(vr=Te,co=se,_s=null);break;case"focusout":_s=co=vr=null;break;case"mousedown":uo=!0;break;case"contextmenu":case"mouseup":case"dragend":uo=!1,Ph(ge,i,fe);break;case"selectionchange":if(yv)break;case"keydown":case"keyup":Ph(ge,i,fe)}var He;if(so)e:{switch(e){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else _r?Th(e,i)&&(Ve="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ve="onCompositionStart");Ve&&(Eh&&i.locale!=="ko"&&(_r||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&_r&&(He=Sh()):(di=fe,eo="value"in di?di.value:di.textContent,_r=!0)),Te=da(se,Ve),0<Te.length&&(Ve=new wh(Ve,e,null,i,fe),ge.push({event:Ve,listeners:Te}),He?Ve.data=He:(He=Dh(i),He!==null&&(Ve.data=He)))),(He=cv?uv(e,i):hv(e,i))&&(Ve=da(se,"onBeforeInput"),0<Ve.length&&(Te=new wh("onBeforeInput","beforeinput",null,i,fe),ge.push({event:Te,listeners:Ve}),Te.data=He)),n0(ge,e,se,i,fe)}pp(ge,t)})}function Fs(e,t,i){return{instance:e,listener:t,currentTarget:i}}function da(e,t){for(var i=t+"Capture",l=[];e!==null;){var p=e,w=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||w===null||(p=cs(e,i),p!=null&&l.unshift(Fs(e,p,w)),p=cs(e,t),p!=null&&l.push(Fs(e,p,w))),e.tag===3)return l;e=e.return}return[]}function l0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function gp(e,t,i,l,p){for(var w=t._reactName,L=[];i!==null&&i!==l;){var U=i,X=U.alternate,se=U.stateNode;if(U=U.tag,X!==null&&X===l)break;U!==5&&U!==26&&U!==27||se===null||(X=se,p?(se=cs(i,w),se!=null&&L.unshift(Fs(i,se,X))):p||(se=cs(i,w),se!=null&&L.push(Fs(i,se,X)))),i=i.return}L.length!==0&&e.push({event:t,listeners:L})}var a0=/\r\n?/g,o0=/\u0000|\uFFFD/g;function _p(e){return(typeof e=="string"?e:""+e).replace(a0,`
|
|
49
|
+
`).replace(o0,"")}function vp(e,t){return t=_p(t),_p(e)===t}function it(e,t,i,l,p,w){switch(i){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||pr(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&pr(e,""+l);break;case"className":_l(e,"class",l);break;case"tabIndex":_l(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":_l(e,i,l);break;case"style":_h(e,l,w);break;case"data":if(t!=="object"){_l(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=yl(""+l),e.setAttribute(i,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof w=="function"&&(i==="formAction"?(t!=="input"&&it(e,t,"name",p.name,p,null),it(e,t,"formEncType",p.formEncType,p,null),it(e,t,"formMethod",p.formMethod,p,null),it(e,t,"formTarget",p.formTarget,p,null)):(it(e,t,"encType",p.encType,p,null),it(e,t,"method",p.method,p,null),it(e,t,"target",p.target,p,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(i);break}l=yl(""+l),e.setAttribute(i,l);break;case"onClick":l!=null&&(e.onclick=Vn);break;case"onScroll":l!=null&&Fe("scroll",e);break;case"onScrollEnd":l!=null&&Fe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(p.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}i=yl(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""+l):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":l===!0?e.setAttribute(i,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(i,l):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(i,l):e.removeAttribute(i);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(i):e.setAttribute(i,l);break;case"popover":Fe("beforetoggle",e),Fe("toggle",e),gl(e,"popover",l);break;case"xlinkActuate":Gn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Gn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Gn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Gn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Gn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Gn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Gn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Gn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Gn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":gl(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=j_.get(i)||i,gl(e,i,l))}}function jc(e,t,i,l,p,w){switch(i){case"style":_h(e,l,w);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(i=l.__html,i!=null){if(p.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"children":typeof l=="string"?pr(e,l):(typeof l=="number"||typeof l=="bigint")&&pr(e,""+l);break;case"onScroll":l!=null&&Fe("scroll",e);break;case"onScrollEnd":l!=null&&Fe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Vn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Se.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(p=i.endsWith("Capture"),t=i.slice(2,p?i.length-7:void 0),w=e[Mt]||null,w=w!=null?w[i]:null,typeof w=="function"&&e.removeEventListener(t,w,p),typeof l=="function")){typeof w!="function"&&w!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,l,p);break e}i in e?e[i]=l:l===!0?e.setAttribute(i,""):gl(e,i,l)}}}function Pt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Fe("error",e),Fe("load",e);var l=!1,p=!1,w;for(w in i)if(i.hasOwnProperty(w)){var L=i[w];if(L!=null)switch(w){case"src":l=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:it(e,t,w,L,i,null)}}p&&it(e,t,"srcSet",i.srcSet,i,null),l&&it(e,t,"src",i.src,i,null);return;case"input":Fe("invalid",e);var U=w=L=p=null,X=null,se=null;for(l in i)if(i.hasOwnProperty(l)){var fe=i[l];if(fe!=null)switch(l){case"name":p=fe;break;case"type":L=fe;break;case"checked":X=fe;break;case"defaultChecked":se=fe;break;case"value":w=fe;break;case"defaultValue":U=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(o(137,t));break;default:it(e,t,l,fe,i,null)}}dh(e,w,U,X,se,L,p,!1);return;case"select":Fe("invalid",e),l=L=w=null;for(p in i)if(i.hasOwnProperty(p)&&(U=i[p],U!=null))switch(p){case"value":w=U;break;case"defaultValue":L=U;break;case"multiple":l=U;default:it(e,t,p,U,i,null)}t=w,i=L,e.multiple=!!l,t!=null?dr(e,!!l,t,!1):i!=null&&dr(e,!!l,i,!0);return;case"textarea":Fe("invalid",e),w=p=l=null;for(L in i)if(i.hasOwnProperty(L)&&(U=i[L],U!=null))switch(L){case"value":l=U;break;case"defaultValue":p=U;break;case"children":w=U;break;case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(91));break;default:it(e,t,L,U,i,null)}mh(e,l,p,w);return;case"option":for(X in i)if(i.hasOwnProperty(X)&&(l=i[X],l!=null))switch(X){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:it(e,t,X,l,i,null)}return;case"dialog":Fe("beforetoggle",e),Fe("toggle",e),Fe("cancel",e),Fe("close",e);break;case"iframe":case"object":Fe("load",e);break;case"video":case"audio":for(l=0;l<Ps.length;l++)Fe(Ps[l],e);break;case"image":Fe("error",e),Fe("load",e);break;case"details":Fe("toggle",e);break;case"embed":case"source":case"link":Fe("error",e),Fe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(se in i)if(i.hasOwnProperty(se)&&(l=i[se],l!=null))switch(se){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:it(e,t,se,l,i,null)}return;default:if(Wa(t)){for(fe in i)i.hasOwnProperty(fe)&&(l=i[fe],l!==void 0&&jc(e,t,fe,l,i,void 0));return}}for(U in i)i.hasOwnProperty(U)&&(l=i[U],l!=null&&it(e,t,U,l,i,null))}function c0(e,t,i,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,w=null,L=null,U=null,X=null,se=null,fe=null;for(ce in i){var ge=i[ce];if(i.hasOwnProperty(ce)&&ge!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":X=ge;default:l.hasOwnProperty(ce)||it(e,t,ce,null,l,ge)}}for(var le in l){var ce=l[le];if(ge=i[le],l.hasOwnProperty(le)&&(ce!=null||ge!=null))switch(le){case"type":w=ce;break;case"name":p=ce;break;case"checked":se=ce;break;case"defaultChecked":fe=ce;break;case"value":L=ce;break;case"defaultValue":U=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(o(137,t));break;default:ce!==ge&&it(e,t,le,ce,l,ge)}}Ka(e,L,U,X,se,fe,w,p);return;case"select":ce=L=U=le=null;for(w in i)if(X=i[w],i.hasOwnProperty(w)&&X!=null)switch(w){case"value":break;case"multiple":ce=X;default:l.hasOwnProperty(w)||it(e,t,w,null,l,X)}for(p in l)if(w=l[p],X=i[p],l.hasOwnProperty(p)&&(w!=null||X!=null))switch(p){case"value":le=w;break;case"defaultValue":U=w;break;case"multiple":L=w;default:w!==X&&it(e,t,p,w,l,X)}t=U,i=L,l=ce,le!=null?dr(e,!!i,le,!1):!!l!=!!i&&(t!=null?dr(e,!!i,t,!0):dr(e,!!i,i?[]:"",!1));return;case"textarea":ce=le=null;for(U in i)if(p=i[U],i.hasOwnProperty(U)&&p!=null&&!l.hasOwnProperty(U))switch(U){case"value":break;case"children":break;default:it(e,t,U,null,l,p)}for(L in l)if(p=l[L],w=i[L],l.hasOwnProperty(L)&&(p!=null||w!=null))switch(L){case"value":le=p;break;case"defaultValue":ce=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(o(91));break;default:p!==w&&it(e,t,L,p,l,w)}ph(e,le,ce);return;case"option":for(var xe in i)if(le=i[xe],i.hasOwnProperty(xe)&&le!=null&&!l.hasOwnProperty(xe))switch(xe){case"selected":e.selected=!1;break;default:it(e,t,xe,null,l,le)}for(X in l)if(le=l[X],ce=i[X],l.hasOwnProperty(X)&&le!==ce&&(le!=null||ce!=null))switch(X){case"selected":e.selected=le&&typeof le!="function"&&typeof le!="symbol";break;default:it(e,t,X,le,l,ce)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Oe in i)le=i[Oe],i.hasOwnProperty(Oe)&&le!=null&&!l.hasOwnProperty(Oe)&&it(e,t,Oe,null,l,le);for(se in l)if(le=l[se],ce=i[se],l.hasOwnProperty(se)&&le!==ce&&(le!=null||ce!=null))switch(se){case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(o(137,t));break;default:it(e,t,se,le,l,ce)}return;default:if(Wa(t)){for(var rt in i)le=i[rt],i.hasOwnProperty(rt)&&le!==void 0&&!l.hasOwnProperty(rt)&&jc(e,t,rt,void 0,l,le);for(fe in l)le=l[fe],ce=i[fe],!l.hasOwnProperty(fe)||le===ce||le===void 0&&ce===void 0||jc(e,t,fe,le,l,ce);return}}for(var ne in i)le=i[ne],i.hasOwnProperty(ne)&&le!=null&&!l.hasOwnProperty(ne)&&it(e,t,ne,null,l,le);for(ge in l)le=l[ge],ce=i[ge],!l.hasOwnProperty(ge)||le===ce||le==null&&ce==null||it(e,t,ge,le,l,ce)}function yp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function u0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),l=0;l<i.length;l++){var p=i[l],w=p.transferSize,L=p.initiatorType,U=p.duration;if(w&&U&&yp(L)){for(L=0,U=p.responseEnd,l+=1;l<i.length;l++){var X=i[l],se=X.startTime;if(se>U)break;var fe=X.transferSize,ge=X.initiatorType;fe&&yp(ge)&&(X=X.responseEnd,L+=fe*(X<U?1:(U-se)/(X-se)))}if(--l,t+=8*(w+L)/(p.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var zc=null,Hc=null;function pa(e){return e.nodeType===9?e:e.ownerDocument}function Sp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function bp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Ic(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Uc=null;function h0(){var e=window.event;return e&&e.type==="popstate"?e===Uc?!1:(Uc=e,!0):(Uc=null,!1)}var Cp=typeof setTimeout=="function"?setTimeout:void 0,f0=typeof clearTimeout=="function"?clearTimeout:void 0,wp=typeof Promise=="function"?Promise:void 0,d0=typeof queueMicrotask=="function"?queueMicrotask:typeof wp<"u"?function(e){return wp.resolve(null).then(e).catch(p0)}:Cp;function p0(e){setTimeout(function(){throw e})}function Ri(e){return e==="head"}function xp(e,t){var i=t,l=0;do{var p=i.nextSibling;if(e.removeChild(i),p&&p.nodeType===8)if(i=p.data,i==="/$"||i==="/&"){if(l===0){e.removeChild(p),Vr(t);return}l--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")l++;else if(i==="html")qs(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,qs(i);for(var w=i.firstChild;w;){var L=w.nextSibling,U=w.nodeName;w[Ue]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&w.rel.toLowerCase()==="stylesheet"||i.removeChild(w),w=L}}else i==="body"&&qs(e.ownerDocument.body);i=p}while(i);Vr(t)}function Ep(e,t){var i=e;e=0;do{var l=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),l&&l.nodeType===8)if(i=l.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=l}while(i)}function Pc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Pc(i),os(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function m0(e,t,i,l){for(;e.nodeType===1;){var p=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Ue])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(w=e.getAttribute("rel"),w==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(w!==p.rel||e.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||e.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||e.getAttribute("title")!==(p.title==null?null:p.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(w=e.getAttribute("src"),(w!==(p.src==null?null:p.src)||e.getAttribute("type")!==(p.type==null?null:p.type)||e.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&w&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var w=p.name==null?null:""+p.name;if(p.type==="hidden"&&e.getAttribute("name")===w)return e}else return e;if(e=kn(e.nextSibling),e===null)break}return null}function g0(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=kn(e.nextSibling),e===null))return null;return e}function kp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=kn(e.nextSibling),e===null))return null;return e}function Fc(e){return e.data==="$?"||e.data==="$~"}function qc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function _0(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var l=function(){t(),i.removeEventListener("DOMContentLoaded",l)};i.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function kn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Gc=null;function Ap(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return kn(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function Tp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function Dp(e,t,i){switch(t=pa(i),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function qs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);os(e)}var An=new Map,Rp=new Set;function ma(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ai=$.d;$.d={f:v0,r:y0,D:S0,C:b0,L:C0,m:w0,X:E0,S:x0,M:k0};function v0(){var e=ai.f(),t=la();return e||t}function y0(e){var t=fi(e);t!==null&&t.tag===5&&t.type==="form"?Kf(t):ai.r(e)}var Fr=typeof document>"u"?null:document;function Mp(e,t,i){var l=Fr;if(l&&typeof t=="string"&&t){var p=yn(t);p='link[rel="'+e+'"][href="'+p+'"]',typeof i=="string"&&(p+='[crossorigin="'+i+'"]'),Rp.has(p)||(Rp.add(p),e={rel:e,crossOrigin:i,href:t},l.querySelector(p)===null&&(t=l.createElement("link"),Pt(t,"link",e),bt(t),l.head.appendChild(t)))}}function S0(e){ai.D(e),Mp("dns-prefetch",e,null)}function b0(e,t){ai.C(e,t),Mp("preconnect",e,t)}function C0(e,t,i){ai.L(e,t,i);var l=Fr;if(l&&e&&t){var p='link[rel="preload"][as="'+yn(t)+'"]';t==="image"&&i&&i.imageSrcSet?(p+='[imagesrcset="'+yn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(p+='[imagesizes="'+yn(i.imageSizes)+'"]')):p+='[href="'+yn(e)+'"]';var w=p;switch(t){case"style":w=qr(e);break;case"script":w=Gr(e)}An.has(w)||(e=u({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),An.set(w,e),l.querySelector(p)!==null||t==="style"&&l.querySelector(Gs(w))||t==="script"&&l.querySelector(Vs(w))||(t=l.createElement("link"),Pt(t,"link",e),bt(t),l.head.appendChild(t)))}}function w0(e,t){ai.m(e,t);var i=Fr;if(i&&e){var l=t&&typeof t.as=="string"?t.as:"script",p='link[rel="modulepreload"][as="'+yn(l)+'"][href="'+yn(e)+'"]',w=p;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=Gr(e)}if(!An.has(w)&&(e=u({rel:"modulepreload",href:e},t),An.set(w,e),i.querySelector(p)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Vs(w)))return}l=i.createElement("link"),Pt(l,"link",e),bt(l),i.head.appendChild(l)}}}function x0(e,t,i){ai.S(e,t,i);var l=Fr;if(l&&e){var p=jn(l).hoistableStyles,w=qr(e);t=t||"default";var L=p.get(w);if(!L){var U={loading:0,preload:null};if(L=l.querySelector(Gs(w)))U.loading=5;else{e=u({rel:"stylesheet",href:e,"data-precedence":t},i),(i=An.get(w))&&Vc(e,i);var X=L=l.createElement("link");bt(X),Pt(X,"link",e),X._p=new Promise(function(se,fe){X.onload=se,X.onerror=fe}),X.addEventListener("load",function(){U.loading|=1}),X.addEventListener("error",function(){U.loading|=2}),U.loading|=4,ga(L,t,l)}L={type:"stylesheet",instance:L,count:1,state:U},p.set(w,L)}}}function E0(e,t){ai.X(e,t);var i=Fr;if(i&&e){var l=jn(i).hoistableScripts,p=Gr(e),w=l.get(p);w||(w=i.querySelector(Vs(p)),w||(e=u({src:e,async:!0},t),(t=An.get(p))&&$c(e,t),w=i.createElement("script"),bt(w),Pt(w,"link",e),i.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},l.set(p,w))}}function k0(e,t){ai.M(e,t);var i=Fr;if(i&&e){var l=jn(i).hoistableScripts,p=Gr(e),w=l.get(p);w||(w=i.querySelector(Vs(p)),w||(e=u({src:e,async:!0,type:"module"},t),(t=An.get(p))&&$c(e,t),w=i.createElement("script"),bt(w),Pt(w,"link",e),i.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},l.set(p,w))}}function Lp(e,t,i,l){var p=(p=me.current)?ma(p):null;if(!p)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=qr(i.href),i=jn(p).hoistableStyles,l=i.get(t),l||(l={type:"style",instance:null,count:0,state:null},i.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=qr(i.href);var w=jn(p).hoistableStyles,L=w.get(e);if(L||(p=p.ownerDocument||p,L={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(e,L),(w=p.querySelector(Gs(e)))&&!w._p&&(L.instance=w,L.state.loading=5),An.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},An.set(e,i),w||A0(p,e,i,L.state))),t&&l===null)throw Error(o(528,""));return L}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Gr(i),i=jn(p).hoistableScripts,l=i.get(t),l||(l={type:"script",instance:null,count:0,state:null},i.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function qr(e){return'href="'+yn(e)+'"'}function Gs(e){return'link[rel="stylesheet"]['+e+"]"}function Op(e){return u({},e,{"data-precedence":e.precedence,precedence:null})}function A0(e,t,i,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Pt(t,"link",i),bt(t),e.head.appendChild(t))}function Gr(e){return'[src="'+yn(e)+'"]'}function Vs(e){return"script[async]"+e}function Bp(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+yn(i.href)+'"]');if(l)return t.instance=l,bt(l),l;var p=u({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),bt(l),Pt(l,"style",p),ga(l,i.precedence,e),t.instance=l;case"stylesheet":p=qr(i.href);var w=e.querySelector(Gs(p));if(w)return t.state.loading|=4,t.instance=w,bt(w),w;l=Op(i),(p=An.get(p))&&Vc(l,p),w=(e.ownerDocument||e).createElement("link"),bt(w);var L=w;return L._p=new Promise(function(U,X){L.onload=U,L.onerror=X}),Pt(w,"link",l),t.state.loading|=4,ga(w,i.precedence,e),t.instance=w;case"script":return w=Gr(i.src),(p=e.querySelector(Vs(w)))?(t.instance=p,bt(p),p):(l=i,(p=An.get(w))&&(l=u({},i),$c(l,p)),e=e.ownerDocument||e,p=e.createElement("script"),bt(p),Pt(p,"link",l),e.head.appendChild(p),t.instance=p);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,ga(l,i.precedence,e));return t.instance}function ga(e,t,i){for(var l=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=l.length?l[l.length-1]:null,w=p,L=0;L<l.length;L++){var U=l[L];if(U.dataset.precedence===t)w=U;else if(w!==p)break}w?w.parentNode.insertBefore(e,w.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Vc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function $c(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var _a=null;function Np(e,t,i){if(_a===null){var l=new Map,p=_a=new Map;p.set(i,l)}else p=_a,l=p.get(i),l||(l=new Map,p.set(i,l));if(l.has(e))return l;for(l.set(e,null),i=i.getElementsByTagName(e),p=0;p<i.length;p++){var w=i[p];if(!(w[Ue]||w[gt]||e==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var L=w.getAttribute(t)||"";L=e+L;var U=l.get(L);U?U.push(w):l.set(L,[w])}}return l}function jp(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function T0(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function zp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function D0(e,t,i,l){if(i.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var p=qr(l.href),w=t.querySelector(Gs(p));if(w){t=w._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=va.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=w,bt(w);return}w=t.ownerDocument||t,l=Op(l),(p=An.get(p))&&Vc(l,p),w=w.createElement("link"),bt(w);var L=w;L._p=new Promise(function(U,X){L.onload=U,L.onerror=X}),Pt(w,"link",l),i.instance=w}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=va.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Kc=0;function R0(e,t){return e.stylesheets&&e.count===0&&Sa(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var l=setTimeout(function(){if(e.stylesheets&&Sa(e,e.stylesheets),e.unsuspend){var w=e.unsuspend;e.unsuspend=null,w()}},6e4+t);0<e.imgBytes&&Kc===0&&(Kc=62500*u0());var p=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Sa(e,e.stylesheets),e.unsuspend)){var w=e.unsuspend;e.unsuspend=null,w()}},(e.imgBytes>Kc?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(p)}}:null}function va(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Sa(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ya=null;function Sa(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ya=new Map,t.forEach(M0,e),ya=null,va.call(e))}function M0(e,t){if(!(t.state.loading&4)){var i=ya.get(e);if(i)var l=i.get(null);else{i=new Map,ya.set(e,i);for(var p=e.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<p.length;w++){var L=p[w];(L.nodeName==="LINK"||L.getAttribute("media")!=="not all")&&(i.set(L.dataset.precedence,L),l=L)}l&&i.set(null,l)}p=t.instance,L=p.getAttribute("data-precedence"),w=i.get(L)||l,w===l&&i.set(null,p),i.set(L,p),this.count++,l=va.bind(this),p.addEventListener("load",l),p.addEventListener("error",l),w?w.parentNode.insertBefore(p,w.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(p,e.firstChild)),t.state.loading|=4}}var $s={$$typeof:y,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function L0(e,t,i,l,p,w,L,U,X){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=fr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fr(0),this.hiddenUpdates=fr(null),this.identifierPrefix=l,this.onUncaughtError=p,this.onCaughtError=w,this.onRecoverableError=L,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function Hp(e,t,i,l,p,w,L,U,X,se,fe,ge){return e=new L0(e,t,i,L,X,se,fe,ge,U),t=1,w===!0&&(t|=24),w=un(3,null,null,t),e.current=w,w.stateNode=e,t=ko(),t.refCount++,e.pooledCache=t,t.refCount++,w.memoizedState={element:l,isDehydrated:i,cache:t},Ro(w),e}function Ip(e){return e?(e=br,e):br}function Up(e,t,i,l,p,w){p=Ip(p),l.context===null?l.context=p:l.pendingContext=p,l=yi(t),l.payload={element:i},w=w===void 0?null:w,w!==null&&(l.callback=w),i=Si(e,l,t),i!==null&&(sn(i,e,t),xs(i,e,t))}function Pp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Yc(e,t){Pp(e,t),(e=e.alternate)&&Pp(e,t)}function Fp(e){if(e.tag===13||e.tag===31){var t=Wi(e,67108864);t!==null&&sn(t,e,67108864),Yc(e,67108864)}}function qp(e){if(e.tag===13||e.tag===31){var t=mn();t=is(t);var i=Wi(e,t);i!==null&&sn(i,e,t),Yc(e,t)}}var ba=!0;function O0(e,t,i,l){var p=V.T;V.T=null;var w=$.p;try{$.p=2,Wc(e,t,i,l)}finally{$.p=w,V.T=p}}function B0(e,t,i,l){var p=V.T;V.T=null;var w=$.p;try{$.p=8,Wc(e,t,i,l)}finally{$.p=w,V.T=p}}function Wc(e,t,i,l){if(ba){var p=Xc(l);if(p===null)Nc(e,t,l,Ca,i),Vp(e,l);else if(j0(p,e,t,i,l))l.stopPropagation();else if(Vp(e,l),t&4&&-1<N0.indexOf(e)){for(;p!==null;){var w=fi(p);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var L=St(w.pendingLanes);if(L!==0){var U=w;for(U.pendingLanes|=2,U.entangledLanes|=2;L;){var X=1<<31-Ee(L);U.entanglements[1]|=X,L&=~X}Un(w),(Ze&6)===0&&(ra=tt()+500,Us(0))}}break;case 31:case 13:U=Wi(w,2),U!==null&&sn(U,w,2),la(),Yc(w,2)}if(w=Xc(l),w===null&&Nc(e,t,l,Ca,i),w===p)break;p=w}p!==null&&l.stopPropagation()}else Nc(e,t,l,null,i)}}function Xc(e){return e=Qa(e),Qc(e)}var Ca=null;function Qc(e){if(Ca=null,e=hi(e),e!==null){var t=v(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=f(t),e!==null)return e;e=null}else if(i===31){if(e=a(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ca=e,null}function Gp(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(jt()){case ue:return 2;case ye:return 8;case ke:case Me:return 32;case Be:return 268435456;default:return 32}default:return 32}}var Zc=!1,Mi=null,Li=null,Oi=null,Ks=new Map,Ys=new Map,Bi=[],N0="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Vp(e,t){switch(e){case"focusin":case"focusout":Mi=null;break;case"dragenter":case"dragleave":Li=null;break;case"mouseover":case"mouseout":Oi=null;break;case"pointerover":case"pointerout":Ks.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ys.delete(t.pointerId)}}function Ws(e,t,i,l,p,w){return e===null||e.nativeEvent!==w?(e={blockedOn:t,domEventName:i,eventSystemFlags:l,nativeEvent:w,targetContainers:[p]},t!==null&&(t=fi(t),t!==null&&Fp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,p!==null&&t.indexOf(p)===-1&&t.push(p),e)}function j0(e,t,i,l,p){switch(t){case"focusin":return Mi=Ws(Mi,e,t,i,l,p),!0;case"dragenter":return Li=Ws(Li,e,t,i,l,p),!0;case"mouseover":return Oi=Ws(Oi,e,t,i,l,p),!0;case"pointerover":var w=p.pointerId;return Ks.set(w,Ws(Ks.get(w)||null,e,t,i,l,p)),!0;case"gotpointercapture":return w=p.pointerId,Ys.set(w,Ws(Ys.get(w)||null,e,t,i,l,p)),!0}return!1}function $p(e){var t=hi(e.target);if(t!==null){var i=v(t);if(i!==null){if(t=i.tag,t===13){if(t=f(i),t!==null){e.blockedOn=t,ml(e.priority,function(){qp(i)});return}}else if(t===31){if(t=a(i),t!==null){e.blockedOn=t,ml(e.priority,function(){qp(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function wa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Xc(e.nativeEvent);if(i===null){i=e.nativeEvent;var l=new i.constructor(i.type,i);Xa=l,i.target.dispatchEvent(l),Xa=null}else return t=fi(i),t!==null&&Fp(t),e.blockedOn=i,!1;t.shift()}return!0}function Kp(e,t,i){wa(e)&&i.delete(t)}function z0(){Zc=!1,Mi!==null&&wa(Mi)&&(Mi=null),Li!==null&&wa(Li)&&(Li=null),Oi!==null&&wa(Oi)&&(Oi=null),Ks.forEach(Kp),Ys.forEach(Kp)}function xa(e,t){e.blockedOn===t&&(e.blockedOn=null,Zc||(Zc=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,z0)))}var Ea=null;function Yp(e){Ea!==e&&(Ea=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Ea===e&&(Ea=null);for(var t=0;t<e.length;t+=3){var i=e[t],l=e[t+1],p=e[t+2];if(typeof l!="function"){if(Qc(l||i)===null)continue;break}var w=fi(i);w!==null&&(e.splice(t,3),t-=3,Xo(w,{pending:!0,data:p,method:i.method,action:l},l,p))}}))}function Vr(e){function t(X){return xa(X,e)}Mi!==null&&xa(Mi,e),Li!==null&&xa(Li,e),Oi!==null&&xa(Oi,e),Ks.forEach(t),Ys.forEach(t);for(var i=0;i<Bi.length;i++){var l=Bi[i];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Bi.length&&(i=Bi[0],i.blockedOn===null);)$p(i),i.blockedOn===null&&Bi.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(l=0;l<i.length;l+=3){var p=i[l],w=i[l+1],L=p[Mt]||null;if(typeof w=="function")L||Yp(i);else if(L){var U=null;if(w&&w.hasAttribute("formAction")){if(p=w,L=w[Mt]||null)U=L.formAction;else if(Qc(p)!==null)continue}else U=L.action;typeof U=="function"?i[l+1]=U:(i.splice(l,3),l-=3),Yp(i)}}}function Wp(){function e(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(L){return p=L})},focusReset:"manual",scroll:"manual"})}function t(){p!==null&&(p(),p=null),l||setTimeout(i,20)}function i(){if(!l&&!navigation.transition){var w=navigation.currentEntry;w&&w.url!=null&&navigation.navigate(w.url,{state:w.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,p=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),p!==null&&(p(),p=null)}}}function Jc(e){this._internalRoot=e}ka.prototype.render=Jc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var i=t.current,l=mn();Up(i,l,e,t,null,null)},ka.prototype.unmount=Jc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Up(e.current,2,null,e,null,null),la(),t[Nn]=null}};function ka(e){this._internalRoot=e}ka.prototype.unstable_scheduleHydration=function(e){if(e){var t=pl();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Bi.length&&t!==0&&t<Bi[i].priority;i++);Bi.splice(i,0,e),i===0&&$p(e)}};var Xp=r.version;if(Xp!=="19.2.6")throw Error(o(527,Xp,"19.2.6"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=h(t),e=e!==null?m(e):null,e=e===null?null:e.stateNode,e};var H0={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Aa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Aa.isDisabled&&Aa.supportsFiber)try{mt=Aa.inject(H0),We=Aa}catch{}}return Qs.createRoot=function(e,t){if(!d(e))throw Error(o(299));var i=!1,l="",p=id,w=rd,L=sd;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(p=t.onUncaughtError),t.onCaughtError!==void 0&&(w=t.onCaughtError),t.onRecoverableError!==void 0&&(L=t.onRecoverableError)),t=Hp(e,1,!1,null,null,i,l,null,p,w,L,Wp),e[Nn]=t.current,Bc(e),new Jc(t)},Qs.hydrateRoot=function(e,t,i){if(!d(e))throw Error(o(299));var l=!1,p="",w=id,L=rd,U=sd,X=null;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(p=i.identifierPrefix),i.onUncaughtError!==void 0&&(w=i.onUncaughtError),i.onCaughtError!==void 0&&(L=i.onCaughtError),i.onRecoverableError!==void 0&&(U=i.onRecoverableError),i.formState!==void 0&&(X=i.formState)),t=Hp(e,1,!0,t,i??null,l,p,X,w,L,U,Wp),t.context=Ip(null),i=t.current,l=mn(),l=is(l),p=yi(l),p.callback=null,Si(i,p,l),i=l,t.current.lanes=i,ui(t,i),Un(t),e[Nn]=t.current,Bc(e),new ka(t)},Qs.version="19.2.6",Qs}var am;function X0(){if(am)return nu.exports;am=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),nu.exports=W0(),nu.exports}var Q0=X0();const Jr=function(n,r){let d=n;const v=nl[r];let f=null,a=0,c=null;const h=[],m={},u=function(T,k){a=d*4+17,f=(function(R){const N=new Array(R);for(let I=0;I<R;I+=1){N[I]=new Array(R);for(let P=0;P<R;P+=1)N[I][P]=null}return N})(a),_(0,0),_(a-7,0),_(0,a-7),x(),E(),S(T,k),d>=7&&b(T),c==null&&(c=A(d,v,h)),g(c,k)},_=function(T,k){for(let R=-1;R<=7;R+=1)if(!(T+R<=-1||a<=T+R))for(let N=-1;N<=7;N+=1)k+N<=-1||a<=k+N||(0<=R&&R<=6&&(N==0||N==6)||0<=N&&N<=6&&(R==0||R==6)||2<=R&&R<=4&&2<=N&&N<=4?f[T+R][k+N]=!0:f[T+R][k+N]=!1)},C=function(){let T=0,k=0;for(let R=0;R<8;R+=1){u(!0,R);const N=zi.getLostPoint(m);(R==0||T>N)&&(T=N,k=R)}return k},E=function(){for(let T=8;T<a-8;T+=1)f[T][6]==null&&(f[T][6]=T%2==0);for(let T=8;T<a-8;T+=1)f[6][T]==null&&(f[6][T]=T%2==0)},x=function(){const T=zi.getPatternPosition(d);for(let k=0;k<T.length;k+=1)for(let R=0;R<T.length;R+=1){const N=T[k],I=T[R];if(f[N][I]==null)for(let P=-2;P<=2;P+=1)for(let F=-2;F<=2;F+=1)P==-2||P==2||F==-2||F==2||P==0&&F==0?f[N+P][I+F]=!0:f[N+P][I+F]=!1}},b=function(T){const k=zi.getBCHTypeNumber(d);for(let R=0;R<18;R+=1){const N=!T&&(k>>R&1)==1;f[Math.floor(R/3)][R%3+a-8-3]=N}for(let R=0;R<18;R+=1){const N=!T&&(k>>R&1)==1;f[R%3+a-8-3][Math.floor(R/3)]=N}},S=function(T,k){const R=v<<3|k,N=zi.getBCHTypeInfo(R);for(let I=0;I<15;I+=1){const P=!T&&(N>>I&1)==1;I<6?f[I][8]=P:I<8?f[I+1][8]=P:f[a-15+I][8]=P}for(let I=0;I<15;I+=1){const P=!T&&(N>>I&1)==1;I<8?f[8][a-I-1]=P:I<9?f[8][15-I-1+1]=P:f[8][15-I-1]=P}f[a-8][8]=!T},g=function(T,k){let R=-1,N=a-1,I=7,P=0;const F=zi.getMaskFunction(k);for(let K=a-1;K>0;K-=2)for(K==6&&(K-=1);;){for(let W=0;W<2;W+=1)if(f[N][K-W]==null){let V=!1;P<T.length&&(V=(T[P]>>>I&1)==1),F(N,K-W)&&(V=!V),f[N][K-W]=V,I-=1,I==-1&&(P+=1,I=7)}if(N+=R,N<0||a<=N){N-=R,R=-R;break}}},y=function(T,k){let R=0,N=0,I=0;const P=new Array(k.length),F=new Array(k.length);for(let $=0;$<k.length;$+=1){const J=k[$].dataCount,H=k[$].totalCount-J;N=Math.max(N,J),I=Math.max(I,H),P[$]=new Array(J);for(let j=0;j<P[$].length;j+=1)P[$][j]=255&T.getBuffer()[j+R];R+=J;const B=zi.getErrorCorrectPolynomial(H),G=ll(P[$],B.getLength()-1).mod(B);F[$]=new Array(B.getLength()-1);for(let j=0;j<F[$].length;j+=1){const te=j+G.getLength()-F[$].length;F[$][j]=te>=0?G.getAt(te):0}}let K=0;for(let $=0;$<k.length;$+=1)K+=k[$].totalCount;const W=new Array(K);let V=0;for(let $=0;$<N;$+=1)for(let J=0;J<k.length;J+=1)$<P[J].length&&(W[V]=P[J][$],V+=1);for(let $=0;$<I;$+=1)for(let J=0;J<k.length;J+=1)$<F[J].length&&(W[V]=F[J][$],V+=1);return W},A=function(T,k,R){const N=om.getRSBlocks(T,k),I=cm();for(let F=0;F<R.length;F+=1){const K=R[F];I.put(K.getMode(),4),I.put(K.getLength(),zi.getLengthInBits(K.getMode(),T)),K.write(I)}let P=0;for(let F=0;F<N.length;F+=1)P+=N[F].dataCount;if(I.getLengthInBits()>P*8)throw"code length overflow. ("+I.getLengthInBits()+">"+P*8+")";for(I.getLengthInBits()+4<=P*8&&I.put(0,4);I.getLengthInBits()%8!=0;)I.putBit(!1);for(;!(I.getLengthInBits()>=P*8||(I.put(236,8),I.getLengthInBits()>=P*8));)I.put(17,8);return y(I,N)};m.addData=function(T,k){k=k||"Byte";let R=null;switch(k){case"Numeric":R=Z0(T);break;case"Alphanumeric":R=J0(T);break;case"Byte":R=e1(T);break;case"Kanji":R=t1(T);break;default:throw"mode:"+k}h.push(R),c=null},m.isDark=function(T,k){if(T<0||a<=T||k<0||a<=k)throw T+","+k;return f[T][k]},m.getModuleCount=function(){return a},m.make=function(){if(d<1){let T=1;for(;T<40;T++){const k=om.getRSBlocks(T,v),R=cm();for(let I=0;I<h.length;I++){const P=h[I];R.put(P.getMode(),4),R.put(P.getLength(),zi.getLengthInBits(P.getMode(),T)),P.write(R)}let N=0;for(let I=0;I<k.length;I++)N+=k[I].dataCount;if(R.getLengthInBits()<=N*8)break}d=T}u(!1,C())},m.createTableTag=function(T,k){T=T||2,k=typeof k>"u"?T*4:k;let R="";R+='<table style="',R+=" border-width: 0px; border-style: none;",R+=" border-collapse: collapse;",R+=" padding: 0px; margin: "+k+"px;",R+='">',R+="<tbody>";for(let N=0;N<m.getModuleCount();N+=1){R+="<tr>";for(let I=0;I<m.getModuleCount();I+=1)R+='<td style="',R+=" border-width: 0px; border-style: none;",R+=" border-collapse: collapse;",R+=" padding: 0px; margin: 0px;",R+=" width: "+T+"px;",R+=" height: "+T+"px;",R+=" background-color: ",R+=m.isDark(N,I)?"#000000":"#ffffff",R+=";",R+='"/>';R+="</tr>"}return R+="</tbody>",R+="</table>",R},m.createSvgTag=function(T,k,R,N){let I={};typeof arguments[0]=="object"&&(I=arguments[0],T=I.cellSize,k=I.margin,R=I.alt,N=I.title),T=T||2,k=typeof k>"u"?T*4:k,R=typeof R=="string"?{text:R}:R||{},R.text=R.text||null,R.id=R.text?R.id||"qrcode-description":null,N=typeof N=="string"?{text:N}:N||{},N.text=N.text||null,N.id=N.text?N.id||"qrcode-title":null;const P=m.getModuleCount()*T+k*2;let F,K,W,V,$="",J;for(J="l"+T+",0 0,"+T+" -"+T+",0 0,-"+T+"z ",$+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',$+=I.scalable?"":' width="'+P+'px" height="'+P+'px"',$+=' viewBox="0 0 '+P+" "+P+'" ',$+=' preserveAspectRatio="xMinYMin meet"',$+=N.text||R.text?' role="img" aria-labelledby="'+M([N.id,R.id].join(" ").trim())+'"':"",$+=">",$+=N.text?'<title id="'+M(N.id)+'">'+M(N.text)+"</title>":"",$+=R.text?'<description id="'+M(R.id)+'">'+M(R.text)+"</description>":"",$+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',$+='<path d="',W=0;W<m.getModuleCount();W+=1)for(V=W*T+k,F=0;F<m.getModuleCount();F+=1)m.isDark(W,F)&&(K=F*T+k,$+="M"+K+","+V+J);return $+='" stroke="transparent" fill="black"/>',$+="</svg>",$},m.createDataURL=function(T,k){T=T||2,k=typeof k>"u"?T*4:k;const R=m.getModuleCount()*T+k*2,N=k,I=R-k;return s1(R,R,function(P,F){if(N<=P&&P<I&&N<=F&&F<I){const K=Math.floor((P-N)/T),W=Math.floor((F-N)/T);return m.isDark(W,K)?0:1}else return 1})},m.createImgTag=function(T,k,R){T=T||2,k=typeof k>"u"?T*4:k;const N=m.getModuleCount()*T+k*2;let I="";return I+="<img",I+=' src="',I+=m.createDataURL(T,k),I+='"',I+=' width="',I+=N,I+='"',I+=' height="',I+=N,I+='"',R&&(I+=' alt="',I+=M(R),I+='"'),I+="/>",I};const M=function(T){let k="";for(let R=0;R<T.length;R+=1){const N=T.charAt(R);switch(N){case"<":k+="<";break;case">":k+=">";break;case"&":k+="&";break;case'"':k+=""";break;default:k+=N;break}}return k},D=function(T){T=typeof T>"u"?2:T;const R=m.getModuleCount()*1+T*2,N=T,I=R-T;let P,F,K,W,V;const $={"██":"█","█ ":"▀"," █":"▄"," ":" "},J={"██":"▀","█ ":"▀"," █":" "," ":" "};let H="";for(P=0;P<R;P+=2){for(K=Math.floor((P-N)/1),W=Math.floor((P+1-N)/1),F=0;F<R;F+=1)V="█",N<=F&&F<I&&N<=P&&P<I&&m.isDark(K,Math.floor((F-N)/1))&&(V=" "),N<=F&&F<I&&N<=P+1&&P+1<I&&m.isDark(W,Math.floor((F-N)/1))?V+=" ":V+="█",H+=T<1&&P+1>=I?J[V]:$[V];H+=`
|
|
50
|
+
`}return R%2&&T>0?H.substring(0,H.length-R-1)+Array(R+1).join("▀"):H.substring(0,H.length-1)};return m.createASCII=function(T,k){if(T=T||1,T<2)return D(k);T-=1,k=typeof k>"u"?T*2:k;const R=m.getModuleCount()*T+k*2,N=k,I=R-k;let P,F,K,W;const V=Array(T+1).join("██"),$=Array(T+1).join(" ");let J="",H="";for(P=0;P<R;P+=1){for(K=Math.floor((P-N)/T),H="",F=0;F<R;F+=1)W=1,N<=F&&F<I&&N<=P&&P<I&&m.isDark(K,Math.floor((F-N)/T))&&(W=0),H+=W?V:$;for(K=0;K<T;K+=1)J+=H+`
|
|
51
|
+
`}return J.substring(0,J.length-1)},m.renderTo2dContext=function(T,k){k=k||2;const R=m.getModuleCount();for(let N=0;N<R;N++)for(let I=0;I<R;I++)T.fillStyle=m.isDark(N,I)?"black":"white",T.fillRect(I*k,N*k,k,k)},m};Jr.stringToBytes=function(n){const r=[];for(let s=0;s<n.length;s+=1){const o=n.charCodeAt(s);r.push(o&255)}return r};Jr.createStringToBytes=function(n,r){const s=(function(){const d=i1(n),v=function(){const c=d.read();if(c==-1)throw"eof";return c};let f=0;const a={};for(;;){const c=d.read();if(c==-1)break;const h=v(),m=v(),u=v(),_=String.fromCharCode(c<<8|h),C=m<<8|u;a[_]=C,f+=1}if(f!=r)throw f+" != "+r;return a})(),o=63;return function(d){const v=[];for(let f=0;f<d.length;f+=1){const a=d.charCodeAt(f);if(a<128)v.push(a);else{const c=s[d.charAt(f)];typeof c=="number"?(c&255)==c?v.push(c):(v.push(c>>>8),v.push(c&255)):v.push(o)}}return v}};const Gt={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},nl={L:1,M:0,Q:3,H:2},ji={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},zi=(function(){const n=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],r=1335,s=7973,o=21522,d={},v=function(f){let a=0;for(;f!=0;)a+=1,f>>>=1;return a};return d.getBCHTypeInfo=function(f){let a=f<<10;for(;v(a)-v(r)>=0;)a^=r<<v(a)-v(r);return(f<<10|a)^o},d.getBCHTypeNumber=function(f){let a=f<<12;for(;v(a)-v(s)>=0;)a^=s<<v(a)-v(s);return f<<12|a},d.getPatternPosition=function(f){return n[f-1]},d.getMaskFunction=function(f){switch(f){case ji.PATTERN000:return function(a,c){return(a+c)%2==0};case ji.PATTERN001:return function(a,c){return a%2==0};case ji.PATTERN010:return function(a,c){return c%3==0};case ji.PATTERN011:return function(a,c){return(a+c)%3==0};case ji.PATTERN100:return function(a,c){return(Math.floor(a/2)+Math.floor(c/3))%2==0};case ji.PATTERN101:return function(a,c){return a*c%2+a*c%3==0};case ji.PATTERN110:return function(a,c){return(a*c%2+a*c%3)%2==0};case ji.PATTERN111:return function(a,c){return(a*c%3+(a+c)%2)%2==0};default:throw"bad maskPattern:"+f}},d.getErrorCorrectPolynomial=function(f){let a=ll([1],0);for(let c=0;c<f;c+=1)a=a.multiply(ll([1,Ii.gexp(c)],0));return a},d.getLengthInBits=function(f,a){if(1<=a&&a<10)switch(f){case Gt.MODE_NUMBER:return 10;case Gt.MODE_ALPHA_NUM:return 9;case Gt.MODE_8BIT_BYTE:return 8;case Gt.MODE_KANJI:return 8;default:throw"mode:"+f}else if(a<27)switch(f){case Gt.MODE_NUMBER:return 12;case Gt.MODE_ALPHA_NUM:return 11;case Gt.MODE_8BIT_BYTE:return 16;case Gt.MODE_KANJI:return 10;default:throw"mode:"+f}else if(a<41)switch(f){case Gt.MODE_NUMBER:return 14;case Gt.MODE_ALPHA_NUM:return 13;case Gt.MODE_8BIT_BYTE:return 16;case Gt.MODE_KANJI:return 12;default:throw"mode:"+f}else throw"type:"+a},d.getLostPoint=function(f){const a=f.getModuleCount();let c=0;for(let u=0;u<a;u+=1)for(let _=0;_<a;_+=1){let C=0;const E=f.isDark(u,_);for(let x=-1;x<=1;x+=1)if(!(u+x<0||a<=u+x))for(let b=-1;b<=1;b+=1)_+b<0||a<=_+b||x==0&&b==0||E==f.isDark(u+x,_+b)&&(C+=1);C>5&&(c+=3+C-5)}for(let u=0;u<a-1;u+=1)for(let _=0;_<a-1;_+=1){let C=0;f.isDark(u,_)&&(C+=1),f.isDark(u+1,_)&&(C+=1),f.isDark(u,_+1)&&(C+=1),f.isDark(u+1,_+1)&&(C+=1),(C==0||C==4)&&(c+=3)}for(let u=0;u<a;u+=1)for(let _=0;_<a-6;_+=1)f.isDark(u,_)&&!f.isDark(u,_+1)&&f.isDark(u,_+2)&&f.isDark(u,_+3)&&f.isDark(u,_+4)&&!f.isDark(u,_+5)&&f.isDark(u,_+6)&&(c+=40);for(let u=0;u<a;u+=1)for(let _=0;_<a-6;_+=1)f.isDark(_,u)&&!f.isDark(_+1,u)&&f.isDark(_+2,u)&&f.isDark(_+3,u)&&f.isDark(_+4,u)&&!f.isDark(_+5,u)&&f.isDark(_+6,u)&&(c+=40);let h=0;for(let u=0;u<a;u+=1)for(let _=0;_<a;_+=1)f.isDark(_,u)&&(h+=1);const m=Math.abs(100*h/a/a-50)/5;return c+=m*10,c},d})(),Ii=(function(){const n=new Array(256),r=new Array(256);for(let o=0;o<8;o+=1)n[o]=1<<o;for(let o=8;o<256;o+=1)n[o]=n[o-4]^n[o-5]^n[o-6]^n[o-8];for(let o=0;o<255;o+=1)r[n[o]]=o;const s={};return s.glog=function(o){if(o<1)throw"glog("+o+")";return r[o]},s.gexp=function(o){for(;o<0;)o+=255;for(;o>=256;)o-=255;return n[o]},s})(),ll=function(n,r){if(typeof n.length>"u")throw n.length+"/"+r;const s=(function(){let d=0;for(;d<n.length&&n[d]==0;)d+=1;const v=new Array(n.length-d+r);for(let f=0;f<n.length-d;f+=1)v[f]=n[f+d];return v})(),o={};return o.getAt=function(d){return s[d]},o.getLength=function(){return s.length},o.multiply=function(d){const v=new Array(o.getLength()+d.getLength()-1);for(let f=0;f<o.getLength();f+=1)for(let a=0;a<d.getLength();a+=1)v[f+a]^=Ii.gexp(Ii.glog(o.getAt(f))+Ii.glog(d.getAt(a)));return ll(v,0)},o.mod=function(d){if(o.getLength()-d.getLength()<0)return o;const v=Ii.glog(o.getAt(0))-Ii.glog(d.getAt(0)),f=new Array(o.getLength());for(let a=0;a<o.getLength();a+=1)f[a]=o.getAt(a);for(let a=0;a<d.getLength();a+=1)f[a]^=Ii.gexp(Ii.glog(d.getAt(a))+v);return ll(f,0).mod(d)},o},om=(function(){const n=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],r=function(d,v){const f={};return f.totalCount=d,f.dataCount=v,f},s={},o=function(d,v){switch(v){case nl.L:return n[(d-1)*4+0];case nl.M:return n[(d-1)*4+1];case nl.Q:return n[(d-1)*4+2];case nl.H:return n[(d-1)*4+3];default:return}};return s.getRSBlocks=function(d,v){const f=o(d,v);if(typeof f>"u")throw"bad rs block @ typeNumber:"+d+"/errorCorrectionLevel:"+v;const a=f.length/3,c=[];for(let h=0;h<a;h+=1){const m=f[h*3+0],u=f[h*3+1],_=f[h*3+2];for(let C=0;C<m;C+=1)c.push(r(u,_))}return c},s})(),cm=function(){const n=[];let r=0;const s={};return s.getBuffer=function(){return n},s.getAt=function(o){const d=Math.floor(o/8);return(n[d]>>>7-o%8&1)==1},s.put=function(o,d){for(let v=0;v<d;v+=1)s.putBit((o>>>d-v-1&1)==1)},s.getLengthInBits=function(){return r},s.putBit=function(o){const d=Math.floor(r/8);n.length<=d&&n.push(0),o&&(n[d]|=128>>>r%8),r+=1},s},Z0=function(n){const r=Gt.MODE_NUMBER,s=n,o={};o.getMode=function(){return r},o.getLength=function(f){return s.length},o.write=function(f){const a=s;let c=0;for(;c+2<a.length;)f.put(d(a.substring(c,c+3)),10),c+=3;c<a.length&&(a.length-c==1?f.put(d(a.substring(c,c+1)),4):a.length-c==2&&f.put(d(a.substring(c,c+2)),7))};const d=function(f){let a=0;for(let c=0;c<f.length;c+=1)a=a*10+v(f.charAt(c));return a},v=function(f){if("0"<=f&&f<="9")return f.charCodeAt(0)-48;throw"illegal char :"+f};return o},J0=function(n){const r=Gt.MODE_ALPHA_NUM,s=n,o={};o.getMode=function(){return r},o.getLength=function(v){return s.length},o.write=function(v){const f=s;let a=0;for(;a+1<f.length;)v.put(d(f.charAt(a))*45+d(f.charAt(a+1)),11),a+=2;a<f.length&&v.put(d(f.charAt(a)),6)};const d=function(v){if("0"<=v&&v<="9")return v.charCodeAt(0)-48;if("A"<=v&&v<="Z")return v.charCodeAt(0)-65+10;switch(v){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+v}};return o},e1=function(n){const r=Gt.MODE_8BIT_BYTE,s=Jr.stringToBytes(n),o={};return o.getMode=function(){return r},o.getLength=function(d){return s.length},o.write=function(d){for(let v=0;v<s.length;v+=1)d.put(s[v],8)},o},t1=function(n){const r=Gt.MODE_KANJI,s=Jr.stringToBytes;(function(v,f){const a=s(v);if(a.length!=2||(a[0]<<8|a[1])!=f)throw"sjis not supported."})("友",38726);const o=s(n),d={};return d.getMode=function(){return r},d.getLength=function(v){return~~(o.length/2)},d.write=function(v){const f=o;let a=0;for(;a+1<f.length;){let c=(255&f[a])<<8|255&f[a+1];if(33088<=c&&c<=40956)c-=33088;else if(57408<=c&&c<=60351)c-=49472;else throw"illegal char at "+(a+1)+"/"+c;c=(c>>>8&255)*192+(c&255),v.put(c,13),a+=2}if(a<f.length)throw"illegal char at "+(a+1)},d},hg=function(){const n=[],r={};return r.writeByte=function(s){n.push(s&255)},r.writeShort=function(s){r.writeByte(s),r.writeByte(s>>>8)},r.writeBytes=function(s,o,d){o=o||0,d=d||s.length;for(let v=0;v<d;v+=1)r.writeByte(s[v+o])},r.writeString=function(s){for(let o=0;o<s.length;o+=1)r.writeByte(s.charCodeAt(o))},r.toByteArray=function(){return n},r.toString=function(){let s="";s+="[";for(let o=0;o<n.length;o+=1)o>0&&(s+=","),s+=n[o];return s+="]",s},r},n1=function(){let n=0,r=0,s=0,o="";const d={},v=function(a){o+=String.fromCharCode(f(a&63))},f=function(a){if(a<0)throw"n:"+a;if(a<26)return 65+a;if(a<52)return 97+(a-26);if(a<62)return 48+(a-52);if(a==62)return 43;if(a==63)return 47;throw"n:"+a};return d.writeByte=function(a){for(n=n<<8|a&255,r+=8,s+=1;r>=6;)v(n>>>r-6),r-=6},d.flush=function(){if(r>0&&(v(n<<6-r),n=0,r=0),s%3!=0){const a=3-s%3;for(let c=0;c<a;c+=1)o+="="}},d.toString=function(){return o},d},i1=function(n){const r=n;let s=0,o=0,d=0;const v={};v.read=function(){for(;d<8;){if(s>=r.length){if(d==0)return-1;throw"unexpected end of file./"+d}const c=r.charAt(s);if(s+=1,c=="=")return d=0,-1;if(c.match(/^\s$/))continue;o=o<<6|f(c.charCodeAt(0)),d+=6}const a=o>>>d-8&255;return d-=8,a};const f=function(a){if(65<=a&&a<=90)return a-65;if(97<=a&&a<=122)return a-97+26;if(48<=a&&a<=57)return a-48+52;if(a==43)return 62;if(a==47)return 63;throw"c:"+a};return v},r1=function(n,r){const s=n,o=r,d=new Array(n*r),v={};v.setPixel=function(h,m,u){d[m*s+h]=u},v.write=function(h){h.writeString("GIF87a"),h.writeShort(s),h.writeShort(o),h.writeByte(128),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(255),h.writeByte(255),h.writeByte(255),h.writeString(","),h.writeShort(0),h.writeShort(0),h.writeShort(s),h.writeShort(o),h.writeByte(0);const m=2,u=a(m);h.writeByte(m);let _=0;for(;u.length-_>255;)h.writeByte(255),h.writeBytes(u,_,255),_+=255;h.writeByte(u.length-_),h.writeBytes(u,_,u.length-_),h.writeByte(0),h.writeString(";")};const f=function(h){const m=h;let u=0,_=0;const C={};return C.write=function(E,x){if(E>>>x)throw"length over";for(;u+x>=8;)m.writeByte(255&(E<<u|_)),x-=8-u,E>>>=8-u,_=0,u=0;_=E<<u|_,u=u+x},C.flush=function(){u>0&&m.writeByte(_)},C},a=function(h){const m=1<<h,u=(1<<h)+1;let _=h+1;const C=c();for(let g=0;g<m;g+=1)C.add(String.fromCharCode(g));C.add(String.fromCharCode(m)),C.add(String.fromCharCode(u));const E=hg(),x=f(E);x.write(m,_);let b=0,S=String.fromCharCode(d[b]);for(b+=1;b<d.length;){const g=String.fromCharCode(d[b]);b+=1,C.contains(S+g)?S=S+g:(x.write(C.indexOf(S),_),C.size()<4095&&(C.size()==1<<_&&(_+=1),C.add(S+g)),S=g)}return x.write(C.indexOf(S),_),x.write(u,_),x.flush(),E.toByteArray()},c=function(){const h={};let m=0;const u={};return u.add=function(_){if(u.contains(_))throw"dup key:"+_;h[_]=m,m+=1},u.size=function(){return m},u.indexOf=function(_){return h[_]},u.contains=function(_){return typeof h[_]<"u"},u};return v},s1=function(n,r,s){const o=r1(n,r);for(let a=0;a<r;a+=1)for(let c=0;c<n;c+=1)o.setPixel(c,a,s(c,a));const d=hg();o.write(d);const v=n1(),f=d.toByteArray();for(let a=0;a<f.length;a+=1)v.writeByte(f[a]);return v.flush(),"data:image/gif;base64,"+v};Jr.stringToBytes;const Xr=[{name:"project-manager",label:"Project Manager",commandAgent:"project-manager",dispatchable:!1},{name:"architect",label:"Architect",commandAgent:"architect",dispatchable:!0},{name:"coder",label:"Coder",commandAgent:"coder",dispatchable:!0},{name:"reviewer",label:"Reviewer",commandAgent:"reviewer",dispatchable:!0}],fg={name:"codex-reviewer",label:"Codex Reviewer",commandAgent:"codex-reviewer",dispatchable:!1},l1={name:"codex-translator",label:"Codex Translator",commandAgent:"codex-translator",dispatchable:!1},dg=[fg,l1],Uu=[...Xr,...dg],a1=Xr.map(n=>n.name),o1=dg.map(n=>n.name);Uu.map(n=>n.name);Uu.filter(n=>n.dispatchable).map(n=>n.name);function Pu(n){return o1.includes(n)}const c1="zh-CN",u1="final-only",pg=[{value:"zh-CN",label:"Chinese"},{value:"ja",label:"Japanese"},{value:"ko",label:"Korean"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"es",label:"Spanish"}],h1=[{value:"pm-final-only",label:"PM final reply"},{value:"final-only",label:"Each role final reply"},{value:"all",label:"All replies"}];function f1(){const n={};for(const r of a1)n[r]={permissionMode:"default",model:"default",effort:"default"};return{version:1,roles:n,autoOrchestration:!0}}function d1({sidebar:n,children:r}){const[s,o]=ae.useState(!1);return O.jsxs("div",{className:s?"app-shell is-sidebar-collapsed":"app-shell",children:[O.jsxs("aside",{className:"app-sidebar",children:[O.jsx("button",{className:"sidebar-toggle",type:"button","aria-label":s?"Expand sidebar":"Collapse sidebar",title:s?"Expand sidebar":"Collapse sidebar",onClick:()=>o(d=>!d)}),O.jsx("div",{className:"sidebar-content",children:n})]}),O.jsx("main",{className:"app-main",children:r})]})}const p1=[{value:"default",label:"Default",description:"Account default"},{value:"best",label:"Best",description:"Fable 5 or latest Opus"},{value:"fable",label:"Fable 5",description:"1M context, v2.1.170+"},{value:"opus",label:"Opus",description:"latest Opus"},{value:"opus[1m]",label:"Opus 1M",description:"Force 1M context"},{value:"claude-opus-4-8",label:"Opus 4.8",description:"Current Opus"},{value:"claude-opus-4-8[1m]",label:"Opus 4.8 1M",description:"Opus 4.8 + 1M context"}],m1=[{value:"gpt-5.5",label:"GPT-5.5",description:"Strong Codex reviewer default"},{value:"default",label:"Default",description:"Codex account default"}],mg=[{value:"default",label:"Default",description:"CLI or project default"},{value:"low",label:"Low",description:"Fastest reasoning"},{value:"medium",label:"Medium",description:"Balanced reasoning"},{value:"high",label:"High",description:"Deeper reasoning"},{value:"xhigh",label:"XHigh",description:"Extra high reasoning"}],g1=[...mg,{value:"max",label:"Max",description:"Maximum reasoning"},{value:"ultracode",label:"Ultracode",description:"Claude Code dynamic workflows with xhigh reasoning"}];function gg({role:n,session:r,permissionMode:s,model:o,effort:d,busy:v=!1,onPermissionModeChange:f,onModelChange:a,onEffortChange:c,onStart:h,onResume:m,onStop:u,onRestart:_}){const C=(r==null?void 0:r.status)==="running",E=!!(r!=null&&r.claudeSessionId&&!C),x=!C&&!(r!=null&&r.claudeSessionId),b=Pu(n),S=b?m1:p1,g=b?mg:g1;return O.jsxs("div",{className:"session-controls",children:[b?null:O.jsxs("label",{className:"session-option-field permission-mode-field",children:[O.jsx("span",{children:"Permission"}),O.jsxs("select",{value:s,onChange:y=>f(y.target.value),children:[O.jsx("option",{value:"default",children:"默认"}),O.jsx("option",{value:"bypassPermissions",children:"bypassPermissions"})]})]}),O.jsxs("label",{className:"session-option-field model-field",children:[O.jsx("span",{children:"Model"}),O.jsx("select",{value:o,onChange:y=>a(y.target.value),children:S.map(y=>O.jsx("option",{value:y.value,children:y.label},y.value))})]}),O.jsxs("label",{className:"session-option-field effort-field",children:[O.jsx("span",{children:"Effort"}),O.jsx("select",{value:d,onChange:y=>c(y.target.value),children:g.map(y=>O.jsx("option",{value:y.value,children:y.label},y.value))})]}),O.jsxs("div",{className:"session-toolbar",children:[O.jsx("button",{type:"button",disabled:v||!x,onClick:h,children:"Start"}),O.jsx("button",{type:"button",disabled:v||!E,onClick:m,children:"Resume"}),O.jsx("button",{type:"button",disabled:v||!r,onClick:_,children:"Restart"}),O.jsx("button",{type:"button",disabled:v||!r,onClick:u,children:"Stop"})]})]})}var lu={exports:{}},um;function _1(){return um||(um=1,(function(n,r){(function(s,o){n.exports=o()})(self,(()=>(()=>{var s={};return(()=>{var o=s;Object.defineProperty(o,"__esModule",{value:!0}),o.FitAddon=void 0,o.FitAddon=class{activate(d){this._terminal=d}dispose(){}fit(){const d=this.proposeDimensions();if(!d||!this._terminal||isNaN(d.cols)||isNaN(d.rows))return;const v=this._terminal._core;this._terminal.rows===d.rows&&this._terminal.cols===d.cols||(v._renderService.clear(),this._terminal.resize(d.cols,d.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const d=this._terminal._core,v=d._renderService.dimensions;if(v.css.cell.width===0||v.css.cell.height===0)return;const f=this._terminal.options.scrollback===0?0:d.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(a.getPropertyValue("height")),h=Math.max(0,parseInt(a.getPropertyValue("width"))),m=window.getComputedStyle(this._terminal.element),u=c-(parseInt(m.getPropertyValue("padding-top"))+parseInt(m.getPropertyValue("padding-bottom"))),_=h-(parseInt(m.getPropertyValue("padding-right"))+parseInt(m.getPropertyValue("padding-left")))-f;return{cols:Math.max(2,Math.floor(_/v.css.cell.width)),rows:Math.max(1,Math.floor(u/v.css.cell.height))}}}})(),s})()))})(lu)),lu.exports}var v1=_1(),au={exports:{}},hm;function y1(){return hm||(hm=1,(function(n,r){(function(s,o){n.exports=o()})(self,(()=>(()=>{var s={6:(f,a)=>{function c(m){try{const u=new URL(m),_=u.password&&u.username?`${u.protocol}//${u.username}:${u.password}@${u.host}`:u.username?`${u.protocol}//${u.username}@${u.host}`:`${u.protocol}//${u.host}`;return m.toLocaleLowerCase().startsWith(_.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(m,u,_,C={}){this._terminal=m,this._regex=u,this._handler=_,this._options=C}provideLinks(m,u){const _=h.computeLink(m,this._regex,this._terminal,this._handler);u(this._addCallbacks(_))}_addCallbacks(m){return m.map((u=>(u.leave=this._options.leave,u.hover=(_,C)=>{if(this._options.hover){const{range:E}=u;this._options.hover(_,C,E)}},u)))}};class h{static computeLink(u,_,C,E){const x=new RegExp(_.source,(_.flags||"")+"g"),[b,S]=h._getWindowedLineStrings(u-1,C),g=b.join("");let y;const A=[];for(;y=x.exec(g);){const M=y[0];if(!c(M))continue;const[D,T]=h._mapStrIdx(C,S,0,y.index),[k,R]=h._mapStrIdx(C,D,T,M.length);if(D===-1||T===-1||k===-1||R===-1)continue;const N={start:{x:T+1,y:D+1},end:{x:R,y:k+1}};A.push({range:N,text:M,activate:E})}return A}static _getWindowedLineStrings(u,_){let C,E=u,x=u,b=0,S="";const g=[];if(C=_.buffer.active.getLine(u)){const y=C.translateToString(!0);if(C.isWrapped&&y[0]!==" "){for(b=0;(C=_.buffer.active.getLine(--E))&&b<2048&&(S=C.translateToString(!0),b+=S.length,g.push(S),C.isWrapped&&S.indexOf(" ")===-1););g.reverse()}for(g.push(y),b=0;(C=_.buffer.active.getLine(++x))&&C.isWrapped&&b<2048&&(S=C.translateToString(!0),b+=S.length,g.push(S),S.indexOf(" ")===-1););}return[g,E]}static _mapStrIdx(u,_,C,E){const x=u.buffer.active,b=x.getNullCell();let S=C;for(;E;){const g=x.getLine(_);if(!g)return[-1,-1];for(let y=S;y<g.length;++y){g.getCell(y,b);const A=b.getChars();if(b.getWidth()&&(E-=A.length||1,y===g.length-1&&A==="")){const M=x.getLine(_+1);M&&M.isWrapped&&(M.getCell(0,b),b.getWidth()===2&&(E+=1))}if(E<0)return[_,y]}_++,S=0}return[_,S]}}a.LinkComputer=h}},o={};function d(f){var a=o[f];if(a!==void 0)return a.exports;var c=o[f]={exports:{}};return s[f](c,c.exports,d),c.exports}var v={};return(()=>{var f=v;Object.defineProperty(f,"__esModule",{value:!0}),f.WebLinksAddon=void 0;const a=d(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function h(m,u){const _=window.open();if(_){try{_.opener=null}catch{}_.location.href=u}else console.warn("Opening link blocked as opener could not be cleared")}f.WebLinksAddon=class{constructor(m=h,u={}){this._handler=m,this._options=u}activate(m){this._terminal=m;const u=this._options,_=u.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,_,this._handler,u))}dispose(){var m;(m=this._linkProvider)==null||m.dispose()}}})(),v})()))})(au)),au.exports}var S1=y1(),ou={exports:{}},fm;function b1(){return fm||(fm=1,(function(n,r){(function(s,o){n.exports=o()})(globalThis,(()=>(()=>{var s={4567:function(f,a,c){var h=this&&this.__decorate||function(g,y,A,M){var D,T=arguments.length,k=T<3?y:M===null?M=Object.getOwnPropertyDescriptor(y,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(g,y,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(k=(T<3?D(k):T>3?D(y,A,k):D(y,A))||k);return T>3&&k&&Object.defineProperty(y,A,k),k},m=this&&this.__param||function(g,y){return function(A,M){y(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const u=c(9042),_=c(9924),C=c(844),E=c(4725),x=c(2585),b=c(3656);let S=a.AccessibilityManager=class extends C.Disposable{constructor(g,y,A,M){super(),this._terminal=g,this._coreBrowserService=A,this._renderService=M,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 D=0;D<this._terminal.rows;D++)this._rowElements[D]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[D]);if(this._topBoundaryFocusListener=D=>this._handleBoundaryFocus(D,0),this._bottomBoundaryFocusListener=D=>this._handleBoundaryFocus(D,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 _.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((D=>this._handleResize(D.rows)))),this.register(this._terminal.onRender((D=>this._refreshRows(D.start,D.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((D=>this._handleChar(D)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
52
|
+
`)))),this.register(this._terminal.onA11yTab((D=>this._handleTab(D)))),this.register(this._terminal.onKey((D=>this._handleKey(D.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,b.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,C.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(g){for(let y=0;y<g;y++)this._handleChar(" ")}_handleChar(g){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==g&&(this._charsToAnnounce+=g):this._charsToAnnounce+=g,g===`
|
|
53
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(g){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(g)||this._charsToConsume.push(g)}_refreshRows(g,y){this._liveRegionDebouncer.refresh(g,y,this._terminal.rows)}_renderRows(g,y){const A=this._terminal.buffer,M=A.lines.length.toString();for(let D=g;D<=y;D++){const T=A.lines.get(A.ydisp+D),k=[],R=(T==null?void 0:T.translateToString(!0,void 0,void 0,k))||"",N=(A.ydisp+D+1).toString(),I=this._rowElements[D];I&&(R.length===0?(I.innerText=" ",this._rowColumns.set(I,[0,1])):(I.textContent=R,this._rowColumns.set(I,k)),I.setAttribute("aria-posinset",N),I.setAttribute("aria-setsize",M))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(g,y){const A=g.target,M=this._rowElements[y===0?1:this._rowElements.length-2];if(A.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||g.relatedTarget!==M)return;let D,T;if(y===0?(D=A,T=this._rowElements.pop(),this._rowContainer.removeChild(T)):(D=this._rowElements.shift(),T=A,this._rowContainer.removeChild(D)),D.removeEventListener("focus",this._topBoundaryFocusListener),T.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){const k=this._createAccessibilityTreeNode();this._rowElements.unshift(k),this._rowContainer.insertAdjacentElement("afterbegin",k)}else{const k=this._createAccessibilityTreeNode();this._rowElements.push(k),this._rowContainer.appendChild(k)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),g.preventDefault(),g.stopImmediatePropagation()}_handleSelectionChange(){var R;if(this._rowElements.length===0)return;const g=document.getSelection();if(!g)return;if(g.isCollapsed)return void(this._rowContainer.contains(g.anchorNode)&&this._terminal.clearSelection());if(!g.anchorNode||!g.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:g.anchorNode,offset:g.anchorOffset},A={node:g.focusNode,offset:g.focusOffset};if((y.node.compareDocumentPosition(A.node)&Node.DOCUMENT_POSITION_PRECEDING||y.node===A.node&&y.offset>A.offset)&&([y,A]=[A,y]),y.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(y={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(y.node))return;const M=this._rowElements.slice(-1)[0];if(A.node.compareDocumentPosition(M)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(A={node:M,offset:((R=M.textContent)==null?void 0:R.length)??0}),!this._rowContainer.contains(A.node))return;const D=({node:N,offset:I})=>{const P=N instanceof Text?N.parentNode:N;let F=parseInt(P==null?void 0:P.getAttribute("aria-posinset"),10)-1;if(isNaN(F))return console.warn("row is invalid. Race condition?"),null;const K=this._rowColumns.get(P);if(!K)return console.warn("columns is null. Race condition?"),null;let W=I<K.length?K[I]:K.slice(-1)[0]+1;return W>=this._terminal.cols&&(++F,W=0),{row:F,column:W}},T=D(y),k=D(A);if(T&&k){if(T.row>k.row||T.row===k.row&&T.column>=k.column)throw new Error("invalid range");this._terminal.select(T.column,T.row,(k.row-T.row)*this._terminal.cols-T.column+k.column)}}_handleResize(g){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;y<this._terminal.rows;y++)this._rowElements[y]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[y]);for(;this._rowElements.length>g;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const g=this._coreBrowserService.mainDocument.createElement("div");return g.setAttribute("role","listitem"),g.tabIndex=-1,this._refreshRowDimensions(g),g}_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 g=0;g<this._terminal.rows;g++)this._refreshRowDimensions(this._rowElements[g])}}_refreshRowDimensions(g){g.style.height=`${this._renderService.dimensions.css.cell.height}px`}};a.AccessibilityManager=S=h([m(1,x.IInstantiationService),m(2,E.ICoreBrowserService),m(3,E.IRenderService)],S)},3614:(f,a)=>{function c(_){return _.replace(/\r?\n/g,"\r")}function h(_,C){return C?"\x1B[200~"+_+"\x1B[201~":_}function m(_,C,E,x){_=h(_=c(_),E.decPrivateModes.bracketedPasteMode&&x.rawOptions.ignoreBracketedPasteMode!==!0),E.triggerDataEvent(_,!0),C.value=""}function u(_,C,E){const x=E.getBoundingClientRect(),b=_.clientX-x.left-10,S=_.clientY-x.top-10;C.style.width="20px",C.style.height="20px",C.style.left=`${b}px`,C.style.top=`${S}px`,C.style.zIndex="1000",C.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=c,a.bracketTextForPaste=h,a.copyHandler=function(_,C){_.clipboardData&&_.clipboardData.setData("text/plain",C.selectionText),_.preventDefault()},a.handlePasteEvent=function(_,C,E,x){_.stopPropagation(),_.clipboardData&&m(_.clipboardData.getData("text/plain"),C,E,x)},a.paste=m,a.moveTextAreaUnderMouseCursor=u,a.rightClickHandler=function(_,C,E,x,b){u(_,C,E),b&&x.rightClickSelect(_),C.value=x.selectionText,C.select()}},7239:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const h=c(1505);a.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(m,u,_){this._css.set(m,u,_)}getCss(m,u){return this._css.get(m,u)}setColor(m,u,_){this._color.set(m,u,_)}getColor(m,u){return this._color.get(m,u)}clear(){this._color.clear(),this._css.clear()}}},3656:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(c,h,m,u){c.addEventListener(h,m,u);let _=!1;return{dispose:()=>{_||(_=!0,c.removeEventListener(h,m,u))}}}},3551:function(f,a,c){var h=this&&this.__decorate||function(S,g,y,A){var M,D=arguments.length,T=D<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,y):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(S,g,y,A);else for(var k=S.length-1;k>=0;k--)(M=S[k])&&(T=(D<3?M(T):D>3?M(g,y,T):M(g,y))||T);return D>3&&T&&Object.defineProperty(g,y,T),T},m=this&&this.__param||function(S,g){return function(y,A){g(y,A,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const u=c(3656),_=c(8460),C=c(844),E=c(2585),x=c(4725);let b=a.Linkifier=class extends C.Disposable{get currentLink(){return this._currentLink}constructor(S,g,y,A,M){super(),this._element=S,this._mouseService=g,this._renderService=y,this._bufferService=A,this._linkProviderService=M,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new _.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new _.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,C.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,C.toDisposable)((()=>{var D;this._lastMouseEvent=void 0,(D=this._activeProviderReplies)==null||D.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(S){this._lastMouseEvent=S;const g=this._positionFromMouseEvent(S,this._element,this._mouseService);if(!g)return;this._isMouseOut=!1;const y=S.composedPath();for(let A=0;A<y.length;A++){const M=y[A];if(M.classList.contains("xterm"))break;if(M.classList.contains("xterm-hover"))return}this._lastBufferCell&&g.x===this._lastBufferCell.x&&g.y===this._lastBufferCell.y||(this._handleHover(g),this._lastBufferCell=g)}_handleHover(S){if(this._activeLine!==S.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(S,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,S)||(this._clearCurrentLink(),this._askForLink(S,!0))}_askForLink(S,g){var A,M;this._activeProviderReplies&&g||((A=this._activeProviderReplies)==null||A.forEach((D=>{D==null||D.forEach((T=>{T.link.dispose&&T.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=S.y);let y=!1;for(const[D,T]of this._linkProviderService.linkProviders.entries())g?(M=this._activeProviderReplies)!=null&&M.get(D)&&(y=this._checkLinkProviderResult(D,S,y)):T.provideLinks(S.y,(k=>{var N,I;if(this._isMouseOut)return;const R=k==null?void 0:k.map((P=>({link:P})));(N=this._activeProviderReplies)==null||N.set(D,R),y=this._checkLinkProviderResult(D,S,y),((I=this._activeProviderReplies)==null?void 0:I.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(S.y,this._activeProviderReplies)}))}_removeIntersectingLinks(S,g){const y=new Set;for(let A=0;A<g.size;A++){const M=g.get(A);if(M)for(let D=0;D<M.length;D++){const T=M[D],k=T.link.range.start.y<S?0:T.link.range.start.x,R=T.link.range.end.y>S?this._bufferService.cols:T.link.range.end.x;for(let N=k;N<=R;N++){if(y.has(N)){M.splice(D--,1);break}y.add(N)}}}}_checkLinkProviderResult(S,g,y){var D;if(!this._activeProviderReplies)return y;const A=this._activeProviderReplies.get(S);let M=!1;for(let T=0;T<S;T++)this._activeProviderReplies.has(T)&&!this._activeProviderReplies.get(T)||(M=!0);if(!M&&A){const T=A.find((k=>this._linkAtPosition(k.link,g)));T&&(y=!0,this._handleNewLink(T))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let T=0;T<this._activeProviderReplies.size;T++){const k=(D=this._activeProviderReplies.get(T))==null?void 0:D.find((R=>this._linkAtPosition(R.link,g)));if(k){y=!0,this._handleNewLink(k);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(S){if(!this._currentLink)return;const g=this._positionFromMouseEvent(S,this._element,this._mouseService);g&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,g)&&this._currentLink.link.activate(S,this._currentLink.link.text)}_clearCurrentLink(S,g){this._currentLink&&this._lastMouseEvent&&(!S||!g||this._currentLink.link.range.start.y>=S&&this._currentLink.link.range.end.y<=g)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,C.disposeArray)(this._linkCacheDisposables))}_handleNewLink(S){if(!this._lastMouseEvent)return;const g=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);g&&this._linkAtPosition(S.link,g)&&(this._currentLink=S,this._currentLink.state={decorations:{underline:S.link.decorations===void 0||S.link.decorations.underline,pointerCursor:S.link.decorations===void 0||S.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,S.link,this._lastMouseEvent),S.link.decorations={},Object.defineProperties(S.link.decorations,{pointerCursor:{get:()=>{var y,A;return(A=(y=this._currentLink)==null?void 0:y.state)==null?void 0:A.decorations.pointerCursor},set:y=>{var A;(A=this._currentLink)!=null&&A.state&&this._currentLink.state.decorations.pointerCursor!==y&&(this._currentLink.state.decorations.pointerCursor=y,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",y))}},underline:{get:()=>{var y,A;return(A=(y=this._currentLink)==null?void 0:y.state)==null?void 0:A.decorations.underline},set:y=>{var A,M,D;(A=this._currentLink)!=null&&A.state&&((D=(M=this._currentLink)==null?void 0:M.state)==null?void 0:D.decorations.underline)!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(S.link,y))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((y=>{if(!this._currentLink)return;const A=y.start===0?0:y.start+1+this._bufferService.buffer.ydisp,M=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=A&&this._currentLink.link.range.end.y<=M&&(this._clearCurrentLink(A,M),this._lastMouseEvent)){const D=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);D&&this._askForLink(D,!1)}}))))}_linkHover(S,g,y){var A;(A=this._currentLink)!=null&&A.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(g,!0),this._currentLink.state.decorations.pointerCursor&&S.classList.add("xterm-cursor-pointer")),g.hover&&g.hover(y,g.text)}_fireUnderlineEvent(S,g){const y=S.range,A=this._bufferService.buffer.ydisp,M=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-A-1,y.end.x,y.end.y-A-1,void 0);(g?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(M)}_linkLeave(S,g,y){var A;(A=this._currentLink)!=null&&A.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(g,!1),this._currentLink.state.decorations.pointerCursor&&S.classList.remove("xterm-cursor-pointer")),g.leave&&g.leave(y,g.text)}_linkAtPosition(S,g){const y=S.range.start.y*this._bufferService.cols+S.range.start.x,A=S.range.end.y*this._bufferService.cols+S.range.end.x,M=g.y*this._bufferService.cols+g.x;return y<=M&&M<=A}_positionFromMouseEvent(S,g,y){const A=y.getCoords(S,g,this._bufferService.cols,this._bufferService.rows);if(A)return{x:A[0],y:A[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(S,g,y,A,M){return{x1:S,y1:g,x2:y,y2:A,cols:this._bufferService.cols,fg:M}}};a.Linkifier=b=h([m(1,x.IMouseService),m(2,x.IRenderService),m(3,E.IBufferService),m(4,x.ILinkProviderService)],b)},9042:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(f,a,c){var h=this&&this.__decorate||function(x,b,S,g){var y,A=arguments.length,M=A<3?b:g===null?g=Object.getOwnPropertyDescriptor(b,S):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,b,S,g);else for(var D=x.length-1;D>=0;D--)(y=x[D])&&(M=(A<3?y(M):A>3?y(b,S,M):y(b,S))||M);return A>3&&M&&Object.defineProperty(b,S,M),M},m=this&&this.__param||function(x,b){return function(S,g){b(S,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const u=c(511),_=c(2585);let C=a.OscLinkProvider=class{constructor(x,b,S){this._bufferService=x,this._optionsService=b,this._oscLinkService=S}provideLinks(x,b){var R;const S=this._bufferService.buffer.lines.get(x-1);if(!S)return void b(void 0);const g=[],y=this._optionsService.rawOptions.linkHandler,A=new u.CellData,M=S.getTrimmedLength();let D=-1,T=-1,k=!1;for(let N=0;N<M;N++)if(T!==-1||S.hasContent(N)){if(S.loadCell(N,A),A.hasExtendedAttrs()&&A.extended.urlId){if(T===-1){T=N,D=A.extended.urlId;continue}k=A.extended.urlId!==D}else T!==-1&&(k=!0);if(k||T!==-1&&N===M-1){const I=(R=this._oscLinkService.getLinkData(D))==null?void 0:R.uri;if(I){const P={start:{x:T+1,y:x},end:{x:N+(k||N!==M-1?0:1),y:x}};let F=!1;if(!(y!=null&&y.allowNonHttpProtocols))try{const K=new URL(I);["http:","https:"].includes(K.protocol)||(F=!0)}catch{F=!0}F||g.push({text:I,range:P,activate:(K,W)=>y?y.activate(K,W,P):E(0,W),hover:(K,W)=>{var V;return(V=y==null?void 0:y.hover)==null?void 0:V.call(y,K,W,P)},leave:(K,W)=>{var V;return(V=y==null?void 0:y.leave)==null?void 0:V.call(y,K,W,P)}})}k=!1,A.hasExtendedAttrs()&&A.extended.urlId?(T=N,D=A.extended.urlId):(T=-1,D=-1)}}b(g)}};function E(x,b){if(confirm(`Do you want to navigate to ${b}?
|
|
54
54
|
|
|
55
|
-
WARNING: This link could potentially be dangerous`)){const _=window.open();if(_){try{_.opener=null}catch{}_.location.href=S}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=w=h([d(0,b.IBufferService),d(1,b.IOptionsService),d(2,b.IOscLinkService)],w)},6193:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(c,h){this._renderCallback=c,this._coreBrowserService=h,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(c,h,d){this._rowCount=d,c=c!==void 0?c:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h,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 c=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,h),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const h=c(3614),d=c(3656),u=c(3551),b=c(9042),w=c(3730),E=c(1680),x=c(3107),S=c(5744),_=c(2950),g=c(1296),y=c(428),A=c(4269),M=c(5114),D=c(8934),T=c(3230),k=c(9312),R=c(4725),N=c(6731),I=c(8055),P=c(8969),F=c(8460),K=c(844),W=c(6114),G=c(8437),$=c(2584),J=c(7399),H=c(5941),B=c(9074),z=c(2585),V=c(5435),j=c(4567),te=c(779);class ue extends P.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(Y={}){super(Y),this.browser=W,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new K.MutableDisposable),this._onCursorMove=this.register(new F.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new F.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new F.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new F.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new F.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new F.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new F.EventEmitter),this._onBlur=this.register(new F.EventEmitter),this._onA11yCharEmitter=this.register(new F.EventEmitter),this._onA11yTabEmitter=this.register(new F.EventEmitter),this._onWillOpen=this.register(new F.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(B.DecorationService),this._instantiationService.setService(z.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(te.LinkProviderService),this._instantiationService.setService(R.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(w.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((q,oe)=>this.refresh(q,oe)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((q=>this._reportWindowsOptions(q)))),this.register(this._inputHandler.onColor((q=>this._handleColorEvent(q)))),this.register((0,F.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,F.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((q=>this._afterResize(q.cols,q.rows)))),this.register((0,K.toDisposable)((()=>{var q,oe;this._customKeyEventHandler=void 0,(oe=(q=this.element)==null?void 0:q.parentNode)==null||oe.removeChild(this.element)})))}_handleColorEvent(Y){if(this._themeService)for(const q of Y){let oe,Z="";switch(q.index){case 256:oe="foreground",Z="10";break;case 257:oe="background",Z="11";break;case 258:oe="cursor",Z="12";break;default:oe="ansi",Z="4;"+q.index}switch(q.type){case 0:const ie=I.color.toColorRGB(oe==="ansi"?this._themeService.colors.ansi[q.index]:this._themeService.colors[oe]);this.coreService.triggerDataEvent(`${$.C0.ESC}]${Z};${(0,H.toRgbString)(ie)}${$.C1_ESCAPED.ST}`);break;case 1:if(oe==="ansi")this._themeService.modifyColors((de=>de.ansi[q.index]=I.channels.toColor(...q.color)));else{const de=oe;this._themeService.modifyColors((be=>be[de]=I.channels.toColor(...q.color)))}break;case 2:this._themeService.restoreColor(q.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(Y){Y?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(j.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(Y){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent($.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var Y;return(Y=this.textarea)==null?void 0:Y.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent($.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 Y=this.buffer.ybase+this.buffer.y,q=this.buffer.lines.get(Y);if(!q)return;const oe=Math.min(this.buffer.x,this.cols-1),Z=this._renderService.dimensions.css.cell.height,ie=q.getWidth(oe),de=this._renderService.dimensions.css.cell.width*ie,be=this.buffer.y*this._renderService.dimensions.css.cell.height,we=oe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=we+"px",this.textarea.style.top=be+"px",this.textarea.style.width=de+"px",this.textarea.style.height=Z+"px",this.textarea.style.lineHeight=Z+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,d.addDisposableDomListener)(this.element,"copy",(q=>{this.hasSelection()&&(0,h.copyHandler)(q,this._selectionService)})));const Y=q=>(0,h.handlePasteEvent)(q,this.textarea,this.coreService,this.optionsService);this.register((0,d.addDisposableDomListener)(this.textarea,"paste",Y)),this.register((0,d.addDisposableDomListener)(this.element,"paste",Y)),W.isFirefox?this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(q=>{q.button===2&&(0,h.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,d.addDisposableDomListener)(this.element,"contextmenu",(q=>{(0,h.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),W.isLinux&&this.register((0,d.addDisposableDomListener)(this.element,"auxclick",(q=>{q.button===1&&(0,h.moveTextAreaUnderMouseCursor)(q,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,d.addDisposableDomListener)(this.textarea,"keyup",(Y=>this._keyUp(Y)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keydown",(Y=>this._keyDown(Y)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keypress",(Y=>this._keyPress(Y)),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionupdate",(Y=>this._compositionHelper.compositionupdate(Y)))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,d.addDisposableDomListener)(this.textarea,"input",(Y=>this._inputEvent(Y)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(Y){var oe;if(!Y)throw new Error("Terminal requires a parent element.");if(Y.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((oe=this.element)==null?void 0:oe.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=Y.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"),Y.appendChild(this.element);const q=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),q.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,d.addDisposableDomListener)(this.screenElement,"mousemove",(Z=>this.updateCursorStyle(Z)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),q.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",b.promptLabel),W.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(M.CoreBrowserService,this.textarea,Y.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(R.ICoreBrowserService,this._coreBrowserService),this.register((0,d.addDisposableDomListener)(this.textarea,"focus",(Z=>this._handleTextAreaFocus(Z)))),this.register((0,d.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(R.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(N.ThemeService),this._instantiationService.setService(R.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(A.CharacterJoinerService),this._instantiationService.setService(R.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(T.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(R.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((Z=>this._onRender.fire(Z)))),this.onResize((Z=>this._renderService.resize(Z.cols,Z.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(_.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(D.MouseService),this._instantiationService.setService(R.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(u.Linkifier,this.screenElement)),this.element.appendChild(q);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(E.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((Z=>this.scrollLines(Z.amount,Z.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(k.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(R.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((Z=>this.scrollLines(Z.amount,Z.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((Z=>this._renderService.handleSelectionChanged(Z.start,Z.end,Z.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((Z=>{this.textarea.value=Z,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((Z=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,d.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(x.BufferDecorationRenderer,this.screenElement)),this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(Z=>this._selectionService.handleMouseDown(Z)))),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(j.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(Z=>this._handleScreenReaderModeOptionChange(Z)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(S.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(Z=>{!this._overviewRulerRenderer&&Z&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(S.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(g.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const Y=this,q=this.element;function oe(de){const be=Y._mouseService.getMouseReportCoords(de,Y.screenElement);if(!be)return!1;let we,$e;switch(de.overrideType||de.type){case"mousemove":$e=32,de.buttons===void 0?(we=3,de.button!==void 0&&(we=de.button<3?de.button:3)):we=1&de.buttons?0:4&de.buttons?1:2&de.buttons?2:3;break;case"mouseup":$e=0,we=de.button<3?de.button:3;break;case"mousedown":$e=1,we=de.button<3?de.button:3;break;case"wheel":if(Y._customWheelEventHandler&&Y._customWheelEventHandler(de)===!1||Y.viewport.getLinesScrolled(de)===0)return!1;$e=de.deltaY<0?0:1,we=4;break;default:return!1}return!($e===void 0||we===void 0||we>4)&&Y.coreMouseService.triggerMouseEvent({col:be.col,row:be.row,x:be.x,y:be.y,button:we,action:$e,ctrl:de.ctrlKey,alt:de.altKey,shift:de.shiftKey})}const Z={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ie={mouseup:de=>(oe(de),de.buttons||(this._document.removeEventListener("mouseup",Z.mouseup),Z.mousedrag&&this._document.removeEventListener("mousemove",Z.mousedrag)),this.cancel(de)),wheel:de=>(oe(de),this.cancel(de,!0)),mousedrag:de=>{de.buttons&&oe(de)},mousemove:de=>{de.buttons||oe(de)}};this.register(this.coreMouseService.onProtocolChange((de=>{de?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(de)),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&de?Z.mousemove||(q.addEventListener("mousemove",ie.mousemove),Z.mousemove=ie.mousemove):(q.removeEventListener("mousemove",Z.mousemove),Z.mousemove=null),16&de?Z.wheel||(q.addEventListener("wheel",ie.wheel,{passive:!1}),Z.wheel=ie.wheel):(q.removeEventListener("wheel",Z.wheel),Z.wheel=null),2&de?Z.mouseup||(Z.mouseup=ie.mouseup):(this._document.removeEventListener("mouseup",Z.mouseup),Z.mouseup=null),4&de?Z.mousedrag||(Z.mousedrag=ie.mousedrag):(this._document.removeEventListener("mousemove",Z.mousedrag),Z.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,d.addDisposableDomListener)(q,"mousedown",(de=>{if(de.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(de))return oe(de),Z.mouseup&&this._document.addEventListener("mouseup",Z.mouseup),Z.mousedrag&&this._document.addEventListener("mousemove",Z.mousedrag),this.cancel(de)}))),this.register((0,d.addDisposableDomListener)(q,"wheel",(de=>{if(!Z.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(de)===!1)return!1;if(!this.buffer.hasScrollback){const be=this.viewport.getLinesScrolled(de);if(be===0)return;const we=$.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(de.deltaY<0?"A":"B");let $e="";for(let Je=0;Je<Math.abs(be);Je++)$e+=we;return this.coreService.triggerDataEvent($e,!0),this.cancel(de,!0)}return this.viewport.handleWheel(de)?this.cancel(de):void 0}}),{passive:!1})),this.register((0,d.addDisposableDomListener)(q,"touchstart",(de=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(de),this.cancel(de)}),{passive:!0})),this.register((0,d.addDisposableDomListener)(q,"touchmove",(de=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(de)?void 0:this.cancel(de)}),{passive:!1}))}refresh(Y,q){var oe;(oe=this._renderService)==null||oe.refreshRows(Y,q)}updateCursorStyle(Y){var q;(q=this._selectionService)!=null&&q.shouldColumnSelect(Y)?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(Y,q,oe=0){var Z;oe===1?(super.scrollLines(Y,q,oe),this.refresh(0,this.rows-1)):(Z=this.viewport)==null||Z.scrollLines(Y)}paste(Y){(0,h.paste)(Y,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(Y){this._customKeyEventHandler=Y}attachCustomWheelEventHandler(Y){this._customWheelEventHandler=Y}registerLinkProvider(Y){return this._linkProviderService.registerLinkProvider(Y)}registerCharacterJoiner(Y){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const q=this._characterJoinerService.register(Y);return this.refresh(0,this.rows-1),q}deregisterCharacterJoiner(Y){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(Y)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(Y){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+Y)}registerDecoration(Y){return this._decorationService.registerDecoration(Y)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(Y,q,oe){this._selectionService.setSelection(Y,q,oe)}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 Y;(Y=this._selectionService)==null||Y.clearSelection()}selectAll(){var Y;(Y=this._selectionService)==null||Y.selectAll()}selectLines(Y,q){var oe;(oe=this._selectionService)==null||oe.selectLines(Y,q)}_keyDown(Y){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1)return!1;const q=this.browser.isMac&&this.options.macOptionIsMeta&&Y.altKey;if(!q&&!this._compositionHelper.keydown(Y))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;q||Y.key!=="Dead"&&Y.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const oe=(0,J.evaluateKeyboardEvent)(Y,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(Y),oe.type===3||oe.type===2){const Z=this.rows-1;return this.scrollLines(oe.type===2?-Z:Z),this.cancel(Y,!0)}return oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,Y)||(oe.cancel&&this.cancel(Y,!0),!oe.key||!!(Y.key&&!Y.ctrlKey&&!Y.altKey&&!Y.metaKey&&Y.key.length===1&&Y.key.charCodeAt(0)>=65&&Y.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(oe.key!==$.C0.ETX&&oe.key!==$.C0.CR||(this.textarea.value=""),this._onKey.fire({key:oe.key,domEvent:Y}),this._showCursor(),this.coreService.triggerDataEvent(oe.key,!0),!this.optionsService.rawOptions.screenReaderMode||Y.altKey||Y.ctrlKey?this.cancel(Y,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(Y,q){const oe=Y.isMac&&!this.options.macOptionIsMeta&&q.altKey&&!q.ctrlKey&&!q.metaKey||Y.isWindows&&q.altKey&&q.ctrlKey&&!q.metaKey||Y.isWindows&&q.getModifierState("AltGraph");return q.type==="keypress"?oe:oe&&(!q.keyCode||q.keyCode>47)}_keyUp(Y){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1||((function(q){return q.keyCode===16||q.keyCode===17||q.keyCode===18})(Y)||this.focus(),this.updateCursorStyle(Y),this._keyPressHandled=!1)}_keyPress(Y){let q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1)return!1;if(this.cancel(Y),Y.charCode)q=Y.charCode;else if(Y.which===null||Y.which===void 0)q=Y.keyCode;else{if(Y.which===0||Y.charCode===0)return!1;q=Y.which}return!(!q||(Y.altKey||Y.ctrlKey||Y.metaKey)&&!this._isThirdLevelShift(this.browser,Y)||(q=String.fromCharCode(q),this._onKey.fire({key:q,domEvent:Y}),this._showCursor(),this.coreService.triggerDataEvent(q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(Y){if(Y.data&&Y.inputType==="insertText"&&(!Y.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const q=Y.data;return this.coreService.triggerDataEvent(q,!0),this.cancel(Y),!0}return!1}resize(Y,q){Y!==this.cols||q!==this.rows?super.resize(Y,q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(Y,q){var oe,Z;(oe=this._charSizeService)==null||oe.measure(),(Z=this.viewport)==null||Z.syncScrollArea(!0)}clear(){var Y;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let q=1;q<this.rows;q++)this.buffer.lines.push(this.buffer.getBlankLine(G.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(Y=this.viewport)==null||Y.reset(),this.refresh(0,this.rows-1)}}reset(){var q,oe;this.options.rows=this.rows,this.options.cols=this.cols;const Y=this._customKeyEventHandler;this._setup(),super.reset(),(q=this._selectionService)==null||q.reset(),this._decorationService.reset(),(oe=this.viewport)==null||oe.reset(),this._customKeyEventHandler=Y,this.refresh(0,this.rows-1)}clearTextureAtlas(){var Y;(Y=this._renderService)==null||Y.clearTextureAtlas()}_reportFocus(){var Y;(Y=this.element)!=null&&Y.classList.contains("focus")?this.coreService.triggerDataEvent($.C0.ESC+"[I"):this.coreService.triggerDataEvent($.C0.ESC+"[O")}_reportWindowsOptions(Y){if(this._renderService)switch(Y){case V.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const q=this._renderService.dimensions.css.canvas.width.toFixed(0),oe=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${$.C0.ESC}[4;${oe};${q}t`);break;case V.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const Z=this._renderService.dimensions.css.cell.width.toFixed(0),ie=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${$.C0.ESC}[6;${ie};${Z}t`)}}cancel(Y,q){if(this.options.cancelEvents||q)return Y.preventDefault(),Y.stopPropagation(),!1}}a.Terminal=ue},9924:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(c,h=1e3){this._renderCallback=c,this._debounceThresholdMS=h,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,h,d){this._rowCount=d,c=c!==void 0?c:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h;const u=Date.now();if(u-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=u,this._innerRefresh();else if(!this._additionalRefreshRequested){const b=u-this._lastRefreshMs,w=this._debounceThresholdMS-b;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),w)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,h)}}},1680:function(f,a,c){var h=this&&this.__decorate||function(_,g,y,A){var M,D=arguments.length,T=D<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,y):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,g,y,A);else for(var k=_.length-1;k>=0;k--)(M=_[k])&&(T=(D<3?M(T):D>3?M(g,y,T):M(g,y))||T);return D>3&&T&&Object.defineProperty(g,y,T),T},d=this&&this.__param||function(_,g){return function(y,A){g(y,A,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const u=c(3656),b=c(4725),w=c(8460),E=c(844),x=c(2585);let S=a.Viewport=class extends E.Disposable{constructor(_,g,y,A,M,D,T,k){super(),this._viewportElement=_,this._scrollArea=g,this._bufferService=y,this._optionsService=A,this._charSizeService=M,this._renderService=D,this._coreBrowserService=T,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new w.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,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(k.colors),this.register(k.onChangeColors((R=>this._handleThemeChange(R)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(_){this._viewportElement.style.backgroundColor=_.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(_){if(_)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const g=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==g&&(this._lastRecordedBufferHeight=g,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const _=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==_&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=_),this._refreshAnimationFrame=null}syncScrollArea(_=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(_);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(_)}_handleScroll(_){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const g=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:g,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const _=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(_*(this._smoothScrollState.target-this._smoothScrollState.origin)),_<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(_,g){const y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(g<0&&this._viewportElement.scrollTop!==0||g>0&&y<this._lastRecordedBufferHeight)||(_.cancelable&&_.preventDefault(),!1)}handleWheel(_){const g=this._getPixelsScrolled(_);return g!==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+g:this._smoothScrollState.target+=g,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=g,this._bubbleScroll(_,g))}scrollLines(_){if(_!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const g=_*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+g,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:_,suppressScrollEvent:!1})}_getPixelsScrolled(_){if(_.deltaY===0||_.shiftKey)return 0;let g=this._applyScrollModifier(_.deltaY,_);return _.deltaMode===WheelEvent.DOM_DELTA_LINE?g*=this._currentRowHeight:_.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(g*=this._currentRowHeight*this._bufferService.rows),g}getBufferElements(_,g){var k;let y,A="";const M=[],D=g??this._bufferService.buffer.lines.length,T=this._bufferService.buffer.lines;for(let R=_;R<D;R++){const N=T.get(R);if(!N)continue;const I=(k=T.get(R+1))==null?void 0:k.isWrapped;if(A+=N.translateToString(!I),!I||R===T.length-1){const P=document.createElement("div");P.textContent=A,M.push(P),A.length>0&&(y=P),A=""}}return{bufferElements:M,cursorElement:y}}getLinesScrolled(_){if(_.deltaY===0||_.shiftKey)return 0;let g=this._applyScrollModifier(_.deltaY,_);return _.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(g/=this._currentRowHeight+0,this._wheelPartialScroll+=g,g=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):_.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(g*=this._bufferService.rows),g}_applyScrollModifier(_,g){const y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&g.altKey||y==="ctrl"&&g.ctrlKey||y==="shift"&&g.shiftKey?_*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:_*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(_){this._lastTouchY=_.touches[0].pageY}handleTouchMove(_){const g=this._lastTouchY-_.touches[0].pageY;return this._lastTouchY=_.touches[0].pageY,g!==0&&(this._viewportElement.scrollTop+=g,this._bubbleScroll(_,g))}};a.Viewport=S=h([d(2,x.IBufferService),d(3,x.IOptionsService),d(4,b.ICharSizeService),d(5,b.IRenderService),d(6,b.ICoreBrowserService),d(7,b.IThemeService)],S)},3107:function(f,a,c){var h=this&&this.__decorate||function(x,S,_,g){var y,A=arguments.length,M=A<3?S:g===null?g=Object.getOwnPropertyDescriptor(S,_):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,S,_,g);else for(var D=x.length-1;D>=0;D--)(y=x[D])&&(M=(A<3?y(M):A>3?y(S,_,M):y(S,_))||M);return A>3&&M&&Object.defineProperty(S,_,M),M},d=this&&this.__param||function(x,S){return function(_,g){S(_,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const u=c(4725),b=c(844),w=c(2585);let E=a.BufferDecorationRenderer=class extends b.Disposable{constructor(x,S,_,g,y){super(),this._screenElement=x,this._bufferService=S,this._coreBrowserService=_,this._decorationService=g,this._renderService=y,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((A=>this._removeDecoration(A)))),this.register((0,b.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 x of this._decorationService.decorations)this._renderDecoration(x);this._dimensionsChanged=!1}_renderDecoration(x){this._refreshStyle(x),this._dimensionsChanged&&this._refreshXPosition(x)}_createElement(x){var g;const S=this._coreBrowserService.mainDocument.createElement("div");S.classList.add("xterm-decoration"),S.classList.toggle("xterm-decoration-top-layer",((g=x==null?void 0:x.options)==null?void 0:g.layer)==="top"),S.style.width=`${Math.round((x.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,S.style.height=(x.options.height||1)*this._renderService.dimensions.css.cell.height+"px",S.style.top=(x.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",S.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const _=x.options.x??0;return _&&_>this._bufferService.cols&&(S.style.display="none"),this._refreshXPosition(x,S),S}_refreshStyle(x){const S=x.marker.line-this._bufferService.buffers.active.ydisp;if(S<0||S>=this._bufferService.rows)x.element&&(x.element.style.display="none",x.onRenderEmitter.fire(x.element));else{let _=this._decorationElements.get(x);_||(_=this._createElement(x),x.element=_,this._decorationElements.set(x,_),this._container.appendChild(_),x.onDispose((()=>{this._decorationElements.delete(x),_.remove()}))),_.style.top=S*this._renderService.dimensions.css.cell.height+"px",_.style.display=this._altBufferIsActive?"none":"block",x.onRenderEmitter.fire(_)}}_refreshXPosition(x,S=x.element){if(!S)return;const _=x.options.x??0;(x.options.anchor||"left")==="right"?S.style.right=_?_*this._renderService.dimensions.css.cell.width+"px":"":S.style.left=_?_*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(x){var S;(S=this._decorationElements.get(x))==null||S.remove(),this._decorationElements.delete(x),x.dispose()}};a.BufferDecorationRenderer=E=h([d(1,w.IBufferService),d(2,u.ICoreBrowserService),d(3,w.IDecorationService),d(4,u.IRenderService)],E)},5871:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorZoneStore=void 0,a.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(c){if(c.options.overviewRulerOptions){for(const h of this._zones)if(h.color===c.options.overviewRulerOptions.color&&h.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(h,c.marker.line))return;if(this._lineAdjacentToZone(h,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(h,c.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=c.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=c.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=c.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=c.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:c.options.overviewRulerOptions.color,position:c.options.overviewRulerOptions.position,startBufferLine:c.marker.line,endBufferLine:c.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(c){this._linePadding=c}_lineIntersectsZone(c,h){return h>=c.startBufferLine&&h<=c.endBufferLine}_lineAdjacentToZone(c,h,d){return h>=c.startBufferLine-this._linePadding[d||"full"]&&h<=c.endBufferLine+this._linePadding[d||"full"]}_addLineToZone(c,h){c.startBufferLine=Math.min(c.startBufferLine,h),c.endBufferLine=Math.max(c.endBufferLine,h)}}},5744:function(f,a,c){var h=this&&this.__decorate||function(y,A,M,D){var T,k=arguments.length,R=k<3?A:D===null?D=Object.getOwnPropertyDescriptor(A,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(y,A,M,D);else for(var N=y.length-1;N>=0;N--)(T=y[N])&&(R=(k<3?T(R):k>3?T(A,M,R):T(A,M))||R);return k>3&&R&&Object.defineProperty(A,M,R),R},d=this&&this.__param||function(y,A){return function(M,D){A(M,D,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const u=c(5871),b=c(4725),w=c(844),E=c(2585),x={full:0,left:0,center:0,right:0},S={full:0,left:0,center:0,right:0},_={full:0,left:0,center:0,right:0};let g=a.OverviewRulerRenderer=class extends w.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,A,M,D,T,k,R){var I;super(),this._viewportElement=y,this._screenElement=A,this._bufferService=M,this._decorationService=D,this._renderService=T,this._optionsService=k,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(),(I=this._viewportElement.parentElement)==null||I.insertBefore(this._canvas,this._viewportElement);const N=this._canvas.getContext("2d");if(!N)throw new Error("Ctx cannot be null");this._ctx=N,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,w.toDisposable)((()=>{var P;(P=this._canvas)==null||P.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 y=Math.floor(this._canvas.width/3),A=Math.ceil(this._canvas.width/3);S.full=this._canvas.width,S.left=y,S.center=A,S.right=y,this._refreshDrawHeightConstants(),_.full=0,_.left=0,_.center=S.left,_.right=S.left+S.center}_refreshDrawHeightConstants(){x.full=Math.round(2*this._coreBrowserService.dpr);const y=this._canvas.height/this._bufferService.buffer.lines.length,A=Math.round(Math.max(Math.min(y,12),6)*this._coreBrowserService.dpr);x.left=A,x.center=A,x.right=A}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.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 A of this._decorationService.decorations)this._colorZoneStore.addDecoration(A);this._ctx.lineWidth=1;const y=this._colorZoneStore.zones;for(const A of y)A.position!=="full"&&this._renderColorZone(A);for(const A of y)A.position==="full"&&this._renderColorZone(A);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(y){this._ctx.fillStyle=y.color,this._ctx.fillRect(_[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-x[y.position||"full"]/2),S[y.position||"full"],Math.round((this._canvas.height-1)*((y.endBufferLine-y.startBufferLine)/this._bufferService.buffers.active.lines.length)+x[y.position||"full"]))}_queueRefresh(y,A){this._shouldUpdateDimensions=y||this._shouldUpdateDimensions,this._shouldUpdateAnchor=A||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};a.OverviewRulerRenderer=g=h([d(2,E.IBufferService),d(3,E.IDecorationService),d(4,b.IRenderService),d(5,E.IOptionsService),d(6,b.ICoreBrowserService)],g)},2950:function(f,a,c){var h=this&&this.__decorate||function(x,S,_,g){var y,A=arguments.length,M=A<3?S:g===null?g=Object.getOwnPropertyDescriptor(S,_):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,S,_,g);else for(var D=x.length-1;D>=0;D--)(y=x[D])&&(M=(A<3?y(M):A>3?y(S,_,M):y(S,_))||M);return A>3&&M&&Object.defineProperty(S,_,M),M},d=this&&this.__param||function(x,S){return function(_,g){S(_,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const u=c(4725),b=c(2585),w=c(2584);let E=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(x,S,_,g,y,A){this._textarea=x,this._compositionView=S,this._bufferService=_,this._optionsService=g,this._coreService=y,this._renderService=A,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(x){this._compositionView.textContent=x.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(x){if(this._isComposing||this._isSendingComposition){if(x.keyCode===229||x.keyCode===16||x.keyCode===17||x.keyCode===18)return!1;this._finalizeComposition(!1)}return x.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(x){if(this._compositionView.classList.remove("active"),this._isComposing=!1,x){const S={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let _;this._isSendingComposition=!1,S.start+=this._dataAlreadySent.length,_=this._isComposing?this._textarea.value.substring(S.start,S.end):this._textarea.value.substring(S.start),_.length>0&&this._coreService.triggerDataEvent(_,!0)}}),0)}else{this._isSendingComposition=!1;const S=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(S,!0)}}_handleAnyTextareaChanges(){const x=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const S=this._textarea.value,_=S.replace(x,"");this._dataAlreadySent=_,S.length>x.length?this._coreService.triggerDataEvent(_,!0):S.length<x.length?this._coreService.triggerDataEvent(`${w.C0.DEL}`,!0):S.length===x.length&&S!==x&&this._coreService.triggerDataEvent(S,!0)}}),0)}updateCompositionElements(x){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const S=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),_=this._renderService.dimensions.css.cell.height,g=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,y=S*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=y+"px",this._compositionView.style.top=g+"px",this._compositionView.style.height=_+"px",this._compositionView.style.lineHeight=_+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const A=this._compositionView.getBoundingClientRect();this._textarea.style.left=y+"px",this._textarea.style.top=g+"px",this._textarea.style.width=Math.max(A.width,1)+"px",this._textarea.style.height=Math.max(A.height,1)+"px",this._textarea.style.lineHeight=A.height+"px"}x||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};a.CompositionHelper=E=h([d(2,b.IBufferService),d(3,b.IOptionsService),d(4,b.ICoreService),d(5,u.IRenderService)],E)},9806:(f,a)=>{function c(h,d,u){const b=u.getBoundingClientRect(),w=h.getComputedStyle(u),E=parseInt(w.getPropertyValue("padding-left")),x=parseInt(w.getPropertyValue("padding-top"));return[d.clientX-b.left-E,d.clientY-b.top-x]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=c,a.getCoords=function(h,d,u,b,w,E,x,S,_){if(!E)return;const g=c(h,d,u);return g?(g[0]=Math.ceil((g[0]+(_?x/2:0))/x),g[1]=Math.ceil(g[1]/S),g[0]=Math.min(Math.max(g[0],1),b+(_?1:0)),g[1]=Math.min(Math.max(g[1],1),w),g):void 0}},9504:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const h=c(2584);function d(S,_,g,y){const A=S-u(S,g),M=_-u(_,g),D=Math.abs(A-M)-(function(T,k,R){let N=0;const I=T-u(T,R),P=k-u(k,R);for(let F=0;F<Math.abs(I-P);F++){const K=b(T,k)==="A"?-1:1,W=R.buffer.lines.get(I+K*F);W!=null&&W.isWrapped&&N++}return N})(S,_,g);return x(D,E(b(S,_),y))}function u(S,_){let g=0,y=_.buffer.lines.get(S),A=y==null?void 0:y.isWrapped;for(;A&&S>=0&&S<_.rows;)g++,y=_.buffer.lines.get(--S),A=y==null?void 0:y.isWrapped;return g}function b(S,_){return S>_?"A":"B"}function w(S,_,g,y,A,M){let D=S,T=_,k="";for(;D!==g||T!==y;)D+=A?1:-1,A&&D>M.cols-1?(k+=M.buffer.translateBufferLineToString(T,!1,S,D),D=0,S=0,T++):!A&&D<0&&(k+=M.buffer.translateBufferLineToString(T,!1,0,S+1),D=M.cols-1,S=D,T--);return k+M.buffer.translateBufferLineToString(T,!1,S,D)}function E(S,_){const g=_?"O":"[";return h.C0.ESC+g+S}function x(S,_){S=Math.floor(S);let g="";for(let y=0;y<S;y++)g+=_;return g}a.moveToCellSequence=function(S,_,g,y){const A=g.buffer.x,M=g.buffer.y;if(!g.buffer.hasScrollback)return(function(k,R,N,I,P,F){return d(R,I,P,F).length===0?"":x(w(k,R,k,R-u(R,P),!1,P).length,E("D",F))})(A,M,0,_,g,y)+d(M,_,g,y)+(function(k,R,N,I,P,F){let K;K=d(R,I,P,F).length>0?I-u(I,P):R;const W=I,G=(function($,J,H,B,z,V){let j;return j=d(H,B,z,V).length>0?B-u(B,z):J,$<H&&j<=B||$>=H&&j<B?"C":"D"})(k,R,N,I,P,F);return x(w(k,K,N,W,G==="C",P).length,E(G,F))})(A,M,S,_,g,y);let D;if(M===_)return D=A>S?"D":"C",x(Math.abs(A-S),E(D,y));D=M>_?"D":"C";const T=Math.abs(M-_);return x((function(k,R){return R.cols-k})(M>_?S:A,g)+(T-1)*g.cols+1+((M>_?A:S)-1),E(D,y))}},1296:function(f,a,c){var h=this&&this.__decorate||function(F,K,W,G){var $,J=arguments.length,H=J<3?K:G===null?G=Object.getOwnPropertyDescriptor(K,W):G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(F,K,W,G);else for(var B=F.length-1;B>=0;B--)($=F[B])&&(H=(J<3?$(H):J>3?$(K,W,H):$(K,W))||H);return J>3&&H&&Object.defineProperty(K,W,H),H},d=this&&this.__param||function(F,K){return function(W,G){K(W,G,F)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const u=c(3787),b=c(2550),w=c(2223),E=c(6171),x=c(6052),S=c(4725),_=c(8055),g=c(8460),y=c(844),A=c(2585),M="xterm-dom-renderer-owner-",D="xterm-rows",T="xterm-fg-",k="xterm-bg-",R="xterm-focus",N="xterm-selection";let I=1,P=a.DomRenderer=class extends y.Disposable{constructor(F,K,W,G,$,J,H,B,z,V,j,te,ue){super(),this._terminal=F,this._document=K,this._element=W,this._screenElement=G,this._viewportElement=$,this._helperContainer=J,this._linkifier2=H,this._charSizeService=z,this._optionsService=V,this._bufferService=j,this._coreBrowserService=te,this._themeService=ue,this._terminalClass=I++,this._rowElements=[],this._selectionRenderModel=(0,x.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new g.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(D),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(N),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,E.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((me=>this._injectCss(me)))),this._injectCss(this._themeService.colors),this._rowFactory=B.createInstance(u.DomRendererRowFactory,document),this._element.classList.add(M+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((me=>this._handleLinkHover(me)))),this.register(this._linkifier2.onHideLinkUnderline((me=>this._handleLinkLeave(me)))),this.register((0,y.toDisposable)((()=>{this._element.classList.remove(M+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new b.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 F=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*F,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*F),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/F),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/F),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const W of this._rowElements)W.style.width=`${this.dimensions.css.canvas.width}px`,W.style.height=`${this.dimensions.css.cell.height}px`,W.style.lineHeight=`${this.dimensions.css.cell.height}px`,W.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const K=`${this._terminalSelector} .${D} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=K,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(F){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let K=`${this._terminalSelector} .${D} { color: ${F.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;K+=`${this._terminalSelector} .${D} .xterm-dim { color: ${_.color.multiplyOpacity(F.foreground,.5).css};}`,K+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const W=`blink_underline_${this._terminalClass}`,G=`blink_bar_${this._terminalClass}`,$=`blink_block_${this._terminalClass}`;K+=`@keyframes ${W} { 50% { border-bottom-style: hidden; }}`,K+=`@keyframes ${G} { 50% { box-shadow: none; }}`,K+=`@keyframes ${$} { 0% { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css}; } 50% { background-color: inherit; color: ${F.cursor.css}; }}`,K+=`${this._terminalSelector} .${D}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${W} 1s step-end infinite;}${this._terminalSelector} .${D}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${G} 1s step-end infinite;}${this._terminalSelector} .${D}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${$} 1s step-end infinite;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css};}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${F.cursor.css} !important; color: ${F.cursorAccent.css} !important;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${F.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${F.cursor.css} inset;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${F.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,K+=`${this._terminalSelector} .${N} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${N} div { position: absolute; background-color: ${F.selectionBackgroundOpaque.css};}${this._terminalSelector} .${N} div { position: absolute; background-color: ${F.selectionInactiveBackgroundOpaque.css};}`;for(const[J,H]of F.ansi.entries())K+=`${this._terminalSelector} .${T}${J} { color: ${H.css}; }${this._terminalSelector} .${T}${J}.xterm-dim { color: ${_.color.multiplyOpacity(H,.5).css}; }${this._terminalSelector} .${k}${J} { background-color: ${H.css}; }`;K+=`${this._terminalSelector} .${T}${w.INVERTED_DEFAULT_COLOR} { color: ${_.color.opaque(F.background).css}; }${this._terminalSelector} .${T}${w.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${_.color.multiplyOpacity(_.color.opaque(F.background),.5).css}; }${this._terminalSelector} .${k}${w.INVERTED_DEFAULT_COLOR} { background-color: ${F.foreground.css}; }`,this._themeStyleElement.textContent=K}_setDefaultSpacing(){const F=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${F}px`,this._rowFactory.defaultSpacing=F}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(F,K){for(let W=this._rowElements.length;W<=K;W++){const G=this._document.createElement("div");this._rowContainer.appendChild(G),this._rowElements.push(G)}for(;this._rowElements.length>K;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(F,K){this._refreshRowElements(F,K),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(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(F,K,W){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(F,K,W),this.renderRows(0,this._bufferService.rows-1),!F||!K)return;this._selectionRenderModel.update(this._terminal,F,K,W);const G=this._selectionRenderModel.viewportStartRow,$=this._selectionRenderModel.viewportEndRow,J=this._selectionRenderModel.viewportCappedStartRow,H=this._selectionRenderModel.viewportCappedEndRow;if(J>=this._bufferService.rows||H<0)return;const B=this._document.createDocumentFragment();if(W){const z=F[0]>K[0];B.appendChild(this._createSelectionElement(J,z?K[0]:F[0],z?F[0]:K[0],H-J+1))}else{const z=G===J?F[0]:0,V=J===$?K[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(J,z,V));const j=H-J-1;if(B.appendChild(this._createSelectionElement(J+1,0,this._bufferService.cols,j)),J!==H){const te=$===H?K[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(H,0,te))}}this._selectionContainer.appendChild(B)}_createSelectionElement(F,K,W,G=1){const $=this._document.createElement("div"),J=K*this.dimensions.css.cell.width;let H=this.dimensions.css.cell.width*(W-K);return J+H>this.dimensions.css.canvas.width&&(H=this.dimensions.css.canvas.width-J),$.style.height=G*this.dimensions.css.cell.height+"px",$.style.top=F*this.dimensions.css.cell.height+"px",$.style.left=`${J}px`,$.style.width=`${H}px`,$}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 F of this._rowElements)F.replaceChildren()}renderRows(F,K){const W=this._bufferService.buffer,G=W.ybase+W.y,$=Math.min(W.x,this._bufferService.cols-1),J=this._optionsService.rawOptions.cursorBlink,H=this._optionsService.rawOptions.cursorStyle,B=this._optionsService.rawOptions.cursorInactiveStyle;for(let z=F;z<=K;z++){const V=z+W.ydisp,j=this._rowElements[z],te=W.lines.get(V);if(!j||!te)break;j.replaceChildren(...this._rowFactory.createRow(te,V,V===G,H,B,$,J,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${M}${this._terminalClass}`}_handleLinkHover(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!0)}_handleLinkLeave(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!1)}_setCellUnderline(F,K,W,G,$,J){W<0&&(F=0),G<0&&(K=0);const H=this._bufferService.rows-1;W=Math.max(Math.min(W,H),0),G=Math.max(Math.min(G,H),0),$=Math.min($,this._bufferService.cols);const B=this._bufferService.buffer,z=B.ybase+B.y,V=Math.min(B.x,$-1),j=this._optionsService.rawOptions.cursorBlink,te=this._optionsService.rawOptions.cursorStyle,ue=this._optionsService.rawOptions.cursorInactiveStyle;for(let me=W;me<=G;++me){const Y=me+B.ydisp,q=this._rowElements[me],oe=B.lines.get(Y);if(!q||!oe)break;q.replaceChildren(...this._rowFactory.createRow(oe,Y,Y===z,te,ue,V,j,this.dimensions.css.cell.width,this._widthCache,J?me===W?F:0:-1,J?(me===G?K:$)-1:-1))}}};a.DomRenderer=P=h([d(7,A.IInstantiationService),d(8,S.ICharSizeService),d(9,A.IOptionsService),d(10,A.IBufferService),d(11,S.ICoreBrowserService),d(12,S.IThemeService)],P)},3787:function(f,a,c){var h=this&&this.__decorate||function(D,T,k,R){var N,I=arguments.length,P=I<3?T:R===null?R=Object.getOwnPropertyDescriptor(T,k):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(D,T,k,R);else for(var F=D.length-1;F>=0;F--)(N=D[F])&&(P=(I<3?N(P):I>3?N(T,k,P):N(T,k))||P);return I>3&&P&&Object.defineProperty(T,k,P),P},d=this&&this.__param||function(D,T){return function(k,R){T(k,R,D)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const u=c(2223),b=c(643),w=c(511),E=c(2585),x=c(8055),S=c(4725),_=c(4269),g=c(6171),y=c(3734);let A=a.DomRendererRowFactory=class{constructor(D,T,k,R,N,I,P){this._document=D,this._characterJoinerService=T,this._optionsService=k,this._coreBrowserService=R,this._coreService=N,this._decorationService=I,this._themeService=P,this._workCell=new w.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(D,T,k){this._selectionStart=D,this._selectionEnd=T,this._columnSelectMode=k}createRow(D,T,k,R,N,I,P,F,K,W,G){const $=[],J=this._characterJoinerService.getJoinedCharacters(T),H=this._themeService.colors;let B,z=D.getNoBgTrimmedLength();k&&z<I+1&&(z=I+1);let V=0,j="",te=0,ue=0,me=0,Y=!1,q=0,oe=!1,Z=0;const ie=[],de=W!==-1&&G!==-1;for(let be=0;be<z;be++){D.loadCell(be,this._workCell);let we=this._workCell.getWidth();if(we===0)continue;let $e=!1,Je=be,De=this._workCell;if(J.length>0&&be===J[0][0]){$e=!0;const Ne=J.shift();De=new _.JoinedCellData(this._workCell,D.translateToString(!0,Ne[0],Ne[1]),Ne[1]-Ne[0]),Je=Ne[1]-1,we=De.getWidth()}const Dt=this._isCellInSelection(be,T),Ut=k&&be===I,Rt=de&&be>=W&&be<=G;let Pt=!1;this._decorationService.forEachDecorationAtCell(be,T,void 0,(Ne=>{Pt=!0}));let Yt=De.getChars()||b.WHITESPACE_CELL_CHAR;if(Yt===" "&&(De.isUnderline()||De.isOverline())&&(Yt=" "),Z=we*F-K.get(Yt,De.isBold(),De.isItalic()),B){if(V&&(Dt&&oe||!Dt&&!oe&&De.bg===te)&&(Dt&&oe&&H.selectionForeground||De.fg===ue)&&De.extended.ext===me&&Rt===Y&&Z===q&&!Ut&&!$e&&!Pt){De.isInvisible()?j+=b.WHITESPACE_CELL_CHAR:j+=Yt,V++;continue}V&&(B.textContent=j),B=this._document.createElement("span"),V=0,j=""}else B=this._document.createElement("span");if(te=De.bg,ue=De.fg,me=De.extended.ext,Y=Rt,q=Z,oe=Dt,$e&&I>=be&&I<=Je&&(I=be),!this._coreService.isCursorHidden&&Ut&&this._coreService.isCursorInitialized){if(ie.push("xterm-cursor"),this._coreBrowserService.isFocused)P&&ie.push("xterm-cursor-blink"),ie.push(R==="bar"?"xterm-cursor-bar":R==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(N)switch(N){case"outline":ie.push("xterm-cursor-outline");break;case"block":ie.push("xterm-cursor-block");break;case"bar":ie.push("xterm-cursor-bar");break;case"underline":ie.push("xterm-cursor-underline")}}if(De.isBold()&&ie.push("xterm-bold"),De.isItalic()&&ie.push("xterm-italic"),De.isDim()&&ie.push("xterm-dim"),j=De.isInvisible()?b.WHITESPACE_CELL_CHAR:De.getChars()||b.WHITESPACE_CELL_CHAR,De.isUnderline()&&(ie.push(`xterm-underline-${De.extended.underlineStyle}`),j===" "&&(j=" "),!De.isUnderlineColorDefault()))if(De.isUnderlineColorRGB())B.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(De.getUnderlineColor()).join(",")})`;else{let Ne=De.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&De.isBold()&&Ne<8&&(Ne+=8),B.style.textDecorationColor=H.ansi[Ne].css}De.isOverline()&&(ie.push("xterm-overline"),j===" "&&(j=" ")),De.isStrikethrough()&&ie.push("xterm-strikethrough"),Rt&&(B.style.textDecoration="underline");let mt=De.getFgColor(),et=De.getFgColorMode(),Mt=De.getBgColor(),he=De.getBgColorMode();const ye=!!De.isInverse();if(ye){const Ne=mt;mt=Mt,Mt=Ne;const ft=et;et=he,he=ft}let ke,Re,Be,pt=!1;switch(this._decorationService.forEachDecorationAtCell(be,T,void 0,(Ne=>{Ne.options.layer!=="top"&&pt||(Ne.backgroundColorRGB&&(he=50331648,Mt=Ne.backgroundColorRGB.rgba>>8&16777215,ke=Ne.backgroundColorRGB),Ne.foregroundColorRGB&&(et=50331648,mt=Ne.foregroundColorRGB.rgba>>8&16777215,Re=Ne.foregroundColorRGB),pt=Ne.options.layer==="top")})),!pt&&Dt&&(ke=this._coreBrowserService.isFocused?H.selectionBackgroundOpaque:H.selectionInactiveBackgroundOpaque,Mt=ke.rgba>>8&16777215,he=50331648,pt=!0,H.selectionForeground&&(et=50331648,mt=H.selectionForeground.rgba>>8&16777215,Re=H.selectionForeground)),pt&&ie.push("xterm-decoration-top"),he){case 16777216:case 33554432:Be=H.ansi[Mt],ie.push(`xterm-bg-${Mt}`);break;case 50331648:Be=x.channels.toColor(Mt>>16,Mt>>8&255,255&Mt),this._addStyle(B,`background-color:#${M((Mt>>>0).toString(16),"0",6)}`);break;default:ye?(Be=H.foreground,ie.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):Be=H.background}switch(ke||De.isDim()&&(ke=x.color.multiplyOpacity(Be,.5)),et){case 16777216:case 33554432:De.isBold()&&mt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(mt+=8),this._applyMinimumContrast(B,Be,H.ansi[mt],De,ke,void 0)||ie.push(`xterm-fg-${mt}`);break;case 50331648:const Ne=x.channels.toColor(mt>>16&255,mt>>8&255,255&mt);this._applyMinimumContrast(B,Be,Ne,De,ke,Re)||this._addStyle(B,`color:#${M(mt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(B,Be,H.foreground,De,ke,Re)||ye&&ie.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}ie.length&&(B.className=ie.join(" "),ie.length=0),Ut||$e||Pt?B.textContent=j:V++,Z!==this.defaultSpacing&&(B.style.letterSpacing=`${Z}px`),$.push(B),be=Je}return B&&V&&(B.textContent=j),$}_applyMinimumContrast(D,T,k,R,N,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,g.treatGlyphAsBackgroundColor)(R.getCode()))return!1;const P=this._getContrastCache(R);let F;if(N||I||(F=P.getColor(T.rgba,k.rgba)),F===void 0){const K=this._optionsService.rawOptions.minimumContrastRatio/(R.isDim()?2:1);F=x.color.ensureContrastRatio(N||T,I||k,K),P.setColor((N||T).rgba,(I||k).rgba,F??null)}return!!F&&(this._addStyle(D,`color:${F.css}`),!0)}_getContrastCache(D){return D.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(D,T){D.setAttribute("style",`${D.getAttribute("style")||""}${T};`)}_isCellInSelection(D,T){const k=this._selectionStart,R=this._selectionEnd;return!(!k||!R)&&(this._columnSelectMode?k[0]<=R[0]?D>=k[0]&&T>=k[1]&&D<R[0]&&T<=R[1]:D<k[0]&&T>=k[1]&&D>=R[0]&&T<=R[1]:T>k[1]&&T<R[1]||k[1]===R[1]&&T===k[1]&&D>=k[0]&&D<R[0]||k[1]<R[1]&&T===R[1]&&D<R[0]||k[1]<R[1]&&T===k[1]&&D>=k[0])}};function M(D,T,k){for(;D.length<k;)D=T+D;return D}a.DomRendererRowFactory=A=h([d(1,S.ICharacterJoinerService),d(2,E.IOptionsService),d(3,S.ICoreBrowserService),d(4,E.ICoreService),d(5,E.IDecorationService),d(6,S.IThemeService)],A)},2550:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(c,h){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.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 d=c.createElement("span");d.classList.add("xterm-char-measure-element");const u=c.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontWeight="bold";const b=c.createElement("span");b.classList.add("xterm-char-measure-element"),b.style.fontStyle="italic";const w=c.createElement("span");w.classList.add("xterm-char-measure-element"),w.style.fontWeight="bold",w.style.fontStyle="italic",this._measureElements=[d,u,b,w],this._container.appendChild(d),this._container.appendChild(u),this._container.appendChild(b),this._container.appendChild(w),h.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(c,h,d,u){c===this._font&&h===this._fontSize&&d===this._weight&&u===this._weightBold||(this._font=c,this._fontSize=h,this._weight=d,this._weightBold=u,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${d}`,this._measureElements[1].style.fontWeight=`${u}`,this._measureElements[2].style.fontWeight=`${d}`,this._measureElements[3].style.fontWeight=`${u}`,this.clear())}get(c,h,d){let u=0;if(!h&&!d&&c.length===1&&(u=c.charCodeAt(0))<256){if(this._flat[u]!==-9999)return this._flat[u];const E=this._measure(c,0);return E>0&&(this._flat[u]=E),E}let b=c;h&&(b+="B"),d&&(b+="I");let w=this._holey.get(b);if(w===void 0){let E=0;h&&(E|=1),d&&(E|=2),w=this._measure(c,E),w>0&&this._holey.set(b,w)}return w}_measure(c,h){const d=this._measureElements[h];return d.textContent=c.repeat(32),d.offsetWidth/32}}},2223:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const h=c(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=h.isFirefox||h.isLegacyEdge?"bottom":"ideographic"},6171:(f,a)=>{function c(d){return 57508<=d&&d<=57558}function h(d){return d>=128512&&d<=128591||d>=127744&&d<=128511||d>=128640&&d<=128767||d>=9728&&d<=9983||d>=9984&&d<=10175||d>=65024&&d<=65039||d>=129280&&d<=129535||d>=127462&&d<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(d){if(!d)throw new Error("value must not be falsy");return d},a.isPowerlineGlyph=c,a.isRestrictedPowerlineGlyph=function(d){return 57520<=d&&d<=57527},a.isEmoji=h,a.allowRescaling=function(d,u,b,w){return u===1&&b>Math.ceil(1.5*w)&&d!==void 0&&d>255&&!h(d)&&!c(d)&&!(function(E){return 57344<=E&&E<=63743})(d)},a.treatGlyphAsBackgroundColor=function(d){return c(d)||(function(u){return 9472<=u&&u<=9631})(d)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(d,u,b=0){return(d-(2*Math.round(u)-b))%(2*Math.round(u))}},6052:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class c{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(d,u,b,w=!1){if(this.selectionStart=u,this.selectionEnd=b,!u||!b||u[0]===b[0]&&u[1]===b[1])return void this.clear();const E=d.buffers.active.ydisp,x=u[1]-E,S=b[1]-E,_=Math.max(x,0),g=Math.min(S,d.rows-1);_>=d.rows||g<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=x,this.viewportEndRow=S,this.viewportCappedStartRow=_,this.viewportCappedEndRow=g,this.startCol=u[0],this.endCol=b[0])}isCellSelected(d,u,b){return!!this.hasSelection&&(b-=d.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&b>=this.viewportCappedStartRow&&u<this.endCol&&b<=this.viewportCappedEndRow:u<this.startCol&&b>=this.viewportCappedStartRow&&u>=this.endCol&&b<=this.viewportCappedEndRow:b>this.viewportStartRow&&b<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&b===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&b===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&b===this.viewportStartRow&&u>=this.startCol)}}a.createSelectionRenderModel=function(){return new c}},456:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(c){this._bufferService=c,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 c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,h=this.selectionEnd;return!(!c||!h)&&(c[1]>h[1]||c[1]===h[1]&&c[0]>h[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(f,a,c){var h=this&&this.__decorate||function(g,y,A,M){var D,T=arguments.length,k=T<3?y:M===null?M=Object.getOwnPropertyDescriptor(y,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(g,y,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(k=(T<3?D(k):T>3?D(y,A,k):D(y,A))||k);return T>3&&k&&Object.defineProperty(y,A,k),k},d=this&&this.__param||function(g,y){return function(A,M){y(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const u=c(2585),b=c(8460),w=c(844);let E=a.CharSizeService=class extends w.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(g,y,A){super(),this._optionsService=A,this.width=0,this.height=0,this._onCharSizeChange=this.register(new b.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new _(this._optionsService))}catch{this._measureStrategy=this.register(new S(g,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const g=this._measureStrategy.measure();g.width===this.width&&g.height===this.height||(this.width=g.width,this.height=g.height,this._onCharSizeChange.fire())}};a.CharSizeService=E=h([d(2,u.IOptionsService)],E);class x extends w.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(y,A){y!==void 0&&y>0&&A!==void 0&&A>0&&(this._result.width=y,this._result.height=A)}}class S extends x{constructor(y,A,M){super(),this._document=y,this._parentElement=A,this._optionsService=M,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class _ extends x{constructor(y){super(),this._optionsService=y,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const A=this._ctx.measureText("W");if(!("width"in A&&"fontBoundingBoxAscent"in A&&"fontBoundingBoxDescent"in A))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const y=this._ctx.measureText("W");return this._validateAndSet(y.width,y.fontBoundingBoxAscent+y.fontBoundingBoxDescent),this._result}}},4269:function(f,a,c){var h=this&&this.__decorate||function(_,g,y,A){var M,D=arguments.length,T=D<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,y):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(_,g,y,A);else for(var k=_.length-1;k>=0;k--)(M=_[k])&&(T=(D<3?M(T):D>3?M(g,y,T):M(g,y))||T);return D>3&&T&&Object.defineProperty(g,y,T),T},d=this&&this.__param||function(_,g){return function(y,A){g(y,A,_)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const u=c(3734),b=c(643),w=c(511),E=c(2585);class x extends u.AttributeData{constructor(g,y,A){super(),this.content=0,this.combinedData="",this.fg=g.fg,this.bg=g.bg,this.combinedData=y,this._width=A}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(g){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=x;let S=a.CharacterJoinerService=class _g{constructor(g){this._bufferService=g,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(g){const y={id:this._nextCharacterJoinerId++,handler:g};return this._characterJoiners.push(y),y.id}deregister(g){for(let y=0;y<this._characterJoiners.length;y++)if(this._characterJoiners[y].id===g)return this._characterJoiners.splice(y,1),!0;return!1}getJoinedCharacters(g){if(this._characterJoiners.length===0)return[];const y=this._bufferService.buffer.lines.get(g);if(!y||y.length===0)return[];const A=[],M=y.translateToString(!0);let D=0,T=0,k=0,R=y.getFg(0),N=y.getBg(0);for(let I=0;I<y.getTrimmedLength();I++)if(y.loadCell(I,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==R||this._workCell.bg!==N){if(I-D>1){const P=this._getJoinedRanges(M,k,T,y,D);for(let F=0;F<P.length;F++)A.push(P[F])}D=I,k=T,R=this._workCell.fg,N=this._workCell.bg}T+=this._workCell.getChars().length||b.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-D>1){const I=this._getJoinedRanges(M,k,T,y,D);for(let P=0;P<I.length;P++)A.push(I[P])}return A}_getJoinedRanges(g,y,A,M,D){const T=g.substring(y,A);let k=[];try{k=this._characterJoiners[0].handler(T)}catch(R){console.error(R)}for(let R=1;R<this._characterJoiners.length;R++)try{const N=this._characterJoiners[R].handler(T);for(let I=0;I<N.length;I++)_g._mergeRanges(k,N[I])}catch(N){console.error(N)}return this._stringRangesToCellRanges(k,M,D),k}_stringRangesToCellRanges(g,y,A){let M=0,D=!1,T=0,k=g[M];if(k){for(let R=A;R<this._bufferService.cols;R++){const N=y.getWidth(R),I=y.getString(R).length||b.WHITESPACE_CELL_CHAR.length;if(N!==0){if(!D&&k[0]<=T&&(k[0]=R,D=!0),k[1]<=T){if(k[1]=R,k=g[++M],!k)break;k[0]<=T?(k[0]=R,D=!0):D=!1}T+=I}}k&&(k[1]=this._bufferService.cols)}}static _mergeRanges(g,y){let A=!1;for(let M=0;M<g.length;M++){const D=g[M];if(A){if(y[1]<=D[0])return g[M-1][1]=y[1],g;if(y[1]<=D[1])return g[M-1][1]=Math.max(y[1],D[1]),g.splice(M,1),g;g.splice(M,1),M--}else{if(y[1]<=D[0])return g.splice(M,0,y),g;if(y[1]<=D[1])return D[0]=Math.min(y[0],D[0]),g;y[0]<D[1]&&(D[0]=Math.min(y[0],D[0]),A=!0)}}return A?g[g.length-1][1]=y[1]:g.push(y),g}};a.CharacterJoinerService=S=h([d(0,E.IBufferService)],S)},5114:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const h=c(844),d=c(8460),u=c(3656);class b extends h.Disposable{constructor(x,S,_){super(),this._textarea=x,this._window=S,this.mainDocument=_,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new w(this._window),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new d.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((g=>this._screenDprMonitor.setWindow(g)))),this.register((0,d.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(x){this._window!==x&&(this._window=x,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}a.CoreBrowserService=b;class w extends h.Disposable{constructor(x){super(),this._parentWindow=x,this._windowResizeListener=this.register(new h.MutableDisposable),this._onDprChange=this.register(new d.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,h.toDisposable)((()=>this.clearListener())))}setWindow(x){this._parentWindow=x,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 x;this._outerListener&&((x=this._resolutionMediaMatchList)==null||x.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:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const h=c(844);class d extends h.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,h.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(b){return this.linkProviders.push(b),{dispose:()=>{const w=this.linkProviders.indexOf(b);w!==-1&&this.linkProviders.splice(w,1)}}}}a.LinkProviderService=d},8934:function(f,a,c){var h=this&&this.__decorate||function(E,x,S,_){var g,y=arguments.length,A=y<3?x:_===null?_=Object.getOwnPropertyDescriptor(x,S):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(E,x,S,_);else for(var M=E.length-1;M>=0;M--)(g=E[M])&&(A=(y<3?g(A):y>3?g(x,S,A):g(x,S))||A);return y>3&&A&&Object.defineProperty(x,S,A),A},d=this&&this.__param||function(E,x){return function(S,_){x(S,_,E)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const u=c(4725),b=c(9806);let w=a.MouseService=class{constructor(E,x){this._renderService=E,this._charSizeService=x}getCoords(E,x,S,_,g){return(0,b.getCoords)(window,E,x,S,_,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,g)}getMouseReportCoords(E,x){const S=(0,b.getCoordsRelativeToElement)(window,E,x);if(this._charSizeService.hasValidSize)return S[0]=Math.min(Math.max(S[0],0),this._renderService.dimensions.css.canvas.width-1),S[1]=Math.min(Math.max(S[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(S[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(S[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(S[0]),y:Math.floor(S[1])}}};a.MouseService=w=h([d(0,u.IRenderService),d(1,u.ICharSizeService)],w)},3230:function(f,a,c){var h=this&&this.__decorate||function(g,y,A,M){var D,T=arguments.length,k=T<3?y:M===null?M=Object.getOwnPropertyDescriptor(y,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(g,y,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(k=(T<3?D(k):T>3?D(y,A,k):D(y,A))||k);return T>3&&k&&Object.defineProperty(y,A,k),k},d=this&&this.__param||function(g,y){return function(A,M){y(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const u=c(6193),b=c(4725),w=c(8460),E=c(844),x=c(7226),S=c(2585);let _=a.RenderService=class extends E.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(g,y,A,M,D,T,k,R){super(),this._rowCount=g,this._charSizeService=M,this._renderer=this.register(new E.MutableDisposable),this._pausedResizeTask=new x.DebouncedIdleTask,this._observerDisposable=this.register(new E.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new w.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new w.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new w.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new w.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new u.RenderDebouncer(((N,I)=>this._renderRows(N,I)),k),this.register(this._renderDebouncer),this.register(k.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(T.onResize((()=>this._fullRefresh()))),this.register(T.buffers.onBufferActivate((()=>{var N;return(N=this._renderer.value)==null?void 0:N.clear()}))),this.register(A.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(D.onDecorationRegistered((()=>this._fullRefresh()))),this.register(D.onDecorationRemoved((()=>this._fullRefresh()))),this.register(A.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(T.cols,T.rows),this._fullRefresh()}))),this.register(A.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(T.buffer.y,T.buffer.y,!0)))),this.register(R.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(k.window,y),this.register(k.onWindowChange((N=>this._registerIntersectionObserver(N,y))))}_registerIntersectionObserver(g,y){if("IntersectionObserver"in g){const A=new g.IntersectionObserver((M=>this._handleIntersectionChange(M[M.length-1])),{threshold:0});A.observe(y),this._observerDisposable.value=(0,E.toDisposable)((()=>A.disconnect()))}}_handleIntersectionChange(g){this._isPaused=g.isIntersecting===void 0?g.intersectionRatio===0:!g.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(g,y,A=!1){this._isPaused?this._needsFullRefresh=!0:(A||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(g,y,this._rowCount))}_renderRows(g,y){this._renderer.value&&(g=Math.min(g,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(g,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:g,end:y}),this._onRender.fire({start:g,end:y}),this._isNextRenderRedrawOnly=!0)}resize(g,y){this._rowCount=y,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(g){this._renderer.value=g,this._renderer.value&&(this._renderer.value.onRequestRedraw((y=>this.refreshRows(y.start,y.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(g){return this._renderDebouncer.addRefreshCallback(g)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var g,y;this._renderer.value&&((y=(g=this._renderer.value).clearTextureAtlas)==null||y.call(g),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(g,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var A;return(A=this._renderer.value)==null?void 0:A.handleResize(g,y)})):this._renderer.value.handleResize(g,y),this._fullRefresh())}handleCharSizeChanged(){var g;(g=this._renderer.value)==null||g.handleCharSizeChanged()}handleBlur(){var g;(g=this._renderer.value)==null||g.handleBlur()}handleFocus(){var g;(g=this._renderer.value)==null||g.handleFocus()}handleSelectionChanged(g,y,A){var M;this._selectionState.start=g,this._selectionState.end=y,this._selectionState.columnSelectMode=A,(M=this._renderer.value)==null||M.handleSelectionChanged(g,y,A)}handleCursorMove(){var g;(g=this._renderer.value)==null||g.handleCursorMove()}clear(){var g;(g=this._renderer.value)==null||g.clear()}};a.RenderService=_=h([d(2,S.IOptionsService),d(3,b.ICharSizeService),d(4,S.IDecorationService),d(5,S.IBufferService),d(6,b.ICoreBrowserService),d(7,b.IThemeService)],_)},9312:function(f,a,c){var h=this&&this.__decorate||function(k,R,N,I){var P,F=arguments.length,K=F<3?R:I===null?I=Object.getOwnPropertyDescriptor(R,N):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")K=Reflect.decorate(k,R,N,I);else for(var W=k.length-1;W>=0;W--)(P=k[W])&&(K=(F<3?P(K):F>3?P(R,N,K):P(R,N))||K);return F>3&&K&&Object.defineProperty(R,N,K),K},d=this&&this.__param||function(k,R){return function(N,I){R(N,I,k)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const u=c(9806),b=c(9504),w=c(456),E=c(4725),x=c(8460),S=c(844),_=c(6114),g=c(4841),y=c(511),A=c(2585),M=" ",D=new RegExp(M,"g");let T=a.SelectionService=class extends S.Disposable{constructor(k,R,N,I,P,F,K,W,G){super(),this._element=k,this._screenElement=R,this._linkifier=N,this._bufferService=I,this._coreService=P,this._mouseService=F,this._optionsService=K,this._renderService=W,this._coreBrowserService=G,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new x.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new x.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new x.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new x.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=$=>this._handleMouseMove($),this._mouseUpListener=$=>this._handleMouseUp($),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim(($=>this._handleTrim($))),this.register(this._bufferService.buffers.onBufferActivate(($=>this._handleBufferActivate($)))),this.enable(),this._model=new w.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,S.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 k=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!k||!R||k[0]===R[0]&&k[1]===R[1])}get selectionText(){const k=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;if(!k||!R)return"";const N=this._bufferService.buffer,I=[];if(this._activeSelectionMode===3){if(k[0]===R[0])return"";const P=k[0]<R[0]?k[0]:R[0],F=k[0]<R[0]?R[0]:k[0];for(let K=k[1];K<=R[1];K++){const W=N.translateBufferLineToString(K,!0,P,F);I.push(W)}}else{const P=k[1]===R[1]?R[0]:void 0;I.push(N.translateBufferLineToString(k[1],!0,k[0],P));for(let F=k[1]+1;F<=R[1]-1;F++){const K=N.lines.get(F),W=N.translateBufferLineToString(F,!0);K!=null&&K.isWrapped?I[I.length-1]+=W:I.push(W)}if(k[1]!==R[1]){const F=N.lines.get(R[1]),K=N.translateBufferLineToString(R[1],!0,0,R[0]);F&&F.isWrapped?I[I.length-1]+=K:I.push(K)}}return I.map((P=>P.replace(D," "))).join(_.isWindows?`\r
|
|
55
|
+
WARNING: This link could potentially be dangerous`)){const S=window.open();if(S){try{S.opener=null}catch{}S.location.href=b}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=C=h([m(0,_.IBufferService),m(1,_.IOptionsService),m(2,_.IOscLinkService)],C)},6193:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.RenderDebouncer=class{constructor(c,h){this._renderCallback=c,this._coreBrowserService=h,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(c,h,m){this._rowCount=m,c=c!==void 0?c:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h,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 c=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,h),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const h=c(3614),m=c(3656),u=c(3551),_=c(9042),C=c(3730),E=c(1680),x=c(3107),b=c(5744),S=c(2950),g=c(1296),y=c(428),A=c(4269),M=c(5114),D=c(8934),T=c(3230),k=c(9312),R=c(4725),N=c(6731),I=c(8055),P=c(8969),F=c(8460),K=c(844),W=c(6114),V=c(8437),$=c(2584),J=c(7399),H=c(5941),B=c(9074),z=c(2585),G=c(5435),j=c(4567),te=c(779);class he extends P.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(Y={}){super(Y),this.browser=W,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new K.MutableDisposable),this._onCursorMove=this.register(new F.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new F.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new F.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new F.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new F.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new F.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new F.EventEmitter),this._onBlur=this.register(new F.EventEmitter),this._onA11yCharEmitter=this.register(new F.EventEmitter),this._onA11yTabEmitter=this.register(new F.EventEmitter),this._onWillOpen=this.register(new F.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(B.DecorationService),this._instantiationService.setService(z.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(te.LinkProviderService),this._instantiationService.setService(R.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(C.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((q,oe)=>this.refresh(q,oe)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((q=>this._reportWindowsOptions(q)))),this.register(this._inputHandler.onColor((q=>this._handleColorEvent(q)))),this.register((0,F.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,F.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((q=>this._afterResize(q.cols,q.rows)))),this.register((0,K.toDisposable)((()=>{var q,oe;this._customKeyEventHandler=void 0,(oe=(q=this.element)==null?void 0:q.parentNode)==null||oe.removeChild(this.element)})))}_handleColorEvent(Y){if(this._themeService)for(const q of Y){let oe,Z="";switch(q.index){case 256:oe="foreground",Z="10";break;case 257:oe="background",Z="11";break;case 258:oe="cursor",Z="12";break;default:oe="ansi",Z="4;"+q.index}switch(q.type){case 0:const ie=I.color.toColorRGB(oe==="ansi"?this._themeService.colors.ansi[q.index]:this._themeService.colors[oe]);this.coreService.triggerDataEvent(`${$.C0.ESC}]${Z};${(0,H.toRgbString)(ie)}${$.C1_ESCAPED.ST}`);break;case 1:if(oe==="ansi")this._themeService.modifyColors((de=>de.ansi[q.index]=I.channels.toColor(...q.color)));else{const de=oe;this._themeService.modifyColors((Ce=>Ce[de]=I.channels.toColor(...q.color)))}break;case 2:this._themeService.restoreColor(q.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(Y){Y?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(j.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(Y){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent($.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var Y;return(Y=this.textarea)==null?void 0:Y.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent($.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 Y=this.buffer.ybase+this.buffer.y,q=this.buffer.lines.get(Y);if(!q)return;const oe=Math.min(this.buffer.x,this.cols-1),Z=this._renderService.dimensions.css.cell.height,ie=q.getWidth(oe),de=this._renderService.dimensions.css.cell.width*ie,Ce=this.buffer.y*this._renderService.dimensions.css.cell.height,we=oe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=we+"px",this.textarea.style.top=Ce+"px",this.textarea.style.width=de+"px",this.textarea.style.height=Z+"px",this.textarea.style.lineHeight=Z+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,m.addDisposableDomListener)(this.element,"copy",(q=>{this.hasSelection()&&(0,h.copyHandler)(q,this._selectionService)})));const Y=q=>(0,h.handlePasteEvent)(q,this.textarea,this.coreService,this.optionsService);this.register((0,m.addDisposableDomListener)(this.textarea,"paste",Y)),this.register((0,m.addDisposableDomListener)(this.element,"paste",Y)),W.isFirefox?this.register((0,m.addDisposableDomListener)(this.element,"mousedown",(q=>{q.button===2&&(0,h.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,m.addDisposableDomListener)(this.element,"contextmenu",(q=>{(0,h.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),W.isLinux&&this.register((0,m.addDisposableDomListener)(this.element,"auxclick",(q=>{q.button===1&&(0,h.moveTextAreaUnderMouseCursor)(q,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,m.addDisposableDomListener)(this.textarea,"keyup",(Y=>this._keyUp(Y)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keydown",(Y=>this._keyDown(Y)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keypress",(Y=>this._keyPress(Y)),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionupdate",(Y=>this._compositionHelper.compositionupdate(Y)))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,m.addDisposableDomListener)(this.textarea,"input",(Y=>this._inputEvent(Y)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(Y){var oe;if(!Y)throw new Error("Terminal requires a parent element.");if(Y.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((oe=this.element)==null?void 0:oe.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=Y.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"),Y.appendChild(this.element);const q=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),q.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,m.addDisposableDomListener)(this.screenElement,"mousemove",(Z=>this.updateCursorStyle(Z)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),q.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",_.promptLabel),W.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(M.CoreBrowserService,this.textarea,Y.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",(Z=>this._handleTextAreaFocus(Z)))),this.register((0,m.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(R.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(N.ThemeService),this._instantiationService.setService(R.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(A.CharacterJoinerService),this._instantiationService.setService(R.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(T.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(R.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((Z=>this._onRender.fire(Z)))),this.onResize((Z=>this._renderService.resize(Z.cols,Z.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(S.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(D.MouseService),this._instantiationService.setService(R.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(u.Linkifier,this.screenElement)),this.element.appendChild(q);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(E.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((Z=>this.scrollLines(Z.amount,Z.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(k.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(R.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((Z=>this.scrollLines(Z.amount,Z.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((Z=>this._renderService.handleSelectionChanged(Z.start,Z.end,Z.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((Z=>{this.textarea.value=Z,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((Z=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,m.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(x.BufferDecorationRenderer,this.screenElement)),this.register((0,m.addDisposableDomListener)(this.element,"mousedown",(Z=>this._selectionService.handleMouseDown(Z)))),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(j.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(Z=>this._handleScreenReaderModeOptionChange(Z)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(b.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(Z=>{!this._overviewRulerRenderer&&Z&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(b.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(g.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const Y=this,q=this.element;function oe(de){const Ce=Y._mouseService.getMouseReportCoords(de,Y.screenElement);if(!Ce)return!1;let we,$e;switch(de.overrideType||de.type){case"mousemove":$e=32,de.buttons===void 0?(we=3,de.button!==void 0&&(we=de.button<3?de.button:3)):we=1&de.buttons?0:4&de.buttons?1:2&de.buttons?2:3;break;case"mouseup":$e=0,we=de.button<3?de.button:3;break;case"mousedown":$e=1,we=de.button<3?de.button:3;break;case"wheel":if(Y._customWheelEventHandler&&Y._customWheelEventHandler(de)===!1||Y.viewport.getLinesScrolled(de)===0)return!1;$e=de.deltaY<0?0:1,we=4;break;default:return!1}return!($e===void 0||we===void 0||we>4)&&Y.coreMouseService.triggerMouseEvent({col:Ce.col,row:Ce.row,x:Ce.x,y:Ce.y,button:we,action:$e,ctrl:de.ctrlKey,alt:de.altKey,shift:de.shiftKey})}const Z={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ie={mouseup:de=>(oe(de),de.buttons||(this._document.removeEventListener("mouseup",Z.mouseup),Z.mousedrag&&this._document.removeEventListener("mousemove",Z.mousedrag)),this.cancel(de)),wheel:de=>(oe(de),this.cancel(de,!0)),mousedrag:de=>{de.buttons&&oe(de)},mousemove:de=>{de.buttons||oe(de)}};this.register(this.coreMouseService.onProtocolChange((de=>{de?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(de)),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&de?Z.mousemove||(q.addEventListener("mousemove",ie.mousemove),Z.mousemove=ie.mousemove):(q.removeEventListener("mousemove",Z.mousemove),Z.mousemove=null),16&de?Z.wheel||(q.addEventListener("wheel",ie.wheel,{passive:!1}),Z.wheel=ie.wheel):(q.removeEventListener("wheel",Z.wheel),Z.wheel=null),2&de?Z.mouseup||(Z.mouseup=ie.mouseup):(this._document.removeEventListener("mouseup",Z.mouseup),Z.mouseup=null),4&de?Z.mousedrag||(Z.mousedrag=ie.mousedrag):(this._document.removeEventListener("mousemove",Z.mousedrag),Z.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,m.addDisposableDomListener)(q,"mousedown",(de=>{if(de.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(de))return oe(de),Z.mouseup&&this._document.addEventListener("mouseup",Z.mouseup),Z.mousedrag&&this._document.addEventListener("mousemove",Z.mousedrag),this.cancel(de)}))),this.register((0,m.addDisposableDomListener)(q,"wheel",(de=>{if(!Z.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(de)===!1)return!1;if(!this.buffer.hasScrollback){const Ce=this.viewport.getLinesScrolled(de);if(Ce===0)return;const we=$.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(de.deltaY<0?"A":"B");let $e="";for(let at=0;at<Math.abs(Ce);at++)$e+=we;return this.coreService.triggerDataEvent($e,!0),this.cancel(de,!0)}return this.viewport.handleWheel(de)?this.cancel(de):void 0}}),{passive:!1})),this.register((0,m.addDisposableDomListener)(q,"touchstart",(de=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(de),this.cancel(de)}),{passive:!0})),this.register((0,m.addDisposableDomListener)(q,"touchmove",(de=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(de)?void 0:this.cancel(de)}),{passive:!1}))}refresh(Y,q){var oe;(oe=this._renderService)==null||oe.refreshRows(Y,q)}updateCursorStyle(Y){var q;(q=this._selectionService)!=null&&q.shouldColumnSelect(Y)?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(Y,q,oe=0){var Z;oe===1?(super.scrollLines(Y,q,oe),this.refresh(0,this.rows-1)):(Z=this.viewport)==null||Z.scrollLines(Y)}paste(Y){(0,h.paste)(Y,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(Y){this._customKeyEventHandler=Y}attachCustomWheelEventHandler(Y){this._customWheelEventHandler=Y}registerLinkProvider(Y){return this._linkProviderService.registerLinkProvider(Y)}registerCharacterJoiner(Y){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const q=this._characterJoinerService.register(Y);return this.refresh(0,this.rows-1),q}deregisterCharacterJoiner(Y){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(Y)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(Y){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+Y)}registerDecoration(Y){return this._decorationService.registerDecoration(Y)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(Y,q,oe){this._selectionService.setSelection(Y,q,oe)}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 Y;(Y=this._selectionService)==null||Y.clearSelection()}selectAll(){var Y;(Y=this._selectionService)==null||Y.selectAll()}selectLines(Y,q){var oe;(oe=this._selectionService)==null||oe.selectLines(Y,q)}_keyDown(Y){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1)return!1;const q=this.browser.isMac&&this.options.macOptionIsMeta&&Y.altKey;if(!q&&!this._compositionHelper.keydown(Y))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;q||Y.key!=="Dead"&&Y.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const oe=(0,J.evaluateKeyboardEvent)(Y,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(Y),oe.type===3||oe.type===2){const Z=this.rows-1;return this.scrollLines(oe.type===2?-Z:Z),this.cancel(Y,!0)}return oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,Y)||(oe.cancel&&this.cancel(Y,!0),!oe.key||!!(Y.key&&!Y.ctrlKey&&!Y.altKey&&!Y.metaKey&&Y.key.length===1&&Y.key.charCodeAt(0)>=65&&Y.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(oe.key!==$.C0.ETX&&oe.key!==$.C0.CR||(this.textarea.value=""),this._onKey.fire({key:oe.key,domEvent:Y}),this._showCursor(),this.coreService.triggerDataEvent(oe.key,!0),!this.optionsService.rawOptions.screenReaderMode||Y.altKey||Y.ctrlKey?this.cancel(Y,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(Y,q){const oe=Y.isMac&&!this.options.macOptionIsMeta&&q.altKey&&!q.ctrlKey&&!q.metaKey||Y.isWindows&&q.altKey&&q.ctrlKey&&!q.metaKey||Y.isWindows&&q.getModifierState("AltGraph");return q.type==="keypress"?oe:oe&&(!q.keyCode||q.keyCode>47)}_keyUp(Y){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1||((function(q){return q.keyCode===16||q.keyCode===17||q.keyCode===18})(Y)||this.focus(),this.updateCursorStyle(Y),this._keyPressHandled=!1)}_keyPress(Y){let q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1)return!1;if(this.cancel(Y),Y.charCode)q=Y.charCode;else if(Y.which===null||Y.which===void 0)q=Y.keyCode;else{if(Y.which===0||Y.charCode===0)return!1;q=Y.which}return!(!q||(Y.altKey||Y.ctrlKey||Y.metaKey)&&!this._isThirdLevelShift(this.browser,Y)||(q=String.fromCharCode(q),this._onKey.fire({key:q,domEvent:Y}),this._showCursor(),this.coreService.triggerDataEvent(q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(Y){if(Y.data&&Y.inputType==="insertText"&&(!Y.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const q=Y.data;return this.coreService.triggerDataEvent(q,!0),this.cancel(Y),!0}return!1}resize(Y,q){Y!==this.cols||q!==this.rows?super.resize(Y,q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(Y,q){var oe,Z;(oe=this._charSizeService)==null||oe.measure(),(Z=this.viewport)==null||Z.syncScrollArea(!0)}clear(){var Y;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let q=1;q<this.rows;q++)this.buffer.lines.push(this.buffer.getBlankLine(V.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(Y=this.viewport)==null||Y.reset(),this.refresh(0,this.rows-1)}}reset(){var q,oe;this.options.rows=this.rows,this.options.cols=this.cols;const Y=this._customKeyEventHandler;this._setup(),super.reset(),(q=this._selectionService)==null||q.reset(),this._decorationService.reset(),(oe=this.viewport)==null||oe.reset(),this._customKeyEventHandler=Y,this.refresh(0,this.rows-1)}clearTextureAtlas(){var Y;(Y=this._renderService)==null||Y.clearTextureAtlas()}_reportFocus(){var Y;(Y=this.element)!=null&&Y.classList.contains("focus")?this.coreService.triggerDataEvent($.C0.ESC+"[I"):this.coreService.triggerDataEvent($.C0.ESC+"[O")}_reportWindowsOptions(Y){if(this._renderService)switch(Y){case G.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const q=this._renderService.dimensions.css.canvas.width.toFixed(0),oe=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${$.C0.ESC}[4;${oe};${q}t`);break;case G.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const Z=this._renderService.dimensions.css.cell.width.toFixed(0),ie=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${$.C0.ESC}[6;${ie};${Z}t`)}}cancel(Y,q){if(this.options.cancelEvents||q)return Y.preventDefault(),Y.stopPropagation(),!1}}a.Terminal=he},9924:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.TimeBasedDebouncer=class{constructor(c,h=1e3){this._renderCallback=c,this._debounceThresholdMS=h,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,h,m){this._rowCount=m,c=c!==void 0?c:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h;const u=Date.now();if(u-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=u,this._innerRefresh();else if(!this._additionalRefreshRequested){const _=u-this._lastRefreshMs,C=this._debounceThresholdMS-_;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),C)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,h)}}},1680:function(f,a,c){var h=this&&this.__decorate||function(S,g,y,A){var M,D=arguments.length,T=D<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,y):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(S,g,y,A);else for(var k=S.length-1;k>=0;k--)(M=S[k])&&(T=(D<3?M(T):D>3?M(g,y,T):M(g,y))||T);return D>3&&T&&Object.defineProperty(g,y,T),T},m=this&&this.__param||function(S,g){return function(y,A){g(y,A,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const u=c(3656),_=c(4725),C=c(8460),E=c(844),x=c(2585);let b=a.Viewport=class extends E.Disposable{constructor(S,g,y,A,M,D,T,k){super(),this._viewportElement=S,this._scrollArea=g,this._bufferService=y,this._optionsService=A,this._charSizeService=M,this._renderService=D,this._coreBrowserService=T,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 C.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(k.colors),this.register(k.onChangeColors((R=>this._handleThemeChange(R)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(S){this._viewportElement.style.backgroundColor=S.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(S){if(S)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 g=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==g&&(this._lastRecordedBufferHeight=g,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const S=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==S&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=S),this._refreshAnimationFrame=null}syncScrollArea(S=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(S);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(S)}_handleScroll(S){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 g=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:g,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const S=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(S*(this._smoothScrollState.target-this._smoothScrollState.origin)),S<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(S,g){const y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(g<0&&this._viewportElement.scrollTop!==0||g>0&&y<this._lastRecordedBufferHeight)||(S.cancelable&&S.preventDefault(),!1)}handleWheel(S){const g=this._getPixelsScrolled(S);return g!==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+g:this._smoothScrollState.target+=g,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=g,this._bubbleScroll(S,g))}scrollLines(S){if(S!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const g=S*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+g,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:S,suppressScrollEvent:!1})}_getPixelsScrolled(S){if(S.deltaY===0||S.shiftKey)return 0;let g=this._applyScrollModifier(S.deltaY,S);return S.deltaMode===WheelEvent.DOM_DELTA_LINE?g*=this._currentRowHeight:S.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(g*=this._currentRowHeight*this._bufferService.rows),g}getBufferElements(S,g){var k;let y,A="";const M=[],D=g??this._bufferService.buffer.lines.length,T=this._bufferService.buffer.lines;for(let R=S;R<D;R++){const N=T.get(R);if(!N)continue;const I=(k=T.get(R+1))==null?void 0:k.isWrapped;if(A+=N.translateToString(!I),!I||R===T.length-1){const P=document.createElement("div");P.textContent=A,M.push(P),A.length>0&&(y=P),A=""}}return{bufferElements:M,cursorElement:y}}getLinesScrolled(S){if(S.deltaY===0||S.shiftKey)return 0;let g=this._applyScrollModifier(S.deltaY,S);return S.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(g/=this._currentRowHeight+0,this._wheelPartialScroll+=g,g=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):S.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(g*=this._bufferService.rows),g}_applyScrollModifier(S,g){const y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&g.altKey||y==="ctrl"&&g.ctrlKey||y==="shift"&&g.shiftKey?S*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:S*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(S){this._lastTouchY=S.touches[0].pageY}handleTouchMove(S){const g=this._lastTouchY-S.touches[0].pageY;return this._lastTouchY=S.touches[0].pageY,g!==0&&(this._viewportElement.scrollTop+=g,this._bubbleScroll(S,g))}};a.Viewport=b=h([m(2,x.IBufferService),m(3,x.IOptionsService),m(4,_.ICharSizeService),m(5,_.IRenderService),m(6,_.ICoreBrowserService),m(7,_.IThemeService)],b)},3107:function(f,a,c){var h=this&&this.__decorate||function(x,b,S,g){var y,A=arguments.length,M=A<3?b:g===null?g=Object.getOwnPropertyDescriptor(b,S):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,b,S,g);else for(var D=x.length-1;D>=0;D--)(y=x[D])&&(M=(A<3?y(M):A>3?y(b,S,M):y(b,S))||M);return A>3&&M&&Object.defineProperty(b,S,M),M},m=this&&this.__param||function(x,b){return function(S,g){b(S,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const u=c(4725),_=c(844),C=c(2585);let E=a.BufferDecorationRenderer=class extends _.Disposable{constructor(x,b,S,g,y){super(),this._screenElement=x,this._bufferService=b,this._coreBrowserService=S,this._decorationService=g,this._renderService=y,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((A=>this._removeDecoration(A)))),this.register((0,_.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 x of this._decorationService.decorations)this._renderDecoration(x);this._dimensionsChanged=!1}_renderDecoration(x){this._refreshStyle(x),this._dimensionsChanged&&this._refreshXPosition(x)}_createElement(x){var g;const b=this._coreBrowserService.mainDocument.createElement("div");b.classList.add("xterm-decoration"),b.classList.toggle("xterm-decoration-top-layer",((g=x==null?void 0:x.options)==null?void 0:g.layer)==="top"),b.style.width=`${Math.round((x.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,b.style.height=(x.options.height||1)*this._renderService.dimensions.css.cell.height+"px",b.style.top=(x.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",b.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const S=x.options.x??0;return S&&S>this._bufferService.cols&&(b.style.display="none"),this._refreshXPosition(x,b),b}_refreshStyle(x){const b=x.marker.line-this._bufferService.buffers.active.ydisp;if(b<0||b>=this._bufferService.rows)x.element&&(x.element.style.display="none",x.onRenderEmitter.fire(x.element));else{let S=this._decorationElements.get(x);S||(S=this._createElement(x),x.element=S,this._decorationElements.set(x,S),this._container.appendChild(S),x.onDispose((()=>{this._decorationElements.delete(x),S.remove()}))),S.style.top=b*this._renderService.dimensions.css.cell.height+"px",S.style.display=this._altBufferIsActive?"none":"block",x.onRenderEmitter.fire(S)}}_refreshXPosition(x,b=x.element){if(!b)return;const S=x.options.x??0;(x.options.anchor||"left")==="right"?b.style.right=S?S*this._renderService.dimensions.css.cell.width+"px":"":b.style.left=S?S*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(x){var b;(b=this._decorationElements.get(x))==null||b.remove(),this._decorationElements.delete(x),x.dispose()}};a.BufferDecorationRenderer=E=h([m(1,C.IBufferService),m(2,u.ICoreBrowserService),m(3,C.IDecorationService),m(4,u.IRenderService)],E)},5871:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorZoneStore=void 0,a.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(c){if(c.options.overviewRulerOptions){for(const h of this._zones)if(h.color===c.options.overviewRulerOptions.color&&h.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(h,c.marker.line))return;if(this._lineAdjacentToZone(h,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(h,c.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=c.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=c.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=c.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=c.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:c.options.overviewRulerOptions.color,position:c.options.overviewRulerOptions.position,startBufferLine:c.marker.line,endBufferLine:c.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(c){this._linePadding=c}_lineIntersectsZone(c,h){return h>=c.startBufferLine&&h<=c.endBufferLine}_lineAdjacentToZone(c,h,m){return h>=c.startBufferLine-this._linePadding[m||"full"]&&h<=c.endBufferLine+this._linePadding[m||"full"]}_addLineToZone(c,h){c.startBufferLine=Math.min(c.startBufferLine,h),c.endBufferLine=Math.max(c.endBufferLine,h)}}},5744:function(f,a,c){var h=this&&this.__decorate||function(y,A,M,D){var T,k=arguments.length,R=k<3?A:D===null?D=Object.getOwnPropertyDescriptor(A,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(y,A,M,D);else for(var N=y.length-1;N>=0;N--)(T=y[N])&&(R=(k<3?T(R):k>3?T(A,M,R):T(A,M))||R);return k>3&&R&&Object.defineProperty(A,M,R),R},m=this&&this.__param||function(y,A){return function(M,D){A(M,D,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const u=c(5871),_=c(4725),C=c(844),E=c(2585),x={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0},S={full:0,left:0,center:0,right:0};let g=a.OverviewRulerRenderer=class extends C.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,A,M,D,T,k,R){var I;super(),this._viewportElement=y,this._screenElement=A,this._bufferService=M,this._decorationService=D,this._renderService=T,this._optionsService=k,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(),(I=this._viewportElement.parentElement)==null||I.insertBefore(this._canvas,this._viewportElement);const N=this._canvas.getContext("2d");if(!N)throw new Error("Ctx cannot be null");this._ctx=N,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,C.toDisposable)((()=>{var P;(P=this._canvas)==null||P.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 y=Math.floor(this._canvas.width/3),A=Math.ceil(this._canvas.width/3);b.full=this._canvas.width,b.left=y,b.center=A,b.right=y,this._refreshDrawHeightConstants(),S.full=0,S.left=0,S.center=b.left,S.right=b.left+b.center}_refreshDrawHeightConstants(){x.full=Math.round(2*this._coreBrowserService.dpr);const y=this._canvas.height/this._bufferService.buffer.lines.length,A=Math.round(Math.max(Math.min(y,12),6)*this._coreBrowserService.dpr);x.left=A,x.center=A,x.right=A}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*x.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 A of this._decorationService.decorations)this._colorZoneStore.addDecoration(A);this._ctx.lineWidth=1;const y=this._colorZoneStore.zones;for(const A of y)A.position!=="full"&&this._renderColorZone(A);for(const A of y)A.position==="full"&&this._renderColorZone(A);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(y){this._ctx.fillStyle=y.color,this._ctx.fillRect(S[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-x[y.position||"full"]/2),b[y.position||"full"],Math.round((this._canvas.height-1)*((y.endBufferLine-y.startBufferLine)/this._bufferService.buffers.active.lines.length)+x[y.position||"full"]))}_queueRefresh(y,A){this._shouldUpdateDimensions=y||this._shouldUpdateDimensions,this._shouldUpdateAnchor=A||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};a.OverviewRulerRenderer=g=h([m(2,E.IBufferService),m(3,E.IDecorationService),m(4,_.IRenderService),m(5,E.IOptionsService),m(6,_.ICoreBrowserService)],g)},2950:function(f,a,c){var h=this&&this.__decorate||function(x,b,S,g){var y,A=arguments.length,M=A<3?b:g===null?g=Object.getOwnPropertyDescriptor(b,S):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,b,S,g);else for(var D=x.length-1;D>=0;D--)(y=x[D])&&(M=(A<3?y(M):A>3?y(b,S,M):y(b,S))||M);return A>3&&M&&Object.defineProperty(b,S,M),M},m=this&&this.__param||function(x,b){return function(S,g){b(S,g,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const u=c(4725),_=c(2585),C=c(2584);let E=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(x,b,S,g,y,A){this._textarea=x,this._compositionView=b,this._bufferService=S,this._optionsService=g,this._coreService=y,this._renderService=A,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(x){this._compositionView.textContent=x.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(x){if(this._isComposing||this._isSendingComposition){if(x.keyCode===229||x.keyCode===16||x.keyCode===17||x.keyCode===18)return!1;this._finalizeComposition(!1)}return x.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(x){if(this._compositionView.classList.remove("active"),this._isComposing=!1,x){const b={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let S;this._isSendingComposition=!1,b.start+=this._dataAlreadySent.length,S=this._isComposing?this._textarea.value.substring(b.start,b.end):this._textarea.value.substring(b.start),S.length>0&&this._coreService.triggerDataEvent(S,!0)}}),0)}else{this._isSendingComposition=!1;const b=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(b,!0)}}_handleAnyTextareaChanges(){const x=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const b=this._textarea.value,S=b.replace(x,"");this._dataAlreadySent=S,b.length>x.length?this._coreService.triggerDataEvent(S,!0):b.length<x.length?this._coreService.triggerDataEvent(`${C.C0.DEL}`,!0):b.length===x.length&&b!==x&&this._coreService.triggerDataEvent(b,!0)}}),0)}updateCompositionElements(x){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const b=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),S=this._renderService.dimensions.css.cell.height,g=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,y=b*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=y+"px",this._compositionView.style.top=g+"px",this._compositionView.style.height=S+"px",this._compositionView.style.lineHeight=S+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const A=this._compositionView.getBoundingClientRect();this._textarea.style.left=y+"px",this._textarea.style.top=g+"px",this._textarea.style.width=Math.max(A.width,1)+"px",this._textarea.style.height=Math.max(A.height,1)+"px",this._textarea.style.lineHeight=A.height+"px"}x||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};a.CompositionHelper=E=h([m(2,_.IBufferService),m(3,_.IOptionsService),m(4,_.ICoreService),m(5,u.IRenderService)],E)},9806:(f,a)=>{function c(h,m,u){const _=u.getBoundingClientRect(),C=h.getComputedStyle(u),E=parseInt(C.getPropertyValue("padding-left")),x=parseInt(C.getPropertyValue("padding-top"));return[m.clientX-_.left-E,m.clientY-_.top-x]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=c,a.getCoords=function(h,m,u,_,C,E,x,b,S){if(!E)return;const g=c(h,m,u);return g?(g[0]=Math.ceil((g[0]+(S?x/2:0))/x),g[1]=Math.ceil(g[1]/b),g[0]=Math.min(Math.max(g[0],1),_+(S?1:0)),g[1]=Math.min(Math.max(g[1],1),C),g):void 0}},9504:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const h=c(2584);function m(b,S,g,y){const A=b-u(b,g),M=S-u(S,g),D=Math.abs(A-M)-(function(T,k,R){let N=0;const I=T-u(T,R),P=k-u(k,R);for(let F=0;F<Math.abs(I-P);F++){const K=_(T,k)==="A"?-1:1,W=R.buffer.lines.get(I+K*F);W!=null&&W.isWrapped&&N++}return N})(b,S,g);return x(D,E(_(b,S),y))}function u(b,S){let g=0,y=S.buffer.lines.get(b),A=y==null?void 0:y.isWrapped;for(;A&&b>=0&&b<S.rows;)g++,y=S.buffer.lines.get(--b),A=y==null?void 0:y.isWrapped;return g}function _(b,S){return b>S?"A":"B"}function C(b,S,g,y,A,M){let D=b,T=S,k="";for(;D!==g||T!==y;)D+=A?1:-1,A&&D>M.cols-1?(k+=M.buffer.translateBufferLineToString(T,!1,b,D),D=0,b=0,T++):!A&&D<0&&(k+=M.buffer.translateBufferLineToString(T,!1,0,b+1),D=M.cols-1,b=D,T--);return k+M.buffer.translateBufferLineToString(T,!1,b,D)}function E(b,S){const g=S?"O":"[";return h.C0.ESC+g+b}function x(b,S){b=Math.floor(b);let g="";for(let y=0;y<b;y++)g+=S;return g}a.moveToCellSequence=function(b,S,g,y){const A=g.buffer.x,M=g.buffer.y;if(!g.buffer.hasScrollback)return(function(k,R,N,I,P,F){return m(R,I,P,F).length===0?"":x(C(k,R,k,R-u(R,P),!1,P).length,E("D",F))})(A,M,0,S,g,y)+m(M,S,g,y)+(function(k,R,N,I,P,F){let K;K=m(R,I,P,F).length>0?I-u(I,P):R;const W=I,V=(function($,J,H,B,z,G){let j;return j=m(H,B,z,G).length>0?B-u(B,z):J,$<H&&j<=B||$>=H&&j<B?"C":"D"})(k,R,N,I,P,F);return x(C(k,K,N,W,V==="C",P).length,E(V,F))})(A,M,b,S,g,y);let D;if(M===S)return D=A>b?"D":"C",x(Math.abs(A-b),E(D,y));D=M>S?"D":"C";const T=Math.abs(M-S);return x((function(k,R){return R.cols-k})(M>S?b:A,g)+(T-1)*g.cols+1+((M>S?A:b)-1),E(D,y))}},1296:function(f,a,c){var h=this&&this.__decorate||function(F,K,W,V){var $,J=arguments.length,H=J<3?K:V===null?V=Object.getOwnPropertyDescriptor(K,W):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(F,K,W,V);else for(var B=F.length-1;B>=0;B--)($=F[B])&&(H=(J<3?$(H):J>3?$(K,W,H):$(K,W))||H);return J>3&&H&&Object.defineProperty(K,W,H),H},m=this&&this.__param||function(F,K){return function(W,V){K(W,V,F)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const u=c(3787),_=c(2550),C=c(2223),E=c(6171),x=c(6052),b=c(4725),S=c(8055),g=c(8460),y=c(844),A=c(2585),M="xterm-dom-renderer-owner-",D="xterm-rows",T="xterm-fg-",k="xterm-bg-",R="xterm-focus",N="xterm-selection";let I=1,P=a.DomRenderer=class extends y.Disposable{constructor(F,K,W,V,$,J,H,B,z,G,j,te,he){super(),this._terminal=F,this._document=K,this._element=W,this._screenElement=V,this._viewportElement=$,this._helperContainer=J,this._linkifier2=H,this._charSizeService=z,this._optionsService=G,this._bufferService=j,this._coreBrowserService=te,this._themeService=he,this._terminalClass=I++,this._rowElements=[],this._selectionRenderModel=(0,x.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new g.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(D),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(N),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,E.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((me=>this._injectCss(me)))),this._injectCss(this._themeService.colors),this._rowFactory=B.createInstance(u.DomRendererRowFactory,document),this._element.classList.add(M+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((me=>this._handleLinkHover(me)))),this.register(this._linkifier2.onHideLinkUnderline((me=>this._handleLinkLeave(me)))),this.register((0,y.toDisposable)((()=>{this._element.classList.remove(M+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new _.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 F=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*F,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*F),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/F),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/F),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const W of this._rowElements)W.style.width=`${this.dimensions.css.canvas.width}px`,W.style.height=`${this.dimensions.css.cell.height}px`,W.style.lineHeight=`${this.dimensions.css.cell.height}px`,W.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const K=`${this._terminalSelector} .${D} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=K,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(F){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let K=`${this._terminalSelector} .${D} { color: ${F.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;K+=`${this._terminalSelector} .${D} .xterm-dim { color: ${S.color.multiplyOpacity(F.foreground,.5).css};}`,K+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const W=`blink_underline_${this._terminalClass}`,V=`blink_bar_${this._terminalClass}`,$=`blink_block_${this._terminalClass}`;K+=`@keyframes ${W} { 50% { border-bottom-style: hidden; }}`,K+=`@keyframes ${V} { 50% { box-shadow: none; }}`,K+=`@keyframes ${$} { 0% { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css}; } 50% { background-color: inherit; color: ${F.cursor.css}; }}`,K+=`${this._terminalSelector} .${D}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${W} 1s step-end infinite;}${this._terminalSelector} .${D}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${V} 1s step-end infinite;}${this._terminalSelector} .${D}.${R} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${$} 1s step-end infinite;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css};}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${F.cursor.css} !important; color: ${F.cursorAccent.css} !important;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${F.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${F.cursor.css} inset;}${this._terminalSelector} .${D} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${F.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,K+=`${this._terminalSelector} .${N} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${N} div { position: absolute; background-color: ${F.selectionBackgroundOpaque.css};}${this._terminalSelector} .${N} div { position: absolute; background-color: ${F.selectionInactiveBackgroundOpaque.css};}`;for(const[J,H]of F.ansi.entries())K+=`${this._terminalSelector} .${T}${J} { color: ${H.css}; }${this._terminalSelector} .${T}${J}.xterm-dim { color: ${S.color.multiplyOpacity(H,.5).css}; }${this._terminalSelector} .${k}${J} { background-color: ${H.css}; }`;K+=`${this._terminalSelector} .${T}${C.INVERTED_DEFAULT_COLOR} { color: ${S.color.opaque(F.background).css}; }${this._terminalSelector} .${T}${C.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${S.color.multiplyOpacity(S.color.opaque(F.background),.5).css}; }${this._terminalSelector} .${k}${C.INVERTED_DEFAULT_COLOR} { background-color: ${F.foreground.css}; }`,this._themeStyleElement.textContent=K}_setDefaultSpacing(){const F=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${F}px`,this._rowFactory.defaultSpacing=F}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(F,K){for(let W=this._rowElements.length;W<=K;W++){const V=this._document.createElement("div");this._rowContainer.appendChild(V),this._rowElements.push(V)}for(;this._rowElements.length>K;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(F,K){this._refreshRowElements(F,K),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(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(F,K,W){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(F,K,W),this.renderRows(0,this._bufferService.rows-1),!F||!K)return;this._selectionRenderModel.update(this._terminal,F,K,W);const V=this._selectionRenderModel.viewportStartRow,$=this._selectionRenderModel.viewportEndRow,J=this._selectionRenderModel.viewportCappedStartRow,H=this._selectionRenderModel.viewportCappedEndRow;if(J>=this._bufferService.rows||H<0)return;const B=this._document.createDocumentFragment();if(W){const z=F[0]>K[0];B.appendChild(this._createSelectionElement(J,z?K[0]:F[0],z?F[0]:K[0],H-J+1))}else{const z=V===J?F[0]:0,G=J===$?K[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(J,z,G));const j=H-J-1;if(B.appendChild(this._createSelectionElement(J+1,0,this._bufferService.cols,j)),J!==H){const te=$===H?K[0]:this._bufferService.cols;B.appendChild(this._createSelectionElement(H,0,te))}}this._selectionContainer.appendChild(B)}_createSelectionElement(F,K,W,V=1){const $=this._document.createElement("div"),J=K*this.dimensions.css.cell.width;let H=this.dimensions.css.cell.width*(W-K);return J+H>this.dimensions.css.canvas.width&&(H=this.dimensions.css.canvas.width-J),$.style.height=V*this.dimensions.css.cell.height+"px",$.style.top=F*this.dimensions.css.cell.height+"px",$.style.left=`${J}px`,$.style.width=`${H}px`,$}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 F of this._rowElements)F.replaceChildren()}renderRows(F,K){const W=this._bufferService.buffer,V=W.ybase+W.y,$=Math.min(W.x,this._bufferService.cols-1),J=this._optionsService.rawOptions.cursorBlink,H=this._optionsService.rawOptions.cursorStyle,B=this._optionsService.rawOptions.cursorInactiveStyle;for(let z=F;z<=K;z++){const G=z+W.ydisp,j=this._rowElements[z],te=W.lines.get(G);if(!j||!te)break;j.replaceChildren(...this._rowFactory.createRow(te,G,G===V,H,B,$,J,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${M}${this._terminalClass}`}_handleLinkHover(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!0)}_handleLinkLeave(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!1)}_setCellUnderline(F,K,W,V,$,J){W<0&&(F=0),V<0&&(K=0);const H=this._bufferService.rows-1;W=Math.max(Math.min(W,H),0),V=Math.max(Math.min(V,H),0),$=Math.min($,this._bufferService.cols);const B=this._bufferService.buffer,z=B.ybase+B.y,G=Math.min(B.x,$-1),j=this._optionsService.rawOptions.cursorBlink,te=this._optionsService.rawOptions.cursorStyle,he=this._optionsService.rawOptions.cursorInactiveStyle;for(let me=W;me<=V;++me){const Y=me+B.ydisp,q=this._rowElements[me],oe=B.lines.get(Y);if(!q||!oe)break;q.replaceChildren(...this._rowFactory.createRow(oe,Y,Y===z,te,he,G,j,this.dimensions.css.cell.width,this._widthCache,J?me===W?F:0:-1,J?(me===V?K:$)-1:-1))}}};a.DomRenderer=P=h([m(7,A.IInstantiationService),m(8,b.ICharSizeService),m(9,A.IOptionsService),m(10,A.IBufferService),m(11,b.ICoreBrowserService),m(12,b.IThemeService)],P)},3787:function(f,a,c){var h=this&&this.__decorate||function(D,T,k,R){var N,I=arguments.length,P=I<3?T:R===null?R=Object.getOwnPropertyDescriptor(T,k):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(D,T,k,R);else for(var F=D.length-1;F>=0;F--)(N=D[F])&&(P=(I<3?N(P):I>3?N(T,k,P):N(T,k))||P);return I>3&&P&&Object.defineProperty(T,k,P),P},m=this&&this.__param||function(D,T){return function(k,R){T(k,R,D)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const u=c(2223),_=c(643),C=c(511),E=c(2585),x=c(8055),b=c(4725),S=c(4269),g=c(6171),y=c(3734);let A=a.DomRendererRowFactory=class{constructor(D,T,k,R,N,I,P){this._document=D,this._characterJoinerService=T,this._optionsService=k,this._coreBrowserService=R,this._coreService=N,this._decorationService=I,this._themeService=P,this._workCell=new C.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(D,T,k){this._selectionStart=D,this._selectionEnd=T,this._columnSelectMode=k}createRow(D,T,k,R,N,I,P,F,K,W,V){const $=[],J=this._characterJoinerService.getJoinedCharacters(T),H=this._themeService.colors;let B,z=D.getNoBgTrimmedLength();k&&z<I+1&&(z=I+1);let G=0,j="",te=0,he=0,me=0,Y=!1,q=0,oe=!1,Z=0;const ie=[],de=W!==-1&&V!==-1;for(let Ce=0;Ce<z;Ce++){D.loadCell(Ce,this._workCell);let we=this._workCell.getWidth();if(we===0)continue;let $e=!1,at=Ce,Re=this._workCell;if(J.length>0&&Ce===J[0][0]){$e=!0;const je=J.shift();Re=new S.JoinedCellData(this._workCell,D.translateToString(!0,je[0],je[1]),je[1]-je[0]),at=je[1]-1,we=Re.getWidth()}const Bt=this._isCellInSelection(Ce,T),xt=k&&Ce===I,Nt=de&&Ce>=W&&Ce<=V;let Kt=!1;this._decorationService.forEachDecorationAtCell(Ce,T,void 0,(je=>{Kt=!0}));let Ft=Re.getChars()||_.WHITESPACE_CELL_CHAR;if(Ft===" "&&(Re.isUnderline()||Re.isOverline())&&(Ft=" "),Z=we*F-K.get(Ft,Re.isBold(),Re.isItalic()),B){if(G&&(Bt&&oe||!Bt&&!oe&&Re.bg===te)&&(Bt&&oe&&H.selectionForeground||Re.fg===he)&&Re.extended.ext===me&&Nt===Y&&Z===q&&!xt&&!$e&&!Kt){Re.isInvisible()?j+=_.WHITESPACE_CELL_CHAR:j+=Ft,G++;continue}G&&(B.textContent=j),B=this._document.createElement("span"),G=0,j=""}else B=this._document.createElement("span");if(te=Re.bg,he=Re.fg,me=Re.extended.ext,Y=Nt,q=Z,oe=Bt,$e&&I>=Ce&&I<=at&&(I=Ce),!this._coreService.isCursorHidden&&xt&&this._coreService.isCursorInitialized){if(ie.push("xterm-cursor"),this._coreBrowserService.isFocused)P&&ie.push("xterm-cursor-blink"),ie.push(R==="bar"?"xterm-cursor-bar":R==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(N)switch(N){case"outline":ie.push("xterm-cursor-outline");break;case"block":ie.push("xterm-cursor-block");break;case"bar":ie.push("xterm-cursor-bar");break;case"underline":ie.push("xterm-cursor-underline")}}if(Re.isBold()&&ie.push("xterm-bold"),Re.isItalic()&&ie.push("xterm-italic"),Re.isDim()&&ie.push("xterm-dim"),j=Re.isInvisible()?_.WHITESPACE_CELL_CHAR:Re.getChars()||_.WHITESPACE_CELL_CHAR,Re.isUnderline()&&(ie.push(`xterm-underline-${Re.extended.underlineStyle}`),j===" "&&(j=" "),!Re.isUnderlineColorDefault()))if(Re.isUnderlineColorRGB())B.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(Re.getUnderlineColor()).join(",")})`;else{let je=Re.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Re.isBold()&&je<8&&(je+=8),B.style.textDecorationColor=H.ansi[je].css}Re.isOverline()&&(ie.push("xterm-overline"),j===" "&&(j=" ")),Re.isStrikethrough()&&ie.push("xterm-strikethrough"),Nt&&(B.style.textDecoration="underline");let pt=Re.getFgColor(),tt=Re.getFgColorMode(),jt=Re.getBgColor(),ue=Re.getBgColorMode();const ye=!!Re.isInverse();if(ye){const je=pt;pt=jt,jt=je;const mt=tt;tt=ue,ue=mt}let ke,Me,Be,ot=!1;switch(this._decorationService.forEachDecorationAtCell(Ce,T,void 0,(je=>{je.options.layer!=="top"&&ot||(je.backgroundColorRGB&&(ue=50331648,jt=je.backgroundColorRGB.rgba>>8&16777215,ke=je.backgroundColorRGB),je.foregroundColorRGB&&(tt=50331648,pt=je.foregroundColorRGB.rgba>>8&16777215,Me=je.foregroundColorRGB),ot=je.options.layer==="top")})),!ot&&Bt&&(ke=this._coreBrowserService.isFocused?H.selectionBackgroundOpaque:H.selectionInactiveBackgroundOpaque,jt=ke.rgba>>8&16777215,ue=50331648,ot=!0,H.selectionForeground&&(tt=50331648,pt=H.selectionForeground.rgba>>8&16777215,Me=H.selectionForeground)),ot&&ie.push("xterm-decoration-top"),ue){case 16777216:case 33554432:Be=H.ansi[jt],ie.push(`xterm-bg-${jt}`);break;case 50331648:Be=x.channels.toColor(jt>>16,jt>>8&255,255&jt),this._addStyle(B,`background-color:#${M((jt>>>0).toString(16),"0",6)}`);break;default:ye?(Be=H.foreground,ie.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):Be=H.background}switch(ke||Re.isDim()&&(ke=x.color.multiplyOpacity(Be,.5)),tt){case 16777216:case 33554432:Re.isBold()&&pt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(pt+=8),this._applyMinimumContrast(B,Be,H.ansi[pt],Re,ke,void 0)||ie.push(`xterm-fg-${pt}`);break;case 50331648:const je=x.channels.toColor(pt>>16&255,pt>>8&255,255&pt);this._applyMinimumContrast(B,Be,je,Re,ke,Me)||this._addStyle(B,`color:#${M(pt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(B,Be,H.foreground,Re,ke,Me)||ye&&ie.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}ie.length&&(B.className=ie.join(" "),ie.length=0),xt||$e||Kt?B.textContent=j:G++,Z!==this.defaultSpacing&&(B.style.letterSpacing=`${Z}px`),$.push(B),Ce=at}return B&&G&&(B.textContent=j),$}_applyMinimumContrast(D,T,k,R,N,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,g.treatGlyphAsBackgroundColor)(R.getCode()))return!1;const P=this._getContrastCache(R);let F;if(N||I||(F=P.getColor(T.rgba,k.rgba)),F===void 0){const K=this._optionsService.rawOptions.minimumContrastRatio/(R.isDim()?2:1);F=x.color.ensureContrastRatio(N||T,I||k,K),P.setColor((N||T).rgba,(I||k).rgba,F??null)}return!!F&&(this._addStyle(D,`color:${F.css}`),!0)}_getContrastCache(D){return D.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(D,T){D.setAttribute("style",`${D.getAttribute("style")||""}${T};`)}_isCellInSelection(D,T){const k=this._selectionStart,R=this._selectionEnd;return!(!k||!R)&&(this._columnSelectMode?k[0]<=R[0]?D>=k[0]&&T>=k[1]&&D<R[0]&&T<=R[1]:D<k[0]&&T>=k[1]&&D>=R[0]&&T<=R[1]:T>k[1]&&T<R[1]||k[1]===R[1]&&T===k[1]&&D>=k[0]&&D<R[0]||k[1]<R[1]&&T===R[1]&&D<R[0]||k[1]<R[1]&&T===k[1]&&D>=k[0])}};function M(D,T,k){for(;D.length<k;)D=T+D;return D}a.DomRendererRowFactory=A=h([m(1,b.ICharacterJoinerService),m(2,E.IOptionsService),m(3,b.ICoreBrowserService),m(4,E.ICoreService),m(5,E.IDecorationService),m(6,b.IThemeService)],A)},2550:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.WidthCache=class{constructor(c,h){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.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=c.createElement("span");m.classList.add("xterm-char-measure-element");const u=c.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontWeight="bold";const _=c.createElement("span");_.classList.add("xterm-char-measure-element"),_.style.fontStyle="italic";const C=c.createElement("span");C.classList.add("xterm-char-measure-element"),C.style.fontWeight="bold",C.style.fontStyle="italic",this._measureElements=[m,u,_,C],this._container.appendChild(m),this._container.appendChild(u),this._container.appendChild(_),this._container.appendChild(C),h.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(c,h,m,u){c===this._font&&h===this._fontSize&&m===this._weight&&u===this._weightBold||(this._font=c,this._fontSize=h,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(c,h,m){let u=0;if(!h&&!m&&c.length===1&&(u=c.charCodeAt(0))<256){if(this._flat[u]!==-9999)return this._flat[u];const E=this._measure(c,0);return E>0&&(this._flat[u]=E),E}let _=c;h&&(_+="B"),m&&(_+="I");let C=this._holey.get(_);if(C===void 0){let E=0;h&&(E|=1),m&&(E|=2),C=this._measure(c,E),C>0&&this._holey.set(_,C)}return C}_measure(c,h){const m=this._measureElements[h];return m.textContent=c.repeat(32),m.offsetWidth/32}}},2223:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const h=c(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=h.isFirefox||h.isLegacyEdge?"bottom":"ideographic"},6171:(f,a)=>{function c(m){return 57508<=m&&m<=57558}function h(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(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(m){if(!m)throw new Error("value must not be falsy");return m},a.isPowerlineGlyph=c,a.isRestrictedPowerlineGlyph=function(m){return 57520<=m&&m<=57527},a.isEmoji=h,a.allowRescaling=function(m,u,_,C){return u===1&&_>Math.ceil(1.5*C)&&m!==void 0&&m>255&&!h(m)&&!c(m)&&!(function(E){return 57344<=E&&E<=63743})(m)},a.treatGlyphAsBackgroundColor=function(m){return c(m)||(function(u){return 9472<=u&&u<=9631})(m)},a.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},a.computeNextVariantOffset=function(m,u,_=0){return(m-(2*Math.round(u)-_))%(2*Math.round(u))}},6052:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createSelectionRenderModel=void 0;class c{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,_,C=!1){if(this.selectionStart=u,this.selectionEnd=_,!u||!_||u[0]===_[0]&&u[1]===_[1])return void this.clear();const E=m.buffers.active.ydisp,x=u[1]-E,b=_[1]-E,S=Math.max(x,0),g=Math.min(b,m.rows-1);S>=m.rows||g<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=C,this.viewportStartRow=x,this.viewportEndRow=b,this.viewportCappedStartRow=S,this.viewportCappedEndRow=g,this.startCol=u[0],this.endCol=_[0])}isCellSelected(m,u,_){return!!this.hasSelection&&(_-=m.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&_>=this.viewportCappedStartRow&&u<this.endCol&&_<=this.viewportCappedEndRow:u<this.startCol&&_>=this.viewportCappedStartRow&&u>=this.endCol&&_<=this.viewportCappedEndRow:_>this.viewportStartRow&&_<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&_===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportStartRow&&u>=this.startCol)}}a.createSelectionRenderModel=function(){return new c}},456:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.SelectionModel=class{constructor(c){this._bufferService=c,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 c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,h=this.selectionEnd;return!(!c||!h)&&(c[1]>h[1]||c[1]===h[1]&&c[0]>h[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(f,a,c){var h=this&&this.__decorate||function(g,y,A,M){var D,T=arguments.length,k=T<3?y:M===null?M=Object.getOwnPropertyDescriptor(y,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(g,y,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(k=(T<3?D(k):T>3?D(y,A,k):D(y,A))||k);return T>3&&k&&Object.defineProperty(y,A,k),k},m=this&&this.__param||function(g,y){return function(A,M){y(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const u=c(2585),_=c(8460),C=c(844);let E=a.CharSizeService=class extends C.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(g,y,A){super(),this._optionsService=A,this.width=0,this.height=0,this._onCharSizeChange=this.register(new _.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new S(this._optionsService))}catch{this._measureStrategy=this.register(new b(g,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const g=this._measureStrategy.measure();g.width===this.width&&g.height===this.height||(this.width=g.width,this.height=g.height,this._onCharSizeChange.fire())}};a.CharSizeService=E=h([m(2,u.IOptionsService)],E);class x extends C.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(y,A){y!==void 0&&y>0&&A!==void 0&&A>0&&(this._result.width=y,this._result.height=A)}}class b extends x{constructor(y,A,M){super(),this._document=y,this._parentElement=A,this._optionsService=M,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 S extends x{constructor(y){super(),this._optionsService=y,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const A=this._ctx.measureText("W");if(!("width"in A&&"fontBoundingBoxAscent"in A&&"fontBoundingBoxDescent"in A))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const y=this._ctx.measureText("W");return this._validateAndSet(y.width,y.fontBoundingBoxAscent+y.fontBoundingBoxDescent),this._result}}},4269:function(f,a,c){var h=this&&this.__decorate||function(S,g,y,A){var M,D=arguments.length,T=D<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,y):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(S,g,y,A);else for(var k=S.length-1;k>=0;k--)(M=S[k])&&(T=(D<3?M(T):D>3?M(g,y,T):M(g,y))||T);return D>3&&T&&Object.defineProperty(g,y,T),T},m=this&&this.__param||function(S,g){return function(y,A){g(y,A,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const u=c(3734),_=c(643),C=c(511),E=c(2585);class x extends u.AttributeData{constructor(g,y,A){super(),this.content=0,this.combinedData="",this.fg=g.fg,this.bg=g.bg,this.combinedData=y,this._width=A}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(g){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.JoinedCellData=x;let b=a.CharacterJoinerService=class _g{constructor(g){this._bufferService=g,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new C.CellData}register(g){const y={id:this._nextCharacterJoinerId++,handler:g};return this._characterJoiners.push(y),y.id}deregister(g){for(let y=0;y<this._characterJoiners.length;y++)if(this._characterJoiners[y].id===g)return this._characterJoiners.splice(y,1),!0;return!1}getJoinedCharacters(g){if(this._characterJoiners.length===0)return[];const y=this._bufferService.buffer.lines.get(g);if(!y||y.length===0)return[];const A=[],M=y.translateToString(!0);let D=0,T=0,k=0,R=y.getFg(0),N=y.getBg(0);for(let I=0;I<y.getTrimmedLength();I++)if(y.loadCell(I,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==R||this._workCell.bg!==N){if(I-D>1){const P=this._getJoinedRanges(M,k,T,y,D);for(let F=0;F<P.length;F++)A.push(P[F])}D=I,k=T,R=this._workCell.fg,N=this._workCell.bg}T+=this._workCell.getChars().length||_.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-D>1){const I=this._getJoinedRanges(M,k,T,y,D);for(let P=0;P<I.length;P++)A.push(I[P])}return A}_getJoinedRanges(g,y,A,M,D){const T=g.substring(y,A);let k=[];try{k=this._characterJoiners[0].handler(T)}catch(R){console.error(R)}for(let R=1;R<this._characterJoiners.length;R++)try{const N=this._characterJoiners[R].handler(T);for(let I=0;I<N.length;I++)_g._mergeRanges(k,N[I])}catch(N){console.error(N)}return this._stringRangesToCellRanges(k,M,D),k}_stringRangesToCellRanges(g,y,A){let M=0,D=!1,T=0,k=g[M];if(k){for(let R=A;R<this._bufferService.cols;R++){const N=y.getWidth(R),I=y.getString(R).length||_.WHITESPACE_CELL_CHAR.length;if(N!==0){if(!D&&k[0]<=T&&(k[0]=R,D=!0),k[1]<=T){if(k[1]=R,k=g[++M],!k)break;k[0]<=T?(k[0]=R,D=!0):D=!1}T+=I}}k&&(k[1]=this._bufferService.cols)}}static _mergeRanges(g,y){let A=!1;for(let M=0;M<g.length;M++){const D=g[M];if(A){if(y[1]<=D[0])return g[M-1][1]=y[1],g;if(y[1]<=D[1])return g[M-1][1]=Math.max(y[1],D[1]),g.splice(M,1),g;g.splice(M,1),M--}else{if(y[1]<=D[0])return g.splice(M,0,y),g;if(y[1]<=D[1])return D[0]=Math.min(y[0],D[0]),g;y[0]<D[1]&&(D[0]=Math.min(y[0],D[0]),A=!0)}}return A?g[g.length-1][1]=y[1]:g.push(y),g}};a.CharacterJoinerService=b=h([m(0,E.IBufferService)],b)},5114:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const h=c(844),m=c(8460),u=c(3656);class _ extends h.Disposable{constructor(x,b,S){super(),this._textarea=x,this._window=b,this.mainDocument=S,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new C(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((g=>this._screenDprMonitor.setWindow(g)))),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(x){this._window!==x&&(this._window=x,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}a.CoreBrowserService=_;class C extends h.Disposable{constructor(x){super(),this._parentWindow=x,this._windowResizeListener=this.register(new h.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,h.toDisposable)((()=>this.clearListener())))}setWindow(x){this._parentWindow=x,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 x;this._outerListener&&((x=this._resolutionMediaMatchList)==null||x.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:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const h=c(844);class m extends h.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,h.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(_){return this.linkProviders.push(_),{dispose:()=>{const C=this.linkProviders.indexOf(_);C!==-1&&this.linkProviders.splice(C,1)}}}}a.LinkProviderService=m},8934:function(f,a,c){var h=this&&this.__decorate||function(E,x,b,S){var g,y=arguments.length,A=y<3?x:S===null?S=Object.getOwnPropertyDescriptor(x,b):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(E,x,b,S);else for(var M=E.length-1;M>=0;M--)(g=E[M])&&(A=(y<3?g(A):y>3?g(x,b,A):g(x,b))||A);return y>3&&A&&Object.defineProperty(x,b,A),A},m=this&&this.__param||function(E,x){return function(b,S){x(b,S,E)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const u=c(4725),_=c(9806);let C=a.MouseService=class{constructor(E,x){this._renderService=E,this._charSizeService=x}getCoords(E,x,b,S,g){return(0,_.getCoords)(window,E,x,b,S,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,g)}getMouseReportCoords(E,x){const b=(0,_.getCoordsRelativeToElement)(window,E,x);if(this._charSizeService.hasValidSize)return b[0]=Math.min(Math.max(b[0],0),this._renderService.dimensions.css.canvas.width-1),b[1]=Math.min(Math.max(b[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(b[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(b[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(b[0]),y:Math.floor(b[1])}}};a.MouseService=C=h([m(0,u.IRenderService),m(1,u.ICharSizeService)],C)},3230:function(f,a,c){var h=this&&this.__decorate||function(g,y,A,M){var D,T=arguments.length,k=T<3?y:M===null?M=Object.getOwnPropertyDescriptor(y,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(g,y,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(k=(T<3?D(k):T>3?D(y,A,k):D(y,A))||k);return T>3&&k&&Object.defineProperty(y,A,k),k},m=this&&this.__param||function(g,y){return function(A,M){y(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const u=c(6193),_=c(4725),C=c(8460),E=c(844),x=c(7226),b=c(2585);let S=a.RenderService=class extends E.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(g,y,A,M,D,T,k,R){super(),this._rowCount=g,this._charSizeService=M,this._renderer=this.register(new E.MutableDisposable),this._pausedResizeTask=new x.DebouncedIdleTask,this._observerDisposable=this.register(new E.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 C.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new C.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new C.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new C.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new u.RenderDebouncer(((N,I)=>this._renderRows(N,I)),k),this.register(this._renderDebouncer),this.register(k.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(T.onResize((()=>this._fullRefresh()))),this.register(T.buffers.onBufferActivate((()=>{var N;return(N=this._renderer.value)==null?void 0:N.clear()}))),this.register(A.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(D.onDecorationRegistered((()=>this._fullRefresh()))),this.register(D.onDecorationRemoved((()=>this._fullRefresh()))),this.register(A.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(T.cols,T.rows),this._fullRefresh()}))),this.register(A.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(T.buffer.y,T.buffer.y,!0)))),this.register(R.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(k.window,y),this.register(k.onWindowChange((N=>this._registerIntersectionObserver(N,y))))}_registerIntersectionObserver(g,y){if("IntersectionObserver"in g){const A=new g.IntersectionObserver((M=>this._handleIntersectionChange(M[M.length-1])),{threshold:0});A.observe(y),this._observerDisposable.value=(0,E.toDisposable)((()=>A.disconnect()))}}_handleIntersectionChange(g){this._isPaused=g.isIntersecting===void 0?g.intersectionRatio===0:!g.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(g,y,A=!1){this._isPaused?this._needsFullRefresh=!0:(A||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(g,y,this._rowCount))}_renderRows(g,y){this._renderer.value&&(g=Math.min(g,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(g,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:g,end:y}),this._onRender.fire({start:g,end:y}),this._isNextRenderRedrawOnly=!0)}resize(g,y){this._rowCount=y,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(g){this._renderer.value=g,this._renderer.value&&(this._renderer.value.onRequestRedraw((y=>this.refreshRows(y.start,y.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(g){return this._renderDebouncer.addRefreshCallback(g)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var g,y;this._renderer.value&&((y=(g=this._renderer.value).clearTextureAtlas)==null||y.call(g),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(g,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var A;return(A=this._renderer.value)==null?void 0:A.handleResize(g,y)})):this._renderer.value.handleResize(g,y),this._fullRefresh())}handleCharSizeChanged(){var g;(g=this._renderer.value)==null||g.handleCharSizeChanged()}handleBlur(){var g;(g=this._renderer.value)==null||g.handleBlur()}handleFocus(){var g;(g=this._renderer.value)==null||g.handleFocus()}handleSelectionChanged(g,y,A){var M;this._selectionState.start=g,this._selectionState.end=y,this._selectionState.columnSelectMode=A,(M=this._renderer.value)==null||M.handleSelectionChanged(g,y,A)}handleCursorMove(){var g;(g=this._renderer.value)==null||g.handleCursorMove()}clear(){var g;(g=this._renderer.value)==null||g.clear()}};a.RenderService=S=h([m(2,b.IOptionsService),m(3,_.ICharSizeService),m(4,b.IDecorationService),m(5,b.IBufferService),m(6,_.ICoreBrowserService),m(7,_.IThemeService)],S)},9312:function(f,a,c){var h=this&&this.__decorate||function(k,R,N,I){var P,F=arguments.length,K=F<3?R:I===null?I=Object.getOwnPropertyDescriptor(R,N):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")K=Reflect.decorate(k,R,N,I);else for(var W=k.length-1;W>=0;W--)(P=k[W])&&(K=(F<3?P(K):F>3?P(R,N,K):P(R,N))||K);return F>3&&K&&Object.defineProperty(R,N,K),K},m=this&&this.__param||function(k,R){return function(N,I){R(N,I,k)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const u=c(9806),_=c(9504),C=c(456),E=c(4725),x=c(8460),b=c(844),S=c(6114),g=c(4841),y=c(511),A=c(2585),M=" ",D=new RegExp(M,"g");let T=a.SelectionService=class extends b.Disposable{constructor(k,R,N,I,P,F,K,W,V){super(),this._element=k,this._screenElement=R,this._linkifier=N,this._bufferService=I,this._coreService=P,this._mouseService=F,this._optionsService=K,this._renderService=W,this._coreBrowserService=V,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new x.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new x.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new x.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new x.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=$=>this._handleMouseMove($),this._mouseUpListener=$=>this._handleMouseUp($),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim(($=>this._handleTrim($))),this.register(this._bufferService.buffers.onBufferActivate(($=>this._handleBufferActivate($)))),this.enable(),this._model=new C.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,b.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 k=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;return!(!k||!R||k[0]===R[0]&&k[1]===R[1])}get selectionText(){const k=this._model.finalSelectionStart,R=this._model.finalSelectionEnd;if(!k||!R)return"";const N=this._bufferService.buffer,I=[];if(this._activeSelectionMode===3){if(k[0]===R[0])return"";const P=k[0]<R[0]?k[0]:R[0],F=k[0]<R[0]?R[0]:k[0];for(let K=k[1];K<=R[1];K++){const W=N.translateBufferLineToString(K,!0,P,F);I.push(W)}}else{const P=k[1]===R[1]?R[0]:void 0;I.push(N.translateBufferLineToString(k[1],!0,k[0],P));for(let F=k[1]+1;F<=R[1]-1;F++){const K=N.lines.get(F),W=N.translateBufferLineToString(F,!0);K!=null&&K.isWrapped?I[I.length-1]+=W:I.push(W)}if(k[1]!==R[1]){const F=N.lines.get(R[1]),K=N.translateBufferLineToString(R[1],!0,0,R[0]);F&&F.isWrapped?I[I.length-1]+=K:I.push(K)}}return I.map((P=>P.replace(D," "))).join(S.isWindows?`\r
|
|
56
56
|
`:`
|
|
57
|
-
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(k){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),_.isLinux&&k&&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(k){const R=this._getMouseBufferCoords(k),N=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!!(N&&I&&R)&&this._areCoordsInSelection(R,N,I)}isCellInSelection(k,R){const N=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!N||!I)&&this._areCoordsInSelection([k,R],N,I)}_areCoordsInSelection(k,R,N){return k[1]>R[1]&&k[1]<N[1]||R[1]===N[1]&&k[1]===R[1]&&k[0]>=R[0]&&k[0]<N[0]||R[1]<N[1]&&k[1]===N[1]&&k[0]<N[0]||R[1]<N[1]&&k[1]===R[1]&&k[0]>=R[0]}_selectWordAtCursor(k,R){var P,F;const N=(F=(P=this._linkifier.currentLink)==null?void 0:P.link)==null?void 0:F.range;if(N)return this._model.selectionStart=[N.start.x-1,N.start.y-1],this._model.selectionStartLength=(0,g.getRangeLength)(N,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const I=this._getMouseBufferCoords(k);return!!I&&(this._selectWordAt(I,R),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(k,R){this._model.clearSelection(),k=Math.max(k,0),R=Math.min(R,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,k],this._model.selectionEnd=[this._bufferService.cols,R],this.refresh(),this._onSelectionChange.fire()}_handleTrim(k){this._model.handleTrim(k)&&this.refresh()}_getMouseBufferCoords(k){const R=this._mouseService.getCoords(k,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(R)return R[0]--,R[1]--,R[1]+=this._bufferService.buffer.ydisp,R}_getMouseEventScrollAmount(k){let R=(0,u.getCoordsRelativeToElement)(this._coreBrowserService.window,k,this._screenElement)[1];const N=this._renderService.dimensions.css.canvas.height;return R>=0&&R<=N?0:(R>N&&(R-=N),R=Math.min(Math.max(R,-50),50),R/=50,R/Math.abs(R)+Math.round(14*R))}shouldForceSelection(k){return _.isMac?k.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:k.shiftKey}handleMouseDown(k){if(this._mouseDownTimeStamp=k.timeStamp,(k.button!==2||!this.hasSelection)&&k.button===0){if(!this._enabled){if(!this.shouldForceSelection(k))return;k.stopPropagation()}k.preventDefault(),this._dragScrollAmount=0,this._enabled&&k.shiftKey?this._handleIncrementalClick(k):k.detail===1?this._handleSingleClick(k):k.detail===2?this._handleDoubleClick(k):k.detail===3&&this._handleTripleClick(k),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(k){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(k))}_handleSingleClick(k){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(k)?3:0,this._model.selectionStart=this._getMouseBufferCoords(k),!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(k){this._selectWordAtCursor(k,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(k){const R=this._getMouseBufferCoords(k);R&&(this._activeSelectionMode=2,this._selectLineAt(R[1]))}shouldColumnSelect(k){return k.altKey&&!(_.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(k){if(k.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(k),!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(k),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const N=this._bufferService.buffer;if(this._model.selectionEnd[1]<N.lines.length){const I=N.lines.get(this._model.selectionEnd[1]);I&&I.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 k=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(k.ydisp+this._bufferService.rows,k.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=k.ydisp),this.refresh()}}_handleMouseUp(k){const R=k.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&R<500&&k.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const N=this._mouseService.getCoords(k,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(N&&N[0]!==void 0&&N[1]!==void 0){const I=(0,b.moveToCellSequence)(N[0]-1,N[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const k=this._model.finalSelectionStart,R=this._model.finalSelectionEnd,N=!(!k||!R||k[0]===R[0]&&k[1]===R[1]);N?k&&R&&(this._oldSelectionStart&&this._oldSelectionEnd&&k[0]===this._oldSelectionStart[0]&&k[1]===this._oldSelectionStart[1]&&R[0]===this._oldSelectionEnd[0]&&R[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(k,R,N)):this._oldHasSelection&&this._fireOnSelectionChange(k,R,N)}_fireOnSelectionChange(k,R,N){this._oldSelectionStart=k,this._oldSelectionEnd=R,this._oldHasSelection=N,this._onSelectionChange.fire()}_handleBufferActivate(k){this.clearSelection(),this._trimListener.dispose(),this._trimListener=k.activeBuffer.lines.onTrim((R=>this._handleTrim(R)))}_convertViewportColToCharacterIndex(k,R){let N=R;for(let I=0;R>=I;I++){const P=k.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?N--:P>1&&R!==I&&(N+=P-1)}return N}setSelection(k,R,N){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[k,R],this._model.selectionStartLength=N,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(k){this._isClickInSelection(k)||(this._selectWordAtCursor(k,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(k,R,N=!0,I=!0){if(k[0]>=this._bufferService.cols)return;const P=this._bufferService.buffer,F=P.lines.get(k[1]);if(!F)return;const K=P.translateBufferLineToString(k[1],!1);let W=this._convertViewportColToCharacterIndex(F,k[0]),G=W;const $=k[0]-W;let J=0,H=0,B=0,z=0;if(K.charAt(W)===" "){for(;W>0&&K.charAt(W-1)===" ";)W--;for(;G<K.length&&K.charAt(G+1)===" ";)G++}else{let te=k[0],ue=k[0];F.getWidth(te)===0&&(J++,te--),F.getWidth(ue)===2&&(H++,ue++);const me=F.getString(ue).length;for(me>1&&(z+=me-1,G+=me-1);te>0&&W>0&&!this._isCharWordSeparator(F.loadCell(te-1,this._workCell));){F.loadCell(te-1,this._workCell);const Y=this._workCell.getChars().length;this._workCell.getWidth()===0?(J++,te--):Y>1&&(B+=Y-1,W-=Y-1),W--,te--}for(;ue<F.length&&G+1<K.length&&!this._isCharWordSeparator(F.loadCell(ue+1,this._workCell));){F.loadCell(ue+1,this._workCell);const Y=this._workCell.getChars().length;this._workCell.getWidth()===2?(H++,ue++):Y>1&&(z+=Y-1,G+=Y-1),G++,ue++}}G++;let V=W+$-J+B,j=Math.min(this._bufferService.cols,G-W+J+H-B-z);if(R||K.slice(W,G).trim()!==""){if(N&&V===0&&F.getCodePoint(0)!==32){const te=P.lines.get(k[1]-1);if(te&&F.isWrapped&&te.getCodePoint(this._bufferService.cols-1)!==32){const ue=this._getWordAt([this._bufferService.cols-1,k[1]-1],!1,!0,!1);if(ue){const me=this._bufferService.cols-ue.start;V-=me,j+=me}}}if(I&&V+j===this._bufferService.cols&&F.getCodePoint(this._bufferService.cols-1)!==32){const te=P.lines.get(k[1]+1);if(te!=null&&te.isWrapped&&te.getCodePoint(0)!==32){const ue=this._getWordAt([0,k[1]+1],!1,!1,!0);ue&&(j+=ue.length)}}return{start:V,length:j}}}_selectWordAt(k,R){const N=this._getWordAt(k,R);if(N){for(;N.start<0;)N.start+=this._bufferService.cols,k[1]--;this._model.selectionStart=[N.start,k[1]],this._model.selectionStartLength=N.length}}_selectToWordAt(k){const R=this._getWordAt(k,!0);if(R){let N=k[1];for(;R.start<0;)R.start+=this._bufferService.cols,N--;if(!this._model.areSelectionValuesReversed())for(;R.start+R.length>this._bufferService.cols;)R.length-=this._bufferService.cols,N++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?R.start:R.start+R.length,N]}}_isCharWordSeparator(k){return k.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(k.getChars())>=0}_selectLineAt(k){const R=this._bufferService.buffer.getWrappedRangeForLine(k),N={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,g.getRangeLength)(N,this._bufferService.cols)}};a.SelectionService=T=h([d(3,A.IBufferService),d(4,A.ICoreService),d(5,E.IMouseService),d(6,A.IOptionsService),d(7,E.IRenderService),d(8,E.ICoreBrowserService)],T)},4725:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const h=c(8343);a.ICharSizeService=(0,h.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,h.createDecorator)("CoreBrowserService"),a.IMouseService=(0,h.createDecorator)("MouseService"),a.IRenderService=(0,h.createDecorator)("RenderService"),a.ISelectionService=(0,h.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,h.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,h.createDecorator)("ThemeService"),a.ILinkProviderService=(0,h.createDecorator)("LinkProviderService")},6731:function(f,a,c){var h=this&&this.__decorate||function(T,k,R,N){var I,P=arguments.length,F=P<3?k:N===null?N=Object.getOwnPropertyDescriptor(k,R):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(T,k,R,N);else for(var K=T.length-1;K>=0;K--)(I=T[K])&&(F=(P<3?I(F):P>3?I(k,R,F):I(k,R))||F);return P>3&&F&&Object.defineProperty(k,R,F),F},d=this&&this.__param||function(T,k){return function(R,N){k(R,N,T)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const u=c(7239),b=c(8055),w=c(8460),E=c(844),x=c(2585),S=b.css.toColor("#ffffff"),_=b.css.toColor("#000000"),g=b.css.toColor("#ffffff"),y=b.css.toColor("#000000"),A={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const T=[b.css.toColor("#2e3436"),b.css.toColor("#cc0000"),b.css.toColor("#4e9a06"),b.css.toColor("#c4a000"),b.css.toColor("#3465a4"),b.css.toColor("#75507b"),b.css.toColor("#06989a"),b.css.toColor("#d3d7cf"),b.css.toColor("#555753"),b.css.toColor("#ef2929"),b.css.toColor("#8ae234"),b.css.toColor("#fce94f"),b.css.toColor("#729fcf"),b.css.toColor("#ad7fa8"),b.css.toColor("#34e2e2"),b.css.toColor("#eeeeec")],k=[0,95,135,175,215,255];for(let R=0;R<216;R++){const N=k[R/36%6|0],I=k[R/6%6|0],P=k[R%6];T.push({css:b.channels.toCss(N,I,P),rgba:b.channels.toRgba(N,I,P)})}for(let R=0;R<24;R++){const N=8+10*R;T.push({css:b.channels.toCss(N,N,N),rgba:b.channels.toRgba(N,N,N)})}return T})());let M=a.ThemeService=class extends E.Disposable{get colors(){return this._colors}constructor(T){super(),this._optionsService=T,this._contrastCache=new u.ColorContrastCache,this._halfContrastCache=new u.ColorContrastCache,this._onChangeColors=this.register(new w.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:S,background:_,cursor:g,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:A,selectionBackgroundOpaque:b.color.blend(_,A),selectionInactiveBackgroundTransparent:A,selectionInactiveBackgroundOpaque:b.color.blend(_,A),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(T={}){const k=this._colors;if(k.foreground=D(T.foreground,S),k.background=D(T.background,_),k.cursor=D(T.cursor,g),k.cursorAccent=D(T.cursorAccent,y),k.selectionBackgroundTransparent=D(T.selectionBackground,A),k.selectionBackgroundOpaque=b.color.blend(k.background,k.selectionBackgroundTransparent),k.selectionInactiveBackgroundTransparent=D(T.selectionInactiveBackground,k.selectionBackgroundTransparent),k.selectionInactiveBackgroundOpaque=b.color.blend(k.background,k.selectionInactiveBackgroundTransparent),k.selectionForeground=T.selectionForeground?D(T.selectionForeground,b.NULL_COLOR):void 0,k.selectionForeground===b.NULL_COLOR&&(k.selectionForeground=void 0),b.color.isOpaque(k.selectionBackgroundTransparent)&&(k.selectionBackgroundTransparent=b.color.opacity(k.selectionBackgroundTransparent,.3)),b.color.isOpaque(k.selectionInactiveBackgroundTransparent)&&(k.selectionInactiveBackgroundTransparent=b.color.opacity(k.selectionInactiveBackgroundTransparent,.3)),k.ansi=a.DEFAULT_ANSI_COLORS.slice(),k.ansi[0]=D(T.black,a.DEFAULT_ANSI_COLORS[0]),k.ansi[1]=D(T.red,a.DEFAULT_ANSI_COLORS[1]),k.ansi[2]=D(T.green,a.DEFAULT_ANSI_COLORS[2]),k.ansi[3]=D(T.yellow,a.DEFAULT_ANSI_COLORS[3]),k.ansi[4]=D(T.blue,a.DEFAULT_ANSI_COLORS[4]),k.ansi[5]=D(T.magenta,a.DEFAULT_ANSI_COLORS[5]),k.ansi[6]=D(T.cyan,a.DEFAULT_ANSI_COLORS[6]),k.ansi[7]=D(T.white,a.DEFAULT_ANSI_COLORS[7]),k.ansi[8]=D(T.brightBlack,a.DEFAULT_ANSI_COLORS[8]),k.ansi[9]=D(T.brightRed,a.DEFAULT_ANSI_COLORS[9]),k.ansi[10]=D(T.brightGreen,a.DEFAULT_ANSI_COLORS[10]),k.ansi[11]=D(T.brightYellow,a.DEFAULT_ANSI_COLORS[11]),k.ansi[12]=D(T.brightBlue,a.DEFAULT_ANSI_COLORS[12]),k.ansi[13]=D(T.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),k.ansi[14]=D(T.brightCyan,a.DEFAULT_ANSI_COLORS[14]),k.ansi[15]=D(T.brightWhite,a.DEFAULT_ANSI_COLORS[15]),T.extendedAnsi){const R=Math.min(k.ansi.length-16,T.extendedAnsi.length);for(let N=0;N<R;N++)k.ansi[N+16]=D(T.extendedAnsi[N],a.DEFAULT_ANSI_COLORS[N+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(T){this._restoreColor(T),this._onChangeColors.fire(this.colors)}_restoreColor(T){if(T!==void 0)switch(T){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[T]=this._restoreColors.ansi[T]}else for(let k=0;k<this._restoreColors.ansi.length;++k)this._colors.ansi[k]=this._restoreColors.ansi[k]}modifyColors(T){T(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 D(T,k){if(T!==void 0)try{return b.css.toColor(T)}catch{}return k}a.ThemeService=M=h([d(0,x.IOptionsService)],M)},6349:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const h=c(8460),d=c(844);class u extends d.Disposable{constructor(w){super(),this._maxLength=w,this.onDeleteEmitter=this.register(new h.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new h.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new h.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(w){if(this._maxLength===w)return;const E=new Array(w);for(let x=0;x<Math.min(w,this.length);x++)E[x]=this._array[this._getCyclicIndex(x)];this._array=E,this._maxLength=w,this._startIndex=0}get length(){return this._length}set length(w){if(w>this._length)for(let E=this._length;E<w;E++)this._array[E]=void 0;this._length=w}get(w){return this._array[this._getCyclicIndex(w)]}set(w,E){this._array[this._getCyclicIndex(w)]=E}push(w){this._array[this._getCyclicIndex(this._length)]=w,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(w,E,...x){if(E){for(let S=w;S<this._length-E;S++)this._array[this._getCyclicIndex(S)]=this._array[this._getCyclicIndex(S+E)];this._length-=E,this.onDeleteEmitter.fire({index:w,amount:E})}for(let S=this._length-1;S>=w;S--)this._array[this._getCyclicIndex(S+x.length)]=this._array[this._getCyclicIndex(S)];for(let S=0;S<x.length;S++)this._array[this._getCyclicIndex(w+S)]=x[S];if(x.length&&this.onInsertEmitter.fire({index:w,amount:x.length}),this._length+x.length>this._maxLength){const S=this._length+x.length-this._maxLength;this._startIndex+=S,this._length=this._maxLength,this.onTrimEmitter.fire(S)}else this._length+=x.length}trimStart(w){w>this._length&&(w=this._length),this._startIndex+=w,this._length-=w,this.onTrimEmitter.fire(w)}shiftElements(w,E,x){if(!(E<=0)){if(w<0||w>=this._length)throw new Error("start argument out of range");if(w+x<0)throw new Error("Cannot shift elements in list beyond index 0");if(x>0){for(let _=E-1;_>=0;_--)this.set(w+_+x,this.get(w+_));const S=w+E+x-this._length;if(S>0)for(this._length+=S;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let S=0;S<E;S++)this.set(w+S+x,this.get(w+S))}}_getCyclicIndex(w){return(this._startIndex+w)%this._maxLength}}a.CircularList=u},1439:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function c(h,d=5){if(typeof h!="object")return h;const u=Array.isArray(h)?[]:{};for(const b in h)u[b]=d<=1?h[b]:h[b]&&c(h[b],d-1);return u}},8055:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let c=0,h=0,d=0,u=0;var b,w,E,x,S;function _(y){const A=y.toString(16);return A.length<2?"0"+A:A}function g(y,A){return y<A?(A+.05)/(y+.05):(y+.05)/(A+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(y){y.toCss=function(A,M,D,T){return T!==void 0?`#${_(A)}${_(M)}${_(D)}${_(T)}`:`#${_(A)}${_(M)}${_(D)}`},y.toRgba=function(A,M,D,T=255){return(A<<24|M<<16|D<<8|T)>>>0},y.toColor=function(A,M,D,T){return{css:y.toCss(A,M,D,T),rgba:y.toRgba(A,M,D,T)}}})(b||(a.channels=b={})),(function(y){function A(M,D){return u=Math.round(255*D),[c,h,d]=S.toChannels(M.rgba),{css:b.toCss(c,h,d,u),rgba:b.toRgba(c,h,d,u)}}y.blend=function(M,D){if(u=(255&D.rgba)/255,u===1)return{css:D.css,rgba:D.rgba};const T=D.rgba>>24&255,k=D.rgba>>16&255,R=D.rgba>>8&255,N=M.rgba>>24&255,I=M.rgba>>16&255,P=M.rgba>>8&255;return c=N+Math.round((T-N)*u),h=I+Math.round((k-I)*u),d=P+Math.round((R-P)*u),{css:b.toCss(c,h,d),rgba:b.toRgba(c,h,d)}},y.isOpaque=function(M){return(255&M.rgba)==255},y.ensureContrastRatio=function(M,D,T){const k=S.ensureContrastRatio(M.rgba,D.rgba,T);if(k)return b.toColor(k>>24&255,k>>16&255,k>>8&255)},y.opaque=function(M){const D=(255|M.rgba)>>>0;return[c,h,d]=S.toChannels(D),{css:b.toCss(c,h,d),rgba:D}},y.opacity=A,y.multiplyOpacity=function(M,D){return u=255&M.rgba,A(M,u*D/255)},y.toColorRGB=function(M){return[M.rgba>>24&255,M.rgba>>16&255,M.rgba>>8&255]}})(w||(a.color=w={})),(function(y){let A,M;try{const D=document.createElement("canvas");D.width=1,D.height=1;const T=D.getContext("2d",{willReadFrequently:!0});T&&(A=T,A.globalCompositeOperation="copy",M=A.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(D){if(D.match(/#[\da-f]{3,8}/i))switch(D.length){case 4:return c=parseInt(D.slice(1,2).repeat(2),16),h=parseInt(D.slice(2,3).repeat(2),16),d=parseInt(D.slice(3,4).repeat(2),16),b.toColor(c,h,d);case 5:return c=parseInt(D.slice(1,2).repeat(2),16),h=parseInt(D.slice(2,3).repeat(2),16),d=parseInt(D.slice(3,4).repeat(2),16),u=parseInt(D.slice(4,5).repeat(2),16),b.toColor(c,h,d,u);case 7:return{css:D,rgba:(parseInt(D.slice(1),16)<<8|255)>>>0};case 9:return{css:D,rgba:parseInt(D.slice(1),16)>>>0}}const T=D.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(T)return c=parseInt(T[1]),h=parseInt(T[2]),d=parseInt(T[3]),u=Math.round(255*(T[5]===void 0?1:parseFloat(T[5]))),b.toColor(c,h,d,u);if(!A||!M)throw new Error("css.toColor: Unsupported css format");if(A.fillStyle=M,A.fillStyle=D,typeof A.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(A.fillRect(0,0,1,1),[c,h,d,u]=A.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:b.toRgba(c,h,d,u),css:D}}})(E||(a.css=E={})),(function(y){function A(M,D,T){const k=M/255,R=D/255,N=T/255;return .2126*(k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4))+.7152*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.0722*(N<=.03928?N/12.92:Math.pow((N+.055)/1.055,2.4))}y.relativeLuminance=function(M){return A(M>>16&255,M>>8&255,255&M)},y.relativeLuminance2=A})(x||(a.rgb=x={})),(function(y){function A(D,T,k){const R=D>>24&255,N=D>>16&255,I=D>>8&255;let P=T>>24&255,F=T>>16&255,K=T>>8&255,W=g(x.relativeLuminance2(P,F,K),x.relativeLuminance2(R,N,I));for(;W<k&&(P>0||F>0||K>0);)P-=Math.max(0,Math.ceil(.1*P)),F-=Math.max(0,Math.ceil(.1*F)),K-=Math.max(0,Math.ceil(.1*K)),W=g(x.relativeLuminance2(P,F,K),x.relativeLuminance2(R,N,I));return(P<<24|F<<16|K<<8|255)>>>0}function M(D,T,k){const R=D>>24&255,N=D>>16&255,I=D>>8&255;let P=T>>24&255,F=T>>16&255,K=T>>8&255,W=g(x.relativeLuminance2(P,F,K),x.relativeLuminance2(R,N,I));for(;W<k&&(P<255||F<255||K<255);)P=Math.min(255,P+Math.ceil(.1*(255-P))),F=Math.min(255,F+Math.ceil(.1*(255-F))),K=Math.min(255,K+Math.ceil(.1*(255-K))),W=g(x.relativeLuminance2(P,F,K),x.relativeLuminance2(R,N,I));return(P<<24|F<<16|K<<8|255)>>>0}y.blend=function(D,T){if(u=(255&T)/255,u===1)return T;const k=T>>24&255,R=T>>16&255,N=T>>8&255,I=D>>24&255,P=D>>16&255,F=D>>8&255;return c=I+Math.round((k-I)*u),h=P+Math.round((R-P)*u),d=F+Math.round((N-F)*u),b.toRgba(c,h,d)},y.ensureContrastRatio=function(D,T,k){const R=x.relativeLuminance(D>>8),N=x.relativeLuminance(T>>8);if(g(R,N)<k){if(N<R){const F=A(D,T,k),K=g(R,x.relativeLuminance(F>>8));if(K<k){const W=M(D,T,k);return K>g(R,x.relativeLuminance(W>>8))?F:W}return F}const I=M(D,T,k),P=g(R,x.relativeLuminance(I>>8));if(P<k){const F=A(D,T,k);return P>g(R,x.relativeLuminance(F>>8))?I:F}return I}},y.reduceLuminance=A,y.increaseLuminance=M,y.toChannels=function(D){return[D>>24&255,D>>16&255,D>>8&255,255&D]}})(S||(a.rgba=S={})),a.toPaddedHex=_,a.contrastRatio=g},8969:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const h=c(844),d=c(2585),u=c(4348),b=c(7866),w=c(744),E=c(7302),x=c(6975),S=c(8460),_=c(1753),g=c(1480),y=c(7994),A=c(9282),M=c(5435),D=c(5981),T=c(2660);let k=!1;class R extends h.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new S.EventEmitter),this._onScroll.event((I=>{var P;(P=this._onScrollApi)==null||P.fire(I.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(I){for(const P in I)this.optionsService.options[P]=I[P]}constructor(I){super(),this._windowsWrappingHeuristics=this.register(new h.MutableDisposable),this._onBinary=this.register(new S.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new S.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new S.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new S.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new S.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new S.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new E.OptionsService(I)),this._instantiationService.setService(d.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(w.BufferService)),this._instantiationService.setService(d.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(b.LogService)),this._instantiationService.setService(d.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(x.CoreService)),this._instantiationService.setService(d.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(_.CoreMouseService)),this._instantiationService.setService(d.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(g.UnicodeService)),this._instantiationService.setService(d.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(d.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(T.OscLinkService),this._instantiationService.setService(d.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new M.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,S.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,S.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,S.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,S.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((P=>{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((P=>{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 D.WriteBuffer(((P,F)=>this._inputHandler.parse(P,F)))),this.register((0,S.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,P){this._writeBuffer.write(I,P)}writeSync(I,P){this._logService.logLevel<=d.LogLevelEnum.WARN&&!k&&(this._logService.warn("writeSync is unreliable and will be removed soon."),k=!0),this._writeBuffer.writeSync(I,P)}input(I,P=!0){this.coreService.triggerDataEvent(I,P)}resize(I,P){isNaN(I)||isNaN(P)||(I=Math.max(I,w.MINIMUM_COLS),P=Math.max(P,w.MINIMUM_ROWS),this._bufferService.resize(I,P))}scroll(I,P=!1){this._bufferService.scroll(I,P)}scrollLines(I,P,F){this._bufferService.scrollLines(I,P,F)}scrollPages(I){this.scrollLines(I*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(I){const P=I-this._bufferService.buffer.ydisp;P!==0&&this.scrollLines(P)}registerEscHandler(I,P){return this._inputHandler.registerEscHandler(I,P)}registerDcsHandler(I,P){return this._inputHandler.registerDcsHandler(I,P)}registerCsiHandler(I,P){return this._inputHandler.registerCsiHandler(I,P)}registerOscHandler(I,P){return this._inputHandler.registerOscHandler(I,P)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const P=this.optionsService.rawOptions.windowsPty;P&&P.buildNumber!==void 0&&P.buildNumber!==void 0?I=P.backend==="conpty"&&P.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(I=!0),I?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const I=[];I.push(this.onLineFeed(A.updateWindowsModeWrappedState.bind(null,this._bufferService))),I.push(this.registerCsiHandler({final:"H"},(()=>((0,A.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,h.toDisposable)((()=>{for(const P of I)P.dispose()}))}}}a.CoreTerminal=R},8460:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let h=0;h<this._listeners.length;h++)if(this._listeners[h]===c)return void this._listeners.splice(h,1)}}})),this._event}fire(c,h){const d=[];for(let u=0;u<this._listeners.length;u++)d.push(this._listeners[u]);for(let u=0;u<d.length;u++)d[u].call(void 0,c,h)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(c,h){return c((d=>h.fire(d)))},a.runAndSubscribe=function(c,h){return h(void 0),c((d=>h(d)))}},5435:function(f,a,c){var h=this&&this.__decorate||function(J,H,B,z){var V,j=arguments.length,te=j<3?H:z===null?z=Object.getOwnPropertyDescriptor(H,B):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")te=Reflect.decorate(J,H,B,z);else for(var ue=J.length-1;ue>=0;ue--)(V=J[ue])&&(te=(j<3?V(te):j>3?V(H,B,te):V(H,B))||te);return j>3&&te&&Object.defineProperty(H,B,te),te},d=this&&this.__param||function(J,H){return function(B,z){H(B,z,J)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const u=c(2584),b=c(7116),w=c(2015),E=c(844),x=c(482),S=c(8437),_=c(8460),g=c(643),y=c(511),A=c(3734),M=c(2585),D=c(1480),T=c(6242),k=c(6351),R=c(5941),N={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function P(J,H){if(J>24)return H.setWinLines||!1;switch(J){case 1:return!!H.restoreWin;case 2:return!!H.minimizeWin;case 3:return!!H.setWinPosition;case 4:return!!H.setWinSizePixels;case 5:return!!H.raiseWin;case 6:return!!H.lowerWin;case 7:return!!H.refreshWin;case 8:return!!H.setWinSizeChars;case 9:return!!H.maximizeWin;case 10:return!!H.fullscreenWin;case 11:return!!H.getWinState;case 13:return!!H.getWinPosition;case 14:return!!H.getWinSizePixels;case 15:return!!H.getScreenSizePixels;case 16:return!!H.getCellSizePixels;case 18:return!!H.getWinSizeChars;case 19:return!!H.getScreenSizeChars;case 20:return!!H.getIconTitle;case 21:return!!H.getWinTitle;case 22:return!!H.pushTitle;case 23:return!!H.popTitle;case 24:return!!H.setWinLines}return!1}var F;(function(J){J[J.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",J[J.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(F||(a.WindowsOptionsReportType=F={}));let K=0;class W extends E.Disposable{getAttrData(){return this._curAttrData}constructor(H,B,z,V,j,te,ue,me,Y=new w.EscapeSequenceParser){super(),this._bufferService=H,this._charsetService=B,this._coreService=z,this._logService=V,this._optionsService=j,this._oscLinkService=te,this._coreMouseService=ue,this._unicodeService=me,this._parser=Y,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new x.StringToUtf32,this._utf8Decoder=new x.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=S.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=S.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new _.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new _.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new _.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new _.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new _.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new _.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new _.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new _.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new _.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new _.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new _.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new _.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new _.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new G(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((q=>this._activeBuffer=q.activeBuffer))),this._parser.setCsiHandlerFallback(((q,oe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(q),params:oe.toArray()})})),this._parser.setEscHandlerFallback((q=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(q)})})),this._parser.setExecuteHandlerFallback((q=>{this._logService.debug("Unknown EXECUTE code: ",{code:q})})),this._parser.setOscHandlerFallback(((q,oe,Z)=>{this._logService.debug("Unknown OSC code: ",{identifier:q,action:oe,data:Z})})),this._parser.setDcsHandlerFallback(((q,oe,Z)=>{oe==="HOOK"&&(Z=Z.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(q),action:oe,payload:Z})})),this._parser.setPrintHandler(((q,oe,Z)=>this.print(q,oe,Z))),this._parser.registerCsiHandler({final:"@"},(q=>this.insertChars(q))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(q=>this.scrollLeft(q))),this._parser.registerCsiHandler({final:"A"},(q=>this.cursorUp(q))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(q=>this.scrollRight(q))),this._parser.registerCsiHandler({final:"B"},(q=>this.cursorDown(q))),this._parser.registerCsiHandler({final:"C"},(q=>this.cursorForward(q))),this._parser.registerCsiHandler({final:"D"},(q=>this.cursorBackward(q))),this._parser.registerCsiHandler({final:"E"},(q=>this.cursorNextLine(q))),this._parser.registerCsiHandler({final:"F"},(q=>this.cursorPrecedingLine(q))),this._parser.registerCsiHandler({final:"G"},(q=>this.cursorCharAbsolute(q))),this._parser.registerCsiHandler({final:"H"},(q=>this.cursorPosition(q))),this._parser.registerCsiHandler({final:"I"},(q=>this.cursorForwardTab(q))),this._parser.registerCsiHandler({final:"J"},(q=>this.eraseInDisplay(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(q=>this.eraseInDisplay(q,!0))),this._parser.registerCsiHandler({final:"K"},(q=>this.eraseInLine(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(q=>this.eraseInLine(q,!0))),this._parser.registerCsiHandler({final:"L"},(q=>this.insertLines(q))),this._parser.registerCsiHandler({final:"M"},(q=>this.deleteLines(q))),this._parser.registerCsiHandler({final:"P"},(q=>this.deleteChars(q))),this._parser.registerCsiHandler({final:"S"},(q=>this.scrollUp(q))),this._parser.registerCsiHandler({final:"T"},(q=>this.scrollDown(q))),this._parser.registerCsiHandler({final:"X"},(q=>this.eraseChars(q))),this._parser.registerCsiHandler({final:"Z"},(q=>this.cursorBackwardTab(q))),this._parser.registerCsiHandler({final:"`"},(q=>this.charPosAbsolute(q))),this._parser.registerCsiHandler({final:"a"},(q=>this.hPositionRelative(q))),this._parser.registerCsiHandler({final:"b"},(q=>this.repeatPrecedingCharacter(q))),this._parser.registerCsiHandler({final:"c"},(q=>this.sendDeviceAttributesPrimary(q))),this._parser.registerCsiHandler({prefix:">",final:"c"},(q=>this.sendDeviceAttributesSecondary(q))),this._parser.registerCsiHandler({final:"d"},(q=>this.linePosAbsolute(q))),this._parser.registerCsiHandler({final:"e"},(q=>this.vPositionRelative(q))),this._parser.registerCsiHandler({final:"f"},(q=>this.hVPosition(q))),this._parser.registerCsiHandler({final:"g"},(q=>this.tabClear(q))),this._parser.registerCsiHandler({final:"h"},(q=>this.setMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(q=>this.setModePrivate(q))),this._parser.registerCsiHandler({final:"l"},(q=>this.resetMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(q=>this.resetModePrivate(q))),this._parser.registerCsiHandler({final:"m"},(q=>this.charAttributes(q))),this._parser.registerCsiHandler({final:"n"},(q=>this.deviceStatus(q))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(q=>this.deviceStatusPrivate(q))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(q=>this.softReset(q))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(q=>this.setCursorStyle(q))),this._parser.registerCsiHandler({final:"r"},(q=>this.setScrollRegion(q))),this._parser.registerCsiHandler({final:"s"},(q=>this.saveCursor(q))),this._parser.registerCsiHandler({final:"t"},(q=>this.windowOptions(q))),this._parser.registerCsiHandler({final:"u"},(q=>this.restoreCursor(q))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(q=>this.insertColumns(q))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(q=>this.deleteColumns(q))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(q=>this.selectProtected(q))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(q=>this.requestMode(q,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(q=>this.requestMode(q,!1))),this._parser.setExecuteHandler(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 T.OscHandler((q=>(this.setTitle(q),this.setIconName(q),!0)))),this._parser.registerOscHandler(1,new T.OscHandler((q=>this.setIconName(q)))),this._parser.registerOscHandler(2,new T.OscHandler((q=>this.setTitle(q)))),this._parser.registerOscHandler(4,new T.OscHandler((q=>this.setOrReportIndexedColor(q)))),this._parser.registerOscHandler(8,new T.OscHandler((q=>this.setHyperlink(q)))),this._parser.registerOscHandler(10,new T.OscHandler((q=>this.setOrReportFgColor(q)))),this._parser.registerOscHandler(11,new T.OscHandler((q=>this.setOrReportBgColor(q)))),this._parser.registerOscHandler(12,new T.OscHandler((q=>this.setOrReportCursorColor(q)))),this._parser.registerOscHandler(104,new T.OscHandler((q=>this.restoreIndexedColor(q)))),this._parser.registerOscHandler(110,new T.OscHandler((q=>this.restoreFgColor(q)))),this._parser.registerOscHandler(111,new T.OscHandler((q=>this.restoreBgColor(q)))),this._parser.registerOscHandler(112,new T.OscHandler((q=>this.restoreCursorColor(q)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const q in b.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:q},(()=>this.selectCharset("("+q))),this._parser.registerEscHandler({intermediates:")",final:q},(()=>this.selectCharset(")"+q))),this._parser.registerEscHandler({intermediates:"*",final:q},(()=>this.selectCharset("*"+q))),this._parser.registerEscHandler({intermediates:"+",final:q},(()=>this.selectCharset("+"+q))),this._parser.registerEscHandler({intermediates:"-",final:q},(()=>this.selectCharset("-"+q))),this._parser.registerEscHandler({intermediates:".",final:q},(()=>this.selectCharset("."+q))),this._parser.registerEscHandler({intermediates:"/",final:q},(()=>this.selectCharset("/"+q)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((q=>(this._logService.error("Parsing error: ",q),q))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new k.DcsHandler(((q,oe)=>this.requestStatusString(q,oe))))}_preserveStack(H,B,z,V){this._parseStack.paused=!0,this._parseStack.cursorStartX=H,this._parseStack.cursorStartY=B,this._parseStack.decodedLength=z,this._parseStack.position=V}_logSlowResolvingAsync(H){this._logService.logLevel<=M.LogLevelEnum.WARN&&Promise.race([H,new Promise(((B,z)=>setTimeout((()=>z("#SLOW_TIMEOUT")),5e3)))]).catch((B=>{if(B!=="#SLOW_TIMEOUT")throw B;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(H,B){let z,V=this._activeBuffer.x,j=this._activeBuffer.y,te=0;const ue=this._parseStack.paused;if(ue){if(z=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,B))return this._logSlowResolvingAsync(z),z;V=this._parseStack.cursorStartX,j=this._parseStack.cursorStartY,this._parseStack.paused=!1,H.length>I&&(te=this._parseStack.position+I)}if(this._logService.logLevel<=M.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof H=="string"?` "${H}"`:` "${Array.prototype.map.call(H,(q=>String.fromCharCode(q))).join("")}"`),typeof H=="string"?H.split("").map((q=>q.charCodeAt(0))):H),this._parseBuffer.length<H.length&&this._parseBuffer.length<I&&(this._parseBuffer=new Uint32Array(Math.min(H.length,I))),ue||this._dirtyRowTracker.clearRange(),H.length>I)for(let q=te;q<H.length;q+=I){const oe=q+I<H.length?q+I:H.length,Z=typeof H=="string"?this._stringDecoder.decode(H.substring(q,oe),this._parseBuffer):this._utf8Decoder.decode(H.subarray(q,oe),this._parseBuffer);if(z=this._parser.parse(this._parseBuffer,Z))return this._preserveStack(V,j,Z,q),this._logSlowResolvingAsync(z),z}else if(!ue){const q=typeof H=="string"?this._stringDecoder.decode(H,this._parseBuffer):this._utf8Decoder.decode(H,this._parseBuffer);if(z=this._parser.parse(this._parseBuffer,q))return this._preserveStack(V,j,q,0),this._logSlowResolvingAsync(z),z}this._activeBuffer.x===V&&this._activeBuffer.y===j||this._onCursorMove.fire();const me=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),Y=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);Y<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(Y,this._bufferService.rows-1),Math.min(me,this._bufferService.rows-1))}print(H,B,z){let V,j;const te=this._charsetService.charset,ue=this._optionsService.rawOptions.screenReaderMode,me=this._bufferService.cols,Y=this._coreService.decPrivateModes.wraparound,q=this._coreService.modes.insertMode,oe=this._curAttrData;let Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&z-B>0&&Z.getWidth(this._activeBuffer.x-1)===2&&Z.setCellFromCodepoint(this._activeBuffer.x-1,0,1,oe);let ie=this._parser.precedingJoinState;for(let de=B;de<z;++de){if(V=H[de],V<127&&te){const Je=te[String.fromCharCode(V)];Je&&(V=Je.charCodeAt(0))}const be=this._unicodeService.charProperties(V,ie);j=D.UnicodeService.extractWidth(be);const we=D.UnicodeService.extractShouldJoin(be),$e=we?D.UnicodeService.extractWidth(ie):0;if(ie=be,ue&&this._onA11yChar.fire((0,x.stringFromCodePoint)(V)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+j-$e>me){if(Y){const Je=Z;let De=this._activeBuffer.x-$e;for(this._activeBuffer.x=$e,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),Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),$e>0&&Z instanceof S.BufferLine&&Z.copyCellsFrom(Je,De,0,$e,!1);De<me;)Je.setCellFromCodepoint(De++,0,1,oe)}else if(this._activeBuffer.x=me-1,j===2)continue}if(we&&this._activeBuffer.x){const Je=Z.getWidth(this._activeBuffer.x-1)?1:2;Z.addCodepointToCell(this._activeBuffer.x-Je,V,j);for(let De=j-$e;--De>=0;)Z.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}else if(q&&(Z.insertCells(this._activeBuffer.x,j-$e,this._activeBuffer.getNullCell(oe)),Z.getWidth(me-1)===2&&Z.setCellFromCodepoint(me-1,g.NULL_CELL_CODE,g.NULL_CELL_WIDTH,oe)),Z.setCellFromCodepoint(this._activeBuffer.x++,V,j,oe),j>0)for(;--j;)Z.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}this._parser.precedingJoinState=ie,this._activeBuffer.x<me&&z-B>0&&Z.getWidth(this._activeBuffer.x)===0&&!Z.hasContent(this._activeBuffer.x)&&Z.setCellFromCodepoint(this._activeBuffer.x,0,1,oe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(H,B){return H.final!=="t"||H.prefix||H.intermediates?this._parser.registerCsiHandler(H,B):this._parser.registerCsiHandler(H,(z=>!P(z.params[0],this._optionsService.rawOptions.windowOptions)||B(z)))}registerDcsHandler(H,B){return this._parser.registerDcsHandler(H,new k.DcsHandler(B))}registerEscHandler(H,B){return this._parser.registerEscHandler(H,B)}registerOscHandler(H,B){return this._parser.registerOscHandler(H,new T.OscHandler(B))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var H;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&&((H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&H.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);B.hasWidth(this._activeBuffer.x)&&!B.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const H=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-H),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(H=this._bufferService.cols-1){this._activeBuffer.x=Math.min(H,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(H,B){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=H,this._activeBuffer.y=this._activeBuffer.scrollTop+B):(this._activeBuffer.x=H,this._activeBuffer.y=B),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(H,B){this._restrictCursor(),this._setCursor(this._activeBuffer.x+H,this._activeBuffer.y+B)}cursorUp(H){const B=this._activeBuffer.y-this._activeBuffer.scrollTop;return B>=0?this._moveCursor(0,-Math.min(B,H.params[0]||1)):this._moveCursor(0,-(H.params[0]||1)),!0}cursorDown(H){const B=this._activeBuffer.scrollBottom-this._activeBuffer.y;return B>=0?this._moveCursor(0,Math.min(B,H.params[0]||1)):this._moveCursor(0,H.params[0]||1),!0}cursorForward(H){return this._moveCursor(H.params[0]||1,0),!0}cursorBackward(H){return this._moveCursor(-(H.params[0]||1),0),!0}cursorNextLine(H){return this.cursorDown(H),this._activeBuffer.x=0,!0}cursorPrecedingLine(H){return this.cursorUp(H),this._activeBuffer.x=0,!0}cursorCharAbsolute(H){return this._setCursor((H.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(H){return this._setCursor(H.length>=2?(H.params[1]||1)-1:0,(H.params[0]||1)-1),!0}charPosAbsolute(H){return this._setCursor((H.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(H){return this._moveCursor(H.params[0]||1,0),!0}linePosAbsolute(H){return this._setCursor(this._activeBuffer.x,(H.params[0]||1)-1),!0}vPositionRelative(H){return this._moveCursor(0,H.params[0]||1),!0}hVPosition(H){return this.cursorPosition(H),!0}tabClear(H){const B=H.params[0];return B===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:B===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(H){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=H.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(H){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=H.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(H){const B=H.params[0];return B===1&&(this._curAttrData.bg|=536870912),B!==2&&B!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(H,B,z,V=!1,j=!1){const te=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);te.replaceCells(B,z,this._activeBuffer.getNullCell(this._eraseAttrData()),j),V&&(te.isWrapped=!1)}_resetBufferLine(H,B=!1){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);z&&(z.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),B),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+H),z.isWrapped=!1)}eraseInDisplay(H,B=!1){let z;switch(this._restrictCursor(this._bufferService.cols),H.params[0]){case 0:for(z=this._activeBuffer.y,this._dirtyRowTracker.markDirty(z),this._eraseInBufferLine(z++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,B);z<this._bufferService.rows;z++)this._resetBufferLine(z,B);this._dirtyRowTracker.markDirty(z);break;case 1:for(z=this._activeBuffer.y,this._dirtyRowTracker.markDirty(z),this._eraseInBufferLine(z,0,this._activeBuffer.x+1,!0,B),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(z+1).isWrapped=!1);z--;)this._resetBufferLine(z,B);this._dirtyRowTracker.markDirty(0);break;case 2:for(z=this._bufferService.rows,this._dirtyRowTracker.markDirty(z-1);z--;)this._resetBufferLine(z,B);this._dirtyRowTracker.markDirty(0);break;case 3:const V=this._activeBuffer.lines.length-this._bufferService.rows;V>0&&(this._activeBuffer.lines.trimStart(V),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-V,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-V,0),this._onScroll.fire(0))}return!0}eraseInLine(H,B=!1){switch(this._restrictCursor(this._bufferService.cols),H.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,B);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,B);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,B)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(H){this._restrictCursor();let B=H.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=this._activeBuffer.ybase+this._activeBuffer.y,V=this._bufferService.rows-1-this._activeBuffer.scrollBottom,j=this._bufferService.rows-1+this._activeBuffer.ybase-V+1;for(;B--;)this._activeBuffer.lines.splice(j-1,1),this._activeBuffer.lines.splice(z,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(H){this._restrictCursor();let B=H.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=this._activeBuffer.ybase+this._activeBuffer.y;let V;for(V=this._bufferService.rows-1-this._activeBuffer.scrollBottom,V=this._bufferService.rows-1+this._activeBuffer.ybase-V;B--;)this._activeBuffer.lines.splice(z,1),this._activeBuffer.lines.splice(V,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(H){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.insertCells(this._activeBuffer.x,H.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(H){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.deleteCells(this._activeBuffer.x,H.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(H){let B=H.params[0]||1;for(;B--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(H){let B=H.params[0]||1;for(;B--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(S.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=H.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);V.deleteCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData())),V.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=H.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);V.insertCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData())),V.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=H.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);V.insertCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData())),V.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=H.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);V.deleteCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData())),V.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(H){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(H.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(H){const B=this._parser.precedingJoinState;if(!B)return!0;const z=H.params[0]||1,V=D.UnicodeService.extractWidth(B),j=this._activeBuffer.x-V,te=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(j),ue=new Uint32Array(te.length*z);let me=0;for(let q=0;q<te.length;){const oe=te.codePointAt(q)||0;ue[me++]=oe,q+=oe>65535?2:1}let Y=me;for(let q=1;q<z;++q)ue.copyWithin(Y,0,me),Y+=me;return this.print(ue,0,Y),!0}sendDeviceAttributesPrimary(H){return H.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(H){return H.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(H.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(H){return(this._optionsService.rawOptions.termName+"").indexOf(H)===0}setMode(H){for(let B=0;B<H.length;B++)switch(H.params[B]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(H){for(let B=0;B<H.length;B++)switch(H.params[B]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,b.DEFAULT_CHARSET),this._charsetService.setgCharset(1,b.DEFAULT_CHARSET),this._charsetService.setgCharset(2,b.DEFAULT_CHARSET),this._charsetService.setgCharset(3,b.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(H){for(let B=0;B<H.length;B++)switch(H.params[B]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(H){for(let B=0;B<H.length;B++)switch(H.params[B]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),H.params[B]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(H,B){const z=this._coreService.decPrivateModes,{activeProtocol:V,activeEncoding:j}=this._coreMouseService,te=this._coreService,{buffers:ue,cols:me}=this._bufferService,{active:Y,alt:q}=ue,oe=this._optionsService.rawOptions,Z=we=>we?1:2,ie=H.params[0];return de=ie,be=B?ie===2?4:ie===4?Z(te.modes.insertMode):ie===12?3:ie===20?Z(oe.convertEol):0:ie===1?Z(z.applicationCursorKeys):ie===3?oe.windowOptions.setWinLines?me===80?2:me===132?1:0:0:ie===6?Z(z.origin):ie===7?Z(z.wraparound):ie===8?3:ie===9?Z(V==="X10"):ie===12?Z(oe.cursorBlink):ie===25?Z(!te.isCursorHidden):ie===45?Z(z.reverseWraparound):ie===66?Z(z.applicationKeypad):ie===67?4:ie===1e3?Z(V==="VT200"):ie===1002?Z(V==="DRAG"):ie===1003?Z(V==="ANY"):ie===1004?Z(z.sendFocus):ie===1005?4:ie===1006?Z(j==="SGR"):ie===1015?4:ie===1016?Z(j==="SGR_PIXELS"):ie===1048?1:ie===47||ie===1047||ie===1049?Z(Y===q):ie===2004?Z(z.bracketedPasteMode):0,te.triggerDataEvent(`${u.C0.ESC}[${B?"":"?"}${de};${be}$y`),!0;var de,be}_updateAttrColor(H,B,z,V,j){return B===2?(H|=50331648,H&=-16777216,H|=A.AttributeData.fromColorRGB([z,V,j])):B===5&&(H&=-50331904,H|=33554432|255&z),H}_extractColor(H,B,z){const V=[0,0,-1,0,0,0];let j=0,te=0;do{if(V[te+j]=H.params[B+te],H.hasSubParams(B+te)){const ue=H.getSubParams(B+te);let me=0;do V[1]===5&&(j=1),V[te+me+1+j]=ue[me];while(++me<ue.length&&me+te+1+j<V.length);break}if(V[1]===5&&te+j>=2||V[1]===2&&te+j>=5)break;V[1]&&(j=1)}while(++te+B<H.length&&te+j<V.length);for(let ue=2;ue<V.length;++ue)V[ue]===-1&&(V[ue]=0);switch(V[0]){case 38:z.fg=this._updateAttrColor(z.fg,V[1],V[3],V[4],V[5]);break;case 48:z.bg=this._updateAttrColor(z.bg,V[1],V[3],V[4],V[5]);break;case 58:z.extended=z.extended.clone(),z.extended.underlineColor=this._updateAttrColor(z.extended.underlineColor,V[1],V[3],V[4],V[5])}return te}_processUnderline(H,B){B.extended=B.extended.clone(),(!~H||H>5)&&(H=1),B.extended.underlineStyle=H,B.fg|=268435456,H===0&&(B.fg&=-268435457),B.updateExtended()}_processSGR0(H){H.fg=S.DEFAULT_ATTR_DATA.fg,H.bg=S.DEFAULT_ATTR_DATA.bg,H.extended=H.extended.clone(),H.extended.underlineStyle=0,H.extended.underlineColor&=-67108864,H.updateExtended()}charAttributes(H){if(H.length===1&&H.params[0]===0)return this._processSGR0(this._curAttrData),!0;const B=H.length;let z;const V=this._curAttrData;for(let j=0;j<B;j++)z=H.params[j],z>=30&&z<=37?(V.fg&=-50331904,V.fg|=16777216|z-30):z>=40&&z<=47?(V.bg&=-50331904,V.bg|=16777216|z-40):z>=90&&z<=97?(V.fg&=-50331904,V.fg|=16777224|z-90):z>=100&&z<=107?(V.bg&=-50331904,V.bg|=16777224|z-100):z===0?this._processSGR0(V):z===1?V.fg|=134217728:z===3?V.bg|=67108864:z===4?(V.fg|=268435456,this._processUnderline(H.hasSubParams(j)?H.getSubParams(j)[0]:1,V)):z===5?V.fg|=536870912:z===7?V.fg|=67108864:z===8?V.fg|=1073741824:z===9?V.fg|=2147483648:z===2?V.bg|=134217728:z===21?this._processUnderline(2,V):z===22?(V.fg&=-134217729,V.bg&=-134217729):z===23?V.bg&=-67108865:z===24?(V.fg&=-268435457,this._processUnderline(0,V)):z===25?V.fg&=-536870913:z===27?V.fg&=-67108865:z===28?V.fg&=-1073741825:z===29?V.fg&=2147483647:z===39?(V.fg&=-67108864,V.fg|=16777215&S.DEFAULT_ATTR_DATA.fg):z===49?(V.bg&=-67108864,V.bg|=16777215&S.DEFAULT_ATTR_DATA.bg):z===38||z===48||z===58?j+=this._extractColor(H,j,V):z===53?V.bg|=1073741824:z===55?V.bg&=-1073741825:z===59?(V.extended=V.extended.clone(),V.extended.underlineColor=-1,V.updateExtended()):z===100?(V.fg&=-67108864,V.fg|=16777215&S.DEFAULT_ATTR_DATA.fg,V.bg&=-67108864,V.bg|=16777215&S.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",z);return!0}deviceStatus(H){switch(H.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:const B=this._activeBuffer.y+1,z=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${B};${z}R`)}return!0}deviceStatusPrivate(H){if(H.params[0]===6){const B=this._activeBuffer.y+1,z=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${B};${z}R`)}return!0}softReset(H){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=S.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(H){const B=H.params[0]||1;switch(B){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const z=B%2==1;return this._optionsService.options.cursorBlink=z,!0}setScrollRegion(H){const B=H.params[0]||1;let z;return(H.length<2||(z=H.params[1])>this._bufferService.rows||z===0)&&(z=this._bufferService.rows),z>B&&(this._activeBuffer.scrollTop=B-1,this._activeBuffer.scrollBottom=z-1,this._setCursor(0,0)),!0}windowOptions(H){if(!P(H.params[0],this._optionsService.rawOptions.windowOptions))return!0;const B=H.length>1?H.params[1]:0;switch(H.params[0]){case 14:B!==2&&this._onRequestWindowsOptionsReport.fire(F.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(F.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:B!==0&&B!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),B!==0&&B!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:B!==0&&B!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),B!==0&&B!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(H){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(H){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(H){return this._windowTitle=H,this._onTitleChange.fire(H),!0}setIconName(H){return this._iconName=H,!0}setOrReportIndexedColor(H){const B=[],z=H.split(";");for(;z.length>1;){const V=z.shift(),j=z.shift();if(/^\d+$/.exec(V)){const te=parseInt(V);if($(te))if(j==="?")B.push({type:0,index:te});else{const ue=(0,R.parseColor)(j);ue&&B.push({type:1,index:te,color:ue})}}}return B.length&&this._onColor.fire(B),!0}setHyperlink(H){const B=H.split(";");return!(B.length<2)&&(B[1]?this._createHyperlink(B[0],B[1]):!B[0]&&this._finishHyperlink())}_createHyperlink(H,B){this._getCurrentLinkId()&&this._finishHyperlink();const z=H.split(":");let V;const j=z.findIndex((te=>te.startsWith("id=")));return j!==-1&&(V=z[j].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:V,uri:B}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(H,B){const z=H.split(";");for(let V=0;V<z.length&&!(B>=this._specialColors.length);++V,++B)if(z[V]==="?")this._onColor.fire([{type:0,index:this._specialColors[B]}]);else{const j=(0,R.parseColor)(z[V]);j&&this._onColor.fire([{type:1,index:this._specialColors[B],color:j}])}return!0}setOrReportFgColor(H){return this._setOrReportSpecialColor(H,0)}setOrReportBgColor(H){return this._setOrReportSpecialColor(H,1)}setOrReportCursorColor(H){return this._setOrReportSpecialColor(H,2)}restoreIndexedColor(H){if(!H)return this._onColor.fire([{type:2}]),!0;const B=[],z=H.split(";");for(let V=0;V<z.length;++V)if(/^\d+$/.exec(z[V])){const j=parseInt(z[V]);$(j)&&B.push({type:2,index:j})}return B.length&&this._onColor.fire(B),!0}restoreFgColor(H){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(H){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(H){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,b.DEFAULT_CHARSET),!0}selectCharset(H){return H.length!==2?(this.selectDefaultCharset(),!0):(H[0]==="/"||this._charsetService.setgCharset(N[H[0]],b.CHARSETS[H[1]]||b.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 H=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,H,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=S.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=S.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(H){return this._charsetService.setgLevel(H),!0}screenAlignmentPattern(){const H=new y.CellData;H.content=4194373,H.fg=this._curAttrData.fg,H.bg=this._curAttrData.bg,this._setCursor(0,0);for(let B=0;B<this._bufferService.rows;++B){const z=this._activeBuffer.ybase+this._activeBuffer.y+B,V=this._activeBuffer.lines.get(z);V&&(V.fill(H),V.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(H,B){const z=this._bufferService.buffer,V=this._optionsService.rawOptions;return(j=>(this._coreService.triggerDataEvent(`${u.C0.ESC}${j}${u.C0.ESC}\\`),!0))(H==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:H==='"p'?'P1$r61;1"p':H==="r"?`P1$r${z.scrollTop+1};${z.scrollBottom+1}r`:H==="m"?"P1$r0m":H===" q"?`P1$r${{block:2,underline:4,bar:6}[V.cursorStyle]-(V.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(H,B){this._dirtyRowTracker.markRangeDirty(H,B)}}a.InputHandler=W;let G=class{constructor(J){this._bufferService=J,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(J){J<this.start?this.start=J:J>this.end&&(this.end=J)}markRangeDirty(J,H){J>H&&(K=J,J=H,H=K),J<this.start&&(this.start=J),H>this.end&&(this.end=H)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function $(J){return 0<=J&&J<256}G=h([d(0,M.IBufferService)],G)},844:(f,a)=>{function c(h){for(const d of h)d.dispose();h.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const h of this._disposables)h.dispose();this._disposables.length=0}register(h){return this._disposables.push(h),h}unregister(h){const d=this._disposables.indexOf(h);d!==-1&&this._disposables.splice(d,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(h){var d;this._isDisposed||h===this._value||((d=this._value)==null||d.dispose(),this._value=h)}clear(){this.value=void 0}dispose(){var h;this._isDisposed=!0,(h=this._value)==null||h.dispose(),this._value=void 0}},a.toDisposable=function(h){return{dispose:h}},a.disposeArray=c,a.getDisposeArrayDisposable=function(h){return{dispose:()=>c(h)}}},1505:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(d,u,b){this._data[d]||(this._data[d]={}),this._data[d][u]=b}get(d,u){return this._data[d]?this._data[d][u]:void 0}clear(){this._data={}}}a.TwoKeyMap=c,a.FourKeyMap=class{constructor(){this._data=new c}set(h,d,u,b,w){this._data.get(h,d)||this._data.set(h,d,new c),this._data.get(h,d).set(u,b,w)}get(h,d,u,b){var w;return(w=this._data.get(h,d))==null?void 0:w.get(u,b)}clear(){this._data.clear()}}},6114:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const c=a.isNode?"node":navigator.userAgent,h=a.isNode?"node":navigator.platform;a.isFirefox=c.includes("Firefox"),a.isLegacyEdge=c.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(c),a.getSafariVersion=function(){if(!a.isSafari)return 0;const d=c.match(/Version\/(\d+)/);return d===null||d.length<2?0:parseInt(d[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(h),a.isIpad=h==="iPad",a.isIphone=h==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(h),a.isLinux=h.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(c)},6106:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let c=0;a.SortedList=class{constructor(h){this._getKey=h,this._array=[]}clear(){this._array.length=0}insert(h){this._array.length!==0?(c=this._search(this._getKey(h)),this._array.splice(c,0,h)):this._array.push(h)}delete(h){if(this._array.length===0)return!1;const d=this._getKey(h);if(d===void 0||(c=this._search(d),c===-1)||this._getKey(this._array[c])!==d)return!1;do if(this._array[c]===h)return this._array.splice(c,1),!0;while(++c<this._array.length&&this._getKey(this._array[c])===d);return!1}*getKeyIterator(h){if(this._array.length!==0&&(c=this._search(h),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===h))do yield this._array[c];while(++c<this._array.length&&this._getKey(this._array[c])===h)}forEachByKey(h,d){if(this._array.length!==0&&(c=this._search(h),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===h))do d(this._array[c]);while(++c<this._array.length&&this._getKey(this._array[c])===h)}values(){return[...this._array].values()}_search(h){let d=0,u=this._array.length-1;for(;u>=d;){let b=d+u>>1;const w=this._getKey(this._array[b]);if(w>h)u=b-1;else{if(!(w<h)){for(;b>0&&this._getKey(this._array[b-1])===h;)b--;return b}d=b+1}}return d}}},7226:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const h=c(6114);class d{constructor(){this._tasks=[],this._i=0}enqueue(w){this._tasks.push(w),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(w){this._idleCallback=void 0;let E=0,x=0,S=w.timeRemaining(),_=0;for(;this._i<this._tasks.length;){if(E=Date.now(),this._tasks[this._i]()||this._i++,E=Math.max(1,Date.now()-E),x=Math.max(E,x),_=w.timeRemaining(),1.5*x>_)return S-E<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(S-E))}ms`),void this._start();S=_}this.clear()}}class u extends d{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const E=Date.now()+w;return{timeRemaining:()=>Math.max(0,E-Date.now())}}}a.PriorityTaskQueue=u,a.IdleTaskQueue=!h.isNode&&"requestIdleCallback"in window?class extends d{_requestCallback(b){return requestIdleCallback(b)}_cancelCallback(b){cancelIdleCallback(b)}}:u,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(b){this._queue.clear(),this._queue.enqueue(b)}flush(){this._queue.flush()}}},9282:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const h=c(643);a.updateWindowsModeWrappedState=function(d){const u=d.buffer.lines.get(d.buffer.ybase+d.buffer.y-1),b=u==null?void 0:u.get(d.cols-1),w=d.buffer.lines.get(d.buffer.ybase+d.buffer.y);w&&b&&(w.isWrapped=b[h.CHAR_DATA_CODE_INDEX]!==h.NULL_CELL_CODE&&b[h.CHAR_DATA_CODE_INDEX]!==h.WHITESPACE_CELL_CODE)}},3734:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new h}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 c;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}}a.AttributeData=c;class h{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,b=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=b}clone(){return new h(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=h},9092:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const h=c(6349),d=c(7226),u=c(3734),b=c(8437),w=c(4634),E=c(511),x=c(643),S=c(4863),_=c(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(g,y,A){this._hasScrollback=g,this._optionsService=y,this._bufferService=A,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=b.DEFAULT_ATTR_DATA.clone(),this.savedCharset=_.DEFAULT_CHARSET,this.markers=[],this._nullCell=E.CellData.fromCharData([0,x.NULL_CELL_CHAR,x.NULL_CELL_WIDTH,x.NULL_CELL_CODE]),this._whitespaceCell=E.CellData.fromCharData([0,x.WHITESPACE_CELL_CHAR,x.WHITESPACE_CELL_WIDTH,x.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new d.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(g){return g?(this._nullCell.fg=g.fg,this._nullCell.bg=g.bg,this._nullCell.extended=g.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new u.ExtendedAttrs),this._nullCell}getWhitespaceCell(g){return g?(this._whitespaceCell.fg=g.fg,this._whitespaceCell.bg=g.bg,this._whitespaceCell.extended=g.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new u.ExtendedAttrs),this._whitespaceCell}getBlankLine(g,y){return new b.BufferLine(this._bufferService.cols,this.getNullCell(g),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const g=this.ybase+this.y-this.ydisp;return g>=0&&g<this._rows}_getCorrectBufferLength(g){if(!this._hasScrollback)return g;const y=g+this._optionsService.rawOptions.scrollback;return y>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:y}fillViewportRows(g){if(this.lines.length===0){g===void 0&&(g=b.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(g))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(g,y){const A=this.getNullCell(b.DEFAULT_ATTR_DATA);let M=0;const D=this._getCorrectBufferLength(y);if(D>this.lines.maxLength&&(this.lines.maxLength=D),this.lines.length>0){if(this._cols<g)for(let k=0;k<this.lines.length;k++)M+=+this.lines.get(k).resize(g,A);let T=0;if(this._rows<y)for(let k=this._rows;k<y;k++)this.lines.length<y+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new b.BufferLine(g,A)):this.ybase>0&&this.lines.length<=this.ybase+this.y+T+1?(this.ybase--,T++,this.ydisp>0&&this.ydisp--):this.lines.push(new b.BufferLine(g,A)));else for(let k=this._rows;k>y;k--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(D<this.lines.maxLength){const k=this.lines.length-D;k>0&&(this.lines.trimStart(k),this.ybase=Math.max(this.ybase-k,0),this.ydisp=Math.max(this.ydisp-k,0),this.savedY=Math.max(this.savedY-k,0)),this.lines.maxLength=D}this.x=Math.min(this.x,g-1),this.y=Math.min(this.y,y-1),T&&(this.y+=T),this.savedX=Math.min(this.savedX,g-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(g,y),this._cols>g))for(let T=0;T<this.lines.length;T++)M+=+this.lines.get(T).resize(g,A);this._cols=g,this._rows=y,this._memoryCleanupQueue.clear(),M>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let g=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,g=!1);let y=0;for(;this._memoryCleanupPosition<this.lines.length;)if(y+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),y>100)return!0;return g}get _isReflowEnabled(){const g=this._optionsService.rawOptions.windowsPty;return g&&g.buildNumber?this._hasScrollback&&g.backend==="conpty"&&g.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(g,y){this._cols!==g&&(g>this._cols?this._reflowLarger(g,y):this._reflowSmaller(g,y))}_reflowLarger(g,y){const A=(0,w.reflowLargerGetLinesToRemove)(this.lines,this._cols,g,this.ybase+this.y,this.getNullCell(b.DEFAULT_ATTR_DATA));if(A.length>0){const M=(0,w.reflowLargerCreateNewLayout)(this.lines,A);(0,w.reflowLargerApplyNewLayout)(this.lines,M.layout),this._reflowLargerAdjustViewport(g,y,M.countRemoved)}}_reflowLargerAdjustViewport(g,y,A){const M=this.getNullCell(b.DEFAULT_ATTR_DATA);let D=A;for(;D-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<y&&this.lines.push(new b.BufferLine(g,M))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-A,0)}_reflowSmaller(g,y){const A=this.getNullCell(b.DEFAULT_ATTR_DATA),M=[];let D=0;for(let T=this.lines.length-1;T>=0;T--){let k=this.lines.get(T);if(!k||!k.isWrapped&&k.getTrimmedLength()<=g)continue;const R=[k];for(;k.isWrapped&&T>0;)k=this.lines.get(--T),R.unshift(k);const N=this.ybase+this.y;if(N>=T&&N<T+R.length)continue;const I=R[R.length-1].getTrimmedLength(),P=(0,w.reflowSmallerGetNewLineLengths)(R,this._cols,g),F=P.length-R.length;let K;K=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+F):Math.max(0,this.lines.length-this.lines.maxLength+F);const W=[];for(let z=0;z<F;z++){const V=this.getBlankLine(b.DEFAULT_ATTR_DATA,!0);W.push(V)}W.length>0&&(M.push({start:T+R.length+D,newLines:W}),D+=W.length),R.push(...W);let G=P.length-1,$=P[G];$===0&&(G--,$=P[G]);let J=R.length-F-1,H=I;for(;J>=0;){const z=Math.min(H,$);if(R[G]===void 0)break;if(R[G].copyCellsFrom(R[J],H-z,$-z,z,!0),$-=z,$===0&&(G--,$=P[G]),H-=z,H===0){J--;const V=Math.max(J,0);H=(0,w.getWrappedLineTrimmedLength)(R,V,this._cols)}}for(let z=0;z<R.length;z++)P[z]<g&&R[z].setCell(P[z],A);let B=F-K;for(;B-- >0;)this.ybase===0?this.y<y-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+D)-y&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+F,this.ybase+y-1)}if(M.length>0){const T=[],k=[];for(let G=0;G<this.lines.length;G++)k.push(this.lines.get(G));const R=this.lines.length;let N=R-1,I=0,P=M[I];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+D);let F=0;for(let G=Math.min(this.lines.maxLength-1,R+D-1);G>=0;G--)if(P&&P.start>N+F){for(let $=P.newLines.length-1;$>=0;$--)this.lines.set(G--,P.newLines[$]);G++,T.push({index:N+1,amount:P.newLines.length}),F+=P.newLines.length,P=M[++I]}else this.lines.set(G,k[N--]);let K=0;for(let G=T.length-1;G>=0;G--)T[G].index+=K,this.lines.onInsertEmitter.fire(T[G]),K+=T[G].amount;const W=Math.max(0,R+D-this.lines.maxLength);W>0&&this.lines.onTrimEmitter.fire(W)}}translateBufferLineToString(g,y,A=0,M){const D=this.lines.get(g);return D?D.translateToString(y,A,M):""}getWrappedRangeForLine(g){let y=g,A=g;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;A+1<this.lines.length&&this.lines.get(A+1).isWrapped;)A++;return{first:y,last:A}}setupTabStops(g){for(g!=null?this.tabs[g]||(g=this.prevStop(g)):(this.tabs={},g=0);g<this._cols;g+=this._optionsService.rawOptions.tabStopWidth)this.tabs[g]=!0}prevStop(g){for(g==null&&(g=this.x);!this.tabs[--g]&&g>0;);return g>=this._cols?this._cols-1:g<0?0:g}nextStop(g){for(g==null&&(g=this.x);!this.tabs[++g]&&g<this._cols;);return g>=this._cols?this._cols-1:g<0?0:g}clearMarkers(g){this._isClearing=!0;for(let y=0;y<this.markers.length;y++)this.markers[y].line===g&&(this.markers[y].dispose(),this.markers.splice(y--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let g=0;g<this.markers.length;g++)this.markers[g].dispose(),this.markers.splice(g--,1);this._isClearing=!1}addMarker(g){const y=new S.Marker(g);return this.markers.push(y),y.register(this.lines.onTrim((A=>{y.line-=A,y.line<0&&y.dispose()}))),y.register(this.lines.onInsert((A=>{y.line>=A.index&&(y.line+=A.amount)}))),y.register(this.lines.onDelete((A=>{y.line>=A.index&&y.line<A.index+A.amount&&y.dispose(),y.line>A.index&&(y.line-=A.amount)}))),y.register(y.onDispose((()=>this._removeMarker(y)))),y}_removeMarker(g){this._isClearing||this.markers.splice(this.markers.indexOf(g),1)}}},8437:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const h=c(3734),d=c(511),u=c(643),b=c(482);a.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);let w=0;class E{constructor(S,_,g=!1){this.isWrapped=g,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*S);const y=_||d.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let A=0;A<S;++A)this.setCell(A,y);this.length=S}get(S){const _=this._data[3*S+0],g=2097151&_;return[this._data[3*S+1],2097152&_?this._combined[S]:g?(0,b.stringFromCodePoint)(g):"",_>>22,2097152&_?this._combined[S].charCodeAt(this._combined[S].length-1):g]}set(S,_){this._data[3*S+1]=_[u.CHAR_DATA_ATTR_INDEX],_[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[S]=_[1],this._data[3*S+0]=2097152|S|_[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*S+0]=_[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|_[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(S){return this._data[3*S+0]>>22}hasWidth(S){return 12582912&this._data[3*S+0]}getFg(S){return this._data[3*S+1]}getBg(S){return this._data[3*S+2]}hasContent(S){return 4194303&this._data[3*S+0]}getCodePoint(S){const _=this._data[3*S+0];return 2097152&_?this._combined[S].charCodeAt(this._combined[S].length-1):2097151&_}isCombined(S){return 2097152&this._data[3*S+0]}getString(S){const _=this._data[3*S+0];return 2097152&_?this._combined[S]:2097151&_?(0,b.stringFromCodePoint)(2097151&_):""}isProtected(S){return 536870912&this._data[3*S+2]}loadCell(S,_){return w=3*S,_.content=this._data[w+0],_.fg=this._data[w+1],_.bg=this._data[w+2],2097152&_.content&&(_.combinedData=this._combined[S]),268435456&_.bg&&(_.extended=this._extendedAttrs[S]),_}setCell(S,_){2097152&_.content&&(this._combined[S]=_.combinedData),268435456&_.bg&&(this._extendedAttrs[S]=_.extended),this._data[3*S+0]=_.content,this._data[3*S+1]=_.fg,this._data[3*S+2]=_.bg}setCellFromCodepoint(S,_,g,y){268435456&y.bg&&(this._extendedAttrs[S]=y.extended),this._data[3*S+0]=_|g<<22,this._data[3*S+1]=y.fg,this._data[3*S+2]=y.bg}addCodepointToCell(S,_,g){let y=this._data[3*S+0];2097152&y?this._combined[S]+=(0,b.stringFromCodePoint)(_):2097151&y?(this._combined[S]=(0,b.stringFromCodePoint)(2097151&y)+(0,b.stringFromCodePoint)(_),y&=-2097152,y|=2097152):y=_|4194304,g&&(y&=-12582913,y|=g<<22),this._data[3*S+0]=y}insertCells(S,_,g){if((S%=this.length)&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,g),_<this.length-S){const y=new d.CellData;for(let A=this.length-S-_-1;A>=0;--A)this.setCell(S+_+A,this.loadCell(S+A,y));for(let A=0;A<_;++A)this.setCell(S+A,g)}else for(let y=S;y<this.length;++y)this.setCell(y,g);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,g)}deleteCells(S,_,g){if(S%=this.length,_<this.length-S){const y=new d.CellData;for(let A=0;A<this.length-S-_;++A)this.setCell(S+A,this.loadCell(S+_+A,y));for(let A=this.length-_;A<this.length;++A)this.setCell(A,g)}else for(let y=S;y<this.length;++y)this.setCell(y,g);S&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,g),this.getWidth(S)!==0||this.hasContent(S)||this.setCellFromCodepoint(S,0,1,g)}replaceCells(S,_,g,y=!1){if(y)for(S&&this.getWidth(S-1)===2&&!this.isProtected(S-1)&&this.setCellFromCodepoint(S-1,0,1,g),_<this.length&&this.getWidth(_-1)===2&&!this.isProtected(_)&&this.setCellFromCodepoint(_,0,1,g);S<_&&S<this.length;)this.isProtected(S)||this.setCell(S,g),S++;else for(S&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,g),_<this.length&&this.getWidth(_-1)===2&&this.setCellFromCodepoint(_,0,1,g);S<_&&S<this.length;)this.setCell(S++,g)}resize(S,_){if(S===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const g=3*S;if(S>this.length){if(this._data.buffer.byteLength>=4*g)this._data=new Uint32Array(this._data.buffer,0,g);else{const y=new Uint32Array(g);y.set(this._data),this._data=y}for(let y=this.length;y<S;++y)this.setCell(y,_)}else{this._data=this._data.subarray(0,g);const y=Object.keys(this._combined);for(let M=0;M<y.length;M++){const D=parseInt(y[M],10);D>=S&&delete this._combined[D]}const A=Object.keys(this._extendedAttrs);for(let M=0;M<A.length;M++){const D=parseInt(A[M],10);D>=S&&delete this._extendedAttrs[D]}}return this.length=S,4*g*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const S=new Uint32Array(this._data.length);return S.set(this._data),this._data=S,1}return 0}fill(S,_=!1){if(_)for(let g=0;g<this.length;++g)this.isProtected(g)||this.setCell(g,S);else{this._combined={},this._extendedAttrs={};for(let g=0;g<this.length;++g)this.setCell(g,S)}}copyFrom(S){this.length!==S.length?this._data=new Uint32Array(S._data):this._data.set(S._data),this.length=S.length,this._combined={};for(const _ in S._combined)this._combined[_]=S._combined[_];this._extendedAttrs={};for(const _ in S._extendedAttrs)this._extendedAttrs[_]=S._extendedAttrs[_];this.isWrapped=S.isWrapped}clone(){const S=new E(0);S._data=new Uint32Array(this._data),S.length=this.length;for(const _ in this._combined)S._combined[_]=this._combined[_];for(const _ in this._extendedAttrs)S._extendedAttrs[_]=this._extendedAttrs[_];return S.isWrapped=this.isWrapped,S}getTrimmedLength(){for(let S=this.length-1;S>=0;--S)if(4194303&this._data[3*S+0])return S+(this._data[3*S+0]>>22);return 0}getNoBgTrimmedLength(){for(let S=this.length-1;S>=0;--S)if(4194303&this._data[3*S+0]||50331648&this._data[3*S+2])return S+(this._data[3*S+0]>>22);return 0}copyCellsFrom(S,_,g,y,A){const M=S._data;if(A)for(let T=y-1;T>=0;T--){for(let k=0;k<3;k++)this._data[3*(g+T)+k]=M[3*(_+T)+k];268435456&M[3*(_+T)+2]&&(this._extendedAttrs[g+T]=S._extendedAttrs[_+T])}else for(let T=0;T<y;T++){for(let k=0;k<3;k++)this._data[3*(g+T)+k]=M[3*(_+T)+k];268435456&M[3*(_+T)+2]&&(this._extendedAttrs[g+T]=S._extendedAttrs[_+T])}const D=Object.keys(S._combined);for(let T=0;T<D.length;T++){const k=parseInt(D[T],10);k>=_&&(this._combined[k-_+g]=S._combined[k])}}translateToString(S,_,g,y){_=_??0,g=g??this.length,S&&(g=Math.min(g,this.getTrimmedLength())),y&&(y.length=0);let A="";for(;_<g;){const M=this._data[3*_+0],D=2097151&M,T=2097152&M?this._combined[_]:D?(0,b.stringFromCodePoint)(D):u.WHITESPACE_CELL_CHAR;if(A+=T,y)for(let k=0;k<T.length;++k)y.push(_);_+=M>>22||1}return y&&y.push(_),A}}a.BufferLine=E},4841:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(c,h){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return h*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(f,a)=>{function c(h,d,u){if(d===h.length-1)return h[d].getTrimmedLength();const b=!h[d].hasContent(u-1)&&h[d].getWidth(u-1)===1,w=h[d+1].getWidth(0)===2;return b&&w?u-1:u}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(h,d,u,b,w){const E=[];for(let x=0;x<h.length-1;x++){let S=x,_=h.get(++S);if(!_.isWrapped)continue;const g=[h.get(x)];for(;S<h.length&&_.isWrapped;)g.push(_),_=h.get(++S);if(b>=x&&b<S){x+=g.length-1;continue}let y=0,A=c(g,y,d),M=1,D=0;for(;M<g.length;){const k=c(g,M,d),R=k-D,N=u-A,I=Math.min(R,N);g[y].copyCellsFrom(g[M],D,A,I,!1),A+=I,A===u&&(y++,A=0),D+=I,D===k&&(M++,D=0),A===0&&y!==0&&g[y-1].getWidth(u-1)===2&&(g[y].copyCellsFrom(g[y-1],u-1,A++,1,!1),g[y-1].setCell(u-1,w))}g[y].replaceCells(A,u,w);let T=0;for(let k=g.length-1;k>0&&(k>y||g[k].getTrimmedLength()===0);k--)T++;T>0&&(E.push(x+g.length-T),E.push(T)),x+=g.length-1}return E},a.reflowLargerCreateNewLayout=function(h,d){const u=[];let b=0,w=d[b],E=0;for(let x=0;x<h.length;x++)if(w===x){const S=d[++b];h.onDeleteEmitter.fire({index:x-E,amount:S}),x+=S-1,E+=S,w=d[++b]}else u.push(x);return{layout:u,countRemoved:E}},a.reflowLargerApplyNewLayout=function(h,d){const u=[];for(let b=0;b<d.length;b++)u.push(h.get(d[b]));for(let b=0;b<u.length;b++)h.set(b,u[b]);h.length=d.length},a.reflowSmallerGetNewLineLengths=function(h,d,u){const b=[],w=h.map(((_,g)=>c(h,g,d))).reduce(((_,g)=>_+g));let E=0,x=0,S=0;for(;S<w;){if(w-S<u){b.push(w-S);break}E+=u;const _=c(h,x,d);E>_&&(E-=_,x++);const g=h[x].getWidth(E-1)===2;g&&E--;const y=g?u-1:u;b.push(y),S+=y}return b},a.getWrappedLineTrimmedLength=c},5295:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const h=c(8460),d=c(844),u=c(9092);class b extends d.Disposable{constructor(E,x){super(),this._optionsService=E,this._bufferService=x,this._onBufferActivate=this.register(new h.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(E){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(E),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(E,x){this._normal.resize(E,x),this._alt.resize(E,x),this.setupTabStops(E)}setupTabStops(E){this._normal.setupTabStops(E),this._alt.setupTabStops(E)}}a.BufferSet=b},511:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const h=c(482),d=c(643),u=c(3734);class b extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(E){const x=new b;return x.setFromCharData(E),x}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,h.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(E){this.fg=E[d.CHAR_DATA_ATTR_INDEX],this.bg=0;let x=!1;if(E[d.CHAR_DATA_CHAR_INDEX].length>2)x=!0;else if(E[d.CHAR_DATA_CHAR_INDEX].length===2){const S=E[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=S&&S<=56319){const _=E[d.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=_&&_<=57343?this.content=1024*(S-55296)+_-56320+65536|E[d.CHAR_DATA_WIDTH_INDEX]<<22:x=!0}else x=!0}else this.content=E[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|E[d.CHAR_DATA_WIDTH_INDEX]<<22;x&&(this.combinedData=E[d.CHAR_DATA_CHAR_INDEX],this.content=2097152|E[d.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=b},643:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const h=c(8460),d=c(844);class u{get id(){return this._id}constructor(w){this.line=w,this.isDisposed=!1,this._disposables=[],this._id=u._nextId++,this._onDispose=this.register(new h.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,d.disposeArray)(this._disposables),this._disposables.length=0)}register(w){return this._disposables.push(w),w}}a.Marker=u,u._nextId=1},7116:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(f,a)=>{var c,h,d;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.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=`
|
|
58
|
-
`,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=""})(c||(a.C0=c={})),(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=""})(h||(a.C1=h={})),(function(u){u.ST=`${c.ESC}\\`})(d||(a.C1_ESCAPED=d={}))},7399:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const h=c(2584),d={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};a.evaluateKeyboardEvent=function(u,b,w,E){const x={type:0,cancel:!1,key:void 0},S=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?x.key=b?h.C0.ESC+"OA":h.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?x.key=b?h.C0.ESC+"OD":h.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?x.key=b?h.C0.ESC+"OC":h.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(x.key=b?h.C0.ESC+"OB":h.C0.ESC+"[B");break;case 8:x.key=u.ctrlKey?"\b":h.C0.DEL,u.altKey&&(x.key=h.C0.ESC+x.key);break;case 9:if(u.shiftKey){x.key=h.C0.ESC+"[Z";break}x.key=h.C0.HT,x.cancel=!0;break;case 13:x.key=u.altKey?h.C0.ESC+h.C0.CR:h.C0.CR,x.cancel=!0;break;case 27:x.key=h.C0.ESC,u.altKey&&(x.key=h.C0.ESC+h.C0.ESC),x.cancel=!0;break;case 37:if(u.metaKey)break;S?(x.key=h.C0.ESC+"[1;"+(S+1)+"D",x.key===h.C0.ESC+"[1;3D"&&(x.key=h.C0.ESC+(w?"b":"[1;5D"))):x.key=b?h.C0.ESC+"OD":h.C0.ESC+"[D";break;case 39:if(u.metaKey)break;S?(x.key=h.C0.ESC+"[1;"+(S+1)+"C",x.key===h.C0.ESC+"[1;3C"&&(x.key=h.C0.ESC+(w?"f":"[1;5C"))):x.key=b?h.C0.ESC+"OC":h.C0.ESC+"[C";break;case 38:if(u.metaKey)break;S?(x.key=h.C0.ESC+"[1;"+(S+1)+"A",w||x.key!==h.C0.ESC+"[1;3A"||(x.key=h.C0.ESC+"[1;5A")):x.key=b?h.C0.ESC+"OA":h.C0.ESC+"[A";break;case 40:if(u.metaKey)break;S?(x.key=h.C0.ESC+"[1;"+(S+1)+"B",w||x.key!==h.C0.ESC+"[1;3B"||(x.key=h.C0.ESC+"[1;5B")):x.key=b?h.C0.ESC+"OB":h.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(x.key=h.C0.ESC+"[2~");break;case 46:x.key=S?h.C0.ESC+"[3;"+(S+1)+"~":h.C0.ESC+"[3~";break;case 36:x.key=S?h.C0.ESC+"[1;"+(S+1)+"H":b?h.C0.ESC+"OH":h.C0.ESC+"[H";break;case 35:x.key=S?h.C0.ESC+"[1;"+(S+1)+"F":b?h.C0.ESC+"OF":h.C0.ESC+"[F";break;case 33:u.shiftKey?x.type=2:u.ctrlKey?x.key=h.C0.ESC+"[5;"+(S+1)+"~":x.key=h.C0.ESC+"[5~";break;case 34:u.shiftKey?x.type=3:u.ctrlKey?x.key=h.C0.ESC+"[6;"+(S+1)+"~":x.key=h.C0.ESC+"[6~";break;case 112:x.key=S?h.C0.ESC+"[1;"+(S+1)+"P":h.C0.ESC+"OP";break;case 113:x.key=S?h.C0.ESC+"[1;"+(S+1)+"Q":h.C0.ESC+"OQ";break;case 114:x.key=S?h.C0.ESC+"[1;"+(S+1)+"R":h.C0.ESC+"OR";break;case 115:x.key=S?h.C0.ESC+"[1;"+(S+1)+"S":h.C0.ESC+"OS";break;case 116:x.key=S?h.C0.ESC+"[15;"+(S+1)+"~":h.C0.ESC+"[15~";break;case 117:x.key=S?h.C0.ESC+"[17;"+(S+1)+"~":h.C0.ESC+"[17~";break;case 118:x.key=S?h.C0.ESC+"[18;"+(S+1)+"~":h.C0.ESC+"[18~";break;case 119:x.key=S?h.C0.ESC+"[19;"+(S+1)+"~":h.C0.ESC+"[19~";break;case 120:x.key=S?h.C0.ESC+"[20;"+(S+1)+"~":h.C0.ESC+"[20~";break;case 121:x.key=S?h.C0.ESC+"[21;"+(S+1)+"~":h.C0.ESC+"[21~";break;case 122:x.key=S?h.C0.ESC+"[23;"+(S+1)+"~":h.C0.ESC+"[23~";break;case 123:x.key=S?h.C0.ESC+"[24;"+(S+1)+"~":h.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(w&&!E||!u.altKey||u.metaKey)!w||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?x.key=u.key:u.key&&u.ctrlKey&&(u.key==="_"&&(x.key=h.C0.US),u.key==="@"&&(x.key=h.C0.NUL)):u.keyCode===65&&(x.type=1);else{const _=d[u.keyCode],g=_==null?void 0:_[u.shiftKey?1:0];if(g)x.key=h.C0.ESC+g;else if(u.keyCode>=65&&u.keyCode<=90){const y=u.ctrlKey?u.keyCode-64:u.keyCode+32;let A=String.fromCharCode(y);u.shiftKey&&(A=A.toUpperCase()),x.key=h.C0.ESC+A}else if(u.keyCode===32)x.key=h.C0.ESC+(u.ctrlKey?h.C0.NUL:" ");else if(u.key==="Dead"&&u.code.startsWith("Key")){let y=u.code.slice(3,4);u.shiftKey||(y=y.toLowerCase()),x.key=h.C0.ESC+y,x.cancel=!0}}else u.keyCode>=65&&u.keyCode<=90?x.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?x.key=h.C0.NUL:u.keyCode>=51&&u.keyCode<=55?x.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?x.key=h.C0.DEL:u.keyCode===219?x.key=h.C0.ESC:u.keyCode===220?x.key=h.C0.FS:u.keyCode===221&&(x.key=h.C0.GS)}return x}},482:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},a.utf32ToString=function(c,h=0,d=c.length){let u="";for(let b=h;b<d;++b){let w=c[b];w>65535?(w-=65536,u+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):u+=String.fromCharCode(w)}return u},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,h){const d=c.length;if(!d)return 0;let u=0,b=0;if(this._interim){const w=c.charCodeAt(b++);56320<=w&&w<=57343?h[u++]=1024*(this._interim-55296)+w-56320+65536:(h[u++]=this._interim,h[u++]=w),this._interim=0}for(let w=b;w<d;++w){const E=c.charCodeAt(w);if(55296<=E&&E<=56319){if(++w>=d)return this._interim=E,u;const x=c.charCodeAt(w);56320<=x&&x<=57343?h[u++]=1024*(E-55296)+x-56320+65536:(h[u++]=E,h[u++]=x)}else E!==65279&&(h[u++]=E)}return u}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,h){const d=c.length;if(!d)return 0;let u,b,w,E,x=0,S=0,_=0;if(this.interim[0]){let A=!1,M=this.interim[0];M&=(224&M)==192?31:(240&M)==224?15:7;let D,T=0;for(;(D=63&this.interim[++T])&&T<4;)M<<=6,M|=D;const k=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,R=k-T;for(;_<R;){if(_>=d)return 0;if(D=c[_++],(192&D)!=128){_--,A=!0;break}this.interim[T++]=D,M<<=6,M|=63&D}A||(k===2?M<128?_--:h[x++]=M:k===3?M<2048||M>=55296&&M<=57343||M===65279||(h[x++]=M):M<65536||M>1114111||(h[x++]=M)),this.interim.fill(0)}const g=d-4;let y=_;for(;y<d;){for(;!(!(y<g)||128&(u=c[y])||128&(b=c[y+1])||128&(w=c[y+2])||128&(E=c[y+3]));)h[x++]=u,h[x++]=b,h[x++]=w,h[x++]=E,y+=4;if(u=c[y++],u<128)h[x++]=u;else if((224&u)==192){if(y>=d)return this.interim[0]=u,x;if(b=c[y++],(192&b)!=128){y--;continue}if(S=(31&u)<<6|63&b,S<128){y--;continue}h[x++]=S}else if((240&u)==224){if(y>=d)return this.interim[0]=u,x;if(b=c[y++],(192&b)!=128){y--;continue}if(y>=d)return this.interim[0]=u,this.interim[1]=b,x;if(w=c[y++],(192&w)!=128){y--;continue}if(S=(15&u)<<12|(63&b)<<6|63&w,S<2048||S>=55296&&S<=57343||S===65279)continue;h[x++]=S}else if((248&u)==240){if(y>=d)return this.interim[0]=u,x;if(b=c[y++],(192&b)!=128){y--;continue}if(y>=d)return this.interim[0]=u,this.interim[1]=b,x;if(w=c[y++],(192&w)!=128){y--;continue}if(y>=d)return this.interim[0]=u,this.interim[1]=b,this.interim[2]=w,x;if(E=c[y++],(192&E)!=128){y--;continue}if(S=(7&u)<<18|(63&b)<<12|(63&w)<<6|63&E,S<65536||S>1114111)continue;h[x++]=S}}return x}}},225:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const h=c(1480),d=[[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 b;a.UnicodeV6=class{constructor(){if(this.version="6",!b){b=new Uint8Array(65536),b.fill(1),b[0]=0,b.fill(0,1,32),b.fill(0,127,160),b.fill(2,4352,4448),b[9001]=2,b[9002]=2,b.fill(2,11904,42192),b[12351]=1,b.fill(2,44032,55204),b.fill(2,63744,64256),b.fill(2,65040,65050),b.fill(2,65072,65136),b.fill(2,65280,65377),b.fill(2,65504,65511);for(let w=0;w<d.length;++w)b.fill(0,d[w][0],d[w][1]+1)}}wcwidth(w){return w<32?0:w<127?1:w<65536?b[w]:(function(E,x){let S,_=0,g=x.length-1;if(E<x[0][0]||E>x[g][1])return!1;for(;g>=_;)if(S=_+g>>1,E>x[S][1])_=S+1;else{if(!(E<x[S][0]))return!0;g=S-1}return!1})(w,u)?0:w>=131072&&w<=196605||w>=196608&&w<=262141?2:1}charProperties(w,E){let x=this.wcwidth(w),S=x===0&&E!==0;if(S){const _=h.UnicodeService.extractWidth(E);_===0?S=!1:_>x&&(x=_)}return h.UnicodeService.createPropertyValue(0,x,S)}}},5981:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const h=c(8460),d=c(844);class u extends d.Disposable{constructor(w){super(),this._action=w,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new h.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(w,E){if(E!==void 0&&this._syncCalls>E)return void(this._syncCalls=0);if(this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let x;for(this._isSyncWriting=!0;x=this._writeBuffer.shift();){this._action(x);const S=this._callbacks.shift();S&&S()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(w,E){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(E),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(E)}_innerWrite(w=0,E=!0){const x=w||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const S=this._writeBuffer[this._bufferOffset],_=this._action(S,E);if(_){const y=A=>Date.now()-x>=12?setTimeout((()=>this._innerWrite(0,A))):this._innerWrite(x,A);return void _.catch((A=>(queueMicrotask((()=>{throw A})),Promise.resolve(!1)))).then(y)}const g=this._callbacks[this._bufferOffset];if(g&&g(),this._bufferOffset++,this._pendingData-=S.length,Date.now()-x>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}a.WriteBuffer=u},5941:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const c=/^([\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})$/,h=/^[\da-f]+$/;function d(u,b){const w=u.toString(16),E=w.length<2?"0"+w:w;switch(b){case 4:return w[0];case 8:return E;case 12:return(E+E).slice(0,3);default:return E+E}}a.parseColor=function(u){if(!u)return;let b=u.toLowerCase();if(b.indexOf("rgb:")===0){b=b.slice(4);const w=c.exec(b);if(w){const E=w[1]?15:w[4]?255:w[7]?4095:65535;return[Math.round(parseInt(w[1]||w[4]||w[7]||w[10],16)/E*255),Math.round(parseInt(w[2]||w[5]||w[8]||w[11],16)/E*255),Math.round(parseInt(w[3]||w[6]||w[9]||w[12],16)/E*255)]}}else if(b.indexOf("#")===0&&(b=b.slice(1),h.exec(b)&&[3,6,9,12].includes(b.length))){const w=b.length/3,E=[0,0,0];for(let x=0;x<3;++x){const S=parseInt(b.slice(w*x,w*x+w),16);E[x]=w===1?S<<4:w===2?S:w===3?S>>4:S>>8}return E}},a.toRgbString=function(u,b=16){const[w,E,x]=u;return`rgb:${d(w,b)}/${d(E,b)}/${d(x,b)}`}},5770:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const h=c(482),d=c(8742),u=c(5770),b=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=b,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=b}registerHandler(E,x){this._handlers[E]===void 0&&(this._handlers[E]=[]);const S=this._handlers[E];return S.push(x),{dispose:()=>{const _=S.indexOf(x);_!==-1&&S.splice(_,1)}}}clearHandler(E){this._handlers[E]&&delete this._handlers[E]}setHandlerFallback(E){this._handlerFb=E}reset(){if(this._active.length)for(let E=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;E>=0;--E)this._active[E].unhook(!1);this._stack.paused=!1,this._active=b,this._ident=0}hook(E,x){if(this.reset(),this._ident=E,this._active=this._handlers[E]||b,this._active.length)for(let S=this._active.length-1;S>=0;S--)this._active[S].hook(x);else this._handlerFb(this._ident,"HOOK",x)}put(E,x,S){if(this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].put(E,x,S);else this._handlerFb(this._ident,"PUT",(0,h.utf32ToString)(E,x,S))}unhook(E,x=!0){if(this._active.length){let S=!1,_=this._active.length-1,g=!1;if(this._stack.paused&&(_=this._stack.loopPosition-1,S=x,g=this._stack.fallThrough,this._stack.paused=!1),!g&&S===!1){for(;_>=0&&(S=this._active[_].unhook(E),S!==!0);_--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!1,S;_--}for(;_>=0;_--)if(S=this._active[_].unhook(!1),S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=_,this._stack.fallThrough=!0,S}else this._handlerFb(this._ident,"UNHOOK",E);this._active=b,this._ident=0}};const w=new d.Params;w.addParam(0),a.DcsHandler=class{constructor(E){this._handler=E,this._data="",this._params=w,this._hitLimit=!1}hook(E){this._params=E.length>1||E.params[0]?E.clone():w,this._data="",this._hitLimit=!1}put(E,x,S){this._hitLimit||(this._data+=(0,h.utf32ToString)(E,x,S),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(E){let x=!1;if(this._hitLimit)x=!1;else if(E&&(x=this._handler(this._data,this._params),x instanceof Promise))return x.then((S=>(this._params=w,this._data="",this._hitLimit=!1,S)));return this._params=w,this._data="",this._hitLimit=!1,x}}},2015:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const h=c(844),d=c(8742),u=c(6242),b=c(6351);class w{constructor(_){this.table=new Uint8Array(_)}setDefault(_,g){this.table.fill(_<<4|g)}add(_,g,y,A){this.table[g<<8|_]=y<<4|A}addMany(_,g,y,A){for(let M=0;M<_.length;M++)this.table[g<<8|_[M]]=y<<4|A}}a.TransitionTable=w;const E=160;a.VT500_TRANSITION_TABLE=(function(){const S=new w(4095),_=Array.apply(null,Array(256)).map(((T,k)=>k)),g=(T,k)=>_.slice(T,k),y=g(32,127),A=g(0,24);A.push(25),A.push.apply(A,g(28,32));const M=g(0,14);let D;for(D in S.setDefault(1,0),S.addMany(y,0,2,0),M)S.addMany([24,26,153,154],D,3,0),S.addMany(g(128,144),D,3,0),S.addMany(g(144,152),D,3,0),S.add(156,D,0,0),S.add(27,D,11,1),S.add(157,D,4,8),S.addMany([152,158,159],D,0,7),S.add(155,D,11,3),S.add(144,D,11,9);return S.addMany(A,0,3,0),S.addMany(A,1,3,1),S.add(127,1,0,1),S.addMany(A,8,0,8),S.addMany(A,3,3,3),S.add(127,3,0,3),S.addMany(A,4,3,4),S.add(127,4,0,4),S.addMany(A,6,3,6),S.addMany(A,5,3,5),S.add(127,5,0,5),S.addMany(A,2,3,2),S.add(127,2,0,2),S.add(93,1,4,8),S.addMany(y,8,5,8),S.add(127,8,5,8),S.addMany([156,27,24,26,7],8,6,0),S.addMany(g(28,32),8,0,8),S.addMany([88,94,95],1,0,7),S.addMany(y,7,0,7),S.addMany(A,7,0,7),S.add(156,7,0,0),S.add(127,7,0,7),S.add(91,1,11,3),S.addMany(g(64,127),3,7,0),S.addMany(g(48,60),3,8,4),S.addMany([60,61,62,63],3,9,4),S.addMany(g(48,60),4,8,4),S.addMany(g(64,127),4,7,0),S.addMany([60,61,62,63],4,0,6),S.addMany(g(32,64),6,0,6),S.add(127,6,0,6),S.addMany(g(64,127),6,0,0),S.addMany(g(32,48),3,9,5),S.addMany(g(32,48),5,9,5),S.addMany(g(48,64),5,0,6),S.addMany(g(64,127),5,7,0),S.addMany(g(32,48),4,9,5),S.addMany(g(32,48),1,9,2),S.addMany(g(32,48),2,9,2),S.addMany(g(48,127),2,10,0),S.addMany(g(48,80),1,10,0),S.addMany(g(81,88),1,10,0),S.addMany([89,90,92],1,10,0),S.addMany(g(96,127),1,10,0),S.add(80,1,11,9),S.addMany(A,9,0,9),S.add(127,9,0,9),S.addMany(g(28,32),9,0,9),S.addMany(g(32,48),9,9,12),S.addMany(g(48,60),9,8,10),S.addMany([60,61,62,63],9,9,10),S.addMany(A,11,0,11),S.addMany(g(32,128),11,0,11),S.addMany(g(28,32),11,0,11),S.addMany(A,10,0,10),S.add(127,10,0,10),S.addMany(g(28,32),10,0,10),S.addMany(g(48,60),10,8,10),S.addMany([60,61,62,63],10,0,11),S.addMany(g(32,48),10,9,12),S.addMany(A,12,0,12),S.add(127,12,0,12),S.addMany(g(28,32),12,0,12),S.addMany(g(32,48),12,9,12),S.addMany(g(48,64),12,0,11),S.addMany(g(64,127),12,12,13),S.addMany(g(64,127),10,12,13),S.addMany(g(64,127),9,12,13),S.addMany(A,13,13,13),S.addMany(y,13,13,13),S.add(127,13,0,13),S.addMany([27,156,24,26],13,14,0),S.add(E,0,2,0),S.add(E,8,5,8),S.add(E,6,0,6),S.add(E,11,0,11),S.add(E,13,13,13),S})();class x extends h.Disposable{constructor(_=a.VT500_TRANSITION_TABLE){super(),this._transitions=_,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new d.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(g,y,A)=>{},this._executeHandlerFb=g=>{},this._csiHandlerFb=(g,y)=>{},this._escHandlerFb=g=>{},this._errorHandlerFb=g=>g,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,h.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 b.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(_,g=[64,126]){let y=0;if(_.prefix){if(_.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=_.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(_.intermediates){if(_.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let M=0;M<_.intermediates.length;++M){const D=_.intermediates.charCodeAt(M);if(32>D||D>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=D}}if(_.final.length!==1)throw new Error("final must be a single byte");const A=_.final.charCodeAt(0);if(g[0]>A||A>g[1])throw new Error(`final must be in range ${g[0]} .. ${g[1]}`);return y<<=8,y|=A,y}identToString(_){const g=[];for(;_;)g.push(String.fromCharCode(255&_)),_>>=8;return g.reverse().join("")}setPrintHandler(_){this._printHandler=_}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(_,g){const y=this._identifier(_,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);const A=this._escHandlers[y];return A.push(g),{dispose:()=>{const M=A.indexOf(g);M!==-1&&A.splice(M,1)}}}clearEscHandler(_){this._escHandlers[this._identifier(_,[48,126])]&&delete this._escHandlers[this._identifier(_,[48,126])]}setEscHandlerFallback(_){this._escHandlerFb=_}setExecuteHandler(_,g){this._executeHandlers[_.charCodeAt(0)]=g}clearExecuteHandler(_){this._executeHandlers[_.charCodeAt(0)]&&delete this._executeHandlers[_.charCodeAt(0)]}setExecuteHandlerFallback(_){this._executeHandlerFb=_}registerCsiHandler(_,g){const y=this._identifier(_);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);const A=this._csiHandlers[y];return A.push(g),{dispose:()=>{const M=A.indexOf(g);M!==-1&&A.splice(M,1)}}}clearCsiHandler(_){this._csiHandlers[this._identifier(_)]&&delete this._csiHandlers[this._identifier(_)]}setCsiHandlerFallback(_){this._csiHandlerFb=_}registerDcsHandler(_,g){return this._dcsParser.registerHandler(this._identifier(_),g)}clearDcsHandler(_){this._dcsParser.clearHandler(this._identifier(_))}setDcsHandlerFallback(_){this._dcsParser.setHandlerFallback(_)}registerOscHandler(_,g){return this._oscParser.registerHandler(_,g)}clearOscHandler(_){this._oscParser.clearHandler(_)}setOscHandlerFallback(_){this._oscParser.setHandlerFallback(_)}setErrorHandler(_){this._errorHandler=_}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(_,g,y,A,M){this._parseStack.state=_,this._parseStack.handlers=g,this._parseStack.handlerPos=y,this._parseStack.transition=A,this._parseStack.chunkPos=M}parse(_,g,y){let A,M=0,D=0,T=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,T=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const k=this._parseStack.handlers;let R=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&R>-1){for(;R>=0&&(A=k[R](this._params),A!==!0);R--)if(A instanceof Promise)return this._parseStack.handlerPos=R,A}this._parseStack.handlers=[];break;case 4:if(y===!1&&R>-1){for(;R>=0&&(A=k[R](),A!==!0);R--)if(A instanceof Promise)return this._parseStack.handlerPos=R,A}this._parseStack.handlers=[];break;case 6:if(M=_[this._parseStack.chunkPos],A=this._dcsParser.unhook(M!==24&&M!==26,y),A)return A;M===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(M=_[this._parseStack.chunkPos],A=this._oscParser.end(M!==24&&M!==26,y),A)return A;M===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,T=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let k=T;k<g;++k){switch(M=_[k],D=this._transitions.table[this.currentState<<8|(M<160?M:E)],D>>4){case 2:for(let F=k+1;;++F){if(F>=g||(M=_[F])<32||M>126&&M<E){this._printHandler(_,k,F),k=F-1;break}if(++F>=g||(M=_[F])<32||M>126&&M<E){this._printHandler(_,k,F),k=F-1;break}if(++F>=g||(M=_[F])<32||M>126&&M<E){this._printHandler(_,k,F),k=F-1;break}if(++F>=g||(M=_[F])<32||M>126&&M<E){this._printHandler(_,k,F),k=F-1;break}}break;case 3:this._executeHandlers[M]?this._executeHandlers[M]():this._executeHandlerFb(M),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:k,code:M,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const R=this._csiHandlers[this._collect<<8|M];let N=R?R.length-1:-1;for(;N>=0&&(A=R[N](this._params),A!==!0);N--)if(A instanceof Promise)return this._preserveStack(3,R,N,D,k),A;N<0&&this._csiHandlerFb(this._collect<<8|M,this._params),this.precedingJoinState=0;break;case 8:do switch(M){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(M-48)}while(++k<g&&(M=_[k])>47&&M<60);k--;break;case 9:this._collect<<=8,this._collect|=M;break;case 10:const I=this._escHandlers[this._collect<<8|M];let P=I?I.length-1:-1;for(;P>=0&&(A=I[P](),A!==!0);P--)if(A instanceof Promise)return this._preserveStack(4,I,P,D,k),A;P<0&&this._escHandlerFb(this._collect<<8|M),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|M,this._params);break;case 13:for(let F=k+1;;++F)if(F>=g||(M=_[F])===24||M===26||M===27||M>127&&M<E){this._dcsParser.put(_,k,F),k=F-1;break}break;case 14:if(A=this._dcsParser.unhook(M!==24&&M!==26),A)return this._preserveStack(6,[],0,D,k),A;M===27&&(D|=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 F=k+1;;F++)if(F>=g||(M=_[F])<32||M>127&&M<E){this._oscParser.put(_,k,F),k=F-1;break}break;case 6:if(A=this._oscParser.end(M!==24&&M!==26),A)return this._preserveStack(5,[],0,D,k),A;M===27&&(D|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&D}}}a.EscapeSequenceParser=x},6242:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const h=c(5770),d=c(482),u=[];a.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(b,w){this._handlers[b]===void 0&&(this._handlers[b]=[]);const E=this._handlers[b];return E.push(w),{dispose:()=>{const x=E.indexOf(w);x!==-1&&E.splice(x,1)}}}clearHandler(b){this._handlers[b]&&delete this._handlers[b]}setHandlerFallback(b){this._handlerFb=b}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=u}reset(){if(this._state===2)for(let b=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;b>=0;--b)this._active[b].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 b=this._active.length-1;b>=0;b--)this._active[b].start();else this._handlerFb(this._id,"START")}_put(b,w,E){if(this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].put(b,w,E);else this._handlerFb(this._id,"PUT",(0,d.utf32ToString)(b,w,E))}start(){this.reset(),this._state=1}put(b,w,E){if(this._state!==3){if(this._state===1)for(;w<E;){const x=b[w++];if(x===59){this._state=2,this._start();break}if(x<48||57<x)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+x-48}this._state===2&&E-w>0&&this._put(b,w,E)}}end(b,w=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let E=!1,x=this._active.length-1,S=!1;if(this._stack.paused&&(x=this._stack.loopPosition-1,E=w,S=this._stack.fallThrough,this._stack.paused=!1),!S&&E===!1){for(;x>=0&&(E=this._active[x].end(b),E!==!0);x--)if(E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!1,E;x--}for(;x>=0;x--)if(E=this._active[x].end(!1),E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!0,E}else this._handlerFb(this._id,"END",b);this._active=u,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(b){this._handler=b,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(b,w,E){this._hitLimit||(this._data+=(0,d.utf32ToString)(b,w,E),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(b){let w=!1;if(this._hitLimit)w=!1;else if(b&&(w=this._handler(this._data),w instanceof Promise))return w.then((E=>(this._data="",this._hitLimit=!1,E)));return this._data="",this._hitLimit=!1,w}}},8742:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const c=2147483647;class h{static fromArray(u){const b=new h;if(!u.length)return b;for(let w=Array.isArray(u[0])?1:0;w<u.length;++w){const E=u[w];if(Array.isArray(E))for(let x=0;x<E.length;++x)b.addSubParam(E[x]);else b.addParam(E)}return b}constructor(u=32,b=32){if(this.maxLength=u,this.maxSubParamsLength=b,b>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(b),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const u=new h(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 b=0;b<this.length;++b){u.push(this.params[b]);const w=this._subParamsIdx[b]>>8,E=255&this._subParamsIdx[b];E-w>0&&u.push(Array.prototype.slice.call(this._subParams,w,E))}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>c?c: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>c?c:u,this._subParamsIdx[this.length-1]++}}hasSubParams(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0}getSubParams(u){const b=this._subParamsIdx[u]>>8,w=255&this._subParamsIdx[u];return w-b>0?this._subParams.subarray(b,w):null}getSubParamsAll(){const u={};for(let b=0;b<this.length;++b){const w=this._subParamsIdx[b]>>8,E=255&this._subParamsIdx[b];E-w>0&&(u[b]=this._subParams.slice(w,E))}return u}addDigit(u){let b;if(this._rejectDigits||!(b=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const w=this._digitIsSub?this._subParams:this.params,E=w[b-1];w[b-1]=~E?Math.min(10*E+u,c):u}}a.Params=h},5741:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,h){const d={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(d),h.dispose=()=>this._wrappedAddonDispose(d),h.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let h=-1;for(let d=0;d<this._addons.length;d++)if(this._addons[d]===c){h=d;break}if(h===-1)throw new Error("Could not dispose an addon that has not been loaded");c.isDisposed=!0,c.dispose.apply(c.instance),this._addons.splice(h,1)}}},8771:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const h=c(3785),d=c(511);a.BufferApiView=class{constructor(u,b){this._buffer=u,this.type=b}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 b=this._buffer.lines.get(u);if(b)return new h.BufferLineApiView(b)}getNullCell(){return new d.CellData}}},3785:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const h=c(511);a.BufferLineApiView=class{constructor(d){this._line=d}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(d,u){if(!(d<0||d>=this._line.length))return u?(this._line.loadCell(d,u),u):this._line.loadCell(d,new h.CellData)}translateToString(d,u,b){return this._line.translateToString(d,u,b)}}},8285:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const h=c(8771),d=c(8460),u=c(844);class b extends u.Disposable{constructor(E){super(),this._core=E,this._onBufferChange=this.register(new d.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new h.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new h.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}a.BufferNamespaceApi=b},7975:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,h){return this._core.registerCsiHandler(c,(d=>h(d.toArray())))}addCsiHandler(c,h){return this.registerCsiHandler(c,h)}registerDcsHandler(c,h){return this._core.registerDcsHandler(c,((d,u)=>h(d,u.toArray())))}addDcsHandler(c,h){return this.registerDcsHandler(c,h)}registerEscHandler(c,h){return this._core.registerEscHandler(c,h)}addEscHandler(c,h){return this.registerEscHandler(c,h)}registerOscHandler(c,h){return this._core.registerOscHandler(c,h)}addOscHandler(c,h){return this.registerOscHandler(c,h)}}},7090:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(f,a,c){var h=this&&this.__decorate||function(S,_,g,y){var A,M=arguments.length,D=M<3?_:y===null?y=Object.getOwnPropertyDescriptor(_,g):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(S,_,g,y);else for(var T=S.length-1;T>=0;T--)(A=S[T])&&(D=(M<3?A(D):M>3?A(_,g,D):A(_,g))||D);return M>3&&D&&Object.defineProperty(_,g,D),D},d=this&&this.__param||function(S,_){return function(g,y){_(g,y,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const u=c(8460),b=c(844),w=c(5295),E=c(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let x=a.BufferService=class extends b.Disposable{get buffer(){return this.buffers.active}constructor(S){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(S.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(S.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new w.BufferSet(S,this))}resize(S,_){this.cols=S,this.rows=_,this.buffers.resize(S,_),this._onResize.fire({cols:S,rows:_})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(S,_=!1){const g=this.buffer;let y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===S.fg&&y.getBg(0)===S.bg||(y=g.getBlankLine(S,_),this._cachedBlankLine=y),y.isWrapped=_;const A=g.ybase+g.scrollTop,M=g.ybase+g.scrollBottom;if(g.scrollTop===0){const D=g.lines.isFull;M===g.lines.length-1?D?g.lines.recycle().copyFrom(y):g.lines.push(y.clone()):g.lines.splice(M+1,0,y.clone()),D?this.isUserScrolling&&(g.ydisp=Math.max(g.ydisp-1,0)):(g.ybase++,this.isUserScrolling||g.ydisp++)}else{const D=M-A+1;g.lines.shiftElements(A+1,D-1,-1),g.lines.set(M,y.clone())}this.isUserScrolling||(g.ydisp=g.ybase),this._onScroll.fire(g.ydisp)}scrollLines(S,_,g){const y=this.buffer;if(S<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else S+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);const A=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+S,y.ybase),0),A!==y.ydisp&&(_||this._onScroll.fire(y.ydisp))}};a.BufferService=x=h([d(0,E.IOptionsService)],x)},7994:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0,a.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,h){this._charsets[c]=h,this.glevel===c&&(this.charset=h)}}},1753:function(f,a,c){var h=this&&this.__decorate||function(y,A,M,D){var T,k=arguments.length,R=k<3?A:D===null?D=Object.getOwnPropertyDescriptor(A,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(y,A,M,D);else for(var N=y.length-1;N>=0;N--)(T=y[N])&&(R=(k<3?T(R):k>3?T(A,M,R):T(A,M))||R);return k>3&&R&&Object.defineProperty(A,M,R),R},d=this&&this.__param||function(y,A){return function(M,D){A(M,D,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const u=c(2585),b=c(8460),w=c(844),E={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function x(y,A){let M=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(M|=64,M|=y.action):(M|=3&y.button,4&y.button&&(M|=64),8&y.button&&(M|=128),y.action===32?M|=32:y.action!==0||A||(M|=3)),M}const S=String.fromCharCode,_={DEFAULT:y=>{const A=[x(y,!1)+32,y.col+32,y.row+32];return A[0]>255||A[1]>255||A[2]>255?"":`\x1B[M${S(A[0])}${S(A[1])}${S(A[2])}`},SGR:y=>{const A=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${x(y,!0)};${y.col};${y.row}${A}`},SGR_PIXELS:y=>{const A=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${x(y,!0)};${y.x};${y.y}${A}`}};let g=a.CoreMouseService=class extends w.Disposable{constructor(y,A){super(),this._bufferService=y,this._coreService=A,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new b.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const M of Object.keys(E))this.addProtocol(M,E[M]);for(const M of Object.keys(_))this.addEncoding(M,_[M]);this.reset()}addProtocol(y,A){this._protocols[y]=A}addEncoding(y,A){this._encodings[y]=A}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;const A=this._encodings[this._activeEncoding](y);return A&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(A):this._coreService.triggerDataEvent(A,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,A,M){if(M){if(y.x!==A.x||y.y!==A.y)return!1}else if(y.col!==A.col||y.row!==A.row)return!1;return y.button===A.button&&y.action===A.action&&y.ctrl===A.ctrl&&y.alt===A.alt&&y.shift===A.shift}};a.CoreMouseService=g=h([d(0,u.IBufferService),d(1,u.ICoreService)],g)},6975:function(f,a,c){var h=this&&this.__decorate||function(g,y,A,M){var D,T=arguments.length,k=T<3?y:M===null?M=Object.getOwnPropertyDescriptor(y,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(g,y,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(k=(T<3?D(k):T>3?D(y,A,k):D(y,A))||k);return T>3&&k&&Object.defineProperty(y,A,k),k},d=this&&this.__param||function(g,y){return function(A,M){y(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const u=c(1439),b=c(8460),w=c(844),E=c(2585),x=Object.freeze({insertMode:!1}),S=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let _=a.CoreService=class extends w.Disposable{constructor(g,y,A){super(),this._bufferService=g,this._logService=y,this._optionsService=A,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new b.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new b.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new b.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new b.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,u.clone)(x),this.decPrivateModes=(0,u.clone)(S)}reset(){this.modes=(0,u.clone)(x),this.decPrivateModes=(0,u.clone)(S)}triggerDataEvent(g,y=!1){if(this._optionsService.rawOptions.disableStdin)return;const A=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&A.ybase!==A.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${g}"`,(()=>g.split("").map((M=>M.charCodeAt(0))))),this._onData.fire(g)}triggerBinaryEvent(g){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${g}"`,(()=>g.split("").map((y=>y.charCodeAt(0))))),this._onBinary.fire(g))}};a.CoreService=_=h([d(0,E.IBufferService),d(1,E.ILogService),d(2,E.IOptionsService)],_)},9074:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const h=c(8055),d=c(8460),u=c(844),b=c(6106);let w=0,E=0;class x extends u.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new b.SortedList((g=>g==null?void 0:g.marker.line)),this._onDecorationRegistered=this.register(new d.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new d.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,u.toDisposable)((()=>this.reset())))}registerDecoration(g){if(g.marker.isDisposed)return;const y=new S(g);if(y){const A=y.marker.onDispose((()=>y.dispose()));y.onDispose((()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),A.dispose())})),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(const g of this._decorations.values())g.dispose();this._decorations.clear()}*getDecorationsAtCell(g,y,A){let M=0,D=0;for(const T of this._decorations.getKeyIterator(y))M=T.options.x??0,D=M+(T.options.width??1),g>=M&&g<D&&(!A||(T.options.layer??"bottom")===A)&&(yield T)}forEachDecorationAtCell(g,y,A,M){this._decorations.forEachByKey(y,(D=>{w=D.options.x??0,E=w+(D.options.width??1),g>=w&&g<E&&(!A||(D.options.layer??"bottom")===A)&&M(D)}))}}a.DecorationService=x;class S extends u.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=h.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=h.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(g){super(),this.options=g,this.onRenderEmitter=this.register(new d.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=g.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const h=c(2585),d=c(8343);class u{constructor(...w){this._entries=new Map;for(const[E,x]of w)this.set(E,x)}set(w,E){const x=this._entries.get(w);return this._entries.set(w,E),x}forEach(w){for(const[E,x]of this._entries.entries())w(E,x)}has(w){return this._entries.has(w)}get(w){return this._entries.get(w)}}a.ServiceCollection=u,a.InstantiationService=class{constructor(){this._services=new u,this._services.set(h.IInstantiationService,this)}setService(b,w){this._services.set(b,w)}getService(b){return this._services.get(b)}createInstance(b,...w){const E=(0,d.getServiceDependencies)(b).sort(((_,g)=>_.index-g.index)),x=[];for(const _ of E){const g=this._services.get(_.id);if(!g)throw new Error(`[createInstance] ${b.name} depends on UNKNOWN service ${_.id}.`);x.push(g)}const S=E.length>0?E[0].index:w.length;if(w.length!==S)throw new Error(`[createInstance] First service dependency of ${b.name} at position ${S+1} conflicts with ${w.length} static arguments`);return new b(...w,...x)}}},7866:function(f,a,c){var h=this&&this.__decorate||function(S,_,g,y){var A,M=arguments.length,D=M<3?_:y===null?y=Object.getOwnPropertyDescriptor(_,g):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(S,_,g,y);else for(var T=S.length-1;T>=0;T--)(A=S[T])&&(D=(M<3?A(D):M>3?A(_,g,D):A(_,g))||D);return M>3&&D&&Object.defineProperty(_,g,D),D},d=this&&this.__param||function(S,_){return function(g,y){_(g,y,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const u=c(844),b=c(2585),w={trace:b.LogLevelEnum.TRACE,debug:b.LogLevelEnum.DEBUG,info:b.LogLevelEnum.INFO,warn:b.LogLevelEnum.WARN,error:b.LogLevelEnum.ERROR,off:b.LogLevelEnum.OFF};let E,x=a.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(S){super(),this._optionsService=S,this._logLevel=b.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),E=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(S){for(let _=0;_<S.length;_++)typeof S[_]=="function"&&(S[_]=S[_]())}_log(S,_,g){this._evalLazyOptionalParams(g),S.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+_,...g)}trace(S,..._){var g;this._logLevel<=b.LogLevelEnum.TRACE&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.trace.bind(this._optionsService.options.logger))??console.log,S,_)}debug(S,..._){var g;this._logLevel<=b.LogLevelEnum.DEBUG&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.debug.bind(this._optionsService.options.logger))??console.log,S,_)}info(S,..._){var g;this._logLevel<=b.LogLevelEnum.INFO&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.info.bind(this._optionsService.options.logger))??console.info,S,_)}warn(S,..._){var g;this._logLevel<=b.LogLevelEnum.WARN&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.warn.bind(this._optionsService.options.logger))??console.warn,S,_)}error(S,..._){var g;this._logLevel<=b.LogLevelEnum.ERROR&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.error.bind(this._optionsService.options.logger))??console.error,S,_)}};a.LogService=x=h([d(0,b.IOptionsService)],x),a.setTraceLogger=function(S){E=S},a.traceCall=function(S,_,g){if(typeof g.value!="function")throw new Error("not supported");const y=g.value;g.value=function(...A){if(E.logLevel!==b.LogLevelEnum.TRACE)return y.apply(this,A);E.trace(`GlyphRenderer#${y.name}(${A.map((D=>JSON.stringify(D))).join(", ")})`);const M=y.apply(this,A);return E.trace(`GlyphRenderer#${y.name} return`,M),M}}},7302:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const h=c(8460),d=c(844),u=c(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:u.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const b=["normal","bold","100","200","300","400","500","600","700","800","900"];class w extends d.Disposable{constructor(x){super(),this._onOptionChange=this.register(new h.EventEmitter),this.onOptionChange=this._onOptionChange.event;const S={...a.DEFAULT_OPTIONS};for(const _ in x)if(_ in S)try{const g=x[_];S[_]=this._sanitizeAndValidateOption(_,g)}catch(g){console.error(g)}this.rawOptions=S,this.options={...S},this._setupOptions(),this.register((0,d.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(x,S){return this.onOptionChange((_=>{_===x&&S(this.rawOptions[x])}))}onMultipleOptionChange(x,S){return this.onOptionChange((_=>{x.indexOf(_)!==-1&&S()}))}_setupOptions(){const x=_=>{if(!(_ in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${_}"`);return this.rawOptions[_]},S=(_,g)=>{if(!(_ in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${_}"`);g=this._sanitizeAndValidateOption(_,g),this.rawOptions[_]!==g&&(this.rawOptions[_]=g,this._onOptionChange.fire(_))};for(const _ in this.rawOptions){const g={get:x.bind(this,_),set:S.bind(this,_)};Object.defineProperty(this.options,_,g)}}_sanitizeAndValidateOption(x,S){switch(x){case"cursorStyle":if(S||(S=a.DEFAULT_OPTIONS[x]),!(function(_){return _==="block"||_==="underline"||_==="bar"})(S))throw new Error(`"${S}" is not a valid value for ${x}`);break;case"wordSeparator":S||(S=a.DEFAULT_OPTIONS[x]);break;case"fontWeight":case"fontWeightBold":if(typeof S=="number"&&1<=S&&S<=1e3)break;S=b.includes(S)?S:a.DEFAULT_OPTIONS[x];break;case"cursorWidth":S=Math.floor(S);case"lineHeight":case"tabStopWidth":if(S<1)throw new Error(`${x} cannot be less than 1, value: ${S}`);break;case"minimumContrastRatio":S=Math.max(1,Math.min(21,Math.round(10*S)/10));break;case"scrollback":if((S=Math.min(S,4294967295))<0)throw new Error(`${x} cannot be less than 0, value: ${S}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(S<=0)throw new Error(`${x} cannot be less than or equal to 0, value: ${S}`);break;case"rows":case"cols":if(!S&&S!==0)throw new Error(`${x} must be numeric, value: ${S}`);break;case"windowsPty":S=S??{}}return S}}a.OptionsService=w},2660:function(f,a,c){var h=this&&this.__decorate||function(w,E,x,S){var _,g=arguments.length,y=g<3?E:S===null?S=Object.getOwnPropertyDescriptor(E,x):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(w,E,x,S);else for(var A=w.length-1;A>=0;A--)(_=w[A])&&(y=(g<3?_(y):g>3?_(E,x,y):_(E,x))||y);return g>3&&y&&Object.defineProperty(E,x,y),y},d=this&&this.__param||function(w,E){return function(x,S){E(x,S,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const u=c(2585);let b=a.OscLinkService=class{constructor(w){this._bufferService=w,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(w){const E=this._bufferService.buffer;if(w.id===void 0){const A=E.addMarker(E.ybase+E.y),M={data:w,id:this._nextId++,lines:[A]};return A.onDispose((()=>this._removeMarkerFromLink(M,A))),this._dataByLinkId.set(M.id,M),M.id}const x=w,S=this._getEntryIdKey(x),_=this._entriesWithId.get(S);if(_)return this.addLineToLink(_.id,E.ybase+E.y),_.id;const g=E.addMarker(E.ybase+E.y),y={id:this._nextId++,key:this._getEntryIdKey(x),data:x,lines:[g]};return g.onDispose((()=>this._removeMarkerFromLink(y,g))),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(w,E){const x=this._dataByLinkId.get(w);if(x&&x.lines.every((S=>S.line!==E))){const S=this._bufferService.buffer.addMarker(E);x.lines.push(S),S.onDispose((()=>this._removeMarkerFromLink(x,S)))}}getLinkData(w){var E;return(E=this._dataByLinkId.get(w))==null?void 0:E.data}_getEntryIdKey(w){return`${w.id};;${w.uri}`}_removeMarkerFromLink(w,E){const x=w.lines.indexOf(E);x!==-1&&(w.lines.splice(x,1),w.lines.length===0&&(w.data.id!==void 0&&this._entriesWithId.delete(w.key),this._dataByLinkId.delete(w.id)))}};a.OscLinkService=b=h([d(0,u.IBufferService)],b)},8343:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const c="di$target",h="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(d){return d[h]||[]},a.createDecorator=function(d){if(a.serviceRegistry.has(d))return a.serviceRegistry.get(d);const u=function(b,w,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(x,S,_){S[c]===S?S[h].push({id:x,index:_}):(S[h]=[{id:x,index:_}],S[c]=S)})(u,b,E)};return u.toString=()=>d,a.serviceRegistry.set(d,u),u}},2585:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const h=c(8343);var d;a.IBufferService=(0,h.createDecorator)("BufferService"),a.ICoreMouseService=(0,h.createDecorator)("CoreMouseService"),a.ICoreService=(0,h.createDecorator)("CoreService"),a.ICharsetService=(0,h.createDecorator)("CharsetService"),a.IInstantiationService=(0,h.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"})(d||(a.LogLevelEnum=d={})),a.ILogService=(0,h.createDecorator)("LogService"),a.IOptionsService=(0,h.createDecorator)("OptionsService"),a.IOscLinkService=(0,h.createDecorator)("OscLinkService"),a.IUnicodeService=(0,h.createDecorator)("UnicodeService"),a.IDecorationService=(0,h.createDecorator)("DecorationService")},1480:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const h=c(8460),d=c(225);class u{static extractShouldJoin(w){return(1&w)!=0}static extractWidth(w){return w>>1&3}static extractCharKind(w){return w>>3}static createPropertyValue(w,E,x=!1){return(16777215&w)<<3|(3&E)<<1|(x?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new h.EventEmitter,this.onChange=this._onChange.event;const w=new d.UnicodeV6;this.register(w),this._active=w.version,this._activeProvider=w}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(w){if(!this._providers[w])throw new Error(`unknown Unicode version "${w}"`);this._active=w,this._activeProvider=this._providers[w],this._onChange.fire(w)}register(w){this._providers[w.version]=w}wcwidth(w){return this._activeProvider.wcwidth(w)}getStringCellWidth(w){let E=0,x=0;const S=w.length;for(let _=0;_<S;++_){let g=w.charCodeAt(_);if(55296<=g&&g<=56319){if(++_>=S)return E+this.wcwidth(g);const M=w.charCodeAt(_);56320<=M&&M<=57343?g=1024*(g-55296)+M-56320+65536:E+=this.wcwidth(M)}const y=this.charProperties(g,x);let A=u.extractWidth(y);u.extractShouldJoin(y)&&(A-=u.extractWidth(x)),E+=A,x=y}return E}charProperties(w,E){return this._activeProvider.charProperties(w,E)}}a.UnicodeService=u}},o={};function p(f){var a=o[f];if(a!==void 0)return a.exports;var c=o[f]={exports:{}};return s[f].call(c.exports,c,c.exports,p),c.exports}var v={};return(()=>{var f=v;Object.defineProperty(f,"__esModule",{value:!0}),f.Terminal=void 0;const a=p(9042),c=p(3236),h=p(844),d=p(5741),u=p(8285),b=p(7975),w=p(7090),E=["cols","rows"];class x extends h.Disposable{constructor(_){super(),this._core=this.register(new c.Terminal(_)),this._addonManager=this.register(new d.AddonManager),this._publicOptions={...this._core.options};const g=A=>this._core.options[A],y=(A,M)=>{this._checkReadonlyOptions(A),this._core.options[A]=M};for(const A in this._core.options){const M={get:g.bind(this,A),set:y.bind(this,A)};Object.defineProperty(this._publicOptions,A,M)}}_checkReadonlyOptions(_){if(E.includes(_))throw new Error(`Option "${_}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new b.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new w.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new u.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const _=this._core.coreService.decPrivateModes;let g="none";switch(this._core.coreMouseService.activeProtocol){case"X10":g="x10";break;case"VT200":g="vt200";break;case"DRAG":g="drag";break;case"ANY":g="any"}return{applicationCursorKeysMode:_.applicationCursorKeys,applicationKeypadMode:_.applicationKeypad,bracketedPasteMode:_.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:g,originMode:_.origin,reverseWraparoundMode:_.reverseWraparound,sendFocusMode:_.sendFocus,wraparoundMode:_.wraparound}}get options(){return this._publicOptions}set options(_){for(const g in _)this._publicOptions[g]=_[g]}blur(){this._core.blur()}focus(){this._core.focus()}input(_,g=!0){this._core.input(_,g)}resize(_,g){this._verifyIntegers(_,g),this._core.resize(_,g)}open(_){this._core.open(_)}attachCustomKeyEventHandler(_){this._core.attachCustomKeyEventHandler(_)}attachCustomWheelEventHandler(_){this._core.attachCustomWheelEventHandler(_)}registerLinkProvider(_){return this._core.registerLinkProvider(_)}registerCharacterJoiner(_){return this._checkProposedApi(),this._core.registerCharacterJoiner(_)}deregisterCharacterJoiner(_){this._checkProposedApi(),this._core.deregisterCharacterJoiner(_)}registerMarker(_=0){return this._verifyIntegers(_),this._core.registerMarker(_)}registerDecoration(_){return this._checkProposedApi(),this._verifyPositiveIntegers(_.x??0,_.width??0,_.height??0),this._core.registerDecoration(_)}hasSelection(){return this._core.hasSelection()}select(_,g,y){this._verifyIntegers(_,g,y),this._core.select(_,g,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(_,g){this._verifyIntegers(_,g),this._core.selectLines(_,g)}dispose(){super.dispose()}scrollLines(_){this._verifyIntegers(_),this._core.scrollLines(_)}scrollPages(_){this._verifyIntegers(_),this._core.scrollPages(_)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(_){this._verifyIntegers(_),this._core.scrollToLine(_)}clear(){this._core.clear()}write(_,g){this._core.write(_,g)}writeln(_,g){this._core.write(_),this._core.write(`\r
|
|
59
|
-
`,g)}paste(
|
|
60
|
-
[VCM] ${y}`),(A=c.current)==null||A.call(c,y)}});p.current=b;const w=d.onData(y=>{b.sendInput(y)});let E=0,x=0,S=0;const _=()=>{E&&window.cancelAnimationFrame(E),E=window.requestAnimationFrame(()=>{E=0,h({focus:a.current})})},g=new ResizeObserver(()=>{_()});return g.observe(o.current),x=window.requestAnimationFrame(_),S=window.setTimeout(_,120),()=>{E&&window.cancelAnimationFrame(E),x&&window.cancelAnimationFrame(x),S&&window.clearTimeout(S),g.disconnect(),w.dispose(),b.close(),d.dispose(),p.current=null,f.current=null,v.current=null}},[n]),ae.useEffect(()=>{if(!r)return;const d=[],u=[];return d.push(window.requestAnimationFrame(()=>{h({focus:!0}),d.push(window.requestAnimationFrame(()=>h({focus:!0})))})),u.push(window.setTimeout(()=>h({focus:!0}),160)),u.push(window.setTimeout(()=>h({focus:!0}),360)),()=>{for(const b of d)window.cancelAnimationFrame(b);for(const b of u)window.clearTimeout(b)}},[r]),ae.useEffect(()=>{const d=()=>{a.current&&h()};return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]),O.jsx("div",{className:"terminal-frame",ref:o,onMouseDown:()=>{var d;return(d=f.current)==null?void 0:d.focus()}})}const x1=160,E1=80,k1=20,A1=5,T1={background:"#0d1117",foreground:"#d6deeb",cursor:"#ffd866",cursorAccent:"#0d1117",selectionBackground:"#264f78",selectionForeground:"#ffffff",black:"#1f2430",red:"#ff5c57",green:"#5af78e",yellow:"#f3f99d",blue:"#57c7ff",magenta:"#ff6ac1",cyan:"#9aedfe",white:"#f1f1f0",brightBlack:"#686868",brightRed:"#ff5c57",brightGreen:"#5af78e",brightYellow:"#f3f99d",brightBlue:"#57c7ff",brightMagenta:"#ff6ac1",brightCyan:"#9aedfe",brightWhite:"#ffffff"};function D1({busy:n,effort:r,model:s,open:o,session:p,onClose:v,onEffortChange:f,onModelChange:a,onResume:c,onRestart:h,onStart:d,onStop:u}){return o?O.jsx("div",{className:"modal-backdrop translator-session-backdrop",children:O.jsxs("section",{className:"translator-session-modal",role:"dialog","aria-modal":"true","aria-label":"Codex Translator Session",children:[O.jsxs("header",{className:"translator-session-header",children:[O.jsxs("div",{children:[O.jsx("h2",{children:"Codex Translator Session"}),O.jsx("p",{children:R1(p)})]}),O.jsx("button",{type:"button",onClick:v,children:"Close"})]}),O.jsx(gg,{role:"codex-translator",session:p??void 0,permissionMode:"default",model:s,effort:r,busy:n,onPermissionModeChange:()=>{},onModelChange:a,onEffortChange:f,onStart:d,onResume:c,onRestart:h,onStop:u}),O.jsx("div",{className:"translator-session-terminal",children:(p==null?void 0:p.status)==="running"?O.jsx(Fu,{sessionId:p.id,active:o},p.id):O.jsxs("div",{className:"terminal-empty",children:[O.jsx("strong",{children:"codex-translator"}),O.jsx("span",{children:p!=null&&p.claudeSessionId?"Resume this project translator session.":"Start the project translator session."})]})})]})}):null}function R1(n){if(!n)return"not started";const r=n.status==="running"?` · ${n.activityStatus??"idle"}`:"";return`${n.status}${r}`}function M1(n,r){const s={};return(n[n.length-1]===""?[...n,""]:n).join((s.padRight?" ":"")+","+(s.padLeft===!1?"":" ")).trim()}const L1=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,O1=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,B1={};function dm(n,r){return(B1.jsx?O1:L1).test(n)}const N1=/[ \t\n\f\r]/g;function j1(n){return typeof n=="object"?n.type==="text"?pm(n.value):!1:pm(n)}function pm(n){return n.replace(N1,"")===""}class ol{constructor(r,s,o){this.normal=s,this.property=r,o&&(this.space=o)}}ol.prototype.normal={};ol.prototype.property={};ol.prototype.space=void 0;function vg(n,r){const s={},o={};for(const p of n)Object.assign(s,p.property),Object.assign(o,p.normal);return new ol(s,o,r)}function ku(n){return n.toLowerCase()}class ln{constructor(r,s){this.attribute=s,this.property=r}}ln.prototype.attribute="";ln.prototype.booleanish=!1;ln.prototype.boolean=!1;ln.prototype.commaOrSpaceSeparated=!1;ln.prototype.commaSeparated=!1;ln.prototype.defined=!1;ln.prototype.mustUseProperty=!1;ln.prototype.number=!1;ln.prototype.overloadedBoolean=!1;ln.prototype.property="";ln.prototype.spaceSeparated=!1;ln.prototype.space=void 0;let z1=0;const Ie=cr(),kt=cr(),Au=cr(),ve=cr(),ct=cr(),Jr=cr(),mn=cr();function cr(){return 2**++z1}const Tu=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ie,booleanish:kt,commaOrSpaceSeparated:mn,commaSeparated:Jr,number:ve,overloadedBoolean:Au,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),cu=Object.keys(Tu);class qu extends ln{constructor(r,s,o,p){let v=-1;if(super(r,s),mm(this,"space",p),typeof o=="number")for(;++v<cu.length;){const f=cu[v];mm(this,cu[v],(o&Tu[f])===Tu[f])}}}qu.prototype.defined=!0;function mm(n,r,s){s&&(n[r]=s)}function ns(n){const r={},s={};for(const[o,p]of Object.entries(n.properties)){const v=new qu(o,n.transform(n.attributes||{},o),p,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(v.mustUseProperty=!0),r[o]=v,s[ku(o)]=o,s[ku(v.attribute)]=o}return new ol(r,s,n.space)}const yg=ns({properties:{ariaActiveDescendant:null,ariaAtomic:kt,ariaAutoComplete:null,ariaBusy:kt,ariaChecked:kt,ariaColCount:ve,ariaColIndex:ve,ariaColSpan:ve,ariaControls:ct,ariaCurrent:null,ariaDescribedBy:ct,ariaDetails:null,ariaDisabled:kt,ariaDropEffect:ct,ariaErrorMessage:null,ariaExpanded:kt,ariaFlowTo:ct,ariaGrabbed:kt,ariaHasPopup:null,ariaHidden:kt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ct,ariaLevel:ve,ariaLive:null,ariaModal:kt,ariaMultiLine:kt,ariaMultiSelectable:kt,ariaOrientation:null,ariaOwns:ct,ariaPlaceholder:null,ariaPosInSet:ve,ariaPressed:kt,ariaReadOnly:kt,ariaRelevant:null,ariaRequired:kt,ariaRoleDescription:ct,ariaRowCount:ve,ariaRowIndex:ve,ariaRowSpan:ve,ariaSelected:kt,ariaSetSize:ve,ariaSort:null,ariaValueMax:ve,ariaValueMin:ve,ariaValueNow:ve,ariaValueText:null,role:null},transform(n,r){return r==="role"?r:"aria-"+r.slice(4).toLowerCase()}});function Sg(n,r){return r in n?n[r]:r}function bg(n,r){return Sg(n,r.toLowerCase())}const H1=ns({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Jr,acceptCharset:ct,accessKey:ct,action:null,allow:null,allowFullScreen:Ie,allowPaymentRequest:Ie,allowUserMedia:Ie,alt:null,as:null,async:Ie,autoCapitalize:null,autoComplete:ct,autoFocus:Ie,autoPlay:Ie,blocking:ct,capture:null,charSet:null,checked:Ie,cite:null,className:ct,cols:ve,colSpan:null,content:null,contentEditable:kt,controls:Ie,controlsList:ct,coords:ve|Jr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ie,defer:Ie,dir:null,dirName:null,disabled:Ie,download:Au,draggable:kt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ie,formTarget:null,headers:ct,height:ve,hidden:Au,high:ve,href:null,hrefLang:null,htmlFor:ct,httpEquiv:ct,id:null,imageSizes:null,imageSrcSet:null,inert:Ie,inputMode:null,integrity:null,is:null,isMap:Ie,itemId:null,itemProp:ct,itemRef:ct,itemScope:Ie,itemType:ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ie,low:ve,manifest:null,max:null,maxLength:ve,media:null,method:null,min:null,minLength:ve,multiple:Ie,muted:Ie,name:null,nonce:null,noModule:Ie,noValidate:Ie,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ie,optimum:ve,pattern:null,ping:ct,placeholder:null,playsInline:Ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ie,referrerPolicy:null,rel:ct,required:Ie,reversed:Ie,rows:ve,rowSpan:ve,sandbox:ct,scope:null,scoped:Ie,seamless:Ie,selected:Ie,shadowRootClonable:Ie,shadowRootDelegatesFocus:Ie,shadowRootMode:null,shape:null,size:ve,sizes:null,slot:null,span:ve,spellCheck:kt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ve,step:null,style:null,tabIndex:ve,target:null,title:null,translate:null,type:null,typeMustMatch:Ie,useMap:null,value:kt,width:ve,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ct,axis:null,background:null,bgColor:null,border:ve,borderColor:null,bottomMargin:ve,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ie,declare:Ie,event:null,face:null,frame:null,frameBorder:null,hSpace:ve,leftMargin:ve,link:null,longDesc:null,lowSrc:null,marginHeight:ve,marginWidth:ve,noResize:Ie,noHref:Ie,noShade:Ie,noWrap:Ie,object:null,profile:null,prompt:null,rev:null,rightMargin:ve,rules:null,scheme:null,scrolling:kt,standby:null,summary:null,text:null,topMargin:ve,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ve,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ie,disableRemotePlayback:Ie,prefix:null,property:null,results:ve,security:null,unselectable:null},space:"html",transform:bg}),I1=ns({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:mn,accentHeight:ve,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ve,amplitude:ve,arabicForm:null,ascent:ve,attributeName:null,attributeType:null,azimuth:ve,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ve,by:null,calcMode:null,capHeight:ve,className:ct,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ve,diffuseConstant:ve,direction:null,display:null,dur:null,divisor:ve,dominantBaseline:null,download:Ie,dx:null,dy:null,edgeMode:null,editable:null,elevation:ve,enableBackground:null,end:null,event:null,exponent:ve,externalResourcesRequired:null,fill:null,fillOpacity:ve,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Jr,g2:Jr,glyphName:Jr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ve,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ve,horizOriginX:ve,horizOriginY:ve,id:null,ideographic:ve,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ve,k:ve,k1:ve,k2:ve,k3:ve,k4:ve,kernelMatrix:mn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ve,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ve,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ve,overlineThickness:ve,paintOrder:null,panose1:null,path:null,pathLength:ve,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ve,pointsAtY:ve,pointsAtZ:ve,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:mn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:mn,rev:mn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:mn,requiredFeatures:mn,requiredFonts:mn,requiredFormats:mn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ve,specularExponent:ve,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ve,strikethroughThickness:ve,string:null,stroke:null,strokeDashArray:mn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ve,strokeOpacity:ve,strokeWidth:null,style:null,surfaceScale:ve,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:mn,tabIndex:ve,tableValues:null,target:null,targetX:ve,targetY:ve,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:mn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ve,underlineThickness:ve,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ve,values:null,vAlphabetic:ve,vMathematical:ve,vectorEffect:null,vHanging:ve,vIdeographic:ve,version:null,vertAdvY:ve,vertOriginX:ve,vertOriginY:ve,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ve,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Sg}),Cg=ns({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,r){return"xlink:"+r.slice(5).toLowerCase()}}),wg=ns({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:bg}),xg=ns({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,r){return"xml:"+r.slice(3).toLowerCase()}}),U1={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},P1=/[A-Z]/g,gm=/-[a-z]/g,F1=/^data[-\w.:]+$/i;function q1(n,r){const s=ku(r);let o=r,p=ln;if(s in n.normal)return n.property[n.normal[s]];if(s.length>4&&s.slice(0,4)==="data"&&F1.test(r)){if(r.charAt(4)==="-"){const v=r.slice(5).replace(gm,G1);o="data"+v.charAt(0).toUpperCase()+v.slice(1)}else{const v=r.slice(4);if(!gm.test(v)){let f=v.replace(P1,V1);f.charAt(0)!=="-"&&(f="-"+f),r="data"+f}}p=qu}return new p(o,r)}function V1(n){return"-"+n.toLowerCase()}function G1(n){return n.charAt(1).toUpperCase()}const $1=vg([yg,H1,Cg,wg,xg],"html"),Vu=vg([yg,I1,Cg,wg,xg],"svg");function K1(n){return n.join(" ").trim()}var Yr={},uu,_m;function Y1(){if(_m)return uu;_m=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,s=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,p=/^:\s*/,v=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,a=/^\s+|\s+$/g,c=`
|
|
61
|
-
`,h="/",d="*",u="",b="comment",w="declaration";function E(S,_){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];_=_||{};var g=1,y=1;function A(K){var W=K.match(r);W&&(g+=W.length);var G=K.lastIndexOf(c);y=~G?K.length-G:y+K.length}function M(){var K={line:g,column:y};return function(W){return W.position=new D(K),R(),W}}function D(K){this.start=K,this.end={line:g,column:y},this.source=_.source}D.prototype.content=S;function T(K){var W=new Error(_.source+":"+g+":"+y+": "+K);if(W.reason=K,W.filename=_.source,W.line=g,W.column=y,W.source=S,!_.silent)throw W}function k(K){var W=K.exec(S);if(W){var G=W[0];return A(G),S=S.slice(G.length),W}}function R(){k(s)}function N(K){var W;for(K=K||[];W=I();)W!==!1&&K.push(W);return K}function I(){var K=M();if(!(h!=S.charAt(0)||d!=S.charAt(1))){for(var W=2;u!=S.charAt(W)&&(d!=S.charAt(W)||h!=S.charAt(W+1));)++W;if(W+=2,u===S.charAt(W-1))return T("End of comment missing");var G=S.slice(2,W-2);return y+=2,A(G),S=S.slice(W),y+=2,K({type:b,comment:G})}}function P(){var K=M(),W=k(o);if(W){if(I(),!k(p))return T("property missing ':'");var G=k(v),$=K({type:w,property:x(W[0].replace(n,u)),value:G?x(G[0].replace(n,u)):u});return k(f),$}}function F(){var K=[];N(K);for(var W;W=P();)W!==!1&&(K.push(W),N(K));return K}return R(),F()}function x(S){return S?S.replace(a,u):u}return uu=E,uu}var vm;function W1(){if(vm)return Yr;vm=1;var n=Yr&&Yr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.default=s;const r=n(Y1());function s(o,p){let v=null;if(!o||typeof o!="string")return v;const f=(0,r.default)(o),a=typeof p=="function";return f.forEach(c=>{if(c.type!=="declaration")return;const{property:h,value:d}=c;a?p(h,d,c):d&&(v=v||{},v[h]=d)}),v}return Yr}var Qs={},ym;function X1(){if(ym)return Qs;ym=1,Object.defineProperty(Qs,"__esModule",{value:!0}),Qs.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,s=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,p=/^-(ms)-/,v=function(h){return!h||s.test(h)||n.test(h)},f=function(h,d){return d.toUpperCase()},a=function(h,d){return"".concat(d,"-")},c=function(h,d){return d===void 0&&(d={}),v(h)?h:(h=h.toLowerCase(),d.reactCompat?h=h.replace(p,a):h=h.replace(o,a),h.replace(r,f))};return Qs.camelCase=c,Qs}var Zs,Sm;function Q1(){if(Sm)return Zs;Sm=1;var n=Zs&&Zs.__importDefault||function(p){return p&&p.__esModule?p:{default:p}},r=n(W1()),s=X1();function o(p,v){var f={};return!p||typeof p!="string"||(0,r.default)(p,function(a,c){a&&c&&(f[(0,s.camelCase)(a,v)]=c)}),f}return o.default=o,Zs=o,Zs}var Z1=Q1();const J1=ug(Z1),Eg=kg("end"),Gu=kg("start");function kg(n){return r;function r(s){const o=s&&s.position&&s.position[n]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function ey(n){const r=Gu(n),s=Eg(n);if(r&&s)return{start:r,end:s}}function nl(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?bm(n.position):"start"in n||"end"in n?bm(n):"line"in n||"column"in n?Du(n):""}function Du(n){return Cm(n&&n.line)+":"+Cm(n&&n.column)}function bm(n){return Du(n&&n.start)+"-"+Du(n&&n.end)}function Cm(n){return n&&typeof n=="number"?n:1}class Kt extends Error{constructor(r,s,o){super(),typeof s=="string"&&(o=s,s=void 0);let p="",v={},f=!1;if(s&&("line"in s&&"column"in s?v={place:s}:"start"in s&&"end"in s?v={place:s}:"type"in s?v={ancestors:[s],place:s.position}:v={...s}),typeof r=="string"?p=r:!v.cause&&r&&(f=!0,p=r.message,v.cause=r),!v.ruleId&&!v.source&&typeof o=="string"){const c=o.indexOf(":");c===-1?v.ruleId=o:(v.source=o.slice(0,c),v.ruleId=o.slice(c+1))}if(!v.place&&v.ancestors&&v.ancestors){const c=v.ancestors[v.ancestors.length-1];c&&(v.place=c.position)}const a=v.place&&"start"in v.place?v.place.start:v.place;this.ancestors=v.ancestors||void 0,this.cause=v.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=p,this.line=a?a.line:void 0,this.name=nl(v.place)||"1:1",this.place=v.place||void 0,this.reason=this.message,this.ruleId=v.ruleId||void 0,this.source=v.source||void 0,this.stack=f&&v.cause&&typeof v.cause.stack=="string"?v.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Kt.prototype.file="";Kt.prototype.name="";Kt.prototype.reason="";Kt.prototype.message="";Kt.prototype.stack="";Kt.prototype.column=void 0;Kt.prototype.line=void 0;Kt.prototype.ancestors=void 0;Kt.prototype.cause=void 0;Kt.prototype.fatal=void 0;Kt.prototype.place=void 0;Kt.prototype.ruleId=void 0;Kt.prototype.source=void 0;const $u={}.hasOwnProperty,ty=new Map,ny=/[A-Z]/g,iy=new Set(["table","tbody","thead","tfoot","tr"]),ry=new Set(["td","th"]),Ag="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function sy(n,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const s=r.filePath||void 0;let o;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=dy(s,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=fy(s,r.jsx,r.jsxs)}const p={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:o,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:s,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?Vu:$1,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},v=Tg(p,n,void 0);return v&&typeof v!="string"?v:p.create(n,p.Fragment,{children:v||void 0},void 0)}function Tg(n,r,s){if(r.type==="element")return ly(n,r,s);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return ay(n,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return cy(n,r,s);if(r.type==="mdxjsEsm")return oy(n,r);if(r.type==="root")return uy(n,r,s);if(r.type==="text")return hy(n,r)}function ly(n,r,s){const o=n.schema;let p=o;r.tagName.toLowerCase()==="svg"&&o.space==="html"&&(p=Vu,n.schema=p),n.ancestors.push(r);const v=Rg(n,r.tagName,!1),f=py(n,r);let a=Yu(n,r);return iy.has(r.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!j1(c):!0})),Dg(n,f,v,r),Ku(f,a),n.ancestors.pop(),n.schema=o,n.create(r,v,f,s)}function ay(n,r){if(r.data&&r.data.estree&&n.evaluater){const o=r.data.estree.body[0];return o.type,n.evaluater.evaluateExpression(o.expression)}ll(n,r.position)}function oy(n,r){if(r.data&&r.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(r.data.estree);ll(n,r.position)}function cy(n,r,s){const o=n.schema;let p=o;r.name==="svg"&&o.space==="html"&&(p=Vu,n.schema=p),n.ancestors.push(r);const v=r.name===null?n.Fragment:Rg(n,r.name,!0),f=my(n,r),a=Yu(n,r);return Dg(n,f,v,r),Ku(f,a),n.ancestors.pop(),n.schema=o,n.create(r,v,f,s)}function uy(n,r,s){const o={};return Ku(o,Yu(n,r)),n.create(r,n.Fragment,o,s)}function hy(n,r){return r.value}function Dg(n,r,s,o){typeof s!="string"&&s!==n.Fragment&&n.passNode&&(r.node=o)}function Ku(n,r){if(r.length>0){const s=r.length>1?r:r[0];s&&(n.children=s)}}function fy(n,r,s){return o;function o(p,v,f,a){const h=Array.isArray(f.children)?s:r;return a?h(v,f,a):h(v,f)}}function dy(n,r){return s;function s(o,p,v,f){const a=Array.isArray(v.children),c=Gu(o);return r(p,v,f,a,{columnNumber:c?c.column-1:void 0,fileName:n,lineNumber:c?c.line:void 0},void 0)}}function py(n,r){const s={};let o,p;for(p in r.properties)if(p!=="children"&&$u.call(r.properties,p)){const v=gy(n,p,r.properties[p]);if(v){const[f,a]=v;n.tableCellAlignToStyle&&f==="align"&&typeof a=="string"&&ry.has(r.tagName)?o=a:s[f]=a}}if(o){const v=s.style||(s.style={});v[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return s}function my(n,r){const s={};for(const o of r.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&n.evaluater){const v=o.data.estree.body[0];v.type;const f=v.expression;f.type;const a=f.properties[0];a.type,Object.assign(s,n.evaluater.evaluateExpression(a.argument))}else ll(n,r.position);else{const p=o.name;let v;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&n.evaluater){const a=o.value.data.estree.body[0];a.type,v=n.evaluater.evaluateExpression(a.expression)}else ll(n,r.position);else v=o.value===null?!0:o.value;s[p]=v}return s}function Yu(n,r){const s=[];let o=-1;const p=n.passKeys?new Map:ty;for(;++o<r.children.length;){const v=r.children[o];let f;if(n.passKeys){const c=v.type==="element"?v.tagName:v.type==="mdxJsxFlowElement"||v.type==="mdxJsxTextElement"?v.name:void 0;if(c){const h=p.get(c)||0;f=c+"-"+h,p.set(c,h+1)}}const a=Tg(n,v,f);a!==void 0&&s.push(a)}return s}function gy(n,r,s){const o=q1(n.schema,r);if(!(s==null||typeof s=="number"&&Number.isNaN(s))){if(Array.isArray(s)&&(s=o.commaSeparated?M1(s):K1(s)),o.property==="style"){let p=typeof s=="object"?s:_y(n,String(s));return n.stylePropertyNameCase==="css"&&(p=vy(p)),["style",p]}return[n.elementAttributeNameCase==="react"&&o.space?U1[o.property]||o.property:o.attribute,s]}}function _y(n,r){try{return J1(r,{reactCompat:!0})}catch(s){if(n.ignoreInvalidStyle)return{};const o=s,p=new Kt("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw p.file=n.filePath||void 0,p.url=Ag+"#cannot-parse-style-attribute",p}}function Rg(n,r,s){let o;if(!s)o={type:"Literal",value:r};else if(r.includes(".")){const p=r.split(".");let v=-1,f;for(;++v<p.length;){const a=dm(p[v])?{type:"Identifier",name:p[v]}:{type:"Literal",value:p[v]};f=f?{type:"MemberExpression",object:f,property:a,computed:!!(v&&a.type==="Literal"),optional:!1}:a}o=f}else o=dm(r)&&!/^[a-z]/.test(r)?{type:"Identifier",name:r}:{type:"Literal",value:r};if(o.type==="Literal"){const p=o.value;return $u.call(n.components,p)?n.components[p]:p}if(n.evaluater)return n.evaluater.evaluateExpression(o);ll(n)}function ll(n,r){const s=new Kt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:r,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw s.file=n.filePath||void 0,s.url=Ag+"#cannot-handle-mdx-estrees-without-createevaluater",s}function vy(n){const r={};let s;for(s in n)$u.call(n,s)&&(r[yy(s)]=n[s]);return r}function yy(n){let r=n.replace(ny,Sy);return r.slice(0,3)==="ms-"&&(r="-"+r),r}function Sy(n){return"-"+n.toLowerCase()}const hu={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},by={};function Wu(n,r){const s=by,o=typeof s.includeImageAlt=="boolean"?s.includeImageAlt:!0,p=typeof s.includeHtml=="boolean"?s.includeHtml:!0;return Mg(n,o,p)}function Mg(n,r,s){if(Cy(n)){if("value"in n)return n.type==="html"&&!s?"":n.value;if(r&&"alt"in n&&n.alt)return n.alt;if("children"in n)return wm(n.children,r,s)}return Array.isArray(n)?wm(n,r,s):""}function wm(n,r,s){const o=[];let p=-1;for(;++p<n.length;)o[p]=Mg(n[p],r,s);return o.join("")}function Cy(n){return!!(n&&typeof n=="object")}const xm=document.createElement("i");function Xu(n){const r="&"+n+";";xm.innerHTML=r;const s=xm.textContent;return s.charCodeAt(s.length-1)===59&&n!=="semi"||s===r?!1:s}function gn(n,r,s,o){const p=n.length;let v=0,f;if(r<0?r=-r>p?0:p+r:r=r>p?p:r,s=s>0?s:0,o.length<1e4)f=Array.from(o),f.unshift(r,s),n.splice(...f);else for(s&&n.splice(r,s);v<o.length;)f=o.slice(v,v+1e4),f.unshift(r,0),n.splice(...f),v+=1e4,r+=1e4}function An(n,r){return n.length>0?(gn(n,n.length,0,r),n):r}const Em={}.hasOwnProperty;function Lg(n){const r={};let s=-1;for(;++s<n.length;)wy(r,n[s]);return r}function wy(n,r){let s;for(s in r){const p=(Em.call(n,s)?n[s]:void 0)||(n[s]={}),v=r[s];let f;if(v)for(f in v){Em.call(p,f)||(p[f]=[]);const a=v[f];xy(p[f],Array.isArray(a)?a:a?[a]:[])}}}function xy(n,r){let s=-1;const o=[];for(;++s<r.length;)(r[s].add==="after"?n:o).push(r[s]);gn(n,0,0,o)}function Og(n,r){const s=Number.parseInt(n,r);return s<9||s===11||s>13&&s<32||s>126&&s<160||s>55295&&s<57344||s>64975&&s<65008||(s&65535)===65535||(s&65535)===65534||s>1114111?"�":String.fromCodePoint(s)}function Mn(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Qt=Hi(/[A-Za-z]/),$t=Hi(/[\dA-Za-z]/),Ey=Hi(/[#-'*+\--9=?A-Z^-~]/);function Na(n){return n!==null&&(n<32||n===127)}const Ru=Hi(/\d/),ky=Hi(/[\dA-Fa-f]/),Ay=Hi(/[!-/:-@[-`{-~]/);function Le(n){return n!==null&&n<-2}function ot(n){return n!==null&&(n<0||n===32)}function Fe(n){return n===-2||n===-1||n===32}const Pa=Hi(new RegExp("\\p{P}|\\p{S}","u")),or=Hi(/\s/);function Hi(n){return r;function r(s){return s!==null&&s>-1&&n.test(String.fromCharCode(s))}}function is(n){const r=[];let s=-1,o=0,p=0;for(;++s<n.length;){const v=n.charCodeAt(s);let f="";if(v===37&&$t(n.charCodeAt(s+1))&&$t(n.charCodeAt(s+2)))p=2;else if(v<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(v))||(f=String.fromCharCode(v));else if(v>55295&&v<57344){const a=n.charCodeAt(s+1);v<56320&&a>56319&&a<57344?(f=String.fromCharCode(v,a),p=1):f="�"}else f=String.fromCharCode(v);f&&(r.push(n.slice(o,s),encodeURIComponent(f)),o=s+p+1,f=""),p&&(s+=p,p=0)}return r.join("")+n.slice(o)}function Ke(n,r,s,o){const p=o?o-1:Number.POSITIVE_INFINITY;let v=0;return f;function f(c){return Fe(c)?(n.enter(s),a(c)):r(c)}function a(c){return Fe(c)&&v++<p?(n.consume(c),a):(n.exit(s),r(c))}}const Ty={tokenize:Dy};function Dy(n){const r=n.attempt(this.parser.constructs.contentInitial,o,p);let s;return r;function o(a){if(a===null){n.consume(a);return}return n.enter("lineEnding"),n.consume(a),n.exit("lineEnding"),Ke(n,r,"linePrefix")}function p(a){return n.enter("paragraph"),v(a)}function v(a){const c=n.enter("chunkText",{contentType:"text",previous:s});return s&&(s.next=c),s=c,f(a)}function f(a){if(a===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(a);return}return Le(a)?(n.consume(a),n.exit("chunkText"),v):(n.consume(a),f)}}const Ry={tokenize:My},km={tokenize:Ly};function My(n){const r=this,s=[];let o=0,p,v,f;return a;function a(y){if(o<s.length){const A=s[o];return r.containerState=A[1],n.attempt(A[0].continuation,c,h)(y)}return h(y)}function c(y){if(o++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,p&&g();const A=r.events.length;let M=A,D;for(;M--;)if(r.events[M][0]==="exit"&&r.events[M][1].type==="chunkFlow"){D=r.events[M][1].end;break}_(o);let T=A;for(;T<r.events.length;)r.events[T][1].end={...D},T++;return gn(r.events,M+1,0,r.events.slice(A)),r.events.length=T,h(y)}return a(y)}function h(y){if(o===s.length){if(!p)return b(y);if(p.currentConstruct&&p.currentConstruct.concrete)return E(y);r.interrupt=!!(p.currentConstruct&&!p._gfmTableDynamicInterruptHack)}return r.containerState={},n.check(km,d,u)(y)}function d(y){return p&&g(),_(o),b(y)}function u(y){return r.parser.lazy[r.now().line]=o!==s.length,f=r.now().offset,E(y)}function b(y){return r.containerState={},n.attempt(km,w,E)(y)}function w(y){return o++,s.push([r.currentConstruct,r.containerState]),b(y)}function E(y){if(y===null){p&&g(),_(0),n.consume(y);return}return p=p||r.parser.flow(r.now()),n.enter("chunkFlow",{_tokenizer:p,contentType:"flow",previous:v}),x(y)}function x(y){if(y===null){S(n.exit("chunkFlow"),!0),_(0),n.consume(y);return}return Le(y)?(n.consume(y),S(n.exit("chunkFlow")),o=0,r.interrupt=void 0,a):(n.consume(y),x)}function S(y,A){const M=r.sliceStream(y);if(A&&M.push(null),y.previous=v,v&&(v.next=y),v=y,p.defineSkip(y.start),p.write(M),r.parser.lazy[y.start.line]){let D=p.events.length;for(;D--;)if(p.events[D][1].start.offset<f&&(!p.events[D][1].end||p.events[D][1].end.offset>f))return;const T=r.events.length;let k=T,R,N;for(;k--;)if(r.events[k][0]==="exit"&&r.events[k][1].type==="chunkFlow"){if(R){N=r.events[k][1].end;break}R=!0}for(_(o),D=T;D<r.events.length;)r.events[D][1].end={...N},D++;gn(r.events,k+1,0,r.events.slice(T)),r.events.length=D}}function _(y){let A=s.length;for(;A-- >y;){const M=s[A];r.containerState=M[1],M[0].exit.call(r,n)}s.length=y}function g(){p.write([null]),v=void 0,p=void 0,r.containerState._closeFlow=void 0}}function Ly(n,r,s){return Ke(n,n.attempt(this.parser.constructs.document,r,s),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function es(n){if(n===null||ot(n)||or(n))return 1;if(Pa(n))return 2}function Fa(n,r,s){const o=[];let p=-1;for(;++p<n.length;){const v=n[p].resolveAll;v&&!o.includes(v)&&(r=v(r,s),o.push(v))}return r}const Mu={name:"attention",resolveAll:Oy,tokenize:By};function Oy(n,r){let s=-1,o,p,v,f,a,c,h,d;for(;++s<n.length;)if(n[s][0]==="enter"&&n[s][1].type==="attentionSequence"&&n[s][1]._close){for(o=s;o--;)if(n[o][0]==="exit"&&n[o][1].type==="attentionSequence"&&n[o][1]._open&&r.sliceSerialize(n[o][1]).charCodeAt(0)===r.sliceSerialize(n[s][1]).charCodeAt(0)){if((n[o][1]._close||n[s][1]._open)&&(n[s][1].end.offset-n[s][1].start.offset)%3&&!((n[o][1].end.offset-n[o][1].start.offset+n[s][1].end.offset-n[s][1].start.offset)%3))continue;c=n[o][1].end.offset-n[o][1].start.offset>1&&n[s][1].end.offset-n[s][1].start.offset>1?2:1;const u={...n[o][1].end},b={...n[s][1].start};Am(u,-c),Am(b,c),f={type:c>1?"strongSequence":"emphasisSequence",start:u,end:{...n[o][1].end}},a={type:c>1?"strongSequence":"emphasisSequence",start:{...n[s][1].start},end:b},v={type:c>1?"strongText":"emphasisText",start:{...n[o][1].end},end:{...n[s][1].start}},p={type:c>1?"strong":"emphasis",start:{...f.start},end:{...a.end}},n[o][1].end={...f.start},n[s][1].start={...a.end},h=[],n[o][1].end.offset-n[o][1].start.offset&&(h=An(h,[["enter",n[o][1],r],["exit",n[o][1],r]])),h=An(h,[["enter",p,r],["enter",f,r],["exit",f,r],["enter",v,r]]),h=An(h,Fa(r.parser.constructs.insideSpan.null,n.slice(o+1,s),r)),h=An(h,[["exit",v,r],["enter",a,r],["exit",a,r],["exit",p,r]]),n[s][1].end.offset-n[s][1].start.offset?(d=2,h=An(h,[["enter",n[s][1],r],["exit",n[s][1],r]])):d=0,gn(n,o-1,s-o+3,h),s=o+h.length-d-2;break}}for(s=-1;++s<n.length;)n[s][1].type==="attentionSequence"&&(n[s][1].type="data");return n}function By(n,r){const s=this.parser.constructs.attentionMarkers.null,o=this.previous,p=es(o);let v;return f;function f(c){return v=c,n.enter("attentionSequence"),a(c)}function a(c){if(c===v)return n.consume(c),a;const h=n.exit("attentionSequence"),d=es(c),u=!d||d===2&&p||s.includes(c),b=!p||p===2&&d||s.includes(o);return h._open=!!(v===42?u:u&&(p||!b)),h._close=!!(v===42?b:b&&(d||!u)),r(c)}}function Am(n,r){n.column+=r,n.offset+=r,n._bufferIndex+=r}const Ny={name:"autolink",tokenize:jy};function jy(n,r,s){let o=0;return p;function p(w){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),v}function v(w){return Qt(w)?(n.consume(w),f):w===64?s(w):h(w)}function f(w){return w===43||w===45||w===46||$t(w)?(o=1,a(w)):h(w)}function a(w){return w===58?(n.consume(w),o=0,c):(w===43||w===45||w===46||$t(w))&&o++<32?(n.consume(w),a):(o=0,h(w))}function c(w){return w===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.exit("autolink"),r):w===null||w===32||w===60||Na(w)?s(w):(n.consume(w),c)}function h(w){return w===64?(n.consume(w),d):Ey(w)?(n.consume(w),h):s(w)}function d(w){return $t(w)?u(w):s(w)}function u(w){return w===46?(n.consume(w),o=0,d):w===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.exit("autolink"),r):b(w)}function b(w){if((w===45||$t(w))&&o++<63){const E=w===45?b:u;return n.consume(w),E}return s(w)}}const cl={partial:!0,tokenize:zy};function zy(n,r,s){return o;function o(v){return Fe(v)?Ke(n,p,"linePrefix")(v):p(v)}function p(v){return v===null||Le(v)?r(v):s(v)}}const Bg={continuation:{tokenize:Iy},exit:Uy,name:"blockQuote",tokenize:Hy};function Hy(n,r,s){const o=this;return p;function p(f){if(f===62){const a=o.containerState;return a.open||(n.enter("blockQuote",{_container:!0}),a.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(f),n.exit("blockQuoteMarker"),v}return s(f)}function v(f){return Fe(f)?(n.enter("blockQuotePrefixWhitespace"),n.consume(f),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),r):(n.exit("blockQuotePrefix"),r(f))}}function Iy(n,r,s){const o=this;return p;function p(f){return Fe(f)?Ke(n,v,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):v(f)}function v(f){return n.attempt(Bg,r,s)(f)}}function Uy(n){n.exit("blockQuote")}const Ng={name:"characterEscape",tokenize:Py};function Py(n,r,s){return o;function o(v){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(v),n.exit("escapeMarker"),p}function p(v){return Ay(v)?(n.enter("characterEscapeValue"),n.consume(v),n.exit("characterEscapeValue"),n.exit("characterEscape"),r):s(v)}}const jg={name:"characterReference",tokenize:Fy};function Fy(n,r,s){const o=this;let p=0,v,f;return a;function a(u){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(u),n.exit("characterReferenceMarker"),c}function c(u){return u===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(u),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),v=31,f=$t,d(u))}function h(u){return u===88||u===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(u),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),v=6,f=ky,d):(n.enter("characterReferenceValue"),v=7,f=Ru,d(u))}function d(u){if(u===59&&p){const b=n.exit("characterReferenceValue");return f===$t&&!Xu(o.sliceSerialize(b))?s(u):(n.enter("characterReferenceMarker"),n.consume(u),n.exit("characterReferenceMarker"),n.exit("characterReference"),r)}return f(u)&&p++<v?(n.consume(u),d):s(u)}}const Tm={partial:!0,tokenize:Vy},Dm={concrete:!0,name:"codeFenced",tokenize:qy};function qy(n,r,s){const o=this,p={partial:!0,tokenize:M};let v=0,f=0,a;return c;function c(D){return h(D)}function h(D){const T=o.events[o.events.length-1];return v=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,a=D,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),d(D)}function d(D){return D===a?(f++,n.consume(D),d):f<3?s(D):(n.exit("codeFencedFenceSequence"),Fe(D)?Ke(n,u,"whitespace")(D):u(D))}function u(D){return D===null||Le(D)?(n.exit("codeFencedFence"),o.interrupt?r(D):n.check(Tm,x,A)(D)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||Le(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),u(D)):Fe(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),Ke(n,w,"whitespace")(D)):D===96&&D===a?s(D):(n.consume(D),b)}function w(D){return D===null||Le(D)?u(D):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),E(D))}function E(D){return D===null||Le(D)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),u(D)):D===96&&D===a?s(D):(n.consume(D),E)}function x(D){return n.attempt(p,A,S)(D)}function S(D){return n.enter("lineEnding"),n.consume(D),n.exit("lineEnding"),_}function _(D){return v>0&&Fe(D)?Ke(n,g,"linePrefix",v+1)(D):g(D)}function g(D){return D===null||Le(D)?n.check(Tm,x,A)(D):(n.enter("codeFlowValue"),y(D))}function y(D){return D===null||Le(D)?(n.exit("codeFlowValue"),g(D)):(n.consume(D),y)}function A(D){return n.exit("codeFenced"),r(D)}function M(D,T,k){let R=0;return N;function N(W){return D.enter("lineEnding"),D.consume(W),D.exit("lineEnding"),I}function I(W){return D.enter("codeFencedFence"),Fe(W)?Ke(D,P,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):P(W)}function P(W){return W===a?(D.enter("codeFencedFenceSequence"),F(W)):k(W)}function F(W){return W===a?(R++,D.consume(W),F):R>=f?(D.exit("codeFencedFenceSequence"),Fe(W)?Ke(D,K,"whitespace")(W):K(W)):k(W)}function K(W){return W===null||Le(W)?(D.exit("codeFencedFence"),T(W)):k(W)}}}function Vy(n,r,s){const o=this;return p;function p(f){return f===null?s(f):(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),v)}function v(f){return o.parser.lazy[o.now().line]?s(f):r(f)}}const fu={name:"codeIndented",tokenize:$y},Gy={partial:!0,tokenize:Ky};function $y(n,r,s){const o=this;return p;function p(h){return n.enter("codeIndented"),Ke(n,v,"linePrefix",5)(h)}function v(h){const d=o.events[o.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?f(h):s(h)}function f(h){return h===null?c(h):Le(h)?n.attempt(Gy,f,c)(h):(n.enter("codeFlowValue"),a(h))}function a(h){return h===null||Le(h)?(n.exit("codeFlowValue"),f(h)):(n.consume(h),a)}function c(h){return n.exit("codeIndented"),r(h)}}function Ky(n,r,s){const o=this;return p;function p(f){return o.parser.lazy[o.now().line]?s(f):Le(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),p):Ke(n,v,"linePrefix",5)(f)}function v(f){const a=o.events[o.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(f):Le(f)?p(f):s(f)}}const Yy={name:"codeText",previous:Xy,resolve:Wy,tokenize:Qy};function Wy(n){let r=n.length-4,s=3,o,p;if((n[s][1].type==="lineEnding"||n[s][1].type==="space")&&(n[r][1].type==="lineEnding"||n[r][1].type==="space")){for(o=s;++o<r;)if(n[o][1].type==="codeTextData"){n[s][1].type="codeTextPadding",n[r][1].type="codeTextPadding",s+=2,r-=2;break}}for(o=s-1,r++;++o<=r;)p===void 0?o!==r&&n[o][1].type!=="lineEnding"&&(p=o):(o===r||n[o][1].type==="lineEnding")&&(n[p][1].type="codeTextData",o!==p+2&&(n[p][1].end=n[o-1][1].end,n.splice(p+2,o-p-2),r-=o-p-2,o=p+2),p=void 0);return n}function Xy(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Qy(n,r,s){let o=0,p,v;return f;function f(u){return n.enter("codeText"),n.enter("codeTextSequence"),a(u)}function a(u){return u===96?(n.consume(u),o++,a):(n.exit("codeTextSequence"),c(u))}function c(u){return u===null?s(u):u===32?(n.enter("space"),n.consume(u),n.exit("space"),c):u===96?(v=n.enter("codeTextSequence"),p=0,d(u)):Le(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),c):(n.enter("codeTextData"),h(u))}function h(u){return u===null||u===32||u===96||Le(u)?(n.exit("codeTextData"),c(u)):(n.consume(u),h)}function d(u){return u===96?(n.consume(u),p++,d):p===o?(n.exit("codeTextSequence"),n.exit("codeText"),r(u)):(v.type="codeTextData",h(u))}}class Zy{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,s){const o=s??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(r,o):r>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(r,s,o){const p=s||0;this.setCursor(Math.trunc(r));const v=this.right.splice(this.right.length-p,Number.POSITIVE_INFINITY);return o&&Js(this.left,o),v.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),Js(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),Js(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const s=this.left.splice(r,Number.POSITIVE_INFINITY);Js(this.right,s.reverse())}else{const s=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);Js(this.left,s.reverse())}}}function Js(n,r){let s=0;if(r.length<1e4)n.push(...r);else for(;s<r.length;)n.push(...r.slice(s,s+1e4)),s+=1e4}function zg(n){const r={};let s=-1,o,p,v,f,a,c,h;const d=new Zy(n);for(;++s<d.length;){for(;s in r;)s=r[s];if(o=d.get(s),s&&o[1].type==="chunkFlow"&&d.get(s-1)[1].type==="listItemPrefix"&&(c=o[1]._tokenizer.events,v=0,v<c.length&&c[v][1].type==="lineEndingBlank"&&(v+=2),v<c.length&&c[v][1].type==="content"))for(;++v<c.length&&c[v][1].type!=="content";)c[v][1].type==="chunkText"&&(c[v][1]._isInFirstContentOfListItem=!0,v++);if(o[0]==="enter")o[1].contentType&&(Object.assign(r,Jy(d,s)),s=r[s],h=!0);else if(o[1]._container){for(v=s,p=void 0;v--;)if(f=d.get(v),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(p&&(d.get(p)[1].type="lineEndingBlank"),f[1].type="lineEnding",p=v);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;p&&(o[1].end={...d.get(p)[1].start},a=d.slice(p,s),a.unshift(o),d.splice(p,s-p+1,a))}}return gn(n,0,Number.POSITIVE_INFINITY,d.slice(0)),!h}function Jy(n,r){const s=n.get(r)[1],o=n.get(r)[2];let p=r-1;const v=[];let f=s._tokenizer;f||(f=o.parser[s.contentType](s.start),s._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const a=f.events,c=[],h={};let d,u,b=-1,w=s,E=0,x=0;const S=[x];for(;w;){for(;n.get(++p)[1]!==w;);v.push(p),w._tokenizer||(d=o.sliceStream(w),w.next||d.push(null),u&&f.defineSkip(w.start),w._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(d),w._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),u=w,w=w.next}for(w=s;++b<a.length;)a[b][0]==="exit"&&a[b-1][0]==="enter"&&a[b][1].type===a[b-1][1].type&&a[b][1].start.line!==a[b][1].end.line&&(x=b+1,S.push(x),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(f.events=[],w?(w._tokenizer=void 0,w.previous=void 0):S.pop(),b=S.length;b--;){const _=a.slice(S[b],S[b+1]),g=v.pop();c.push([g,g+_.length-1]),n.splice(g,2,_)}for(c.reverse(),b=-1;++b<c.length;)h[E+c[b][0]]=E+c[b][1],E+=c[b][1]-c[b][0]-1;return h}const eS={resolve:nS,tokenize:iS},tS={partial:!0,tokenize:rS};function nS(n){return zg(n),n}function iS(n,r){let s;return o;function o(a){return n.enter("content"),s=n.enter("chunkContent",{contentType:"content"}),p(a)}function p(a){return a===null?v(a):Le(a)?n.check(tS,f,v)(a):(n.consume(a),p)}function v(a){return n.exit("chunkContent"),n.exit("content"),r(a)}function f(a){return n.consume(a),n.exit("chunkContent"),s.next=n.enter("chunkContent",{contentType:"content",previous:s}),s=s.next,p}}function rS(n,r,s){const o=this;return p;function p(f){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),Ke(n,v,"linePrefix")}function v(f){if(f===null||Le(f))return s(f);const a=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(f):n.interrupt(o.parser.constructs.flow,s,r)(f)}}function Hg(n,r,s,o,p,v,f,a,c){const h=c||Number.POSITIVE_INFINITY;let d=0;return u;function u(_){return _===60?(n.enter(o),n.enter(p),n.enter(v),n.consume(_),n.exit(v),b):_===null||_===32||_===41||Na(_)?s(_):(n.enter(o),n.enter(f),n.enter(a),n.enter("chunkString",{contentType:"string"}),x(_))}function b(_){return _===62?(n.enter(v),n.consume(_),n.exit(v),n.exit(p),n.exit(o),r):(n.enter(a),n.enter("chunkString",{contentType:"string"}),w(_))}function w(_){return _===62?(n.exit("chunkString"),n.exit(a),b(_)):_===null||_===60||Le(_)?s(_):(n.consume(_),_===92?E:w)}function E(_){return _===60||_===62||_===92?(n.consume(_),w):w(_)}function x(_){return!d&&(_===null||_===41||ot(_))?(n.exit("chunkString"),n.exit(a),n.exit(f),n.exit(o),r(_)):d<h&&_===40?(n.consume(_),d++,x):_===41?(n.consume(_),d--,x):_===null||_===32||_===40||Na(_)?s(_):(n.consume(_),_===92?S:x)}function S(_){return _===40||_===41||_===92?(n.consume(_),x):x(_)}}function Ig(n,r,s,o,p,v){const f=this;let a=0,c;return h;function h(w){return n.enter(o),n.enter(p),n.consume(w),n.exit(p),n.enter(v),d}function d(w){return a>999||w===null||w===91||w===93&&!c||w===94&&!a&&"_hiddenFootnoteSupport"in f.parser.constructs?s(w):w===93?(n.exit(v),n.enter(p),n.consume(w),n.exit(p),n.exit(o),r):Le(w)?(n.enter("lineEnding"),n.consume(w),n.exit("lineEnding"),d):(n.enter("chunkString",{contentType:"string"}),u(w))}function u(w){return w===null||w===91||w===93||Le(w)||a++>999?(n.exit("chunkString"),d(w)):(n.consume(w),c||(c=!Fe(w)),w===92?b:u)}function b(w){return w===91||w===92||w===93?(n.consume(w),a++,u):u(w)}}function Ug(n,r,s,o,p,v){let f;return a;function a(b){return b===34||b===39||b===40?(n.enter(o),n.enter(p),n.consume(b),n.exit(p),f=b===40?41:b,c):s(b)}function c(b){return b===f?(n.enter(p),n.consume(b),n.exit(p),n.exit(o),r):(n.enter(v),h(b))}function h(b){return b===f?(n.exit(v),c(f)):b===null?s(b):Le(b)?(n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),Ke(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===f||b===null||Le(b)?(n.exit("chunkString"),h(b)):(n.consume(b),b===92?u:d)}function u(b){return b===f||b===92?(n.consume(b),d):d(b)}}function il(n,r){let s;return o;function o(p){return Le(p)?(n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),s=!0,o):Fe(p)?Ke(n,o,s?"linePrefix":"lineSuffix")(p):r(p)}}const sS={name:"definition",tokenize:aS},lS={partial:!0,tokenize:oS};function aS(n,r,s){const o=this;let p;return v;function v(w){return n.enter("definition"),f(w)}function f(w){return Ig.call(o,n,a,s,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function a(w){return p=Mn(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),w===58?(n.enter("definitionMarker"),n.consume(w),n.exit("definitionMarker"),c):s(w)}function c(w){return ot(w)?il(n,h)(w):h(w)}function h(w){return Hg(n,d,s,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function d(w){return n.attempt(lS,u,u)(w)}function u(w){return Fe(w)?Ke(n,b,"whitespace")(w):b(w)}function b(w){return w===null||Le(w)?(n.exit("definition"),o.parser.defined.push(p),r(w)):s(w)}}function oS(n,r,s){return o;function o(a){return ot(a)?il(n,p)(a):s(a)}function p(a){return Ug(n,v,s,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function v(a){return Fe(a)?Ke(n,f,"whitespace")(a):f(a)}function f(a){return a===null||Le(a)?r(a):s(a)}}const cS={name:"hardBreakEscape",tokenize:uS};function uS(n,r,s){return o;function o(v){return n.enter("hardBreakEscape"),n.consume(v),p}function p(v){return Le(v)?(n.exit("hardBreakEscape"),r(v)):s(v)}}const hS={name:"headingAtx",resolve:fS,tokenize:dS};function fS(n,r){let s=n.length-2,o=3,p,v;return n[o][1].type==="whitespace"&&(o+=2),s-2>o&&n[s][1].type==="whitespace"&&(s-=2),n[s][1].type==="atxHeadingSequence"&&(o===s-1||s-4>o&&n[s-2][1].type==="whitespace")&&(s-=o+1===s?2:4),s>o&&(p={type:"atxHeadingText",start:n[o][1].start,end:n[s][1].end},v={type:"chunkText",start:n[o][1].start,end:n[s][1].end,contentType:"text"},gn(n,o,s-o+1,[["enter",p,r],["enter",v,r],["exit",v,r],["exit",p,r]])),n}function dS(n,r,s){let o=0;return p;function p(d){return n.enter("atxHeading"),v(d)}function v(d){return n.enter("atxHeadingSequence"),f(d)}function f(d){return d===35&&o++<6?(n.consume(d),f):d===null||ot(d)?(n.exit("atxHeadingSequence"),a(d)):s(d)}function a(d){return d===35?(n.enter("atxHeadingSequence"),c(d)):d===null||Le(d)?(n.exit("atxHeading"),r(d)):Fe(d)?Ke(n,a,"whitespace")(d):(n.enter("atxHeadingText"),h(d))}function c(d){return d===35?(n.consume(d),c):(n.exit("atxHeadingSequence"),a(d))}function h(d){return d===null||d===35||ot(d)?(n.exit("atxHeadingText"),a(d)):(n.consume(d),h)}}const pS=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Rm=["pre","script","style","textarea"],mS={concrete:!0,name:"htmlFlow",resolveTo:vS,tokenize:yS},gS={partial:!0,tokenize:bS},_S={partial:!0,tokenize:SS};function vS(n){let r=n.length;for(;r--&&!(n[r][0]==="enter"&&n[r][1].type==="htmlFlow"););return r>1&&n[r-2][1].type==="linePrefix"&&(n[r][1].start=n[r-2][1].start,n[r+1][1].start=n[r-2][1].start,n.splice(r-2,2)),n}function yS(n,r,s){const o=this;let p,v,f,a,c;return h;function h(j){return d(j)}function d(j){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(j),u}function u(j){return j===33?(n.consume(j),b):j===47?(n.consume(j),v=!0,x):j===63?(n.consume(j),p=3,o.interrupt?r:B):Qt(j)?(n.consume(j),f=String.fromCharCode(j),S):s(j)}function b(j){return j===45?(n.consume(j),p=2,w):j===91?(n.consume(j),p=5,a=0,E):Qt(j)?(n.consume(j),p=4,o.interrupt?r:B):s(j)}function w(j){return j===45?(n.consume(j),o.interrupt?r:B):s(j)}function E(j){const te="CDATA[";return j===te.charCodeAt(a++)?(n.consume(j),a===te.length?o.interrupt?r:P:E):s(j)}function x(j){return Qt(j)?(n.consume(j),f=String.fromCharCode(j),S):s(j)}function S(j){if(j===null||j===47||j===62||ot(j)){const te=j===47,ue=f.toLowerCase();return!te&&!v&&Rm.includes(ue)?(p=1,o.interrupt?r(j):P(j)):pS.includes(f.toLowerCase())?(p=6,te?(n.consume(j),_):o.interrupt?r(j):P(j)):(p=7,o.interrupt&&!o.parser.lazy[o.now().line]?s(j):v?g(j):y(j))}return j===45||$t(j)?(n.consume(j),f+=String.fromCharCode(j),S):s(j)}function _(j){return j===62?(n.consume(j),o.interrupt?r:P):s(j)}function g(j){return Fe(j)?(n.consume(j),g):N(j)}function y(j){return j===47?(n.consume(j),N):j===58||j===95||Qt(j)?(n.consume(j),A):Fe(j)?(n.consume(j),y):N(j)}function A(j){return j===45||j===46||j===58||j===95||$t(j)?(n.consume(j),A):M(j)}function M(j){return j===61?(n.consume(j),D):Fe(j)?(n.consume(j),M):y(j)}function D(j){return j===null||j===60||j===61||j===62||j===96?s(j):j===34||j===39?(n.consume(j),c=j,T):Fe(j)?(n.consume(j),D):k(j)}function T(j){return j===c?(n.consume(j),c=null,R):j===null||Le(j)?s(j):(n.consume(j),T)}function k(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||ot(j)?M(j):(n.consume(j),k)}function R(j){return j===47||j===62||Fe(j)?y(j):s(j)}function N(j){return j===62?(n.consume(j),I):s(j)}function I(j){return j===null||Le(j)?P(j):Fe(j)?(n.consume(j),I):s(j)}function P(j){return j===45&&p===2?(n.consume(j),G):j===60&&p===1?(n.consume(j),$):j===62&&p===4?(n.consume(j),z):j===63&&p===3?(n.consume(j),B):j===93&&p===5?(n.consume(j),H):Le(j)&&(p===6||p===7)?(n.exit("htmlFlowData"),n.check(gS,V,F)(j)):j===null||Le(j)?(n.exit("htmlFlowData"),F(j)):(n.consume(j),P)}function F(j){return n.check(_S,K,V)(j)}function K(j){return n.enter("lineEnding"),n.consume(j),n.exit("lineEnding"),W}function W(j){return j===null||Le(j)?F(j):(n.enter("htmlFlowData"),P(j))}function G(j){return j===45?(n.consume(j),B):P(j)}function $(j){return j===47?(n.consume(j),f="",J):P(j)}function J(j){if(j===62){const te=f.toLowerCase();return Rm.includes(te)?(n.consume(j),z):P(j)}return Qt(j)&&f.length<8?(n.consume(j),f+=String.fromCharCode(j),J):P(j)}function H(j){return j===93?(n.consume(j),B):P(j)}function B(j){return j===62?(n.consume(j),z):j===45&&p===2?(n.consume(j),B):P(j)}function z(j){return j===null||Le(j)?(n.exit("htmlFlowData"),V(j)):(n.consume(j),z)}function V(j){return n.exit("htmlFlow"),r(j)}}function SS(n,r,s){const o=this;return p;function p(f){return Le(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),v):s(f)}function v(f){return o.parser.lazy[o.now().line]?s(f):r(f)}}function bS(n,r,s){return o;function o(p){return n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),n.attempt(cl,r,s)}}const CS={name:"htmlText",tokenize:wS};function wS(n,r,s){const o=this;let p,v,f;return a;function a(B){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(B),c}function c(B){return B===33?(n.consume(B),h):B===47?(n.consume(B),M):B===63?(n.consume(B),y):Qt(B)?(n.consume(B),k):s(B)}function h(B){return B===45?(n.consume(B),d):B===91?(n.consume(B),v=0,E):Qt(B)?(n.consume(B),g):s(B)}function d(B){return B===45?(n.consume(B),w):s(B)}function u(B){return B===null?s(B):B===45?(n.consume(B),b):Le(B)?(f=u,$(B)):(n.consume(B),u)}function b(B){return B===45?(n.consume(B),w):u(B)}function w(B){return B===62?G(B):B===45?b(B):u(B)}function E(B){const z="CDATA[";return B===z.charCodeAt(v++)?(n.consume(B),v===z.length?x:E):s(B)}function x(B){return B===null?s(B):B===93?(n.consume(B),S):Le(B)?(f=x,$(B)):(n.consume(B),x)}function S(B){return B===93?(n.consume(B),_):x(B)}function _(B){return B===62?G(B):B===93?(n.consume(B),_):x(B)}function g(B){return B===null||B===62?G(B):Le(B)?(f=g,$(B)):(n.consume(B),g)}function y(B){return B===null?s(B):B===63?(n.consume(B),A):Le(B)?(f=y,$(B)):(n.consume(B),y)}function A(B){return B===62?G(B):y(B)}function M(B){return Qt(B)?(n.consume(B),D):s(B)}function D(B){return B===45||$t(B)?(n.consume(B),D):T(B)}function T(B){return Le(B)?(f=T,$(B)):Fe(B)?(n.consume(B),T):G(B)}function k(B){return B===45||$t(B)?(n.consume(B),k):B===47||B===62||ot(B)?R(B):s(B)}function R(B){return B===47?(n.consume(B),G):B===58||B===95||Qt(B)?(n.consume(B),N):Le(B)?(f=R,$(B)):Fe(B)?(n.consume(B),R):G(B)}function N(B){return B===45||B===46||B===58||B===95||$t(B)?(n.consume(B),N):I(B)}function I(B){return B===61?(n.consume(B),P):Le(B)?(f=I,$(B)):Fe(B)?(n.consume(B),I):R(B)}function P(B){return B===null||B===60||B===61||B===62||B===96?s(B):B===34||B===39?(n.consume(B),p=B,F):Le(B)?(f=P,$(B)):Fe(B)?(n.consume(B),P):(n.consume(B),K)}function F(B){return B===p?(n.consume(B),p=void 0,W):B===null?s(B):Le(B)?(f=F,$(B)):(n.consume(B),F)}function K(B){return B===null||B===34||B===39||B===60||B===61||B===96?s(B):B===47||B===62||ot(B)?R(B):(n.consume(B),K)}function W(B){return B===47||B===62||ot(B)?R(B):s(B)}function G(B){return B===62?(n.consume(B),n.exit("htmlTextData"),n.exit("htmlText"),r):s(B)}function $(B){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(B),n.exit("lineEnding"),J}function J(B){return Fe(B)?Ke(n,H,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):H(B)}function H(B){return n.enter("htmlTextData"),f(B)}}const Qu={name:"labelEnd",resolveAll:AS,resolveTo:TS,tokenize:DS},xS={tokenize:RS},ES={tokenize:MS},kS={tokenize:LS};function AS(n){let r=-1;const s=[];for(;++r<n.length;){const o=n[r][1];if(s.push(n[r]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const p=o.type==="labelImage"?4:2;o.type="data",r+=p}}return n.length!==s.length&&gn(n,0,n.length,s),n}function TS(n,r){let s=n.length,o=0,p,v,f,a;for(;s--;)if(p=n[s][1],v){if(p.type==="link"||p.type==="labelLink"&&p._inactive)break;n[s][0]==="enter"&&p.type==="labelLink"&&(p._inactive=!0)}else if(f){if(n[s][0]==="enter"&&(p.type==="labelImage"||p.type==="labelLink")&&!p._balanced&&(v=s,p.type!=="labelLink")){o=2;break}}else p.type==="labelEnd"&&(f=s);const c={type:n[v][1].type==="labelLink"?"link":"image",start:{...n[v][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[v][1].start},end:{...n[f][1].end}},d={type:"labelText",start:{...n[v+o+2][1].end},end:{...n[f-2][1].start}};return a=[["enter",c,r],["enter",h,r]],a=An(a,n.slice(v+1,v+o+3)),a=An(a,[["enter",d,r]]),a=An(a,Fa(r.parser.constructs.insideSpan.null,n.slice(v+o+4,f-3),r)),a=An(a,[["exit",d,r],n[f-2],n[f-1],["exit",h,r]]),a=An(a,n.slice(f+1)),a=An(a,[["exit",c,r]]),gn(n,v,n.length,a),n}function DS(n,r,s){const o=this;let p=o.events.length,v,f;for(;p--;)if((o.events[p][1].type==="labelImage"||o.events[p][1].type==="labelLink")&&!o.events[p][1]._balanced){v=o.events[p][1];break}return a;function a(b){return v?v._inactive?u(b):(f=o.parser.defined.includes(Mn(o.sliceSerialize({start:v.end,end:o.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(b),n.exit("labelMarker"),n.exit("labelEnd"),c):s(b)}function c(b){return b===40?n.attempt(xS,d,f?d:u)(b):b===91?n.attempt(ES,d,f?h:u)(b):f?d(b):u(b)}function h(b){return n.attempt(kS,d,u)(b)}function d(b){return r(b)}function u(b){return v._balanced=!0,s(b)}}function RS(n,r,s){return o;function o(u){return n.enter("resource"),n.enter("resourceMarker"),n.consume(u),n.exit("resourceMarker"),p}function p(u){return ot(u)?il(n,v)(u):v(u)}function v(u){return u===41?d(u):Hg(n,f,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function f(u){return ot(u)?il(n,c)(u):d(u)}function a(u){return s(u)}function c(u){return u===34||u===39||u===40?Ug(n,h,s,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):d(u)}function h(u){return ot(u)?il(n,d)(u):d(u)}function d(u){return u===41?(n.enter("resourceMarker"),n.consume(u),n.exit("resourceMarker"),n.exit("resource"),r):s(u)}}function MS(n,r,s){const o=this;return p;function p(a){return Ig.call(o,n,v,f,"reference","referenceMarker","referenceString")(a)}function v(a){return o.parser.defined.includes(Mn(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?r(a):s(a)}function f(a){return s(a)}}function LS(n,r,s){return o;function o(v){return n.enter("reference"),n.enter("referenceMarker"),n.consume(v),n.exit("referenceMarker"),p}function p(v){return v===93?(n.enter("referenceMarker"),n.consume(v),n.exit("referenceMarker"),n.exit("reference"),r):s(v)}}const OS={name:"labelStartImage",resolveAll:Qu.resolveAll,tokenize:BS};function BS(n,r,s){const o=this;return p;function p(a){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(a),n.exit("labelImageMarker"),v}function v(a){return a===91?(n.enter("labelMarker"),n.consume(a),n.exit("labelMarker"),n.exit("labelImage"),f):s(a)}function f(a){return a===94&&"_hiddenFootnoteSupport"in o.parser.constructs?s(a):r(a)}}const NS={name:"labelStartLink",resolveAll:Qu.resolveAll,tokenize:jS};function jS(n,r,s){const o=this;return p;function p(f){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(f),n.exit("labelMarker"),n.exit("labelLink"),v}function v(f){return f===94&&"_hiddenFootnoteSupport"in o.parser.constructs?s(f):r(f)}}const du={name:"lineEnding",tokenize:zS};function zS(n,r){return s;function s(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),Ke(n,r,"linePrefix")}}const Ba={name:"thematicBreak",tokenize:HS};function HS(n,r,s){let o=0,p;return v;function v(h){return n.enter("thematicBreak"),f(h)}function f(h){return p=h,a(h)}function a(h){return h===p?(n.enter("thematicBreakSequence"),c(h)):o>=3&&(h===null||Le(h))?(n.exit("thematicBreak"),r(h)):s(h)}function c(h){return h===p?(n.consume(h),o++,c):(n.exit("thematicBreakSequence"),Fe(h)?Ke(n,a,"whitespace")(h):a(h))}}const sn={continuation:{tokenize:FS},exit:VS,name:"list",tokenize:PS},IS={partial:!0,tokenize:GS},US={partial:!0,tokenize:qS};function PS(n,r,s){const o=this,p=o.events[o.events.length-1];let v=p&&p[1].type==="linePrefix"?p[2].sliceSerialize(p[1],!0).length:0,f=0;return a;function a(w){const E=o.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!o.containerState.marker||w===o.containerState.marker:Ru(w)){if(o.containerState.type||(o.containerState.type=E,n.enter(E,{_container:!0})),E==="listUnordered")return n.enter("listItemPrefix"),w===42||w===45?n.check(Ba,s,h)(w):h(w);if(!o.interrupt||w===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),c(w)}return s(w)}function c(w){return Ru(w)&&++f<10?(n.consume(w),c):(!o.interrupt||f<2)&&(o.containerState.marker?w===o.containerState.marker:w===41||w===46)?(n.exit("listItemValue"),h(w)):s(w)}function h(w){return n.enter("listItemMarker"),n.consume(w),n.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||w,n.check(cl,o.interrupt?s:d,n.attempt(IS,b,u))}function d(w){return o.containerState.initialBlankLine=!0,v++,b(w)}function u(w){return Fe(w)?(n.enter("listItemPrefixWhitespace"),n.consume(w),n.exit("listItemPrefixWhitespace"),b):s(w)}function b(w){return o.containerState.size=v+o.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(w)}}function FS(n,r,s){const o=this;return o.containerState._closeFlow=void 0,n.check(cl,p,v);function p(a){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Ke(n,r,"listItemIndent",o.containerState.size+1)(a)}function v(a){return o.containerState.furtherBlankLines||!Fe(a)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,f(a)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,n.attempt(US,r,f)(a))}function f(a){return o.containerState._closeFlow=!0,o.interrupt=void 0,Ke(n,n.attempt(sn,r,s),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function qS(n,r,s){const o=this;return Ke(n,p,"listItemIndent",o.containerState.size+1);function p(v){const f=o.events[o.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===o.containerState.size?r(v):s(v)}}function VS(n){n.exit(this.containerState.type)}function GS(n,r,s){const o=this;return Ke(n,p,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function p(v){const f=o.events[o.events.length-1];return!Fe(v)&&f&&f[1].type==="listItemPrefixWhitespace"?r(v):s(v)}}const Mm={name:"setextUnderline",resolveTo:$S,tokenize:KS};function $S(n,r){let s=n.length,o,p,v;for(;s--;)if(n[s][0]==="enter"){if(n[s][1].type==="content"){o=s;break}n[s][1].type==="paragraph"&&(p=s)}else n[s][1].type==="content"&&n.splice(s,1),!v&&n[s][1].type==="definition"&&(v=s);const f={type:"setextHeading",start:{...n[o][1].start},end:{...n[n.length-1][1].end}};return n[p][1].type="setextHeadingText",v?(n.splice(p,0,["enter",f,r]),n.splice(v+1,0,["exit",n[o][1],r]),n[o][1].end={...n[v][1].end}):n[o][1]=f,n.push(["exit",f,r]),n}function KS(n,r,s){const o=this;let p;return v;function v(h){let d=o.events.length,u;for(;d--;)if(o.events[d][1].type!=="lineEnding"&&o.events[d][1].type!=="linePrefix"&&o.events[d][1].type!=="content"){u=o.events[d][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||u)?(n.enter("setextHeadingLine"),p=h,f(h)):s(h)}function f(h){return n.enter("setextHeadingLineSequence"),a(h)}function a(h){return h===p?(n.consume(h),a):(n.exit("setextHeadingLineSequence"),Fe(h)?Ke(n,c,"lineSuffix")(h):c(h))}function c(h){return h===null||Le(h)?(n.exit("setextHeadingLine"),r(h)):s(h)}}const YS={tokenize:WS};function WS(n){const r=this,s=n.attempt(cl,o,n.attempt(this.parser.constructs.flowInitial,p,Ke(n,n.attempt(this.parser.constructs.flow,p,n.attempt(eS,p)),"linePrefix")));return s;function o(v){if(v===null){n.consume(v);return}return n.enter("lineEndingBlank"),n.consume(v),n.exit("lineEndingBlank"),r.currentConstruct=void 0,s}function p(v){if(v===null){n.consume(v);return}return n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),r.currentConstruct=void 0,s}}const XS={resolveAll:Fg()},QS=Pg("string"),ZS=Pg("text");function Pg(n){return{resolveAll:Fg(n==="text"?JS:void 0),tokenize:r};function r(s){const o=this,p=this.parser.constructs[n],v=s.attempt(p,f,a);return f;function f(d){return h(d)?v(d):a(d)}function a(d){if(d===null){s.consume(d);return}return s.enter("data"),s.consume(d),c}function c(d){return h(d)?(s.exit("data"),v(d)):(s.consume(d),c)}function h(d){if(d===null)return!0;const u=p[d];let b=-1;if(u)for(;++b<u.length;){const w=u[b];if(!w.previous||w.previous.call(o,o.previous))return!0}return!1}}}function Fg(n){return r;function r(s,o){let p=-1,v;for(;++p<=s.length;)v===void 0?s[p]&&s[p][1].type==="data"&&(v=p,p++):(!s[p]||s[p][1].type!=="data")&&(p!==v+2&&(s[v][1].end=s[p-1][1].end,s.splice(v+2,p-v-2),p=v+2),v=void 0);return n?n(s,o):s}}function JS(n,r){let s=0;for(;++s<=n.length;)if((s===n.length||n[s][1].type==="lineEnding")&&n[s-1][1].type==="data"){const o=n[s-1][1],p=r.sliceStream(o);let v=p.length,f=-1,a=0,c;for(;v--;){const h=p[v];if(typeof h=="string"){for(f=h.length;h.charCodeAt(f-1)===32;)a++,f--;if(f)break;f=-1}else if(h===-2)c=!0,a++;else if(h!==-1){v++;break}}if(r._contentTypeTextTrailing&&s===n.length&&(a=0),a){const h={type:s===n.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:v?f:o.start._bufferIndex+f,_index:o.start._index+v,line:o.end.line,column:o.end.column-a,offset:o.end.offset-a},end:{...o.end}};o.end={...h.start},o.start.offset===o.end.offset?Object.assign(o,h):(n.splice(s,0,["enter",h,r],["exit",h,r]),s+=2)}s++}return n}const eb={42:sn,43:sn,45:sn,48:sn,49:sn,50:sn,51:sn,52:sn,53:sn,54:sn,55:sn,56:sn,57:sn,62:Bg},tb={91:sS},nb={[-2]:fu,[-1]:fu,32:fu},ib={35:hS,42:Ba,45:[Mm,Ba],60:mS,61:Mm,95:Ba,96:Dm,126:Dm},rb={38:jg,92:Ng},sb={[-5]:du,[-4]:du,[-3]:du,33:OS,38:jg,42:Mu,60:[Ny,CS],91:NS,92:[cS,Ng],93:Qu,95:Mu,96:Yy},lb={null:[Mu,XS]},ab={null:[42,95]},ob={null:[]},cb=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ab,contentInitial:tb,disable:ob,document:eb,flow:ib,flowInitial:nb,insideSpan:lb,string:rb,text:sb},Symbol.toStringTag,{value:"Module"}));function ub(n,r,s){let o={_bufferIndex:-1,_index:0,line:s&&s.line||1,column:s&&s.column||1,offset:s&&s.offset||0};const p={},v=[];let f=[],a=[];const c={attempt:T(M),check:T(D),consume:g,enter:y,exit:A,interrupt:T(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:x,events:[],now:E,parser:n,previous:null,sliceSerialize:b,sliceStream:w,write:u};let d=r.tokenize.call(h,c);return r.resolveAll&&v.push(r),h;function u(I){return f=An(f,I),S(),f[f.length-1]!==null?[]:(k(r,0),h.events=Fa(v,h.events,h),h.events)}function b(I,P){return fb(w(I),P)}function w(I){return hb(f,I)}function E(){const{_bufferIndex:I,_index:P,line:F,column:K,offset:W}=o;return{_bufferIndex:I,_index:P,line:F,column:K,offset:W}}function x(I){p[I.line]=I.column,N()}function S(){let I;for(;o._index<f.length;){const P=f[o._index];if(typeof P=="string")for(I=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===I&&o._bufferIndex<P.length;)_(P.charCodeAt(o._bufferIndex));else _(P)}}function _(I){d=d(I)}function g(I){Le(I)?(o.line++,o.column=1,o.offset+=I===-3?2:1,N()):I!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===f[o._index].length&&(o._bufferIndex=-1,o._index++)),h.previous=I}function y(I,P){const F=P||{};return F.type=I,F.start=E(),h.events.push(["enter",F,h]),a.push(F),F}function A(I){const P=a.pop();return P.end=E(),h.events.push(["exit",P,h]),P}function M(I,P){k(I,P.from)}function D(I,P){P.restore()}function T(I,P){return F;function F(K,W,G){let $,J,H,B;return Array.isArray(K)?V(K):"tokenize"in K?V([K]):z(K);function z(me){return Y;function Y(q){const oe=q!==null&&me[q],Z=q!==null&&me.null,ie=[...Array.isArray(oe)?oe:oe?[oe]:[],...Array.isArray(Z)?Z:Z?[Z]:[]];return V(ie)(q)}}function V(me){return $=me,J=0,me.length===0?G:j(me[J])}function j(me){return Y;function Y(q){return B=R(),H=me,me.partial||(h.currentConstruct=me),me.name&&h.parser.constructs.disable.null.includes(me.name)?ue():me.tokenize.call(P?Object.assign(Object.create(h),P):h,c,te,ue)(q)}}function te(me){return I(H,B),W}function ue(me){return B.restore(),++J<$.length?j($[J]):G}}}function k(I,P){I.resolveAll&&!v.includes(I)&&v.push(I),I.resolve&&gn(h.events,P,h.events.length-P,I.resolve(h.events.slice(P),h)),I.resolveTo&&(h.events=I.resolveTo(h.events,h))}function R(){const I=E(),P=h.previous,F=h.currentConstruct,K=h.events.length,W=Array.from(a);return{from:K,restore:G};function G(){o=I,h.previous=P,h.currentConstruct=F,h.events.length=K,a=W,N()}}function N(){o.line in p&&o.column<2&&(o.column=p[o.line],o.offset+=p[o.line]-1)}}function hb(n,r){const s=r.start._index,o=r.start._bufferIndex,p=r.end._index,v=r.end._bufferIndex;let f;if(s===p)f=[n[s].slice(o,v)];else{if(f=n.slice(s,p),o>-1){const a=f[0];typeof a=="string"?f[0]=a.slice(o):f.shift()}v>0&&f.push(n[p].slice(0,v))}return f}function fb(n,r){let s=-1;const o=[];let p;for(;++s<n.length;){const v=n[s];let f;if(typeof v=="string")f=v;else switch(v){case-5:{f="\r";break}case-4:{f=`
|
|
57
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(k){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),S.isLinux&&k&&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(k){const R=this._getMouseBufferCoords(k),N=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!!(N&&I&&R)&&this._areCoordsInSelection(R,N,I)}isCellInSelection(k,R){const N=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!N||!I)&&this._areCoordsInSelection([k,R],N,I)}_areCoordsInSelection(k,R,N){return k[1]>R[1]&&k[1]<N[1]||R[1]===N[1]&&k[1]===R[1]&&k[0]>=R[0]&&k[0]<N[0]||R[1]<N[1]&&k[1]===N[1]&&k[0]<N[0]||R[1]<N[1]&&k[1]===R[1]&&k[0]>=R[0]}_selectWordAtCursor(k,R){var P,F;const N=(F=(P=this._linkifier.currentLink)==null?void 0:P.link)==null?void 0:F.range;if(N)return this._model.selectionStart=[N.start.x-1,N.start.y-1],this._model.selectionStartLength=(0,g.getRangeLength)(N,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const I=this._getMouseBufferCoords(k);return!!I&&(this._selectWordAt(I,R),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(k,R){this._model.clearSelection(),k=Math.max(k,0),R=Math.min(R,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,k],this._model.selectionEnd=[this._bufferService.cols,R],this.refresh(),this._onSelectionChange.fire()}_handleTrim(k){this._model.handleTrim(k)&&this.refresh()}_getMouseBufferCoords(k){const R=this._mouseService.getCoords(k,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(R)return R[0]--,R[1]--,R[1]+=this._bufferService.buffer.ydisp,R}_getMouseEventScrollAmount(k){let R=(0,u.getCoordsRelativeToElement)(this._coreBrowserService.window,k,this._screenElement)[1];const N=this._renderService.dimensions.css.canvas.height;return R>=0&&R<=N?0:(R>N&&(R-=N),R=Math.min(Math.max(R,-50),50),R/=50,R/Math.abs(R)+Math.round(14*R))}shouldForceSelection(k){return S.isMac?k.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:k.shiftKey}handleMouseDown(k){if(this._mouseDownTimeStamp=k.timeStamp,(k.button!==2||!this.hasSelection)&&k.button===0){if(!this._enabled){if(!this.shouldForceSelection(k))return;k.stopPropagation()}k.preventDefault(),this._dragScrollAmount=0,this._enabled&&k.shiftKey?this._handleIncrementalClick(k):k.detail===1?this._handleSingleClick(k):k.detail===2?this._handleDoubleClick(k):k.detail===3&&this._handleTripleClick(k),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(k){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(k))}_handleSingleClick(k){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(k)?3:0,this._model.selectionStart=this._getMouseBufferCoords(k),!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(k){this._selectWordAtCursor(k,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(k){const R=this._getMouseBufferCoords(k);R&&(this._activeSelectionMode=2,this._selectLineAt(R[1]))}shouldColumnSelect(k){return k.altKey&&!(S.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(k){if(k.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(k),!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(k),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const N=this._bufferService.buffer;if(this._model.selectionEnd[1]<N.lines.length){const I=N.lines.get(this._model.selectionEnd[1]);I&&I.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 k=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(k.ydisp+this._bufferService.rows,k.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=k.ydisp),this.refresh()}}_handleMouseUp(k){const R=k.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&R<500&&k.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const N=this._mouseService.getCoords(k,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(N&&N[0]!==void 0&&N[1]!==void 0){const I=(0,_.moveToCellSequence)(N[0]-1,N[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const k=this._model.finalSelectionStart,R=this._model.finalSelectionEnd,N=!(!k||!R||k[0]===R[0]&&k[1]===R[1]);N?k&&R&&(this._oldSelectionStart&&this._oldSelectionEnd&&k[0]===this._oldSelectionStart[0]&&k[1]===this._oldSelectionStart[1]&&R[0]===this._oldSelectionEnd[0]&&R[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(k,R,N)):this._oldHasSelection&&this._fireOnSelectionChange(k,R,N)}_fireOnSelectionChange(k,R,N){this._oldSelectionStart=k,this._oldSelectionEnd=R,this._oldHasSelection=N,this._onSelectionChange.fire()}_handleBufferActivate(k){this.clearSelection(),this._trimListener.dispose(),this._trimListener=k.activeBuffer.lines.onTrim((R=>this._handleTrim(R)))}_convertViewportColToCharacterIndex(k,R){let N=R;for(let I=0;R>=I;I++){const P=k.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?N--:P>1&&R!==I&&(N+=P-1)}return N}setSelection(k,R,N){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[k,R],this._model.selectionStartLength=N,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(k){this._isClickInSelection(k)||(this._selectWordAtCursor(k,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(k,R,N=!0,I=!0){if(k[0]>=this._bufferService.cols)return;const P=this._bufferService.buffer,F=P.lines.get(k[1]);if(!F)return;const K=P.translateBufferLineToString(k[1],!1);let W=this._convertViewportColToCharacterIndex(F,k[0]),V=W;const $=k[0]-W;let J=0,H=0,B=0,z=0;if(K.charAt(W)===" "){for(;W>0&&K.charAt(W-1)===" ";)W--;for(;V<K.length&&K.charAt(V+1)===" ";)V++}else{let te=k[0],he=k[0];F.getWidth(te)===0&&(J++,te--),F.getWidth(he)===2&&(H++,he++);const me=F.getString(he).length;for(me>1&&(z+=me-1,V+=me-1);te>0&&W>0&&!this._isCharWordSeparator(F.loadCell(te-1,this._workCell));){F.loadCell(te-1,this._workCell);const Y=this._workCell.getChars().length;this._workCell.getWidth()===0?(J++,te--):Y>1&&(B+=Y-1,W-=Y-1),W--,te--}for(;he<F.length&&V+1<K.length&&!this._isCharWordSeparator(F.loadCell(he+1,this._workCell));){F.loadCell(he+1,this._workCell);const Y=this._workCell.getChars().length;this._workCell.getWidth()===2?(H++,he++):Y>1&&(z+=Y-1,V+=Y-1),V++,he++}}V++;let G=W+$-J+B,j=Math.min(this._bufferService.cols,V-W+J+H-B-z);if(R||K.slice(W,V).trim()!==""){if(N&&G===0&&F.getCodePoint(0)!==32){const te=P.lines.get(k[1]-1);if(te&&F.isWrapped&&te.getCodePoint(this._bufferService.cols-1)!==32){const he=this._getWordAt([this._bufferService.cols-1,k[1]-1],!1,!0,!1);if(he){const me=this._bufferService.cols-he.start;G-=me,j+=me}}}if(I&&G+j===this._bufferService.cols&&F.getCodePoint(this._bufferService.cols-1)!==32){const te=P.lines.get(k[1]+1);if(te!=null&&te.isWrapped&&te.getCodePoint(0)!==32){const he=this._getWordAt([0,k[1]+1],!1,!1,!0);he&&(j+=he.length)}}return{start:G,length:j}}}_selectWordAt(k,R){const N=this._getWordAt(k,R);if(N){for(;N.start<0;)N.start+=this._bufferService.cols,k[1]--;this._model.selectionStart=[N.start,k[1]],this._model.selectionStartLength=N.length}}_selectToWordAt(k){const R=this._getWordAt(k,!0);if(R){let N=k[1];for(;R.start<0;)R.start+=this._bufferService.cols,N--;if(!this._model.areSelectionValuesReversed())for(;R.start+R.length>this._bufferService.cols;)R.length-=this._bufferService.cols,N++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?R.start:R.start+R.length,N]}}_isCharWordSeparator(k){return k.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(k.getChars())>=0}_selectLineAt(k){const R=this._bufferService.buffer.getWrappedRangeForLine(k),N={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,g.getRangeLength)(N,this._bufferService.cols)}};a.SelectionService=T=h([m(3,A.IBufferService),m(4,A.ICoreService),m(5,E.IMouseService),m(6,A.IOptionsService),m(7,E.IRenderService),m(8,E.ICoreBrowserService)],T)},4725:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const h=c(8343);a.ICharSizeService=(0,h.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,h.createDecorator)("CoreBrowserService"),a.IMouseService=(0,h.createDecorator)("MouseService"),a.IRenderService=(0,h.createDecorator)("RenderService"),a.ISelectionService=(0,h.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,h.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,h.createDecorator)("ThemeService"),a.ILinkProviderService=(0,h.createDecorator)("LinkProviderService")},6731:function(f,a,c){var h=this&&this.__decorate||function(T,k,R,N){var I,P=arguments.length,F=P<3?k:N===null?N=Object.getOwnPropertyDescriptor(k,R):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(T,k,R,N);else for(var K=T.length-1;K>=0;K--)(I=T[K])&&(F=(P<3?I(F):P>3?I(k,R,F):I(k,R))||F);return P>3&&F&&Object.defineProperty(k,R,F),F},m=this&&this.__param||function(T,k){return function(R,N){k(R,N,T)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const u=c(7239),_=c(8055),C=c(8460),E=c(844),x=c(2585),b=_.css.toColor("#ffffff"),S=_.css.toColor("#000000"),g=_.css.toColor("#ffffff"),y=_.css.toColor("#000000"),A={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const T=[_.css.toColor("#2e3436"),_.css.toColor("#cc0000"),_.css.toColor("#4e9a06"),_.css.toColor("#c4a000"),_.css.toColor("#3465a4"),_.css.toColor("#75507b"),_.css.toColor("#06989a"),_.css.toColor("#d3d7cf"),_.css.toColor("#555753"),_.css.toColor("#ef2929"),_.css.toColor("#8ae234"),_.css.toColor("#fce94f"),_.css.toColor("#729fcf"),_.css.toColor("#ad7fa8"),_.css.toColor("#34e2e2"),_.css.toColor("#eeeeec")],k=[0,95,135,175,215,255];for(let R=0;R<216;R++){const N=k[R/36%6|0],I=k[R/6%6|0],P=k[R%6];T.push({css:_.channels.toCss(N,I,P),rgba:_.channels.toRgba(N,I,P)})}for(let R=0;R<24;R++){const N=8+10*R;T.push({css:_.channels.toCss(N,N,N),rgba:_.channels.toRgba(N,N,N)})}return T})());let M=a.ThemeService=class extends E.Disposable{get colors(){return this._colors}constructor(T){super(),this._optionsService=T,this._contrastCache=new u.ColorContrastCache,this._halfContrastCache=new u.ColorContrastCache,this._onChangeColors=this.register(new C.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:b,background:S,cursor:g,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:A,selectionBackgroundOpaque:_.color.blend(S,A),selectionInactiveBackgroundTransparent:A,selectionInactiveBackgroundOpaque:_.color.blend(S,A),ansi:a.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(T={}){const k=this._colors;if(k.foreground=D(T.foreground,b),k.background=D(T.background,S),k.cursor=D(T.cursor,g),k.cursorAccent=D(T.cursorAccent,y),k.selectionBackgroundTransparent=D(T.selectionBackground,A),k.selectionBackgroundOpaque=_.color.blend(k.background,k.selectionBackgroundTransparent),k.selectionInactiveBackgroundTransparent=D(T.selectionInactiveBackground,k.selectionBackgroundTransparent),k.selectionInactiveBackgroundOpaque=_.color.blend(k.background,k.selectionInactiveBackgroundTransparent),k.selectionForeground=T.selectionForeground?D(T.selectionForeground,_.NULL_COLOR):void 0,k.selectionForeground===_.NULL_COLOR&&(k.selectionForeground=void 0),_.color.isOpaque(k.selectionBackgroundTransparent)&&(k.selectionBackgroundTransparent=_.color.opacity(k.selectionBackgroundTransparent,.3)),_.color.isOpaque(k.selectionInactiveBackgroundTransparent)&&(k.selectionInactiveBackgroundTransparent=_.color.opacity(k.selectionInactiveBackgroundTransparent,.3)),k.ansi=a.DEFAULT_ANSI_COLORS.slice(),k.ansi[0]=D(T.black,a.DEFAULT_ANSI_COLORS[0]),k.ansi[1]=D(T.red,a.DEFAULT_ANSI_COLORS[1]),k.ansi[2]=D(T.green,a.DEFAULT_ANSI_COLORS[2]),k.ansi[3]=D(T.yellow,a.DEFAULT_ANSI_COLORS[3]),k.ansi[4]=D(T.blue,a.DEFAULT_ANSI_COLORS[4]),k.ansi[5]=D(T.magenta,a.DEFAULT_ANSI_COLORS[5]),k.ansi[6]=D(T.cyan,a.DEFAULT_ANSI_COLORS[6]),k.ansi[7]=D(T.white,a.DEFAULT_ANSI_COLORS[7]),k.ansi[8]=D(T.brightBlack,a.DEFAULT_ANSI_COLORS[8]),k.ansi[9]=D(T.brightRed,a.DEFAULT_ANSI_COLORS[9]),k.ansi[10]=D(T.brightGreen,a.DEFAULT_ANSI_COLORS[10]),k.ansi[11]=D(T.brightYellow,a.DEFAULT_ANSI_COLORS[11]),k.ansi[12]=D(T.brightBlue,a.DEFAULT_ANSI_COLORS[12]),k.ansi[13]=D(T.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),k.ansi[14]=D(T.brightCyan,a.DEFAULT_ANSI_COLORS[14]),k.ansi[15]=D(T.brightWhite,a.DEFAULT_ANSI_COLORS[15]),T.extendedAnsi){const R=Math.min(k.ansi.length-16,T.extendedAnsi.length);for(let N=0;N<R;N++)k.ansi[N+16]=D(T.extendedAnsi[N],a.DEFAULT_ANSI_COLORS[N+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(T){this._restoreColor(T),this._onChangeColors.fire(this.colors)}_restoreColor(T){if(T!==void 0)switch(T){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[T]=this._restoreColors.ansi[T]}else for(let k=0;k<this._restoreColors.ansi.length;++k)this._colors.ansi[k]=this._restoreColors.ansi[k]}modifyColors(T){T(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 D(T,k){if(T!==void 0)try{return _.css.toColor(T)}catch{}return k}a.ThemeService=M=h([m(0,x.IOptionsService)],M)},6349:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const h=c(8460),m=c(844);class u extends m.Disposable{constructor(C){super(),this._maxLength=C,this.onDeleteEmitter=this.register(new h.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new h.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new h.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(C){if(this._maxLength===C)return;const E=new Array(C);for(let x=0;x<Math.min(C,this.length);x++)E[x]=this._array[this._getCyclicIndex(x)];this._array=E,this._maxLength=C,this._startIndex=0}get length(){return this._length}set length(C){if(C>this._length)for(let E=this._length;E<C;E++)this._array[E]=void 0;this._length=C}get(C){return this._array[this._getCyclicIndex(C)]}set(C,E){this._array[this._getCyclicIndex(C)]=E}push(C){this._array[this._getCyclicIndex(this._length)]=C,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(C,E,...x){if(E){for(let b=C;b<this._length-E;b++)this._array[this._getCyclicIndex(b)]=this._array[this._getCyclicIndex(b+E)];this._length-=E,this.onDeleteEmitter.fire({index:C,amount:E})}for(let b=this._length-1;b>=C;b--)this._array[this._getCyclicIndex(b+x.length)]=this._array[this._getCyclicIndex(b)];for(let b=0;b<x.length;b++)this._array[this._getCyclicIndex(C+b)]=x[b];if(x.length&&this.onInsertEmitter.fire({index:C,amount:x.length}),this._length+x.length>this._maxLength){const b=this._length+x.length-this._maxLength;this._startIndex+=b,this._length=this._maxLength,this.onTrimEmitter.fire(b)}else this._length+=x.length}trimStart(C){C>this._length&&(C=this._length),this._startIndex+=C,this._length-=C,this.onTrimEmitter.fire(C)}shiftElements(C,E,x){if(!(E<=0)){if(C<0||C>=this._length)throw new Error("start argument out of range");if(C+x<0)throw new Error("Cannot shift elements in list beyond index 0");if(x>0){for(let S=E-1;S>=0;S--)this.set(C+S+x,this.get(C+S));const b=C+E+x-this._length;if(b>0)for(this._length+=b;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let b=0;b<E;b++)this.set(C+b+x,this.get(C+b))}}_getCyclicIndex(C){return(this._startIndex+C)%this._maxLength}}a.CircularList=u},1439:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function c(h,m=5){if(typeof h!="object")return h;const u=Array.isArray(h)?[]:{};for(const _ in h)u[_]=m<=1?h[_]:h[_]&&c(h[_],m-1);return u}},8055:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let c=0,h=0,m=0,u=0;var _,C,E,x,b;function S(y){const A=y.toString(16);return A.length<2?"0"+A:A}function g(y,A){return y<A?(A+.05)/(y+.05):(y+.05)/(A+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},(function(y){y.toCss=function(A,M,D,T){return T!==void 0?`#${S(A)}${S(M)}${S(D)}${S(T)}`:`#${S(A)}${S(M)}${S(D)}`},y.toRgba=function(A,M,D,T=255){return(A<<24|M<<16|D<<8|T)>>>0},y.toColor=function(A,M,D,T){return{css:y.toCss(A,M,D,T),rgba:y.toRgba(A,M,D,T)}}})(_||(a.channels=_={})),(function(y){function A(M,D){return u=Math.round(255*D),[c,h,m]=b.toChannels(M.rgba),{css:_.toCss(c,h,m,u),rgba:_.toRgba(c,h,m,u)}}y.blend=function(M,D){if(u=(255&D.rgba)/255,u===1)return{css:D.css,rgba:D.rgba};const T=D.rgba>>24&255,k=D.rgba>>16&255,R=D.rgba>>8&255,N=M.rgba>>24&255,I=M.rgba>>16&255,P=M.rgba>>8&255;return c=N+Math.round((T-N)*u),h=I+Math.round((k-I)*u),m=P+Math.round((R-P)*u),{css:_.toCss(c,h,m),rgba:_.toRgba(c,h,m)}},y.isOpaque=function(M){return(255&M.rgba)==255},y.ensureContrastRatio=function(M,D,T){const k=b.ensureContrastRatio(M.rgba,D.rgba,T);if(k)return _.toColor(k>>24&255,k>>16&255,k>>8&255)},y.opaque=function(M){const D=(255|M.rgba)>>>0;return[c,h,m]=b.toChannels(D),{css:_.toCss(c,h,m),rgba:D}},y.opacity=A,y.multiplyOpacity=function(M,D){return u=255&M.rgba,A(M,u*D/255)},y.toColorRGB=function(M){return[M.rgba>>24&255,M.rgba>>16&255,M.rgba>>8&255]}})(C||(a.color=C={})),(function(y){let A,M;try{const D=document.createElement("canvas");D.width=1,D.height=1;const T=D.getContext("2d",{willReadFrequently:!0});T&&(A=T,A.globalCompositeOperation="copy",M=A.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(D){if(D.match(/#[\da-f]{3,8}/i))switch(D.length){case 4:return c=parseInt(D.slice(1,2).repeat(2),16),h=parseInt(D.slice(2,3).repeat(2),16),m=parseInt(D.slice(3,4).repeat(2),16),_.toColor(c,h,m);case 5:return c=parseInt(D.slice(1,2).repeat(2),16),h=parseInt(D.slice(2,3).repeat(2),16),m=parseInt(D.slice(3,4).repeat(2),16),u=parseInt(D.slice(4,5).repeat(2),16),_.toColor(c,h,m,u);case 7:return{css:D,rgba:(parseInt(D.slice(1),16)<<8|255)>>>0};case 9:return{css:D,rgba:parseInt(D.slice(1),16)>>>0}}const T=D.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(T)return c=parseInt(T[1]),h=parseInt(T[2]),m=parseInt(T[3]),u=Math.round(255*(T[5]===void 0?1:parseFloat(T[5]))),_.toColor(c,h,m,u);if(!A||!M)throw new Error("css.toColor: Unsupported css format");if(A.fillStyle=M,A.fillStyle=D,typeof A.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(A.fillRect(0,0,1,1),[c,h,m,u]=A.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:_.toRgba(c,h,m,u),css:D}}})(E||(a.css=E={})),(function(y){function A(M,D,T){const k=M/255,R=D/255,N=T/255;return .2126*(k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4))+.7152*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))+.0722*(N<=.03928?N/12.92:Math.pow((N+.055)/1.055,2.4))}y.relativeLuminance=function(M){return A(M>>16&255,M>>8&255,255&M)},y.relativeLuminance2=A})(x||(a.rgb=x={})),(function(y){function A(D,T,k){const R=D>>24&255,N=D>>16&255,I=D>>8&255;let P=T>>24&255,F=T>>16&255,K=T>>8&255,W=g(x.relativeLuminance2(P,F,K),x.relativeLuminance2(R,N,I));for(;W<k&&(P>0||F>0||K>0);)P-=Math.max(0,Math.ceil(.1*P)),F-=Math.max(0,Math.ceil(.1*F)),K-=Math.max(0,Math.ceil(.1*K)),W=g(x.relativeLuminance2(P,F,K),x.relativeLuminance2(R,N,I));return(P<<24|F<<16|K<<8|255)>>>0}function M(D,T,k){const R=D>>24&255,N=D>>16&255,I=D>>8&255;let P=T>>24&255,F=T>>16&255,K=T>>8&255,W=g(x.relativeLuminance2(P,F,K),x.relativeLuminance2(R,N,I));for(;W<k&&(P<255||F<255||K<255);)P=Math.min(255,P+Math.ceil(.1*(255-P))),F=Math.min(255,F+Math.ceil(.1*(255-F))),K=Math.min(255,K+Math.ceil(.1*(255-K))),W=g(x.relativeLuminance2(P,F,K),x.relativeLuminance2(R,N,I));return(P<<24|F<<16|K<<8|255)>>>0}y.blend=function(D,T){if(u=(255&T)/255,u===1)return T;const k=T>>24&255,R=T>>16&255,N=T>>8&255,I=D>>24&255,P=D>>16&255,F=D>>8&255;return c=I+Math.round((k-I)*u),h=P+Math.round((R-P)*u),m=F+Math.round((N-F)*u),_.toRgba(c,h,m)},y.ensureContrastRatio=function(D,T,k){const R=x.relativeLuminance(D>>8),N=x.relativeLuminance(T>>8);if(g(R,N)<k){if(N<R){const F=A(D,T,k),K=g(R,x.relativeLuminance(F>>8));if(K<k){const W=M(D,T,k);return K>g(R,x.relativeLuminance(W>>8))?F:W}return F}const I=M(D,T,k),P=g(R,x.relativeLuminance(I>>8));if(P<k){const F=A(D,T,k);return P>g(R,x.relativeLuminance(F>>8))?I:F}return I}},y.reduceLuminance=A,y.increaseLuminance=M,y.toChannels=function(D){return[D>>24&255,D>>16&255,D>>8&255,255&D]}})(b||(a.rgba=b={})),a.toPaddedHex=S,a.contrastRatio=g},8969:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const h=c(844),m=c(2585),u=c(4348),_=c(7866),C=c(744),E=c(7302),x=c(6975),b=c(8460),S=c(1753),g=c(1480),y=c(7994),A=c(9282),M=c(5435),D=c(5981),T=c(2660);let k=!1;class R extends h.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new b.EventEmitter),this._onScroll.event((I=>{var P;(P=this._onScrollApi)==null||P.fire(I.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(I){for(const P in I)this.optionsService.options[P]=I[P]}constructor(I){super(),this._windowsWrappingHeuristics=this.register(new h.MutableDisposable),this._onBinary=this.register(new b.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new b.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new b.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new b.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new b.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new E.OptionsService(I)),this._instantiationService.setService(m.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(C.BufferService)),this._instantiationService.setService(m.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(_.LogService)),this._instantiationService.setService(m.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(x.CoreService)),this._instantiationService.setService(m.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(S.CoreMouseService)),this._instantiationService.setService(m.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(g.UnicodeService)),this._instantiationService.setService(m.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(m.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(T.OscLinkService),this._instantiationService.setService(m.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new M.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,b.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,b.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,b.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,b.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((P=>{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((P=>{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 D.WriteBuffer(((P,F)=>this._inputHandler.parse(P,F)))),this.register((0,b.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,P){this._writeBuffer.write(I,P)}writeSync(I,P){this._logService.logLevel<=m.LogLevelEnum.WARN&&!k&&(this._logService.warn("writeSync is unreliable and will be removed soon."),k=!0),this._writeBuffer.writeSync(I,P)}input(I,P=!0){this.coreService.triggerDataEvent(I,P)}resize(I,P){isNaN(I)||isNaN(P)||(I=Math.max(I,C.MINIMUM_COLS),P=Math.max(P,C.MINIMUM_ROWS),this._bufferService.resize(I,P))}scroll(I,P=!1){this._bufferService.scroll(I,P)}scrollLines(I,P,F){this._bufferService.scrollLines(I,P,F)}scrollPages(I){this.scrollLines(I*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(I){const P=I-this._bufferService.buffer.ydisp;P!==0&&this.scrollLines(P)}registerEscHandler(I,P){return this._inputHandler.registerEscHandler(I,P)}registerDcsHandler(I,P){return this._inputHandler.registerDcsHandler(I,P)}registerCsiHandler(I,P){return this._inputHandler.registerCsiHandler(I,P)}registerOscHandler(I,P){return this._inputHandler.registerOscHandler(I,P)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const P=this.optionsService.rawOptions.windowsPty;P&&P.buildNumber!==void 0&&P.buildNumber!==void 0?I=P.backend==="conpty"&&P.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(I=!0),I?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const I=[];I.push(this.onLineFeed(A.updateWindowsModeWrappedState.bind(null,this._bufferService))),I.push(this.registerCsiHandler({final:"H"},(()=>((0,A.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,h.toDisposable)((()=>{for(const P of I)P.dispose()}))}}}a.CoreTerminal=R},8460:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let h=0;h<this._listeners.length;h++)if(this._listeners[h]===c)return void this._listeners.splice(h,1)}}})),this._event}fire(c,h){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,c,h)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(c,h){return c((m=>h.fire(m)))},a.runAndSubscribe=function(c,h){return h(void 0),c((m=>h(m)))}},5435:function(f,a,c){var h=this&&this.__decorate||function(J,H,B,z){var G,j=arguments.length,te=j<3?H:z===null?z=Object.getOwnPropertyDescriptor(H,B):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")te=Reflect.decorate(J,H,B,z);else for(var he=J.length-1;he>=0;he--)(G=J[he])&&(te=(j<3?G(te):j>3?G(H,B,te):G(H,B))||te);return j>3&&te&&Object.defineProperty(H,B,te),te},m=this&&this.__param||function(J,H){return function(B,z){H(B,z,J)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const u=c(2584),_=c(7116),C=c(2015),E=c(844),x=c(482),b=c(8437),S=c(8460),g=c(643),y=c(511),A=c(3734),M=c(2585),D=c(1480),T=c(6242),k=c(6351),R=c(5941),N={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function P(J,H){if(J>24)return H.setWinLines||!1;switch(J){case 1:return!!H.restoreWin;case 2:return!!H.minimizeWin;case 3:return!!H.setWinPosition;case 4:return!!H.setWinSizePixels;case 5:return!!H.raiseWin;case 6:return!!H.lowerWin;case 7:return!!H.refreshWin;case 8:return!!H.setWinSizeChars;case 9:return!!H.maximizeWin;case 10:return!!H.fullscreenWin;case 11:return!!H.getWinState;case 13:return!!H.getWinPosition;case 14:return!!H.getWinSizePixels;case 15:return!!H.getScreenSizePixels;case 16:return!!H.getCellSizePixels;case 18:return!!H.getWinSizeChars;case 19:return!!H.getScreenSizeChars;case 20:return!!H.getIconTitle;case 21:return!!H.getWinTitle;case 22:return!!H.pushTitle;case 23:return!!H.popTitle;case 24:return!!H.setWinLines}return!1}var F;(function(J){J[J.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",J[J.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(F||(a.WindowsOptionsReportType=F={}));let K=0;class W extends E.Disposable{getAttrData(){return this._curAttrData}constructor(H,B,z,G,j,te,he,me,Y=new C.EscapeSequenceParser){super(),this._bufferService=H,this._charsetService=B,this._coreService=z,this._logService=G,this._optionsService=j,this._oscLinkService=te,this._coreMouseService=he,this._unicodeService=me,this._parser=Y,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new x.StringToUtf32,this._utf8Decoder=new x.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new S.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new S.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new S.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new S.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new S.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new S.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new S.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new S.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new S.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new S.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new S.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new S.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new S.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new V(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((q=>this._activeBuffer=q.activeBuffer))),this._parser.setCsiHandlerFallback(((q,oe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(q),params:oe.toArray()})})),this._parser.setEscHandlerFallback((q=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(q)})})),this._parser.setExecuteHandlerFallback((q=>{this._logService.debug("Unknown EXECUTE code: ",{code:q})})),this._parser.setOscHandlerFallback(((q,oe,Z)=>{this._logService.debug("Unknown OSC code: ",{identifier:q,action:oe,data:Z})})),this._parser.setDcsHandlerFallback(((q,oe,Z)=>{oe==="HOOK"&&(Z=Z.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(q),action:oe,payload:Z})})),this._parser.setPrintHandler(((q,oe,Z)=>this.print(q,oe,Z))),this._parser.registerCsiHandler({final:"@"},(q=>this.insertChars(q))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(q=>this.scrollLeft(q))),this._parser.registerCsiHandler({final:"A"},(q=>this.cursorUp(q))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(q=>this.scrollRight(q))),this._parser.registerCsiHandler({final:"B"},(q=>this.cursorDown(q))),this._parser.registerCsiHandler({final:"C"},(q=>this.cursorForward(q))),this._parser.registerCsiHandler({final:"D"},(q=>this.cursorBackward(q))),this._parser.registerCsiHandler({final:"E"},(q=>this.cursorNextLine(q))),this._parser.registerCsiHandler({final:"F"},(q=>this.cursorPrecedingLine(q))),this._parser.registerCsiHandler({final:"G"},(q=>this.cursorCharAbsolute(q))),this._parser.registerCsiHandler({final:"H"},(q=>this.cursorPosition(q))),this._parser.registerCsiHandler({final:"I"},(q=>this.cursorForwardTab(q))),this._parser.registerCsiHandler({final:"J"},(q=>this.eraseInDisplay(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(q=>this.eraseInDisplay(q,!0))),this._parser.registerCsiHandler({final:"K"},(q=>this.eraseInLine(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(q=>this.eraseInLine(q,!0))),this._parser.registerCsiHandler({final:"L"},(q=>this.insertLines(q))),this._parser.registerCsiHandler({final:"M"},(q=>this.deleteLines(q))),this._parser.registerCsiHandler({final:"P"},(q=>this.deleteChars(q))),this._parser.registerCsiHandler({final:"S"},(q=>this.scrollUp(q))),this._parser.registerCsiHandler({final:"T"},(q=>this.scrollDown(q))),this._parser.registerCsiHandler({final:"X"},(q=>this.eraseChars(q))),this._parser.registerCsiHandler({final:"Z"},(q=>this.cursorBackwardTab(q))),this._parser.registerCsiHandler({final:"`"},(q=>this.charPosAbsolute(q))),this._parser.registerCsiHandler({final:"a"},(q=>this.hPositionRelative(q))),this._parser.registerCsiHandler({final:"b"},(q=>this.repeatPrecedingCharacter(q))),this._parser.registerCsiHandler({final:"c"},(q=>this.sendDeviceAttributesPrimary(q))),this._parser.registerCsiHandler({prefix:">",final:"c"},(q=>this.sendDeviceAttributesSecondary(q))),this._parser.registerCsiHandler({final:"d"},(q=>this.linePosAbsolute(q))),this._parser.registerCsiHandler({final:"e"},(q=>this.vPositionRelative(q))),this._parser.registerCsiHandler({final:"f"},(q=>this.hVPosition(q))),this._parser.registerCsiHandler({final:"g"},(q=>this.tabClear(q))),this._parser.registerCsiHandler({final:"h"},(q=>this.setMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(q=>this.setModePrivate(q))),this._parser.registerCsiHandler({final:"l"},(q=>this.resetMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(q=>this.resetModePrivate(q))),this._parser.registerCsiHandler({final:"m"},(q=>this.charAttributes(q))),this._parser.registerCsiHandler({final:"n"},(q=>this.deviceStatus(q))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(q=>this.deviceStatusPrivate(q))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(q=>this.softReset(q))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(q=>this.setCursorStyle(q))),this._parser.registerCsiHandler({final:"r"},(q=>this.setScrollRegion(q))),this._parser.registerCsiHandler({final:"s"},(q=>this.saveCursor(q))),this._parser.registerCsiHandler({final:"t"},(q=>this.windowOptions(q))),this._parser.registerCsiHandler({final:"u"},(q=>this.restoreCursor(q))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(q=>this.insertColumns(q))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(q=>this.deleteColumns(q))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(q=>this.selectProtected(q))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(q=>this.requestMode(q,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(q=>this.requestMode(q,!1))),this._parser.setExecuteHandler(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 T.OscHandler((q=>(this.setTitle(q),this.setIconName(q),!0)))),this._parser.registerOscHandler(1,new T.OscHandler((q=>this.setIconName(q)))),this._parser.registerOscHandler(2,new T.OscHandler((q=>this.setTitle(q)))),this._parser.registerOscHandler(4,new T.OscHandler((q=>this.setOrReportIndexedColor(q)))),this._parser.registerOscHandler(8,new T.OscHandler((q=>this.setHyperlink(q)))),this._parser.registerOscHandler(10,new T.OscHandler((q=>this.setOrReportFgColor(q)))),this._parser.registerOscHandler(11,new T.OscHandler((q=>this.setOrReportBgColor(q)))),this._parser.registerOscHandler(12,new T.OscHandler((q=>this.setOrReportCursorColor(q)))),this._parser.registerOscHandler(104,new T.OscHandler((q=>this.restoreIndexedColor(q)))),this._parser.registerOscHandler(110,new T.OscHandler((q=>this.restoreFgColor(q)))),this._parser.registerOscHandler(111,new T.OscHandler((q=>this.restoreBgColor(q)))),this._parser.registerOscHandler(112,new T.OscHandler((q=>this.restoreCursorColor(q)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const q in _.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:q},(()=>this.selectCharset("("+q))),this._parser.registerEscHandler({intermediates:")",final:q},(()=>this.selectCharset(")"+q))),this._parser.registerEscHandler({intermediates:"*",final:q},(()=>this.selectCharset("*"+q))),this._parser.registerEscHandler({intermediates:"+",final:q},(()=>this.selectCharset("+"+q))),this._parser.registerEscHandler({intermediates:"-",final:q},(()=>this.selectCharset("-"+q))),this._parser.registerEscHandler({intermediates:".",final:q},(()=>this.selectCharset("."+q))),this._parser.registerEscHandler({intermediates:"/",final:q},(()=>this.selectCharset("/"+q)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((q=>(this._logService.error("Parsing error: ",q),q))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new k.DcsHandler(((q,oe)=>this.requestStatusString(q,oe))))}_preserveStack(H,B,z,G){this._parseStack.paused=!0,this._parseStack.cursorStartX=H,this._parseStack.cursorStartY=B,this._parseStack.decodedLength=z,this._parseStack.position=G}_logSlowResolvingAsync(H){this._logService.logLevel<=M.LogLevelEnum.WARN&&Promise.race([H,new Promise(((B,z)=>setTimeout((()=>z("#SLOW_TIMEOUT")),5e3)))]).catch((B=>{if(B!=="#SLOW_TIMEOUT")throw B;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(H,B){let z,G=this._activeBuffer.x,j=this._activeBuffer.y,te=0;const he=this._parseStack.paused;if(he){if(z=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,B))return this._logSlowResolvingAsync(z),z;G=this._parseStack.cursorStartX,j=this._parseStack.cursorStartY,this._parseStack.paused=!1,H.length>I&&(te=this._parseStack.position+I)}if(this._logService.logLevel<=M.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof H=="string"?` "${H}"`:` "${Array.prototype.map.call(H,(q=>String.fromCharCode(q))).join("")}"`),typeof H=="string"?H.split("").map((q=>q.charCodeAt(0))):H),this._parseBuffer.length<H.length&&this._parseBuffer.length<I&&(this._parseBuffer=new Uint32Array(Math.min(H.length,I))),he||this._dirtyRowTracker.clearRange(),H.length>I)for(let q=te;q<H.length;q+=I){const oe=q+I<H.length?q+I:H.length,Z=typeof H=="string"?this._stringDecoder.decode(H.substring(q,oe),this._parseBuffer):this._utf8Decoder.decode(H.subarray(q,oe),this._parseBuffer);if(z=this._parser.parse(this._parseBuffer,Z))return this._preserveStack(G,j,Z,q),this._logSlowResolvingAsync(z),z}else if(!he){const q=typeof H=="string"?this._stringDecoder.decode(H,this._parseBuffer):this._utf8Decoder.decode(H,this._parseBuffer);if(z=this._parser.parse(this._parseBuffer,q))return this._preserveStack(G,j,q,0),this._logSlowResolvingAsync(z),z}this._activeBuffer.x===G&&this._activeBuffer.y===j||this._onCursorMove.fire();const me=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),Y=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);Y<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(Y,this._bufferService.rows-1),Math.min(me,this._bufferService.rows-1))}print(H,B,z){let G,j;const te=this._charsetService.charset,he=this._optionsService.rawOptions.screenReaderMode,me=this._bufferService.cols,Y=this._coreService.decPrivateModes.wraparound,q=this._coreService.modes.insertMode,oe=this._curAttrData;let Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&z-B>0&&Z.getWidth(this._activeBuffer.x-1)===2&&Z.setCellFromCodepoint(this._activeBuffer.x-1,0,1,oe);let ie=this._parser.precedingJoinState;for(let de=B;de<z;++de){if(G=H[de],G<127&&te){const at=te[String.fromCharCode(G)];at&&(G=at.charCodeAt(0))}const Ce=this._unicodeService.charProperties(G,ie);j=D.UnicodeService.extractWidth(Ce);const we=D.UnicodeService.extractShouldJoin(Ce),$e=we?D.UnicodeService.extractWidth(ie):0;if(ie=Ce,he&&this._onA11yChar.fire((0,x.stringFromCodePoint)(G)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+j-$e>me){if(Y){const at=Z;let Re=this._activeBuffer.x-$e;for(this._activeBuffer.x=$e,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),Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),$e>0&&Z instanceof b.BufferLine&&Z.copyCellsFrom(at,Re,0,$e,!1);Re<me;)at.setCellFromCodepoint(Re++,0,1,oe)}else if(this._activeBuffer.x=me-1,j===2)continue}if(we&&this._activeBuffer.x){const at=Z.getWidth(this._activeBuffer.x-1)?1:2;Z.addCodepointToCell(this._activeBuffer.x-at,G,j);for(let Re=j-$e;--Re>=0;)Z.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}else if(q&&(Z.insertCells(this._activeBuffer.x,j-$e,this._activeBuffer.getNullCell(oe)),Z.getWidth(me-1)===2&&Z.setCellFromCodepoint(me-1,g.NULL_CELL_CODE,g.NULL_CELL_WIDTH,oe)),Z.setCellFromCodepoint(this._activeBuffer.x++,G,j,oe),j>0)for(;--j;)Z.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}this._parser.precedingJoinState=ie,this._activeBuffer.x<me&&z-B>0&&Z.getWidth(this._activeBuffer.x)===0&&!Z.hasContent(this._activeBuffer.x)&&Z.setCellFromCodepoint(this._activeBuffer.x,0,1,oe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(H,B){return H.final!=="t"||H.prefix||H.intermediates?this._parser.registerCsiHandler(H,B):this._parser.registerCsiHandler(H,(z=>!P(z.params[0],this._optionsService.rawOptions.windowOptions)||B(z)))}registerDcsHandler(H,B){return this._parser.registerDcsHandler(H,new k.DcsHandler(B))}registerEscHandler(H,B){return this._parser.registerEscHandler(H,B)}registerOscHandler(H,B){return this._parser.registerOscHandler(H,new T.OscHandler(B))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var H;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&&((H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&H.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);B.hasWidth(this._activeBuffer.x)&&!B.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const H=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-H),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(H=this._bufferService.cols-1){this._activeBuffer.x=Math.min(H,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(H,B){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=H,this._activeBuffer.y=this._activeBuffer.scrollTop+B):(this._activeBuffer.x=H,this._activeBuffer.y=B),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(H,B){this._restrictCursor(),this._setCursor(this._activeBuffer.x+H,this._activeBuffer.y+B)}cursorUp(H){const B=this._activeBuffer.y-this._activeBuffer.scrollTop;return B>=0?this._moveCursor(0,-Math.min(B,H.params[0]||1)):this._moveCursor(0,-(H.params[0]||1)),!0}cursorDown(H){const B=this._activeBuffer.scrollBottom-this._activeBuffer.y;return B>=0?this._moveCursor(0,Math.min(B,H.params[0]||1)):this._moveCursor(0,H.params[0]||1),!0}cursorForward(H){return this._moveCursor(H.params[0]||1,0),!0}cursorBackward(H){return this._moveCursor(-(H.params[0]||1),0),!0}cursorNextLine(H){return this.cursorDown(H),this._activeBuffer.x=0,!0}cursorPrecedingLine(H){return this.cursorUp(H),this._activeBuffer.x=0,!0}cursorCharAbsolute(H){return this._setCursor((H.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(H){return this._setCursor(H.length>=2?(H.params[1]||1)-1:0,(H.params[0]||1)-1),!0}charPosAbsolute(H){return this._setCursor((H.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(H){return this._moveCursor(H.params[0]||1,0),!0}linePosAbsolute(H){return this._setCursor(this._activeBuffer.x,(H.params[0]||1)-1),!0}vPositionRelative(H){return this._moveCursor(0,H.params[0]||1),!0}hVPosition(H){return this.cursorPosition(H),!0}tabClear(H){const B=H.params[0];return B===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:B===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(H){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=H.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(H){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let B=H.params[0]||1;for(;B--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(H){const B=H.params[0];return B===1&&(this._curAttrData.bg|=536870912),B!==2&&B!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(H,B,z,G=!1,j=!1){const te=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);te.replaceCells(B,z,this._activeBuffer.getNullCell(this._eraseAttrData()),j),G&&(te.isWrapped=!1)}_resetBufferLine(H,B=!1){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);z&&(z.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),B),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+H),z.isWrapped=!1)}eraseInDisplay(H,B=!1){let z;switch(this._restrictCursor(this._bufferService.cols),H.params[0]){case 0:for(z=this._activeBuffer.y,this._dirtyRowTracker.markDirty(z),this._eraseInBufferLine(z++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,B);z<this._bufferService.rows;z++)this._resetBufferLine(z,B);this._dirtyRowTracker.markDirty(z);break;case 1:for(z=this._activeBuffer.y,this._dirtyRowTracker.markDirty(z),this._eraseInBufferLine(z,0,this._activeBuffer.x+1,!0,B),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(z+1).isWrapped=!1);z--;)this._resetBufferLine(z,B);this._dirtyRowTracker.markDirty(0);break;case 2:for(z=this._bufferService.rows,this._dirtyRowTracker.markDirty(z-1);z--;)this._resetBufferLine(z,B);this._dirtyRowTracker.markDirty(0);break;case 3:const G=this._activeBuffer.lines.length-this._bufferService.rows;G>0&&(this._activeBuffer.lines.trimStart(G),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-G,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-G,0),this._onScroll.fire(0))}return!0}eraseInLine(H,B=!1){switch(this._restrictCursor(this._bufferService.cols),H.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,B);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,B);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,B)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(H){this._restrictCursor();let B=H.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=this._activeBuffer.ybase+this._activeBuffer.y,G=this._bufferService.rows-1-this._activeBuffer.scrollBottom,j=this._bufferService.rows-1+this._activeBuffer.ybase-G+1;for(;B--;)this._activeBuffer.lines.splice(j-1,1),this._activeBuffer.lines.splice(z,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(H){this._restrictCursor();let B=H.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const z=this._activeBuffer.ybase+this._activeBuffer.y;let G;for(G=this._bufferService.rows-1-this._activeBuffer.scrollBottom,G=this._bufferService.rows-1+this._activeBuffer.ybase-G;B--;)this._activeBuffer.lines.splice(z,1),this._activeBuffer.lines.splice(G,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(H){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.insertCells(this._activeBuffer.x,H.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(H){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.deleteCells(this._activeBuffer.x,H.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(H){let B=H.params[0]||1;for(;B--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(H){let B=H.params[0]||1;for(;B--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(b.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=H.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);G.deleteCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData())),G.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=H.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);G.insertCells(0,B,this._activeBuffer.getNullCell(this._eraseAttrData())),G.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=H.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);G.insertCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData())),G.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(H){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const B=H.params[0]||1;for(let z=this._activeBuffer.scrollTop;z<=this._activeBuffer.scrollBottom;++z){const G=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);G.deleteCells(this._activeBuffer.x,B,this._activeBuffer.getNullCell(this._eraseAttrData())),G.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(H){this._restrictCursor();const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return B&&(B.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(H.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(H){const B=this._parser.precedingJoinState;if(!B)return!0;const z=H.params[0]||1,G=D.UnicodeService.extractWidth(B),j=this._activeBuffer.x-G,te=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(j),he=new Uint32Array(te.length*z);let me=0;for(let q=0;q<te.length;){const oe=te.codePointAt(q)||0;he[me++]=oe,q+=oe>65535?2:1}let Y=me;for(let q=1;q<z;++q)he.copyWithin(Y,0,me),Y+=me;return this.print(he,0,Y),!0}sendDeviceAttributesPrimary(H){return H.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(H){return H.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(H.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(H){return(this._optionsService.rawOptions.termName+"").indexOf(H)===0}setMode(H){for(let B=0;B<H.length;B++)switch(H.params[B]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(H){for(let B=0;B<H.length;B++)switch(H.params[B]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,_.DEFAULT_CHARSET),this._charsetService.setgCharset(1,_.DEFAULT_CHARSET),this._charsetService.setgCharset(2,_.DEFAULT_CHARSET),this._charsetService.setgCharset(3,_.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(H){for(let B=0;B<H.length;B++)switch(H.params[B]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(H){for(let B=0;B<H.length;B++)switch(H.params[B]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),H.params[B]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(H,B){const z=this._coreService.decPrivateModes,{activeProtocol:G,activeEncoding:j}=this._coreMouseService,te=this._coreService,{buffers:he,cols:me}=this._bufferService,{active:Y,alt:q}=he,oe=this._optionsService.rawOptions,Z=we=>we?1:2,ie=H.params[0];return de=ie,Ce=B?ie===2?4:ie===4?Z(te.modes.insertMode):ie===12?3:ie===20?Z(oe.convertEol):0:ie===1?Z(z.applicationCursorKeys):ie===3?oe.windowOptions.setWinLines?me===80?2:me===132?1:0:0:ie===6?Z(z.origin):ie===7?Z(z.wraparound):ie===8?3:ie===9?Z(G==="X10"):ie===12?Z(oe.cursorBlink):ie===25?Z(!te.isCursorHidden):ie===45?Z(z.reverseWraparound):ie===66?Z(z.applicationKeypad):ie===67?4:ie===1e3?Z(G==="VT200"):ie===1002?Z(G==="DRAG"):ie===1003?Z(G==="ANY"):ie===1004?Z(z.sendFocus):ie===1005?4:ie===1006?Z(j==="SGR"):ie===1015?4:ie===1016?Z(j==="SGR_PIXELS"):ie===1048?1:ie===47||ie===1047||ie===1049?Z(Y===q):ie===2004?Z(z.bracketedPasteMode):0,te.triggerDataEvent(`${u.C0.ESC}[${B?"":"?"}${de};${Ce}$y`),!0;var de,Ce}_updateAttrColor(H,B,z,G,j){return B===2?(H|=50331648,H&=-16777216,H|=A.AttributeData.fromColorRGB([z,G,j])):B===5&&(H&=-50331904,H|=33554432|255&z),H}_extractColor(H,B,z){const G=[0,0,-1,0,0,0];let j=0,te=0;do{if(G[te+j]=H.params[B+te],H.hasSubParams(B+te)){const he=H.getSubParams(B+te);let me=0;do G[1]===5&&(j=1),G[te+me+1+j]=he[me];while(++me<he.length&&me+te+1+j<G.length);break}if(G[1]===5&&te+j>=2||G[1]===2&&te+j>=5)break;G[1]&&(j=1)}while(++te+B<H.length&&te+j<G.length);for(let he=2;he<G.length;++he)G[he]===-1&&(G[he]=0);switch(G[0]){case 38:z.fg=this._updateAttrColor(z.fg,G[1],G[3],G[4],G[5]);break;case 48:z.bg=this._updateAttrColor(z.bg,G[1],G[3],G[4],G[5]);break;case 58:z.extended=z.extended.clone(),z.extended.underlineColor=this._updateAttrColor(z.extended.underlineColor,G[1],G[3],G[4],G[5])}return te}_processUnderline(H,B){B.extended=B.extended.clone(),(!~H||H>5)&&(H=1),B.extended.underlineStyle=H,B.fg|=268435456,H===0&&(B.fg&=-268435457),B.updateExtended()}_processSGR0(H){H.fg=b.DEFAULT_ATTR_DATA.fg,H.bg=b.DEFAULT_ATTR_DATA.bg,H.extended=H.extended.clone(),H.extended.underlineStyle=0,H.extended.underlineColor&=-67108864,H.updateExtended()}charAttributes(H){if(H.length===1&&H.params[0]===0)return this._processSGR0(this._curAttrData),!0;const B=H.length;let z;const G=this._curAttrData;for(let j=0;j<B;j++)z=H.params[j],z>=30&&z<=37?(G.fg&=-50331904,G.fg|=16777216|z-30):z>=40&&z<=47?(G.bg&=-50331904,G.bg|=16777216|z-40):z>=90&&z<=97?(G.fg&=-50331904,G.fg|=16777224|z-90):z>=100&&z<=107?(G.bg&=-50331904,G.bg|=16777224|z-100):z===0?this._processSGR0(G):z===1?G.fg|=134217728:z===3?G.bg|=67108864:z===4?(G.fg|=268435456,this._processUnderline(H.hasSubParams(j)?H.getSubParams(j)[0]:1,G)):z===5?G.fg|=536870912:z===7?G.fg|=67108864:z===8?G.fg|=1073741824:z===9?G.fg|=2147483648:z===2?G.bg|=134217728:z===21?this._processUnderline(2,G):z===22?(G.fg&=-134217729,G.bg&=-134217729):z===23?G.bg&=-67108865:z===24?(G.fg&=-268435457,this._processUnderline(0,G)):z===25?G.fg&=-536870913:z===27?G.fg&=-67108865:z===28?G.fg&=-1073741825:z===29?G.fg&=2147483647:z===39?(G.fg&=-67108864,G.fg|=16777215&b.DEFAULT_ATTR_DATA.fg):z===49?(G.bg&=-67108864,G.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):z===38||z===48||z===58?j+=this._extractColor(H,j,G):z===53?G.bg|=1073741824:z===55?G.bg&=-1073741825:z===59?(G.extended=G.extended.clone(),G.extended.underlineColor=-1,G.updateExtended()):z===100?(G.fg&=-67108864,G.fg|=16777215&b.DEFAULT_ATTR_DATA.fg,G.bg&=-67108864,G.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",z);return!0}deviceStatus(H){switch(H.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:const B=this._activeBuffer.y+1,z=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${B};${z}R`)}return!0}deviceStatusPrivate(H){if(H.params[0]===6){const B=this._activeBuffer.y+1,z=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${B};${z}R`)}return!0}softReset(H){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=b.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(H){const B=H.params[0]||1;switch(B){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const z=B%2==1;return this._optionsService.options.cursorBlink=z,!0}setScrollRegion(H){const B=H.params[0]||1;let z;return(H.length<2||(z=H.params[1])>this._bufferService.rows||z===0)&&(z=this._bufferService.rows),z>B&&(this._activeBuffer.scrollTop=B-1,this._activeBuffer.scrollBottom=z-1,this._setCursor(0,0)),!0}windowOptions(H){if(!P(H.params[0],this._optionsService.rawOptions.windowOptions))return!0;const B=H.length>1?H.params[1]:0;switch(H.params[0]){case 14:B!==2&&this._onRequestWindowsOptionsReport.fire(F.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(F.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:B!==0&&B!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),B!==0&&B!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:B!==0&&B!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),B!==0&&B!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(H){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(H){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(H){return this._windowTitle=H,this._onTitleChange.fire(H),!0}setIconName(H){return this._iconName=H,!0}setOrReportIndexedColor(H){const B=[],z=H.split(";");for(;z.length>1;){const G=z.shift(),j=z.shift();if(/^\d+$/.exec(G)){const te=parseInt(G);if($(te))if(j==="?")B.push({type:0,index:te});else{const he=(0,R.parseColor)(j);he&&B.push({type:1,index:te,color:he})}}}return B.length&&this._onColor.fire(B),!0}setHyperlink(H){const B=H.split(";");return!(B.length<2)&&(B[1]?this._createHyperlink(B[0],B[1]):!B[0]&&this._finishHyperlink())}_createHyperlink(H,B){this._getCurrentLinkId()&&this._finishHyperlink();const z=H.split(":");let G;const j=z.findIndex((te=>te.startsWith("id=")));return j!==-1&&(G=z[j].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:G,uri:B}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(H,B){const z=H.split(";");for(let G=0;G<z.length&&!(B>=this._specialColors.length);++G,++B)if(z[G]==="?")this._onColor.fire([{type:0,index:this._specialColors[B]}]);else{const j=(0,R.parseColor)(z[G]);j&&this._onColor.fire([{type:1,index:this._specialColors[B],color:j}])}return!0}setOrReportFgColor(H){return this._setOrReportSpecialColor(H,0)}setOrReportBgColor(H){return this._setOrReportSpecialColor(H,1)}setOrReportCursorColor(H){return this._setOrReportSpecialColor(H,2)}restoreIndexedColor(H){if(!H)return this._onColor.fire([{type:2}]),!0;const B=[],z=H.split(";");for(let G=0;G<z.length;++G)if(/^\d+$/.exec(z[G])){const j=parseInt(z[G]);$(j)&&B.push({type:2,index:j})}return B.length&&this._onColor.fire(B),!0}restoreFgColor(H){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(H){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(H){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,_.DEFAULT_CHARSET),!0}selectCharset(H){return H.length!==2?(this.selectDefaultCharset(),!0):(H[0]==="/"||this._charsetService.setgCharset(N[H[0]],_.CHARSETS[H[1]]||_.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 H=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,H,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=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(H){return this._charsetService.setgLevel(H),!0}screenAlignmentPattern(){const H=new y.CellData;H.content=4194373,H.fg=this._curAttrData.fg,H.bg=this._curAttrData.bg,this._setCursor(0,0);for(let B=0;B<this._bufferService.rows;++B){const z=this._activeBuffer.ybase+this._activeBuffer.y+B,G=this._activeBuffer.lines.get(z);G&&(G.fill(H),G.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(H,B){const z=this._bufferService.buffer,G=this._optionsService.rawOptions;return(j=>(this._coreService.triggerDataEvent(`${u.C0.ESC}${j}${u.C0.ESC}\\`),!0))(H==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:H==='"p'?'P1$r61;1"p':H==="r"?`P1$r${z.scrollTop+1};${z.scrollBottom+1}r`:H==="m"?"P1$r0m":H===" q"?`P1$r${{block:2,underline:4,bar:6}[G.cursorStyle]-(G.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(H,B){this._dirtyRowTracker.markRangeDirty(H,B)}}a.InputHandler=W;let V=class{constructor(J){this._bufferService=J,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(J){J<this.start?this.start=J:J>this.end&&(this.end=J)}markRangeDirty(J,H){J>H&&(K=J,J=H,H=K),J<this.start&&(this.start=J),H>this.end&&(this.end=H)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function $(J){return 0<=J&&J<256}V=h([m(0,M.IBufferService)],V)},844:(f,a)=>{function c(h){for(const m of h)m.dispose();h.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const h of this._disposables)h.dispose();this._disposables.length=0}register(h){return this._disposables.push(h),h}unregister(h){const m=this._disposables.indexOf(h);m!==-1&&this._disposables.splice(m,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(h){var m;this._isDisposed||h===this._value||((m=this._value)==null||m.dispose(),this._value=h)}clear(){this.value=void 0}dispose(){var h;this._isDisposed=!0,(h=this._value)==null||h.dispose(),this._value=void 0}},a.toDisposable=function(h){return{dispose:h}},a.disposeArray=c,a.getDisposeArrayDisposable=function(h){return{dispose:()=>c(h)}}},1505:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(m,u,_){this._data[m]||(this._data[m]={}),this._data[m][u]=_}get(m,u){return this._data[m]?this._data[m][u]:void 0}clear(){this._data={}}}a.TwoKeyMap=c,a.FourKeyMap=class{constructor(){this._data=new c}set(h,m,u,_,C){this._data.get(h,m)||this._data.set(h,m,new c),this._data.get(h,m).set(u,_,C)}get(h,m,u,_){var C;return(C=this._data.get(h,m))==null?void 0:C.get(u,_)}clear(){this._data.clear()}}},6114:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const c=a.isNode?"node":navigator.userAgent,h=a.isNode?"node":navigator.platform;a.isFirefox=c.includes("Firefox"),a.isLegacyEdge=c.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(c),a.getSafariVersion=function(){if(!a.isSafari)return 0;const m=c.match(/Version\/(\d+)/);return m===null||m.length<2?0:parseInt(m[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(h),a.isIpad=h==="iPad",a.isIphone=h==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(h),a.isLinux=h.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(c)},6106:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let c=0;a.SortedList=class{constructor(h){this._getKey=h,this._array=[]}clear(){this._array.length=0}insert(h){this._array.length!==0?(c=this._search(this._getKey(h)),this._array.splice(c,0,h)):this._array.push(h)}delete(h){if(this._array.length===0)return!1;const m=this._getKey(h);if(m===void 0||(c=this._search(m),c===-1)||this._getKey(this._array[c])!==m)return!1;do if(this._array[c]===h)return this._array.splice(c,1),!0;while(++c<this._array.length&&this._getKey(this._array[c])===m);return!1}*getKeyIterator(h){if(this._array.length!==0&&(c=this._search(h),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===h))do yield this._array[c];while(++c<this._array.length&&this._getKey(this._array[c])===h)}forEachByKey(h,m){if(this._array.length!==0&&(c=this._search(h),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===h))do m(this._array[c]);while(++c<this._array.length&&this._getKey(this._array[c])===h)}values(){return[...this._array].values()}_search(h){let m=0,u=this._array.length-1;for(;u>=m;){let _=m+u>>1;const C=this._getKey(this._array[_]);if(C>h)u=_-1;else{if(!(C<h)){for(;_>0&&this._getKey(this._array[_-1])===h;)_--;return _}m=_+1}}return m}}},7226:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const h=c(6114);class m{constructor(){this._tasks=[],this._i=0}enqueue(C){this._tasks.push(C),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(C){this._idleCallback=void 0;let E=0,x=0,b=C.timeRemaining(),S=0;for(;this._i<this._tasks.length;){if(E=Date.now(),this._tasks[this._i]()||this._i++,E=Math.max(1,Date.now()-E),x=Math.max(E,x),S=C.timeRemaining(),1.5*x>S)return b-E<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(b-E))}ms`),void this._start();b=S}this.clear()}}class u extends m{_requestCallback(C){return setTimeout((()=>C(this._createDeadline(16))))}_cancelCallback(C){clearTimeout(C)}_createDeadline(C){const E=Date.now()+C;return{timeRemaining:()=>Math.max(0,E-Date.now())}}}a.PriorityTaskQueue=u,a.IdleTaskQueue=!h.isNode&&"requestIdleCallback"in window?class extends m{_requestCallback(_){return requestIdleCallback(_)}_cancelCallback(_){cancelIdleCallback(_)}}:u,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(_){this._queue.clear(),this._queue.enqueue(_)}flush(){this._queue.flush()}}},9282:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const h=c(643);a.updateWindowsModeWrappedState=function(m){const u=m.buffer.lines.get(m.buffer.ybase+m.buffer.y-1),_=u==null?void 0:u.get(m.cols-1),C=m.buffer.lines.get(m.buffer.ybase+m.buffer.y);C&&_&&(C.isWrapped=_[h.CHAR_DATA_CODE_INDEX]!==h.NULL_CELL_CODE&&_[h.CHAR_DATA_CODE_INDEX]!==h.WHITESPACE_CELL_CODE)}},3734:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new h}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 c;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}}a.AttributeData=c;class h{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,_=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=_}clone(){return new h(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=h},9092:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const h=c(6349),m=c(7226),u=c(3734),_=c(8437),C=c(4634),E=c(511),x=c(643),b=c(4863),S=c(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(g,y,A){this._hasScrollback=g,this._optionsService=y,this._bufferService=A,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=_.DEFAULT_ATTR_DATA.clone(),this.savedCharset=S.DEFAULT_CHARSET,this.markers=[],this._nullCell=E.CellData.fromCharData([0,x.NULL_CELL_CHAR,x.NULL_CELL_WIDTH,x.NULL_CELL_CODE]),this._whitespaceCell=E.CellData.fromCharData([0,x.WHITESPACE_CELL_CHAR,x.WHITESPACE_CELL_WIDTH,x.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 h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(g){return g?(this._nullCell.fg=g.fg,this._nullCell.bg=g.bg,this._nullCell.extended=g.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new u.ExtendedAttrs),this._nullCell}getWhitespaceCell(g){return g?(this._whitespaceCell.fg=g.fg,this._whitespaceCell.bg=g.bg,this._whitespaceCell.extended=g.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new u.ExtendedAttrs),this._whitespaceCell}getBlankLine(g,y){return new _.BufferLine(this._bufferService.cols,this.getNullCell(g),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const g=this.ybase+this.y-this.ydisp;return g>=0&&g<this._rows}_getCorrectBufferLength(g){if(!this._hasScrollback)return g;const y=g+this._optionsService.rawOptions.scrollback;return y>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:y}fillViewportRows(g){if(this.lines.length===0){g===void 0&&(g=_.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(g))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(g,y){const A=this.getNullCell(_.DEFAULT_ATTR_DATA);let M=0;const D=this._getCorrectBufferLength(y);if(D>this.lines.maxLength&&(this.lines.maxLength=D),this.lines.length>0){if(this._cols<g)for(let k=0;k<this.lines.length;k++)M+=+this.lines.get(k).resize(g,A);let T=0;if(this._rows<y)for(let k=this._rows;k<y;k++)this.lines.length<y+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new _.BufferLine(g,A)):this.ybase>0&&this.lines.length<=this.ybase+this.y+T+1?(this.ybase--,T++,this.ydisp>0&&this.ydisp--):this.lines.push(new _.BufferLine(g,A)));else for(let k=this._rows;k>y;k--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(D<this.lines.maxLength){const k=this.lines.length-D;k>0&&(this.lines.trimStart(k),this.ybase=Math.max(this.ybase-k,0),this.ydisp=Math.max(this.ydisp-k,0),this.savedY=Math.max(this.savedY-k,0)),this.lines.maxLength=D}this.x=Math.min(this.x,g-1),this.y=Math.min(this.y,y-1),T&&(this.y+=T),this.savedX=Math.min(this.savedX,g-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(g,y),this._cols>g))for(let T=0;T<this.lines.length;T++)M+=+this.lines.get(T).resize(g,A);this._cols=g,this._rows=y,this._memoryCleanupQueue.clear(),M>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let g=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,g=!1);let y=0;for(;this._memoryCleanupPosition<this.lines.length;)if(y+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),y>100)return!0;return g}get _isReflowEnabled(){const g=this._optionsService.rawOptions.windowsPty;return g&&g.buildNumber?this._hasScrollback&&g.backend==="conpty"&&g.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(g,y){this._cols!==g&&(g>this._cols?this._reflowLarger(g,y):this._reflowSmaller(g,y))}_reflowLarger(g,y){const A=(0,C.reflowLargerGetLinesToRemove)(this.lines,this._cols,g,this.ybase+this.y,this.getNullCell(_.DEFAULT_ATTR_DATA));if(A.length>0){const M=(0,C.reflowLargerCreateNewLayout)(this.lines,A);(0,C.reflowLargerApplyNewLayout)(this.lines,M.layout),this._reflowLargerAdjustViewport(g,y,M.countRemoved)}}_reflowLargerAdjustViewport(g,y,A){const M=this.getNullCell(_.DEFAULT_ATTR_DATA);let D=A;for(;D-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<y&&this.lines.push(new _.BufferLine(g,M))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-A,0)}_reflowSmaller(g,y){const A=this.getNullCell(_.DEFAULT_ATTR_DATA),M=[];let D=0;for(let T=this.lines.length-1;T>=0;T--){let k=this.lines.get(T);if(!k||!k.isWrapped&&k.getTrimmedLength()<=g)continue;const R=[k];for(;k.isWrapped&&T>0;)k=this.lines.get(--T),R.unshift(k);const N=this.ybase+this.y;if(N>=T&&N<T+R.length)continue;const I=R[R.length-1].getTrimmedLength(),P=(0,C.reflowSmallerGetNewLineLengths)(R,this._cols,g),F=P.length-R.length;let K;K=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+F):Math.max(0,this.lines.length-this.lines.maxLength+F);const W=[];for(let z=0;z<F;z++){const G=this.getBlankLine(_.DEFAULT_ATTR_DATA,!0);W.push(G)}W.length>0&&(M.push({start:T+R.length+D,newLines:W}),D+=W.length),R.push(...W);let V=P.length-1,$=P[V];$===0&&(V--,$=P[V]);let J=R.length-F-1,H=I;for(;J>=0;){const z=Math.min(H,$);if(R[V]===void 0)break;if(R[V].copyCellsFrom(R[J],H-z,$-z,z,!0),$-=z,$===0&&(V--,$=P[V]),H-=z,H===0){J--;const G=Math.max(J,0);H=(0,C.getWrappedLineTrimmedLength)(R,G,this._cols)}}for(let z=0;z<R.length;z++)P[z]<g&&R[z].setCell(P[z],A);let B=F-K;for(;B-- >0;)this.ybase===0?this.y<y-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+D)-y&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+F,this.ybase+y-1)}if(M.length>0){const T=[],k=[];for(let V=0;V<this.lines.length;V++)k.push(this.lines.get(V));const R=this.lines.length;let N=R-1,I=0,P=M[I];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+D);let F=0;for(let V=Math.min(this.lines.maxLength-1,R+D-1);V>=0;V--)if(P&&P.start>N+F){for(let $=P.newLines.length-1;$>=0;$--)this.lines.set(V--,P.newLines[$]);V++,T.push({index:N+1,amount:P.newLines.length}),F+=P.newLines.length,P=M[++I]}else this.lines.set(V,k[N--]);let K=0;for(let V=T.length-1;V>=0;V--)T[V].index+=K,this.lines.onInsertEmitter.fire(T[V]),K+=T[V].amount;const W=Math.max(0,R+D-this.lines.maxLength);W>0&&this.lines.onTrimEmitter.fire(W)}}translateBufferLineToString(g,y,A=0,M){const D=this.lines.get(g);return D?D.translateToString(y,A,M):""}getWrappedRangeForLine(g){let y=g,A=g;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;A+1<this.lines.length&&this.lines.get(A+1).isWrapped;)A++;return{first:y,last:A}}setupTabStops(g){for(g!=null?this.tabs[g]||(g=this.prevStop(g)):(this.tabs={},g=0);g<this._cols;g+=this._optionsService.rawOptions.tabStopWidth)this.tabs[g]=!0}prevStop(g){for(g==null&&(g=this.x);!this.tabs[--g]&&g>0;);return g>=this._cols?this._cols-1:g<0?0:g}nextStop(g){for(g==null&&(g=this.x);!this.tabs[++g]&&g<this._cols;);return g>=this._cols?this._cols-1:g<0?0:g}clearMarkers(g){this._isClearing=!0;for(let y=0;y<this.markers.length;y++)this.markers[y].line===g&&(this.markers[y].dispose(),this.markers.splice(y--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let g=0;g<this.markers.length;g++)this.markers[g].dispose(),this.markers.splice(g--,1);this._isClearing=!1}addMarker(g){const y=new b.Marker(g);return this.markers.push(y),y.register(this.lines.onTrim((A=>{y.line-=A,y.line<0&&y.dispose()}))),y.register(this.lines.onInsert((A=>{y.line>=A.index&&(y.line+=A.amount)}))),y.register(this.lines.onDelete((A=>{y.line>=A.index&&y.line<A.index+A.amount&&y.dispose(),y.line>A.index&&(y.line-=A.amount)}))),y.register(y.onDispose((()=>this._removeMarker(y)))),y}_removeMarker(g){this._isClearing||this.markers.splice(this.markers.indexOf(g),1)}}},8437:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const h=c(3734),m=c(511),u=c(643),_=c(482);a.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);let C=0;class E{constructor(b,S,g=!1){this.isWrapped=g,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*b);const y=S||m.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let A=0;A<b;++A)this.setCell(A,y);this.length=b}get(b){const S=this._data[3*b+0],g=2097151&S;return[this._data[3*b+1],2097152&S?this._combined[b]:g?(0,_.stringFromCodePoint)(g):"",S>>22,2097152&S?this._combined[b].charCodeAt(this._combined[b].length-1):g]}set(b,S){this._data[3*b+1]=S[u.CHAR_DATA_ATTR_INDEX],S[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[b]=S[1],this._data[3*b+0]=2097152|b|S[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*b+0]=S[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(b){return this._data[3*b+0]>>22}hasWidth(b){return 12582912&this._data[3*b+0]}getFg(b){return this._data[3*b+1]}getBg(b){return this._data[3*b+2]}hasContent(b){return 4194303&this._data[3*b+0]}getCodePoint(b){const S=this._data[3*b+0];return 2097152&S?this._combined[b].charCodeAt(this._combined[b].length-1):2097151&S}isCombined(b){return 2097152&this._data[3*b+0]}getString(b){const S=this._data[3*b+0];return 2097152&S?this._combined[b]:2097151&S?(0,_.stringFromCodePoint)(2097151&S):""}isProtected(b){return 536870912&this._data[3*b+2]}loadCell(b,S){return C=3*b,S.content=this._data[C+0],S.fg=this._data[C+1],S.bg=this._data[C+2],2097152&S.content&&(S.combinedData=this._combined[b]),268435456&S.bg&&(S.extended=this._extendedAttrs[b]),S}setCell(b,S){2097152&S.content&&(this._combined[b]=S.combinedData),268435456&S.bg&&(this._extendedAttrs[b]=S.extended),this._data[3*b+0]=S.content,this._data[3*b+1]=S.fg,this._data[3*b+2]=S.bg}setCellFromCodepoint(b,S,g,y){268435456&y.bg&&(this._extendedAttrs[b]=y.extended),this._data[3*b+0]=S|g<<22,this._data[3*b+1]=y.fg,this._data[3*b+2]=y.bg}addCodepointToCell(b,S,g){let y=this._data[3*b+0];2097152&y?this._combined[b]+=(0,_.stringFromCodePoint)(S):2097151&y?(this._combined[b]=(0,_.stringFromCodePoint)(2097151&y)+(0,_.stringFromCodePoint)(S),y&=-2097152,y|=2097152):y=S|4194304,g&&(y&=-12582913,y|=g<<22),this._data[3*b+0]=y}insertCells(b,S,g){if((b%=this.length)&&this.getWidth(b-1)===2&&this.setCellFromCodepoint(b-1,0,1,g),S<this.length-b){const y=new m.CellData;for(let A=this.length-b-S-1;A>=0;--A)this.setCell(b+S+A,this.loadCell(b+A,y));for(let A=0;A<S;++A)this.setCell(b+A,g)}else for(let y=b;y<this.length;++y)this.setCell(y,g);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,g)}deleteCells(b,S,g){if(b%=this.length,S<this.length-b){const y=new m.CellData;for(let A=0;A<this.length-b-S;++A)this.setCell(b+A,this.loadCell(b+S+A,y));for(let A=this.length-S;A<this.length;++A)this.setCell(A,g)}else for(let y=b;y<this.length;++y)this.setCell(y,g);b&&this.getWidth(b-1)===2&&this.setCellFromCodepoint(b-1,0,1,g),this.getWidth(b)!==0||this.hasContent(b)||this.setCellFromCodepoint(b,0,1,g)}replaceCells(b,S,g,y=!1){if(y)for(b&&this.getWidth(b-1)===2&&!this.isProtected(b-1)&&this.setCellFromCodepoint(b-1,0,1,g),S<this.length&&this.getWidth(S-1)===2&&!this.isProtected(S)&&this.setCellFromCodepoint(S,0,1,g);b<S&&b<this.length;)this.isProtected(b)||this.setCell(b,g),b++;else for(b&&this.getWidth(b-1)===2&&this.setCellFromCodepoint(b-1,0,1,g),S<this.length&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S,0,1,g);b<S&&b<this.length;)this.setCell(b++,g)}resize(b,S){if(b===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const g=3*b;if(b>this.length){if(this._data.buffer.byteLength>=4*g)this._data=new Uint32Array(this._data.buffer,0,g);else{const y=new Uint32Array(g);y.set(this._data),this._data=y}for(let y=this.length;y<b;++y)this.setCell(y,S)}else{this._data=this._data.subarray(0,g);const y=Object.keys(this._combined);for(let M=0;M<y.length;M++){const D=parseInt(y[M],10);D>=b&&delete this._combined[D]}const A=Object.keys(this._extendedAttrs);for(let M=0;M<A.length;M++){const D=parseInt(A[M],10);D>=b&&delete this._extendedAttrs[D]}}return this.length=b,4*g*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const b=new Uint32Array(this._data.length);return b.set(this._data),this._data=b,1}return 0}fill(b,S=!1){if(S)for(let g=0;g<this.length;++g)this.isProtected(g)||this.setCell(g,b);else{this._combined={},this._extendedAttrs={};for(let g=0;g<this.length;++g)this.setCell(g,b)}}copyFrom(b){this.length!==b.length?this._data=new Uint32Array(b._data):this._data.set(b._data),this.length=b.length,this._combined={};for(const S in b._combined)this._combined[S]=b._combined[S];this._extendedAttrs={};for(const S in b._extendedAttrs)this._extendedAttrs[S]=b._extendedAttrs[S];this.isWrapped=b.isWrapped}clone(){const b=new E(0);b._data=new Uint32Array(this._data),b.length=this.length;for(const S in this._combined)b._combined[S]=this._combined[S];for(const S in this._extendedAttrs)b._extendedAttrs[S]=this._extendedAttrs[S];return b.isWrapped=this.isWrapped,b}getTrimmedLength(){for(let b=this.length-1;b>=0;--b)if(4194303&this._data[3*b+0])return b+(this._data[3*b+0]>>22);return 0}getNoBgTrimmedLength(){for(let b=this.length-1;b>=0;--b)if(4194303&this._data[3*b+0]||50331648&this._data[3*b+2])return b+(this._data[3*b+0]>>22);return 0}copyCellsFrom(b,S,g,y,A){const M=b._data;if(A)for(let T=y-1;T>=0;T--){for(let k=0;k<3;k++)this._data[3*(g+T)+k]=M[3*(S+T)+k];268435456&M[3*(S+T)+2]&&(this._extendedAttrs[g+T]=b._extendedAttrs[S+T])}else for(let T=0;T<y;T++){for(let k=0;k<3;k++)this._data[3*(g+T)+k]=M[3*(S+T)+k];268435456&M[3*(S+T)+2]&&(this._extendedAttrs[g+T]=b._extendedAttrs[S+T])}const D=Object.keys(b._combined);for(let T=0;T<D.length;T++){const k=parseInt(D[T],10);k>=S&&(this._combined[k-S+g]=b._combined[k])}}translateToString(b,S,g,y){S=S??0,g=g??this.length,b&&(g=Math.min(g,this.getTrimmedLength())),y&&(y.length=0);let A="";for(;S<g;){const M=this._data[3*S+0],D=2097151&M,T=2097152&M?this._combined[S]:D?(0,_.stringFromCodePoint)(D):u.WHITESPACE_CELL_CHAR;if(A+=T,y)for(let k=0;k<T.length;++k)y.push(S);S+=M>>22||1}return y&&y.push(S),A}}a.BufferLine=E},4841:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.getRangeLength=function(c,h){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return h*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(f,a)=>{function c(h,m,u){if(m===h.length-1)return h[m].getTrimmedLength();const _=!h[m].hasContent(u-1)&&h[m].getWidth(u-1)===1,C=h[m+1].getWidth(0)===2;return _&&C?u-1:u}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(h,m,u,_,C){const E=[];for(let x=0;x<h.length-1;x++){let b=x,S=h.get(++b);if(!S.isWrapped)continue;const g=[h.get(x)];for(;b<h.length&&S.isWrapped;)g.push(S),S=h.get(++b);if(_>=x&&_<b){x+=g.length-1;continue}let y=0,A=c(g,y,m),M=1,D=0;for(;M<g.length;){const k=c(g,M,m),R=k-D,N=u-A,I=Math.min(R,N);g[y].copyCellsFrom(g[M],D,A,I,!1),A+=I,A===u&&(y++,A=0),D+=I,D===k&&(M++,D=0),A===0&&y!==0&&g[y-1].getWidth(u-1)===2&&(g[y].copyCellsFrom(g[y-1],u-1,A++,1,!1),g[y-1].setCell(u-1,C))}g[y].replaceCells(A,u,C);let T=0;for(let k=g.length-1;k>0&&(k>y||g[k].getTrimmedLength()===0);k--)T++;T>0&&(E.push(x+g.length-T),E.push(T)),x+=g.length-1}return E},a.reflowLargerCreateNewLayout=function(h,m){const u=[];let _=0,C=m[_],E=0;for(let x=0;x<h.length;x++)if(C===x){const b=m[++_];h.onDeleteEmitter.fire({index:x-E,amount:b}),x+=b-1,E+=b,C=m[++_]}else u.push(x);return{layout:u,countRemoved:E}},a.reflowLargerApplyNewLayout=function(h,m){const u=[];for(let _=0;_<m.length;_++)u.push(h.get(m[_]));for(let _=0;_<u.length;_++)h.set(_,u[_]);h.length=m.length},a.reflowSmallerGetNewLineLengths=function(h,m,u){const _=[],C=h.map(((S,g)=>c(h,g,m))).reduce(((S,g)=>S+g));let E=0,x=0,b=0;for(;b<C;){if(C-b<u){_.push(C-b);break}E+=u;const S=c(h,x,m);E>S&&(E-=S,x++);const g=h[x].getWidth(E-1)===2;g&&E--;const y=g?u-1:u;_.push(y),b+=y}return _},a.getWrappedLineTrimmedLength=c},5295:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const h=c(8460),m=c(844),u=c(9092);class _ extends m.Disposable{constructor(E,x){super(),this._optionsService=E,this._bufferService=x,this._onBufferActivate=this.register(new h.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(E){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(E),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(E,x){this._normal.resize(E,x),this._alt.resize(E,x),this.setupTabStops(E)}setupTabStops(E){this._normal.setupTabStops(E),this._alt.setupTabStops(E)}}a.BufferSet=_},511:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const h=c(482),m=c(643),u=c(3734);class _ extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(E){const x=new _;return x.setFromCharData(E),x}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,h.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(E){this.fg=E[m.CHAR_DATA_ATTR_INDEX],this.bg=0;let x=!1;if(E[m.CHAR_DATA_CHAR_INDEX].length>2)x=!0;else if(E[m.CHAR_DATA_CHAR_INDEX].length===2){const b=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=b&&b<=56319){const S=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=S&&S<=57343?this.content=1024*(b-55296)+S-56320+65536|E[m.CHAR_DATA_WIDTH_INDEX]<<22:x=!0}else x=!0}else this.content=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|E[m.CHAR_DATA_WIDTH_INDEX]<<22;x&&(this.combinedData=E[m.CHAR_DATA_CHAR_INDEX],this.content=2097152|E[m.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=_},643:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const h=c(8460),m=c(844);class u{get id(){return this._id}constructor(C){this.line=C,this.isDisposed=!1,this._disposables=[],this._id=u._nextId++,this._onDispose=this.register(new h.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(C){return this._disposables.push(C),C}}a.Marker=u,u._nextId=1},7116:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(f,a)=>{var c,h,m;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.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=`
|
|
58
|
+
`,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=""})(c||(a.C0=c={})),(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=""})(h||(a.C1=h={})),(function(u){u.ST=`${c.ESC}\\`})(m||(a.C1_ESCAPED=m={}))},7399:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const h=c(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:["'",'"']};a.evaluateKeyboardEvent=function(u,_,C,E){const x={type:0,cancel:!1,key:void 0},b=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?x.key=_?h.C0.ESC+"OA":h.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?x.key=_?h.C0.ESC+"OD":h.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?x.key=_?h.C0.ESC+"OC":h.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(x.key=_?h.C0.ESC+"OB":h.C0.ESC+"[B");break;case 8:x.key=u.ctrlKey?"\b":h.C0.DEL,u.altKey&&(x.key=h.C0.ESC+x.key);break;case 9:if(u.shiftKey){x.key=h.C0.ESC+"[Z";break}x.key=h.C0.HT,x.cancel=!0;break;case 13:x.key=u.altKey?h.C0.ESC+h.C0.CR:h.C0.CR,x.cancel=!0;break;case 27:x.key=h.C0.ESC,u.altKey&&(x.key=h.C0.ESC+h.C0.ESC),x.cancel=!0;break;case 37:if(u.metaKey)break;b?(x.key=h.C0.ESC+"[1;"+(b+1)+"D",x.key===h.C0.ESC+"[1;3D"&&(x.key=h.C0.ESC+(C?"b":"[1;5D"))):x.key=_?h.C0.ESC+"OD":h.C0.ESC+"[D";break;case 39:if(u.metaKey)break;b?(x.key=h.C0.ESC+"[1;"+(b+1)+"C",x.key===h.C0.ESC+"[1;3C"&&(x.key=h.C0.ESC+(C?"f":"[1;5C"))):x.key=_?h.C0.ESC+"OC":h.C0.ESC+"[C";break;case 38:if(u.metaKey)break;b?(x.key=h.C0.ESC+"[1;"+(b+1)+"A",C||x.key!==h.C0.ESC+"[1;3A"||(x.key=h.C0.ESC+"[1;5A")):x.key=_?h.C0.ESC+"OA":h.C0.ESC+"[A";break;case 40:if(u.metaKey)break;b?(x.key=h.C0.ESC+"[1;"+(b+1)+"B",C||x.key!==h.C0.ESC+"[1;3B"||(x.key=h.C0.ESC+"[1;5B")):x.key=_?h.C0.ESC+"OB":h.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(x.key=h.C0.ESC+"[2~");break;case 46:x.key=b?h.C0.ESC+"[3;"+(b+1)+"~":h.C0.ESC+"[3~";break;case 36:x.key=b?h.C0.ESC+"[1;"+(b+1)+"H":_?h.C0.ESC+"OH":h.C0.ESC+"[H";break;case 35:x.key=b?h.C0.ESC+"[1;"+(b+1)+"F":_?h.C0.ESC+"OF":h.C0.ESC+"[F";break;case 33:u.shiftKey?x.type=2:u.ctrlKey?x.key=h.C0.ESC+"[5;"+(b+1)+"~":x.key=h.C0.ESC+"[5~";break;case 34:u.shiftKey?x.type=3:u.ctrlKey?x.key=h.C0.ESC+"[6;"+(b+1)+"~":x.key=h.C0.ESC+"[6~";break;case 112:x.key=b?h.C0.ESC+"[1;"+(b+1)+"P":h.C0.ESC+"OP";break;case 113:x.key=b?h.C0.ESC+"[1;"+(b+1)+"Q":h.C0.ESC+"OQ";break;case 114:x.key=b?h.C0.ESC+"[1;"+(b+1)+"R":h.C0.ESC+"OR";break;case 115:x.key=b?h.C0.ESC+"[1;"+(b+1)+"S":h.C0.ESC+"OS";break;case 116:x.key=b?h.C0.ESC+"[15;"+(b+1)+"~":h.C0.ESC+"[15~";break;case 117:x.key=b?h.C0.ESC+"[17;"+(b+1)+"~":h.C0.ESC+"[17~";break;case 118:x.key=b?h.C0.ESC+"[18;"+(b+1)+"~":h.C0.ESC+"[18~";break;case 119:x.key=b?h.C0.ESC+"[19;"+(b+1)+"~":h.C0.ESC+"[19~";break;case 120:x.key=b?h.C0.ESC+"[20;"+(b+1)+"~":h.C0.ESC+"[20~";break;case 121:x.key=b?h.C0.ESC+"[21;"+(b+1)+"~":h.C0.ESC+"[21~";break;case 122:x.key=b?h.C0.ESC+"[23;"+(b+1)+"~":h.C0.ESC+"[23~";break;case 123:x.key=b?h.C0.ESC+"[24;"+(b+1)+"~":h.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(C&&!E||!u.altKey||u.metaKey)!C||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?x.key=u.key:u.key&&u.ctrlKey&&(u.key==="_"&&(x.key=h.C0.US),u.key==="@"&&(x.key=h.C0.NUL)):u.keyCode===65&&(x.type=1);else{const S=m[u.keyCode],g=S==null?void 0:S[u.shiftKey?1:0];if(g)x.key=h.C0.ESC+g;else if(u.keyCode>=65&&u.keyCode<=90){const y=u.ctrlKey?u.keyCode-64:u.keyCode+32;let A=String.fromCharCode(y);u.shiftKey&&(A=A.toUpperCase()),x.key=h.C0.ESC+A}else if(u.keyCode===32)x.key=h.C0.ESC+(u.ctrlKey?h.C0.NUL:" ");else if(u.key==="Dead"&&u.code.startsWith("Key")){let y=u.code.slice(3,4);u.shiftKey||(y=y.toLowerCase()),x.key=h.C0.ESC+y,x.cancel=!0}}else u.keyCode>=65&&u.keyCode<=90?x.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?x.key=h.C0.NUL:u.keyCode>=51&&u.keyCode<=55?x.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?x.key=h.C0.DEL:u.keyCode===219?x.key=h.C0.ESC:u.keyCode===220?x.key=h.C0.FS:u.keyCode===221&&(x.key=h.C0.GS)}return x}},482:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},a.utf32ToString=function(c,h=0,m=c.length){let u="";for(let _=h;_<m;++_){let C=c[_];C>65535?(C-=65536,u+=String.fromCharCode(55296+(C>>10))+String.fromCharCode(C%1024+56320)):u+=String.fromCharCode(C)}return u},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,h){const m=c.length;if(!m)return 0;let u=0,_=0;if(this._interim){const C=c.charCodeAt(_++);56320<=C&&C<=57343?h[u++]=1024*(this._interim-55296)+C-56320+65536:(h[u++]=this._interim,h[u++]=C),this._interim=0}for(let C=_;C<m;++C){const E=c.charCodeAt(C);if(55296<=E&&E<=56319){if(++C>=m)return this._interim=E,u;const x=c.charCodeAt(C);56320<=x&&x<=57343?h[u++]=1024*(E-55296)+x-56320+65536:(h[u++]=E,h[u++]=x)}else E!==65279&&(h[u++]=E)}return u}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,h){const m=c.length;if(!m)return 0;let u,_,C,E,x=0,b=0,S=0;if(this.interim[0]){let A=!1,M=this.interim[0];M&=(224&M)==192?31:(240&M)==224?15:7;let D,T=0;for(;(D=63&this.interim[++T])&&T<4;)M<<=6,M|=D;const k=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,R=k-T;for(;S<R;){if(S>=m)return 0;if(D=c[S++],(192&D)!=128){S--,A=!0;break}this.interim[T++]=D,M<<=6,M|=63&D}A||(k===2?M<128?S--:h[x++]=M:k===3?M<2048||M>=55296&&M<=57343||M===65279||(h[x++]=M):M<65536||M>1114111||(h[x++]=M)),this.interim.fill(0)}const g=m-4;let y=S;for(;y<m;){for(;!(!(y<g)||128&(u=c[y])||128&(_=c[y+1])||128&(C=c[y+2])||128&(E=c[y+3]));)h[x++]=u,h[x++]=_,h[x++]=C,h[x++]=E,y+=4;if(u=c[y++],u<128)h[x++]=u;else if((224&u)==192){if(y>=m)return this.interim[0]=u,x;if(_=c[y++],(192&_)!=128){y--;continue}if(b=(31&u)<<6|63&_,b<128){y--;continue}h[x++]=b}else if((240&u)==224){if(y>=m)return this.interim[0]=u,x;if(_=c[y++],(192&_)!=128){y--;continue}if(y>=m)return this.interim[0]=u,this.interim[1]=_,x;if(C=c[y++],(192&C)!=128){y--;continue}if(b=(15&u)<<12|(63&_)<<6|63&C,b<2048||b>=55296&&b<=57343||b===65279)continue;h[x++]=b}else if((248&u)==240){if(y>=m)return this.interim[0]=u,x;if(_=c[y++],(192&_)!=128){y--;continue}if(y>=m)return this.interim[0]=u,this.interim[1]=_,x;if(C=c[y++],(192&C)!=128){y--;continue}if(y>=m)return this.interim[0]=u,this.interim[1]=_,this.interim[2]=C,x;if(E=c[y++],(192&E)!=128){y--;continue}if(b=(7&u)<<18|(63&_)<<12|(63&C)<<6|63&E,b<65536||b>1114111)continue;h[x++]=b}}return x}}},225:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const h=c(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 _;a.UnicodeV6=class{constructor(){if(this.version="6",!_){_=new Uint8Array(65536),_.fill(1),_[0]=0,_.fill(0,1,32),_.fill(0,127,160),_.fill(2,4352,4448),_[9001]=2,_[9002]=2,_.fill(2,11904,42192),_[12351]=1,_.fill(2,44032,55204),_.fill(2,63744,64256),_.fill(2,65040,65050),_.fill(2,65072,65136),_.fill(2,65280,65377),_.fill(2,65504,65511);for(let C=0;C<m.length;++C)_.fill(0,m[C][0],m[C][1]+1)}}wcwidth(C){return C<32?0:C<127?1:C<65536?_[C]:(function(E,x){let b,S=0,g=x.length-1;if(E<x[0][0]||E>x[g][1])return!1;for(;g>=S;)if(b=S+g>>1,E>x[b][1])S=b+1;else{if(!(E<x[b][0]))return!0;g=b-1}return!1})(C,u)?0:C>=131072&&C<=196605||C>=196608&&C<=262141?2:1}charProperties(C,E){let x=this.wcwidth(C),b=x===0&&E!==0;if(b){const S=h.UnicodeService.extractWidth(E);S===0?b=!1:S>x&&(x=S)}return h.UnicodeService.createPropertyValue(0,x,b)}}},5981:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const h=c(8460),m=c(844);class u extends m.Disposable{constructor(C){super(),this._action=C,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new h.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(C,E){if(E!==void 0&&this._syncCalls>E)return void(this._syncCalls=0);if(this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let x;for(this._isSyncWriting=!0;x=this._writeBuffer.shift();){this._action(x);const b=this._callbacks.shift();b&&b()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(C,E){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+=C.length,this._writeBuffer.push(C),this._callbacks.push(E),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(E)}_innerWrite(C=0,E=!0){const x=C||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const b=this._writeBuffer[this._bufferOffset],S=this._action(b,E);if(S){const y=A=>Date.now()-x>=12?setTimeout((()=>this._innerWrite(0,A))):this._innerWrite(x,A);return void S.catch((A=>(queueMicrotask((()=>{throw A})),Promise.resolve(!1)))).then(y)}const g=this._callbacks[this._bufferOffset];if(g&&g(),this._bufferOffset++,this._pendingData-=b.length,Date.now()-x>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}a.WriteBuffer=u},5941:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.parseColor=void 0;const c=/^([\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})$/,h=/^[\da-f]+$/;function m(u,_){const C=u.toString(16),E=C.length<2?"0"+C:C;switch(_){case 4:return C[0];case 8:return E;case 12:return(E+E).slice(0,3);default:return E+E}}a.parseColor=function(u){if(!u)return;let _=u.toLowerCase();if(_.indexOf("rgb:")===0){_=_.slice(4);const C=c.exec(_);if(C){const E=C[1]?15:C[4]?255:C[7]?4095:65535;return[Math.round(parseInt(C[1]||C[4]||C[7]||C[10],16)/E*255),Math.round(parseInt(C[2]||C[5]||C[8]||C[11],16)/E*255),Math.round(parseInt(C[3]||C[6]||C[9]||C[12],16)/E*255)]}}else if(_.indexOf("#")===0&&(_=_.slice(1),h.exec(_)&&[3,6,9,12].includes(_.length))){const C=_.length/3,E=[0,0,0];for(let x=0;x<3;++x){const b=parseInt(_.slice(C*x,C*x+C),16);E[x]=C===1?b<<4:C===2?b:C===3?b>>4:b>>8}return E}},a.toRgbString=function(u,_=16){const[C,E,x]=u;return`rgb:${m(C,_)}/${m(E,_)}/${m(x,_)}`}},5770:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const h=c(482),m=c(8742),u=c(5770),_=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=_,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=_}registerHandler(E,x){this._handlers[E]===void 0&&(this._handlers[E]=[]);const b=this._handlers[E];return b.push(x),{dispose:()=>{const S=b.indexOf(x);S!==-1&&b.splice(S,1)}}}clearHandler(E){this._handlers[E]&&delete this._handlers[E]}setHandlerFallback(E){this._handlerFb=E}reset(){if(this._active.length)for(let E=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;E>=0;--E)this._active[E].unhook(!1);this._stack.paused=!1,this._active=_,this._ident=0}hook(E,x){if(this.reset(),this._ident=E,this._active=this._handlers[E]||_,this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].hook(x);else this._handlerFb(this._ident,"HOOK",x)}put(E,x,b){if(this._active.length)for(let S=this._active.length-1;S>=0;S--)this._active[S].put(E,x,b);else this._handlerFb(this._ident,"PUT",(0,h.utf32ToString)(E,x,b))}unhook(E,x=!0){if(this._active.length){let b=!1,S=this._active.length-1,g=!1;if(this._stack.paused&&(S=this._stack.loopPosition-1,b=x,g=this._stack.fallThrough,this._stack.paused=!1),!g&&b===!1){for(;S>=0&&(b=this._active[S].unhook(E),b!==!0);S--)if(b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!1,b;S--}for(;S>=0;S--)if(b=this._active[S].unhook(!1),b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!0,b}else this._handlerFb(this._ident,"UNHOOK",E);this._active=_,this._ident=0}};const C=new m.Params;C.addParam(0),a.DcsHandler=class{constructor(E){this._handler=E,this._data="",this._params=C,this._hitLimit=!1}hook(E){this._params=E.length>1||E.params[0]?E.clone():C,this._data="",this._hitLimit=!1}put(E,x,b){this._hitLimit||(this._data+=(0,h.utf32ToString)(E,x,b),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(E){let x=!1;if(this._hitLimit)x=!1;else if(E&&(x=this._handler(this._data,this._params),x instanceof Promise))return x.then((b=>(this._params=C,this._data="",this._hitLimit=!1,b)));return this._params=C,this._data="",this._hitLimit=!1,x}}},2015:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const h=c(844),m=c(8742),u=c(6242),_=c(6351);class C{constructor(S){this.table=new Uint8Array(S)}setDefault(S,g){this.table.fill(S<<4|g)}add(S,g,y,A){this.table[g<<8|S]=y<<4|A}addMany(S,g,y,A){for(let M=0;M<S.length;M++)this.table[g<<8|S[M]]=y<<4|A}}a.TransitionTable=C;const E=160;a.VT500_TRANSITION_TABLE=(function(){const b=new C(4095),S=Array.apply(null,Array(256)).map(((T,k)=>k)),g=(T,k)=>S.slice(T,k),y=g(32,127),A=g(0,24);A.push(25),A.push.apply(A,g(28,32));const M=g(0,14);let D;for(D in b.setDefault(1,0),b.addMany(y,0,2,0),M)b.addMany([24,26,153,154],D,3,0),b.addMany(g(128,144),D,3,0),b.addMany(g(144,152),D,3,0),b.add(156,D,0,0),b.add(27,D,11,1),b.add(157,D,4,8),b.addMany([152,158,159],D,0,7),b.add(155,D,11,3),b.add(144,D,11,9);return b.addMany(A,0,3,0),b.addMany(A,1,3,1),b.add(127,1,0,1),b.addMany(A,8,0,8),b.addMany(A,3,3,3),b.add(127,3,0,3),b.addMany(A,4,3,4),b.add(127,4,0,4),b.addMany(A,6,3,6),b.addMany(A,5,3,5),b.add(127,5,0,5),b.addMany(A,2,3,2),b.add(127,2,0,2),b.add(93,1,4,8),b.addMany(y,8,5,8),b.add(127,8,5,8),b.addMany([156,27,24,26,7],8,6,0),b.addMany(g(28,32),8,0,8),b.addMany([88,94,95],1,0,7),b.addMany(y,7,0,7),b.addMany(A,7,0,7),b.add(156,7,0,0),b.add(127,7,0,7),b.add(91,1,11,3),b.addMany(g(64,127),3,7,0),b.addMany(g(48,60),3,8,4),b.addMany([60,61,62,63],3,9,4),b.addMany(g(48,60),4,8,4),b.addMany(g(64,127),4,7,0),b.addMany([60,61,62,63],4,0,6),b.addMany(g(32,64),6,0,6),b.add(127,6,0,6),b.addMany(g(64,127),6,0,0),b.addMany(g(32,48),3,9,5),b.addMany(g(32,48),5,9,5),b.addMany(g(48,64),5,0,6),b.addMany(g(64,127),5,7,0),b.addMany(g(32,48),4,9,5),b.addMany(g(32,48),1,9,2),b.addMany(g(32,48),2,9,2),b.addMany(g(48,127),2,10,0),b.addMany(g(48,80),1,10,0),b.addMany(g(81,88),1,10,0),b.addMany([89,90,92],1,10,0),b.addMany(g(96,127),1,10,0),b.add(80,1,11,9),b.addMany(A,9,0,9),b.add(127,9,0,9),b.addMany(g(28,32),9,0,9),b.addMany(g(32,48),9,9,12),b.addMany(g(48,60),9,8,10),b.addMany([60,61,62,63],9,9,10),b.addMany(A,11,0,11),b.addMany(g(32,128),11,0,11),b.addMany(g(28,32),11,0,11),b.addMany(A,10,0,10),b.add(127,10,0,10),b.addMany(g(28,32),10,0,10),b.addMany(g(48,60),10,8,10),b.addMany([60,61,62,63],10,0,11),b.addMany(g(32,48),10,9,12),b.addMany(A,12,0,12),b.add(127,12,0,12),b.addMany(g(28,32),12,0,12),b.addMany(g(32,48),12,9,12),b.addMany(g(48,64),12,0,11),b.addMany(g(64,127),12,12,13),b.addMany(g(64,127),10,12,13),b.addMany(g(64,127),9,12,13),b.addMany(A,13,13,13),b.addMany(y,13,13,13),b.add(127,13,0,13),b.addMany([27,156,24,26],13,14,0),b.add(E,0,2,0),b.add(E,8,5,8),b.add(E,6,0,6),b.add(E,11,0,11),b.add(E,13,13,13),b})();class x extends h.Disposable{constructor(S=a.VT500_TRANSITION_TABLE){super(),this._transitions=S,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=(g,y,A)=>{},this._executeHandlerFb=g=>{},this._csiHandlerFb=(g,y)=>{},this._escHandlerFb=g=>{},this._errorHandlerFb=g=>g,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,h.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 _.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(S,g=[64,126]){let y=0;if(S.prefix){if(S.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=S.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(S.intermediates){if(S.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let M=0;M<S.intermediates.length;++M){const D=S.intermediates.charCodeAt(M);if(32>D||D>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=D}}if(S.final.length!==1)throw new Error("final must be a single byte");const A=S.final.charCodeAt(0);if(g[0]>A||A>g[1])throw new Error(`final must be in range ${g[0]} .. ${g[1]}`);return y<<=8,y|=A,y}identToString(S){const g=[];for(;S;)g.push(String.fromCharCode(255&S)),S>>=8;return g.reverse().join("")}setPrintHandler(S){this._printHandler=S}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(S,g){const y=this._identifier(S,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);const A=this._escHandlers[y];return A.push(g),{dispose:()=>{const M=A.indexOf(g);M!==-1&&A.splice(M,1)}}}clearEscHandler(S){this._escHandlers[this._identifier(S,[48,126])]&&delete this._escHandlers[this._identifier(S,[48,126])]}setEscHandlerFallback(S){this._escHandlerFb=S}setExecuteHandler(S,g){this._executeHandlers[S.charCodeAt(0)]=g}clearExecuteHandler(S){this._executeHandlers[S.charCodeAt(0)]&&delete this._executeHandlers[S.charCodeAt(0)]}setExecuteHandlerFallback(S){this._executeHandlerFb=S}registerCsiHandler(S,g){const y=this._identifier(S);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);const A=this._csiHandlers[y];return A.push(g),{dispose:()=>{const M=A.indexOf(g);M!==-1&&A.splice(M,1)}}}clearCsiHandler(S){this._csiHandlers[this._identifier(S)]&&delete this._csiHandlers[this._identifier(S)]}setCsiHandlerFallback(S){this._csiHandlerFb=S}registerDcsHandler(S,g){return this._dcsParser.registerHandler(this._identifier(S),g)}clearDcsHandler(S){this._dcsParser.clearHandler(this._identifier(S))}setDcsHandlerFallback(S){this._dcsParser.setHandlerFallback(S)}registerOscHandler(S,g){return this._oscParser.registerHandler(S,g)}clearOscHandler(S){this._oscParser.clearHandler(S)}setOscHandlerFallback(S){this._oscParser.setHandlerFallback(S)}setErrorHandler(S){this._errorHandler=S}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(S,g,y,A,M){this._parseStack.state=S,this._parseStack.handlers=g,this._parseStack.handlerPos=y,this._parseStack.transition=A,this._parseStack.chunkPos=M}parse(S,g,y){let A,M=0,D=0,T=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,T=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const k=this._parseStack.handlers;let R=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&R>-1){for(;R>=0&&(A=k[R](this._params),A!==!0);R--)if(A instanceof Promise)return this._parseStack.handlerPos=R,A}this._parseStack.handlers=[];break;case 4:if(y===!1&&R>-1){for(;R>=0&&(A=k[R](),A!==!0);R--)if(A instanceof Promise)return this._parseStack.handlerPos=R,A}this._parseStack.handlers=[];break;case 6:if(M=S[this._parseStack.chunkPos],A=this._dcsParser.unhook(M!==24&&M!==26,y),A)return A;M===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(M=S[this._parseStack.chunkPos],A=this._oscParser.end(M!==24&&M!==26,y),A)return A;M===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,T=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let k=T;k<g;++k){switch(M=S[k],D=this._transitions.table[this.currentState<<8|(M<160?M:E)],D>>4){case 2:for(let F=k+1;;++F){if(F>=g||(M=S[F])<32||M>126&&M<E){this._printHandler(S,k,F),k=F-1;break}if(++F>=g||(M=S[F])<32||M>126&&M<E){this._printHandler(S,k,F),k=F-1;break}if(++F>=g||(M=S[F])<32||M>126&&M<E){this._printHandler(S,k,F),k=F-1;break}if(++F>=g||(M=S[F])<32||M>126&&M<E){this._printHandler(S,k,F),k=F-1;break}}break;case 3:this._executeHandlers[M]?this._executeHandlers[M]():this._executeHandlerFb(M),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:k,code:M,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const R=this._csiHandlers[this._collect<<8|M];let N=R?R.length-1:-1;for(;N>=0&&(A=R[N](this._params),A!==!0);N--)if(A instanceof Promise)return this._preserveStack(3,R,N,D,k),A;N<0&&this._csiHandlerFb(this._collect<<8|M,this._params),this.precedingJoinState=0;break;case 8:do switch(M){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(M-48)}while(++k<g&&(M=S[k])>47&&M<60);k--;break;case 9:this._collect<<=8,this._collect|=M;break;case 10:const I=this._escHandlers[this._collect<<8|M];let P=I?I.length-1:-1;for(;P>=0&&(A=I[P](),A!==!0);P--)if(A instanceof Promise)return this._preserveStack(4,I,P,D,k),A;P<0&&this._escHandlerFb(this._collect<<8|M),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|M,this._params);break;case 13:for(let F=k+1;;++F)if(F>=g||(M=S[F])===24||M===26||M===27||M>127&&M<E){this._dcsParser.put(S,k,F),k=F-1;break}break;case 14:if(A=this._dcsParser.unhook(M!==24&&M!==26),A)return this._preserveStack(6,[],0,D,k),A;M===27&&(D|=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 F=k+1;;F++)if(F>=g||(M=S[F])<32||M>127&&M<E){this._oscParser.put(S,k,F),k=F-1;break}break;case 6:if(A=this._oscParser.end(M!==24&&M!==26),A)return this._preserveStack(5,[],0,D,k),A;M===27&&(D|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&D}}}a.EscapeSequenceParser=x},6242:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const h=c(5770),m=c(482),u=[];a.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(_,C){this._handlers[_]===void 0&&(this._handlers[_]=[]);const E=this._handlers[_];return E.push(C),{dispose:()=>{const x=E.indexOf(C);x!==-1&&E.splice(x,1)}}}clearHandler(_){this._handlers[_]&&delete this._handlers[_]}setHandlerFallback(_){this._handlerFb=_}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=u}reset(){if(this._state===2)for(let _=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;_>=0;--_)this._active[_].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 _=this._active.length-1;_>=0;_--)this._active[_].start();else this._handlerFb(this._id,"START")}_put(_,C,E){if(this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].put(_,C,E);else this._handlerFb(this._id,"PUT",(0,m.utf32ToString)(_,C,E))}start(){this.reset(),this._state=1}put(_,C,E){if(this._state!==3){if(this._state===1)for(;C<E;){const x=_[C++];if(x===59){this._state=2,this._start();break}if(x<48||57<x)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+x-48}this._state===2&&E-C>0&&this._put(_,C,E)}}end(_,C=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let E=!1,x=this._active.length-1,b=!1;if(this._stack.paused&&(x=this._stack.loopPosition-1,E=C,b=this._stack.fallThrough,this._stack.paused=!1),!b&&E===!1){for(;x>=0&&(E=this._active[x].end(_),E!==!0);x--)if(E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!1,E;x--}for(;x>=0;x--)if(E=this._active[x].end(!1),E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!0,E}else this._handlerFb(this._id,"END",_);this._active=u,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(_){this._handler=_,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(_,C,E){this._hitLimit||(this._data+=(0,m.utf32ToString)(_,C,E),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(_){let C=!1;if(this._hitLimit)C=!1;else if(_&&(C=this._handler(this._data),C instanceof Promise))return C.then((E=>(this._data="",this._hitLimit=!1,E)));return this._data="",this._hitLimit=!1,C}}},8742:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const c=2147483647;class h{static fromArray(u){const _=new h;if(!u.length)return _;for(let C=Array.isArray(u[0])?1:0;C<u.length;++C){const E=u[C];if(Array.isArray(E))for(let x=0;x<E.length;++x)_.addSubParam(E[x]);else _.addParam(E)}return _}constructor(u=32,_=32){if(this.maxLength=u,this.maxSubParamsLength=_,_>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(_),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const u=new h(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 _=0;_<this.length;++_){u.push(this.params[_]);const C=this._subParamsIdx[_]>>8,E=255&this._subParamsIdx[_];E-C>0&&u.push(Array.prototype.slice.call(this._subParams,C,E))}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>c?c: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>c?c:u,this._subParamsIdx[this.length-1]++}}hasSubParams(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0}getSubParams(u){const _=this._subParamsIdx[u]>>8,C=255&this._subParamsIdx[u];return C-_>0?this._subParams.subarray(_,C):null}getSubParamsAll(){const u={};for(let _=0;_<this.length;++_){const C=this._subParamsIdx[_]>>8,E=255&this._subParamsIdx[_];E-C>0&&(u[_]=this._subParams.slice(C,E))}return u}addDigit(u){let _;if(this._rejectDigits||!(_=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const C=this._digitIsSub?this._subParams:this.params,E=C[_-1];C[_-1]=~E?Math.min(10*E+u,c):u}}a.Params=h},5741:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,h){const m={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(m),h.dispose=()=>this._wrappedAddonDispose(m),h.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let h=-1;for(let m=0;m<this._addons.length;m++)if(this._addons[m]===c){h=m;break}if(h===-1)throw new Error("Could not dispose an addon that has not been loaded");c.isDisposed=!0,c.dispose.apply(c.instance),this._addons.splice(h,1)}}},8771:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const h=c(3785),m=c(511);a.BufferApiView=class{constructor(u,_){this._buffer=u,this.type=_}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 _=this._buffer.lines.get(u);if(_)return new h.BufferLineApiView(_)}getNullCell(){return new m.CellData}}},3785:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const h=c(511);a.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 h.CellData)}translateToString(m,u,_){return this._line.translateToString(m,u,_)}}},8285:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const h=c(8771),m=c(8460),u=c(844);class _ extends u.Disposable{constructor(E){super(),this._core=E,this._onBufferChange=this.register(new m.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new h.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new h.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}a.BufferNamespaceApi=_},7975:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,h){return this._core.registerCsiHandler(c,(m=>h(m.toArray())))}addCsiHandler(c,h){return this.registerCsiHandler(c,h)}registerDcsHandler(c,h){return this._core.registerDcsHandler(c,((m,u)=>h(m,u.toArray())))}addDcsHandler(c,h){return this.registerDcsHandler(c,h)}registerEscHandler(c,h){return this._core.registerEscHandler(c,h)}addEscHandler(c,h){return this.registerEscHandler(c,h)}registerOscHandler(c,h){return this._core.registerOscHandler(c,h)}addOscHandler(c,h){return this.registerOscHandler(c,h)}}},7090:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(f,a,c){var h=this&&this.__decorate||function(b,S,g,y){var A,M=arguments.length,D=M<3?S:y===null?y=Object.getOwnPropertyDescriptor(S,g):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(b,S,g,y);else for(var T=b.length-1;T>=0;T--)(A=b[T])&&(D=(M<3?A(D):M>3?A(S,g,D):A(S,g))||D);return M>3&&D&&Object.defineProperty(S,g,D),D},m=this&&this.__param||function(b,S){return function(g,y){S(g,y,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const u=c(8460),_=c(844),C=c(5295),E=c(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let x=a.BufferService=class extends _.Disposable{get buffer(){return this.buffers.active}constructor(b){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(b.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(b.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new C.BufferSet(b,this))}resize(b,S){this.cols=b,this.rows=S,this.buffers.resize(b,S),this._onResize.fire({cols:b,rows:S})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(b,S=!1){const g=this.buffer;let y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===b.fg&&y.getBg(0)===b.bg||(y=g.getBlankLine(b,S),this._cachedBlankLine=y),y.isWrapped=S;const A=g.ybase+g.scrollTop,M=g.ybase+g.scrollBottom;if(g.scrollTop===0){const D=g.lines.isFull;M===g.lines.length-1?D?g.lines.recycle().copyFrom(y):g.lines.push(y.clone()):g.lines.splice(M+1,0,y.clone()),D?this.isUserScrolling&&(g.ydisp=Math.max(g.ydisp-1,0)):(g.ybase++,this.isUserScrolling||g.ydisp++)}else{const D=M-A+1;g.lines.shiftElements(A+1,D-1,-1),g.lines.set(M,y.clone())}this.isUserScrolling||(g.ydisp=g.ybase),this._onScroll.fire(g.ydisp)}scrollLines(b,S,g){const y=this.buffer;if(b<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else b+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);const A=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+b,y.ybase),0),A!==y.ydisp&&(S||this._onScroll.fire(y.ydisp))}};a.BufferService=x=h([m(0,E.IOptionsService)],x)},7994:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0,a.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,h){this._charsets[c]=h,this.glevel===c&&(this.charset=h)}}},1753:function(f,a,c){var h=this&&this.__decorate||function(y,A,M,D){var T,k=arguments.length,R=k<3?A:D===null?D=Object.getOwnPropertyDescriptor(A,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(y,A,M,D);else for(var N=y.length-1;N>=0;N--)(T=y[N])&&(R=(k<3?T(R):k>3?T(A,M,R):T(A,M))||R);return k>3&&R&&Object.defineProperty(A,M,R),R},m=this&&this.__param||function(y,A){return function(M,D){A(M,D,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const u=c(2585),_=c(8460),C=c(844),E={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function x(y,A){let M=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(M|=64,M|=y.action):(M|=3&y.button,4&y.button&&(M|=64),8&y.button&&(M|=128),y.action===32?M|=32:y.action!==0||A||(M|=3)),M}const b=String.fromCharCode,S={DEFAULT:y=>{const A=[x(y,!1)+32,y.col+32,y.row+32];return A[0]>255||A[1]>255||A[2]>255?"":`\x1B[M${b(A[0])}${b(A[1])}${b(A[2])}`},SGR:y=>{const A=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${x(y,!0)};${y.col};${y.row}${A}`},SGR_PIXELS:y=>{const A=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${x(y,!0)};${y.x};${y.y}${A}`}};let g=a.CoreMouseService=class extends C.Disposable{constructor(y,A){super(),this._bufferService=y,this._coreService=A,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new _.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const M of Object.keys(E))this.addProtocol(M,E[M]);for(const M of Object.keys(S))this.addEncoding(M,S[M]);this.reset()}addProtocol(y,A){this._protocols[y]=A}addEncoding(y,A){this._encodings[y]=A}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;const A=this._encodings[this._activeEncoding](y);return A&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(A):this._coreService.triggerDataEvent(A,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,A,M){if(M){if(y.x!==A.x||y.y!==A.y)return!1}else if(y.col!==A.col||y.row!==A.row)return!1;return y.button===A.button&&y.action===A.action&&y.ctrl===A.ctrl&&y.alt===A.alt&&y.shift===A.shift}};a.CoreMouseService=g=h([m(0,u.IBufferService),m(1,u.ICoreService)],g)},6975:function(f,a,c){var h=this&&this.__decorate||function(g,y,A,M){var D,T=arguments.length,k=T<3?y:M===null?M=Object.getOwnPropertyDescriptor(y,A):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(g,y,A,M);else for(var R=g.length-1;R>=0;R--)(D=g[R])&&(k=(T<3?D(k):T>3?D(y,A,k):D(y,A))||k);return T>3&&k&&Object.defineProperty(y,A,k),k},m=this&&this.__param||function(g,y){return function(A,M){y(A,M,g)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const u=c(1439),_=c(8460),C=c(844),E=c(2585),x=Object.freeze({insertMode:!1}),b=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let S=a.CoreService=class extends C.Disposable{constructor(g,y,A){super(),this._bufferService=g,this._logService=y,this._optionsService=A,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new _.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new _.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new _.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new _.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,u.clone)(x),this.decPrivateModes=(0,u.clone)(b)}reset(){this.modes=(0,u.clone)(x),this.decPrivateModes=(0,u.clone)(b)}triggerDataEvent(g,y=!1){if(this._optionsService.rawOptions.disableStdin)return;const A=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&A.ybase!==A.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${g}"`,(()=>g.split("").map((M=>M.charCodeAt(0))))),this._onData.fire(g)}triggerBinaryEvent(g){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${g}"`,(()=>g.split("").map((y=>y.charCodeAt(0))))),this._onBinary.fire(g))}};a.CoreService=S=h([m(0,E.IBufferService),m(1,E.ILogService),m(2,E.IOptionsService)],S)},9074:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const h=c(8055),m=c(8460),u=c(844),_=c(6106);let C=0,E=0;class x extends u.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new _.SortedList((g=>g==null?void 0:g.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(g){if(g.marker.isDisposed)return;const y=new b(g);if(y){const A=y.marker.onDispose((()=>y.dispose()));y.onDispose((()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),A.dispose())})),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(const g of this._decorations.values())g.dispose();this._decorations.clear()}*getDecorationsAtCell(g,y,A){let M=0,D=0;for(const T of this._decorations.getKeyIterator(y))M=T.options.x??0,D=M+(T.options.width??1),g>=M&&g<D&&(!A||(T.options.layer??"bottom")===A)&&(yield T)}forEachDecorationAtCell(g,y,A,M){this._decorations.forEachByKey(y,(D=>{C=D.options.x??0,E=C+(D.options.width??1),g>=C&&g<E&&(!A||(D.options.layer??"bottom")===A)&&M(D)}))}}a.DecorationService=x;class b extends u.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=h.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=h.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(g){super(),this.options=g,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=g.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const h=c(2585),m=c(8343);class u{constructor(...C){this._entries=new Map;for(const[E,x]of C)this.set(E,x)}set(C,E){const x=this._entries.get(C);return this._entries.set(C,E),x}forEach(C){for(const[E,x]of this._entries.entries())C(E,x)}has(C){return this._entries.has(C)}get(C){return this._entries.get(C)}}a.ServiceCollection=u,a.InstantiationService=class{constructor(){this._services=new u,this._services.set(h.IInstantiationService,this)}setService(_,C){this._services.set(_,C)}getService(_){return this._services.get(_)}createInstance(_,...C){const E=(0,m.getServiceDependencies)(_).sort(((S,g)=>S.index-g.index)),x=[];for(const S of E){const g=this._services.get(S.id);if(!g)throw new Error(`[createInstance] ${_.name} depends on UNKNOWN service ${S.id}.`);x.push(g)}const b=E.length>0?E[0].index:C.length;if(C.length!==b)throw new Error(`[createInstance] First service dependency of ${_.name} at position ${b+1} conflicts with ${C.length} static arguments`);return new _(...C,...x)}}},7866:function(f,a,c){var h=this&&this.__decorate||function(b,S,g,y){var A,M=arguments.length,D=M<3?S:y===null?y=Object.getOwnPropertyDescriptor(S,g):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(b,S,g,y);else for(var T=b.length-1;T>=0;T--)(A=b[T])&&(D=(M<3?A(D):M>3?A(S,g,D):A(S,g))||D);return M>3&&D&&Object.defineProperty(S,g,D),D},m=this&&this.__param||function(b,S){return function(g,y){S(g,y,b)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const u=c(844),_=c(2585),C={trace:_.LogLevelEnum.TRACE,debug:_.LogLevelEnum.DEBUG,info:_.LogLevelEnum.INFO,warn:_.LogLevelEnum.WARN,error:_.LogLevelEnum.ERROR,off:_.LogLevelEnum.OFF};let E,x=a.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(b){super(),this._optionsService=b,this._logLevel=_.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),E=this}_updateLogLevel(){this._logLevel=C[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(b){for(let S=0;S<b.length;S++)typeof b[S]=="function"&&(b[S]=b[S]())}_log(b,S,g){this._evalLazyOptionalParams(g),b.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+S,...g)}trace(b,...S){var g;this._logLevel<=_.LogLevelEnum.TRACE&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.trace.bind(this._optionsService.options.logger))??console.log,b,S)}debug(b,...S){var g;this._logLevel<=_.LogLevelEnum.DEBUG&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.debug.bind(this._optionsService.options.logger))??console.log,b,S)}info(b,...S){var g;this._logLevel<=_.LogLevelEnum.INFO&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.info.bind(this._optionsService.options.logger))??console.info,b,S)}warn(b,...S){var g;this._logLevel<=_.LogLevelEnum.WARN&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.warn.bind(this._optionsService.options.logger))??console.warn,b,S)}error(b,...S){var g;this._logLevel<=_.LogLevelEnum.ERROR&&this._log(((g=this._optionsService.options.logger)==null?void 0:g.error.bind(this._optionsService.options.logger))??console.error,b,S)}};a.LogService=x=h([m(0,_.IOptionsService)],x),a.setTraceLogger=function(b){E=b},a.traceCall=function(b,S,g){if(typeof g.value!="function")throw new Error("not supported");const y=g.value;g.value=function(...A){if(E.logLevel!==_.LogLevelEnum.TRACE)return y.apply(this,A);E.trace(`GlyphRenderer#${y.name}(${A.map((D=>JSON.stringify(D))).join(", ")})`);const M=y.apply(this,A);return E.trace(`GlyphRenderer#${y.name} return`,M),M}}},7302:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const h=c(8460),m=c(844),u=c(6114);a.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:u.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const _=["normal","bold","100","200","300","400","500","600","700","800","900"];class C extends m.Disposable{constructor(x){super(),this._onOptionChange=this.register(new h.EventEmitter),this.onOptionChange=this._onOptionChange.event;const b={...a.DEFAULT_OPTIONS};for(const S in x)if(S in b)try{const g=x[S];b[S]=this._sanitizeAndValidateOption(S,g)}catch(g){console.error(g)}this.rawOptions=b,this.options={...b},this._setupOptions(),this.register((0,m.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(x,b){return this.onOptionChange((S=>{S===x&&b(this.rawOptions[x])}))}onMultipleOptionChange(x,b){return this.onOptionChange((S=>{x.indexOf(S)!==-1&&b()}))}_setupOptions(){const x=S=>{if(!(S in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${S}"`);return this.rawOptions[S]},b=(S,g)=>{if(!(S in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${S}"`);g=this._sanitizeAndValidateOption(S,g),this.rawOptions[S]!==g&&(this.rawOptions[S]=g,this._onOptionChange.fire(S))};for(const S in this.rawOptions){const g={get:x.bind(this,S),set:b.bind(this,S)};Object.defineProperty(this.options,S,g)}}_sanitizeAndValidateOption(x,b){switch(x){case"cursorStyle":if(b||(b=a.DEFAULT_OPTIONS[x]),!(function(S){return S==="block"||S==="underline"||S==="bar"})(b))throw new Error(`"${b}" is not a valid value for ${x}`);break;case"wordSeparator":b||(b=a.DEFAULT_OPTIONS[x]);break;case"fontWeight":case"fontWeightBold":if(typeof b=="number"&&1<=b&&b<=1e3)break;b=_.includes(b)?b:a.DEFAULT_OPTIONS[x];break;case"cursorWidth":b=Math.floor(b);case"lineHeight":case"tabStopWidth":if(b<1)throw new Error(`${x} cannot be less than 1, value: ${b}`);break;case"minimumContrastRatio":b=Math.max(1,Math.min(21,Math.round(10*b)/10));break;case"scrollback":if((b=Math.min(b,4294967295))<0)throw new Error(`${x} cannot be less than 0, value: ${b}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(b<=0)throw new Error(`${x} cannot be less than or equal to 0, value: ${b}`);break;case"rows":case"cols":if(!b&&b!==0)throw new Error(`${x} must be numeric, value: ${b}`);break;case"windowsPty":b=b??{}}return b}}a.OptionsService=C},2660:function(f,a,c){var h=this&&this.__decorate||function(C,E,x,b){var S,g=arguments.length,y=g<3?E:b===null?b=Object.getOwnPropertyDescriptor(E,x):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(C,E,x,b);else for(var A=C.length-1;A>=0;A--)(S=C[A])&&(y=(g<3?S(y):g>3?S(E,x,y):S(E,x))||y);return g>3&&y&&Object.defineProperty(E,x,y),y},m=this&&this.__param||function(C,E){return function(x,b){E(x,b,C)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const u=c(2585);let _=a.OscLinkService=class{constructor(C){this._bufferService=C,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(C){const E=this._bufferService.buffer;if(C.id===void 0){const A=E.addMarker(E.ybase+E.y),M={data:C,id:this._nextId++,lines:[A]};return A.onDispose((()=>this._removeMarkerFromLink(M,A))),this._dataByLinkId.set(M.id,M),M.id}const x=C,b=this._getEntryIdKey(x),S=this._entriesWithId.get(b);if(S)return this.addLineToLink(S.id,E.ybase+E.y),S.id;const g=E.addMarker(E.ybase+E.y),y={id:this._nextId++,key:this._getEntryIdKey(x),data:x,lines:[g]};return g.onDispose((()=>this._removeMarkerFromLink(y,g))),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(C,E){const x=this._dataByLinkId.get(C);if(x&&x.lines.every((b=>b.line!==E))){const b=this._bufferService.buffer.addMarker(E);x.lines.push(b),b.onDispose((()=>this._removeMarkerFromLink(x,b)))}}getLinkData(C){var E;return(E=this._dataByLinkId.get(C))==null?void 0:E.data}_getEntryIdKey(C){return`${C.id};;${C.uri}`}_removeMarkerFromLink(C,E){const x=C.lines.indexOf(E);x!==-1&&(C.lines.splice(x,1),C.lines.length===0&&(C.data.id!==void 0&&this._entriesWithId.delete(C.key),this._dataByLinkId.delete(C.id)))}};a.OscLinkService=_=h([m(0,u.IBufferService)],_)},8343:(f,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const c="di$target",h="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(m){return m[h]||[]},a.createDecorator=function(m){if(a.serviceRegistry.has(m))return a.serviceRegistry.get(m);const u=function(_,C,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(x,b,S){b[c]===b?b[h].push({id:x,index:S}):(b[h]=[{id:x,index:S}],b[c]=b)})(u,_,E)};return u.toString=()=>m,a.serviceRegistry.set(m,u),u}},2585:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const h=c(8343);var m;a.IBufferService=(0,h.createDecorator)("BufferService"),a.ICoreMouseService=(0,h.createDecorator)("CoreMouseService"),a.ICoreService=(0,h.createDecorator)("CoreService"),a.ICharsetService=(0,h.createDecorator)("CharsetService"),a.IInstantiationService=(0,h.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||(a.LogLevelEnum=m={})),a.ILogService=(0,h.createDecorator)("LogService"),a.IOptionsService=(0,h.createDecorator)("OptionsService"),a.IOscLinkService=(0,h.createDecorator)("OscLinkService"),a.IUnicodeService=(0,h.createDecorator)("UnicodeService"),a.IDecorationService=(0,h.createDecorator)("DecorationService")},1480:(f,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const h=c(8460),m=c(225);class u{static extractShouldJoin(C){return(1&C)!=0}static extractWidth(C){return C>>1&3}static extractCharKind(C){return C>>3}static createPropertyValue(C,E,x=!1){return(16777215&C)<<3|(3&E)<<1|(x?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new h.EventEmitter,this.onChange=this._onChange.event;const C=new m.UnicodeV6;this.register(C),this._active=C.version,this._activeProvider=C}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(C){if(!this._providers[C])throw new Error(`unknown Unicode version "${C}"`);this._active=C,this._activeProvider=this._providers[C],this._onChange.fire(C)}register(C){this._providers[C.version]=C}wcwidth(C){return this._activeProvider.wcwidth(C)}getStringCellWidth(C){let E=0,x=0;const b=C.length;for(let S=0;S<b;++S){let g=C.charCodeAt(S);if(55296<=g&&g<=56319){if(++S>=b)return E+this.wcwidth(g);const M=C.charCodeAt(S);56320<=M&&M<=57343?g=1024*(g-55296)+M-56320+65536:E+=this.wcwidth(M)}const y=this.charProperties(g,x);let A=u.extractWidth(y);u.extractShouldJoin(y)&&(A-=u.extractWidth(x)),E+=A,x=y}return E}charProperties(C,E){return this._activeProvider.charProperties(C,E)}}a.UnicodeService=u}},o={};function d(f){var a=o[f];if(a!==void 0)return a.exports;var c=o[f]={exports:{}};return s[f].call(c.exports,c,c.exports,d),c.exports}var v={};return(()=>{var f=v;Object.defineProperty(f,"__esModule",{value:!0}),f.Terminal=void 0;const a=d(9042),c=d(3236),h=d(844),m=d(5741),u=d(8285),_=d(7975),C=d(7090),E=["cols","rows"];class x extends h.Disposable{constructor(S){super(),this._core=this.register(new c.Terminal(S)),this._addonManager=this.register(new m.AddonManager),this._publicOptions={...this._core.options};const g=A=>this._core.options[A],y=(A,M)=>{this._checkReadonlyOptions(A),this._core.options[A]=M};for(const A in this._core.options){const M={get:g.bind(this,A),set:y.bind(this,A)};Object.defineProperty(this._publicOptions,A,M)}}_checkReadonlyOptions(S){if(E.includes(S))throw new Error(`Option "${S}" 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 _.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new C.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 S=this._core.coreService.decPrivateModes;let g="none";switch(this._core.coreMouseService.activeProtocol){case"X10":g="x10";break;case"VT200":g="vt200";break;case"DRAG":g="drag";break;case"ANY":g="any"}return{applicationCursorKeysMode:S.applicationCursorKeys,applicationKeypadMode:S.applicationKeypad,bracketedPasteMode:S.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:g,originMode:S.origin,reverseWraparoundMode:S.reverseWraparound,sendFocusMode:S.sendFocus,wraparoundMode:S.wraparound}}get options(){return this._publicOptions}set options(S){for(const g in S)this._publicOptions[g]=S[g]}blur(){this._core.blur()}focus(){this._core.focus()}input(S,g=!0){this._core.input(S,g)}resize(S,g){this._verifyIntegers(S,g),this._core.resize(S,g)}open(S){this._core.open(S)}attachCustomKeyEventHandler(S){this._core.attachCustomKeyEventHandler(S)}attachCustomWheelEventHandler(S){this._core.attachCustomWheelEventHandler(S)}registerLinkProvider(S){return this._core.registerLinkProvider(S)}registerCharacterJoiner(S){return this._checkProposedApi(),this._core.registerCharacterJoiner(S)}deregisterCharacterJoiner(S){this._checkProposedApi(),this._core.deregisterCharacterJoiner(S)}registerMarker(S=0){return this._verifyIntegers(S),this._core.registerMarker(S)}registerDecoration(S){return this._checkProposedApi(),this._verifyPositiveIntegers(S.x??0,S.width??0,S.height??0),this._core.registerDecoration(S)}hasSelection(){return this._core.hasSelection()}select(S,g,y){this._verifyIntegers(S,g,y),this._core.select(S,g,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(S,g){this._verifyIntegers(S,g),this._core.selectLines(S,g)}dispose(){super.dispose()}scrollLines(S){this._verifyIntegers(S),this._core.scrollLines(S)}scrollPages(S){this._verifyIntegers(S),this._core.scrollPages(S)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(S){this._verifyIntegers(S),this._core.scrollToLine(S)}clear(){this._core.clear()}write(S,g){this._core.write(S,g)}writeln(S,g){this._core.write(S),this._core.write(`\r
|
|
59
|
+
`,g)}paste(S){this._core.paste(S)}refresh(S,g){this._verifyIntegers(S,g),this._core.refresh(S,g)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(S){this._addonManager.loadAddon(this,S)}static get strings(){return a}_verifyIntegers(...S){for(const g of S)if(g===1/0||isNaN(g)||g%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...S){for(const g of S)if(g&&(g===1/0||isNaN(g)||g%1!=0||g<0))throw new Error("This API only accepts positive integers")}}f.Terminal=x})(),v})()))})(ou)),ou.exports}var C1=b1();class w1{constructor(r,s){Qp(this,"socket");const o=window.location.protocol==="https:"?"wss:":"ws:";this.socket=new WebSocket(`${o}//${window.location.host}/ws/terminal/${encodeURIComponent(r)}`),this.socket.addEventListener("message",d=>{var f,a;const v=JSON.parse(d.data);v.type==="output"?s.onOutput(v.data):v.type==="error"?(f=s.onError)==null||f.call(s,v.message):(a=s.onStatus)==null||a.call(s,v)}),this.socket.addEventListener("error",()=>{var d;(d=s.onError)==null||d.call(s,"Terminal connection failed.")})}sendInput(r){this.send({type:"input",data:r})}resize(r,s){this.send({type:"resize",cols:r,rows:s})}close(){this.socket.close()}send(r){const s=JSON.stringify(r);if(this.socket.readyState===WebSocket.OPEN){this.socket.send(s);return}this.socket.addEventListener("open",()=>this.socket.send(s),{once:!0})}}function Fu({sessionId:n,active:r=!0,onEvent:s}){const o=ae.useRef(null),d=ae.useRef(null),v=ae.useRef(null),f=ae.useRef(null),a=ae.useRef(r),c=ae.useRef(s);function h(m={}){const u=o.current,_=d.current,C=v.current,E=f.current;if(!u||!_||!C||!E)return!1;const x=u.getBoundingClientRect();return x.width<x1||x.height<E1||(C.fit(),E.cols<k1||E.rows<A1)?!1:(_.resize(E.cols,E.rows),m.focus&&E.focus(),!0)}return ae.useEffect(()=>{c.current=s},[s]),ae.useEffect(()=>{a.current=r},[r]),ae.useEffect(()=>{if(!o.current)return;const m=new C1.Terminal({cursorBlink:!0,convertEol:!0,drawBoldTextInBrightColors:!0,fontFamily:"Menlo, Monaco, Consolas, monospace",fontSize:13,fontWeight:"400",fontWeightBold:"700",lineHeight:1.35,macOptionIsMeta:!0,scrollback:1e4,theme:T1}),u=new v1.FitAddon;m.loadAddon(u),m.loadAddon(new S1.WebLinksAddon),m.open(o.current),f.current=m,v.current=u;const _=new w1(n,{onOutput(y){m.write(y)},onStatus(y){var A;(A=c.current)==null||A.call(c,y.type)},onError(y){var A;m.writeln(`\r
|
|
60
|
+
[VCM] ${y}`),(A=c.current)==null||A.call(c,y)}});d.current=_;const C=m.onData(y=>{_.sendInput(y)});let E=0,x=0,b=0;const S=()=>{E&&window.cancelAnimationFrame(E),E=window.requestAnimationFrame(()=>{E=0,h({focus:a.current})})},g=new ResizeObserver(()=>{S()});return g.observe(o.current),x=window.requestAnimationFrame(S),b=window.setTimeout(S,120),()=>{E&&window.cancelAnimationFrame(E),x&&window.cancelAnimationFrame(x),b&&window.clearTimeout(b),g.disconnect(),C.dispose(),_.close(),m.dispose(),d.current=null,f.current=null,v.current=null}},[n]),ae.useEffect(()=>{if(!r)return;const m=[],u=[];return m.push(window.requestAnimationFrame(()=>{h({focus:!0}),m.push(window.requestAnimationFrame(()=>h({focus:!0})))})),u.push(window.setTimeout(()=>h({focus:!0}),160)),u.push(window.setTimeout(()=>h({focus:!0}),360)),()=>{for(const _ of m)window.cancelAnimationFrame(_);for(const _ of u)window.clearTimeout(_)}},[r]),ae.useEffect(()=>{const m=()=>{a.current&&h()};return window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[]),O.jsx("div",{className:"terminal-frame",ref:o,onMouseDown:()=>{var m;return(m=f.current)==null?void 0:m.focus()}})}const x1=160,E1=80,k1=20,A1=5,T1={background:"#0d1117",foreground:"#d6deeb",cursor:"#ffd866",cursorAccent:"#0d1117",selectionBackground:"#264f78",selectionForeground:"#ffffff",black:"#1f2430",red:"#ff5c57",green:"#5af78e",yellow:"#f3f99d",blue:"#57c7ff",magenta:"#ff6ac1",cyan:"#9aedfe",white:"#f1f1f0",brightBlack:"#686868",brightRed:"#ff5c57",brightGreen:"#5af78e",brightYellow:"#f3f99d",brightBlue:"#57c7ff",brightMagenta:"#ff6ac1",brightCyan:"#9aedfe",brightWhite:"#ffffff"};function D1({busy:n,effort:r,model:s,open:o,session:d,onClose:v,onEffortChange:f,onModelChange:a,onResume:c,onRestart:h,onStart:m,onStop:u}){return o?O.jsx("div",{className:"modal-backdrop translator-session-backdrop",children:O.jsxs("section",{className:"translator-session-modal",role:"dialog","aria-modal":"true","aria-label":"Codex Translator Session",children:[O.jsxs("header",{className:"translator-session-header",children:[O.jsxs("div",{children:[O.jsx("h2",{children:"Codex Translator Session"}),O.jsx("p",{children:R1(d)})]}),O.jsx("button",{type:"button",onClick:v,children:"Close"})]}),O.jsx(gg,{role:"codex-translator",session:d??void 0,permissionMode:"default",model:s,effort:r,busy:n,onPermissionModeChange:()=>{},onModelChange:a,onEffortChange:f,onStart:m,onResume:c,onRestart:h,onStop:u}),O.jsx("div",{className:"translator-session-terminal",children:(d==null?void 0:d.status)==="running"?O.jsx(Fu,{sessionId:d.id,active:o},d.id):O.jsxs("div",{className:"terminal-empty",children:[O.jsx("strong",{children:"codex-translator"}),O.jsx("span",{children:d!=null&&d.claudeSessionId?"Resume this project translator session.":"Start the project translator session."})]})})]})}):null}function R1(n){if(!n)return"not started";const r=n.status==="running"?` · ${n.activityStatus??"idle"}`:"";return`${n.status}${r}`}function M1(n,r){const s={};return(n[n.length-1]===""?[...n,""]:n).join((s.padRight?" ":"")+","+(s.padLeft===!1?"":" ")).trim()}const L1=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,O1=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,B1={};function dm(n,r){return(B1.jsx?O1:L1).test(n)}const N1=/[ \t\n\f\r]/g;function j1(n){return typeof n=="object"?n.type==="text"?pm(n.value):!1:pm(n)}function pm(n){return n.replace(N1,"")===""}class cl{constructor(r,s,o){this.normal=s,this.property=r,o&&(this.space=o)}}cl.prototype.normal={};cl.prototype.property={};cl.prototype.space=void 0;function vg(n,r){const s={},o={};for(const d of n)Object.assign(s,d.property),Object.assign(o,d.normal);return new cl(s,o,r)}function ku(n){return n.toLowerCase()}class an{constructor(r,s){this.attribute=s,this.property=r}}an.prototype.attribute="";an.prototype.booleanish=!1;an.prototype.boolean=!1;an.prototype.commaOrSpaceSeparated=!1;an.prototype.commaSeparated=!1;an.prototype.defined=!1;an.prototype.mustUseProperty=!1;an.prototype.number=!1;an.prototype.overloadedBoolean=!1;an.prototype.property="";an.prototype.spaceSeparated=!1;an.prototype.space=void 0;let z1=0;const Ie=ur(),Dt=ur(),Au=ur(),ve=ur(),ut=ur(),Qr=ur(),gn=ur();function ur(){return 2**++z1}const Tu=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ie,booleanish:Dt,commaOrSpaceSeparated:gn,commaSeparated:Qr,number:ve,overloadedBoolean:Au,spaceSeparated:ut},Symbol.toStringTag,{value:"Module"})),cu=Object.keys(Tu);class qu extends an{constructor(r,s,o,d){let v=-1;if(super(r,s),mm(this,"space",d),typeof o=="number")for(;++v<cu.length;){const f=cu[v];mm(this,cu[v],(o&Tu[f])===Tu[f])}}}qu.prototype.defined=!0;function mm(n,r,s){s&&(n[r]=s)}function es(n){const r={},s={};for(const[o,d]of Object.entries(n.properties)){const v=new qu(o,n.transform(n.attributes||{},o),d,n.space);n.mustUseProperty&&n.mustUseProperty.includes(o)&&(v.mustUseProperty=!0),r[o]=v,s[ku(o)]=o,s[ku(v.attribute)]=o}return new cl(r,s,n.space)}const yg=es({properties:{ariaActiveDescendant:null,ariaAtomic:Dt,ariaAutoComplete:null,ariaBusy:Dt,ariaChecked:Dt,ariaColCount:ve,ariaColIndex:ve,ariaColSpan:ve,ariaControls:ut,ariaCurrent:null,ariaDescribedBy:ut,ariaDetails:null,ariaDisabled:Dt,ariaDropEffect:ut,ariaErrorMessage:null,ariaExpanded:Dt,ariaFlowTo:ut,ariaGrabbed:Dt,ariaHasPopup:null,ariaHidden:Dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ut,ariaLevel:ve,ariaLive:null,ariaModal:Dt,ariaMultiLine:Dt,ariaMultiSelectable:Dt,ariaOrientation:null,ariaOwns:ut,ariaPlaceholder:null,ariaPosInSet:ve,ariaPressed:Dt,ariaReadOnly:Dt,ariaRelevant:null,ariaRequired:Dt,ariaRoleDescription:ut,ariaRowCount:ve,ariaRowIndex:ve,ariaRowSpan:ve,ariaSelected:Dt,ariaSetSize:ve,ariaSort:null,ariaValueMax:ve,ariaValueMin:ve,ariaValueNow:ve,ariaValueText:null,role:null},transform(n,r){return r==="role"?r:"aria-"+r.slice(4).toLowerCase()}});function Sg(n,r){return r in n?n[r]:r}function bg(n,r){return Sg(n,r.toLowerCase())}const H1=es({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Qr,acceptCharset:ut,accessKey:ut,action:null,allow:null,allowFullScreen:Ie,allowPaymentRequest:Ie,allowUserMedia:Ie,alt:null,as:null,async:Ie,autoCapitalize:null,autoComplete:ut,autoFocus:Ie,autoPlay:Ie,blocking:ut,capture:null,charSet:null,checked:Ie,cite:null,className:ut,cols:ve,colSpan:null,content:null,contentEditable:Dt,controls:Ie,controlsList:ut,coords:ve|Qr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ie,defer:Ie,dir:null,dirName:null,disabled:Ie,download:Au,draggable:Dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ie,formTarget:null,headers:ut,height:ve,hidden:Au,high:ve,href:null,hrefLang:null,htmlFor:ut,httpEquiv:ut,id:null,imageSizes:null,imageSrcSet:null,inert:Ie,inputMode:null,integrity:null,is:null,isMap:Ie,itemId:null,itemProp:ut,itemRef:ut,itemScope:Ie,itemType:ut,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ie,low:ve,manifest:null,max:null,maxLength:ve,media:null,method:null,min:null,minLength:ve,multiple:Ie,muted:Ie,name:null,nonce:null,noModule:Ie,noValidate:Ie,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ie,optimum:ve,pattern:null,ping:ut,placeholder:null,playsInline:Ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ie,referrerPolicy:null,rel:ut,required:Ie,reversed:Ie,rows:ve,rowSpan:ve,sandbox:ut,scope:null,scoped:Ie,seamless:Ie,selected:Ie,shadowRootClonable:Ie,shadowRootDelegatesFocus:Ie,shadowRootMode:null,shape:null,size:ve,sizes:null,slot:null,span:ve,spellCheck:Dt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ve,step:null,style:null,tabIndex:ve,target:null,title:null,translate:null,type:null,typeMustMatch:Ie,useMap:null,value:Dt,width:ve,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ut,axis:null,background:null,bgColor:null,border:ve,borderColor:null,bottomMargin:ve,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ie,declare:Ie,event:null,face:null,frame:null,frameBorder:null,hSpace:ve,leftMargin:ve,link:null,longDesc:null,lowSrc:null,marginHeight:ve,marginWidth:ve,noResize:Ie,noHref:Ie,noShade:Ie,noWrap:Ie,object:null,profile:null,prompt:null,rev:null,rightMargin:ve,rules:null,scheme:null,scrolling:Dt,standby:null,summary:null,text:null,topMargin:ve,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ve,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ie,disableRemotePlayback:Ie,prefix:null,property:null,results:ve,security:null,unselectable:null},space:"html",transform:bg}),I1=es({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:gn,accentHeight:ve,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ve,amplitude:ve,arabicForm:null,ascent:ve,attributeName:null,attributeType:null,azimuth:ve,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ve,by:null,calcMode:null,capHeight:ve,className:ut,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ve,diffuseConstant:ve,direction:null,display:null,dur:null,divisor:ve,dominantBaseline:null,download:Ie,dx:null,dy:null,edgeMode:null,editable:null,elevation:ve,enableBackground:null,end:null,event:null,exponent:ve,externalResourcesRequired:null,fill:null,fillOpacity:ve,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Qr,g2:Qr,glyphName:Qr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ve,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ve,horizOriginX:ve,horizOriginY:ve,id:null,ideographic:ve,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ve,k:ve,k1:ve,k2:ve,k3:ve,k4:ve,kernelMatrix:gn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ve,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ve,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ve,overlineThickness:ve,paintOrder:null,panose1:null,path:null,pathLength:ve,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ut,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ve,pointsAtY:ve,pointsAtZ:ve,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gn,rev:gn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gn,requiredFeatures:gn,requiredFonts:gn,requiredFormats:gn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ve,specularExponent:ve,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ve,strikethroughThickness:ve,string:null,stroke:null,strokeDashArray:gn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ve,strokeOpacity:ve,strokeWidth:null,style:null,surfaceScale:ve,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gn,tabIndex:ve,tableValues:null,target:null,targetX:ve,targetY:ve,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ve,underlineThickness:ve,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ve,values:null,vAlphabetic:ve,vMathematical:ve,vectorEffect:null,vHanging:ve,vIdeographic:ve,version:null,vertAdvY:ve,vertOriginX:ve,vertOriginY:ve,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ve,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Sg}),Cg=es({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,r){return"xlink:"+r.slice(5).toLowerCase()}}),wg=es({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:bg}),xg=es({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,r){return"xml:"+r.slice(3).toLowerCase()}}),U1={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},P1=/[A-Z]/g,gm=/-[a-z]/g,F1=/^data[-\w.:]+$/i;function q1(n,r){const s=ku(r);let o=r,d=an;if(s in n.normal)return n.property[n.normal[s]];if(s.length>4&&s.slice(0,4)==="data"&&F1.test(r)){if(r.charAt(4)==="-"){const v=r.slice(5).replace(gm,V1);o="data"+v.charAt(0).toUpperCase()+v.slice(1)}else{const v=r.slice(4);if(!gm.test(v)){let f=v.replace(P1,G1);f.charAt(0)!=="-"&&(f="-"+f),r="data"+f}}d=qu}return new d(o,r)}function G1(n){return"-"+n.toLowerCase()}function V1(n){return n.charAt(1).toUpperCase()}const $1=vg([yg,H1,Cg,wg,xg],"html"),Gu=vg([yg,I1,Cg,wg,xg],"svg");function K1(n){return n.join(" ").trim()}var $r={},uu,_m;function Y1(){if(_m)return uu;_m=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,s=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,d=/^:\s*/,v=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,a=/^\s+|\s+$/g,c=`
|
|
61
|
+
`,h="/",m="*",u="",_="comment",C="declaration";function E(b,S){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];S=S||{};var g=1,y=1;function A(K){var W=K.match(r);W&&(g+=W.length);var V=K.lastIndexOf(c);y=~V?K.length-V:y+K.length}function M(){var K={line:g,column:y};return function(W){return W.position=new D(K),R(),W}}function D(K){this.start=K,this.end={line:g,column:y},this.source=S.source}D.prototype.content=b;function T(K){var W=new Error(S.source+":"+g+":"+y+": "+K);if(W.reason=K,W.filename=S.source,W.line=g,W.column=y,W.source=b,!S.silent)throw W}function k(K){var W=K.exec(b);if(W){var V=W[0];return A(V),b=b.slice(V.length),W}}function R(){k(s)}function N(K){var W;for(K=K||[];W=I();)W!==!1&&K.push(W);return K}function I(){var K=M();if(!(h!=b.charAt(0)||m!=b.charAt(1))){for(var W=2;u!=b.charAt(W)&&(m!=b.charAt(W)||h!=b.charAt(W+1));)++W;if(W+=2,u===b.charAt(W-1))return T("End of comment missing");var V=b.slice(2,W-2);return y+=2,A(V),b=b.slice(W),y+=2,K({type:_,comment:V})}}function P(){var K=M(),W=k(o);if(W){if(I(),!k(d))return T("property missing ':'");var V=k(v),$=K({type:C,property:x(W[0].replace(n,u)),value:V?x(V[0].replace(n,u)):u});return k(f),$}}function F(){var K=[];N(K);for(var W;W=P();)W!==!1&&(K.push(W),N(K));return K}return R(),F()}function x(b){return b?b.replace(a,u):u}return uu=E,uu}var vm;function W1(){if(vm)return $r;vm=1;var n=$r&&$r.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty($r,"__esModule",{value:!0}),$r.default=s;const r=n(Y1());function s(o,d){let v=null;if(!o||typeof o!="string")return v;const f=(0,r.default)(o),a=typeof d=="function";return f.forEach(c=>{if(c.type!=="declaration")return;const{property:h,value:m}=c;a?d(h,m,c):m&&(v=v||{},v[h]=m)}),v}return $r}var Zs={},ym;function X1(){if(ym)return Zs;ym=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,s=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,d=/^-(ms)-/,v=function(h){return!h||s.test(h)||n.test(h)},f=function(h,m){return m.toUpperCase()},a=function(h,m){return"".concat(m,"-")},c=function(h,m){return m===void 0&&(m={}),v(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(d,a):h=h.replace(o,a),h.replace(r,f))};return Zs.camelCase=c,Zs}var Js,Sm;function Q1(){if(Sm)return Js;Sm=1;var n=Js&&Js.__importDefault||function(d){return d&&d.__esModule?d:{default:d}},r=n(W1()),s=X1();function o(d,v){var f={};return!d||typeof d!="string"||(0,r.default)(d,function(a,c){a&&c&&(f[(0,s.camelCase)(a,v)]=c)}),f}return o.default=o,Js=o,Js}var Z1=Q1();const J1=ug(Z1),Eg=kg("end"),Vu=kg("start");function kg(n){return r;function r(s){const o=s&&s.position&&s.position[n]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function ey(n){const r=Vu(n),s=Eg(n);if(r&&s)return{start:r,end:s}}function il(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?bm(n.position):"start"in n||"end"in n?bm(n):"line"in n||"column"in n?Du(n):""}function Du(n){return Cm(n&&n.line)+":"+Cm(n&&n.column)}function bm(n){return Du(n&&n.start)+"-"+Du(n&&n.end)}function Cm(n){return n&&typeof n=="number"?n:1}class $t extends Error{constructor(r,s,o){super(),typeof s=="string"&&(o=s,s=void 0);let d="",v={},f=!1;if(s&&("line"in s&&"column"in s?v={place:s}:"start"in s&&"end"in s?v={place:s}:"type"in s?v={ancestors:[s],place:s.position}:v={...s}),typeof r=="string"?d=r:!v.cause&&r&&(f=!0,d=r.message,v.cause=r),!v.ruleId&&!v.source&&typeof o=="string"){const c=o.indexOf(":");c===-1?v.ruleId=o:(v.source=o.slice(0,c),v.ruleId=o.slice(c+1))}if(!v.place&&v.ancestors&&v.ancestors){const c=v.ancestors[v.ancestors.length-1];c&&(v.place=c.position)}const a=v.place&&"start"in v.place?v.place.start:v.place;this.ancestors=v.ancestors||void 0,this.cause=v.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=d,this.line=a?a.line:void 0,this.name=il(v.place)||"1:1",this.place=v.place||void 0,this.reason=this.message,this.ruleId=v.ruleId||void 0,this.source=v.source||void 0,this.stack=f&&v.cause&&typeof v.cause.stack=="string"?v.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}$t.prototype.file="";$t.prototype.name="";$t.prototype.reason="";$t.prototype.message="";$t.prototype.stack="";$t.prototype.column=void 0;$t.prototype.line=void 0;$t.prototype.ancestors=void 0;$t.prototype.cause=void 0;$t.prototype.fatal=void 0;$t.prototype.place=void 0;$t.prototype.ruleId=void 0;$t.prototype.source=void 0;const $u={}.hasOwnProperty,ty=new Map,ny=/[A-Z]/g,iy=new Set(["table","tbody","thead","tfoot","tr"]),ry=new Set(["td","th"]),Ag="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function sy(n,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const s=r.filePath||void 0;let o;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=dy(s,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=fy(s,r.jsx,r.jsxs)}const d={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:o,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:s,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?Gu:$1,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},v=Tg(d,n,void 0);return v&&typeof v!="string"?v:d.create(n,d.Fragment,{children:v||void 0},void 0)}function Tg(n,r,s){if(r.type==="element")return ly(n,r,s);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return ay(n,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return cy(n,r,s);if(r.type==="mdxjsEsm")return oy(n,r);if(r.type==="root")return uy(n,r,s);if(r.type==="text")return hy(n,r)}function ly(n,r,s){const o=n.schema;let d=o;r.tagName.toLowerCase()==="svg"&&o.space==="html"&&(d=Gu,n.schema=d),n.ancestors.push(r);const v=Rg(n,r.tagName,!1),f=py(n,r);let a=Yu(n,r);return iy.has(r.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!j1(c):!0})),Dg(n,f,v,r),Ku(f,a),n.ancestors.pop(),n.schema=o,n.create(r,v,f,s)}function ay(n,r){if(r.data&&r.data.estree&&n.evaluater){const o=r.data.estree.body[0];return o.type,n.evaluater.evaluateExpression(o.expression)}al(n,r.position)}function oy(n,r){if(r.data&&r.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(r.data.estree);al(n,r.position)}function cy(n,r,s){const o=n.schema;let d=o;r.name==="svg"&&o.space==="html"&&(d=Gu,n.schema=d),n.ancestors.push(r);const v=r.name===null?n.Fragment:Rg(n,r.name,!0),f=my(n,r),a=Yu(n,r);return Dg(n,f,v,r),Ku(f,a),n.ancestors.pop(),n.schema=o,n.create(r,v,f,s)}function uy(n,r,s){const o={};return Ku(o,Yu(n,r)),n.create(r,n.Fragment,o,s)}function hy(n,r){return r.value}function Dg(n,r,s,o){typeof s!="string"&&s!==n.Fragment&&n.passNode&&(r.node=o)}function Ku(n,r){if(r.length>0){const s=r.length>1?r:r[0];s&&(n.children=s)}}function fy(n,r,s){return o;function o(d,v,f,a){const h=Array.isArray(f.children)?s:r;return a?h(v,f,a):h(v,f)}}function dy(n,r){return s;function s(o,d,v,f){const a=Array.isArray(v.children),c=Vu(o);return r(d,v,f,a,{columnNumber:c?c.column-1:void 0,fileName:n,lineNumber:c?c.line:void 0},void 0)}}function py(n,r){const s={};let o,d;for(d in r.properties)if(d!=="children"&&$u.call(r.properties,d)){const v=gy(n,d,r.properties[d]);if(v){const[f,a]=v;n.tableCellAlignToStyle&&f==="align"&&typeof a=="string"&&ry.has(r.tagName)?o=a:s[f]=a}}if(o){const v=s.style||(s.style={});v[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return s}function my(n,r){const s={};for(const o of r.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&n.evaluater){const v=o.data.estree.body[0];v.type;const f=v.expression;f.type;const a=f.properties[0];a.type,Object.assign(s,n.evaluater.evaluateExpression(a.argument))}else al(n,r.position);else{const d=o.name;let v;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&n.evaluater){const a=o.value.data.estree.body[0];a.type,v=n.evaluater.evaluateExpression(a.expression)}else al(n,r.position);else v=o.value===null?!0:o.value;s[d]=v}return s}function Yu(n,r){const s=[];let o=-1;const d=n.passKeys?new Map:ty;for(;++o<r.children.length;){const v=r.children[o];let f;if(n.passKeys){const c=v.type==="element"?v.tagName:v.type==="mdxJsxFlowElement"||v.type==="mdxJsxTextElement"?v.name:void 0;if(c){const h=d.get(c)||0;f=c+"-"+h,d.set(c,h+1)}}const a=Tg(n,v,f);a!==void 0&&s.push(a)}return s}function gy(n,r,s){const o=q1(n.schema,r);if(!(s==null||typeof s=="number"&&Number.isNaN(s))){if(Array.isArray(s)&&(s=o.commaSeparated?M1(s):K1(s)),o.property==="style"){let d=typeof s=="object"?s:_y(n,String(s));return n.stylePropertyNameCase==="css"&&(d=vy(d)),["style",d]}return[n.elementAttributeNameCase==="react"&&o.space?U1[o.property]||o.property:o.attribute,s]}}function _y(n,r){try{return J1(r,{reactCompat:!0})}catch(s){if(n.ignoreInvalidStyle)return{};const o=s,d=new $t("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw d.file=n.filePath||void 0,d.url=Ag+"#cannot-parse-style-attribute",d}}function Rg(n,r,s){let o;if(!s)o={type:"Literal",value:r};else if(r.includes(".")){const d=r.split(".");let v=-1,f;for(;++v<d.length;){const a=dm(d[v])?{type:"Identifier",name:d[v]}:{type:"Literal",value:d[v]};f=f?{type:"MemberExpression",object:f,property:a,computed:!!(v&&a.type==="Literal"),optional:!1}:a}o=f}else o=dm(r)&&!/^[a-z]/.test(r)?{type:"Identifier",name:r}:{type:"Literal",value:r};if(o.type==="Literal"){const d=o.value;return $u.call(n.components,d)?n.components[d]:d}if(n.evaluater)return n.evaluater.evaluateExpression(o);al(n)}function al(n,r){const s=new $t("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:r,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw s.file=n.filePath||void 0,s.url=Ag+"#cannot-handle-mdx-estrees-without-createevaluater",s}function vy(n){const r={};let s;for(s in n)$u.call(n,s)&&(r[yy(s)]=n[s]);return r}function yy(n){let r=n.replace(ny,Sy);return r.slice(0,3)==="ms-"&&(r="-"+r),r}function Sy(n){return"-"+n.toLowerCase()}const hu={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},by={};function Wu(n,r){const s=by,o=typeof s.includeImageAlt=="boolean"?s.includeImageAlt:!0,d=typeof s.includeHtml=="boolean"?s.includeHtml:!0;return Mg(n,o,d)}function Mg(n,r,s){if(Cy(n)){if("value"in n)return n.type==="html"&&!s?"":n.value;if(r&&"alt"in n&&n.alt)return n.alt;if("children"in n)return wm(n.children,r,s)}return Array.isArray(n)?wm(n,r,s):""}function wm(n,r,s){const o=[];let d=-1;for(;++d<n.length;)o[d]=Mg(n[d],r,s);return o.join("")}function Cy(n){return!!(n&&typeof n=="object")}const xm=document.createElement("i");function Xu(n){const r="&"+n+";";xm.innerHTML=r;const s=xm.textContent;return s.charCodeAt(s.length-1)===59&&n!=="semi"||s===r?!1:s}function _n(n,r,s,o){const d=n.length;let v=0,f;if(r<0?r=-r>d?0:d+r:r=r>d?d:r,s=s>0?s:0,o.length<1e4)f=Array.from(o),f.unshift(r,s),n.splice(...f);else for(s&&n.splice(r,s);v<o.length;)f=o.slice(v,v+1e4),f.unshift(r,0),n.splice(...f),v+=1e4,r+=1e4}function Tn(n,r){return n.length>0?(_n(n,n.length,0,r),n):r}const Em={}.hasOwnProperty;function Lg(n){const r={};let s=-1;for(;++s<n.length;)wy(r,n[s]);return r}function wy(n,r){let s;for(s in r){const d=(Em.call(n,s)?n[s]:void 0)||(n[s]={}),v=r[s];let f;if(v)for(f in v){Em.call(d,f)||(d[f]=[]);const a=v[f];xy(d[f],Array.isArray(a)?a:a?[a]:[])}}}function xy(n,r){let s=-1;const o=[];for(;++s<r.length;)(r[s].add==="after"?n:o).push(r[s]);_n(n,0,0,o)}function Og(n,r){const s=Number.parseInt(n,r);return s<9||s===11||s>13&&s<32||s>126&&s<160||s>55295&&s<57344||s>64975&&s<65008||(s&65535)===65535||(s&65535)===65534||s>1114111?"�":String.fromCodePoint(s)}function Ln(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Qt=Pi(/[A-Za-z]/),Vt=Pi(/[\dA-Za-z]/),Ey=Pi(/[#-'*+\--9=?A-Z^-~]/);function Na(n){return n!==null&&(n<32||n===127)}const Ru=Pi(/\d/),ky=Pi(/[\dA-Fa-f]/),Ay=Pi(/[!-/:-@[-`{-~]/);function Le(n){return n!==null&&n<-2}function lt(n){return n!==null&&(n<0||n===32)}function qe(n){return n===-2||n===-1||n===32}const Pa=Pi(new RegExp("\\p{P}|\\p{S}","u")),cr=Pi(/\s/);function Pi(n){return r;function r(s){return s!==null&&s>-1&&n.test(String.fromCharCode(s))}}function ts(n){const r=[];let s=-1,o=0,d=0;for(;++s<n.length;){const v=n.charCodeAt(s);let f="";if(v===37&&Vt(n.charCodeAt(s+1))&&Vt(n.charCodeAt(s+2)))d=2;else if(v<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(v))||(f=String.fromCharCode(v));else if(v>55295&&v<57344){const a=n.charCodeAt(s+1);v<56320&&a>56319&&a<57344?(f=String.fromCharCode(v,a),d=1):f="�"}else f=String.fromCharCode(v);f&&(r.push(n.slice(o,s),encodeURIComponent(f)),o=s+d+1,f=""),d&&(s+=d,d=0)}return r.join("")+n.slice(o)}function Ye(n,r,s,o){const d=o?o-1:Number.POSITIVE_INFINITY;let v=0;return f;function f(c){return qe(c)?(n.enter(s),a(c)):r(c)}function a(c){return qe(c)&&v++<d?(n.consume(c),a):(n.exit(s),r(c))}}const Ty={tokenize:Dy};function Dy(n){const r=n.attempt(this.parser.constructs.contentInitial,o,d);let s;return r;function o(a){if(a===null){n.consume(a);return}return n.enter("lineEnding"),n.consume(a),n.exit("lineEnding"),Ye(n,r,"linePrefix")}function d(a){return n.enter("paragraph"),v(a)}function v(a){const c=n.enter("chunkText",{contentType:"text",previous:s});return s&&(s.next=c),s=c,f(a)}function f(a){if(a===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(a);return}return Le(a)?(n.consume(a),n.exit("chunkText"),v):(n.consume(a),f)}}const Ry={tokenize:My},km={tokenize:Ly};function My(n){const r=this,s=[];let o=0,d,v,f;return a;function a(y){if(o<s.length){const A=s[o];return r.containerState=A[1],n.attempt(A[0].continuation,c,h)(y)}return h(y)}function c(y){if(o++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,d&&g();const A=r.events.length;let M=A,D;for(;M--;)if(r.events[M][0]==="exit"&&r.events[M][1].type==="chunkFlow"){D=r.events[M][1].end;break}S(o);let T=A;for(;T<r.events.length;)r.events[T][1].end={...D},T++;return _n(r.events,M+1,0,r.events.slice(A)),r.events.length=T,h(y)}return a(y)}function h(y){if(o===s.length){if(!d)return _(y);if(d.currentConstruct&&d.currentConstruct.concrete)return E(y);r.interrupt=!!(d.currentConstruct&&!d._gfmTableDynamicInterruptHack)}return r.containerState={},n.check(km,m,u)(y)}function m(y){return d&&g(),S(o),_(y)}function u(y){return r.parser.lazy[r.now().line]=o!==s.length,f=r.now().offset,E(y)}function _(y){return r.containerState={},n.attempt(km,C,E)(y)}function C(y){return o++,s.push([r.currentConstruct,r.containerState]),_(y)}function E(y){if(y===null){d&&g(),S(0),n.consume(y);return}return d=d||r.parser.flow(r.now()),n.enter("chunkFlow",{_tokenizer:d,contentType:"flow",previous:v}),x(y)}function x(y){if(y===null){b(n.exit("chunkFlow"),!0),S(0),n.consume(y);return}return Le(y)?(n.consume(y),b(n.exit("chunkFlow")),o=0,r.interrupt=void 0,a):(n.consume(y),x)}function b(y,A){const M=r.sliceStream(y);if(A&&M.push(null),y.previous=v,v&&(v.next=y),v=y,d.defineSkip(y.start),d.write(M),r.parser.lazy[y.start.line]){let D=d.events.length;for(;D--;)if(d.events[D][1].start.offset<f&&(!d.events[D][1].end||d.events[D][1].end.offset>f))return;const T=r.events.length;let k=T,R,N;for(;k--;)if(r.events[k][0]==="exit"&&r.events[k][1].type==="chunkFlow"){if(R){N=r.events[k][1].end;break}R=!0}for(S(o),D=T;D<r.events.length;)r.events[D][1].end={...N},D++;_n(r.events,k+1,0,r.events.slice(T)),r.events.length=D}}function S(y){let A=s.length;for(;A-- >y;){const M=s[A];r.containerState=M[1],M[0].exit.call(r,n)}s.length=y}function g(){d.write([null]),v=void 0,d=void 0,r.containerState._closeFlow=void 0}}function Ly(n,r,s){return Ye(n,n.attempt(this.parser.constructs.document,r,s),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Zr(n){if(n===null||lt(n)||cr(n))return 1;if(Pa(n))return 2}function Fa(n,r,s){const o=[];let d=-1;for(;++d<n.length;){const v=n[d].resolveAll;v&&!o.includes(v)&&(r=v(r,s),o.push(v))}return r}const Mu={name:"attention",resolveAll:Oy,tokenize:By};function Oy(n,r){let s=-1,o,d,v,f,a,c,h,m;for(;++s<n.length;)if(n[s][0]==="enter"&&n[s][1].type==="attentionSequence"&&n[s][1]._close){for(o=s;o--;)if(n[o][0]==="exit"&&n[o][1].type==="attentionSequence"&&n[o][1]._open&&r.sliceSerialize(n[o][1]).charCodeAt(0)===r.sliceSerialize(n[s][1]).charCodeAt(0)){if((n[o][1]._close||n[s][1]._open)&&(n[s][1].end.offset-n[s][1].start.offset)%3&&!((n[o][1].end.offset-n[o][1].start.offset+n[s][1].end.offset-n[s][1].start.offset)%3))continue;c=n[o][1].end.offset-n[o][1].start.offset>1&&n[s][1].end.offset-n[s][1].start.offset>1?2:1;const u={...n[o][1].end},_={...n[s][1].start};Am(u,-c),Am(_,c),f={type:c>1?"strongSequence":"emphasisSequence",start:u,end:{...n[o][1].end}},a={type:c>1?"strongSequence":"emphasisSequence",start:{...n[s][1].start},end:_},v={type:c>1?"strongText":"emphasisText",start:{...n[o][1].end},end:{...n[s][1].start}},d={type:c>1?"strong":"emphasis",start:{...f.start},end:{...a.end}},n[o][1].end={...f.start},n[s][1].start={...a.end},h=[],n[o][1].end.offset-n[o][1].start.offset&&(h=Tn(h,[["enter",n[o][1],r],["exit",n[o][1],r]])),h=Tn(h,[["enter",d,r],["enter",f,r],["exit",f,r],["enter",v,r]]),h=Tn(h,Fa(r.parser.constructs.insideSpan.null,n.slice(o+1,s),r)),h=Tn(h,[["exit",v,r],["enter",a,r],["exit",a,r],["exit",d,r]]),n[s][1].end.offset-n[s][1].start.offset?(m=2,h=Tn(h,[["enter",n[s][1],r],["exit",n[s][1],r]])):m=0,_n(n,o-1,s-o+3,h),s=o+h.length-m-2;break}}for(s=-1;++s<n.length;)n[s][1].type==="attentionSequence"&&(n[s][1].type="data");return n}function By(n,r){const s=this.parser.constructs.attentionMarkers.null,o=this.previous,d=Zr(o);let v;return f;function f(c){return v=c,n.enter("attentionSequence"),a(c)}function a(c){if(c===v)return n.consume(c),a;const h=n.exit("attentionSequence"),m=Zr(c),u=!m||m===2&&d||s.includes(c),_=!d||d===2&&m||s.includes(o);return h._open=!!(v===42?u:u&&(d||!_)),h._close=!!(v===42?_:_&&(m||!u)),r(c)}}function Am(n,r){n.column+=r,n.offset+=r,n._bufferIndex+=r}const Ny={name:"autolink",tokenize:jy};function jy(n,r,s){let o=0;return d;function d(C){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(C),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),v}function v(C){return Qt(C)?(n.consume(C),f):C===64?s(C):h(C)}function f(C){return C===43||C===45||C===46||Vt(C)?(o=1,a(C)):h(C)}function a(C){return C===58?(n.consume(C),o=0,c):(C===43||C===45||C===46||Vt(C))&&o++<32?(n.consume(C),a):(o=0,h(C))}function c(C){return C===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(C),n.exit("autolinkMarker"),n.exit("autolink"),r):C===null||C===32||C===60||Na(C)?s(C):(n.consume(C),c)}function h(C){return C===64?(n.consume(C),m):Ey(C)?(n.consume(C),h):s(C)}function m(C){return Vt(C)?u(C):s(C)}function u(C){return C===46?(n.consume(C),o=0,m):C===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(C),n.exit("autolinkMarker"),n.exit("autolink"),r):_(C)}function _(C){if((C===45||Vt(C))&&o++<63){const E=C===45?_:u;return n.consume(C),E}return s(C)}}const ul={partial:!0,tokenize:zy};function zy(n,r,s){return o;function o(v){return qe(v)?Ye(n,d,"linePrefix")(v):d(v)}function d(v){return v===null||Le(v)?r(v):s(v)}}const Bg={continuation:{tokenize:Iy},exit:Uy,name:"blockQuote",tokenize:Hy};function Hy(n,r,s){const o=this;return d;function d(f){if(f===62){const a=o.containerState;return a.open||(n.enter("blockQuote",{_container:!0}),a.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(f),n.exit("blockQuoteMarker"),v}return s(f)}function v(f){return qe(f)?(n.enter("blockQuotePrefixWhitespace"),n.consume(f),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),r):(n.exit("blockQuotePrefix"),r(f))}}function Iy(n,r,s){const o=this;return d;function d(f){return qe(f)?Ye(n,v,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):v(f)}function v(f){return n.attempt(Bg,r,s)(f)}}function Uy(n){n.exit("blockQuote")}const Ng={name:"characterEscape",tokenize:Py};function Py(n,r,s){return o;function o(v){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(v),n.exit("escapeMarker"),d}function d(v){return Ay(v)?(n.enter("characterEscapeValue"),n.consume(v),n.exit("characterEscapeValue"),n.exit("characterEscape"),r):s(v)}}const jg={name:"characterReference",tokenize:Fy};function Fy(n,r,s){const o=this;let d=0,v,f;return a;function a(u){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(u),n.exit("characterReferenceMarker"),c}function c(u){return u===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(u),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),v=31,f=Vt,m(u))}function h(u){return u===88||u===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(u),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),v=6,f=ky,m):(n.enter("characterReferenceValue"),v=7,f=Ru,m(u))}function m(u){if(u===59&&d){const _=n.exit("characterReferenceValue");return f===Vt&&!Xu(o.sliceSerialize(_))?s(u):(n.enter("characterReferenceMarker"),n.consume(u),n.exit("characterReferenceMarker"),n.exit("characterReference"),r)}return f(u)&&d++<v?(n.consume(u),m):s(u)}}const Tm={partial:!0,tokenize:Gy},Dm={concrete:!0,name:"codeFenced",tokenize:qy};function qy(n,r,s){const o=this,d={partial:!0,tokenize:M};let v=0,f=0,a;return c;function c(D){return h(D)}function h(D){const T=o.events[o.events.length-1];return v=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,a=D,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),m(D)}function m(D){return D===a?(f++,n.consume(D),m):f<3?s(D):(n.exit("codeFencedFenceSequence"),qe(D)?Ye(n,u,"whitespace")(D):u(D))}function u(D){return D===null||Le(D)?(n.exit("codeFencedFence"),o.interrupt?r(D):n.check(Tm,x,A)(D)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),_(D))}function _(D){return D===null||Le(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),u(D)):qe(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),Ye(n,C,"whitespace")(D)):D===96&&D===a?s(D):(n.consume(D),_)}function C(D){return D===null||Le(D)?u(D):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),E(D))}function E(D){return D===null||Le(D)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),u(D)):D===96&&D===a?s(D):(n.consume(D),E)}function x(D){return n.attempt(d,A,b)(D)}function b(D){return n.enter("lineEnding"),n.consume(D),n.exit("lineEnding"),S}function S(D){return v>0&&qe(D)?Ye(n,g,"linePrefix",v+1)(D):g(D)}function g(D){return D===null||Le(D)?n.check(Tm,x,A)(D):(n.enter("codeFlowValue"),y(D))}function y(D){return D===null||Le(D)?(n.exit("codeFlowValue"),g(D)):(n.consume(D),y)}function A(D){return n.exit("codeFenced"),r(D)}function M(D,T,k){let R=0;return N;function N(W){return D.enter("lineEnding"),D.consume(W),D.exit("lineEnding"),I}function I(W){return D.enter("codeFencedFence"),qe(W)?Ye(D,P,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):P(W)}function P(W){return W===a?(D.enter("codeFencedFenceSequence"),F(W)):k(W)}function F(W){return W===a?(R++,D.consume(W),F):R>=f?(D.exit("codeFencedFenceSequence"),qe(W)?Ye(D,K,"whitespace")(W):K(W)):k(W)}function K(W){return W===null||Le(W)?(D.exit("codeFencedFence"),T(W)):k(W)}}}function Gy(n,r,s){const o=this;return d;function d(f){return f===null?s(f):(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),v)}function v(f){return o.parser.lazy[o.now().line]?s(f):r(f)}}const fu={name:"codeIndented",tokenize:$y},Vy={partial:!0,tokenize:Ky};function $y(n,r,s){const o=this;return d;function d(h){return n.enter("codeIndented"),Ye(n,v,"linePrefix",5)(h)}function v(h){const m=o.events[o.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?f(h):s(h)}function f(h){return h===null?c(h):Le(h)?n.attempt(Vy,f,c)(h):(n.enter("codeFlowValue"),a(h))}function a(h){return h===null||Le(h)?(n.exit("codeFlowValue"),f(h)):(n.consume(h),a)}function c(h){return n.exit("codeIndented"),r(h)}}function Ky(n,r,s){const o=this;return d;function d(f){return o.parser.lazy[o.now().line]?s(f):Le(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),d):Ye(n,v,"linePrefix",5)(f)}function v(f){const a=o.events[o.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(f):Le(f)?d(f):s(f)}}const Yy={name:"codeText",previous:Xy,resolve:Wy,tokenize:Qy};function Wy(n){let r=n.length-4,s=3,o,d;if((n[s][1].type==="lineEnding"||n[s][1].type==="space")&&(n[r][1].type==="lineEnding"||n[r][1].type==="space")){for(o=s;++o<r;)if(n[o][1].type==="codeTextData"){n[s][1].type="codeTextPadding",n[r][1].type="codeTextPadding",s+=2,r-=2;break}}for(o=s-1,r++;++o<=r;)d===void 0?o!==r&&n[o][1].type!=="lineEnding"&&(d=o):(o===r||n[o][1].type==="lineEnding")&&(n[d][1].type="codeTextData",o!==d+2&&(n[d][1].end=n[o-1][1].end,n.splice(d+2,o-d-2),r-=o-d-2,o=d+2),d=void 0);return n}function Xy(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Qy(n,r,s){let o=0,d,v;return f;function f(u){return n.enter("codeText"),n.enter("codeTextSequence"),a(u)}function a(u){return u===96?(n.consume(u),o++,a):(n.exit("codeTextSequence"),c(u))}function c(u){return u===null?s(u):u===32?(n.enter("space"),n.consume(u),n.exit("space"),c):u===96?(v=n.enter("codeTextSequence"),d=0,m(u)):Le(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),c):(n.enter("codeTextData"),h(u))}function h(u){return u===null||u===32||u===96||Le(u)?(n.exit("codeTextData"),c(u)):(n.consume(u),h)}function m(u){return u===96?(n.consume(u),d++,m):d===o?(n.exit("codeTextSequence"),n.exit("codeText"),r(u)):(v.type="codeTextData",h(u))}}class Zy{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,s){const o=s??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(r,o):r>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(r,s,o){const d=s||0;this.setCursor(Math.trunc(r));const v=this.right.splice(this.right.length-d,Number.POSITIVE_INFINITY);return o&&el(this.left,o),v.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),el(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),el(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const s=this.left.splice(r,Number.POSITIVE_INFINITY);el(this.right,s.reverse())}else{const s=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);el(this.left,s.reverse())}}}function el(n,r){let s=0;if(r.length<1e4)n.push(...r);else for(;s<r.length;)n.push(...r.slice(s,s+1e4)),s+=1e4}function zg(n){const r={};let s=-1,o,d,v,f,a,c,h;const m=new Zy(n);for(;++s<m.length;){for(;s in r;)s=r[s];if(o=m.get(s),s&&o[1].type==="chunkFlow"&&m.get(s-1)[1].type==="listItemPrefix"&&(c=o[1]._tokenizer.events,v=0,v<c.length&&c[v][1].type==="lineEndingBlank"&&(v+=2),v<c.length&&c[v][1].type==="content"))for(;++v<c.length&&c[v][1].type!=="content";)c[v][1].type==="chunkText"&&(c[v][1]._isInFirstContentOfListItem=!0,v++);if(o[0]==="enter")o[1].contentType&&(Object.assign(r,Jy(m,s)),s=r[s],h=!0);else if(o[1]._container){for(v=s,d=void 0;v--;)if(f=m.get(v),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(d&&(m.get(d)[1].type="lineEndingBlank"),f[1].type="lineEnding",d=v);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;d&&(o[1].end={...m.get(d)[1].start},a=m.slice(d,s),a.unshift(o),m.splice(d,s-d+1,a))}}return _n(n,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function Jy(n,r){const s=n.get(r)[1],o=n.get(r)[2];let d=r-1;const v=[];let f=s._tokenizer;f||(f=o.parser[s.contentType](s.start),s._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const a=f.events,c=[],h={};let m,u,_=-1,C=s,E=0,x=0;const b=[x];for(;C;){for(;n.get(++d)[1]!==C;);v.push(d),C._tokenizer||(m=o.sliceStream(C),C.next||m.push(null),u&&f.defineSkip(C.start),C._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(m),C._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),u=C,C=C.next}for(C=s;++_<a.length;)a[_][0]==="exit"&&a[_-1][0]==="enter"&&a[_][1].type===a[_-1][1].type&&a[_][1].start.line!==a[_][1].end.line&&(x=_+1,b.push(x),C._tokenizer=void 0,C.previous=void 0,C=C.next);for(f.events=[],C?(C._tokenizer=void 0,C.previous=void 0):b.pop(),_=b.length;_--;){const S=a.slice(b[_],b[_+1]),g=v.pop();c.push([g,g+S.length-1]),n.splice(g,2,S)}for(c.reverse(),_=-1;++_<c.length;)h[E+c[_][0]]=E+c[_][1],E+=c[_][1]-c[_][0]-1;return h}const eS={resolve:nS,tokenize:iS},tS={partial:!0,tokenize:rS};function nS(n){return zg(n),n}function iS(n,r){let s;return o;function o(a){return n.enter("content"),s=n.enter("chunkContent",{contentType:"content"}),d(a)}function d(a){return a===null?v(a):Le(a)?n.check(tS,f,v)(a):(n.consume(a),d)}function v(a){return n.exit("chunkContent"),n.exit("content"),r(a)}function f(a){return n.consume(a),n.exit("chunkContent"),s.next=n.enter("chunkContent",{contentType:"content",previous:s}),s=s.next,d}}function rS(n,r,s){const o=this;return d;function d(f){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),Ye(n,v,"linePrefix")}function v(f){if(f===null||Le(f))return s(f);const a=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?r(f):n.interrupt(o.parser.constructs.flow,s,r)(f)}}function Hg(n,r,s,o,d,v,f,a,c){const h=c||Number.POSITIVE_INFINITY;let m=0;return u;function u(S){return S===60?(n.enter(o),n.enter(d),n.enter(v),n.consume(S),n.exit(v),_):S===null||S===32||S===41||Na(S)?s(S):(n.enter(o),n.enter(f),n.enter(a),n.enter("chunkString",{contentType:"string"}),x(S))}function _(S){return S===62?(n.enter(v),n.consume(S),n.exit(v),n.exit(d),n.exit(o),r):(n.enter(a),n.enter("chunkString",{contentType:"string"}),C(S))}function C(S){return S===62?(n.exit("chunkString"),n.exit(a),_(S)):S===null||S===60||Le(S)?s(S):(n.consume(S),S===92?E:C)}function E(S){return S===60||S===62||S===92?(n.consume(S),C):C(S)}function x(S){return!m&&(S===null||S===41||lt(S))?(n.exit("chunkString"),n.exit(a),n.exit(f),n.exit(o),r(S)):m<h&&S===40?(n.consume(S),m++,x):S===41?(n.consume(S),m--,x):S===null||S===32||S===40||Na(S)?s(S):(n.consume(S),S===92?b:x)}function b(S){return S===40||S===41||S===92?(n.consume(S),x):x(S)}}function Ig(n,r,s,o,d,v){const f=this;let a=0,c;return h;function h(C){return n.enter(o),n.enter(d),n.consume(C),n.exit(d),n.enter(v),m}function m(C){return a>999||C===null||C===91||C===93&&!c||C===94&&!a&&"_hiddenFootnoteSupport"in f.parser.constructs?s(C):C===93?(n.exit(v),n.enter(d),n.consume(C),n.exit(d),n.exit(o),r):Le(C)?(n.enter("lineEnding"),n.consume(C),n.exit("lineEnding"),m):(n.enter("chunkString",{contentType:"string"}),u(C))}function u(C){return C===null||C===91||C===93||Le(C)||a++>999?(n.exit("chunkString"),m(C)):(n.consume(C),c||(c=!qe(C)),C===92?_:u)}function _(C){return C===91||C===92||C===93?(n.consume(C),a++,u):u(C)}}function Ug(n,r,s,o,d,v){let f;return a;function a(_){return _===34||_===39||_===40?(n.enter(o),n.enter(d),n.consume(_),n.exit(d),f=_===40?41:_,c):s(_)}function c(_){return _===f?(n.enter(d),n.consume(_),n.exit(d),n.exit(o),r):(n.enter(v),h(_))}function h(_){return _===f?(n.exit(v),c(f)):_===null?s(_):Le(_)?(n.enter("lineEnding"),n.consume(_),n.exit("lineEnding"),Ye(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),m(_))}function m(_){return _===f||_===null||Le(_)?(n.exit("chunkString"),h(_)):(n.consume(_),_===92?u:m)}function u(_){return _===f||_===92?(n.consume(_),m):m(_)}}function rl(n,r){let s;return o;function o(d){return Le(d)?(n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),s=!0,o):qe(d)?Ye(n,o,s?"linePrefix":"lineSuffix")(d):r(d)}}const sS={name:"definition",tokenize:aS},lS={partial:!0,tokenize:oS};function aS(n,r,s){const o=this;let d;return v;function v(C){return n.enter("definition"),f(C)}function f(C){return Ig.call(o,n,a,s,"definitionLabel","definitionLabelMarker","definitionLabelString")(C)}function a(C){return d=Ln(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),C===58?(n.enter("definitionMarker"),n.consume(C),n.exit("definitionMarker"),c):s(C)}function c(C){return lt(C)?rl(n,h)(C):h(C)}function h(C){return Hg(n,m,s,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(C)}function m(C){return n.attempt(lS,u,u)(C)}function u(C){return qe(C)?Ye(n,_,"whitespace")(C):_(C)}function _(C){return C===null||Le(C)?(n.exit("definition"),o.parser.defined.push(d),r(C)):s(C)}}function oS(n,r,s){return o;function o(a){return lt(a)?rl(n,d)(a):s(a)}function d(a){return Ug(n,v,s,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function v(a){return qe(a)?Ye(n,f,"whitespace")(a):f(a)}function f(a){return a===null||Le(a)?r(a):s(a)}}const cS={name:"hardBreakEscape",tokenize:uS};function uS(n,r,s){return o;function o(v){return n.enter("hardBreakEscape"),n.consume(v),d}function d(v){return Le(v)?(n.exit("hardBreakEscape"),r(v)):s(v)}}const hS={name:"headingAtx",resolve:fS,tokenize:dS};function fS(n,r){let s=n.length-2,o=3,d,v;return n[o][1].type==="whitespace"&&(o+=2),s-2>o&&n[s][1].type==="whitespace"&&(s-=2),n[s][1].type==="atxHeadingSequence"&&(o===s-1||s-4>o&&n[s-2][1].type==="whitespace")&&(s-=o+1===s?2:4),s>o&&(d={type:"atxHeadingText",start:n[o][1].start,end:n[s][1].end},v={type:"chunkText",start:n[o][1].start,end:n[s][1].end,contentType:"text"},_n(n,o,s-o+1,[["enter",d,r],["enter",v,r],["exit",v,r],["exit",d,r]])),n}function dS(n,r,s){let o=0;return d;function d(m){return n.enter("atxHeading"),v(m)}function v(m){return n.enter("atxHeadingSequence"),f(m)}function f(m){return m===35&&o++<6?(n.consume(m),f):m===null||lt(m)?(n.exit("atxHeadingSequence"),a(m)):s(m)}function a(m){return m===35?(n.enter("atxHeadingSequence"),c(m)):m===null||Le(m)?(n.exit("atxHeading"),r(m)):qe(m)?Ye(n,a,"whitespace")(m):(n.enter("atxHeadingText"),h(m))}function c(m){return m===35?(n.consume(m),c):(n.exit("atxHeadingSequence"),a(m))}function h(m){return m===null||m===35||lt(m)?(n.exit("atxHeadingText"),a(m)):(n.consume(m),h)}}const pS=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Rm=["pre","script","style","textarea"],mS={concrete:!0,name:"htmlFlow",resolveTo:vS,tokenize:yS},gS={partial:!0,tokenize:bS},_S={partial:!0,tokenize:SS};function vS(n){let r=n.length;for(;r--&&!(n[r][0]==="enter"&&n[r][1].type==="htmlFlow"););return r>1&&n[r-2][1].type==="linePrefix"&&(n[r][1].start=n[r-2][1].start,n[r+1][1].start=n[r-2][1].start,n.splice(r-2,2)),n}function yS(n,r,s){const o=this;let d,v,f,a,c;return h;function h(j){return m(j)}function m(j){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(j),u}function u(j){return j===33?(n.consume(j),_):j===47?(n.consume(j),v=!0,x):j===63?(n.consume(j),d=3,o.interrupt?r:B):Qt(j)?(n.consume(j),f=String.fromCharCode(j),b):s(j)}function _(j){return j===45?(n.consume(j),d=2,C):j===91?(n.consume(j),d=5,a=0,E):Qt(j)?(n.consume(j),d=4,o.interrupt?r:B):s(j)}function C(j){return j===45?(n.consume(j),o.interrupt?r:B):s(j)}function E(j){const te="CDATA[";return j===te.charCodeAt(a++)?(n.consume(j),a===te.length?o.interrupt?r:P:E):s(j)}function x(j){return Qt(j)?(n.consume(j),f=String.fromCharCode(j),b):s(j)}function b(j){if(j===null||j===47||j===62||lt(j)){const te=j===47,he=f.toLowerCase();return!te&&!v&&Rm.includes(he)?(d=1,o.interrupt?r(j):P(j)):pS.includes(f.toLowerCase())?(d=6,te?(n.consume(j),S):o.interrupt?r(j):P(j)):(d=7,o.interrupt&&!o.parser.lazy[o.now().line]?s(j):v?g(j):y(j))}return j===45||Vt(j)?(n.consume(j),f+=String.fromCharCode(j),b):s(j)}function S(j){return j===62?(n.consume(j),o.interrupt?r:P):s(j)}function g(j){return qe(j)?(n.consume(j),g):N(j)}function y(j){return j===47?(n.consume(j),N):j===58||j===95||Qt(j)?(n.consume(j),A):qe(j)?(n.consume(j),y):N(j)}function A(j){return j===45||j===46||j===58||j===95||Vt(j)?(n.consume(j),A):M(j)}function M(j){return j===61?(n.consume(j),D):qe(j)?(n.consume(j),M):y(j)}function D(j){return j===null||j===60||j===61||j===62||j===96?s(j):j===34||j===39?(n.consume(j),c=j,T):qe(j)?(n.consume(j),D):k(j)}function T(j){return j===c?(n.consume(j),c=null,R):j===null||Le(j)?s(j):(n.consume(j),T)}function k(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||lt(j)?M(j):(n.consume(j),k)}function R(j){return j===47||j===62||qe(j)?y(j):s(j)}function N(j){return j===62?(n.consume(j),I):s(j)}function I(j){return j===null||Le(j)?P(j):qe(j)?(n.consume(j),I):s(j)}function P(j){return j===45&&d===2?(n.consume(j),V):j===60&&d===1?(n.consume(j),$):j===62&&d===4?(n.consume(j),z):j===63&&d===3?(n.consume(j),B):j===93&&d===5?(n.consume(j),H):Le(j)&&(d===6||d===7)?(n.exit("htmlFlowData"),n.check(gS,G,F)(j)):j===null||Le(j)?(n.exit("htmlFlowData"),F(j)):(n.consume(j),P)}function F(j){return n.check(_S,K,G)(j)}function K(j){return n.enter("lineEnding"),n.consume(j),n.exit("lineEnding"),W}function W(j){return j===null||Le(j)?F(j):(n.enter("htmlFlowData"),P(j))}function V(j){return j===45?(n.consume(j),B):P(j)}function $(j){return j===47?(n.consume(j),f="",J):P(j)}function J(j){if(j===62){const te=f.toLowerCase();return Rm.includes(te)?(n.consume(j),z):P(j)}return Qt(j)&&f.length<8?(n.consume(j),f+=String.fromCharCode(j),J):P(j)}function H(j){return j===93?(n.consume(j),B):P(j)}function B(j){return j===62?(n.consume(j),z):j===45&&d===2?(n.consume(j),B):P(j)}function z(j){return j===null||Le(j)?(n.exit("htmlFlowData"),G(j)):(n.consume(j),z)}function G(j){return n.exit("htmlFlow"),r(j)}}function SS(n,r,s){const o=this;return d;function d(f){return Le(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),v):s(f)}function v(f){return o.parser.lazy[o.now().line]?s(f):r(f)}}function bS(n,r,s){return o;function o(d){return n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),n.attempt(ul,r,s)}}const CS={name:"htmlText",tokenize:wS};function wS(n,r,s){const o=this;let d,v,f;return a;function a(B){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(B),c}function c(B){return B===33?(n.consume(B),h):B===47?(n.consume(B),M):B===63?(n.consume(B),y):Qt(B)?(n.consume(B),k):s(B)}function h(B){return B===45?(n.consume(B),m):B===91?(n.consume(B),v=0,E):Qt(B)?(n.consume(B),g):s(B)}function m(B){return B===45?(n.consume(B),C):s(B)}function u(B){return B===null?s(B):B===45?(n.consume(B),_):Le(B)?(f=u,$(B)):(n.consume(B),u)}function _(B){return B===45?(n.consume(B),C):u(B)}function C(B){return B===62?V(B):B===45?_(B):u(B)}function E(B){const z="CDATA[";return B===z.charCodeAt(v++)?(n.consume(B),v===z.length?x:E):s(B)}function x(B){return B===null?s(B):B===93?(n.consume(B),b):Le(B)?(f=x,$(B)):(n.consume(B),x)}function b(B){return B===93?(n.consume(B),S):x(B)}function S(B){return B===62?V(B):B===93?(n.consume(B),S):x(B)}function g(B){return B===null||B===62?V(B):Le(B)?(f=g,$(B)):(n.consume(B),g)}function y(B){return B===null?s(B):B===63?(n.consume(B),A):Le(B)?(f=y,$(B)):(n.consume(B),y)}function A(B){return B===62?V(B):y(B)}function M(B){return Qt(B)?(n.consume(B),D):s(B)}function D(B){return B===45||Vt(B)?(n.consume(B),D):T(B)}function T(B){return Le(B)?(f=T,$(B)):qe(B)?(n.consume(B),T):V(B)}function k(B){return B===45||Vt(B)?(n.consume(B),k):B===47||B===62||lt(B)?R(B):s(B)}function R(B){return B===47?(n.consume(B),V):B===58||B===95||Qt(B)?(n.consume(B),N):Le(B)?(f=R,$(B)):qe(B)?(n.consume(B),R):V(B)}function N(B){return B===45||B===46||B===58||B===95||Vt(B)?(n.consume(B),N):I(B)}function I(B){return B===61?(n.consume(B),P):Le(B)?(f=I,$(B)):qe(B)?(n.consume(B),I):R(B)}function P(B){return B===null||B===60||B===61||B===62||B===96?s(B):B===34||B===39?(n.consume(B),d=B,F):Le(B)?(f=P,$(B)):qe(B)?(n.consume(B),P):(n.consume(B),K)}function F(B){return B===d?(n.consume(B),d=void 0,W):B===null?s(B):Le(B)?(f=F,$(B)):(n.consume(B),F)}function K(B){return B===null||B===34||B===39||B===60||B===61||B===96?s(B):B===47||B===62||lt(B)?R(B):(n.consume(B),K)}function W(B){return B===47||B===62||lt(B)?R(B):s(B)}function V(B){return B===62?(n.consume(B),n.exit("htmlTextData"),n.exit("htmlText"),r):s(B)}function $(B){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(B),n.exit("lineEnding"),J}function J(B){return qe(B)?Ye(n,H,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):H(B)}function H(B){return n.enter("htmlTextData"),f(B)}}const Qu={name:"labelEnd",resolveAll:AS,resolveTo:TS,tokenize:DS},xS={tokenize:RS},ES={tokenize:MS},kS={tokenize:LS};function AS(n){let r=-1;const s=[];for(;++r<n.length;){const o=n[r][1];if(s.push(n[r]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const d=o.type==="labelImage"?4:2;o.type="data",r+=d}}return n.length!==s.length&&_n(n,0,n.length,s),n}function TS(n,r){let s=n.length,o=0,d,v,f,a;for(;s--;)if(d=n[s][1],v){if(d.type==="link"||d.type==="labelLink"&&d._inactive)break;n[s][0]==="enter"&&d.type==="labelLink"&&(d._inactive=!0)}else if(f){if(n[s][0]==="enter"&&(d.type==="labelImage"||d.type==="labelLink")&&!d._balanced&&(v=s,d.type!=="labelLink")){o=2;break}}else d.type==="labelEnd"&&(f=s);const c={type:n[v][1].type==="labelLink"?"link":"image",start:{...n[v][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[v][1].start},end:{...n[f][1].end}},m={type:"labelText",start:{...n[v+o+2][1].end},end:{...n[f-2][1].start}};return a=[["enter",c,r],["enter",h,r]],a=Tn(a,n.slice(v+1,v+o+3)),a=Tn(a,[["enter",m,r]]),a=Tn(a,Fa(r.parser.constructs.insideSpan.null,n.slice(v+o+4,f-3),r)),a=Tn(a,[["exit",m,r],n[f-2],n[f-1],["exit",h,r]]),a=Tn(a,n.slice(f+1)),a=Tn(a,[["exit",c,r]]),_n(n,v,n.length,a),n}function DS(n,r,s){const o=this;let d=o.events.length,v,f;for(;d--;)if((o.events[d][1].type==="labelImage"||o.events[d][1].type==="labelLink")&&!o.events[d][1]._balanced){v=o.events[d][1];break}return a;function a(_){return v?v._inactive?u(_):(f=o.parser.defined.includes(Ln(o.sliceSerialize({start:v.end,end:o.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(_),n.exit("labelMarker"),n.exit("labelEnd"),c):s(_)}function c(_){return _===40?n.attempt(xS,m,f?m:u)(_):_===91?n.attempt(ES,m,f?h:u)(_):f?m(_):u(_)}function h(_){return n.attempt(kS,m,u)(_)}function m(_){return r(_)}function u(_){return v._balanced=!0,s(_)}}function RS(n,r,s){return o;function o(u){return n.enter("resource"),n.enter("resourceMarker"),n.consume(u),n.exit("resourceMarker"),d}function d(u){return lt(u)?rl(n,v)(u):v(u)}function v(u){return u===41?m(u):Hg(n,f,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function f(u){return lt(u)?rl(n,c)(u):m(u)}function a(u){return s(u)}function c(u){return u===34||u===39||u===40?Ug(n,h,s,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):m(u)}function h(u){return lt(u)?rl(n,m)(u):m(u)}function m(u){return u===41?(n.enter("resourceMarker"),n.consume(u),n.exit("resourceMarker"),n.exit("resource"),r):s(u)}}function MS(n,r,s){const o=this;return d;function d(a){return Ig.call(o,n,v,f,"reference","referenceMarker","referenceString")(a)}function v(a){return o.parser.defined.includes(Ln(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?r(a):s(a)}function f(a){return s(a)}}function LS(n,r,s){return o;function o(v){return n.enter("reference"),n.enter("referenceMarker"),n.consume(v),n.exit("referenceMarker"),d}function d(v){return v===93?(n.enter("referenceMarker"),n.consume(v),n.exit("referenceMarker"),n.exit("reference"),r):s(v)}}const OS={name:"labelStartImage",resolveAll:Qu.resolveAll,tokenize:BS};function BS(n,r,s){const o=this;return d;function d(a){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(a),n.exit("labelImageMarker"),v}function v(a){return a===91?(n.enter("labelMarker"),n.consume(a),n.exit("labelMarker"),n.exit("labelImage"),f):s(a)}function f(a){return a===94&&"_hiddenFootnoteSupport"in o.parser.constructs?s(a):r(a)}}const NS={name:"labelStartLink",resolveAll:Qu.resolveAll,tokenize:jS};function jS(n,r,s){const o=this;return d;function d(f){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(f),n.exit("labelMarker"),n.exit("labelLink"),v}function v(f){return f===94&&"_hiddenFootnoteSupport"in o.parser.constructs?s(f):r(f)}}const du={name:"lineEnding",tokenize:zS};function zS(n,r){return s;function s(o){return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),Ye(n,r,"linePrefix")}}const Ba={name:"thematicBreak",tokenize:HS};function HS(n,r,s){let o=0,d;return v;function v(h){return n.enter("thematicBreak"),f(h)}function f(h){return d=h,a(h)}function a(h){return h===d?(n.enter("thematicBreakSequence"),c(h)):o>=3&&(h===null||Le(h))?(n.exit("thematicBreak"),r(h)):s(h)}function c(h){return h===d?(n.consume(h),o++,c):(n.exit("thematicBreakSequence"),qe(h)?Ye(n,a,"whitespace")(h):a(h))}}const ln={continuation:{tokenize:FS},exit:GS,name:"list",tokenize:PS},IS={partial:!0,tokenize:VS},US={partial:!0,tokenize:qS};function PS(n,r,s){const o=this,d=o.events[o.events.length-1];let v=d&&d[1].type==="linePrefix"?d[2].sliceSerialize(d[1],!0).length:0,f=0;return a;function a(C){const E=o.containerState.type||(C===42||C===43||C===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!o.containerState.marker||C===o.containerState.marker:Ru(C)){if(o.containerState.type||(o.containerState.type=E,n.enter(E,{_container:!0})),E==="listUnordered")return n.enter("listItemPrefix"),C===42||C===45?n.check(Ba,s,h)(C):h(C);if(!o.interrupt||C===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),c(C)}return s(C)}function c(C){return Ru(C)&&++f<10?(n.consume(C),c):(!o.interrupt||f<2)&&(o.containerState.marker?C===o.containerState.marker:C===41||C===46)?(n.exit("listItemValue"),h(C)):s(C)}function h(C){return n.enter("listItemMarker"),n.consume(C),n.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||C,n.check(ul,o.interrupt?s:m,n.attempt(IS,_,u))}function m(C){return o.containerState.initialBlankLine=!0,v++,_(C)}function u(C){return qe(C)?(n.enter("listItemPrefixWhitespace"),n.consume(C),n.exit("listItemPrefixWhitespace"),_):s(C)}function _(C){return o.containerState.size=v+o.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(C)}}function FS(n,r,s){const o=this;return o.containerState._closeFlow=void 0,n.check(ul,d,v);function d(a){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,Ye(n,r,"listItemIndent",o.containerState.size+1)(a)}function v(a){return o.containerState.furtherBlankLines||!qe(a)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,f(a)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,n.attempt(US,r,f)(a))}function f(a){return o.containerState._closeFlow=!0,o.interrupt=void 0,Ye(n,n.attempt(ln,r,s),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function qS(n,r,s){const o=this;return Ye(n,d,"listItemIndent",o.containerState.size+1);function d(v){const f=o.events[o.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===o.containerState.size?r(v):s(v)}}function GS(n){n.exit(this.containerState.type)}function VS(n,r,s){const o=this;return Ye(n,d,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function d(v){const f=o.events[o.events.length-1];return!qe(v)&&f&&f[1].type==="listItemPrefixWhitespace"?r(v):s(v)}}const Mm={name:"setextUnderline",resolveTo:$S,tokenize:KS};function $S(n,r){let s=n.length,o,d,v;for(;s--;)if(n[s][0]==="enter"){if(n[s][1].type==="content"){o=s;break}n[s][1].type==="paragraph"&&(d=s)}else n[s][1].type==="content"&&n.splice(s,1),!v&&n[s][1].type==="definition"&&(v=s);const f={type:"setextHeading",start:{...n[o][1].start},end:{...n[n.length-1][1].end}};return n[d][1].type="setextHeadingText",v?(n.splice(d,0,["enter",f,r]),n.splice(v+1,0,["exit",n[o][1],r]),n[o][1].end={...n[v][1].end}):n[o][1]=f,n.push(["exit",f,r]),n}function KS(n,r,s){const o=this;let d;return v;function v(h){let m=o.events.length,u;for(;m--;)if(o.events[m][1].type!=="lineEnding"&&o.events[m][1].type!=="linePrefix"&&o.events[m][1].type!=="content"){u=o.events[m][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||u)?(n.enter("setextHeadingLine"),d=h,f(h)):s(h)}function f(h){return n.enter("setextHeadingLineSequence"),a(h)}function a(h){return h===d?(n.consume(h),a):(n.exit("setextHeadingLineSequence"),qe(h)?Ye(n,c,"lineSuffix")(h):c(h))}function c(h){return h===null||Le(h)?(n.exit("setextHeadingLine"),r(h)):s(h)}}const YS={tokenize:WS};function WS(n){const r=this,s=n.attempt(ul,o,n.attempt(this.parser.constructs.flowInitial,d,Ye(n,n.attempt(this.parser.constructs.flow,d,n.attempt(eS,d)),"linePrefix")));return s;function o(v){if(v===null){n.consume(v);return}return n.enter("lineEndingBlank"),n.consume(v),n.exit("lineEndingBlank"),r.currentConstruct=void 0,s}function d(v){if(v===null){n.consume(v);return}return n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),r.currentConstruct=void 0,s}}const XS={resolveAll:Fg()},QS=Pg("string"),ZS=Pg("text");function Pg(n){return{resolveAll:Fg(n==="text"?JS:void 0),tokenize:r};function r(s){const o=this,d=this.parser.constructs[n],v=s.attempt(d,f,a);return f;function f(m){return h(m)?v(m):a(m)}function a(m){if(m===null){s.consume(m);return}return s.enter("data"),s.consume(m),c}function c(m){return h(m)?(s.exit("data"),v(m)):(s.consume(m),c)}function h(m){if(m===null)return!0;const u=d[m];let _=-1;if(u)for(;++_<u.length;){const C=u[_];if(!C.previous||C.previous.call(o,o.previous))return!0}return!1}}}function Fg(n){return r;function r(s,o){let d=-1,v;for(;++d<=s.length;)v===void 0?s[d]&&s[d][1].type==="data"&&(v=d,d++):(!s[d]||s[d][1].type!=="data")&&(d!==v+2&&(s[v][1].end=s[d-1][1].end,s.splice(v+2,d-v-2),d=v+2),v=void 0);return n?n(s,o):s}}function JS(n,r){let s=0;for(;++s<=n.length;)if((s===n.length||n[s][1].type==="lineEnding")&&n[s-1][1].type==="data"){const o=n[s-1][1],d=r.sliceStream(o);let v=d.length,f=-1,a=0,c;for(;v--;){const h=d[v];if(typeof h=="string"){for(f=h.length;h.charCodeAt(f-1)===32;)a++,f--;if(f)break;f=-1}else if(h===-2)c=!0,a++;else if(h!==-1){v++;break}}if(r._contentTypeTextTrailing&&s===n.length&&(a=0),a){const h={type:s===n.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:v?f:o.start._bufferIndex+f,_index:o.start._index+v,line:o.end.line,column:o.end.column-a,offset:o.end.offset-a},end:{...o.end}};o.end={...h.start},o.start.offset===o.end.offset?Object.assign(o,h):(n.splice(s,0,["enter",h,r],["exit",h,r]),s+=2)}s++}return n}const eb={42:ln,43:ln,45:ln,48:ln,49:ln,50:ln,51:ln,52:ln,53:ln,54:ln,55:ln,56:ln,57:ln,62:Bg},tb={91:sS},nb={[-2]:fu,[-1]:fu,32:fu},ib={35:hS,42:Ba,45:[Mm,Ba],60:mS,61:Mm,95:Ba,96:Dm,126:Dm},rb={38:jg,92:Ng},sb={[-5]:du,[-4]:du,[-3]:du,33:OS,38:jg,42:Mu,60:[Ny,CS],91:NS,92:[cS,Ng],93:Qu,95:Mu,96:Yy},lb={null:[Mu,XS]},ab={null:[42,95]},ob={null:[]},cb=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ab,contentInitial:tb,disable:ob,document:eb,flow:ib,flowInitial:nb,insideSpan:lb,string:rb,text:sb},Symbol.toStringTag,{value:"Module"}));function ub(n,r,s){let o={_bufferIndex:-1,_index:0,line:s&&s.line||1,column:s&&s.column||1,offset:s&&s.offset||0};const d={},v=[];let f=[],a=[];const c={attempt:T(M),check:T(D),consume:g,enter:y,exit:A,interrupt:T(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:x,events:[],now:E,parser:n,previous:null,sliceSerialize:_,sliceStream:C,write:u};let m=r.tokenize.call(h,c);return r.resolveAll&&v.push(r),h;function u(I){return f=Tn(f,I),b(),f[f.length-1]!==null?[]:(k(r,0),h.events=Fa(v,h.events,h),h.events)}function _(I,P){return fb(C(I),P)}function C(I){return hb(f,I)}function E(){const{_bufferIndex:I,_index:P,line:F,column:K,offset:W}=o;return{_bufferIndex:I,_index:P,line:F,column:K,offset:W}}function x(I){d[I.line]=I.column,N()}function b(){let I;for(;o._index<f.length;){const P=f[o._index];if(typeof P=="string")for(I=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===I&&o._bufferIndex<P.length;)S(P.charCodeAt(o._bufferIndex));else S(P)}}function S(I){m=m(I)}function g(I){Le(I)?(o.line++,o.column=1,o.offset+=I===-3?2:1,N()):I!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===f[o._index].length&&(o._bufferIndex=-1,o._index++)),h.previous=I}function y(I,P){const F=P||{};return F.type=I,F.start=E(),h.events.push(["enter",F,h]),a.push(F),F}function A(I){const P=a.pop();return P.end=E(),h.events.push(["exit",P,h]),P}function M(I,P){k(I,P.from)}function D(I,P){P.restore()}function T(I,P){return F;function F(K,W,V){let $,J,H,B;return Array.isArray(K)?G(K):"tokenize"in K?G([K]):z(K);function z(me){return Y;function Y(q){const oe=q!==null&&me[q],Z=q!==null&&me.null,ie=[...Array.isArray(oe)?oe:oe?[oe]:[],...Array.isArray(Z)?Z:Z?[Z]:[]];return G(ie)(q)}}function G(me){return $=me,J=0,me.length===0?V:j(me[J])}function j(me){return Y;function Y(q){return B=R(),H=me,me.partial||(h.currentConstruct=me),me.name&&h.parser.constructs.disable.null.includes(me.name)?he():me.tokenize.call(P?Object.assign(Object.create(h),P):h,c,te,he)(q)}}function te(me){return I(H,B),W}function he(me){return B.restore(),++J<$.length?j($[J]):V}}}function k(I,P){I.resolveAll&&!v.includes(I)&&v.push(I),I.resolve&&_n(h.events,P,h.events.length-P,I.resolve(h.events.slice(P),h)),I.resolveTo&&(h.events=I.resolveTo(h.events,h))}function R(){const I=E(),P=h.previous,F=h.currentConstruct,K=h.events.length,W=Array.from(a);return{from:K,restore:V};function V(){o=I,h.previous=P,h.currentConstruct=F,h.events.length=K,a=W,N()}}function N(){o.line in d&&o.column<2&&(o.column=d[o.line],o.offset+=d[o.line]-1)}}function hb(n,r){const s=r.start._index,o=r.start._bufferIndex,d=r.end._index,v=r.end._bufferIndex;let f;if(s===d)f=[n[s].slice(o,v)];else{if(f=n.slice(s,d),o>-1){const a=f[0];typeof a=="string"?f[0]=a.slice(o):f.shift()}v>0&&f.push(n[d].slice(0,v))}return f}function fb(n,r){let s=-1;const o=[];let d;for(;++s<n.length;){const v=n[s];let f;if(typeof v=="string")f=v;else switch(v){case-5:{f="\r";break}case-4:{f=`
|
|
62
62
|
`;break}case-3:{f=`\r
|
|
63
|
-
`;break}case-2:{f=r?" ":" ";break}case-1:{if(!r&&p)continue;f=" ";break}default:f=String.fromCharCode(v)}p=v===-2,o.push(f)}return o.join("")}function db(n){const o={constructs:Lg([cb,...(n||{}).extensions||[]]),content:p(Ty),defined:[],document:p(Ry),flow:p(YS),lazy:{},string:p(QS),text:p(ZS)};return o;function p(v){return f;function f(a){return ub(o,v,a)}}}function pb(n){for(;!zg(n););return n}const Lm=/[\0\t\n\r]/g;function mb(){let n=1,r="",s=!0,o;return p;function p(v,f,a){const c=[];let h,d,u,b,w;for(v=r+(typeof v=="string"?v.toString():new TextDecoder(f||void 0).decode(v)),u=0,r="",s&&(v.charCodeAt(0)===65279&&u++,s=void 0);u<v.length;){if(Lm.lastIndex=u,h=Lm.exec(v),b=h&&h.index!==void 0?h.index:v.length,w=v.charCodeAt(b),!h){r=v.slice(u);break}if(w===10&&u===b&&o)c.push(-3),o=void 0;else switch(o&&(c.push(-5),o=void 0),u<b&&(c.push(v.slice(u,b)),n+=b-u),w){case 0:{c.push(65533),n++;break}case 9:{for(d=Math.ceil(n/4)*4,c.push(-2);n++<d;)c.push(-1);break}case 10:{c.push(-4),n=1;break}default:o=!0,n=1}u=b+1}return a&&(o&&c.push(-5),r&&c.push(r),c.push(null)),c}}const gb=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _b(n){return n.replace(gb,vb)}function vb(n,r,s){if(r)return r;if(s.charCodeAt(0)===35){const p=s.charCodeAt(1),v=p===120||p===88;return Og(s.slice(v?2:1),v?16:10)}return Xu(s)||n}const qg={}.hasOwnProperty;function yb(n,r,s){return r&&typeof r=="object"&&(s=r,r=void 0),Sb(s)(pb(db(s).document().write(mb()(n,r,!0))))}function Sb(n){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:v(Ut),autolinkProtocol:R,autolinkEmail:R,atxHeading:v($e),blockQuote:v(Z),characterEscape:R,characterReference:R,codeFenced:v(ie),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:v(ie,f),codeText:v(de,f),codeTextData:R,data:R,codeFlowValue:R,definition:v(be),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:v(we),hardBreakEscape:v(Je),hardBreakTrailing:v(Je),htmlFlow:v(De,f),htmlFlowData:R,htmlText:v(De,f),htmlTextData:R,image:v(Dt),label:f,link:v(Ut),listItem:v(Pt),listItemValue:b,listOrdered:v(Rt,u),listUnordered:v(Rt),paragraph:v(Yt),reference:j,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:v($e),strong:v(mt),thematicBreak:v(Mt)},exit:{atxHeading:c(),atxHeadingSequence:M,autolink:c(),autolinkEmail:oe,autolinkProtocol:q,blockQuote:c(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:ue,characterReferenceMarkerNumeric:ue,characterReferenceValue:me,characterReference:Y,codeFenced:c(S),codeFencedFence:x,codeFencedFenceInfo:w,codeFencedFenceMeta:E,codeFlowValue:N,codeIndented:c(_),codeText:c(W),codeTextData:N,data:N,definition:c(),definitionDestinationString:A,definitionLabelString:g,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(P),hardBreakTrailing:c(P),htmlFlow:c(F),htmlFlowData:N,htmlText:c(K),htmlTextData:N,image:c($),label:H,labelText:J,lineEnding:I,link:c(G),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:te,resourceDestinationString:B,resourceTitleString:z,resource:V,setextHeading:c(k),setextHeadingLineSequence:T,setextHeadingText:D,strong:c(),thematicBreak:c()}};Vg(r,(n||{}).mdastExtensions||[]);const s={};return o;function o(he){let ye={type:"root",children:[]};const ke={stack:[ye],tokenStack:[],config:r,enter:a,exit:h,buffer:f,resume:d,data:s},Re=[];let Be=-1;for(;++Be<he.length;)if(he[Be][1].type==="listOrdered"||he[Be][1].type==="listUnordered")if(he[Be][0]==="enter")Re.push(Be);else{const pt=Re.pop();Be=p(he,pt,Be)}for(Be=-1;++Be<he.length;){const pt=r[he[Be][0]];qg.call(pt,he[Be][1].type)&&pt[he[Be][1].type].call(Object.assign({sliceSerialize:he[Be][2].sliceSerialize},ke),he[Be][1])}if(ke.tokenStack.length>0){const pt=ke.tokenStack[ke.tokenStack.length-1];(pt[1]||Om).call(ke,void 0,pt[0])}for(ye.position={start:Ni(he.length>0?he[0][1].start:{line:1,column:1,offset:0}),end:Ni(he.length>0?he[he.length-2][1].end:{line:1,column:1,offset:0})},Be=-1;++Be<r.transforms.length;)ye=r.transforms[Be](ye)||ye;return ye}function p(he,ye,ke){let Re=ye-1,Be=-1,pt=!1,Ne,ft,We,lt;for(;++Re<=ke;){const xe=he[Re];switch(xe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{xe[0]==="enter"?Be++:Be--,lt=void 0;break}case"lineEndingBlank":{xe[0]==="enter"&&(Ne&&!lt&&!Be&&!We&&(We=Re),lt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:lt=void 0}if(!Be&&xe[0]==="enter"&&xe[1].type==="listItemPrefix"||Be===-1&&xe[0]==="exit"&&(xe[1].type==="listUnordered"||xe[1].type==="listOrdered")){if(Ne){let At=Re;for(ft=void 0;At--;){const Nt=he[At];if(Nt[1].type==="lineEnding"||Nt[1].type==="lineEndingBlank"){if(Nt[0]==="exit")continue;ft&&(he[ft][1].type="lineEndingBlank",pt=!0),Nt[1].type="lineEnding",ft=At}else if(!(Nt[1].type==="linePrefix"||Nt[1].type==="blockQuotePrefix"||Nt[1].type==="blockQuotePrefixWhitespace"||Nt[1].type==="blockQuoteMarker"||Nt[1].type==="listItemIndent"))break}We&&(!ft||We<ft)&&(Ne._spread=!0),Ne.end=Object.assign({},ft?he[ft][1].start:xe[1].end),he.splice(ft||Re,0,["exit",Ne,xe[2]]),Re++,ke++}if(xe[1].type==="listItemPrefix"){const At={type:"listItem",_spread:!1,start:Object.assign({},xe[1].start),end:void 0};Ne=At,he.splice(Re,0,["enter",At,xe[2]]),Re++,ke++,We=void 0,lt=!0}}}return he[ye][1]._spread=pt,ke}function v(he,ye){return ke;function ke(Re){a.call(this,he(Re),Re),ye&&ye.call(this,Re)}}function f(){this.stack.push({type:"fragment",children:[]})}function a(he,ye,ke){this.stack[this.stack.length-1].children.push(he),this.stack.push(he),this.tokenStack.push([ye,ke||void 0]),he.position={start:Ni(ye.start),end:void 0}}function c(he){return ye;function ye(ke){he&&he.call(this,ke),h.call(this,ke)}}function h(he,ye){const ke=this.stack.pop(),Re=this.tokenStack.pop();if(Re)Re[0].type!==he.type&&(ye?ye.call(this,he,Re[0]):(Re[1]||Om).call(this,he,Re[0]));else throw new Error("Cannot close `"+he.type+"` ("+nl({start:he.start,end:he.end})+"): it’s not open");ke.position.end=Ni(he.end)}function d(){return Wu(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function b(he){if(this.data.expectingFirstListItemValue){const ye=this.stack[this.stack.length-2];ye.start=Number.parseInt(this.sliceSerialize(he),10),this.data.expectingFirstListItemValue=void 0}}function w(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.lang=he}function E(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.meta=he}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.value=he.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.value=he.replace(/(\r?\n|\r)$/g,"")}function g(he){const ye=this.resume(),ke=this.stack[this.stack.length-1];ke.label=ye,ke.identifier=Mn(this.sliceSerialize(he)).toLowerCase()}function y(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.title=he}function A(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.url=he}function M(he){const ye=this.stack[this.stack.length-1];if(!ye.depth){const ke=this.sliceSerialize(he).length;ye.depth=ke}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function T(he){const ye=this.stack[this.stack.length-1];ye.depth=this.sliceSerialize(he).codePointAt(0)===61?1:2}function k(){this.data.setextHeadingSlurpLineEnding=void 0}function R(he){const ke=this.stack[this.stack.length-1].children;let Re=ke[ke.length-1];(!Re||Re.type!=="text")&&(Re=et(),Re.position={start:Ni(he.start),end:void 0},ke.push(Re)),this.stack.push(Re)}function N(he){const ye=this.stack.pop();ye.value+=this.sliceSerialize(he),ye.position.end=Ni(he.end)}function I(he){const ye=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ke=ye.children[ye.children.length-1];ke.position.end=Ni(he.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(ye.type)&&(R.call(this,he),N.call(this,he))}function P(){this.data.atHardBreak=!0}function F(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.value=he}function K(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.value=he}function W(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.value=he}function G(){const he=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";he.type+="Reference",he.referenceType=ye,delete he.url,delete he.title}else delete he.identifier,delete he.label;this.data.referenceType=void 0}function $(){const he=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";he.type+="Reference",he.referenceType=ye,delete he.url,delete he.title}else delete he.identifier,delete he.label;this.data.referenceType=void 0}function J(he){const ye=this.sliceSerialize(he),ke=this.stack[this.stack.length-2];ke.label=_b(ye),ke.identifier=Mn(ye).toLowerCase()}function H(){const he=this.stack[this.stack.length-1],ye=this.resume(),ke=this.stack[this.stack.length-1];if(this.data.inReference=!0,ke.type==="link"){const Re=he.children;ke.children=Re}else ke.alt=ye}function B(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.url=he}function z(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.title=he}function V(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function te(he){const ye=this.resume(),ke=this.stack[this.stack.length-1];ke.label=ye,ke.identifier=Mn(this.sliceSerialize(he)).toLowerCase(),this.data.referenceType="full"}function ue(he){this.data.characterReferenceType=he.type}function me(he){const ye=this.sliceSerialize(he),ke=this.data.characterReferenceType;let Re;ke?(Re=Og(ye,ke==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Re=Xu(ye);const Be=this.stack[this.stack.length-1];Be.value+=Re}function Y(he){const ye=this.stack.pop();ye.position.end=Ni(he.end)}function q(he){N.call(this,he);const ye=this.stack[this.stack.length-1];ye.url=this.sliceSerialize(he)}function oe(he){N.call(this,he);const ye=this.stack[this.stack.length-1];ye.url="mailto:"+this.sliceSerialize(he)}function Z(){return{type:"blockquote",children:[]}}function ie(){return{type:"code",lang:null,meta:null,value:""}}function de(){return{type:"inlineCode",value:""}}function be(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function we(){return{type:"emphasis",children:[]}}function $e(){return{type:"heading",depth:0,children:[]}}function Je(){return{type:"break"}}function De(){return{type:"html",value:""}}function Dt(){return{type:"image",title:null,url:"",alt:null}}function Ut(){return{type:"link",title:null,url:"",children:[]}}function Rt(he){return{type:"list",ordered:he.type==="listOrdered",start:null,spread:he._spread,children:[]}}function Pt(he){return{type:"listItem",spread:he._spread,checked:null,children:[]}}function Yt(){return{type:"paragraph",children:[]}}function mt(){return{type:"strong",children:[]}}function et(){return{type:"text",value:""}}function Mt(){return{type:"thematicBreak"}}}function Ni(n){return{line:n.line,column:n.column,offset:n.offset}}function Vg(n,r){let s=-1;for(;++s<r.length;){const o=r[s];Array.isArray(o)?Vg(n,o):bb(n,o)}}function bb(n,r){let s;for(s in r)if(qg.call(r,s))switch(s){case"canContainEols":{const o=r[s];o&&n[s].push(...o);break}case"transforms":{const o=r[s];o&&n[s].push(...o);break}case"enter":case"exit":{const o=r[s];o&&Object.assign(n[s],o);break}}}function Om(n,r){throw n?new Error("Cannot close `"+n.type+"` ("+nl({start:n.start,end:n.end})+"): a different token (`"+r.type+"`, "+nl({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+nl({start:r.start,end:r.end})+") is still open")}function Cb(n){const r=this;r.parser=s;function s(o){return yb(o,{...r.data("settings"),...n,extensions:r.data("micromarkExtensions")||[],mdastExtensions:r.data("fromMarkdownExtensions")||[]})}}function wb(n,r){const s={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(r),!0)};return n.patch(r,s),n.applyData(r,s)}function xb(n,r){const s={type:"element",tagName:"br",properties:{},children:[]};return n.patch(r,s),[n.applyData(r,s),{type:"text",value:`
|
|
63
|
+
`;break}case-2:{f=r?" ":" ";break}case-1:{if(!r&&d)continue;f=" ";break}default:f=String.fromCharCode(v)}d=v===-2,o.push(f)}return o.join("")}function db(n){const o={constructs:Lg([cb,...(n||{}).extensions||[]]),content:d(Ty),defined:[],document:d(Ry),flow:d(YS),lazy:{},string:d(QS),text:d(ZS)};return o;function d(v){return f;function f(a){return ub(o,v,a)}}}function pb(n){for(;!zg(n););return n}const Lm=/[\0\t\n\r]/g;function mb(){let n=1,r="",s=!0,o;return d;function d(v,f,a){const c=[];let h,m,u,_,C;for(v=r+(typeof v=="string"?v.toString():new TextDecoder(f||void 0).decode(v)),u=0,r="",s&&(v.charCodeAt(0)===65279&&u++,s=void 0);u<v.length;){if(Lm.lastIndex=u,h=Lm.exec(v),_=h&&h.index!==void 0?h.index:v.length,C=v.charCodeAt(_),!h){r=v.slice(u);break}if(C===10&&u===_&&o)c.push(-3),o=void 0;else switch(o&&(c.push(-5),o=void 0),u<_&&(c.push(v.slice(u,_)),n+=_-u),C){case 0:{c.push(65533),n++;break}case 9:{for(m=Math.ceil(n/4)*4,c.push(-2);n++<m;)c.push(-1);break}case 10:{c.push(-4),n=1;break}default:o=!0,n=1}u=_+1}return a&&(o&&c.push(-5),r&&c.push(r),c.push(null)),c}}const gb=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _b(n){return n.replace(gb,vb)}function vb(n,r,s){if(r)return r;if(s.charCodeAt(0)===35){const d=s.charCodeAt(1),v=d===120||d===88;return Og(s.slice(v?2:1),v?16:10)}return Xu(s)||n}const qg={}.hasOwnProperty;function yb(n,r,s){return r&&typeof r=="object"&&(s=r,r=void 0),Sb(s)(pb(db(s).document().write(mb()(n,r,!0))))}function Sb(n){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:v(xt),autolinkProtocol:R,autolinkEmail:R,atxHeading:v($e),blockQuote:v(Z),characterEscape:R,characterReference:R,codeFenced:v(ie),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:v(ie,f),codeText:v(de,f),codeTextData:R,data:R,codeFlowValue:R,definition:v(Ce),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:v(we),hardBreakEscape:v(at),hardBreakTrailing:v(at),htmlFlow:v(Re,f),htmlFlowData:R,htmlText:v(Re,f),htmlTextData:R,image:v(Bt),label:f,link:v(xt),listItem:v(Kt),listItemValue:_,listOrdered:v(Nt,u),listUnordered:v(Nt),paragraph:v(Ft),reference:j,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:v($e),strong:v(pt),thematicBreak:v(jt)},exit:{atxHeading:c(),atxHeadingSequence:M,autolink:c(),autolinkEmail:oe,autolinkProtocol:q,blockQuote:c(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:me,characterReference:Y,codeFenced:c(b),codeFencedFence:x,codeFencedFenceInfo:C,codeFencedFenceMeta:E,codeFlowValue:N,codeIndented:c(S),codeText:c(W),codeTextData:N,data:N,definition:c(),definitionDestinationString:A,definitionLabelString:g,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(P),hardBreakTrailing:c(P),htmlFlow:c(F),htmlFlowData:N,htmlText:c(K),htmlTextData:N,image:c($),label:H,labelText:J,lineEnding:I,link:c(V),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:te,resourceDestinationString:B,resourceTitleString:z,resource:G,setextHeading:c(k),setextHeadingLineSequence:T,setextHeadingText:D,strong:c(),thematicBreak:c()}};Gg(r,(n||{}).mdastExtensions||[]);const s={};return o;function o(ue){let ye={type:"root",children:[]};const ke={stack:[ye],tokenStack:[],config:r,enter:a,exit:h,buffer:f,resume:m,data:s},Me=[];let Be=-1;for(;++Be<ue.length;)if(ue[Be][1].type==="listOrdered"||ue[Be][1].type==="listUnordered")if(ue[Be][0]==="enter")Me.push(Be);else{const ot=Me.pop();Be=d(ue,ot,Be)}for(Be=-1;++Be<ue.length;){const ot=r[ue[Be][0]];qg.call(ot,ue[Be][1].type)&&ot[ue[Be][1].type].call(Object.assign({sliceSerialize:ue[Be][2].sliceSerialize},ke),ue[Be][1])}if(ke.tokenStack.length>0){const ot=ke.tokenStack[ke.tokenStack.length-1];(ot[1]||Om).call(ke,void 0,ot[0])}for(ye.position={start:Hi(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:Hi(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},Be=-1;++Be<r.transforms.length;)ye=r.transforms[Be](ye)||ye;return ye}function d(ue,ye,ke){let Me=ye-1,Be=-1,ot=!1,je,mt,We,Rt;for(;++Me<=ke;){const Ee=ue[Me];switch(Ee[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ee[0]==="enter"?Be++:Be--,Rt=void 0;break}case"lineEndingBlank":{Ee[0]==="enter"&&(je&&!Rt&&!Be&&!We&&(We=Me),Rt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Rt=void 0}if(!Be&&Ee[0]==="enter"&&Ee[1].type==="listItemPrefix"||Be===-1&&Ee[0]==="exit"&&(Ee[1].type==="listUnordered"||Ee[1].type==="listOrdered")){if(je){let yt=Me;for(mt=void 0;yt--;){const Zt=ue[yt];if(Zt[1].type==="lineEnding"||Zt[1].type==="lineEndingBlank"){if(Zt[0]==="exit")continue;mt&&(ue[mt][1].type="lineEndingBlank",ot=!0),Zt[1].type="lineEnding",mt=yt}else if(!(Zt[1].type==="linePrefix"||Zt[1].type==="blockQuotePrefix"||Zt[1].type==="blockQuotePrefixWhitespace"||Zt[1].type==="blockQuoteMarker"||Zt[1].type==="listItemIndent"))break}We&&(!mt||We<mt)&&(je._spread=!0),je.end=Object.assign({},mt?ue[mt][1].start:Ee[1].end),ue.splice(mt||Me,0,["exit",je,Ee[2]]),Me++,ke++}if(Ee[1].type==="listItemPrefix"){const yt={type:"listItem",_spread:!1,start:Object.assign({},Ee[1].start),end:void 0};je=yt,ue.splice(Me,0,["enter",yt,Ee[2]]),Me++,ke++,We=void 0,Rt=!0}}}return ue[ye][1]._spread=ot,ke}function v(ue,ye){return ke;function ke(Me){a.call(this,ue(Me),Me),ye&&ye.call(this,Me)}}function f(){this.stack.push({type:"fragment",children:[]})}function a(ue,ye,ke){this.stack[this.stack.length-1].children.push(ue),this.stack.push(ue),this.tokenStack.push([ye,ke||void 0]),ue.position={start:Hi(ye.start),end:void 0}}function c(ue){return ye;function ye(ke){ue&&ue.call(this,ke),h.call(this,ke)}}function h(ue,ye){const ke=this.stack.pop(),Me=this.tokenStack.pop();if(Me)Me[0].type!==ue.type&&(ye?ye.call(this,ue,Me[0]):(Me[1]||Om).call(this,ue,Me[0]));else throw new Error("Cannot close `"+ue.type+"` ("+il({start:ue.start,end:ue.end})+"): it’s not open");ke.position.end=Hi(ue.end)}function m(){return Wu(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function _(ue){if(this.data.expectingFirstListItemValue){const ye=this.stack[this.stack.length-2];ye.start=Number.parseInt(this.sliceSerialize(ue),10),this.data.expectingFirstListItemValue=void 0}}function C(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.lang=ue}function E(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.meta=ue}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ue.replace(/(\r?\n|\r)$/g,"")}function g(ue){const ye=this.resume(),ke=this.stack[this.stack.length-1];ke.label=ye,ke.identifier=Ln(this.sliceSerialize(ue)).toLowerCase()}function y(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.title=ue}function A(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.url=ue}function M(ue){const ye=this.stack[this.stack.length-1];if(!ye.depth){const ke=this.sliceSerialize(ue).length;ye.depth=ke}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function T(ue){const ye=this.stack[this.stack.length-1];ye.depth=this.sliceSerialize(ue).codePointAt(0)===61?1:2}function k(){this.data.setextHeadingSlurpLineEnding=void 0}function R(ue){const ke=this.stack[this.stack.length-1].children;let Me=ke[ke.length-1];(!Me||Me.type!=="text")&&(Me=tt(),Me.position={start:Hi(ue.start),end:void 0},ke.push(Me)),this.stack.push(Me)}function N(ue){const ye=this.stack.pop();ye.value+=this.sliceSerialize(ue),ye.position.end=Hi(ue.end)}function I(ue){const ye=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ke=ye.children[ye.children.length-1];ke.position.end=Hi(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(ye.type)&&(R.call(this,ue),N.call(this,ue))}function P(){this.data.atHardBreak=!0}function F(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ue}function K(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ue}function W(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.value=ue}function V(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=ye,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function $(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=ye,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function J(ue){const ye=this.sliceSerialize(ue),ke=this.stack[this.stack.length-2];ke.label=_b(ye),ke.identifier=Ln(ye).toLowerCase()}function H(){const ue=this.stack[this.stack.length-1],ye=this.resume(),ke=this.stack[this.stack.length-1];if(this.data.inReference=!0,ke.type==="link"){const Me=ue.children;ke.children=Me}else ke.alt=ye}function B(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.url=ue}function z(){const ue=this.resume(),ye=this.stack[this.stack.length-1];ye.title=ue}function G(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function te(ue){const ye=this.resume(),ke=this.stack[this.stack.length-1];ke.label=ye,ke.identifier=Ln(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function he(ue){this.data.characterReferenceType=ue.type}function me(ue){const ye=this.sliceSerialize(ue),ke=this.data.characterReferenceType;let Me;ke?(Me=Og(ye,ke==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Me=Xu(ye);const Be=this.stack[this.stack.length-1];Be.value+=Me}function Y(ue){const ye=this.stack.pop();ye.position.end=Hi(ue.end)}function q(ue){N.call(this,ue);const ye=this.stack[this.stack.length-1];ye.url=this.sliceSerialize(ue)}function oe(ue){N.call(this,ue);const ye=this.stack[this.stack.length-1];ye.url="mailto:"+this.sliceSerialize(ue)}function Z(){return{type:"blockquote",children:[]}}function ie(){return{type:"code",lang:null,meta:null,value:""}}function de(){return{type:"inlineCode",value:""}}function Ce(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function we(){return{type:"emphasis",children:[]}}function $e(){return{type:"heading",depth:0,children:[]}}function at(){return{type:"break"}}function Re(){return{type:"html",value:""}}function Bt(){return{type:"image",title:null,url:"",alt:null}}function xt(){return{type:"link",title:null,url:"",children:[]}}function Nt(ue){return{type:"list",ordered:ue.type==="listOrdered",start:null,spread:ue._spread,children:[]}}function Kt(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function Ft(){return{type:"paragraph",children:[]}}function pt(){return{type:"strong",children:[]}}function tt(){return{type:"text",value:""}}function jt(){return{type:"thematicBreak"}}}function Hi(n){return{line:n.line,column:n.column,offset:n.offset}}function Gg(n,r){let s=-1;for(;++s<r.length;){const o=r[s];Array.isArray(o)?Gg(n,o):bb(n,o)}}function bb(n,r){let s;for(s in r)if(qg.call(r,s))switch(s){case"canContainEols":{const o=r[s];o&&n[s].push(...o);break}case"transforms":{const o=r[s];o&&n[s].push(...o);break}case"enter":case"exit":{const o=r[s];o&&Object.assign(n[s],o);break}}}function Om(n,r){throw n?new Error("Cannot close `"+n.type+"` ("+il({start:n.start,end:n.end})+"): a different token (`"+r.type+"`, "+il({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+il({start:r.start,end:r.end})+") is still open")}function Cb(n){const r=this;r.parser=s;function s(o){return yb(o,{...r.data("settings"),...n,extensions:r.data("micromarkExtensions")||[],mdastExtensions:r.data("fromMarkdownExtensions")||[]})}}function wb(n,r){const s={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(r),!0)};return n.patch(r,s),n.applyData(r,s)}function xb(n,r){const s={type:"element",tagName:"br",properties:{},children:[]};return n.patch(r,s),[n.applyData(r,s),{type:"text",value:`
|
|
64
64
|
`}]}function Eb(n,r){const s=r.value?r.value+`
|
|
65
|
-
`:"",o={},
|
|
66
|
-
`}),
|
|
67
|
-
`});const h={type:"element",tagName:"li",properties:v,children:f};return n.patch(r,h),n.applyData(r,h)}function zb(n){let r=!1;if(n.type==="list"){r=n.spread||!1;const s=n.children;let o=-1;for(;!r&&++o<s.length;)r=$g(s[o])}return r}function $g(n){const r=n.spread;return r??n.children.length>1}function Hb(n,r){const s={},o=n.all(r);let
|
|
65
|
+
`:"",o={},d=r.lang?r.lang.split(/\s+/):[];d.length>0&&(o.className=["language-"+d[0]]);let v={type:"element",tagName:"code",properties:o,children:[{type:"text",value:s}]};return r.meta&&(v.data={meta:r.meta}),n.patch(r,v),v=n.applyData(r,v),v={type:"element",tagName:"pre",properties:{},children:[v]},n.patch(r,v),v}function kb(n,r){const s={type:"element",tagName:"del",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function Ab(n,r){const s={type:"element",tagName:"em",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function Tb(n,r){const s=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",o=String(r.identifier).toUpperCase(),d=ts(o.toLowerCase()),v=n.footnoteOrder.indexOf(o);let f,a=n.footnoteCounts.get(o);a===void 0?(a=0,n.footnoteOrder.push(o),f=n.footnoteOrder.length):f=v+1,a+=1,n.footnoteCounts.set(o,a);const c={type:"element",tagName:"a",properties:{href:"#"+s+"fn-"+d,id:s+"fnref-"+d+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};n.patch(r,c);const h={type:"element",tagName:"sup",properties:{},children:[c]};return n.patch(r,h),n.applyData(r,h)}function Db(n,r){const s={type:"element",tagName:"h"+r.depth,properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function Rb(n,r){if(n.options.allowDangerousHtml){const s={type:"raw",value:r.value};return n.patch(r,s),n.applyData(r,s)}}function Vg(n,r){const s=r.referenceType;let o="]";if(s==="collapsed"?o+="[]":s==="full"&&(o+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+o}];const d=n.all(r),v=d[0];v&&v.type==="text"?v.value="["+v.value:d.unshift({type:"text",value:"["});const f=d[d.length-1];return f&&f.type==="text"?f.value+=o:d.push({type:"text",value:o}),d}function Mb(n,r){const s=String(r.identifier).toUpperCase(),o=n.definitionById.get(s);if(!o)return Vg(n,r);const d={src:ts(o.url||""),alt:r.alt};o.title!==null&&o.title!==void 0&&(d.title=o.title);const v={type:"element",tagName:"img",properties:d,children:[]};return n.patch(r,v),n.applyData(r,v)}function Lb(n,r){const s={src:ts(r.url)};r.alt!==null&&r.alt!==void 0&&(s.alt=r.alt),r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"img",properties:s,children:[]};return n.patch(r,o),n.applyData(r,o)}function Ob(n,r){const s={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};n.patch(r,s);const o={type:"element",tagName:"code",properties:{},children:[s]};return n.patch(r,o),n.applyData(r,o)}function Bb(n,r){const s=String(r.identifier).toUpperCase(),o=n.definitionById.get(s);if(!o)return Vg(n,r);const d={href:ts(o.url||"")};o.title!==null&&o.title!==void 0&&(d.title=o.title);const v={type:"element",tagName:"a",properties:d,children:n.all(r)};return n.patch(r,v),n.applyData(r,v)}function Nb(n,r){const s={href:ts(r.url)};r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"a",properties:s,children:n.all(r)};return n.patch(r,o),n.applyData(r,o)}function jb(n,r,s){const o=n.all(r),d=s?zb(s):$g(r),v={},f=[];if(typeof r.checked=="boolean"){const m=o[0];let u;m&&m.type==="element"&&m.tagName==="p"?u=m:(u={type:"element",tagName:"p",properties:{},children:[]},o.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),v.className=["task-list-item"]}let a=-1;for(;++a<o.length;){const m=o[a];(d||a!==0||m.type!=="element"||m.tagName!=="p")&&f.push({type:"text",value:`
|
|
66
|
+
`}),m.type==="element"&&m.tagName==="p"&&!d?f.push(...m.children):f.push(m)}const c=o[o.length-1];c&&(d||c.type!=="element"||c.tagName!=="p")&&f.push({type:"text",value:`
|
|
67
|
+
`});const h={type:"element",tagName:"li",properties:v,children:f};return n.patch(r,h),n.applyData(r,h)}function zb(n){let r=!1;if(n.type==="list"){r=n.spread||!1;const s=n.children;let o=-1;for(;!r&&++o<s.length;)r=$g(s[o])}return r}function $g(n){const r=n.spread;return r??n.children.length>1}function Hb(n,r){const s={},o=n.all(r);let d=-1;for(typeof r.start=="number"&&r.start!==1&&(s.start=r.start);++d<o.length;){const f=o[d];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){s.className=["contains-task-list"];break}}const v={type:"element",tagName:r.ordered?"ol":"ul",properties:s,children:n.wrap(o,!0)};return n.patch(r,v),n.applyData(r,v)}function Ib(n,r){const s={type:"element",tagName:"p",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function Ub(n,r){const s={type:"root",children:n.wrap(n.all(r))};return n.patch(r,s),n.applyData(r,s)}function Pb(n,r){const s={type:"element",tagName:"strong",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function Fb(n,r){const s=n.all(r),o=s.shift(),d=[];if(o){const f={type:"element",tagName:"thead",properties:{},children:n.wrap([o],!0)};n.patch(r.children[0],f),d.push(f)}if(s.length>0){const f={type:"element",tagName:"tbody",properties:{},children:n.wrap(s,!0)},a=Vu(r.children[1]),c=Eg(r.children[r.children.length-1]);a&&c&&(f.position={start:a,end:c}),d.push(f)}const v={type:"element",tagName:"table",properties:{},children:n.wrap(d,!0)};return n.patch(r,v),n.applyData(r,v)}function qb(n,r,s){const o=s?s.children:void 0,v=(o?o.indexOf(r):1)===0?"th":"td",f=s&&s.type==="table"?s.align:void 0,a=f?f.length:r.children.length;let c=-1;const h=[];for(;++c<a;){const u=r.children[c],_={},C=f?f[c]:void 0;C&&(_.align=C);let E={type:"element",tagName:v,properties:_,children:[]};u&&(E.children=n.all(u),n.patch(u,E),E=n.applyData(u,E)),h.push(E)}const m={type:"element",tagName:"tr",properties:{},children:n.wrap(h,!0)};return n.patch(r,m),n.applyData(r,m)}function Gb(n,r){const s={type:"element",tagName:"td",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}const Bm=9,Nm=32;function Vb(n){const r=String(n),s=/\r?\n|\r/g;let o=s.exec(r),d=0;const v=[];for(;o;)v.push(jm(r.slice(d,o.index),d>0,!0),o[0]),d=o.index+o[0].length,o=s.exec(r);return v.push(jm(r.slice(d),d>0,!1)),v.join("")}function jm(n,r,s){let o=0,d=n.length;if(r){let v=n.codePointAt(o);for(;v===Bm||v===Nm;)o++,v=n.codePointAt(o)}if(s){let v=n.codePointAt(d-1);for(;v===Bm||v===Nm;)d--,v=n.codePointAt(d-1)}return d>o?n.slice(o,d):""}function $b(n,r){const s={type:"text",value:Vb(String(r.value))};return n.patch(r,s),n.applyData(r,s)}function Kb(n,r){const s={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(r,s),n.applyData(r,s)}const Yb={blockquote:wb,break:xb,code:Eb,delete:kb,emphasis:Ab,footnoteReference:Tb,heading:Db,html:Rb,imageReference:Mb,image:Lb,inlineCode:Ob,linkReference:Bb,link:Nb,listItem:jb,list:Hb,paragraph:Ib,root:Ub,strong:Pb,table:Fb,tableCell:Gb,tableRow:qb,text:$b,thematicBreak:Kb,toml:Ta,yaml:Ta,definition:Ta,footnoteDefinition:Ta};function Ta(){}const Kg=-1,qa=0,sl=1,ja=2,Zu=3,Ju=4,eh=5,th=6,Yg=7,Wg=8,Wb=typeof self=="object"?self:globalThis,zm=(n,r)=>{switch(n){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+n)}return new Wb[n](r)},Xb=(n,r)=>{const s=(d,v)=>(n.set(v,d),d),o=d=>{if(n.has(d))return n.get(d);const[v,f]=r[d];switch(v){case qa:case Kg:return s(f,d);case sl:{const a=s([],d);for(const c of f)a.push(o(c));return a}case ja:{const a=s({},d);for(const[c,h]of f)a[o(c)]=o(h);return a}case Zu:return s(new Date(f),d);case Ju:{const{source:a,flags:c}=f;return s(new RegExp(a,c),d)}case eh:{const a=s(new Map,d);for(const[c,h]of f)a.set(o(c),o(h));return a}case th:{const a=s(new Set,d);for(const c of f)a.add(o(c));return a}case Yg:{const{name:a,message:c}=f;return s(zm(a,c),d)}case Wg:return s(BigInt(f),d);case"BigInt":return s(Object(BigInt(f)),d);case"ArrayBuffer":return s(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:a}=new Uint8Array(f);return s(new DataView(a),f)}}return s(zm(v,f),d)};return o},Hm=n=>Xb(new Map,n)(0),Kr="",{toString:Qb}={},{keys:Zb}=Object,tl=n=>{const r=typeof n;if(r!=="object"||!n)return[qa,r];const s=Qb.call(n).slice(8,-1);switch(s){case"Array":return[sl,Kr];case"Object":return[ja,Kr];case"Date":return[Zu,Kr];case"RegExp":return[Ju,Kr];case"Map":return[eh,Kr];case"Set":return[th,Kr];case"DataView":return[sl,s]}return s.includes("Array")?[sl,s]:s.includes("Error")?[Yg,s]:[ja,s]},Da=([n,r])=>n===qa&&(r==="function"||r==="symbol"),Jb=(n,r,s,o)=>{const d=(f,a)=>{const c=o.push(f)-1;return s.set(a,c),c},v=f=>{if(s.has(f))return s.get(f);let[a,c]=tl(f);switch(a){case qa:{let m=f;switch(c){case"bigint":a=Wg,m=f.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+c);m=null;break;case"undefined":return d([Kg],f)}return d([a,m],f)}case sl:{if(c){let _=f;return c==="DataView"?_=new Uint8Array(f.buffer):c==="ArrayBuffer"&&(_=new Uint8Array(f)),d([c,[..._]],f)}const m=[],u=d([a,m],f);for(const _ of f)m.push(v(_));return u}case ja:{if(c)switch(c){case"BigInt":return d([c,f.toString()],f);case"Boolean":case"Number":case"String":return d([c,f.valueOf()],f)}if(r&&"toJSON"in f)return v(f.toJSON());const m=[],u=d([a,m],f);for(const _ of Zb(f))(n||!Da(tl(f[_])))&&m.push([v(_),v(f[_])]);return u}case Zu:return d([a,f.toISOString()],f);case Ju:{const{source:m,flags:u}=f;return d([a,{source:m,flags:u}],f)}case eh:{const m=[],u=d([a,m],f);for(const[_,C]of f)(n||!(Da(tl(_))||Da(tl(C))))&&m.push([v(_),v(C)]);return u}case th:{const m=[],u=d([a,m],f);for(const _ of f)(n||!Da(tl(_)))&&m.push(v(_));return u}}const{message:h}=f;return d([a,{name:c,message:h}],f)};return v},Im=(n,{json:r,lossy:s}={})=>{const o=[];return Jb(!(r||s),!!r,new Map,o)(n),o},za=typeof structuredClone=="function"?(n,r)=>r&&("json"in r||"lossy"in r)?Hm(Im(n,r)):structuredClone(n):(n,r)=>Hm(Im(n,r));function eC(n,r){const s=[{type:"text",value:"↩"}];return r>1&&s.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),s}function tC(n,r){return"Back to reference "+(n+1)+(r>1?"-"+r:"")}function nC(n){const r=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",s=n.options.footnoteBackContent||eC,o=n.options.footnoteBackLabel||tC,d=n.options.footnoteLabel||"Footnotes",v=n.options.footnoteLabelTagName||"h2",f=n.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let c=-1;for(;++c<n.footnoteOrder.length;){const h=n.footnoteById.get(n.footnoteOrder[c]);if(!h)continue;const m=n.all(h),u=String(h.identifier).toUpperCase(),_=ts(u.toLowerCase());let C=0;const E=[],x=n.footnoteCounts.get(u);for(;x!==void 0&&++C<=x;){E.length>0&&E.push({type:"text",value:" "});let g=typeof s=="string"?s:s(c,C);typeof g=="string"&&(g={type:"text",value:g}),E.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+_+(C>1?"-"+C:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(c,C),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const b=m[m.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const g=b.children[b.children.length-1];g&&g.type==="text"?g.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...E)}else m.push(...E);const S={type:"element",tagName:"li",properties:{id:r+"fn-"+_},children:n.wrap(m,!0)};n.patch(h,S),a.push(S)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:v,properties:{...za(f),id:"footnote-label"},children:[{type:"text",value:d}]},{type:"text",value:`
|
|
68
68
|
`},{type:"element",tagName:"ol",properties:{},children:n.wrap(a,!0)},{type:"text",value:`
|
|
69
|
-
`}]}}const
|
|
69
|
+
`}]}}const Ga=(function(n){if(n==null)return lC;if(typeof n=="function")return Va(n);if(typeof n=="object")return Array.isArray(n)?iC(n):rC(n);if(typeof n=="string")return sC(n);throw new Error("Expected function, string, or object as test")});function iC(n){const r=[];let s=-1;for(;++s<n.length;)r[s]=Ga(n[s]);return Va(o);function o(...d){let v=-1;for(;++v<r.length;)if(r[v].apply(this,d))return!0;return!1}}function rC(n){const r=n;return Va(s);function s(o){const d=o;let v;for(v in n)if(d[v]!==r[v])return!1;return!0}}function sC(n){return Va(r);function r(s){return s&&s.type===n}}function Va(n){return r;function r(s,o,d){return!!(aC(s)&&n.call(this,s,typeof o=="number"?o:void 0,d||void 0))}}function lC(){return!0}function aC(n){return n!==null&&typeof n=="object"&&"type"in n}const Xg=[],oC=!0,Lu=!1,cC="skip";function Qg(n,r,s,o){let d;typeof r=="function"&&typeof s!="function"?(o=s,s=r):d=r;const v=Ga(d),f=o?-1:1;a(n,void 0,[])();function a(c,h,m){const u=c&&typeof c=="object"?c:{};if(typeof u.type=="string"){const C=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(_,"name",{value:"node ("+(c.type+(C?"<"+C+">":""))+")"})}return _;function _(){let C=Xg,E,x,b;if((!r||v(c,h,m[m.length-1]||void 0))&&(C=uC(s(c,m)),C[0]===Lu))return C;if("children"in c&&c.children){const S=c;if(S.children&&C[0]!==cC)for(x=(o?S.children.length:-1)+f,b=m.concat(S);x>-1&&x<S.children.length;){const g=S.children[x];if(E=a(g,x,b)(),E[0]===Lu)return E;x=typeof E[1]=="number"?E[1]:x+f}}return C}}}function uC(n){return Array.isArray(n)?n:typeof n=="number"?[oC,n]:n==null?Xg:[n]}function nh(n,r,s,o){let d,v,f;typeof r=="function"&&typeof s!="function"?(v=void 0,f=r,d=s):(v=r,f=s,d=o),Qg(n,v,a,d);function a(c,h){const m=h[h.length-1],u=m?m.children.indexOf(c):void 0;return f(c,u,m)}}const Ou={}.hasOwnProperty,hC={};function fC(n,r){const s=r||hC,o=new Map,d=new Map,v=new Map,f={...Yb,...s.handlers},a={all:h,applyData:pC,definitionById:o,footnoteById:d,footnoteCounts:v,footnoteOrder:[],handlers:f,one:c,options:s,patch:dC,wrap:gC};return nh(n,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const u=m.type==="definition"?o:d,_=String(m.identifier).toUpperCase();u.has(_)||u.set(_,m)}}),a;function c(m,u){const _=m.type,C=a.handlers[_];if(Ou.call(a.handlers,_)&&C)return C(a,m,u);if(a.options.passThrough&&a.options.passThrough.includes(_)){if("children"in m){const{children:x,...b}=m,S=za(b);return S.children=a.all(m),S}return za(m)}return(a.options.unknownHandler||mC)(a,m,u)}function h(m){const u=[];if("children"in m){const _=m.children;let C=-1;for(;++C<_.length;){const E=a.one(_[C],m);if(E){if(C&&_[C-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=Um(E.value)),!Array.isArray(E)&&E.type==="element")){const x=E.children[0];x&&x.type==="text"&&(x.value=Um(x.value))}Array.isArray(E)?u.push(...E):u.push(E)}}}return u}}function dC(n,r){n.position&&(r.position=ey(n))}function pC(n,r){let s=r;if(n&&n.data){const o=n.data.hName,d=n.data.hChildren,v=n.data.hProperties;if(typeof o=="string")if(s.type==="element")s.tagName=o;else{const f="children"in s?s.children:[s];s={type:"element",tagName:o,properties:{},children:f}}s.type==="element"&&v&&Object.assign(s.properties,za(v)),"children"in s&&s.children&&d!==null&&d!==void 0&&(s.children=d)}return s}function mC(n,r){const s=r.data||{},o="value"in r&&!(Ou.call(s,"hProperties")||Ou.call(s,"hChildren"))?{type:"text",value:r.value}:{type:"element",tagName:"div",properties:{},children:n.all(r)};return n.patch(r,o),n.applyData(r,o)}function gC(n,r){const s=[];let o=-1;for(r&&s.push({type:"text",value:`
|
|
70
70
|
`});++o<n.length;)o&&s.push({type:"text",value:`
|
|
71
71
|
`}),s.push(n[o]);return r&&n.length>0&&s.push({type:"text",value:`
|
|
72
|
-
`}),s}function Um(n){let r=0,s=n.charCodeAt(r);for(;s===9||s===32;)r++,s=n.charCodeAt(r);return n.slice(r)}function Pm(n,r){const s=fC(n,r),o=s.one(n,void 0),
|
|
73
|
-
`},p),v}function _C(n,r){return n&&"run"in n?async function(s,o){const p=Pm(s,{file:o,...r});await n.run(p,o)}:function(s,o){return Pm(s,{file:o,...n||r})}}function Fm(n){if(n)throw n}var pu,qm;function vC(){if(qm)return pu;qm=1;var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,p=function(h){return typeof Array.isArray=="function"?Array.isArray(h):r.call(h)==="[object Array]"},v=function(h){if(!h||r.call(h)!=="[object Object]")return!1;var d=n.call(h,"constructor"),u=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!d&&!u)return!1;var b;for(b in h);return typeof b>"u"||n.call(h,b)},f=function(h,d){s&&d.name==="__proto__"?s(h,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):h[d.name]=d.newValue},a=function(h,d){if(d==="__proto__")if(n.call(h,d)){if(o)return o(h,d).value}else return;return h[d]};return pu=function c(){var h,d,u,b,w,E,x=arguments[0],S=1,_=arguments.length,g=!1;for(typeof x=="boolean"&&(g=x,x=arguments[1]||{},S=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});S<_;++S)if(h=arguments[S],h!=null)for(d in h)u=a(x,d),b=a(h,d),x!==b&&(g&&b&&(v(b)||(w=p(b)))?(w?(w=!1,E=u&&p(u)?u:[]):E=u&&v(u)?u:{},f(x,{name:d,newValue:c(g,E,b)})):typeof b<"u"&&f(x,{name:d,newValue:b}));return x},pu}var yC=vC();const mu=ug(yC);function Bu(n){if(typeof n!="object"||n===null)return!1;const r=Object.getPrototypeOf(n);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function SC(){const n=[],r={run:s,use:o};return r;function s(...p){let v=-1;const f=p.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);a(null,...p);function a(c,...h){const d=n[++v];let u=-1;if(c){f(c);return}for(;++u<p.length;)(h[u]===null||h[u]===void 0)&&(h[u]=p[u]);p=h,d?bC(d,a)(...h):f(null,...h)}}function o(p){if(typeof p!="function")throw new TypeError("Expected `middelware` to be a function, not "+p);return n.push(p),r}}function bC(n,r){let s;return o;function o(...f){const a=n.length>f.length;let c;a&&f.push(p);try{c=n.apply(this,f)}catch(h){const d=h;if(a&&s)throw d;return p(d)}a||(c&&c.then&&typeof c.then=="function"?c.then(v,p):c instanceof Error?p(c):v(c))}function p(f,...a){s||(s=!0,r(f,...a))}function v(f){p(null,f)}}const Hn={basename:CC,dirname:wC,extname:xC,join:EC,sep:"/"};function CC(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');ul(n);let s=0,o=-1,p=n.length,v;if(r===void 0||r.length===0||r.length>n.length){for(;p--;)if(n.codePointAt(p)===47){if(v){s=p+1;break}}else o<0&&(v=!0,o=p+1);return o<0?"":n.slice(s,o)}if(r===n)return"";let f=-1,a=r.length-1;for(;p--;)if(n.codePointAt(p)===47){if(v){s=p+1;break}}else f<0&&(v=!0,f=p+1),a>-1&&(n.codePointAt(p)===r.codePointAt(a--)?a<0&&(o=p):(a=-1,o=f));return s===o?o=f:o<0&&(o=n.length),n.slice(s,o)}function wC(n){if(ul(n),n.length===0)return".";let r=-1,s=n.length,o;for(;--s;)if(n.codePointAt(s)===47){if(o){r=s;break}}else o||(o=!0);return r<0?n.codePointAt(0)===47?"/":".":r===1&&n.codePointAt(0)===47?"//":n.slice(0,r)}function xC(n){ul(n);let r=n.length,s=-1,o=0,p=-1,v=0,f;for(;r--;){const a=n.codePointAt(r);if(a===47){if(f){o=r+1;break}continue}s<0&&(f=!0,s=r+1),a===46?p<0?p=r:v!==1&&(v=1):p>-1&&(v=-1)}return p<0||s<0||v===0||v===1&&p===s-1&&p===o+1?"":n.slice(p,s)}function EC(...n){let r=-1,s;for(;++r<n.length;)ul(n[r]),n[r]&&(s=s===void 0?n[r]:s+"/"+n[r]);return s===void 0?".":kC(s)}function kC(n){ul(n);const r=n.codePointAt(0)===47;let s=AC(n,!r);return s.length===0&&!r&&(s="."),s.length>0&&n.codePointAt(n.length-1)===47&&(s+="/"),r?"/"+s:s}function AC(n,r){let s="",o=0,p=-1,v=0,f=-1,a,c;for(;++f<=n.length;){if(f<n.length)a=n.codePointAt(f);else{if(a===47)break;a=47}if(a===47){if(!(p===f-1||v===1))if(p!==f-1&&v===2){if(s.length<2||o!==2||s.codePointAt(s.length-1)!==46||s.codePointAt(s.length-2)!==46){if(s.length>2){if(c=s.lastIndexOf("/"),c!==s.length-1){c<0?(s="",o=0):(s=s.slice(0,c),o=s.length-1-s.lastIndexOf("/")),p=f,v=0;continue}}else if(s.length>0){s="",o=0,p=f,v=0;continue}}r&&(s=s.length>0?s+"/..":"..",o=2)}else s.length>0?s+="/"+n.slice(p+1,f):s=n.slice(p+1,f),o=f-p-1;p=f,v=0}else a===46&&v>-1?v++:v=-1}return s}function ul(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const TC={cwd:DC};function DC(){return"/"}function Nu(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function RC(n){if(typeof n=="string")n=new URL(n);else if(!Nu(n)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(n.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return MC(n)}function MC(n){if(n.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const r=n.pathname;let s=-1;for(;++s<r.length;)if(r.codePointAt(s)===37&&r.codePointAt(s+1)===50){const o=r.codePointAt(s+2);if(o===70||o===102){const p=new TypeError("File URL path must not include encoded / characters");throw p.code="ERR_INVALID_FILE_URL_PATH",p}}return decodeURIComponent(r)}const gu=["history","path","basename","stem","extname","dirname"];class Zg{constructor(r){let s;r?Nu(r)?s={path:r}:typeof r=="string"||LC(r)?s={value:r}:s=r:s={},this.cwd="cwd"in s?"":TC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<gu.length;){const v=gu[o];v in s&&s[v]!==void 0&&s[v]!==null&&(this[v]=v==="history"?[...s[v]]:s[v])}let p;for(p in s)gu.includes(p)||(this[p]=s[p])}get basename(){return typeof this.path=="string"?Hn.basename(this.path):void 0}set basename(r){vu(r,"basename"),_u(r,"basename"),this.path=Hn.join(this.dirname||"",r)}get dirname(){return typeof this.path=="string"?Hn.dirname(this.path):void 0}set dirname(r){Vm(this.basename,"dirname"),this.path=Hn.join(r||"",this.basename)}get extname(){return typeof this.path=="string"?Hn.extname(this.path):void 0}set extname(r){if(_u(r,"extname"),Vm(this.dirname,"extname"),r){if(r.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(r.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Hn.join(this.dirname,this.stem+(r||""))}get path(){return this.history[this.history.length-1]}set path(r){Nu(r)&&(r=RC(r)),vu(r,"path"),this.path!==r&&this.history.push(r)}get stem(){return typeof this.path=="string"?Hn.basename(this.path,this.extname):void 0}set stem(r){vu(r,"stem"),_u(r,"stem"),this.path=Hn.join(this.dirname||"",r+(this.extname||""))}fail(r,s,o){const p=this.message(r,s,o);throw p.fatal=!0,p}info(r,s,o){const p=this.message(r,s,o);return p.fatal=void 0,p}message(r,s,o){const p=new Kt(r,s,o);return this.path&&(p.name=this.path+":"+p.name,p.file=this.path),p.fatal=!1,this.messages.push(p),p}toString(r){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(r||void 0).decode(this.value)}}function _u(n,r){if(n&&n.includes(Hn.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+Hn.sep+"`")}function vu(n,r){if(!n)throw new Error("`"+r+"` cannot be empty")}function Vm(n,r){if(!n)throw new Error("Setting `"+r+"` requires `path` to be set too")}function LC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const OC=(function(n){const o=this.constructor.prototype,p=o[n],v=function(){return p.apply(v,arguments)};return Object.setPrototypeOf(v,o),v}),BC={}.hasOwnProperty;class ih extends OC{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=SC()}copy(){const r=new ih;let s=-1;for(;++s<this.attachers.length;){const o=this.attachers[s];r.use(...o)}return r.data(mu(!0,{},this.namespace)),r}data(r,s){return typeof r=="string"?arguments.length===2?(bu("data",this.frozen),this.namespace[r]=s,this):BC.call(this.namespace,r)&&this.namespace[r]||void 0:r?(bu("data",this.frozen),this.namespace=r,this):this.namespace}freeze(){if(this.frozen)return this;const r=this;for(;++this.freezeIndex<this.attachers.length;){const[s,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const p=s.call(r,...o);typeof p=="function"&&this.transformers.use(p)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(r){this.freeze();const s=Ra(r),o=this.parser||this.Parser;return yu("parse",o),o(String(s),s)}process(r,s){const o=this;return this.freeze(),yu("process",this.parser||this.Parser),Su("process",this.compiler||this.Compiler),s?p(void 0,s):new Promise(p);function p(v,f){const a=Ra(r),c=o.parse(a);o.run(c,a,function(d,u,b){if(d||!u||!b)return h(d);const w=u,E=o.stringify(w,b);zC(E)?b.value=E:b.result=E,h(d,b)});function h(d,u){d||!u?f(d):v?v(u):s(void 0,u)}}}processSync(r){let s=!1,o;return this.freeze(),yu("processSync",this.parser||this.Parser),Su("processSync",this.compiler||this.Compiler),this.process(r,p),$m("processSync","process",s),o;function p(v,f){s=!0,Fm(v),o=f}}run(r,s,o){Gm(r),this.freeze();const p=this.transformers;return!o&&typeof s=="function"&&(o=s,s=void 0),o?v(void 0,o):new Promise(v);function v(f,a){const c=Ra(s);p.run(r,c,h);function h(d,u,b){const w=u||r;d?a(d):f?f(w):o(void 0,w,b)}}}runSync(r,s){let o=!1,p;return this.run(r,s,v),$m("runSync","run",o),p;function v(f,a){Fm(f),p=a,o=!0}}stringify(r,s){this.freeze();const o=Ra(s),p=this.compiler||this.Compiler;return Su("stringify",p),Gm(r),p(r,o)}use(r,...s){const o=this.attachers,p=this.namespace;if(bu("use",this.frozen),r!=null)if(typeof r=="function")c(r,s);else if(typeof r=="object")Array.isArray(r)?a(r):f(r);else throw new TypeError("Expected usable value, not `"+r+"`");return this;function v(h){if(typeof h=="function")c(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[d,...u]=h;c(d,u)}else f(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function f(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(h.plugins),h.settings&&(p.settings=mu(!0,p.settings,h.settings))}function a(h){let d=-1;if(h!=null)if(Array.isArray(h))for(;++d<h.length;){const u=h[d];v(u)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function c(h,d){let u=-1,b=-1;for(;++u<o.length;)if(o[u][0]===h){b=u;break}if(b===-1)o.push([h,...d]);else if(d.length>0){let[w,...E]=d;const x=o[b][1];Bu(x)&&Bu(w)&&(w=mu(!0,x,w)),o[b]=[h,w,...E]}}}}const NC=new ih().freeze();function yu(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function Su(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function bu(n,r){if(r)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Gm(n){if(!Bu(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function $m(n,r,s){if(!s)throw new Error("`"+n+"` finished async. Use `"+r+"` instead")}function Ra(n){return jC(n)?n:new Zg(n)}function jC(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function zC(n){return typeof n=="string"||HC(n)}function HC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const IC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Km=[],Ym={allowDangerousHtml:!0},UC=/^(https?|ircs?|mailto|xmpp)$/i,PC=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Jg(n){const r=FC(n),s=qC(n);return VC(r.runSync(r.parse(s),s),n)}function FC(n){const r=n.rehypePlugins||Km,s=n.remarkPlugins||Km,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...Ym}:Ym;return NC().use(Cb).use(s).use(_C,o).use(r)}function qC(n){const r=n.children||"",s=new Zg;return typeof r=="string"&&(s.value=r),s}function VC(n,r){const s=r.allowedElements,o=r.allowElement,p=r.components,v=r.disallowedElements,f=r.skipHtml,a=r.unwrapDisallowed,c=r.urlTransform||GC;for(const d of PC)Object.hasOwn(r,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+IC+d.id,void 0);return nh(n,h),sy(n,{Fragment:O.Fragment,components:p,ignoreInvalidStyle:!0,jsx:O.jsx,jsxs:O.jsxs,passKeys:!0,passNode:!0});function h(d,u,b){if(d.type==="raw"&&b&&typeof u=="number")return f?b.children.splice(u,1):b.children[u]={type:"text",value:d.value},u;if(d.type==="element"){let w;for(w in hu)if(Object.hasOwn(hu,w)&&Object.hasOwn(d.properties,w)){const E=d.properties[w],x=hu[w];(x===null||x.includes(d.tagName))&&(d.properties[w]=c(String(E||""),w,d))}}if(d.type==="element"){let w=s?!s.includes(d.tagName):v?v.includes(d.tagName):!1;if(!w&&o&&typeof u=="number"&&(w=!o(d,u,b)),w&&b&&typeof u=="number")return a&&d.children?b.children.splice(u,1,...d.children):b.children.splice(u,1),u}}}function GC(n){const r=n.indexOf(":"),s=n.indexOf("?"),o=n.indexOf("#"),p=n.indexOf("/");return r===-1||p!==-1&&r>p||s!==-1&&r>s||o!==-1&&r>o||UC.test(n.slice(0,r))?n:""}function Wm(n,r){const s=String(n);if(typeof r!="string")throw new TypeError("Expected character");let o=0,p=s.indexOf(r);for(;p!==-1;)o++,p=s.indexOf(r,p+r.length);return o}function $C(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function KC(n,r,s){const p=Va((s||{}).ignore||[]),v=YC(r);let f=-1;for(;++f<v.length;)Qg(n,"text",a);function a(h,d){let u=-1,b;for(;++u<d.length;){const w=d[u],E=b?b.children:void 0;if(p(w,E?E.indexOf(w):void 0,b))return;b=w}if(b)return c(h,d)}function c(h,d){const u=d[d.length-1],b=v[f][0],w=v[f][1];let E=0;const S=u.children.indexOf(h);let _=!1,g=[];b.lastIndex=0;let y=b.exec(h.value);for(;y;){const A=y.index,M={index:y.index,input:y.input,stack:[...d,h]};let D=w(...y,M);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?b.lastIndex=A+1:(E!==A&&g.push({type:"text",value:h.value.slice(E,A)}),Array.isArray(D)?g.push(...D):D&&g.push(D),E=A+y[0].length,_=!0),!b.global)break;y=b.exec(h.value)}return _?(E<h.value.length&&g.push({type:"text",value:h.value.slice(E)}),u.children.splice(S,1,...g)):g=[h],S+g.length}}function YC(n){const r=[];if(!Array.isArray(n))throw new TypeError("Expected find and replace tuple or list of tuples");const s=!n[0]||Array.isArray(n[0])?n:[n];let o=-1;for(;++o<s.length;){const p=s[o];r.push([WC(p[0]),XC(p[1])])}return r}function WC(n){return typeof n=="string"?new RegExp($C(n),"g"):n}function XC(n){return typeof n=="function"?n:function(){return n}}const Cu="phrasing",wu=["autolink","link","image","label"];function QC(){return{transforms:[rw],enter:{literalAutolink:JC,literalAutolinkEmail:xu,literalAutolinkHttp:xu,literalAutolinkWww:xu},exit:{literalAutolink:iw,literalAutolinkEmail:nw,literalAutolinkHttp:ew,literalAutolinkWww:tw}}}function ZC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Cu,notInConstruct:wu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Cu,notInConstruct:wu},{character:":",before:"[ps]",after:"\\/",inConstruct:Cu,notInConstruct:wu}]}}function JC(n){this.enter({type:"link",title:null,url:"",children:[]},n)}function xu(n){this.config.enter.autolinkProtocol.call(this,n)}function ew(n){this.config.exit.autolinkProtocol.call(this,n)}function tw(n){this.config.exit.data.call(this,n);const r=this.stack[this.stack.length-1];r.type,r.url="http://"+this.sliceSerialize(n)}function nw(n){this.config.exit.autolinkEmail.call(this,n)}function iw(n){this.exit(n)}function rw(n){KC(n,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,sw],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),lw]],{ignore:["link","linkReference"]})}function sw(n,r,s,o,p){let v="";if(!e_(p)||(/^w/i.test(r)&&(s=r+s,r="",v="http://"),!aw(s)))return!1;const f=ow(s+o);if(!f[0])return!1;const a={type:"link",title:null,url:v+r+f[0],children:[{type:"text",value:r+f[0]}]};return f[1]?[a,{type:"text",value:f[1]}]:a}function lw(n,r,s,o){return!e_(o,!0)||/[-\d_]$/.test(s)?!1:{type:"link",title:null,url:"mailto:"+r+"@"+s,children:[{type:"text",value:r+"@"+s}]}}function aw(n){const r=n.split(".");return!(r.length<2||r[r.length-1]&&(/_/.test(r[r.length-1])||!/[a-zA-Z\d]/.test(r[r.length-1]))||r[r.length-2]&&(/_/.test(r[r.length-2])||!/[a-zA-Z\d]/.test(r[r.length-2])))}function ow(n){const r=/[!"&'),.:;<>?\]}]+$/.exec(n);if(!r)return[n,void 0];n=n.slice(0,r.index);let s=r[0],o=s.indexOf(")");const p=Wm(n,"(");let v=Wm(n,")");for(;o!==-1&&p>v;)n+=s.slice(0,o+1),s=s.slice(o+1),o=s.indexOf(")"),v++;return[n,s]}function e_(n,r){const s=n.input.charCodeAt(n.index-1);return(n.index===0||or(s)||Pa(s))&&(!r||s!==47)}t_.peek=_w;function cw(){this.buffer()}function uw(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function hw(){this.buffer()}function fw(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function dw(n){const r=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=Mn(this.sliceSerialize(n)).toLowerCase(),s.label=r}function pw(n){this.exit(n)}function mw(n){const r=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=Mn(this.sliceSerialize(n)).toLowerCase(),s.label=r}function gw(n){this.exit(n)}function _w(){return"["}function t_(n,r,s,o){const p=s.createTracker(o);let v=p.move("[^");const f=s.enter("footnoteReference"),a=s.enter("reference");return v+=p.move(s.safe(s.associationId(n),{after:"]",before:v})),a(),f(),v+=p.move("]"),v}function vw(){return{enter:{gfmFootnoteCallString:cw,gfmFootnoteCall:uw,gfmFootnoteDefinitionLabelString:hw,gfmFootnoteDefinition:fw},exit:{gfmFootnoteCallString:dw,gfmFootnoteCall:pw,gfmFootnoteDefinitionLabelString:mw,gfmFootnoteDefinition:gw}}}function yw(n){let r=!1;return n&&n.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:s,footnoteReference:t_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function s(o,p,v,f){const a=v.createTracker(f);let c=a.move("[^");const h=v.enter("footnoteDefinition"),d=v.enter("label");return c+=a.move(v.safe(v.associationId(o),{before:c,after:"]"})),d(),c+=a.move("]:"),o.children&&o.children.length>0&&(a.shift(4),c+=a.move((r?`
|
|
74
|
-
`:" ")+v.indentLines(v.containerFlow(o,a.current()),r?n_:Sw))),h(),c}}function Sw(n,r,s){return r===0?n:n_(n,r,s)}function n_(n,r,s){return(s?"":" ")+n}const bw=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];i_.peek=kw;function Cw(){return{canContainEols:["delete"],enter:{strikethrough:xw},exit:{strikethrough:Ew}}}function ww(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:bw}],handlers:{delete:i_}}}function xw(n){this.enter({type:"delete",children:[]},n)}function Ew(n){this.exit(n)}function i_(n,r,s,o){const
|
|
75
|
-
`)}function Dw(n){return n==null?"":String(n)}function Xm(n){const r=typeof n=="string"?n.codePointAt(0):0;return r===67||r===99?99:r===76||r===108?108:r===82||r===114?114:0}function Rw(n,r,s,o){const
|
|
76
|
-
`&&Lw(s.stack,s.unsafe[
|
|
77
|
-
`}function Ow(n,r){const s=String(n);let o=s.indexOf(r),
|
|
78
|
-
`,encode:["`"],...a.current()})),u()}return
|
|
79
|
-
`),v&&(
|
|
80
|
-
`)),
|
|
81
|
-
`,...c.current()}))),a(),n.title&&(a=s.enter(`title${v}`),h+=c.move(" "+
|
|
72
|
+
`}),s}function Um(n){let r=0,s=n.charCodeAt(r);for(;s===9||s===32;)r++,s=n.charCodeAt(r);return n.slice(r)}function Pm(n,r){const s=fC(n,r),o=s.one(n,void 0),d=nC(s),v=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return d&&v.children.push({type:"text",value:`
|
|
73
|
+
`},d),v}function _C(n,r){return n&&"run"in n?async function(s,o){const d=Pm(s,{file:o,...r});await n.run(d,o)}:function(s,o){return Pm(s,{file:o,...n||r})}}function Fm(n){if(n)throw n}var pu,qm;function vC(){if(qm)return pu;qm=1;var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,d=function(h){return typeof Array.isArray=="function"?Array.isArray(h):r.call(h)==="[object Array]"},v=function(h){if(!h||r.call(h)!=="[object Object]")return!1;var m=n.call(h,"constructor"),u=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!u)return!1;var _;for(_ in h);return typeof _>"u"||n.call(h,_)},f=function(h,m){s&&m.name==="__proto__"?s(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},a=function(h,m){if(m==="__proto__")if(n.call(h,m)){if(o)return o(h,m).value}else return;return h[m]};return pu=function c(){var h,m,u,_,C,E,x=arguments[0],b=1,S=arguments.length,g=!1;for(typeof x=="boolean"&&(g=x,x=arguments[1]||{},b=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});b<S;++b)if(h=arguments[b],h!=null)for(m in h)u=a(x,m),_=a(h,m),x!==_&&(g&&_&&(v(_)||(C=d(_)))?(C?(C=!1,E=u&&d(u)?u:[]):E=u&&v(u)?u:{},f(x,{name:m,newValue:c(g,E,_)})):typeof _<"u"&&f(x,{name:m,newValue:_}));return x},pu}var yC=vC();const mu=ug(yC);function Bu(n){if(typeof n!="object"||n===null)return!1;const r=Object.getPrototypeOf(n);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function SC(){const n=[],r={run:s,use:o};return r;function s(...d){let v=-1;const f=d.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);a(null,...d);function a(c,...h){const m=n[++v];let u=-1;if(c){f(c);return}for(;++u<d.length;)(h[u]===null||h[u]===void 0)&&(h[u]=d[u]);d=h,m?bC(m,a)(...h):f(null,...h)}}function o(d){if(typeof d!="function")throw new TypeError("Expected `middelware` to be a function, not "+d);return n.push(d),r}}function bC(n,r){let s;return o;function o(...f){const a=n.length>f.length;let c;a&&f.push(d);try{c=n.apply(this,f)}catch(h){const m=h;if(a&&s)throw m;return d(m)}a||(c&&c.then&&typeof c.then=="function"?c.then(v,d):c instanceof Error?d(c):v(c))}function d(f,...a){s||(s=!0,r(f,...a))}function v(f){d(null,f)}}const Pn={basename:CC,dirname:wC,extname:xC,join:EC,sep:"/"};function CC(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');hl(n);let s=0,o=-1,d=n.length,v;if(r===void 0||r.length===0||r.length>n.length){for(;d--;)if(n.codePointAt(d)===47){if(v){s=d+1;break}}else o<0&&(v=!0,o=d+1);return o<0?"":n.slice(s,o)}if(r===n)return"";let f=-1,a=r.length-1;for(;d--;)if(n.codePointAt(d)===47){if(v){s=d+1;break}}else f<0&&(v=!0,f=d+1),a>-1&&(n.codePointAt(d)===r.codePointAt(a--)?a<0&&(o=d):(a=-1,o=f));return s===o?o=f:o<0&&(o=n.length),n.slice(s,o)}function wC(n){if(hl(n),n.length===0)return".";let r=-1,s=n.length,o;for(;--s;)if(n.codePointAt(s)===47){if(o){r=s;break}}else o||(o=!0);return r<0?n.codePointAt(0)===47?"/":".":r===1&&n.codePointAt(0)===47?"//":n.slice(0,r)}function xC(n){hl(n);let r=n.length,s=-1,o=0,d=-1,v=0,f;for(;r--;){const a=n.codePointAt(r);if(a===47){if(f){o=r+1;break}continue}s<0&&(f=!0,s=r+1),a===46?d<0?d=r:v!==1&&(v=1):d>-1&&(v=-1)}return d<0||s<0||v===0||v===1&&d===s-1&&d===o+1?"":n.slice(d,s)}function EC(...n){let r=-1,s;for(;++r<n.length;)hl(n[r]),n[r]&&(s=s===void 0?n[r]:s+"/"+n[r]);return s===void 0?".":kC(s)}function kC(n){hl(n);const r=n.codePointAt(0)===47;let s=AC(n,!r);return s.length===0&&!r&&(s="."),s.length>0&&n.codePointAt(n.length-1)===47&&(s+="/"),r?"/"+s:s}function AC(n,r){let s="",o=0,d=-1,v=0,f=-1,a,c;for(;++f<=n.length;){if(f<n.length)a=n.codePointAt(f);else{if(a===47)break;a=47}if(a===47){if(!(d===f-1||v===1))if(d!==f-1&&v===2){if(s.length<2||o!==2||s.codePointAt(s.length-1)!==46||s.codePointAt(s.length-2)!==46){if(s.length>2){if(c=s.lastIndexOf("/"),c!==s.length-1){c<0?(s="",o=0):(s=s.slice(0,c),o=s.length-1-s.lastIndexOf("/")),d=f,v=0;continue}}else if(s.length>0){s="",o=0,d=f,v=0;continue}}r&&(s=s.length>0?s+"/..":"..",o=2)}else s.length>0?s+="/"+n.slice(d+1,f):s=n.slice(d+1,f),o=f-d-1;d=f,v=0}else a===46&&v>-1?v++:v=-1}return s}function hl(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const TC={cwd:DC};function DC(){return"/"}function Nu(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function RC(n){if(typeof n=="string")n=new URL(n);else if(!Nu(n)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(n.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return MC(n)}function MC(n){if(n.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const r=n.pathname;let s=-1;for(;++s<r.length;)if(r.codePointAt(s)===37&&r.codePointAt(s+1)===50){const o=r.codePointAt(s+2);if(o===70||o===102){const d=new TypeError("File URL path must not include encoded / characters");throw d.code="ERR_INVALID_FILE_URL_PATH",d}}return decodeURIComponent(r)}const gu=["history","path","basename","stem","extname","dirname"];class Zg{constructor(r){let s;r?Nu(r)?s={path:r}:typeof r=="string"||LC(r)?s={value:r}:s=r:s={},this.cwd="cwd"in s?"":TC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<gu.length;){const v=gu[o];v in s&&s[v]!==void 0&&s[v]!==null&&(this[v]=v==="history"?[...s[v]]:s[v])}let d;for(d in s)gu.includes(d)||(this[d]=s[d])}get basename(){return typeof this.path=="string"?Pn.basename(this.path):void 0}set basename(r){vu(r,"basename"),_u(r,"basename"),this.path=Pn.join(this.dirname||"",r)}get dirname(){return typeof this.path=="string"?Pn.dirname(this.path):void 0}set dirname(r){Gm(this.basename,"dirname"),this.path=Pn.join(r||"",this.basename)}get extname(){return typeof this.path=="string"?Pn.extname(this.path):void 0}set extname(r){if(_u(r,"extname"),Gm(this.dirname,"extname"),r){if(r.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(r.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Pn.join(this.dirname,this.stem+(r||""))}get path(){return this.history[this.history.length-1]}set path(r){Nu(r)&&(r=RC(r)),vu(r,"path"),this.path!==r&&this.history.push(r)}get stem(){return typeof this.path=="string"?Pn.basename(this.path,this.extname):void 0}set stem(r){vu(r,"stem"),_u(r,"stem"),this.path=Pn.join(this.dirname||"",r+(this.extname||""))}fail(r,s,o){const d=this.message(r,s,o);throw d.fatal=!0,d}info(r,s,o){const d=this.message(r,s,o);return d.fatal=void 0,d}message(r,s,o){const d=new $t(r,s,o);return this.path&&(d.name=this.path+":"+d.name,d.file=this.path),d.fatal=!1,this.messages.push(d),d}toString(r){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(r||void 0).decode(this.value)}}function _u(n,r){if(n&&n.includes(Pn.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+Pn.sep+"`")}function vu(n,r){if(!n)throw new Error("`"+r+"` cannot be empty")}function Gm(n,r){if(!n)throw new Error("Setting `"+r+"` requires `path` to be set too")}function LC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const OC=(function(n){const o=this.constructor.prototype,d=o[n],v=function(){return d.apply(v,arguments)};return Object.setPrototypeOf(v,o),v}),BC={}.hasOwnProperty;class ih extends OC{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=SC()}copy(){const r=new ih;let s=-1;for(;++s<this.attachers.length;){const o=this.attachers[s];r.use(...o)}return r.data(mu(!0,{},this.namespace)),r}data(r,s){return typeof r=="string"?arguments.length===2?(bu("data",this.frozen),this.namespace[r]=s,this):BC.call(this.namespace,r)&&this.namespace[r]||void 0:r?(bu("data",this.frozen),this.namespace=r,this):this.namespace}freeze(){if(this.frozen)return this;const r=this;for(;++this.freezeIndex<this.attachers.length;){const[s,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const d=s.call(r,...o);typeof d=="function"&&this.transformers.use(d)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(r){this.freeze();const s=Ra(r),o=this.parser||this.Parser;return yu("parse",o),o(String(s),s)}process(r,s){const o=this;return this.freeze(),yu("process",this.parser||this.Parser),Su("process",this.compiler||this.Compiler),s?d(void 0,s):new Promise(d);function d(v,f){const a=Ra(r),c=o.parse(a);o.run(c,a,function(m,u,_){if(m||!u||!_)return h(m);const C=u,E=o.stringify(C,_);zC(E)?_.value=E:_.result=E,h(m,_)});function h(m,u){m||!u?f(m):v?v(u):s(void 0,u)}}}processSync(r){let s=!1,o;return this.freeze(),yu("processSync",this.parser||this.Parser),Su("processSync",this.compiler||this.Compiler),this.process(r,d),$m("processSync","process",s),o;function d(v,f){s=!0,Fm(v),o=f}}run(r,s,o){Vm(r),this.freeze();const d=this.transformers;return!o&&typeof s=="function"&&(o=s,s=void 0),o?v(void 0,o):new Promise(v);function v(f,a){const c=Ra(s);d.run(r,c,h);function h(m,u,_){const C=u||r;m?a(m):f?f(C):o(void 0,C,_)}}}runSync(r,s){let o=!1,d;return this.run(r,s,v),$m("runSync","run",o),d;function v(f,a){Fm(f),d=a,o=!0}}stringify(r,s){this.freeze();const o=Ra(s),d=this.compiler||this.Compiler;return Su("stringify",d),Vm(r),d(r,o)}use(r,...s){const o=this.attachers,d=this.namespace;if(bu("use",this.frozen),r!=null)if(typeof r=="function")c(r,s);else if(typeof r=="object")Array.isArray(r)?a(r):f(r);else throw new TypeError("Expected usable value, not `"+r+"`");return this;function v(h){if(typeof h=="function")c(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...u]=h;c(m,u)}else f(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function f(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(h.plugins),h.settings&&(d.settings=mu(!0,d.settings,h.settings))}function a(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const u=h[m];v(u)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function c(h,m){let u=-1,_=-1;for(;++u<o.length;)if(o[u][0]===h){_=u;break}if(_===-1)o.push([h,...m]);else if(m.length>0){let[C,...E]=m;const x=o[_][1];Bu(x)&&Bu(C)&&(C=mu(!0,x,C)),o[_]=[h,C,...E]}}}}const NC=new ih().freeze();function yu(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function Su(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function bu(n,r){if(r)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Vm(n){if(!Bu(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function $m(n,r,s){if(!s)throw new Error("`"+n+"` finished async. Use `"+r+"` instead")}function Ra(n){return jC(n)?n:new Zg(n)}function jC(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function zC(n){return typeof n=="string"||HC(n)}function HC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const IC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Km=[],Ym={allowDangerousHtml:!0},UC=/^(https?|ircs?|mailto|xmpp)$/i,PC=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Jg(n){const r=FC(n),s=qC(n);return GC(r.runSync(r.parse(s),s),n)}function FC(n){const r=n.rehypePlugins||Km,s=n.remarkPlugins||Km,o=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...Ym}:Ym;return NC().use(Cb).use(s).use(_C,o).use(r)}function qC(n){const r=n.children||"",s=new Zg;return typeof r=="string"&&(s.value=r),s}function GC(n,r){const s=r.allowedElements,o=r.allowElement,d=r.components,v=r.disallowedElements,f=r.skipHtml,a=r.unwrapDisallowed,c=r.urlTransform||VC;for(const m of PC)Object.hasOwn(r,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+IC+m.id,void 0);return nh(n,h),sy(n,{Fragment:O.Fragment,components:d,ignoreInvalidStyle:!0,jsx:O.jsx,jsxs:O.jsxs,passKeys:!0,passNode:!0});function h(m,u,_){if(m.type==="raw"&&_&&typeof u=="number")return f?_.children.splice(u,1):_.children[u]={type:"text",value:m.value},u;if(m.type==="element"){let C;for(C in hu)if(Object.hasOwn(hu,C)&&Object.hasOwn(m.properties,C)){const E=m.properties[C],x=hu[C];(x===null||x.includes(m.tagName))&&(m.properties[C]=c(String(E||""),C,m))}}if(m.type==="element"){let C=s?!s.includes(m.tagName):v?v.includes(m.tagName):!1;if(!C&&o&&typeof u=="number"&&(C=!o(m,u,_)),C&&_&&typeof u=="number")return a&&m.children?_.children.splice(u,1,...m.children):_.children.splice(u,1),u}}}function VC(n){const r=n.indexOf(":"),s=n.indexOf("?"),o=n.indexOf("#"),d=n.indexOf("/");return r===-1||d!==-1&&r>d||s!==-1&&r>s||o!==-1&&r>o||UC.test(n.slice(0,r))?n:""}function Wm(n,r){const s=String(n);if(typeof r!="string")throw new TypeError("Expected character");let o=0,d=s.indexOf(r);for(;d!==-1;)o++,d=s.indexOf(r,d+r.length);return o}function $C(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function KC(n,r,s){const d=Ga((s||{}).ignore||[]),v=YC(r);let f=-1;for(;++f<v.length;)Qg(n,"text",a);function a(h,m){let u=-1,_;for(;++u<m.length;){const C=m[u],E=_?_.children:void 0;if(d(C,E?E.indexOf(C):void 0,_))return;_=C}if(_)return c(h,m)}function c(h,m){const u=m[m.length-1],_=v[f][0],C=v[f][1];let E=0;const b=u.children.indexOf(h);let S=!1,g=[];_.lastIndex=0;let y=_.exec(h.value);for(;y;){const A=y.index,M={index:y.index,input:y.input,stack:[...m,h]};let D=C(...y,M);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?_.lastIndex=A+1:(E!==A&&g.push({type:"text",value:h.value.slice(E,A)}),Array.isArray(D)?g.push(...D):D&&g.push(D),E=A+y[0].length,S=!0),!_.global)break;y=_.exec(h.value)}return S?(E<h.value.length&&g.push({type:"text",value:h.value.slice(E)}),u.children.splice(b,1,...g)):g=[h],b+g.length}}function YC(n){const r=[];if(!Array.isArray(n))throw new TypeError("Expected find and replace tuple or list of tuples");const s=!n[0]||Array.isArray(n[0])?n:[n];let o=-1;for(;++o<s.length;){const d=s[o];r.push([WC(d[0]),XC(d[1])])}return r}function WC(n){return typeof n=="string"?new RegExp($C(n),"g"):n}function XC(n){return typeof n=="function"?n:function(){return n}}const Cu="phrasing",wu=["autolink","link","image","label"];function QC(){return{transforms:[rw],enter:{literalAutolink:JC,literalAutolinkEmail:xu,literalAutolinkHttp:xu,literalAutolinkWww:xu},exit:{literalAutolink:iw,literalAutolinkEmail:nw,literalAutolinkHttp:ew,literalAutolinkWww:tw}}}function ZC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Cu,notInConstruct:wu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Cu,notInConstruct:wu},{character:":",before:"[ps]",after:"\\/",inConstruct:Cu,notInConstruct:wu}]}}function JC(n){this.enter({type:"link",title:null,url:"",children:[]},n)}function xu(n){this.config.enter.autolinkProtocol.call(this,n)}function ew(n){this.config.exit.autolinkProtocol.call(this,n)}function tw(n){this.config.exit.data.call(this,n);const r=this.stack[this.stack.length-1];r.type,r.url="http://"+this.sliceSerialize(n)}function nw(n){this.config.exit.autolinkEmail.call(this,n)}function iw(n){this.exit(n)}function rw(n){KC(n,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,sw],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),lw]],{ignore:["link","linkReference"]})}function sw(n,r,s,o,d){let v="";if(!e_(d)||(/^w/i.test(r)&&(s=r+s,r="",v="http://"),!aw(s)))return!1;const f=ow(s+o);if(!f[0])return!1;const a={type:"link",title:null,url:v+r+f[0],children:[{type:"text",value:r+f[0]}]};return f[1]?[a,{type:"text",value:f[1]}]:a}function lw(n,r,s,o){return!e_(o,!0)||/[-\d_]$/.test(s)?!1:{type:"link",title:null,url:"mailto:"+r+"@"+s,children:[{type:"text",value:r+"@"+s}]}}function aw(n){const r=n.split(".");return!(r.length<2||r[r.length-1]&&(/_/.test(r[r.length-1])||!/[a-zA-Z\d]/.test(r[r.length-1]))||r[r.length-2]&&(/_/.test(r[r.length-2])||!/[a-zA-Z\d]/.test(r[r.length-2])))}function ow(n){const r=/[!"&'),.:;<>?\]}]+$/.exec(n);if(!r)return[n,void 0];n=n.slice(0,r.index);let s=r[0],o=s.indexOf(")");const d=Wm(n,"(");let v=Wm(n,")");for(;o!==-1&&d>v;)n+=s.slice(0,o+1),s=s.slice(o+1),o=s.indexOf(")"),v++;return[n,s]}function e_(n,r){const s=n.input.charCodeAt(n.index-1);return(n.index===0||cr(s)||Pa(s))&&(!r||s!==47)}t_.peek=_w;function cw(){this.buffer()}function uw(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function hw(){this.buffer()}function fw(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function dw(n){const r=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=Ln(this.sliceSerialize(n)).toLowerCase(),s.label=r}function pw(n){this.exit(n)}function mw(n){const r=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=Ln(this.sliceSerialize(n)).toLowerCase(),s.label=r}function gw(n){this.exit(n)}function _w(){return"["}function t_(n,r,s,o){const d=s.createTracker(o);let v=d.move("[^");const f=s.enter("footnoteReference"),a=s.enter("reference");return v+=d.move(s.safe(s.associationId(n),{after:"]",before:v})),a(),f(),v+=d.move("]"),v}function vw(){return{enter:{gfmFootnoteCallString:cw,gfmFootnoteCall:uw,gfmFootnoteDefinitionLabelString:hw,gfmFootnoteDefinition:fw},exit:{gfmFootnoteCallString:dw,gfmFootnoteCall:pw,gfmFootnoteDefinitionLabelString:mw,gfmFootnoteDefinition:gw}}}function yw(n){let r=!1;return n&&n.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:s,footnoteReference:t_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function s(o,d,v,f){const a=v.createTracker(f);let c=a.move("[^");const h=v.enter("footnoteDefinition"),m=v.enter("label");return c+=a.move(v.safe(v.associationId(o),{before:c,after:"]"})),m(),c+=a.move("]:"),o.children&&o.children.length>0&&(a.shift(4),c+=a.move((r?`
|
|
74
|
+
`:" ")+v.indentLines(v.containerFlow(o,a.current()),r?n_:Sw))),h(),c}}function Sw(n,r,s){return r===0?n:n_(n,r,s)}function n_(n,r,s){return(s?"":" ")+n}const bw=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];i_.peek=kw;function Cw(){return{canContainEols:["delete"],enter:{strikethrough:xw},exit:{strikethrough:Ew}}}function ww(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:bw}],handlers:{delete:i_}}}function xw(n){this.enter({type:"delete",children:[]},n)}function Ew(n){this.exit(n)}function i_(n,r,s,o){const d=s.createTracker(o),v=s.enter("strikethrough");let f=d.move("~~");return f+=s.containerPhrasing(n,{...d.current(),before:f,after:"~"}),f+=d.move("~~"),v(),f}function kw(){return"~"}function Aw(n){return n.length}function Tw(n,r){const s=r||{},o=(s.align||[]).concat(),d=s.stringLength||Aw,v=[],f=[],a=[],c=[];let h=0,m=-1;for(;++m<n.length;){const x=[],b=[];let S=-1;for(n[m].length>h&&(h=n[m].length);++S<n[m].length;){const g=Dw(n[m][S]);if(s.alignDelimiters!==!1){const y=d(g);b[S]=y,(c[S]===void 0||y>c[S])&&(c[S]=y)}x.push(g)}f[m]=x,a[m]=b}let u=-1;if(typeof o=="object"&&"length"in o)for(;++u<h;)v[u]=Xm(o[u]);else{const x=Xm(o);for(;++u<h;)v[u]=x}u=-1;const _=[],C=[];for(;++u<h;){const x=v[u];let b="",S="";x===99?(b=":",S=":"):x===108?b=":":x===114&&(S=":");let g=s.alignDelimiters===!1?1:Math.max(1,c[u]-b.length-S.length);const y=b+"-".repeat(g)+S;s.alignDelimiters!==!1&&(g=b.length+g+S.length,g>c[u]&&(c[u]=g),C[u]=g),_[u]=y}f.splice(1,0,_),a.splice(1,0,C),m=-1;const E=[];for(;++m<f.length;){const x=f[m],b=a[m];u=-1;const S=[];for(;++u<h;){const g=x[u]||"";let y="",A="";if(s.alignDelimiters!==!1){const M=c[u]-(b[u]||0),D=v[u];D===114?y=" ".repeat(M):D===99?M%2?(y=" ".repeat(M/2+.5),A=" ".repeat(M/2-.5)):(y=" ".repeat(M/2),A=y):A=" ".repeat(M)}s.delimiterStart!==!1&&!u&&S.push("|"),s.padding!==!1&&!(s.alignDelimiters===!1&&g==="")&&(s.delimiterStart!==!1||u)&&S.push(" "),s.alignDelimiters!==!1&&S.push(y),S.push(g),s.alignDelimiters!==!1&&S.push(A),s.padding!==!1&&S.push(" "),(s.delimiterEnd!==!1||u!==h-1)&&S.push("|")}E.push(s.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return E.join(`
|
|
75
|
+
`)}function Dw(n){return n==null?"":String(n)}function Xm(n){const r=typeof n=="string"?n.codePointAt(0):0;return r===67||r===99?99:r===76||r===108?108:r===82||r===114?114:0}function Rw(n,r,s,o){const d=s.enter("blockquote"),v=s.createTracker(o);v.move("> "),v.shift(2);const f=s.indentLines(s.containerFlow(n,v.current()),Mw);return d(),f}function Mw(n,r,s){return">"+(s?"":" ")+n}function Lw(n,r){return Qm(n,r.inConstruct,!0)&&!Qm(n,r.notInConstruct,!1)}function Qm(n,r,s){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return s;let o=-1;for(;++o<r.length;)if(n.includes(r[o]))return!0;return!1}function Zm(n,r,s,o){let d=-1;for(;++d<s.unsafe.length;)if(s.unsafe[d].character===`
|
|
76
|
+
`&&Lw(s.stack,s.unsafe[d]))return/[ \t]/.test(o.before)?"":" ";return`\\
|
|
77
|
+
`}function Ow(n,r){const s=String(n);let o=s.indexOf(r),d=o,v=0,f=0;if(typeof r!="string")throw new TypeError("Expected substring");for(;o!==-1;)o===d?++v>f&&(f=v):v=1,d=o+r.length,o=s.indexOf(r,d);return f}function Bw(n,r){return!!(r.options.fences===!1&&n.value&&!n.lang&&/[^ \r\n]/.test(n.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(n.value))}function Nw(n){const r=n.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function jw(n,r,s,o){const d=Nw(s),v=n.value||"",f=d==="`"?"GraveAccent":"Tilde";if(Bw(n,s)){const u=s.enter("codeIndented"),_=s.indentLines(v,zw);return u(),_}const a=s.createTracker(o),c=d.repeat(Math.max(Ow(v,d)+1,3)),h=s.enter("codeFenced");let m=a.move(c);if(n.lang){const u=s.enter(`codeFencedLang${f}`);m+=a.move(s.safe(n.lang,{before:m,after:" ",encode:["`"],...a.current()})),u()}if(n.lang&&n.meta){const u=s.enter(`codeFencedMeta${f}`);m+=a.move(" "),m+=a.move(s.safe(n.meta,{before:m,after:`
|
|
78
|
+
`,encode:["`"],...a.current()})),u()}return m+=a.move(`
|
|
79
|
+
`),v&&(m+=a.move(v+`
|
|
80
|
+
`)),m+=a.move(c),h(),m}function zw(n,r,s){return(s?"":" ")+n}function rh(n){const r=n.options.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Cannot serialize title with `"+r+"` for `options.quote`, expected `\"`, or `'`");return r}function Hw(n,r,s,o){const d=rh(s),v=d==='"'?"Quote":"Apostrophe",f=s.enter("definition");let a=s.enter("label");const c=s.createTracker(o);let h=c.move("[");return h+=c.move(s.safe(s.associationId(n),{before:h,after:"]",...c.current()})),h+=c.move("]: "),a(),!n.url||/[\0- \u007F]/.test(n.url)?(a=s.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(s.safe(n.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(a=s.enter("destinationRaw"),h+=c.move(s.safe(n.url,{before:h,after:n.title?" ":`
|
|
81
|
+
`,...c.current()}))),a(),n.title&&(a=s.enter(`title${v}`),h+=c.move(" "+d),h+=c.move(s.safe(n.title,{before:h,after:d,...c.current()})),h+=c.move(d),a()),f(),h}function Iw(n){const r=n.options.emphasis||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize emphasis with `"+r+"` for `options.emphasis`, expected `*`, or `_`");return r}function ol(n){return"&#x"+n.toString(16).toUpperCase()+";"}function Ha(n,r,s){const o=Zr(n),d=Zr(r);return o===void 0?d===void 0?s==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:d===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:o===1?d===void 0?{inside:!1,outside:!1}:d===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:d===void 0?{inside:!1,outside:!1}:d===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}r_.peek=Uw;function r_(n,r,s,o){const d=Iw(s),v=s.enter("emphasis"),f=s.createTracker(o),a=f.move(d);let c=f.move(s.containerPhrasing(n,{after:d,before:a,...f.current()}));const h=c.charCodeAt(0),m=Ha(o.before.charCodeAt(o.before.length-1),h,d);m.inside&&(c=ol(h)+c.slice(1));const u=c.charCodeAt(c.length-1),_=Ha(o.after.charCodeAt(0),u,d);_.inside&&(c=c.slice(0,-1)+ol(u));const C=f.move(d);return v(),s.attentionEncodeSurroundingInfo={after:_.outside,before:m.outside},a+c+C}function Uw(n,r,s){return s.options.emphasis||"*"}function Pw(n,r){let s=!1;return nh(n,function(o){if("value"in o&&/\r?\n|\r/.test(o.value)||o.type==="break")return s=!0,Lu}),!!((!n.depth||n.depth<3)&&Wu(n)&&(r.options.setext||s))}function Fw(n,r,s,o){const d=Math.max(Math.min(6,n.depth||1),1),v=s.createTracker(o);if(Pw(n,s)){const m=s.enter("headingSetext"),u=s.enter("phrasing"),_=s.containerPhrasing(n,{...v.current(),before:`
|
|
82
82
|
`,after:`
|
|
83
|
-
`});return u(),
|
|
84
|
-
`+(
|
|
85
|
-
`))+1))}const f="#".repeat(
|
|
86
|
-
`,...v.current()});return/^[\t ]/.test(h)&&(h=
|
|
87
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:
|
|
88
|
-
`))}function c(w,E,x,S){const _=x.enter("tableCell"),g=x.enter("phrasing"),y=x.containerPhrasing(w,{...S,before:v,after:v});return g(),_(),y}function h(w,E){return Tw(w,{align:E,alignDelimiters:o,padding:s,stringLength:p})}function d(w,E,x){const S=w.children;let _=-1;const g=[],y=E.enter("table");for(;++_<S.length;)g[_]=u(S[_],E,x);return y(),g}function u(w,E,x){const S=w.children;let _=-1;const g=[],y=E.enter("tableRow");for(;++_<S.length;)g[_]=c(S[_],w,E,x);return y(),g}function b(w,E,x){let S=p_.inlineCode(w,E,x);return x.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function mx(){return{exit:{taskListCheckValueChecked:eg,taskListCheckValueUnchecked:eg,paragraph:_x}}}function gx(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:vx}}}function eg(n){const r=this.stack[this.stack.length-2];r.type,r.checked=n.type==="taskListCheckValueChecked"}function _x(n){const r=this.stack[this.stack.length-2];if(r&&r.type==="listItem"&&typeof r.checked=="boolean"){const s=this.stack[this.stack.length-1];s.type;const o=s.children[0];if(o&&o.type==="text"){const p=r.children;let v=-1,f;for(;++v<p.length;){const a=p[v];if(a.type==="paragraph"){f=a;break}}f===s&&(o.value=o.value.slice(1),o.value.length===0?s.children.shift():s.position&&o.position&&typeof o.position.start.offset=="number"&&(o.position.start.column++,o.position.start.offset++,s.position.start=Object.assign({},o.position.start)))}}this.exit(n)}function vx(n,r,s,o){const p=n.children[0],v=typeof n.checked=="boolean"&&p&&p.type==="paragraph",f="["+(n.checked?"x":" ")+"] ",a=s.createTracker(o);v&&a.move(f);let c=p_.listItem(n,r,s,{...o,...a.current()});return v&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),c;function h(d){return d+f}}function yx(){return[QC(),vw(),Cw(),ox(),mx()]}function Sx(n){return{extensions:[ZC(),yw(n),ww(),px(n),gx()]}}const bx={tokenize:Ax,partial:!0},m_={tokenize:Tx,partial:!0},g_={tokenize:Dx,partial:!0},__={tokenize:Rx,partial:!0},Cx={tokenize:Mx,partial:!0},v_={name:"wwwAutolink",tokenize:Ex,previous:S_},y_={name:"protocolAutolink",tokenize:kx,previous:b_},li={name:"emailAutolink",tokenize:xx,previous:C_},In={};function wx(){return{text:In}}let ar=48;for(;ar<123;)In[ar]=li,ar++,ar===58?ar=65:ar===91&&(ar=97);In[43]=li;In[45]=li;In[46]=li;In[95]=li;In[72]=[li,y_];In[104]=[li,y_];In[87]=[li,v_];In[119]=[li,v_];function xx(n,r,s){const o=this;let p,v;return f;function f(u){return!ju(u)||!C_.call(o,o.previous)||lh(o.events)?s(u):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),a(u))}function a(u){return ju(u)?(n.consume(u),a):u===64?(n.consume(u),c):s(u)}function c(u){return u===46?n.check(Cx,d,h)(u):u===45||u===95||$t(u)?(v=!0,n.consume(u),c):d(u)}function h(u){return n.consume(u),p=!0,c}function d(u){return v&&p&&Qt(o.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),r(u)):s(u)}}function Ex(n,r,s){const o=this;return p;function p(f){return f!==87&&f!==119||!S_.call(o,o.previous)||lh(o.events)?s(f):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(bx,n.attempt(m_,n.attempt(g_,v),s),s)(f))}function v(f){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),r(f)}}function kx(n,r,s){const o=this;let p="",v=!1;return f;function f(u){return(u===72||u===104)&&b_.call(o,o.previous)&&!lh(o.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),p+=String.fromCodePoint(u),n.consume(u),a):s(u)}function a(u){if(Qt(u)&&p.length<5)return p+=String.fromCodePoint(u),n.consume(u),a;if(u===58){const b=p.toLowerCase();if(b==="http"||b==="https")return n.consume(u),c}return s(u)}function c(u){return u===47?(n.consume(u),v?h:(v=!0,c)):s(u)}function h(u){return u===null||Na(u)||ot(u)||or(u)||Pa(u)?s(u):n.attempt(m_,n.attempt(g_,d),s)(u)}function d(u){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),r(u)}}function Ax(n,r,s){let o=0;return p;function p(f){return(f===87||f===119)&&o<3?(o++,n.consume(f),p):f===46&&o===3?(n.consume(f),v):s(f)}function v(f){return f===null?s(f):r(f)}}function Tx(n,r,s){let o,p,v;return f;function f(h){return h===46||h===95?n.check(__,c,a)(h):h===null||ot(h)||or(h)||h!==45&&Pa(h)?c(h):(v=!0,n.consume(h),f)}function a(h){return h===95?o=!0:(p=o,o=void 0),n.consume(h),f}function c(h){return p||o||!v?s(h):r(h)}}function Dx(n,r){let s=0,o=0;return p;function p(f){return f===40?(s++,n.consume(f),p):f===41&&o<s?v(f):f===33||f===34||f===38||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===60||f===63||f===93||f===95||f===126?n.check(__,r,v)(f):f===null||ot(f)||or(f)?r(f):(n.consume(f),p)}function v(f){return f===41&&o++,n.consume(f),p}}function Rx(n,r,s){return o;function o(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(n.consume(a),o):a===38?(n.consume(a),v):a===93?(n.consume(a),p):a===60||a===null||ot(a)||or(a)?r(a):s(a)}function p(a){return a===null||a===40||a===91||ot(a)||or(a)?r(a):o(a)}function v(a){return Qt(a)?f(a):s(a)}function f(a){return a===59?(n.consume(a),o):Qt(a)?(n.consume(a),f):s(a)}}function Mx(n,r,s){return o;function o(v){return n.consume(v),p}function p(v){return $t(v)?s(v):r(v)}}function S_(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||ot(n)}function b_(n){return!Qt(n)}function C_(n){return!(n===47||ju(n))}function ju(n){return n===43||n===45||n===46||n===95||$t(n)}function lh(n){let r=n.length,s=!1;for(;r--;){const o=n[r][1];if((o.type==="labelLink"||o.type==="labelImage")&&!o._balanced){s=!0;break}if(o._gfmAutolinkLiteralWalkedInto){s=!1;break}}return n.length>0&&!s&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),s}const Lx={tokenize:Ux,partial:!0};function Ox(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:zx,continuation:{tokenize:Hx},exit:Ix}},text:{91:{name:"gfmFootnoteCall",tokenize:jx},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Bx,resolveTo:Nx}}}}function Bx(n,r,s){const o=this;let p=o.events.length;const v=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let f;for(;p--;){const c=o.events[p][1];if(c.type==="labelImage"){f=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return a;function a(c){if(!f||!f._balanced)return s(c);const h=Mn(o.sliceSerialize({start:f.end,end:o.now()}));return h.codePointAt(0)!==94||!v.includes(h.slice(1))?s(c):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(c),n.exit("gfmFootnoteCallLabelMarker"),r(c))}}function Nx(n,r){let s=n.length;for(;s--;)if(n[s][1].type==="labelImage"&&n[s][0]==="enter"){n[s][1];break}n[s+1][1].type="data",n[s+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},n[s+3][1].start),end:Object.assign({},n[n.length-1][1].end)},p={type:"gfmFootnoteCallMarker",start:Object.assign({},n[s+3][1].end),end:Object.assign({},n[s+3][1].end)};p.end.column++,p.end.offset++,p.end._bufferIndex++;const v={type:"gfmFootnoteCallString",start:Object.assign({},p.end),end:Object.assign({},n[n.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},v.start),end:Object.assign({},v.end)},a=[n[s+1],n[s+2],["enter",o,r],n[s+3],n[s+4],["enter",p,r],["exit",p,r],["enter",v,r],["enter",f,r],["exit",f,r],["exit",v,r],n[n.length-2],n[n.length-1],["exit",o,r]];return n.splice(s,n.length-s+1,...a),n}function jx(n,r,s){const o=this,p=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let v=0,f;return a;function a(u){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),c}function c(u){return u!==94?s(u):(n.enter("gfmFootnoteCallMarker"),n.consume(u),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",h)}function h(u){if(v>999||u===93&&!f||u===null||u===91||ot(u))return s(u);if(u===93){n.exit("chunkString");const b=n.exit("gfmFootnoteCallString");return p.includes(Mn(o.sliceSerialize(b)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),r):s(u)}return ot(u)||(f=!0),v++,n.consume(u),u===92?d:h}function d(u){return u===91||u===92||u===93?(n.consume(u),v++,h):h(u)}}function zx(n,r,s){const o=this,p=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let v,f=0,a;return c;function c(E){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(E),n.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(E){return E===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(E),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",d):s(E)}function d(E){if(f>999||E===93&&!a||E===null||E===91||ot(E))return s(E);if(E===93){n.exit("chunkString");const x=n.exit("gfmFootnoteDefinitionLabelString");return v=Mn(o.sliceSerialize(x)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(E),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),b}return ot(E)||(a=!0),f++,n.consume(E),E===92?u:d}function u(E){return E===91||E===92||E===93?(n.consume(E),f++,d):d(E)}function b(E){return E===58?(n.enter("definitionMarker"),n.consume(E),n.exit("definitionMarker"),p.includes(v)||p.push(v),Ke(n,w,"gfmFootnoteDefinitionWhitespace")):s(E)}function w(E){return r(E)}}function Hx(n,r,s){return n.check(cl,r,n.attempt(Lx,r,s))}function Ix(n){n.exit("gfmFootnoteDefinition")}function Ux(n,r,s){const o=this;return Ke(n,p,"gfmFootnoteDefinitionIndent",5);function p(v){const f=o.events[o.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?r(v):s(v)}}function Px(n){let s=(n||{}).singleTilde;const o={name:"strikethrough",tokenize:v,resolveAll:p};return s==null&&(s=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function p(f,a){let c=-1;for(;++c<f.length;)if(f[c][0]==="enter"&&f[c][1].type==="strikethroughSequenceTemporary"&&f[c][1]._close){let h=c;for(;h--;)if(f[h][0]==="exit"&&f[h][1].type==="strikethroughSequenceTemporary"&&f[h][1]._open&&f[c][1].end.offset-f[c][1].start.offset===f[h][1].end.offset-f[h][1].start.offset){f[c][1].type="strikethroughSequence",f[h][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},f[h][1].start),end:Object.assign({},f[c][1].end)},u={type:"strikethroughText",start:Object.assign({},f[h][1].end),end:Object.assign({},f[c][1].start)},b=[["enter",d,a],["enter",f[h][1],a],["exit",f[h][1],a],["enter",u,a]],w=a.parser.constructs.insideSpan.null;w&&gn(b,b.length,0,Fa(w,f.slice(h+1,c),a)),gn(b,b.length,0,[["exit",u,a],["enter",f[c][1],a],["exit",f[c][1],a],["exit",d,a]]),gn(f,h-1,c-h+3,b),c=h+b.length-2;break}}for(c=-1;++c<f.length;)f[c][1].type==="strikethroughSequenceTemporary"&&(f[c][1].type="data");return f}function v(f,a,c){const h=this.previous,d=this.events;let u=0;return b;function b(E){return h===126&&d[d.length-1][1].type!=="characterEscape"?c(E):(f.enter("strikethroughSequenceTemporary"),w(E))}function w(E){const x=es(h);if(E===126)return u>1?c(E):(f.consume(E),u++,w);if(u<2&&!s)return c(E);const S=f.exit("strikethroughSequenceTemporary"),_=es(E);return S._open=!_||_===2&&!!x,S._close=!x||x===2&&!!_,a(E)}}}class Fx{constructor(){this.map=[]}add(r,s,o){qx(this,r,s,o)}consume(r){if(this.map.sort(function(v,f){return v[0]-f[0]}),this.map.length===0)return;let s=this.map.length;const o=[];for(;s>0;)s-=1,o.push(r.slice(this.map[s][0]+this.map[s][1]),this.map[s][2]),r.length=this.map[s][0];o.push(r.slice()),r.length=0;let p=o.pop();for(;p;){for(const v of p)r.push(v);p=o.pop()}this.map.length=0}}function qx(n,r,s,o){let p=0;if(!(s===0&&o.length===0)){for(;p<n.map.length;){if(n.map[p][0]===r){n.map[p][1]+=s,n.map[p][2].push(...o);return}p+=1}n.map.push([r,s,o])}}function Vx(n,r){let s=!1;const o=[];for(;r<n.length;){const p=n[r];if(s){if(p[0]==="enter")p[1].type==="tableContent"&&o.push(n[r+1][1].type==="tableDelimiterMarker"?"left":"none");else if(p[1].type==="tableContent"){if(n[r-1][1].type==="tableDelimiterMarker"){const v=o.length-1;o[v]=o[v]==="left"?"center":"right"}}else if(p[1].type==="tableDelimiterRow")break}else p[0]==="enter"&&p[1].type==="tableDelimiterRow"&&(s=!0);r+=1}return o}function Gx(){return{flow:{null:{name:"table",tokenize:$x,resolveAll:Kx}}}}function $x(n,r,s){const o=this;let p=0,v=0,f;return a;function a(N){let I=o.events.length-1;for(;I>-1;){const K=o.events[I][1].type;if(K==="lineEnding"||K==="linePrefix")I--;else break}const P=I>-1?o.events[I][1].type:null,F=P==="tableHead"||P==="tableRow"?D:c;return F===D&&o.parser.lazy[o.now().line]?s(N):F(N)}function c(N){return n.enter("tableHead"),n.enter("tableRow"),h(N)}function h(N){return N===124||(f=!0,v+=1),d(N)}function d(N){return N===null?s(N):Le(N)?v>1?(v=0,o.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(N),n.exit("lineEnding"),w):s(N):Fe(N)?Ke(n,d,"whitespace")(N):(v+=1,f&&(f=!1,p+=1),N===124?(n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),f=!0,d):(n.enter("data"),u(N)))}function u(N){return N===null||N===124||ot(N)?(n.exit("data"),d(N)):(n.consume(N),N===92?b:u)}function b(N){return N===92||N===124?(n.consume(N),u):u(N)}function w(N){return o.interrupt=!1,o.parser.lazy[o.now().line]?s(N):(n.enter("tableDelimiterRow"),f=!1,Fe(N)?Ke(n,E,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):E(N))}function E(N){return N===45||N===58?S(N):N===124?(f=!0,n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),x):M(N)}function x(N){return Fe(N)?Ke(n,S,"whitespace")(N):S(N)}function S(N){return N===58?(v+=1,f=!0,n.enter("tableDelimiterMarker"),n.consume(N),n.exit("tableDelimiterMarker"),_):N===45?(v+=1,_(N)):N===null||Le(N)?A(N):M(N)}function _(N){return N===45?(n.enter("tableDelimiterFiller"),g(N)):M(N)}function g(N){return N===45?(n.consume(N),g):N===58?(f=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(N),n.exit("tableDelimiterMarker"),y):(n.exit("tableDelimiterFiller"),y(N))}function y(N){return Fe(N)?Ke(n,A,"whitespace")(N):A(N)}function A(N){return N===124?E(N):N===null||Le(N)?!f||p!==v?M(N):(n.exit("tableDelimiterRow"),n.exit("tableHead"),r(N)):M(N)}function M(N){return s(N)}function D(N){return n.enter("tableRow"),T(N)}function T(N){return N===124?(n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),T):N===null||Le(N)?(n.exit("tableRow"),r(N)):Fe(N)?Ke(n,T,"whitespace")(N):(n.enter("data"),k(N))}function k(N){return N===null||N===124||ot(N)?(n.exit("data"),T(N)):(n.consume(N),N===92?R:k)}function R(N){return N===92||N===124?(n.consume(N),k):k(N)}}function Kx(n,r){let s=-1,o=!0,p=0,v=[0,0,0,0],f=[0,0,0,0],a=!1,c=0,h,d,u;const b=new Fx;for(;++s<n.length;){const w=n[s],E=w[1];w[0]==="enter"?E.type==="tableHead"?(a=!1,c!==0&&(tg(b,r,c,h,d),d=void 0,c=0),h={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},b.add(s,0,[["enter",h,r]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(o=!0,u=void 0,v=[0,0,0,0],f=[0,s+1,0,0],a&&(a=!1,d={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},b.add(s,0,[["enter",d,r]])),p=E.type==="tableDelimiterRow"?2:d?3:1):p&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(o=!1,f[2]===0&&(v[1]!==0&&(f[0]=f[1],u=Ma(b,r,v,p,void 0,u),v=[0,0,0,0]),f[2]=s)):E.type==="tableCellDivider"&&(o?o=!1:(v[1]!==0&&(f[0]=f[1],u=Ma(b,r,v,p,void 0,u)),v=f,f=[v[1],s,0,0])):E.type==="tableHead"?(a=!0,c=s):E.type==="tableRow"||E.type==="tableDelimiterRow"?(c=s,v[1]!==0?(f[0]=f[1],u=Ma(b,r,v,p,s,u)):f[1]!==0&&(u=Ma(b,r,f,p,s,u)),p=0):p&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(f[3]=s)}for(c!==0&&tg(b,r,c,h,d),b.consume(r.events),s=-1;++s<r.events.length;){const w=r.events[s];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=Vx(r.events,s))}return n}function Ma(n,r,s,o,p,v){const f=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",a="tableContent";s[0]!==0&&(v.end=Object.assign({},Xr(r.events,s[0])),n.add(s[0],0,[["exit",v,r]]));const c=Xr(r.events,s[1]);if(v={type:f,start:Object.assign({},c),end:Object.assign({},c)},n.add(s[1],0,[["enter",v,r]]),s[2]!==0){const h=Xr(r.events,s[2]),d=Xr(r.events,s[3]),u={type:a,start:Object.assign({},h),end:Object.assign({},d)};if(n.add(s[2],0,[["enter",u,r]]),o!==2){const b=r.events[s[2]],w=r.events[s[3]];if(b[1].end=Object.assign({},w[1].end),b[1].type="chunkText",b[1].contentType="text",s[3]>s[2]+1){const E=s[2]+1,x=s[3]-s[2]-1;n.add(E,x,[])}}n.add(s[3]+1,0,[["exit",u,r]])}return p!==void 0&&(v.end=Object.assign({},Xr(r.events,p)),n.add(p,0,[["exit",v,r]]),v=void 0),v}function tg(n,r,s,o,p){const v=[],f=Xr(r.events,s);p&&(p.end=Object.assign({},f),v.push(["exit",p,r])),o.end=Object.assign({},f),v.push(["exit",o,r]),n.add(s+1,0,v)}function Xr(n,r){const s=n[r],o=s[0]==="enter"?"start":"end";return s[1][o]}const Yx={name:"tasklistCheck",tokenize:Xx};function Wx(){return{text:{91:Yx}}}function Xx(n,r,s){const o=this;return p;function p(c){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?s(c):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(c),n.exit("taskListCheckMarker"),v)}function v(c){return ot(c)?(n.enter("taskListCheckValueUnchecked"),n.consume(c),n.exit("taskListCheckValueUnchecked"),f):c===88||c===120?(n.enter("taskListCheckValueChecked"),n.consume(c),n.exit("taskListCheckValueChecked"),f):s(c)}function f(c){return c===93?(n.enter("taskListCheckMarker"),n.consume(c),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),a):s(c)}function a(c){return Le(c)?r(c):Fe(c)?n.check({tokenize:Qx},r,s)(c):s(c)}}function Qx(n,r,s){return Ke(n,o,"whitespace");function o(p){return p===null?s(p):r(p)}}function Zx(n){return Lg([wx(),Ox(),Px(n),Gx(),Wx()])}const Jx={};function w_(n){const r=this,s=n||Jx,o=r.data(),p=o.micromarkExtensions||(o.micromarkExtensions=[]),v=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),f=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);p.push(Zx(s)),v.push(yx()),f.push(Sx(s))}const e2=500,Ce={getAppPreferences(){return Te("/api/settings/preferences")},updateAppPreferences(n){return Te("/api/settings/preferences",{method:"PUT",body:JSON.stringify(n)})},getRuntimeDiagnostics(){return Te("/api/diagnostics/runtime")},getCurrentProject(){return Te("/api/projects/current")},pullCurrentProject(){return Te("/api/projects/current/pull",{method:"POST"})},getRecentRepositoryPaths(){return Te("/api/projects/recent")},connectProject(n){return Te("/api/projects/connect",{method:"POST",body:JSON.stringify(n)})},listTasks(){return Te("/api/tasks")},createTask(n){return Te("/api/tasks",{method:"POST",body:JSON.stringify(n)})},cleanupTask(n,r={}){return Te(`/api/tasks/${encodeURIComponent(n)}/cleanup`,{method:"POST",body:JSON.stringify(r)})},getHarnessStatus(){return Te("/api/projects/harness")},applyHarness(){return Te("/api/projects/harness/apply",{method:"POST"})},getHarnessBootstrapStatus(){return Te("/api/projects/harness/bootstrap")},startHarnessBootstrap(n={}){return Te("/api/projects/harness/bootstrap/start",{method:"POST",body:JSON.stringify(n)})},getTaskStatus(n){return Te(`/api/tasks/${encodeURIComponent(n)}/status`)},listSessions(n){return Te(`/api/tasks/${encodeURIComponent(n)}/sessions`)},startRoleSession(n,r,s={}){return Te(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/start`,{method:"POST",body:JSON.stringify(s)})},stopRoleSession(n,r){return Te(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/stop`,{method:"POST"})},restartRoleSession(n,r,s={}){return Te(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/restart`,{method:"POST",body:JSON.stringify(s)})},resumeRoleSession(n,r,s={}){return Te(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/resume`,{method:"POST",body:JSON.stringify(s)})},dispatchRoleCommand(n,r){return Te(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/dispatch`,{method:"POST"})},listMessages(n){return Te(`/api/tasks/${encodeURIComponent(n)}/messages`)},markAllMessagesDone(n){return Te(`/api/tasks/${encodeURIComponent(n)}/messages/mark-all-done`,{method:"POST"})},deleteMessageHistory(n){return Te(`/api/tasks/${encodeURIComponent(n)}/messages/history`,{method:"DELETE"})},getOrchestrationState(n){return Te(`/api/tasks/${encodeURIComponent(n)}/orchestration`)},updateOrchestrationState(n,r){return Te(`/api/tasks/${encodeURIComponent(n)}/orchestration`,{method:"PUT",body:JSON.stringify(r)})},getSessionRoundState(n){return Te(`/api/tasks/${encodeURIComponent(n)}/round`)},getCodexReviewState(n){return Te(`/api/tasks/${encodeURIComponent(n)}/codex-review`)},updateCodexReviewSettings(n,r){return Te(`/api/tasks/${encodeURIComponent(n)}/codex-review/settings`,{method:"PUT",body:JSON.stringify(r)})},requestCodexReviewGate(n,r){return Te(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/request`,{method:"POST"})},retryCodexReviewGate(n,r){return Te(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/retry`,{method:"POST"})},skipCodexReviewGate(n,r,s){return Te(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/skip`,{method:"POST",body:JSON.stringify(s)})},overrideCodexReviewGate(n,r,s){return Te(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/override`,{method:"POST",body:JSON.stringify(s)})},getCodexReviewReport(n,r){return Te(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/report`)},startTranslationSession(n,r){return Te(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/start`,{method:"POST"})},pollTranslationSession(n,r,s){const o=new URLSearchParams({after:String(r)});return s!==void 0&&o.set("limit",String(s)),Te(`/api/translation/sessions/${encodeURIComponent(n)}/events?${o.toString()}`)},translateUserInput(n,r,s){return Te(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/input`,{method:"POST",body:JSON.stringify(s)})},sendTranslatedInput(n,r,s){return Te(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/send`,{method:"POST",body:JSON.stringify(s)})},clearTranslationSession(n){return Te(`/api/translation/sessions/${encodeURIComponent(n)}/clear`,{method:"POST"})},stopTranslationSession(n){return Te(`/api/translation/sessions/${encodeURIComponent(n)}/stop`,{method:"POST"})},retryTranslation(n,r){return Te(`/api/translation/sessions/${encodeURIComponent(n)}/retry/${encodeURIComponent(r)}`,{method:"POST"})},ignoreTranslationFailures(n){return Te(`/api/translation/sessions/${encodeURIComponent(n)}/failures/ignore`,{method:"POST"})},retryTranslationFailures(n){return Te(`/api/translation/sessions/${encodeURIComponent(n)}/failures/retry`,{method:"POST"})},getCodexTranslationState(){return Te("/api/translation/codex/state")},getCodexTranslatorSession(){return Te("/api/translation/codex/session")},ensureCodexTranslatorSession(n={}){return Te("/api/translation/codex/session/ensure",{method:"POST",body:JSON.stringify(n)})},startCodexTranslatorSession(n={}){return Te("/api/translation/codex/session/start",{method:"POST",body:JSON.stringify(n)})},resumeCodexTranslatorSession(n={}){return Te("/api/translation/codex/session/resume",{method:"POST",body:JSON.stringify(n)})},restartCodexTranslatorSession(n={}){return Te("/api/translation/codex/session/restart",{method:"POST",body:JSON.stringify(n)})},stopCodexTranslatorSession(){return Te("/api/translation/codex/session/stop",{method:"POST"})},browseCodexTranslationSourceFiles(n={}){const r=new URLSearchParams;n.path&&r.set("path",n.path),n.query&&r.set("query",n.query),n.limit!==void 0&&r.set("limit",String(n.limit));const s=r.toString()?`?${r.toString()}`:"";return Te(`/api/translation/codex/source-files${s}`)},createCodexFileTranslation(n){return Te("/api/translation/codex/files",{method:"POST",body:JSON.stringify(n)})},readCodexFileTranslation(n){return Te(`/api/translation/codex/files/${encodeURIComponent(n)}`)},createCodexBootstrap(n){return Te("/api/translation/codex/bootstrap",{method:"POST",body:JSON.stringify(n)})},createCodexMemoryUpdate(n){return Te("/api/translation/codex/memory-update",{method:"POST",body:JSON.stringify(n)})},promoteCodexTranslation(n,r){return Te(`/api/translation/codex/files/${encodeURIComponent(n)}/promote`,{method:"POST",body:JSON.stringify({targetPath:r})})},getGatewayStatus(){return Te("/api/gateway/status")},updateGatewaySettings(n){return Te("/api/gateway/settings",{method:"PUT",body:JSON.stringify(n)})},startGatewayQrLogin(){return Te("/api/gateway/qr/start",{method:"POST"})},checkGatewayQrLogin(n={}){return Te("/api/gateway/qr/check",{method:"POST",body:JSON.stringify(n)})},resetGatewayBinding(){return Te("/api/gateway/binding/reset",{method:"POST"})}};async function Te(n,r={}){var p,v,f;const s=new Headers(r.headers);r.body!==void 0&&r.body!==null&&!s.has("content-type")&&s.set("content-type","application/json");const o=await fetch(n,{...r,headers:s});if(!o.ok){const a=await o.json().catch(()=>null),c=(p=a==null?void 0:a.error)!=null&&p.hint?`${a.error.message} ${a.error.hint}`:((v=a==null?void 0:a.error)==null?void 0:v.message)??`Request failed: ${o.status}`,h=(f=a==null?void 0:a.error)==null?void 0:f.runtime,d=h?` [backend ${h.version??"unknown"} pid=${h.pid??"unknown"} cwd=${h.cwd??"unknown"}]`:"";throw new Error(`${c}${d}`)}return o.json()}const Ia=`
|
|
83
|
+
`});return u(),m(),_+`
|
|
84
|
+
`+(d===1?"=":"-").repeat(_.length-(Math.max(_.lastIndexOf("\r"),_.lastIndexOf(`
|
|
85
|
+
`))+1))}const f="#".repeat(d),a=s.enter("headingAtx"),c=s.enter("phrasing");v.move(f+" ");let h=s.containerPhrasing(n,{before:"# ",after:`
|
|
86
|
+
`,...v.current()});return/^[\t ]/.test(h)&&(h=ol(h.charCodeAt(0))+h.slice(1)),h=h?f+" "+h:f,s.options.closeAtx&&(h+=" "+f),c(),a(),h}s_.peek=qw;function s_(n){return n.value||""}function qw(){return"<"}l_.peek=Gw;function l_(n,r,s,o){const d=rh(s),v=d==='"'?"Quote":"Apostrophe",f=s.enter("image");let a=s.enter("label");const c=s.createTracker(o);let h=c.move("![");return h+=c.move(s.safe(n.alt,{before:h,after:"]",...c.current()})),h+=c.move("]("),a(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(a=s.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(s.safe(n.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(a=s.enter("destinationRaw"),h+=c.move(s.safe(n.url,{before:h,after:n.title?" ":")",...c.current()}))),a(),n.title&&(a=s.enter(`title${v}`),h+=c.move(" "+d),h+=c.move(s.safe(n.title,{before:h,after:d,...c.current()})),h+=c.move(d),a()),h+=c.move(")"),f(),h}function Gw(){return"!"}a_.peek=Vw;function a_(n,r,s,o){const d=n.referenceType,v=s.enter("imageReference");let f=s.enter("label");const a=s.createTracker(o);let c=a.move("![");const h=s.safe(n.alt,{before:c,after:"]",...a.current()});c+=a.move(h+"]["),f();const m=s.stack;s.stack=[],f=s.enter("reference");const u=s.safe(s.associationId(n),{before:c,after:"]",...a.current()});return f(),s.stack=m,v(),d==="full"||!h||h!==u?c+=a.move(u+"]"):d==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function Vw(){return"!"}o_.peek=$w;function o_(n,r,s){let o=n.value||"",d="`",v=-1;for(;new RegExp("(^|[^`])"+d+"([^`]|$)").test(o);)d+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++v<s.unsafe.length;){const f=s.unsafe[v],a=s.compilePattern(f);let c;if(f.atBreak)for(;c=a.exec(o);){let h=c.index;o.charCodeAt(h)===10&&o.charCodeAt(h-1)===13&&h--,o=o.slice(0,h)+" "+o.slice(c.index+1)}}return d+o+d}function $w(){return"`"}function c_(n,r){const s=Wu(n);return!!(!r.options.resourceLink&&n.url&&!n.title&&n.children&&n.children.length===1&&n.children[0].type==="text"&&(s===n.url||"mailto:"+s===n.url)&&/^[a-z][a-z+.-]+:/i.test(n.url)&&!/[\0- <>\u007F]/.test(n.url))}u_.peek=Kw;function u_(n,r,s,o){const d=rh(s),v=d==='"'?"Quote":"Apostrophe",f=s.createTracker(o);let a,c;if(c_(n,s)){const m=s.stack;s.stack=[],a=s.enter("autolink");let u=f.move("<");return u+=f.move(s.containerPhrasing(n,{before:u,after:">",...f.current()})),u+=f.move(">"),a(),s.stack=m,u}a=s.enter("link"),c=s.enter("label");let h=f.move("[");return h+=f.move(s.containerPhrasing(n,{before:h,after:"](",...f.current()})),h+=f.move("]("),c(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(c=s.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(s.safe(n.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(c=s.enter("destinationRaw"),h+=f.move(s.safe(n.url,{before:h,after:n.title?" ":")",...f.current()}))),c(),n.title&&(c=s.enter(`title${v}`),h+=f.move(" "+d),h+=f.move(s.safe(n.title,{before:h,after:d,...f.current()})),h+=f.move(d),c()),h+=f.move(")"),a(),h}function Kw(n,r,s){return c_(n,s)?"<":"["}h_.peek=Yw;function h_(n,r,s,o){const d=n.referenceType,v=s.enter("linkReference");let f=s.enter("label");const a=s.createTracker(o);let c=a.move("[");const h=s.containerPhrasing(n,{before:c,after:"]",...a.current()});c+=a.move(h+"]["),f();const m=s.stack;s.stack=[],f=s.enter("reference");const u=s.safe(s.associationId(n),{before:c,after:"]",...a.current()});return f(),s.stack=m,v(),d==="full"||!h||h!==u?c+=a.move(u+"]"):d==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function Yw(){return"["}function sh(n){const r=n.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function Ww(n){const r=sh(n),s=n.options.bulletOther;if(!s)return r==="*"?"-":"*";if(s!=="*"&&s!=="+"&&s!=="-")throw new Error("Cannot serialize items with `"+s+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(s===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+s+"`) to be different");return s}function Xw(n){const r=n.options.bulletOrdered||".";if(r!=="."&&r!==")")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r}function f_(n){const r=n.options.rule||"*";if(r!=="*"&&r!=="-"&&r!=="_")throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r}function Qw(n,r,s,o){const d=s.enter("list"),v=s.bulletCurrent;let f=n.ordered?Xw(s):sh(s);const a=n.ordered?f==="."?")":".":Ww(s);let c=r&&s.bulletLastUsed?f===s.bulletLastUsed:!1;if(!n.ordered){const m=n.children?n.children[0]:void 0;if((f==="*"||f==="-")&&m&&(!m.children||!m.children[0])&&s.stack[s.stack.length-1]==="list"&&s.stack[s.stack.length-2]==="listItem"&&s.stack[s.stack.length-3]==="list"&&s.stack[s.stack.length-4]==="listItem"&&s.indexStack[s.indexStack.length-1]===0&&s.indexStack[s.indexStack.length-2]===0&&s.indexStack[s.indexStack.length-3]===0&&(c=!0),f_(s)===f&&m){let u=-1;for(;++u<n.children.length;){const _=n.children[u];if(_&&_.type==="listItem"&&_.children&&_.children[0]&&_.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(f=a),s.bulletCurrent=f;const h=s.containerFlow(n,o);return s.bulletLastUsed=f,s.bulletCurrent=v,d(),h}function Zw(n){const r=n.options.listItemIndent||"one";if(r!=="tab"&&r!=="one"&&r!=="mixed")throw new Error("Cannot serialize items with `"+r+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return r}function Jw(n,r,s,o){const d=Zw(s);let v=s.bulletCurrent||sh(s);r&&r.type==="list"&&r.ordered&&(v=(typeof r.start=="number"&&r.start>-1?r.start:1)+(s.options.incrementListMarker===!1?0:r.children.indexOf(n))+v);let f=v.length+1;(d==="tab"||d==="mixed"&&(r&&r.type==="list"&&r.spread||n.spread))&&(f=Math.ceil(f/4)*4);const a=s.createTracker(o);a.move(v+" ".repeat(f-v.length)),a.shift(f);const c=s.enter("listItem"),h=s.indentLines(s.containerFlow(n,a.current()),m);return c(),h;function m(u,_,C){return _?(C?"":" ".repeat(f))+u:(C?v:v+" ".repeat(f-v.length))+u}}function ex(n,r,s,o){const d=s.enter("paragraph"),v=s.enter("phrasing"),f=s.containerPhrasing(n,o);return v(),d(),f}const tx=Ga(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function nx(n,r,s,o){return(n.children.some(function(f){return tx(f)})?s.containerPhrasing:s.containerFlow).call(s,n,o)}function ix(n){const r=n.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}d_.peek=rx;function d_(n,r,s,o){const d=ix(s),v=s.enter("strong"),f=s.createTracker(o),a=f.move(d+d);let c=f.move(s.containerPhrasing(n,{after:d,before:a,...f.current()}));const h=c.charCodeAt(0),m=Ha(o.before.charCodeAt(o.before.length-1),h,d);m.inside&&(c=ol(h)+c.slice(1));const u=c.charCodeAt(c.length-1),_=Ha(o.after.charCodeAt(0),u,d);_.inside&&(c=c.slice(0,-1)+ol(u));const C=f.move(d+d);return v(),s.attentionEncodeSurroundingInfo={after:_.outside,before:m.outside},a+c+C}function rx(n,r,s){return s.options.strong||"*"}function sx(n,r,s,o){return s.safe(n.value,o)}function lx(n){const r=n.options.ruleRepetition||3;if(r<3)throw new Error("Cannot serialize rules with repetition `"+r+"` for `options.ruleRepetition`, expected `3` or more");return r}function ax(n,r,s){const o=(f_(s)+(s.options.ruleSpaces?" ":"")).repeat(lx(s));return s.options.ruleSpaces?o.slice(0,-1):o}const p_={blockquote:Rw,break:Zm,code:jw,definition:Hw,emphasis:r_,hardBreak:Zm,heading:Fw,html:s_,image:l_,imageReference:a_,inlineCode:o_,link:u_,linkReference:h_,list:Qw,listItem:Jw,paragraph:ex,root:nx,strong:d_,text:sx,thematicBreak:ax};function ox(){return{enter:{table:cx,tableData:Jm,tableHeader:Jm,tableRow:hx},exit:{codeText:fx,table:ux,tableData:Eu,tableHeader:Eu,tableRow:Eu}}}function cx(n){const r=n._align;this.enter({type:"table",align:r.map(function(s){return s==="none"?null:s}),children:[]},n),this.data.inTable=!0}function ux(n){this.exit(n),this.data.inTable=void 0}function hx(n){this.enter({type:"tableRow",children:[]},n)}function Eu(n){this.exit(n)}function Jm(n){this.enter({type:"tableCell",children:[]},n)}function fx(n){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,dx));const s=this.stack[this.stack.length-1];s.type,s.value=r,this.exit(n)}function dx(n,r){return r==="|"?r:n}function px(n){const r=n||{},s=r.tableCellPadding,o=r.tablePipeAlign,d=r.stringLength,v=s?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
87
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:_,table:f,tableCell:c,tableRow:a}};function f(C,E,x,b){return h(m(C,x,b),C.align)}function a(C,E,x,b){const S=u(C,x,b),g=h([S]);return g.slice(0,g.indexOf(`
|
|
88
|
+
`))}function c(C,E,x,b){const S=x.enter("tableCell"),g=x.enter("phrasing"),y=x.containerPhrasing(C,{...b,before:v,after:v});return g(),S(),y}function h(C,E){return Tw(C,{align:E,alignDelimiters:o,padding:s,stringLength:d})}function m(C,E,x){const b=C.children;let S=-1;const g=[],y=E.enter("table");for(;++S<b.length;)g[S]=u(b[S],E,x);return y(),g}function u(C,E,x){const b=C.children;let S=-1;const g=[],y=E.enter("tableRow");for(;++S<b.length;)g[S]=c(b[S],C,E,x);return y(),g}function _(C,E,x){let b=p_.inlineCode(C,E,x);return x.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function mx(){return{exit:{taskListCheckValueChecked:eg,taskListCheckValueUnchecked:eg,paragraph:_x}}}function gx(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:vx}}}function eg(n){const r=this.stack[this.stack.length-2];r.type,r.checked=n.type==="taskListCheckValueChecked"}function _x(n){const r=this.stack[this.stack.length-2];if(r&&r.type==="listItem"&&typeof r.checked=="boolean"){const s=this.stack[this.stack.length-1];s.type;const o=s.children[0];if(o&&o.type==="text"){const d=r.children;let v=-1,f;for(;++v<d.length;){const a=d[v];if(a.type==="paragraph"){f=a;break}}f===s&&(o.value=o.value.slice(1),o.value.length===0?s.children.shift():s.position&&o.position&&typeof o.position.start.offset=="number"&&(o.position.start.column++,o.position.start.offset++,s.position.start=Object.assign({},o.position.start)))}}this.exit(n)}function vx(n,r,s,o){const d=n.children[0],v=typeof n.checked=="boolean"&&d&&d.type==="paragraph",f="["+(n.checked?"x":" ")+"] ",a=s.createTracker(o);v&&a.move(f);let c=p_.listItem(n,r,s,{...o,...a.current()});return v&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),c;function h(m){return m+f}}function yx(){return[QC(),vw(),Cw(),ox(),mx()]}function Sx(n){return{extensions:[ZC(),yw(n),ww(),px(n),gx()]}}const bx={tokenize:Ax,partial:!0},m_={tokenize:Tx,partial:!0},g_={tokenize:Dx,partial:!0},__={tokenize:Rx,partial:!0},Cx={tokenize:Mx,partial:!0},v_={name:"wwwAutolink",tokenize:Ex,previous:S_},y_={name:"protocolAutolink",tokenize:kx,previous:b_},ci={name:"emailAutolink",tokenize:xx,previous:C_},Fn={};function wx(){return{text:Fn}}let or=48;for(;or<123;)Fn[or]=ci,or++,or===58?or=65:or===91&&(or=97);Fn[43]=ci;Fn[45]=ci;Fn[46]=ci;Fn[95]=ci;Fn[72]=[ci,y_];Fn[104]=[ci,y_];Fn[87]=[ci,v_];Fn[119]=[ci,v_];function xx(n,r,s){const o=this;let d,v;return f;function f(u){return!ju(u)||!C_.call(o,o.previous)||lh(o.events)?s(u):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),a(u))}function a(u){return ju(u)?(n.consume(u),a):u===64?(n.consume(u),c):s(u)}function c(u){return u===46?n.check(Cx,m,h)(u):u===45||u===95||Vt(u)?(v=!0,n.consume(u),c):m(u)}function h(u){return n.consume(u),d=!0,c}function m(u){return v&&d&&Qt(o.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),r(u)):s(u)}}function Ex(n,r,s){const o=this;return d;function d(f){return f!==87&&f!==119||!S_.call(o,o.previous)||lh(o.events)?s(f):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(bx,n.attempt(m_,n.attempt(g_,v),s),s)(f))}function v(f){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),r(f)}}function kx(n,r,s){const o=this;let d="",v=!1;return f;function f(u){return(u===72||u===104)&&b_.call(o,o.previous)&&!lh(o.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),d+=String.fromCodePoint(u),n.consume(u),a):s(u)}function a(u){if(Qt(u)&&d.length<5)return d+=String.fromCodePoint(u),n.consume(u),a;if(u===58){const _=d.toLowerCase();if(_==="http"||_==="https")return n.consume(u),c}return s(u)}function c(u){return u===47?(n.consume(u),v?h:(v=!0,c)):s(u)}function h(u){return u===null||Na(u)||lt(u)||cr(u)||Pa(u)?s(u):n.attempt(m_,n.attempt(g_,m),s)(u)}function m(u){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),r(u)}}function Ax(n,r,s){let o=0;return d;function d(f){return(f===87||f===119)&&o<3?(o++,n.consume(f),d):f===46&&o===3?(n.consume(f),v):s(f)}function v(f){return f===null?s(f):r(f)}}function Tx(n,r,s){let o,d,v;return f;function f(h){return h===46||h===95?n.check(__,c,a)(h):h===null||lt(h)||cr(h)||h!==45&&Pa(h)?c(h):(v=!0,n.consume(h),f)}function a(h){return h===95?o=!0:(d=o,o=void 0),n.consume(h),f}function c(h){return d||o||!v?s(h):r(h)}}function Dx(n,r){let s=0,o=0;return d;function d(f){return f===40?(s++,n.consume(f),d):f===41&&o<s?v(f):f===33||f===34||f===38||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===60||f===63||f===93||f===95||f===126?n.check(__,r,v)(f):f===null||lt(f)||cr(f)?r(f):(n.consume(f),d)}function v(f){return f===41&&o++,n.consume(f),d}}function Rx(n,r,s){return o;function o(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(n.consume(a),o):a===38?(n.consume(a),v):a===93?(n.consume(a),d):a===60||a===null||lt(a)||cr(a)?r(a):s(a)}function d(a){return a===null||a===40||a===91||lt(a)||cr(a)?r(a):o(a)}function v(a){return Qt(a)?f(a):s(a)}function f(a){return a===59?(n.consume(a),o):Qt(a)?(n.consume(a),f):s(a)}}function Mx(n,r,s){return o;function o(v){return n.consume(v),d}function d(v){return Vt(v)?s(v):r(v)}}function S_(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||lt(n)}function b_(n){return!Qt(n)}function C_(n){return!(n===47||ju(n))}function ju(n){return n===43||n===45||n===46||n===95||Vt(n)}function lh(n){let r=n.length,s=!1;for(;r--;){const o=n[r][1];if((o.type==="labelLink"||o.type==="labelImage")&&!o._balanced){s=!0;break}if(o._gfmAutolinkLiteralWalkedInto){s=!1;break}}return n.length>0&&!s&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),s}const Lx={tokenize:Ux,partial:!0};function Ox(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:zx,continuation:{tokenize:Hx},exit:Ix}},text:{91:{name:"gfmFootnoteCall",tokenize:jx},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Bx,resolveTo:Nx}}}}function Bx(n,r,s){const o=this;let d=o.events.length;const v=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let f;for(;d--;){const c=o.events[d][1];if(c.type==="labelImage"){f=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return a;function a(c){if(!f||!f._balanced)return s(c);const h=Ln(o.sliceSerialize({start:f.end,end:o.now()}));return h.codePointAt(0)!==94||!v.includes(h.slice(1))?s(c):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(c),n.exit("gfmFootnoteCallLabelMarker"),r(c))}}function Nx(n,r){let s=n.length;for(;s--;)if(n[s][1].type==="labelImage"&&n[s][0]==="enter"){n[s][1];break}n[s+1][1].type="data",n[s+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},n[s+3][1].start),end:Object.assign({},n[n.length-1][1].end)},d={type:"gfmFootnoteCallMarker",start:Object.assign({},n[s+3][1].end),end:Object.assign({},n[s+3][1].end)};d.end.column++,d.end.offset++,d.end._bufferIndex++;const v={type:"gfmFootnoteCallString",start:Object.assign({},d.end),end:Object.assign({},n[n.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},v.start),end:Object.assign({},v.end)},a=[n[s+1],n[s+2],["enter",o,r],n[s+3],n[s+4],["enter",d,r],["exit",d,r],["enter",v,r],["enter",f,r],["exit",f,r],["exit",v,r],n[n.length-2],n[n.length-1],["exit",o,r]];return n.splice(s,n.length-s+1,...a),n}function jx(n,r,s){const o=this,d=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let v=0,f;return a;function a(u){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),c}function c(u){return u!==94?s(u):(n.enter("gfmFootnoteCallMarker"),n.consume(u),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",h)}function h(u){if(v>999||u===93&&!f||u===null||u===91||lt(u))return s(u);if(u===93){n.exit("chunkString");const _=n.exit("gfmFootnoteCallString");return d.includes(Ln(o.sliceSerialize(_)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),r):s(u)}return lt(u)||(f=!0),v++,n.consume(u),u===92?m:h}function m(u){return u===91||u===92||u===93?(n.consume(u),v++,h):h(u)}}function zx(n,r,s){const o=this,d=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let v,f=0,a;return c;function c(E){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(E),n.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(E){return E===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(E),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",m):s(E)}function m(E){if(f>999||E===93&&!a||E===null||E===91||lt(E))return s(E);if(E===93){n.exit("chunkString");const x=n.exit("gfmFootnoteDefinitionLabelString");return v=Ln(o.sliceSerialize(x)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(E),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),_}return lt(E)||(a=!0),f++,n.consume(E),E===92?u:m}function u(E){return E===91||E===92||E===93?(n.consume(E),f++,m):m(E)}function _(E){return E===58?(n.enter("definitionMarker"),n.consume(E),n.exit("definitionMarker"),d.includes(v)||d.push(v),Ye(n,C,"gfmFootnoteDefinitionWhitespace")):s(E)}function C(E){return r(E)}}function Hx(n,r,s){return n.check(ul,r,n.attempt(Lx,r,s))}function Ix(n){n.exit("gfmFootnoteDefinition")}function Ux(n,r,s){const o=this;return Ye(n,d,"gfmFootnoteDefinitionIndent",5);function d(v){const f=o.events[o.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?r(v):s(v)}}function Px(n){let s=(n||{}).singleTilde;const o={name:"strikethrough",tokenize:v,resolveAll:d};return s==null&&(s=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function d(f,a){let c=-1;for(;++c<f.length;)if(f[c][0]==="enter"&&f[c][1].type==="strikethroughSequenceTemporary"&&f[c][1]._close){let h=c;for(;h--;)if(f[h][0]==="exit"&&f[h][1].type==="strikethroughSequenceTemporary"&&f[h][1]._open&&f[c][1].end.offset-f[c][1].start.offset===f[h][1].end.offset-f[h][1].start.offset){f[c][1].type="strikethroughSequence",f[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},f[h][1].start),end:Object.assign({},f[c][1].end)},u={type:"strikethroughText",start:Object.assign({},f[h][1].end),end:Object.assign({},f[c][1].start)},_=[["enter",m,a],["enter",f[h][1],a],["exit",f[h][1],a],["enter",u,a]],C=a.parser.constructs.insideSpan.null;C&&_n(_,_.length,0,Fa(C,f.slice(h+1,c),a)),_n(_,_.length,0,[["exit",u,a],["enter",f[c][1],a],["exit",f[c][1],a],["exit",m,a]]),_n(f,h-1,c-h+3,_),c=h+_.length-2;break}}for(c=-1;++c<f.length;)f[c][1].type==="strikethroughSequenceTemporary"&&(f[c][1].type="data");return f}function v(f,a,c){const h=this.previous,m=this.events;let u=0;return _;function _(E){return h===126&&m[m.length-1][1].type!=="characterEscape"?c(E):(f.enter("strikethroughSequenceTemporary"),C(E))}function C(E){const x=Zr(h);if(E===126)return u>1?c(E):(f.consume(E),u++,C);if(u<2&&!s)return c(E);const b=f.exit("strikethroughSequenceTemporary"),S=Zr(E);return b._open=!S||S===2&&!!x,b._close=!x||x===2&&!!S,a(E)}}}class Fx{constructor(){this.map=[]}add(r,s,o){qx(this,r,s,o)}consume(r){if(this.map.sort(function(v,f){return v[0]-f[0]}),this.map.length===0)return;let s=this.map.length;const o=[];for(;s>0;)s-=1,o.push(r.slice(this.map[s][0]+this.map[s][1]),this.map[s][2]),r.length=this.map[s][0];o.push(r.slice()),r.length=0;let d=o.pop();for(;d;){for(const v of d)r.push(v);d=o.pop()}this.map.length=0}}function qx(n,r,s,o){let d=0;if(!(s===0&&o.length===0)){for(;d<n.map.length;){if(n.map[d][0]===r){n.map[d][1]+=s,n.map[d][2].push(...o);return}d+=1}n.map.push([r,s,o])}}function Gx(n,r){let s=!1;const o=[];for(;r<n.length;){const d=n[r];if(s){if(d[0]==="enter")d[1].type==="tableContent"&&o.push(n[r+1][1].type==="tableDelimiterMarker"?"left":"none");else if(d[1].type==="tableContent"){if(n[r-1][1].type==="tableDelimiterMarker"){const v=o.length-1;o[v]=o[v]==="left"?"center":"right"}}else if(d[1].type==="tableDelimiterRow")break}else d[0]==="enter"&&d[1].type==="tableDelimiterRow"&&(s=!0);r+=1}return o}function Vx(){return{flow:{null:{name:"table",tokenize:$x,resolveAll:Kx}}}}function $x(n,r,s){const o=this;let d=0,v=0,f;return a;function a(N){let I=o.events.length-1;for(;I>-1;){const K=o.events[I][1].type;if(K==="lineEnding"||K==="linePrefix")I--;else break}const P=I>-1?o.events[I][1].type:null,F=P==="tableHead"||P==="tableRow"?D:c;return F===D&&o.parser.lazy[o.now().line]?s(N):F(N)}function c(N){return n.enter("tableHead"),n.enter("tableRow"),h(N)}function h(N){return N===124||(f=!0,v+=1),m(N)}function m(N){return N===null?s(N):Le(N)?v>1?(v=0,o.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(N),n.exit("lineEnding"),C):s(N):qe(N)?Ye(n,m,"whitespace")(N):(v+=1,f&&(f=!1,d+=1),N===124?(n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),f=!0,m):(n.enter("data"),u(N)))}function u(N){return N===null||N===124||lt(N)?(n.exit("data"),m(N)):(n.consume(N),N===92?_:u)}function _(N){return N===92||N===124?(n.consume(N),u):u(N)}function C(N){return o.interrupt=!1,o.parser.lazy[o.now().line]?s(N):(n.enter("tableDelimiterRow"),f=!1,qe(N)?Ye(n,E,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):E(N))}function E(N){return N===45||N===58?b(N):N===124?(f=!0,n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),x):M(N)}function x(N){return qe(N)?Ye(n,b,"whitespace")(N):b(N)}function b(N){return N===58?(v+=1,f=!0,n.enter("tableDelimiterMarker"),n.consume(N),n.exit("tableDelimiterMarker"),S):N===45?(v+=1,S(N)):N===null||Le(N)?A(N):M(N)}function S(N){return N===45?(n.enter("tableDelimiterFiller"),g(N)):M(N)}function g(N){return N===45?(n.consume(N),g):N===58?(f=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(N),n.exit("tableDelimiterMarker"),y):(n.exit("tableDelimiterFiller"),y(N))}function y(N){return qe(N)?Ye(n,A,"whitespace")(N):A(N)}function A(N){return N===124?E(N):N===null||Le(N)?!f||d!==v?M(N):(n.exit("tableDelimiterRow"),n.exit("tableHead"),r(N)):M(N)}function M(N){return s(N)}function D(N){return n.enter("tableRow"),T(N)}function T(N){return N===124?(n.enter("tableCellDivider"),n.consume(N),n.exit("tableCellDivider"),T):N===null||Le(N)?(n.exit("tableRow"),r(N)):qe(N)?Ye(n,T,"whitespace")(N):(n.enter("data"),k(N))}function k(N){return N===null||N===124||lt(N)?(n.exit("data"),T(N)):(n.consume(N),N===92?R:k)}function R(N){return N===92||N===124?(n.consume(N),k):k(N)}}function Kx(n,r){let s=-1,o=!0,d=0,v=[0,0,0,0],f=[0,0,0,0],a=!1,c=0,h,m,u;const _=new Fx;for(;++s<n.length;){const C=n[s],E=C[1];C[0]==="enter"?E.type==="tableHead"?(a=!1,c!==0&&(tg(_,r,c,h,m),m=void 0,c=0),h={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},_.add(s,0,[["enter",h,r]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(o=!0,u=void 0,v=[0,0,0,0],f=[0,s+1,0,0],a&&(a=!1,m={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},_.add(s,0,[["enter",m,r]])),d=E.type==="tableDelimiterRow"?2:m?3:1):d&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(o=!1,f[2]===0&&(v[1]!==0&&(f[0]=f[1],u=Ma(_,r,v,d,void 0,u),v=[0,0,0,0]),f[2]=s)):E.type==="tableCellDivider"&&(o?o=!1:(v[1]!==0&&(f[0]=f[1],u=Ma(_,r,v,d,void 0,u)),v=f,f=[v[1],s,0,0])):E.type==="tableHead"?(a=!0,c=s):E.type==="tableRow"||E.type==="tableDelimiterRow"?(c=s,v[1]!==0?(f[0]=f[1],u=Ma(_,r,v,d,s,u)):f[1]!==0&&(u=Ma(_,r,f,d,s,u)),d=0):d&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(f[3]=s)}for(c!==0&&tg(_,r,c,h,m),_.consume(r.events),s=-1;++s<r.events.length;){const C=r.events[s];C[0]==="enter"&&C[1].type==="table"&&(C[1]._align=Gx(r.events,s))}return n}function Ma(n,r,s,o,d,v){const f=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",a="tableContent";s[0]!==0&&(v.end=Object.assign({},Yr(r.events,s[0])),n.add(s[0],0,[["exit",v,r]]));const c=Yr(r.events,s[1]);if(v={type:f,start:Object.assign({},c),end:Object.assign({},c)},n.add(s[1],0,[["enter",v,r]]),s[2]!==0){const h=Yr(r.events,s[2]),m=Yr(r.events,s[3]),u={type:a,start:Object.assign({},h),end:Object.assign({},m)};if(n.add(s[2],0,[["enter",u,r]]),o!==2){const _=r.events[s[2]],C=r.events[s[3]];if(_[1].end=Object.assign({},C[1].end),_[1].type="chunkText",_[1].contentType="text",s[3]>s[2]+1){const E=s[2]+1,x=s[3]-s[2]-1;n.add(E,x,[])}}n.add(s[3]+1,0,[["exit",u,r]])}return d!==void 0&&(v.end=Object.assign({},Yr(r.events,d)),n.add(d,0,[["exit",v,r]]),v=void 0),v}function tg(n,r,s,o,d){const v=[],f=Yr(r.events,s);d&&(d.end=Object.assign({},f),v.push(["exit",d,r])),o.end=Object.assign({},f),v.push(["exit",o,r]),n.add(s+1,0,v)}function Yr(n,r){const s=n[r],o=s[0]==="enter"?"start":"end";return s[1][o]}const Yx={name:"tasklistCheck",tokenize:Xx};function Wx(){return{text:{91:Yx}}}function Xx(n,r,s){const o=this;return d;function d(c){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?s(c):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(c),n.exit("taskListCheckMarker"),v)}function v(c){return lt(c)?(n.enter("taskListCheckValueUnchecked"),n.consume(c),n.exit("taskListCheckValueUnchecked"),f):c===88||c===120?(n.enter("taskListCheckValueChecked"),n.consume(c),n.exit("taskListCheckValueChecked"),f):s(c)}function f(c){return c===93?(n.enter("taskListCheckMarker"),n.consume(c),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),a):s(c)}function a(c){return Le(c)?r(c):qe(c)?n.check({tokenize:Qx},r,s)(c):s(c)}}function Qx(n,r,s){return Ye(n,o,"whitespace");function o(d){return d===null?s(d):r(d)}}function Zx(n){return Lg([wx(),Ox(),Px(n),Vx(),Wx()])}const Jx={};function w_(n){const r=this,s=n||Jx,o=r.data(),d=o.micromarkExtensions||(o.micromarkExtensions=[]),v=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),f=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);d.push(Zx(s)),v.push(yx()),f.push(Sx(s))}const e2=500,be={getAppPreferences(){return Ae("/api/settings/preferences")},updateAppPreferences(n){return Ae("/api/settings/preferences",{method:"PUT",body:JSON.stringify(n)})},getRuntimeDiagnostics(){return Ae("/api/diagnostics/runtime")},getCurrentProject(){return Ae("/api/projects/current")},pullCurrentProject(){return Ae("/api/projects/current/pull",{method:"POST"})},getRecentRepositoryPaths(){return Ae("/api/projects/recent")},connectProject(n){return Ae("/api/projects/connect",{method:"POST",body:JSON.stringify(n)})},listTasks(){return Ae("/api/tasks")},createTask(n){return Ae("/api/tasks",{method:"POST",body:JSON.stringify(n)})},cleanupTask(n,r={}){return Ae(`/api/tasks/${encodeURIComponent(n)}/cleanup`,{method:"POST",body:JSON.stringify(r)})},getHarnessStatus(){return Ae("/api/projects/harness")},applyHarness(){return Ae("/api/projects/harness/apply",{method:"POST"})},commitAndRebaseHarnessTask(n,r){return Ae(`/api/projects/harness/tasks/${encodeURIComponent(n)}/commit-and-rebase`,{method:"POST",body:JSON.stringify(r)})},getHarnessBootstrapStatus(){return Ae("/api/projects/harness/bootstrap")},startHarnessBootstrap(n={}){return Ae("/api/projects/harness/bootstrap/start",{method:"POST",body:JSON.stringify(n)})},getTaskStatus(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/status`)},listSessions(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions`)},startRoleSession(n,r,s={}){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/start`,{method:"POST",body:JSON.stringify(s)})},stopRoleSession(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/stop`,{method:"POST"})},restartRoleSession(n,r,s={}){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/restart`,{method:"POST",body:JSON.stringify(s)})},resumeRoleSession(n,r,s={}){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/resume`,{method:"POST",body:JSON.stringify(s)})},dispatchRoleCommand(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/dispatch`,{method:"POST"})},listMessages(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/messages`)},markAllMessagesDone(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/messages/mark-all-done`,{method:"POST"})},deleteMessageHistory(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/messages/history`,{method:"DELETE"})},getOrchestrationState(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/orchestration`)},updateOrchestrationState(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/orchestration`,{method:"PUT",body:JSON.stringify(r)})},getSessionRoundState(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/round`)},getCodexReviewState(n){return Ae(`/api/tasks/${encodeURIComponent(n)}/codex-review`)},updateCodexReviewSettings(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/codex-review/settings`,{method:"PUT",body:JSON.stringify(r)})},requestCodexReviewGate(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/request`,{method:"POST"})},retryCodexReviewGate(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/retry`,{method:"POST"})},skipCodexReviewGate(n,r,s){return Ae(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/skip`,{method:"POST",body:JSON.stringify(s)})},overrideCodexReviewGate(n,r,s){return Ae(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/override`,{method:"POST",body:JSON.stringify(s)})},getCodexReviewReport(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/codex-review/${r}/report`)},startTranslationSession(n,r){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/start`,{method:"POST"})},pollTranslationSession(n,r,s){const o=new URLSearchParams({after:String(r)});return s!==void 0&&o.set("limit",String(s)),Ae(`/api/translation/sessions/${encodeURIComponent(n)}/events?${o.toString()}`)},translateUserInput(n,r,s){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/input`,{method:"POST",body:JSON.stringify(s)})},sendTranslatedInput(n,r,s){return Ae(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/send`,{method:"POST",body:JSON.stringify(s)})},clearTranslationSession(n){return Ae(`/api/translation/sessions/${encodeURIComponent(n)}/clear`,{method:"POST"})},stopTranslationSession(n){return Ae(`/api/translation/sessions/${encodeURIComponent(n)}/stop`,{method:"POST"})},retryTranslation(n,r){return Ae(`/api/translation/sessions/${encodeURIComponent(n)}/retry/${encodeURIComponent(r)}`,{method:"POST"})},ignoreTranslationFailures(n){return Ae(`/api/translation/sessions/${encodeURIComponent(n)}/failures/ignore`,{method:"POST"})},retryTranslationFailures(n){return Ae(`/api/translation/sessions/${encodeURIComponent(n)}/failures/retry`,{method:"POST"})},getCodexTranslationState(){return Ae("/api/translation/codex/state")},getCodexTranslatorSession(){return Ae("/api/translation/codex/session")},ensureCodexTranslatorSession(n={}){return Ae("/api/translation/codex/session/ensure",{method:"POST",body:JSON.stringify(n)})},startCodexTranslatorSession(n={}){return Ae("/api/translation/codex/session/start",{method:"POST",body:JSON.stringify(n)})},resumeCodexTranslatorSession(n={}){return Ae("/api/translation/codex/session/resume",{method:"POST",body:JSON.stringify(n)})},restartCodexTranslatorSession(n={}){return Ae("/api/translation/codex/session/restart",{method:"POST",body:JSON.stringify(n)})},stopCodexTranslatorSession(){return Ae("/api/translation/codex/session/stop",{method:"POST"})},browseCodexTranslationSourceFiles(n={}){const r=new URLSearchParams;n.path&&r.set("path",n.path),n.query&&r.set("query",n.query),n.limit!==void 0&&r.set("limit",String(n.limit));const s=r.toString()?`?${r.toString()}`:"";return Ae(`/api/translation/codex/source-files${s}`)},createCodexFileTranslation(n){return Ae("/api/translation/codex/files",{method:"POST",body:JSON.stringify(n)})},readCodexFileTranslation(n){return Ae(`/api/translation/codex/files/${encodeURIComponent(n)}`)},createCodexBootstrap(n){return Ae("/api/translation/codex/bootstrap",{method:"POST",body:JSON.stringify(n)})},createCodexMemoryUpdate(n){return Ae("/api/translation/codex/memory-update",{method:"POST",body:JSON.stringify(n)})},promoteCodexTranslation(n,r){return Ae(`/api/translation/codex/files/${encodeURIComponent(n)}/promote`,{method:"POST",body:JSON.stringify({targetPath:r})})},getGatewayStatus(){return Ae("/api/gateway/status")},updateGatewaySettings(n){return Ae("/api/gateway/settings",{method:"PUT",body:JSON.stringify(n)})},startGatewayQrLogin(){return Ae("/api/gateway/qr/start",{method:"POST"})},checkGatewayQrLogin(n={}){return Ae("/api/gateway/qr/check",{method:"POST",body:JSON.stringify(n)})},resetGatewayBinding(){return Ae("/api/gateway/binding/reset",{method:"POST"})}};async function Ae(n,r={}){var d,v,f;const s=new Headers(r.headers);r.body!==void 0&&r.body!==null&&!s.has("content-type")&&s.set("content-type","application/json");const o=await fetch(n,{...r,headers:s});if(!o.ok){const a=await o.json().catch(()=>null),c=(d=a==null?void 0:a.error)!=null&&d.hint?`${a.error.message} ${a.error.hint}`:((v=a==null?void 0:a.error)==null?void 0:v.message)??`Request failed: ${o.status}`,h=(f=a==null?void 0:a.error)==null?void 0:f.runtime,m=h?` [backend ${h.version??"unknown"} pid=${h.pid??"unknown"} cwd=${h.cwd??"unknown"}]`:"";throw new Error(`${c}${m}`)}return o.json()}const Ia=`
|
|
89
89
|
|
|
90
90
|
--- Translation ---
|
|
91
|
-
`;function t2({active:n=!0,autoSendEnabled:r,targetLanguage:s,taskSlug:o,role:p,sessionId:v}){const[f,a]=ae.useState([]),[c,h]=ae.useState([]),[d,u]=ae.useState(""),[b,w]=ae.useState(!1),[E,x]=ae.useState("ready"),[S,_]=ae.useState(""),[g,y]=ae.useState(Date.now()),[A,M]=ae.useState(!1),[D,T]=ae.useState(""),[k,R]=ae.useState(0),N=ae.useRef(n),I=ae.useRef(1),P=ae.useRef(null);ae.useEffect(()=>{N.current=n},[n]),ae.useEffect(()=>{a([]),h([]),T(""),x("ready"),_(""),I.current=1;let j=!1,te;const ue=()=>{j||(te=window.setTimeout(me,N.current?200:1e3))},me=async()=>{if(!j)try{const Y=await Ce.pollTranslationSession(v,I.current);if(j)return;W(Y.events),I.current=Y.nextCursor,x(Y.status),N.current&&_(g2(new Date().toISOString()))}catch(Y){j||T(Y instanceof Error?Y.message:"Translation poll failed.")}finally{ue()}};return Ce.startTranslationSession(o,p).then(Y=>{j||(x(Y.status),I.current=Y.nextCursor,me())}).catch(Y=>{j||T(Y instanceof Error?Y.message:"Translation start failed.")}),()=>{j=!0,te!==void 0&&window.clearTimeout(te),Ce.stopTranslationSession(v).catch(()=>{})}},[v,o,p]),ae.useEffect(()=>{if(!n)return;const j=P.current;if(!j)return;const te=window.requestAnimationFrame(()=>{j.scrollTop=j.scrollHeight});return()=>window.cancelAnimationFrame(te)},[n,k]);const F=o2(f);ae.useEffect(()=>{if(!F)return;y(Date.now());const j=window.setInterval(()=>y(Date.now()),250);return()=>window.clearInterval(j)},[F]);async function K(j=!1){const te=d;M(!0),T(""),w(!1);try{const ue=await Ce.translateUserInput(o,p,{text:te,mode:j?"auto-send":"review-before-send",useContext:!1,send:j});ue.sent?(u(""),w(!1)):(u(x_(te,ue.englishPreview)),w(!0))}catch(ue){T(ue instanceof Error?ue.message:"Translation failed.")}finally{M(!1)}}function W(j){if(j.length===0)return;for(const ue of j)ue.type==="status"?x(ue.status):ue.type==="error"?T(ue.message):ue.type==="failures"&&h(ue.failures);const te=j.filter(ue=>ue.type==="entry");te.length>0&&(a(ue=>{const me=te.reduce((q,oe)=>p2(q,oe.entry),ue),Y=u2(me);return Y.removedIds.size>0&&h(q=>q.filter(oe=>!Y.removedIds.has(oe.translationId))),Y.entries}),R(ue=>ue+1))}async function G(){const j=b?ig(d):d;if(j.trim()){M(!0),T("");try{await Ce.sendTranslatedInput(o,p,{englishText:j}),u(""),w(!1)}catch(te){T(te instanceof Error?te.message:"Failed to send English input.")}finally{M(!1)}}}function $(j){j.key!=="Enter"||j.shiftKey||j.nativeEvent.isComposing||(j.preventDefault(),!A&&d.trim()&&(b?G():K(r)))}async function J(){a([]),h([]),I.current=1,await Ce.clearTranslationSession(v).catch(j=>T(j.message))}async function H(){M(!0),T("");try{const j=await Ce.ignoreTranslationFailures(v);h(j.failures)}catch(j){T(j instanceof Error?j.message:"Failed to ignore translation failures.")}finally{M(!1)}}async function B(){M(!0),T("");try{const j=await Ce.retryTranslationFailures(v);h(j.failures)}catch(j){T(j instanceof Error?j.message:"Failed to retry translation failures.")}finally{M(!1)}}const z=c2(f,E,g),V=c.length;return O.jsxs("aside",{className:"translation-panel",children:[O.jsxs("header",{className:"translation-panel-header",children:[O.jsxs("div",{className:"translation-panel-titlebar",children:[O.jsx("h2",{children:"Translation"}),O.jsxs("div",{className:"translation-panel-actions",children:[V>0?O.jsxs(O.Fragment,{children:[O.jsxs("button",{type:"button",disabled:A,onClick:()=>void H(),children:["Ignore ",V]}),O.jsxs("button",{type:"button",disabled:A,onClick:()=>void B(),children:["Retry ",V]})]}):null,O.jsx("button",{type:"button",onClick:()=>void J(),children:"Clear"})]})]}),O.jsxs("div",{className:"translation-status-row",children:[O.jsxs("p",{children:["Codex · target ",n2(s)," · ",z]}),O.jsx("p",{children:S?`poll ${S}`:"poll -"})]})]}),D?O.jsx("div",{className:"error-banner",children:D}):null,O.jsxs("div",{className:"translation-entry-list",ref:P,children:[f.length===0?O.jsx("p",{className:"muted",children:"Translated Claude Code output will appear here."}):null,f.map(j=>O.jsx(l2,{entry:j},j.id))]}),O.jsx("div",{className:"translation-composer",children:O.jsxs("div",{className:"translation-composer-row",children:[O.jsx("textarea",{value:d,onChange:j=>{u(j.target.value),(!j.target.value.trim()||b&&!d2(j.target.value))&&w(!1)},onKeyDown:$,placeholder:"输入中文,先翻译成英文工程指令..."}),O.jsx("div",{className:"translation-composer-actions",children:O.jsx("button",{type:"button",disabled:A||!b||!ig(d).trim(),onClick:()=>void G(),children:"Send English"})})]})})]})}function n2(n){var r;return((r=pg.find(s=>s.value===n))==null?void 0:r.label)??n}function i2({open:n,targetLanguage:r,onClose:s}){const[o,p]=ae.useState(!1),[v,f]=ae.useState(""),[a,c]=ae.useState(null),[h,d]=ae.useState(""),[u,b]=ae.useState(""),[w,E]=ae.useState(""),[x,S]=ae.useState(!1),[_,g]=ae.useState(null),[y,A]=ae.useState(""),[M,D]=ae.useState(""),[T,k]=ae.useState(""),[R,N]=ae.useState(!1);ae.useEffect(()=>{if(!n)return;let G=!1,$;const J=async()=>{G||(await I(!0),G||($=window.setTimeout(J,2e3)))};return J(),()=>{G=!0,$!==void 0&&window.clearTimeout($)}},[n,h]);async function I(G=!1){try{const $=await Ce.getCodexTranslationState();c($);const J=h?$.fileIndex.jobs.some(H=>H.id===h):!1;if((!h||!J)&&$.fileIndex.jobs[0])P($.fileIndex.jobs[0].id);else if(!$.fileIndex.jobs[0])d(""),b(""),E("");else if(G&&h){const H=await Ce.readCodexFileTranslation(h);b(H.output),E(H.report)}}catch($){f($ instanceof Error?$.message:"Failed to load file translations.")}}async function P(G){d(G),b(""),E("");try{const $=await Ce.readCodexFileTranslation(G);b($.output),E($.report)}catch($){f($ instanceof Error?$.message:"Failed to read translated file.")}}async function F(){S(!0),await K(y,M)}async function K(G="",$=""){N(!0),f("");try{const J=await Ce.browseCodexTranslationSourceFiles({path:G,query:$,limit:250});g(J),A(J.currentPath),D($)}catch(J){f(J instanceof Error?J.message:"Failed to browse source files.")}finally{N(!1)}}async function W(G=T){const $=G.trim();if($){p(!0),f("");try{const J=await Ce.createCodexFileTranslation({sourcePath:$,targetLanguage:r});S(!1),await I(),await P(J.id)}catch(J){f(J instanceof Error?J.message:"Failed to create file translation.")}finally{p(!1)}}}return n?O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"modal-backdrop file-translation-backdrop",children:O.jsx(s2,{busy:o,error:v,state:a,selectedJobId:h,output:u,report:w,onClose:()=>{S(!1),s()},onRefresh:()=>void I(),onSelectJob:G=>void P(G),onTranslate:()=>void F()})}),x?O.jsx(r2,{busy:o||R,state:_,currentPath:y,query:M,selectedPath:T,onBrowse:(G,$)=>void K(G,$),onClose:()=>S(!1),onQueryChange:D,onSelectPath:k,onTranslate:()=>void W()}):null]}):null}function r2({busy:n,state:r,currentPath:s,query:o,selectedPath:p,onBrowse:v,onClose:f,onQueryChange:a,onSelectPath:c,onTranslate:h}){const d=(r==null?void 0:r.entries)??[],u=d.filter(w=>w.type==="directory"),b=d.filter(w=>w.type==="file");return O.jsx("div",{className:"modal-backdrop translation-file-browser-backdrop",children:O.jsxs("section",{className:"translation-file-browser-modal",role:"dialog","aria-modal":"true","aria-label":"Select Source File",children:[O.jsxs("header",{children:[O.jsxs("div",{children:[O.jsx("h2",{children:"Select Source File"}),O.jsx("p",{children:s||"."})]}),O.jsx("button",{type:"button",onClick:f,children:"Close"})]}),O.jsxs("div",{className:"translation-file-browser-controls",children:[O.jsxs("div",{className:"translation-file-browser-nav",children:[O.jsx("button",{type:"button",disabled:n||!s,onClick:()=>v((r==null?void 0:r.parentPath)??"",""),children:"Up"}),O.jsx("button",{type:"button",disabled:n||!s,onClick:()=>v("",""),children:"Root"})]}),O.jsxs("form",{className:"translation-file-browser-search",onSubmit:w=>{w.preventDefault(),v(s,o)},children:[O.jsx("input",{value:o,onChange:w=>a(w.target.value),placeholder:"Search files"}),O.jsx("button",{type:"submit",disabled:n,children:"Search"}),O.jsx("button",{type:"button",disabled:n||!o,onClick:()=>v(s,""),children:"Clear"})]})]}),O.jsxs("div",{className:"translation-file-browser-layout",children:[O.jsxs("div",{className:"translation-file-browser-list",children:[n&&!r?O.jsx("p",{className:"muted",children:"Loading files..."}):null,!n&&d.length===0?O.jsx("p",{className:"muted",children:"No source files found."}):null,u.length>0?O.jsxs("div",{className:"translation-file-browser-group",children:[O.jsx("h3",{children:"Folders"}),u.map(w=>O.jsx(ng,{entry:w,selected:p===w.path,onBrowse:v,onSelectPath:c},w.path))]}):null,b.length>0?O.jsxs("div",{className:"translation-file-browser-group",children:[O.jsx("h3",{children:"Files"}),b.map(w=>O.jsx(ng,{entry:w,selected:p===w.path,onBrowse:v,onSelectPath:c},w.path))]}):null,r!=null&&r.truncated?O.jsx("p",{className:"translation-entry-note",children:"Result limit reached."}):null]}),O.jsxs("aside",{className:"translation-file-browser-selection",children:[O.jsxs("label",{children:[O.jsx("span",{children:"Source path"}),O.jsx("input",{value:p,onChange:w=>c(w.target.value)})]}),O.jsx("button",{type:"button",disabled:n||!p.trim(),onClick:h,children:"Translate File"})]})]})]})})}function ng({entry:n,selected:r,onBrowse:s,onSelectPath:o}){const p=n.type==="directory";return O.jsxs("button",{className:r?"translation-file-browser-entry is-selected":"translation-file-browser-entry",type:"button",onClick:()=>p?s(n.path,""):o(n.path),onDoubleClick:()=>p?s(n.path,""):void 0,children:[O.jsx("span",{children:p?"DIR":"FILE"}),O.jsx("strong",{children:n.name}),O.jsx("small",{children:n.path})]})}function s2({busy:n,error:r,state:s,selectedJobId:o,output:p,report:v,onClose:f,onRefresh:a,onSelectJob:c,onTranslate:h}){const d=(s==null?void 0:s.fileIndex.jobs)??[],u=d.find(b=>b.id===o);return O.jsxs("section",{className:"file-translation-modal",role:"dialog","aria-modal":"true","aria-label":"File Translation",children:[O.jsxs("header",{className:"file-translation-header",children:[O.jsxs("div",{children:[O.jsx("h2",{children:"File Translation"}),O.jsx("p",{children:"Codex · 中英互译"})]}),O.jsxs("div",{className:"file-translation-toolbar",children:[O.jsx("button",{type:"button",disabled:n,onClick:h,children:"Translate"}),O.jsx("button",{type:"button",disabled:n,onClick:a,children:"Refresh"}),O.jsx("button",{type:"button",onClick:f,children:"Close"})]})]}),r?O.jsx("div",{className:"error-banner",children:r}):null,s!=null&&s.memoryInitialized?null:O.jsx("p",{className:"translation-entry-note",children:"Translation memory is not initialized. Run Bootstrap from the sidebar before important file translations."}),O.jsxs("div",{className:"file-translation-layout",children:[O.jsxs("div",{className:"file-translation-list",children:[d.length===0?O.jsx("p",{className:"muted",children:"No translated files yet."}):null,d.map(b=>O.jsxs("button",{className:b.id===o?"file-translation-item is-active":"file-translation-item",type:"button",onClick:()=>c(b.id),children:[O.jsx("strong",{children:b.sourcePath}),O.jsxs("span",{children:[b.status," · ",b.targetLanguage]})]},b.id))]}),O.jsx("div",{className:"file-translation-preview",children:u?O.jsxs(O.Fragment,{children:[O.jsxs("header",{children:[O.jsx("strong",{children:u.sourcePath}),O.jsx("span",{children:u.status})]}),O.jsx("div",{className:"translation-markdown",children:O.jsx(Jg,{remarkPlugins:[w_],children:p||v||"Translation output is not available yet."})})]}):O.jsx("p",{className:"muted",children:"Select a translated file to preview it."})})]})]})}function l2({entry:n}){if(n.sourceKind==="conversation-boundary")return O.jsx(a2,{entry:n});const r=f2(n),s=n.sourceKind==="tool-output",o=n.direction==="user-input-to-english",p=["translation-entry",`is-${n.sourceKind}`,o?"is-user-input":""].filter(Boolean).join(" ");return O.jsxs("article",{className:p,children:[s?O.jsx("pre",{children:r}):O.jsx("div",{className:"translation-markdown",children:O.jsx(Jg,{remarkPlugins:[w_],children:r})}),n.warning?O.jsx("p",{className:"translation-entry-note",children:n.warning}):null,n.error?O.jsx("p",{className:"translation-entry-note is-error",children:n.error}):null]})}function a2({entry:n}){const r=n.boundaryKind==="end"?"结束":"开始",s=n.conversationTurn??0,o=_2(n.occurredAt??n.createdAt);return O.jsxs("div",{className:"translation-conversation-boundary","aria-label":`${r} 第 ${s} 轮 ${o}`,children:[O.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"}),O.jsx("span",{children:r}),O.jsxs("span",{children:["第 ",s," 轮"]}),O.jsx("time",{children:o}),O.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"})]})}function o2(n){const r=n.find(ah);return(r==null?void 0:r.translationStartedAt)??(r==null?void 0:r.createdAt)}function c2(n,r,s){const o=n.find(ah);if(o)return`translating ${m2(Math.max(0,s-h2(o)))}`;const p=n.at(-1);return(p==null?void 0:p.status)==="failed"||r==="failed"?"error":r}function ah(n){return n.status==="queued"||n.status==="translating"}function u2(n){const r=n.length-e2;if(r<=0)return{entries:n,removedIds:new Set};const s=new Set;for(const o of n){if(s.size>=r)break;ah(o)||s.add(o.id)}return s.size===0?{entries:n,removedIds:s}:{entries:n.filter(o=>!s.has(o.id)),removedIds:s}}function h2(n){const r=Date.parse(n.translationStartedAt??n.createdAt);return Number.isFinite(r)?r:Date.now()}function f2(n){return n.status==="queued"||n.status==="translating"?n.sourceText:n.status==="translated"?n.direction==="user-input-to-english"?x_(n.sourceText,n.translatedText):n.translatedText:n.translatedText||n.sourceText}function x_(n,r){return`${n.trimEnd()}${Ia}${r.trimStart()}`}function d2(n){return n.includes(Ia)}function ig(n){const r=n.indexOf(Ia);return r===-1?n:n.slice(r+Ia.length)}function p2(n,r){return n.findIndex(o=>o.id===r.id)===-1?[...n,r]:n.map(o=>o.id===r.id?r:o)}function m2(n){if(n<1e3)return`${Math.max(.1,n/1e3).toFixed(1)}s`;const r=n/1e3;if(r<60)return`${r.toFixed(1)}s`;const s=Math.floor(r/60),o=Math.floor(r%60).toString().padStart(2,"0");return`${s}:${o}`}function g2(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleTimeString()}function _2(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleTimeString()}function v2(n,r){return n.find(s=>s.taskSlug===r)??n[0]??null}const y2={role:"codex-reviewer",permissionMode:"default",model:"gpt-5.5",effort:"xhigh"};function S2(n,r){const s=Zr.map(o=>({role:o.name,permissionMode:n.roles[o.name].permissionMode,model:n.roles[o.name].model,effort:n.roles[o.name].effort}));return r.codexReviewerEnabled&&s.push(y2),s}const b2=["architecture-plan","validation-adequacy","final-diff"];function C2({events:n,maxEvents:r=8,showHeader:s=!0}){const o=r===null?n:n.slice(-r);return O.jsxs("section",{className:"event-log",children:[s?O.jsx("h2",{children:"Events"}):null,n.length===0?O.jsx("p",{className:"muted",children:"No terminal events yet."}):O.jsx("ol",{children:o.map((p,v)=>O.jsx("li",{children:p},`${p}-${v}`))})]})}function Qr({status:n}){return O.jsx("span",{className:`status-badge status-${n}`,children:n.replaceAll("_"," ")})}function w2({status:n,bootstrapStatus:r,applyResult:s,busy:o=!1,onRefresh:p,onApply:v,onStartBootstrap:f}){const[a,c]=ae.useState(!1),h=r==null?void 0:r.session;return ae.useEffect(()=>{h||c(!1)},[h]),n?O.jsxs("section",{className:"harness-panel",children:[O.jsxs("div",{className:"harness-stage",children:[O.jsxs("div",{className:"harness-panel-header",children:[O.jsxs("div",{children:[O.jsx("strong",{children:"Fixed install"}),O.jsx("p",{className:"muted",children:n.initialized?n.needsApply?`${n.plannedChanges.length} pending updates`:"Up to date":"Not initialized"})]}),O.jsx("div",{className:"harness-actions",children:n.initialized?O.jsxs(O.Fragment,{children:[O.jsx("button",{type:"button",disabled:o,onClick:()=>void p(),children:"Refresh"}),n.needsApply?O.jsx("button",{type:"button",disabled:o,onClick:()=>void v(),children:"Update"}):null]}):O.jsx("button",{type:"button",disabled:o,onClick:()=>void v(),children:"Initialize"})})]}),n.initialized&&n.needsApply?O.jsxs(O.Fragment,{children:[O.jsx("h3",{className:"harness-file-list-title",children:"Files to update"}),O.jsx("ol",{className:"harness-file-list",children:n.plannedChanges.map(d=>O.jsxs("li",{children:[O.jsx("span",{children:d.path}),O.jsx(Qr,{status:d.action})]},`${d.path}:${d.action}`))})]}):null]}),O.jsxs("div",{className:"harness-stage",children:[O.jsxs("div",{className:"harness-panel-header",children:[O.jsxs("div",{children:[O.jsx("strong",{children:"Bootstrap"}),O.jsx("p",{className:"muted",children:r?x2(r.status):"not loaded"})]}),O.jsx("div",{className:"harness-actions",children:O.jsx("button",{type:"button",disabled:o||!(r!=null&&r.canStart),onClick:()=>{c(!0),f()},children:"Run Bootstrap"})})]}),r?O.jsxs(O.Fragment,{children:[O.jsx("ol",{className:"harness-file-list",children:r.checks.map(d=>O.jsxs("li",{title:d.detail??d.path??"",children:[O.jsx("span",{children:d.path?`${d.label}: ${d.path}`:d.label}),O.jsx(Qr,{status:d.status})]},d.key))}),h?O.jsxs("div",{className:"harness-bootstrap-session",children:[O.jsxs("div",{children:[O.jsx("span",{children:h.command}),O.jsx(Qr,{status:h.status})]}),O.jsx("button",{type:"button",onClick:()=>c(!0),children:"Open Terminal"})]}):null]}):O.jsx("p",{className:"muted",children:"Refresh harness status to load bootstrap checks."})]}),s?O.jsxs("div",{className:"harness-result",children:[O.jsx("p",{children:s.message}),s.changedFiles.length>0?O.jsx("ul",{children:s.changedFiles.map(d=>O.jsxs("li",{children:[O.jsx("strong",{children:d.action})," ",d.path]},`${d.path}:${d.action}`))}):null]}):null,n.warnings.length>0?O.jsx("ul",{className:"warnings",children:n.warnings.map(d=>O.jsx("li",{children:d},d))}):null,r!=null&&r.warnings.length?O.jsx("ul",{className:"warnings",children:r.warnings.map(d=>O.jsx("li",{children:d},d))}):null,a&&h?O.jsx("div",{className:"harness-bootstrap-modal",role:"dialog","aria-modal":"true","aria-label":"Harness bootstrap terminal",children:O.jsxs("div",{className:"harness-bootstrap-modal-surface",children:[O.jsxs("header",{className:"harness-bootstrap-modal-header",children:[O.jsxs("div",{children:[O.jsx("strong",{children:"Harness Bootstrap Terminal"}),O.jsx("p",{className:"muted",children:h.command})]}),O.jsxs("div",{className:"harness-bootstrap-modal-actions",children:[O.jsx(Qr,{status:h.status}),O.jsx("button",{type:"button",onClick:()=>c(!1),children:"Close"})]})]}),O.jsx("div",{className:"harness-bootstrap-terminal",children:O.jsx(Fu,{sessionId:h.id,active:a})})]})}):null]}):null}function x2(n){return n.replaceAll("_"," ")}function oh(n){return{total:n.length,accepted:n.filter(r=>r.acceptedAt).length,delivered:n.filter(r=>r.deliveredAt).length}}function E2(n,r=6){const s=[...n].sort(T2).map((p,v)=>({message:p,sequence:v+1}));return[...r===null?s:s.slice(-r)].sort((p,v)=>v.sequence-p.sequence)}function k2({messages:n,orchestration:r,busy:s,maxMessages:o=6,showControls:p=!0,showHeader:v=!0,onModeChange:f,onMarkAllDone:a}){const[c,h]=ae.useState(null),d=oh(n),u=(r==null?void 0:r.mode)??"auto",b=E2(n,o);async function w(E){await D2(E.body),h(E.id),window.setTimeout(()=>h(x=>x===E.id?null:x),1200)}return O.jsxs("section",{className:"message-panel",children:[v?O.jsxs("div",{className:"message-panel-header",children:[O.jsxs("div",{children:[O.jsx("h2",{children:"Messages"}),O.jsxs("p",{className:"muted",children:[d.total," total / ",d.accepted," accepted"]})]}),p&&f?O.jsx("div",{className:"message-controls",children:O.jsxs("label",{className:"message-mode-toggle",children:[O.jsx("input",{type:"checkbox",checked:u==="auto",disabled:s,onChange:E=>f(E.target.checked?"auto":"manual")}),O.jsx("span",{children:"Auto orchestration"})]})}):null,p&&a?O.jsx("button",{type:"button",disabled:s,onClick:a,children:"Mark All Done"}):null]}):null,n.length===0?O.jsx("p",{className:"muted",children:"No role messages yet."}):O.jsx("ol",{className:"message-list",children:b.map(({message:E,sequence:x})=>O.jsxs("li",{className:"message-item",children:[O.jsxs("div",{className:"message-item-main",children:[O.jsxs("div",{className:"message-meta",children:[O.jsxs("span",{className:"message-sequence",children:["#",x]}),O.jsx("time",{dateTime:Ua(E),children:A2(Ua(E))}),O.jsxs("strong",{children:[E.fromRole," ","->"," ",E.toRole]}),O.jsx("span",{children:E.type})]}),O.jsx("p",{children:E.body}),E.failureReason?O.jsx("span",{className:"message-reason",children:E.failureReason}):null,E.bodyPath?O.jsx("span",{className:"message-path",children:E.bodyPath}):null]}),O.jsx("div",{className:"message-actions",children:O.jsx("button",{type:"button",disabled:s,onClick:()=>void w(E),children:c===E.id?"Copied":"Copy"})})]},E.id))})]})}function A2(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function Ua(n){return n.acceptedAt??n.deliveredAt??n.dispatchingAt??n.createdAt}function T2(n,r){const s=Ua(n).localeCompare(Ua(r));if(s!==0)return s;const o=n.createdAt.localeCompare(r.createdAt);return o!==0?o:n.id.localeCompare(r.id)}async function D2(n){var s;if((s=navigator.clipboard)!=null&&s.writeText){await navigator.clipboard.writeText(n);return}const r=document.createElement("textarea");r.value=n,r.setAttribute("readonly","true"),r.style.position="fixed",r.style.left="-9999px",document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove()}function R2({defaultPath:n="",recentPaths:r=[],busy:s=!1,onConnect:o}){const[p,v]=ae.useState(n);ae.useEffect(()=>{n&&v(n)},[n]);async function f(a){a.preventDefault(),await o(p)}return O.jsx("form",{className:"repo-connect",onSubmit:f,children:O.jsxs("div",{className:r.length>0?"inline-form has-recent-paths":"inline-form",children:[O.jsx("input",{"aria-label":"Repository path",id:"repo-path",value:p,onChange:a=>v(a.target.value),placeholder:"/path/to/repo"}),r.length>0?O.jsxs("select",{"aria-label":"Recent repositories",className:"repo-recent-select",value:"",onChange:a=>{a.target.value&&v(a.target.value)},children:[O.jsx("option",{value:"",children:"Recent"}),r.map(a=>O.jsx("option",{value:a,children:a},a))]}):null,O.jsx("button",{type:"submit",disabled:s||!p.trim(),children:"Connect"})]})})}function M2({tasks:n,activeTaskSlug:r,onSelect:s}){return O.jsx("nav",{className:"task-nav","aria-label":"Tasks",children:n.map(o=>O.jsxs("button",{className:o.taskSlug===r?"task-nav-item is-active":"task-nav-item",type:"button",onClick:()=>s(o.taskSlug),children:[O.jsx("span",{children:o.title||o.taskSlug}),O.jsx(Qr,{status:o.status})]},o.taskSlug))})}function L2({project:n,recentRepositoryPaths:r,tasks:s,activeTaskSlug:o,messages:p,orchestration:v,events:f,roundState:a,codexReview:c,translationEnabled:h,translationAutoSendEnabled:d,translationTargetLanguage:u,translationOutputMode:b,translatorSession:w,harnessStatus:E,harnessBootstrapStatus:x,harnessApplyResult:S,gatewayStatus:_,gatewayQrLogin:g,gatewayQrCheck:y,busy:A,onConnect:M,onRefreshConnectedRepository:D,onPullConnectedRepository:T,onRefreshHarness:k,onApplyHarness:R,onStartHarnessBootstrap:N,onRefreshGateway:I,onGatewayEnabledChange:P,onGatewayTranslationChange:F,onStartGatewayQrLogin:K,onResetGatewayBinding:W,onCodexGateEnabledChange:G,onTranslationEnabledChange:$,onTranslationAutoSendChange:J,onTranslationTargetLanguageChange:H,onTranslationOutputModeChange:B,onOpenFileTranslation:z,onOpenTranslatorSession:V,onCreateTranslationBootstrap:j,onUpdateTranslationMemory:te,onCreateTask:ue,onSelectTask:me,themeMode:Y,onThemeModeChange:q,flowPauseAlerts:oe,onFlowPauseAlertsChange:Z,permissionRequestMode:ie,onPermissionRequestModeChange:de,launchTemplate:be,canSaveLaunchTemplate:we,canOneClickStart:$e,onSaveLaunchTemplate:Je,onOneClickStart:De,onTryFlowPauseAlert:Dt,onMarkAllMessagesDone:Ut,onDeleteMessageHistory:Rt}){const[Pt,Yt]=ae.useState(""),[mt,et]=ae.useState(!0),[Mt,he]=ae.useState(!1),[ye,ke]=ae.useState(!1),[Re,Be]=ae.useState(()=>o?null:"repository-path"),pt=oh(p),Ne=Pt.trim(),ft=s.find(xe=>xe.taskSlug===o)??null;ae.useEffect(()=>{Be(xe=>o&&xe==="repository-path"?null:!o&&xe===null?"repository-path":xe)},[o]);function We(xe,At){Be(At?xe:null)}async function lt(xe){xe.preventDefault(),await ue({taskSlug:Ne,createWorktree:mt}),Yt(""),et(!0)}return O.jsxs("div",{className:"project-dashboard",children:[O.jsx("header",{className:"brand-header",children:O.jsx("strong",{children:"VibeCodingMaster"})}),O.jsx(si,{title:"Repository Path",open:Re==="repository-path",onOpenChange:xe=>We("repository-path",xe),children:O.jsx(R2,{defaultPath:(n==null?void 0:n.repoRoot)??"",recentPaths:r,busy:A,onConnect:M})}),n?O.jsx(si,{title:"Connected Repository",open:Re==="connected-repository",onOpenChange:xe=>{We("connected-repository",xe),xe&&D()},children:O.jsx(I2,{activeTask:ft,busy:A,project:n,onPull:T})}):null,O.jsx(si,{title:"Settings",open:Re==="settings",onOpenChange:xe=>We("settings",xe),children:O.jsxs("div",{className:"sidebar-settings",children:[O.jsxs("button",{"aria-label":`Theme mode: ${sg(Y)}`,className:"settings-toggle theme-mode-toggle",disabled:A,title:"Cycle theme: system, light, dark",type:"button",onClick:()=>q(V2(Y)),children:[O.jsx("span",{children:"Theme"}),O.jsx("span",{children:sg(Y)})]}),O.jsxs("button",{"aria-pressed":!(_!=null&&_.enabled)&&oe,className:!(_!=null&&_.enabled)&&oe?"settings-toggle is-active":"settings-toggle",disabled:A||(_==null?void 0:_.enabled),title:_!=null&&_.enabled?"Disabled while Gateway is on":void 0,type:"button",onClick:()=>Z(!oe),children:[O.jsx("span",{children:"Flow pause alert"}),O.jsx("span",{children:_!=null&&_.enabled?"off":oe?"on":"off"})]}),O.jsxs("button",{className:"settings-toggle",disabled:A||(_==null?void 0:_.enabled),title:_!=null&&_.enabled?"Disabled while Gateway is on":void 0,type:"button",onClick:Dt,children:[O.jsx("span",{children:"Try alert"}),O.jsx("span",{children:"test"})]}),O.jsxs("label",{className:"settings-select-row",children:[O.jsx("span",{children:"Permission requests"}),O.jsxs("select",{value:ie,disabled:A,onChange:xe=>de(xe.target.value),children:[O.jsx("option",{value:"off",children:"off"}),O.jsx("option",{value:"allowAll",children:"allow all"})]})]}),O.jsxs("button",{className:"settings-toggle",disabled:A||!we,title:"Save the current four role launch settings",type:"button",onClick:Je,children:[O.jsx("span",{children:"Save launch template"}),O.jsx("span",{children:we?"ready":"needs 4 sessions"})]}),$e?O.jsxs("button",{className:"settings-toggle is-active",disabled:A,title:O2(be),type:"button",onClick:De,children:[O.jsx("span",{children:"One-click start"}),O.jsx("span",{children:E_(be)})]}):null,o?O.jsxs(O.Fragment,{children:[O.jsxs("button",{type:"button",onClick:()=>he(!0),children:[O.jsx("span",{children:"Messages"}),O.jsxs("span",{className:"muted",children:[pt.total," total"]})]}),O.jsxs("button",{type:"button",onClick:()=>ke(!0),children:[O.jsx("span",{children:"Events"}),O.jsxs("span",{className:"muted",children:[f.length," total"]})]})]}):null]})}),O.jsx(si,{title:"Translation",open:Re==="translation",onOpenChange:xe=>We("translation",xe),children:O.jsx(B2,{busy:A,enabled:h,autoSendEnabled:d,targetLanguage:u,outputMode:b,fileTranslationAvailable:!!n,translatorSession:w,onAutoSendChange:J,onCreateBootstrap:j,onEnabledChange:$,onUpdateMemory:te,onTargetLanguageChange:H,onOutputModeChange:B,onOpenFileTranslation:z,onOpenTranslatorSession:V})}),n&&o?O.jsx(si,{title:"Codex Review Gates",open:Re==="codex-review-gates",onOpenChange:xe=>We("codex-review-gates",xe),children:O.jsx(j2,{busy:A,state:c,onGateEnabledChange:G})}):null,O.jsx(si,{title:"Gateway",open:Re==="gateway",onOpenChange:xe=>{We("gateway",xe),xe&&I()},children:O.jsx(H2,{busy:A,qrCheck:y,qrLogin:g,status:_,onEnabledChange:P,onResetBinding:W,onStartQrLogin:K,onTranslationChange:F})}),n?O.jsx(si,{title:"VCM Harness",open:Re==="vcm-harness",onOpenChange:xe=>We("vcm-harness",xe),children:O.jsx(w2,{status:E,bootstrapStatus:x,applyResult:S,busy:A,onRefresh:k,onApply:R,onStartBootstrap:N})}):null,n?O.jsx(si,{title:"New Task",open:Re==="new-task",onOpenChange:xe=>We("new-task",xe),children:O.jsx("div",{className:"task-create",children:O.jsxs("form",{onSubmit:lt,children:[O.jsx("input",{value:Pt,onChange:xe=>Yt(xe.target.value),placeholder:"task name"}),O.jsxs("label",{className:"task-create-option",children:[O.jsx("input",{type:"checkbox",checked:mt,onChange:xe=>et(xe.target.checked)}),O.jsx("span",{children:"Create worktree and branch"})]}),mt?O.jsxs("div",{className:"task-create-preview",children:[O.jsxs("small",{children:["branch: ",Ne?`feature/${Ne}`:"feature/<task>"]}),O.jsxs("small",{children:["worktree: ",Ne?`.claude/worktrees/${Ne}`:".claude/worktrees/<task>"]})]}):O.jsx("div",{className:"task-create-preview",children:O.jsx("small",{children:"uses current repository path and current branch"})}),O.jsx("button",{type:"submit",disabled:A||!Ne,children:"Create"})]})})}):null,s.length>0?O.jsx(si,{title:"Tasks",open:Re==="tasks",onOpenChange:xe=>We("tasks",xe),children:O.jsx(M2,{tasks:s,activeTaskSlug:o,onSelect:me})}):null,n&&ft?O.jsx(F2,{task:ft,roundState:a}):null,Mt?O.jsx($2,{busy:A,messages:p,orchestration:v,onClose:()=>he(!1),onMarkAllDone:()=>{o&&Ut(o)},onDeleteMessageHistory:()=>{o&&Rt(o)}}):null,ye?O.jsx(G2,{events:f,onClose:()=>ke(!1)}):null]})}function E_(n){return[n.autoOrchestration?"auto":"manual"].join(" + ")}function O2(n){const r=Object.entries(n.roles).map(([s,o])=>`${s}: ${o.permissionMode} / ${o.model} / ${o.effort}`).join("; ");return`Launch template: ${E_(n)}; ${r}`}function B2({autoSendEnabled:n,busy:r,enabled:s,fileTranslationAvailable:o,outputMode:p,targetLanguage:v,translatorSession:f,onAutoSendChange:a,onCreateBootstrap:c,onEnabledChange:h,onUpdateMemory:d,onOutputModeChange:u,onTargetLanguageChange:b,onOpenFileTranslation:w,onOpenTranslatorSession:E}){return O.jsxs("div",{className:"sidebar-settings",children:[O.jsxs("button",{"aria-pressed":s,className:s?"settings-toggle is-active":"settings-toggle",disabled:r,type:"button",onClick:()=>h(!s),children:[O.jsx("span",{children:"Conversation translation"}),O.jsx("span",{children:s?"on":"off"})]}),O.jsxs("button",{"aria-pressed":n,className:n?"settings-toggle is-active":"settings-toggle",disabled:r,type:"button",onClick:()=>a(!n),children:[O.jsx("span",{children:"Auto-send"}),O.jsx("span",{children:n?"on":"off"})]}),O.jsxs("label",{className:"settings-select-row",children:[O.jsx("span",{children:"Language"}),O.jsx("select",{value:v,disabled:r,onChange:x=>b(x.target.value),children:pg.map(x=>O.jsx("option",{value:x.value,children:x.label},x.value))})]}),O.jsxs("label",{className:"settings-select-row",children:[O.jsx("span",{children:"Reply scope"}),O.jsx("select",{value:p,disabled:r,onChange:x=>u(x.target.value),children:h1.map(x=>O.jsx("option",{value:x.value,children:x.label},x.value))})]}),O.jsxs("button",{className:"settings-toggle",disabled:r||!o,title:o?"Open file translation":"Connect a repository first",type:"button",onClick:w,children:[O.jsx("span",{children:"File translation"}),O.jsx("span",{children:"open"})]}),O.jsxs("button",{className:"settings-toggle",disabled:r||!o,title:o?"Run translation bootstrap":"Connect a repository first",type:"button",onClick:c,children:[O.jsx("span",{children:"Bootstrap"}),O.jsx("span",{children:"run"})]}),O.jsxs("button",{className:"settings-toggle",disabled:r||!o,title:o?"Compact and update translation memory":"Connect a repository first",type:"button",onClick:d,children:[O.jsx("span",{children:"Update memory"}),O.jsx("span",{children:"run"})]}),O.jsxs("div",{className:"settings-status-row",children:[O.jsx("span",{children:"Session status"}),O.jsx("strong",{children:N2(f)})]}),O.jsxs("button",{className:"settings-toggle",disabled:r||!o,title:o?"Open Codex Translator session":"Connect a repository first",type:"button",onClick:E,children:[O.jsx("span",{children:"Open Session"}),O.jsx("span",{children:"open"})]})]})}function N2(n){return n?n.status==="running"?n.activityStatus??"idle":n.status:"not started"}function j2({busy:n,onGateEnabledChange:r,state:s}){return O.jsx("div",{className:"sidebar-settings",children:b2.map(o=>{const p=s==null?void 0:s.gates[o],v=!!(p!=null&&p.required);return O.jsxs("button",{"aria-pressed":v,className:v?"settings-toggle is-active":"settings-toggle",disabled:n||!s,title:p!=null&&p.status?`status: ${p.status}`:void 0,type:"button",onClick:()=>r(o,!v),children:[O.jsx("span",{children:z2(o)}),O.jsx("span",{children:v?"on":"off"})]},o)})})}function z2(n){switch(n){case"architecture-plan":return"Architecture plan";case"validation-adequacy":return"Validation adequacy";case"final-diff":return"Final diff"}return n}function H2({busy:n,onEnabledChange:r,onResetBinding:s,onStartQrLogin:o,onTranslationChange:p,qrCheck:v,qrLogin:f,status:a}){const c=!!(a!=null&&a.binding.tokenConfigured),h=!!(a!=null&&a.binding.tokenConfigured);return O.jsxs("div",{className:"gateway-panel",children:[O.jsxs("div",{className:"gateway-actions",children:[O.jsxs("button",{"aria-pressed":!!(a!=null&&a.enabled),className:a!=null&&a.enabled?"settings-toggle is-active":"settings-toggle",disabled:n||!a||!a.enabled&&!c,title:c?"Enable or disable PM messages and task-changing Gateway commands":"Scan and confirm iLink login first",type:"button",onClick:()=>a?r(!a.enabled):void 0,children:[O.jsx("span",{children:"Gateway"}),O.jsx("span",{children:a!=null&&a.enabled?"on":"off"})]}),O.jsxs("button",{"aria-pressed":!!(a!=null&&a.translationEnabled),className:a!=null&&a.translationEnabled?"settings-toggle is-active":"settings-toggle",disabled:n||!a,type:"button",onClick:()=>a?p(!a.translationEnabled):void 0,children:[O.jsx("span",{children:"Translation"}),O.jsx("span",{children:a!=null&&a.translationEnabled?"on":"off"})]}),h?O.jsx("button",{className:"danger-button",type:"button",disabled:n,onClick:s,children:"Reset Binding"}):O.jsx("button",{type:"button",disabled:n,onClick:o,children:"Start QR Login"})]}),f?O.jsx("p",{className:"muted",children:"QR login started. Use the login dialog to confirm binding."}):null,v?O.jsxs("p",{className:"muted",children:["QR status: ",v.status,v.message?` · ${v.message}`:""]}):null]})}function I2({activeTask:n,busy:r,onPull:s,project:o}){const p=!!(n&&!n.worktreePath&&n.cleanupStatus!=="cleaned"),v=p?`Inline task "${n==null?void 0:n.taskSlug}" uses the base repository.`:o.pullDisabledReason,f=!!(o.canPull&&!p);return O.jsxs("div",{className:"project-summary",children:[O.jsxs("dl",{children:[O.jsxs("div",{children:[O.jsx("dt",{children:"Base path"}),O.jsx("dd",{children:o.repoRoot})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Branch"}),O.jsx("dd",{children:U2(o)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Remote"}),O.jsx("dd",{children:o.upstreamBranch??"no upstream"})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Status"}),O.jsx("dd",{children:P2(o)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Commit"}),O.jsx("dd",{children:o.shortHeadCommit??o.headCommit??"unknown"})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Working tree"}),O.jsx("dd",{children:o.isDirty?"uncommitted changes":"clean"})]})]}),O.jsxs("div",{className:"connected-repo-actions",children:[O.jsx("button",{type:"button",disabled:r||!f,title:v??"Pull latest changes with git pull --ff-only",onClick:()=>void s(),children:"Pull"}),O.jsx("span",{className:"muted",children:o.checkedAt?`checked ${zu(o.checkedAt)}`:"status not refreshed"})]}),v?O.jsx("p",{className:"muted",children:v}):null,o.warnings.length>0?O.jsx("ul",{className:"warnings",children:o.warnings.map(a=>O.jsx("li",{children:a},a))}):null]})}function U2(n){return n.branch||"unknown"}function P2(n){if(!n.upstreamBranch)return"no upstream";const r=n.ahead??0,s=n.behind??0;return r===0&&s===0?"up to date":r>0&&s>0?`ahead ${r}, behind ${s}`:r>0?`ahead ${r}`:`behind ${s}`}function F2({roundState:n,task:r}){var d;const[s,o]=ae.useState(()=>Date.now()),p=!!(n!=null&&n.startedAt),v=k_(r.createdAt,s),f=rg(n,(n==null?void 0:n.totalCcActiveMs)??0,s),a=p&&n?rg(n,n.currentRoundCcActiveMs,s):0,c=p&&n?q2(n,s):0,h=((d=r.title)==null?void 0:d.trim())||r.taskSlug;return ae.useEffect(()=>{const u=window.setInterval(()=>o(Date.now()),1e3);return()=>window.clearInterval(u)},[]),O.jsxs("section",{className:"task-status-dock","aria-label":"VCM Session status",children:[O.jsxs("div",{className:"task-status-dock-title",children:[O.jsx("strong",{title:h,children:h}),O.jsx("span",{className:`status-badge status-${r.status}`,children:r.status})]}),O.jsxs("dl",{className:"task-status-stats",children:[O.jsxs("div",{children:[O.jsx("dt",{children:"Session start"}),O.jsx("dd",{children:zu(r.createdAt)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Session total"}),O.jsx("dd",{children:La(v)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Rounds"}),O.jsx("dd",{children:(n==null?void 0:n.totalRoundCount)??0})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Role runtime"}),O.jsx("dd",{children:La(f)})]})]}),p&&n?O.jsxs("div",{className:"current-round-status",children:[O.jsxs("div",{className:"current-round-title",children:[O.jsx("span",{children:n.status==="running"?"Current Round":"Last Round"}),O.jsx("span",{className:`status-badge status-${n.status}`,children:n.status})]}),O.jsxs("dl",{className:"task-status-stats",children:[O.jsxs("div",{children:[O.jsx("dt",{children:"Started"}),O.jsx("dd",{children:zu(n.startedAt)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Total"}),O.jsx("dd",{children:La(c)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Role runtime"}),O.jsx("dd",{children:La(a)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Turn count"}),O.jsx("dd",{children:n.turnCount})]})]})]}):null]})}function rg(n,r,s){if(!(n!=null&&n.activeTurnStartedAt)||n.status!=="running")return r;const o=Date.parse(n.updatedAt);return Number.isFinite(o)?r+Math.max(0,s-o):r}function q2(n,r){const s=n.status==="running"?r:Date.parse(n.stoppedAt??n.lastTurnEndedAt??"");return k_(n.startedAt??"",Number.isFinite(s)?s:r)}function k_(n,r){const s=Date.parse(n);return Number.isFinite(s)?Math.max(0,r-s):0}function zu(n){if(!n)return"-";const r=new Date(n);return Number.isNaN(r.getTime())?"-":new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}).format(r)}function La(n){const r=Math.max(0,Math.floor(n/1e3)),s=Math.floor(r/3600),o=Math.floor(r%3600/60),p=r%60;return s>0?o>0?`${s}h ${o}m`:`${s}h`:o>0?p>0?`${o}m ${p}s`:`${o}m`:`${p}s`}function V2(n){return n==="system"?"light":n==="light"?"dark":"system"}function sg(n){return n==="system"?"System":n==="light"?"Light":"Dark"}function G2({events:n,onClose:r}){return O.jsx("div",{className:"modal-backdrop",children:O.jsxs("section",{className:"event-modal",role:"dialog","aria-modal":"true","aria-label":"Events",children:[O.jsxs("header",{children:[O.jsxs("div",{children:[O.jsx("h2",{children:"Events"}),O.jsxs("p",{className:"muted",children:[n.length," total"]})]}),O.jsx("button",{type:"button",onClick:r,children:"Close"})]}),O.jsx(C2,{events:n,maxEvents:null,showHeader:!1})]})})}function $2({busy:n,messages:r,orchestration:s,onClose:o,onMarkAllDone:p,onDeleteMessageHistory:v}){const f=oh(r);function a(){window.confirm(["Clear all pending route-file messages?","","Use this only after you manually copied or handled stuck route-file messages.","VCM will clear non-empty handoff message files so Stop-hook orchestration can continue."].join(`
|
|
92
|
-
`))&&
|
|
93
|
-
`))&&v()}return O.jsx("div",{className:"modal-backdrop",children:O.jsxs("section",{className:"message-modal",role:"dialog","aria-modal":"true","aria-label":"Messages",children:[O.jsxs("header",{children:[O.jsxs("div",{children:[O.jsx("h2",{children:"Messages"}),O.jsxs("p",{className:"muted",children:[f.total," total / ",f.accepted," accepted",s?` · ${s.mode}`:""]})]}),O.jsxs("div",{className:"modal-actions",children:[O.jsx("button",{type:"button",disabled:n,onClick:a,children:"Mark All Done"}),O.jsx("button",{type:"button",disabled:n||f.total===0,onClick:c,children:"Delete All"}),O.jsx("button",{type:"button",onClick:o,children:"Close"})]})]}),O.jsx(k2,{busy:n,maxMessages:null,messages:r,orchestration:s,showControls:!1,showHeader:!1})]})})}function
|
|
94
|
-
`):[`Close task "${n.taskSlug}"?`,"","This task was created without a separate worktree/branch.","VCM will stop VCM-managed running role sessions for this task.","VCM will delete task/session/message/orchestration state only.","","VCM will not check running sessions or uncommitted changes before closing."].join(`
|
|
95
|
-
`);if(window.confirm(Z)){T(!0),R("");try{await Ce.cleanupTask(n.taskSlug,{force:!0,deleteBranch:!!n.worktreePath,forceDeleteBranch:!0}),te(`closed ${n.taskSlug}`),await a()}catch(de){R(de instanceof Error?de.message:"Close task failed.")}finally{T(!1)}}}function te(Z){I(ie=>{const de=[...ie,`${new Date().toLocaleTimeString()} ${Z}`];return b==null||b(de),de})}function ue(Z,ie){_(de=>({...de,[Z]:ie}))}function me(Z,ie){y(de=>({...de,[Z]:ie}))}function Y(Z,ie){M(de=>({...de,[Z]:ie}))}async function q(Z){T(!0),R("");try{const ie=await Ce.updateOrchestrationState(n.taskSlug,{mode:Z});F(ie),d==null||d(ie),te(`auto orchestration ${Z==="auto"?"enabled":"disabled"}`)}catch(ie){R(ie instanceof Error?ie.message:"Failed to update orchestration mode.")}finally{T(!1)}}const oe=((P==null?void 0:P.mode)??"auto")==="auto";return O.jsxs("div",{className:"task-workspace",children:[O.jsxs("header",{className:"workspace-header",children:[O.jsx("div",{className:"workspace-title-line",children:O.jsx("h1",{children:n.title||n.taskSlug})}),O.jsx(K2,{activeRole:r,roles:J,sessions:(E==null?void 0:E.sessions)??[],onSelect:c}),O.jsxs("div",{className:"workspace-header-actions",children:[O.jsxs("button",{"aria-label":`Auto orchestration is ${oe?"on":"off"}`,"aria-pressed":oe,className:`orchestration-toggle${oe?" is-active":""}`,disabled:D,type:"button",onClick:()=>void q(oe?"manual":"auto"),children:[O.jsx("span",{children:"Auto orchestration"}),O.jsx("strong",{children:oe?"on":"off"})]}),O.jsx("button",{className:"danger-button",type:"button",disabled:D,onClick:()=>void j(),children:"Close Task"})]})]}),k?O.jsx("div",{className:"error-banner",children:k}):null,O.jsx("div",{className:"workspace-grid",children:O.jsx("div",{className:"workspace-main",children:O.jsx("div",{className:"role-console-stack",children:J.map(Z=>{const ie=Z.name,de=ie===r,be=A_((E==null?void 0:E.sessions)??[],ie);return O.jsx("div",{className:de?"role-console-panel is-active":"role-console-panel","aria-hidden":!de,children:O.jsx(Y2,{role:ie,session:be,permissionMode:S[ie],model:g[ie],effort:A[ie],active:de,busy:D,translationEnabled:o,translationAutoSendEnabled:p,translationTargetLanguage:v,onPermissionModeChange:we=>ue(ie,we),onModelChange:we=>me(ie,we),onEffortChange:we=>Y(ie,we),onStart:()=>void V(async()=>{await Ce.startRoleSession(n.taskSlug,ie,{cols:100,rows:28,permissionMode:S[ie],model:g[ie],effort:A[ie]}),te(`started ${ie} with ${S[ie]} / ${g[ie]} / ${A[ie]}`)}),onResume:()=>void V(async()=>{await Ce.resumeRoleSession(n.taskSlug,ie,{cols:100,rows:28,permissionMode:S[ie],model:g[ie],effort:A[ie]}),te(`resumed ${ie} with ${S[ie]} / ${g[ie]} / ${A[ie]}`)}),onStop:()=>void V(async()=>{await Ce.stopRoleSession(n.taskSlug,ie),te(`stopped ${ie}`)}),onRestart:()=>void V(async()=>{await Ce.restartRoleSession(n.taskSlug,ie,{cols:100,rows:28,permissionMode:S[ie],model:g[ie],effort:A[ie]}),te(`restarted ${ie} with ${S[ie]} / ${g[ie]} / ${A[ie]}`)}),onTerminalEvent:we=>te(`${Z.label}: ${we}`)})},ie)})})})})]})}function lg(n){return[n.status,n.updatedAt,n.cleanupStatus??"",n.cleanedAt??""].join(":")}const J2=120*1e3,ag=1400,eE=3;function tE(){const[n,r]=ae.useState(null),[s,o]=ae.useState([]),[p,v]=ae.useState(null),[f,a]=ae.useState(null),[c,h]=ae.useState(null),[d,u]=ae.useState(null),[b,w]=ae.useState(null),[E,x]=ae.useState(null),[S,_]=ae.useState(!1),[g,y]=ae.useState([]),[A,M]=ae.useState(null),[D,T]=ae.useState(null),[k,R]=ae.useState(null),[N,I]=ae.useState(null),[P,F]=ae.useState(null),[K,W]=ae.useState(null),[G,$]=ae.useState("project-manager"),[J,H]=ae.useState("system"),[B,z]=ae.useState(!0),[V,j]=ae.useState("off"),[te,ue]=ae.useState(!1),[me,Y]=ae.useState(!1),[q,oe]=ae.useState(c1),[Z,ie]=ae.useState(u1),[de,be]=ae.useState(!1),[we,$e]=ae.useState(!1),[Je,De]=ae.useState(null),[Dt,Ut]=ae.useState("gpt-5.5"),[Rt,Pt]=ae.useState("medium"),[Yt,mt]=ae.useState(()=>f1()),[et,Mt]=ae.useState(null),[he,ye]=ae.useState(0),[ke,Re]=ae.useState(null),[Be,pt]=ae.useState(!1),[Ne,ft]=ae.useState(!1),[We,lt]=ae.useState(""),xe=ae.useRef({}),At=ae.useRef(null),Nt=ae.useRef(""),ur=ae.useRef(""),Se=ae.useMemo(()=>v2(g,A),[g,A]),Lt=(et==null?void 0:et.taskSlug)===(Se==null?void 0:Se.taskSlug)?et:null,hr=!!(Lt!=null&&Lt.statusLoaded&&Lt.allRolesHaveSession),Un=!!(Se&&(Lt!=null&&Lt.statusLoaded)&&!Lt.hasAnySession),Ot=ae.useCallback(ee=>{H(ee.themeMode),z(ee.flowPauseAlerts),j(ee.permissionRequestMode),ue(ee.translationEnabled),Y(ee.translationAutoSendEnabled),oe(ee.translationTargetLanguage),ie(ee.translationOutputMode),mt(ee.launchTemplate)},[]),Ft=ae.useCallback(()=>{At.current!==null&&(window.clearInterval(At.current),At.current=null)},[]),hl=ae.useCallback((ee={})=>{Ft(),ee.resetAudio&&aE(),Oa(),At.current=window.setInterval(()=>{Oa()},ag)},[Ft]),rs=ae.useCallback(()=>{Ft(),Re(null);let ee=1;Oa(),At.current=window.setInterval(()=>{ee+=1,Oa(),ee>=eE&&At.current!==null&&(window.clearInterval(At.current),At.current=null)},ag)},[Ft]),Ii=ae.useCallback((ee,_e=`manual-${Date.now()}`,yt={})=>{Re({id:_e,text:ee}),hl(yt)},[hl]),Ui=ae.useCallback(()=>{Ft(),Re(null)},[Ft]),fr=ae.useCallback(()=>{Ft(),Re(null),z(!1)},[Ft]),fl=ae.useCallback(ee=>{Se!=null&&Se.taskSlug&&T({taskSlug:Se.taskSlug,messages:ee})},[Se==null?void 0:Se.taskSlug]),dl=ae.useCallback(ee=>{Se!=null&&Se.taskSlug&&R({taskSlug:Se.taskSlug,orchestration:ee})},[Se==null?void 0:Se.taskSlug]),pl=ae.useCallback(ee=>{Se!=null&&Se.taskSlug&&I({taskSlug:Se.taskSlug,events:ee})},[Se==null?void 0:Se.taskSlug]),ss=ae.useCallback(ee=>{if(!(Se!=null&&Se.taskSlug)||ee.taskSlug!==Se.taskSlug||(F({taskSlug:ee.taskSlug,roundState:ee}),ee.status!=="stopped"||!ee.roundId))return;const _e=sE(ee);if(xe.current[ee.taskSlug]===_e||(xe.current[ee.taskSlug]=_e,!B))return;const Wt=ee.activeRole??"role";rE(ee)>=J2?Ii(`No new turn started after ${Wt} stopped.`,_e):rs()},[Se==null?void 0:Se.taskSlug,B,rs,Ii]),ls=ae.useCallback(ee=>{Mt(_e=>(_e==null?void 0:_e.taskSlug)===ee.taskSlug&&_e.statusLoaded===ee.statusLoaded&&_e.sessionCount===ee.sessionCount&&_e.hasAnySession===ee.hasAnySession&&_e.allRolesHaveSession===ee.allRolesHaveSession&&_e.autoOrchestration===ee.autoOrchestration&&JSON.stringify(_e.roles)===JSON.stringify(ee.roles)?_e:ee)},[]);async function ai(){const ee=await Ce.listTasks();return y(ee),M(_e=>{var yt;return _e&&ee.some(Wt=>Wt.taskSlug===_e)?_e:((yt=ee[0])==null?void 0:yt.taskSlug)??null}),ee}async function Pi(){const ee=await Ce.getHarnessStatus();return v(ee),ee}async function an(){const ee=await Ce.getHarnessBootstrapStatus();return a(ee),ee}async function vt(){const ee=await Ce.getGatewayStatus();return u(ee),ee}async function qt(){const ee=await Ce.getRecentRepositoryPaths();return o(ee),ee}async function Ln(ee){const[_e,yt]=await Promise.all([Ce.listMessages(ee),Ce.getOrchestrationState(ee)]);T({taskSlug:ee,messages:_e}),R({taskSlug:ee,orchestration:yt})}async function Fi(ee){const _e=await Ce.getCodexReviewState(ee);return W({taskSlug:ee,state:_e}),_e}async function dr(){const ee=await Ce.getCodexTranslatorSession();return De(ee),ee!=null&&ee.model&&Ut(ee.model),ee!=null&&ee.effort&&Pt(ee.effort),ee}ae.useEffect(()=>{Promise.all([Ce.getCurrentProject(),Ce.getRecentRepositoryPaths(),Ce.getAppPreferences(),Ce.getGatewayStatus()]).then(async([ee,_e,yt,Wt])=>{r(ee),o(_e),u(Wt),Ot(yt),ee&&await Promise.all([ai(),Pi(),an()])}).catch(ee=>lt(ee.message))},[Ot]),ae.useEffect(()=>{const ee=window.matchMedia("(prefers-color-scheme: dark)"),_e=()=>pt(ee.matches);return _e(),ee.addEventListener("change",_e),()=>ee.removeEventListener("change",_e)},[]),ae.useEffect(()=>()=>Ft(),[Ft]),ae.useEffect(()=>{const ee=J==="system"?Be?"dark":"light":J;document.documentElement.dataset.theme=ee,document.documentElement.dataset.themeMode=J},[Be,J]),ae.useEffect(()=>{!(d!=null&&d.enabled)||!B||(fr(),Ce.updateAppPreferences({flowPauseAlerts:!1}).then(ee=>Ot(ee)).catch(ee=>lt(ee.message)))},[Ot,fr,B,d==null?void 0:d.enabled]),ae.useEffect(()=>{if(!(d!=null&&d.enabled)||!n||!Se)return;const ee=`${n.repoRoot}:${Se.taskSlug}`;if(d.currentProjectId===n.repoRoot&&d.currentTaskSlug===Se.taskSlug){Nt.current=ee;return}Nt.current!==ee&&(Nt.current=ee,Ce.updateGatewaySettings({currentProjectId:n.repoRoot,currentTaskSlug:Se.taskSlug}).then(_e=>u(_e)).catch(_e=>{Nt.current===ee&&(Nt.current=""),lt(_e.message)}))},[Se==null?void 0:Se.taskSlug,d==null?void 0:d.currentProjectId,d==null?void 0:d.currentTaskSlug,d==null?void 0:d.enabled,n==null?void 0:n.repoRoot]),ae.useEffect(()=>{if(!(Se!=null&&Se.taskSlug)){W(null);return}Fi(Se.taskSlug).catch(ee=>lt(ee.message))},[Se==null?void 0:Se.taskSlug]),ae.useEffect(()=>{ur.current="",De(null)},[n==null?void 0:n.repoRoot]),ae.useEffect(()=>{if(!n)return;dr().catch(_e=>lt(_e.message));const ee=window.setInterval(()=>{dr().catch(_e=>lt(_e.message))},3e3);return()=>window.clearInterval(ee)},[n==null?void 0:n.repoRoot]),ae.useEffect(()=>{if(!n||!te)return;const ee=n.repoRoot;ur.current===ee&&(Je==null?void 0:Je.status)==="running"||(ur.current=ee,Ce.ensureCodexTranslatorSession({model:Dt,effort:Rt}).then(_e=>{De(_e),_e.model&&Ut(_e.model),_e.effort&&Pt(_e.effort)}).catch(_e=>{ur.current="",lt(_e.message)}))},[n==null?void 0:n.repoRoot,te]),ae.useEffect(()=>{if(!(Se!=null&&Se.taskSlug))return;const ee=Se.taskSlug,_e=window.setInterval(()=>{Fi(ee).catch(yt=>lt(yt.message))},3e3);return()=>window.clearInterval(_e)},[Se==null?void 0:Se.taskSlug]);async function Ye(ee){ft(!0),lt("");try{await ee()}catch(_e){lt(_e instanceof Error?_e.message:"Action failed.")}finally{ft(!1)}}const ml=D&&D.taskSlug===(Se==null?void 0:Se.taskSlug)?D.messages:[],qi=k&&k.taskSlug===(Se==null?void 0:Se.taskSlug)?k.orchestration:null,as=N&&N.taskSlug===(Se==null?void 0:Se.taskSlug)?N.events:[],oi=P&&P.taskSlug===(Se==null?void 0:Se.taskSlug)?P.roundState:null,On=K&&K.taskSlug===(Se==null?void 0:Se.taskSlug)?K.state:null,ci=!!(On&&Object.values(On.gates).some(ee=>ee.required));return O.jsxs(d1,{sidebar:O.jsx(L2,{project:n,recentRepositoryPaths:s,tasks:g,activeTaskSlug:(Se==null?void 0:Se.taskSlug)??null,messages:ml,orchestration:qi,events:as,roundState:oi,codexReview:On,translationEnabled:te,translationAutoSendEnabled:me,translationTargetLanguage:q,translationOutputMode:Z,translatorSession:Je,harnessStatus:p,harnessBootstrapStatus:f,harnessApplyResult:c,gatewayStatus:d,gatewayQrLogin:b,gatewayQrCheck:E,busy:Ne,onConnect:ee=>Ye(async()=>{const _e=await Ce.connectProject({repoPath:ee});r(_e),h(null),await Promise.all([ai(),Pi(),an(),qt()])}),onRefreshConnectedRepository:()=>Ye(async()=>{const ee=await Ce.getCurrentProject();r(ee)}),onPullConnectedRepository:()=>Ye(async()=>{const ee=await Ce.pullCurrentProject();r(ee)}),onRefreshHarness:()=>Ye(async()=>{h(null),await Promise.all([Pi(),an()])}),onApplyHarness:()=>Ye(async()=>{const ee=await Ce.applyHarness();h(ee),await Promise.all([Pi(),an()])}),onStartHarnessBootstrap:()=>Ye(async()=>{const ee=await Ce.startHarnessBootstrap();a(ee.status)}),onRefreshGateway:()=>Ye(async()=>{await vt()}),onGatewayEnabledChange:ee=>{Ye(async()=>{const[_e,yt]=await Promise.all([Ce.updateGatewaySettings({enabled:ee,...ee&&n?{currentProjectId:n.repoRoot,currentTaskSlug:(Se==null?void 0:Se.taskSlug)??null}:{}}),ee?Ce.updateAppPreferences({flowPauseAlerts:!1}):Promise.resolve(null)]);yt&&Ot(yt),ee&&fr(),u(_e)})},onGatewayTranslationChange:ee=>{Ye(async()=>{const _e=await Ce.updateGatewaySettings({translationEnabled:ee});u(_e)})},onStartGatewayQrLogin:()=>{Ye(async()=>{const ee=await Ce.startGatewayQrLogin();w(ee),x(null),_(!0),await vt()})},onResetGatewayBinding:()=>{Ye(async()=>{const ee=await Ce.resetGatewayBinding();u(ee),w(null),x(null),_(!1)})},onCodexGateEnabledChange:(ee,_e)=>{Ye(async()=>{if(!Se)throw new Error("Create or select a task before changing Codex Review Gates.");const yt=await Ce.updateCodexReviewSettings(Se.taskSlug,{gates:{[ee]:_e}});W({taskSlug:Se.taskSlug,state:yt})})},onTranslationEnabledChange:ee=>{ue(ee),Ye(async()=>{const _e=await Ce.updateAppPreferences({translationEnabled:ee});Ot(_e)})},onTranslationAutoSendChange:ee=>{Y(ee),Ye(async()=>{const _e=await Ce.updateAppPreferences({translationAutoSendEnabled:ee});Ot(_e)})},onTranslationTargetLanguageChange:ee=>{oe(ee),Ye(async()=>{const _e=await Ce.updateAppPreferences({translationTargetLanguage:ee});Ot(_e)})},onTranslationOutputModeChange:ee=>{ie(ee),Ye(async()=>{const _e=await Ce.updateAppPreferences({translationOutputMode:ee});Ot(_e)})},onOpenFileTranslation:()=>be(!0),onOpenTranslatorSession:()=>$e(!0),onCreateTranslationBootstrap:()=>{Ye(async()=>{if(!n)throw new Error("Connect a repository before running Translation Bootstrap.");await Ce.createCodexBootstrap({targetLanguage:q}),await dr()})},onUpdateTranslationMemory:()=>{Ye(async()=>{if(!n)throw new Error("Connect a repository before updating translation memory.");await Ce.createCodexMemoryUpdate({targetLanguage:q}),await dr()})},onCreateTask:ee=>Ye(async()=>{const _e=await Ce.createTask(ee);await ai(),M(_e.taskSlug),await Fi(_e.taskSlug)}),onSelectTask:M,themeMode:J,onThemeModeChange:ee=>{H(ee),Ye(async()=>{const _e=await Ce.updateAppPreferences({themeMode:ee});Ot(_e)})},flowPauseAlerts:B,onFlowPauseAlertsChange:ee=>{if(d!=null&&d.enabled){fr();return}z(ee),ee&&lE(),Ye(async()=>{const _e=await Ce.updateAppPreferences({flowPauseAlerts:ee});Ot(_e)})},permissionRequestMode:V,onPermissionRequestModeChange:ee=>{j(ee),Ye(async()=>{const _e=await Ce.updateAppPreferences({permissionRequestMode:ee});Ot(_e)})},launchTemplate:Yt,canSaveLaunchTemplate:hr,canOneClickStart:Un,onSaveLaunchTemplate:()=>{Ye(async()=>{if(!(Lt!=null&&Lt.allRolesHaveSession))throw new Error("Start all four role sessions before saving a launch template.");const ee=await Ce.updateAppPreferences({launchTemplate:{version:1,roles:Lt.roles,autoOrchestration:Lt.autoOrchestration}});Ot(ee)})},onOneClickStart:()=>{Ye(async()=>{if(!Se)throw new Error("Create or select a task before one-click start.");if((await Ce.getTaskStatus(Se.taskSlug)).sessions.length>0)throw new Error("One-click start is only available before any role session has started.");const _e=await Ce.updateOrchestrationState(Se.taskSlug,{mode:Yt.autoOrchestration?"auto":"manual"});R({taskSlug:Se.taskSlug,orchestration:_e});const yt=S2(Yt,{codexReviewerEnabled:ci});for(const Wt of yt)await Ce.startRoleSession(Se.taskSlug,Wt.role,{cols:100,rows:28,permissionMode:Wt.permissionMode,model:Wt.model,effort:Wt.effort});$("project-manager"),await Ln(Se.taskSlug),await ai(),ye(Wt=>Wt+1)})},onTryFlowPauseAlert:()=>{Ii("This is a test flow pause alert.",void 0,{resetAudio:!0})},onMarkAllMessagesDone:ee=>{Ye(async()=>{const _e=await Ce.markAllMessagesDone(ee);T({taskSlug:ee,messages:_e.messages}),await Ln(ee)})},onDeleteMessageHistory:ee=>{Ye(async()=>{const _e=await Ce.deleteMessageHistory(ee);T({taskSlug:ee,messages:_e.messages}),await Ln(ee)})}}),children:[We?O.jsx("div",{className:"error-banner",children:We}):null,ke?O.jsx("div",{className:"flow-pause-alert-backdrop",children:O.jsxs("section",{"aria-describedby":"flow-pause-alert-body flow-pause-alert-hint","aria-labelledby":"flow-pause-alert-title","aria-modal":"true",className:"flow-pause-alert",role:"alertdialog",children:[O.jsx("p",{className:"flow-pause-alert-kicker",children:"VCM needs attention"}),O.jsx("h2",{id:"flow-pause-alert-title",children:"Flow needs attention"}),O.jsx("p",{id:"flow-pause-alert-body",children:ke.text}),O.jsx("p",{id:"flow-pause-alert-hint",className:"flow-pause-alert-hint",children:"The task may be complete, waiting for your decision, or blocked by a workflow issue."}),O.jsx("button",{type:"button",autoFocus:!0,onClick:Ui,children:"Confirm"})]})}):null,S&&b?O.jsx(nE,{busy:Ne,qrCheck:E,qrLogin:b,onCheck:()=>{Ye(async()=>{const ee=await Ce.checkGatewayQrLogin();x(ee),(ee.status==="confirmed"||ee.status==="binded_redirect")&&_(!1),await vt()})},onClose:()=>_(!1)}):null,n&&Se?O.jsx(Z2,{task:Se,activeRole:G,codexReviewerEnabled:ci,translationEnabled:te,translationAutoSendEnabled:me,translationTargetLanguage:q,refreshNonce:he,onTaskChanged:async()=>{await ai()},onActiveRoleChange:$,onMessagesChanged:fl,onOrchestrationChanged:dl,onRoundStateChanged:ss,onEventsChanged:pl,onLaunchStateChanged:ls}):O.jsxs("section",{className:"empty-workspace",children:[O.jsx("h1",{children:n?"Create a task to open the workspace":"Connect a repository to begin"}),O.jsx("p",{children:n?"Tasks create local role commands, logs, and handoff artifacts for the selected repository.":"VibeCodingMaster will create a local task workspace, role sessions, logs, and handoff artifacts."})]}),O.jsx(i2,{open:de,targetLanguage:q,onClose:()=>be(!1)}),O.jsx(D1,{open:we,busy:Ne,session:Je,model:Dt,effort:Rt,onClose:()=>$e(!1),onModelChange:Ut,onEffortChange:Pt,onStart:()=>{Ye(async()=>{const ee=await Ce.startCodexTranslatorSession({cols:100,rows:28,model:Dt,effort:Rt});De(ee)})},onResume:()=>{Ye(async()=>{const ee=await Ce.resumeCodexTranslatorSession({cols:100,rows:28,model:Dt,effort:Rt});De(ee)})},onRestart:()=>{Ye(async()=>{const ee=await Ce.restartCodexTranslatorSession({cols:100,rows:28,model:Dt,effort:Rt});De(ee)})},onStop:()=>{Ye(async()=>{const ee=await Ce.stopCodexTranslatorSession();De(ee)})}})]})}function nE({busy:n,onCheck:r,onClose:s,qrCheck:o,qrLogin:p}){const[v,f]=ae.useState(""),[a,c]=ae.useState("");return ae.useEffect(()=>{let h=!1;if(c(""),f(""),p.qrcodeUrl.startsWith("data:image/")){f(p.qrcodeUrl);return}try{const d=ts(0,"M");d.addData(p.qrcodeUrl),d.make(),h||f(d.createDataURL(8,2))}catch(d){h||c(d instanceof Error?d.message:"Failed to render QR code.")}return()=>{h=!0}},[p.qrcodeUrl]),O.jsx("div",{className:"modal-backdrop",children:O.jsxs("section",{"aria-labelledby":"gateway-qr-title","aria-modal":"true",className:"gateway-qr-modal",role:"dialog",children:[O.jsxs("header",{children:[O.jsxs("div",{children:[O.jsx("h2",{id:"gateway-qr-title",children:"Weixin Gateway Login"}),O.jsx("p",{className:"muted",children:"Scan with Weixin, confirm on the phone, then click Confirm."})]}),O.jsx("button",{type:"button",onClick:s,children:"Close"})]}),O.jsxs("div",{className:"gateway-qr-modal-body",children:[O.jsx("div",{className:"gateway-qr-code-frame",children:v?O.jsx("img",{alt:"Weixin Gateway QR login",src:v}):O.jsx("div",{className:"gateway-qr-placeholder",children:a||"Rendering QR code..."})}),O.jsxs("dl",{className:"gateway-qr-meta",children:[O.jsxs("div",{children:[O.jsx("dt",{children:"Status"}),O.jsx("dd",{children:(o==null?void 0:o.status)??p.status})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Expires"}),O.jsx("dd",{children:iE(p.expiresAt)})]}),o!=null&&o.message?O.jsxs("div",{children:[O.jsx("dt",{children:"Message"}),O.jsx("dd",{children:o.message})]}):null]})]}),O.jsx("footer",{children:O.jsx("button",{type:"button",disabled:n,onClick:r,children:"Confirm"})})]})})}function iE(n){const r=new Date(n);return Number.isNaN(r.getTime())?"-":new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(r)}let zi=null;function rE(n){const r=Date.parse(n.startedAt??""),s=Date.parse(n.stoppedAt??n.lastTurnEndedAt??"");return!Number.isFinite(r)||!Number.isFinite(s)?0:Math.max(0,s-r)}function sE(n){const r=n.roundId??n.startedAt??n.taskSlug,s=n.stoppedAt??n.lastTurnEndedAt??"stopped";return`${r}:${s}`}async function lE(){const n=T_();return n?D_(n):!1}async function Oa(){const n=T_();if(!n||!await D_(n))return!1;try{const s=n.createGain(),o=n.currentTime+.025;return s.gain.setValueAtTime(.85,n.currentTime),s.connect(n.destination),cg(n,s,{frequency:587.33,startAt:o,duration:.18,peakGain:.045}),cg(n,s,{frequency:783.99,startAt:o+.11,duration:.28,peakGain:.055}),window.setTimeout(()=>{s.disconnect()},800),!0}catch{return!1}}function T_(){const n=window.AudioContext??window.webkitAudioContext;if(!n)return null;try{return(!zi||zi.state==="closed")&&(zi=new n),zi}catch{return null}}function aE(){Hu(zi)}function Hu(n){zi=null,n&&n.state!=="closed"&&n.close().catch(()=>{})}async function D_(n){if(og(n))return!0;try{await n.resume();const r=og(n);return!r&&n===zi&&Hu(n),r}catch{return n===zi&&Hu(n),!1}}function og(n){return n.state==="running"}function cg(n,r,s){const o=n.createGain(),p=n.createOscillator(),v=n.createOscillator(),f=s.startAt+s.duration;o.gain.setValueAtTime(1e-4,s.startAt),o.gain.exponentialRampToValueAtTime(s.peakGain,s.startAt+.018),o.gain.exponentialRampToValueAtTime(1e-4,f),p.type="sine",p.frequency.setValueAtTime(s.frequency,s.startAt),v.type="triangle",v.frequency.setValueAtTime(s.frequency*2.01,s.startAt),p.connect(o),v.connect(o),o.connect(r),p.start(s.startAt),v.start(s.startAt),p.stop(f+.02),v.stop(f+.02)}const R_=document.getElementById("root");if(!R_)throw new Error("Missing #root element.");Q0.createRoot(R_).render(O.jsx(ae.StrictMode,{children:O.jsx(tE,{})}));
|
|
91
|
+
`;function t2({active:n=!0,autoSendEnabled:r,targetLanguage:s,taskSlug:o,role:d,sessionId:v}){const[f,a]=ae.useState([]),[c,h]=ae.useState([]),[m,u]=ae.useState(""),[_,C]=ae.useState(!1),[E,x]=ae.useState("ready"),[b,S]=ae.useState(""),[g,y]=ae.useState(Date.now()),[A,M]=ae.useState(!1),[D,T]=ae.useState(""),[k,R]=ae.useState(0),N=ae.useRef(n),I=ae.useRef(1),P=ae.useRef(null);ae.useEffect(()=>{N.current=n},[n]),ae.useEffect(()=>{a([]),h([]),T(""),x("ready"),S(""),I.current=1;let j=!1,te;const he=()=>{j||(te=window.setTimeout(me,N.current?200:1e3))},me=async()=>{if(!j)try{const Y=await be.pollTranslationSession(v,I.current);if(j)return;W(Y.events),I.current=Y.nextCursor,x(Y.status),N.current&&S(g2(new Date().toISOString()))}catch(Y){j||T(Y instanceof Error?Y.message:"Translation poll failed.")}finally{he()}};return be.startTranslationSession(o,d).then(Y=>{j||(x(Y.status),I.current=Y.nextCursor,me())}).catch(Y=>{j||T(Y instanceof Error?Y.message:"Translation start failed.")}),()=>{j=!0,te!==void 0&&window.clearTimeout(te),be.stopTranslationSession(v).catch(()=>{})}},[v,o,d]),ae.useEffect(()=>{if(!n)return;const j=P.current;if(!j)return;const te=window.requestAnimationFrame(()=>{j.scrollTop=j.scrollHeight});return()=>window.cancelAnimationFrame(te)},[n,k]);const F=o2(f);ae.useEffect(()=>{if(!F)return;y(Date.now());const j=window.setInterval(()=>y(Date.now()),250);return()=>window.clearInterval(j)},[F]);async function K(j=!1){const te=m;M(!0),T(""),C(!1);try{const he=await be.translateUserInput(o,d,{text:te,mode:j?"auto-send":"review-before-send",useContext:!1,send:j});he.sent?(u(""),C(!1)):(u(x_(te,he.englishPreview)),C(!0))}catch(he){T(he instanceof Error?he.message:"Translation failed.")}finally{M(!1)}}function W(j){if(j.length===0)return;for(const he of j)he.type==="status"?x(he.status):he.type==="error"?T(he.message):he.type==="failures"&&h(he.failures);const te=j.filter(he=>he.type==="entry");te.length>0&&(a(he=>{const me=te.reduce((q,oe)=>p2(q,oe.entry),he),Y=u2(me);return Y.removedIds.size>0&&h(q=>q.filter(oe=>!Y.removedIds.has(oe.translationId))),Y.entries}),R(he=>he+1))}async function V(){const j=_?ig(m):m;if(j.trim()){M(!0),T("");try{await be.sendTranslatedInput(o,d,{englishText:j}),u(""),C(!1)}catch(te){T(te instanceof Error?te.message:"Failed to send English input.")}finally{M(!1)}}}function $(j){j.key!=="Enter"||j.shiftKey||j.nativeEvent.isComposing||(j.preventDefault(),!A&&m.trim()&&(_?V():K(r)))}async function J(){a([]),h([]),I.current=1,await be.clearTranslationSession(v).catch(j=>T(j.message))}async function H(){M(!0),T("");try{const j=await be.ignoreTranslationFailures(v);h(j.failures)}catch(j){T(j instanceof Error?j.message:"Failed to ignore translation failures.")}finally{M(!1)}}async function B(){M(!0),T("");try{const j=await be.retryTranslationFailures(v);h(j.failures)}catch(j){T(j instanceof Error?j.message:"Failed to retry translation failures.")}finally{M(!1)}}const z=c2(f,E,g),G=c.length;return O.jsxs("aside",{className:"translation-panel",children:[O.jsxs("header",{className:"translation-panel-header",children:[O.jsxs("div",{className:"translation-panel-titlebar",children:[O.jsx("h2",{children:"Translation"}),O.jsxs("div",{className:"translation-panel-actions",children:[G>0?O.jsxs(O.Fragment,{children:[O.jsxs("button",{type:"button",disabled:A,onClick:()=>void H(),children:["Ignore ",G]}),O.jsxs("button",{type:"button",disabled:A,onClick:()=>void B(),children:["Retry ",G]})]}):null,O.jsx("button",{type:"button",onClick:()=>void J(),children:"Clear"})]})]}),O.jsxs("div",{className:"translation-status-row",children:[O.jsxs("p",{children:["Codex · target ",n2(s)," · ",z]}),O.jsx("p",{children:b?`poll ${b}`:"poll -"})]})]}),D?O.jsx("div",{className:"error-banner",children:D}):null,O.jsxs("div",{className:"translation-entry-list",ref:P,children:[f.length===0?O.jsx("p",{className:"muted",children:"Translated Claude Code output will appear here."}):null,f.map(j=>O.jsx(l2,{entry:j},j.id))]}),O.jsx("div",{className:"translation-composer",children:O.jsxs("div",{className:"translation-composer-row",children:[O.jsx("textarea",{value:m,onChange:j=>{u(j.target.value),(!j.target.value.trim()||_&&!d2(j.target.value))&&C(!1)},onKeyDown:$,placeholder:"输入中文,先翻译成英文工程指令..."}),O.jsx("div",{className:"translation-composer-actions",children:O.jsx("button",{type:"button",disabled:A||!_||!ig(m).trim(),onClick:()=>void V(),children:"Send English"})})]})})]})}function n2(n){var r;return((r=pg.find(s=>s.value===n))==null?void 0:r.label)??n}function i2({open:n,targetLanguage:r,onClose:s}){const[o,d]=ae.useState(!1),[v,f]=ae.useState(""),[a,c]=ae.useState(null),[h,m]=ae.useState(""),[u,_]=ae.useState(""),[C,E]=ae.useState(""),[x,b]=ae.useState(!1),[S,g]=ae.useState(null),[y,A]=ae.useState(""),[M,D]=ae.useState(""),[T,k]=ae.useState(""),[R,N]=ae.useState(!1);ae.useEffect(()=>{if(!n)return;let V=!1,$;const J=async()=>{V||(await I(!0),V||($=window.setTimeout(J,2e3)))};return J(),()=>{V=!0,$!==void 0&&window.clearTimeout($)}},[n,h]);async function I(V=!1){try{const $=await be.getCodexTranslationState();c($);const J=h?$.fileIndex.jobs.some(H=>H.id===h):!1;if((!h||!J)&&$.fileIndex.jobs[0])P($.fileIndex.jobs[0].id);else if(!$.fileIndex.jobs[0])m(""),_(""),E("");else if(V&&h){const H=await be.readCodexFileTranslation(h);_(H.output),E(H.report)}}catch($){f($ instanceof Error?$.message:"Failed to load file translations.")}}async function P(V){m(V),_(""),E("");try{const $=await be.readCodexFileTranslation(V);_($.output),E($.report)}catch($){f($ instanceof Error?$.message:"Failed to read translated file.")}}async function F(){b(!0),await K(y,M)}async function K(V="",$=""){N(!0),f("");try{const J=await be.browseCodexTranslationSourceFiles({path:V,query:$,limit:250});g(J),A(J.currentPath),D($)}catch(J){f(J instanceof Error?J.message:"Failed to browse source files.")}finally{N(!1)}}async function W(V=T){const $=V.trim();if($){d(!0),f("");try{const J=await be.createCodexFileTranslation({sourcePath:$,targetLanguage:r});b(!1),await I(),await P(J.id)}catch(J){f(J instanceof Error?J.message:"Failed to create file translation.")}finally{d(!1)}}}return n?O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"modal-backdrop file-translation-backdrop",children:O.jsx(s2,{busy:o,error:v,state:a,selectedJobId:h,output:u,report:C,onClose:()=>{b(!1),s()},onRefresh:()=>void I(),onSelectJob:V=>void P(V),onTranslate:()=>void F()})}),x?O.jsx(r2,{busy:o||R,state:S,currentPath:y,query:M,selectedPath:T,onBrowse:(V,$)=>void K(V,$),onClose:()=>b(!1),onQueryChange:D,onSelectPath:k,onTranslate:()=>void W()}):null]}):null}function r2({busy:n,state:r,currentPath:s,query:o,selectedPath:d,onBrowse:v,onClose:f,onQueryChange:a,onSelectPath:c,onTranslate:h}){const m=(r==null?void 0:r.entries)??[],u=m.filter(C=>C.type==="directory"),_=m.filter(C=>C.type==="file");return O.jsx("div",{className:"modal-backdrop translation-file-browser-backdrop",children:O.jsxs("section",{className:"translation-file-browser-modal",role:"dialog","aria-modal":"true","aria-label":"Select Source File",children:[O.jsxs("header",{children:[O.jsxs("div",{children:[O.jsx("h2",{children:"Select Source File"}),O.jsx("p",{children:s||"."})]}),O.jsx("button",{type:"button",onClick:f,children:"Close"})]}),O.jsxs("div",{className:"translation-file-browser-controls",children:[O.jsxs("div",{className:"translation-file-browser-nav",children:[O.jsx("button",{type:"button",disabled:n||!s,onClick:()=>v((r==null?void 0:r.parentPath)??"",""),children:"Up"}),O.jsx("button",{type:"button",disabled:n||!s,onClick:()=>v("",""),children:"Root"})]}),O.jsxs("form",{className:"translation-file-browser-search",onSubmit:C=>{C.preventDefault(),v(s,o)},children:[O.jsx("input",{value:o,onChange:C=>a(C.target.value),placeholder:"Search files"}),O.jsx("button",{type:"submit",disabled:n,children:"Search"}),O.jsx("button",{type:"button",disabled:n||!o,onClick:()=>v(s,""),children:"Clear"})]})]}),O.jsxs("div",{className:"translation-file-browser-layout",children:[O.jsxs("div",{className:"translation-file-browser-list",children:[n&&!r?O.jsx("p",{className:"muted",children:"Loading files..."}):null,!n&&m.length===0?O.jsx("p",{className:"muted",children:"No source files found."}):null,u.length>0?O.jsxs("div",{className:"translation-file-browser-group",children:[O.jsx("h3",{children:"Folders"}),u.map(C=>O.jsx(ng,{entry:C,selected:d===C.path,onBrowse:v,onSelectPath:c},C.path))]}):null,_.length>0?O.jsxs("div",{className:"translation-file-browser-group",children:[O.jsx("h3",{children:"Files"}),_.map(C=>O.jsx(ng,{entry:C,selected:d===C.path,onBrowse:v,onSelectPath:c},C.path))]}):null,r!=null&&r.truncated?O.jsx("p",{className:"translation-entry-note",children:"Result limit reached."}):null]}),O.jsxs("aside",{className:"translation-file-browser-selection",children:[O.jsxs("label",{children:[O.jsx("span",{children:"Source path"}),O.jsx("input",{value:d,onChange:C=>c(C.target.value)})]}),O.jsx("button",{type:"button",disabled:n||!d.trim(),onClick:h,children:"Translate File"})]})]})]})})}function ng({entry:n,selected:r,onBrowse:s,onSelectPath:o}){const d=n.type==="directory";return O.jsxs("button",{className:r?"translation-file-browser-entry is-selected":"translation-file-browser-entry",type:"button",onClick:()=>d?s(n.path,""):o(n.path),onDoubleClick:()=>d?s(n.path,""):void 0,children:[O.jsx("span",{children:d?"DIR":"FILE"}),O.jsx("strong",{children:n.name}),O.jsx("small",{children:n.path})]})}function s2({busy:n,error:r,state:s,selectedJobId:o,output:d,report:v,onClose:f,onRefresh:a,onSelectJob:c,onTranslate:h}){const m=(s==null?void 0:s.fileIndex.jobs)??[],u=m.find(_=>_.id===o);return O.jsxs("section",{className:"file-translation-modal",role:"dialog","aria-modal":"true","aria-label":"File Translation",children:[O.jsxs("header",{className:"file-translation-header",children:[O.jsxs("div",{children:[O.jsx("h2",{children:"File Translation"}),O.jsx("p",{children:"Codex · 中英互译"})]}),O.jsxs("div",{className:"file-translation-toolbar",children:[O.jsx("button",{type:"button",disabled:n,onClick:h,children:"Translate"}),O.jsx("button",{type:"button",disabled:n,onClick:a,children:"Refresh"}),O.jsx("button",{type:"button",onClick:f,children:"Close"})]})]}),r?O.jsx("div",{className:"error-banner",children:r}):null,s!=null&&s.memoryInitialized?null:O.jsx("p",{className:"translation-entry-note",children:"Translation memory is not initialized. Run Bootstrap from the sidebar before important file translations."}),O.jsxs("div",{className:"file-translation-layout",children:[O.jsxs("div",{className:"file-translation-list",children:[m.length===0?O.jsx("p",{className:"muted",children:"No translated files yet."}):null,m.map(_=>O.jsxs("button",{className:_.id===o?"file-translation-item is-active":"file-translation-item",type:"button",onClick:()=>c(_.id),children:[O.jsx("strong",{children:_.sourcePath}),O.jsxs("span",{children:[_.status," · ",_.targetLanguage]})]},_.id))]}),O.jsx("div",{className:"file-translation-preview",children:u?O.jsxs(O.Fragment,{children:[O.jsxs("header",{children:[O.jsx("strong",{children:u.sourcePath}),O.jsx("span",{children:u.status})]}),O.jsx("div",{className:"translation-markdown",children:O.jsx(Jg,{remarkPlugins:[w_],children:d||v||"Translation output is not available yet."})})]}):O.jsx("p",{className:"muted",children:"Select a translated file to preview it."})})]})]})}function l2({entry:n}){if(n.sourceKind==="conversation-boundary")return O.jsx(a2,{entry:n});const r=f2(n),s=n.sourceKind==="tool-output",o=n.direction==="user-input-to-english",d=["translation-entry",`is-${n.sourceKind}`,o?"is-user-input":""].filter(Boolean).join(" ");return O.jsxs("article",{className:d,children:[s?O.jsx("pre",{children:r}):O.jsx("div",{className:"translation-markdown",children:O.jsx(Jg,{remarkPlugins:[w_],children:r})}),n.warning?O.jsx("p",{className:"translation-entry-note",children:n.warning}):null,n.error?O.jsx("p",{className:"translation-entry-note is-error",children:n.error}):null]})}function a2({entry:n}){const r=n.boundaryKind==="end"?"结束":"开始",s=n.conversationTurn??0,o=_2(n.occurredAt??n.createdAt);return O.jsxs("div",{className:"translation-conversation-boundary","aria-label":`${r} 第 ${s} 轮 ${o}`,children:[O.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"}),O.jsx("span",{children:r}),O.jsxs("span",{children:["第 ",s," 轮"]}),O.jsx("time",{children:o}),O.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"})]})}function o2(n){const r=n.find(ah);return(r==null?void 0:r.translationStartedAt)??(r==null?void 0:r.createdAt)}function c2(n,r,s){const o=n.find(ah);if(o)return`translating ${m2(Math.max(0,s-h2(o)))}`;const d=n.at(-1);return(d==null?void 0:d.status)==="failed"||r==="failed"?"error":r}function ah(n){return n.status==="queued"||n.status==="translating"}function u2(n){const r=n.length-e2;if(r<=0)return{entries:n,removedIds:new Set};const s=new Set;for(const o of n){if(s.size>=r)break;ah(o)||s.add(o.id)}return s.size===0?{entries:n,removedIds:s}:{entries:n.filter(o=>!s.has(o.id)),removedIds:s}}function h2(n){const r=Date.parse(n.translationStartedAt??n.createdAt);return Number.isFinite(r)?r:Date.now()}function f2(n){return n.status==="queued"||n.status==="translating"?n.sourceText:n.status==="translated"?n.direction==="user-input-to-english"?x_(n.sourceText,n.translatedText):n.translatedText:n.translatedText||n.sourceText}function x_(n,r){return`${n.trimEnd()}${Ia}${r.trimStart()}`}function d2(n){return n.includes(Ia)}function ig(n){const r=n.indexOf(Ia);return r===-1?n:n.slice(r+Ia.length)}function p2(n,r){return n.findIndex(o=>o.id===r.id)===-1?[...n,r]:n.map(o=>o.id===r.id?r:o)}function m2(n){if(n<1e3)return`${Math.max(.1,n/1e3).toFixed(1)}s`;const r=n/1e3;if(r<60)return`${r.toFixed(1)}s`;const s=Math.floor(r/60),o=Math.floor(r%60).toString().padStart(2,"0");return`${s}:${o}`}function g2(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleTimeString()}function _2(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleTimeString()}function v2(n,r){return n.find(s=>s.taskSlug===r)??n[0]??null}const y2={role:"codex-reviewer",permissionMode:"default",model:"gpt-5.5",effort:"xhigh"};function S2(n,r){const s=Xr.map(o=>({role:o.name,permissionMode:n.roles[o.name].permissionMode,model:n.roles[o.name].model,effort:n.roles[o.name].effort}));return r.codexReviewerEnabled&&s.push(y2),s}const b2=["architecture-plan","validation-adequacy","final-diff"];function C2({events:n,maxEvents:r=8,showHeader:s=!0}){const o=r===null?n:n.slice(-r);return O.jsxs("section",{className:"event-log",children:[s?O.jsx("h2",{children:"Events"}):null,n.length===0?O.jsx("p",{className:"muted",children:"No terminal events yet."}):O.jsx("ol",{children:o.map((d,v)=>O.jsx("li",{children:d},`${d}-${v}`))})]})}function Wr({status:n}){return O.jsx("span",{className:`status-badge status-${n}`,children:n.replaceAll("_"," ")})}function w2({status:n,bootstrapStatus:r,applyResult:s,taskSyncResult:o,canCommitAndRebaseTask:d=!1,busy:v=!1,onRefresh:f,onApply:a,onCommitAndRebaseTask:c,onStartBootstrap:h}){const[m,u]=ae.useState(!1),_=r==null?void 0:r.session;return ae.useEffect(()=>{_||u(!1)},[_]),n?O.jsxs("section",{className:"harness-panel",children:[O.jsxs("div",{className:"harness-stage",children:[O.jsxs("div",{className:"harness-panel-header",children:[O.jsxs("div",{children:[O.jsx("strong",{children:"Fixed install"}),O.jsx("p",{className:"muted",children:n.initialized?n.needsApply?`${n.plannedChanges.length} pending updates`:"Up to date":"Not initialized"})]}),O.jsx("div",{className:"harness-actions",children:n.initialized?O.jsxs(O.Fragment,{children:[O.jsx("button",{type:"button",disabled:v,onClick:()=>void f(),children:"Refresh"}),n.needsApply?O.jsx("button",{type:"button",disabled:v,onClick:()=>void a(),children:"Update"}):null]}):O.jsx("button",{type:"button",disabled:v,onClick:()=>void a(),children:"Initialize"})})]}),n.initialized&&n.needsApply?O.jsxs(O.Fragment,{children:[O.jsx("h3",{className:"harness-file-list-title",children:"Files to update"}),O.jsx("ol",{className:"harness-file-list",children:n.plannedChanges.map(C=>O.jsxs("li",{children:[O.jsx("span",{children:C.path}),O.jsx(Wr,{status:C.action})]},`${C.path}:${C.action}`))})]}):null]}),O.jsxs("div",{className:"harness-stage",children:[O.jsxs("div",{className:"harness-panel-header",children:[O.jsxs("div",{children:[O.jsx("strong",{children:"Bootstrap"}),O.jsx("p",{className:"muted",children:r?x2(r.status):"not loaded"})]}),O.jsx("div",{className:"harness-actions",children:O.jsx("button",{type:"button",disabled:v||!(r!=null&&r.canStart),onClick:()=>{u(!0),h()},children:"Run Bootstrap"})})]}),r?O.jsxs(O.Fragment,{children:[O.jsx("ol",{className:"harness-file-list",children:r.checks.map(C=>O.jsxs("li",{title:C.detail??C.path??"",children:[O.jsx("span",{children:C.path?`${C.label}: ${C.path}`:C.label}),O.jsx(Wr,{status:C.status})]},C.key))}),_?O.jsxs("div",{className:"harness-bootstrap-session",children:[O.jsxs("div",{children:[O.jsx("span",{children:_.command}),O.jsx(Wr,{status:_.status})]}),O.jsx("button",{type:"button",onClick:()=>u(!0),children:"Open Terminal"})]}):null]}):O.jsx("p",{className:"muted",children:"Refresh harness status to load bootstrap checks."})]}),s?O.jsxs("div",{className:"harness-result",children:[O.jsx("p",{children:s.message}),s.changedFiles.length>0?O.jsxs(O.Fragment,{children:[O.jsx("ul",{children:s.changedFiles.map(C=>O.jsxs("li",{children:[O.jsx("strong",{children:C.action})," ",C.path]},`${C.path}:${C.action}`))}),d&&!o?O.jsx("button",{type:"button",disabled:v,onClick:()=>void c(),children:"Commit & rebase task"}):null]}):null,o?O.jsx("p",{className:"muted",children:o.message}):null]}):null,n.warnings.length>0?O.jsx("ul",{className:"warnings",children:n.warnings.map(C=>O.jsx("li",{children:C},C))}):null,r!=null&&r.warnings.length?O.jsx("ul",{className:"warnings",children:r.warnings.map(C=>O.jsx("li",{children:C},C))}):null,m&&_?O.jsx("div",{className:"harness-bootstrap-modal",role:"dialog","aria-modal":"true","aria-label":"Harness bootstrap terminal",children:O.jsxs("div",{className:"harness-bootstrap-modal-surface",children:[O.jsxs("header",{className:"harness-bootstrap-modal-header",children:[O.jsxs("div",{children:[O.jsx("strong",{children:"Harness Bootstrap Terminal"}),O.jsx("p",{className:"muted",children:_.command})]}),O.jsxs("div",{className:"harness-bootstrap-modal-actions",children:[O.jsx(Wr,{status:_.status}),O.jsx("button",{type:"button",onClick:()=>u(!1),children:"Close"})]})]}),O.jsx("div",{className:"harness-bootstrap-terminal",children:O.jsx(Fu,{sessionId:_.id,active:m})})]})}):null]}):null}function x2(n){return n.replaceAll("_"," ")}function oh(n){return{total:n.length,accepted:n.filter(r=>r.acceptedAt).length,delivered:n.filter(r=>r.deliveredAt).length}}function E2(n,r=6){const s=[...n].sort(T2).map((d,v)=>({message:d,sequence:v+1}));return[...r===null?s:s.slice(-r)].sort((d,v)=>v.sequence-d.sequence)}function k2({messages:n,orchestration:r,busy:s,maxMessages:o=6,showControls:d=!0,showHeader:v=!0,onModeChange:f,onMarkAllDone:a}){const[c,h]=ae.useState(null),m=oh(n),u=(r==null?void 0:r.mode)??"auto",_=E2(n,o);async function C(E){await D2(E.body),h(E.id),window.setTimeout(()=>h(x=>x===E.id?null:x),1200)}return O.jsxs("section",{className:"message-panel",children:[v?O.jsxs("div",{className:"message-panel-header",children:[O.jsxs("div",{children:[O.jsx("h2",{children:"Messages"}),O.jsxs("p",{className:"muted",children:[m.total," total / ",m.accepted," accepted"]})]}),d&&f?O.jsx("div",{className:"message-controls",children:O.jsxs("label",{className:"message-mode-toggle",children:[O.jsx("input",{type:"checkbox",checked:u==="auto",disabled:s,onChange:E=>f(E.target.checked?"auto":"manual")}),O.jsx("span",{children:"Auto orchestration"})]})}):null,d&&a?O.jsx("button",{type:"button",disabled:s,onClick:a,children:"Mark All Done"}):null]}):null,n.length===0?O.jsx("p",{className:"muted",children:"No role messages yet."}):O.jsx("ol",{className:"message-list",children:_.map(({message:E,sequence:x})=>O.jsxs("li",{className:"message-item",children:[O.jsxs("div",{className:"message-item-main",children:[O.jsxs("div",{className:"message-meta",children:[O.jsxs("span",{className:"message-sequence",children:["#",x]}),O.jsx("time",{dateTime:Ua(E),children:A2(Ua(E))}),O.jsxs("strong",{children:[E.fromRole," ","->"," ",E.toRole]}),O.jsx("span",{children:E.type})]}),O.jsx("p",{children:E.body}),E.failureReason?O.jsx("span",{className:"message-reason",children:E.failureReason}):null,E.bodyPath?O.jsx("span",{className:"message-path",children:E.bodyPath}):null]}),O.jsx("div",{className:"message-actions",children:O.jsx("button",{type:"button",disabled:s,onClick:()=>void C(E),children:c===E.id?"Copied":"Copy"})})]},E.id))})]})}function A2(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function Ua(n){return n.acceptedAt??n.deliveredAt??n.dispatchingAt??n.createdAt}function T2(n,r){const s=Ua(n).localeCompare(Ua(r));if(s!==0)return s;const o=n.createdAt.localeCompare(r.createdAt);return o!==0?o:n.id.localeCompare(r.id)}async function D2(n){var s;if((s=navigator.clipboard)!=null&&s.writeText){await navigator.clipboard.writeText(n);return}const r=document.createElement("textarea");r.value=n,r.setAttribute("readonly","true"),r.style.position="fixed",r.style.left="-9999px",document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove()}function R2({defaultPath:n="",recentPaths:r=[],busy:s=!1,onConnect:o}){const[d,v]=ae.useState(n);ae.useEffect(()=>{n&&v(n)},[n]);async function f(a){a.preventDefault(),await o(d)}return O.jsx("form",{className:"repo-connect",onSubmit:f,children:O.jsxs("div",{className:r.length>0?"inline-form has-recent-paths":"inline-form",children:[O.jsx("input",{"aria-label":"Repository path",id:"repo-path",value:d,onChange:a=>v(a.target.value),placeholder:"/path/to/repo"}),r.length>0?O.jsxs("select",{"aria-label":"Recent repositories",className:"repo-recent-select",value:"",onChange:a=>{a.target.value&&v(a.target.value)},children:[O.jsx("option",{value:"",children:"Recent"}),r.map(a=>O.jsx("option",{value:a,children:a},a))]}):null,O.jsx("button",{type:"submit",disabled:s||!d.trim(),children:"Connect"})]})})}function M2({tasks:n,activeTaskSlug:r,onSelect:s}){return O.jsx("nav",{className:"task-nav","aria-label":"Tasks",children:n.map(o=>O.jsxs("button",{className:o.taskSlug===r?"task-nav-item is-active":"task-nav-item",type:"button",onClick:()=>s(o.taskSlug),children:[O.jsx("span",{children:o.title||o.taskSlug}),O.jsx(Wr,{status:o.status})]},o.taskSlug))})}function L2({project:n,recentRepositoryPaths:r,tasks:s,activeTaskSlug:o,messages:d,orchestration:v,events:f,roundState:a,codexReview:c,translationEnabled:h,translationAutoSendEnabled:m,translationTargetLanguage:u,translationOutputMode:_,translatorSession:C,harnessStatus:E,harnessBootstrapStatus:x,harnessApplyResult:b,harnessTaskSyncResult:S,gatewayStatus:g,gatewayQrLogin:y,gatewayQrCheck:A,busy:M,onConnect:D,onRefreshConnectedRepository:T,onPullConnectedRepository:k,onRefreshHarness:R,onApplyHarness:N,onCommitAndRebaseHarnessTask:I,onStartHarnessBootstrap:P,onRefreshGateway:F,onGatewayEnabledChange:K,onGatewayTranslationChange:W,onStartGatewayQrLogin:V,onResetGatewayBinding:$,onCodexGateEnabledChange:J,onTranslationEnabledChange:H,onTranslationAutoSendChange:B,onTranslationTargetLanguageChange:z,onTranslationOutputModeChange:G,onOpenFileTranslation:j,onOpenTranslatorSession:te,onCreateTranslationBootstrap:he,onUpdateTranslationMemory:me,onCreateTask:Y,onSelectTask:q,themeMode:oe,onThemeModeChange:Z,flowPauseAlerts:ie,onFlowPauseAlertsChange:de,permissionRequestMode:Ce,onPermissionRequestModeChange:we,launchTemplate:$e,canSaveLaunchTemplate:at,canOneClickStart:Re,onSaveLaunchTemplate:Bt,onOneClickStart:xt,onTryFlowPauseAlert:Nt,onMarkAllMessagesDone:Kt,onDeleteMessageHistory:Ft}){const[pt,tt]=ae.useState(""),[jt,ue]=ae.useState(!1),[ye,ke]=ae.useState(!1),[Me,Be]=ae.useState(()=>o?null:"repository-path"),ot=oh(d),je=pt.trim(),mt=s.find(Ee=>Ee.taskSlug===o)??null;ae.useEffect(()=>{Be(Ee=>o&&Ee==="repository-path"?null:!o&&Ee===null?"repository-path":Ee)},[o]);function We(Ee,yt){Be(yt?Ee:null)}async function Rt(Ee){Ee.preventDefault(),await Y({taskSlug:je}),tt("")}return O.jsxs("div",{className:"project-dashboard",children:[O.jsx("header",{className:"brand-header",children:O.jsx("strong",{children:"VibeCodingMaster"})}),O.jsx(oi,{title:"Repository Path",open:Me==="repository-path",onOpenChange:Ee=>We("repository-path",Ee),children:O.jsx(R2,{defaultPath:(n==null?void 0:n.repoRoot)??"",recentPaths:r,busy:M,onConnect:D})}),n?O.jsx(oi,{title:"Connected Repository",open:Me==="connected-repository",onOpenChange:Ee=>{We("connected-repository",Ee),Ee&&T()},children:O.jsx(I2,{busy:M,project:n,onPull:k})}):null,O.jsx(oi,{title:"Settings",open:Me==="settings",onOpenChange:Ee=>We("settings",Ee),children:O.jsxs("div",{className:"sidebar-settings",children:[O.jsxs("button",{"aria-label":`Theme mode: ${sg(oe)}`,className:"settings-toggle theme-mode-toggle",disabled:M,title:"Cycle theme: system, light, dark",type:"button",onClick:()=>Z(G2(oe)),children:[O.jsx("span",{children:"Theme"}),O.jsx("span",{children:sg(oe)})]}),O.jsxs("button",{"aria-pressed":!(g!=null&&g.enabled)&&ie,className:!(g!=null&&g.enabled)&&ie?"settings-toggle is-active":"settings-toggle",disabled:M||(g==null?void 0:g.enabled),title:g!=null&&g.enabled?"Disabled while Gateway is on":void 0,type:"button",onClick:()=>de(!ie),children:[O.jsx("span",{children:"Flow pause alert"}),O.jsx("span",{children:g!=null&&g.enabled?"off":ie?"on":"off"})]}),O.jsxs("button",{className:"settings-toggle",disabled:M||(g==null?void 0:g.enabled),title:g!=null&&g.enabled?"Disabled while Gateway is on":void 0,type:"button",onClick:Nt,children:[O.jsx("span",{children:"Try alert"}),O.jsx("span",{children:"test"})]}),O.jsxs("label",{className:"settings-select-row",children:[O.jsx("span",{children:"Permission requests"}),O.jsxs("select",{value:Ce,disabled:M,onChange:Ee=>we(Ee.target.value),children:[O.jsx("option",{value:"off",children:"off"}),O.jsx("option",{value:"allowAll",children:"allow all"})]})]}),O.jsxs("button",{className:"settings-toggle",disabled:M||!at,title:"Save the current four role launch settings",type:"button",onClick:Bt,children:[O.jsx("span",{children:"Save launch template"}),O.jsx("span",{children:at?"ready":"needs 4 sessions"})]}),Re?O.jsxs("button",{className:"settings-toggle is-active",disabled:M,title:O2($e),type:"button",onClick:xt,children:[O.jsx("span",{children:"One-click start"}),O.jsx("span",{children:E_($e)})]}):null,o?O.jsxs(O.Fragment,{children:[O.jsxs("button",{type:"button",onClick:()=>ue(!0),children:[O.jsx("span",{children:"Messages"}),O.jsxs("span",{className:"muted",children:[ot.total," total"]})]}),O.jsxs("button",{type:"button",onClick:()=>ke(!0),children:[O.jsx("span",{children:"Events"}),O.jsxs("span",{className:"muted",children:[f.length," total"]})]})]}):null]})}),O.jsx(oi,{title:"Translation",open:Me==="translation",onOpenChange:Ee=>We("translation",Ee),children:O.jsx(B2,{busy:M,enabled:h,autoSendEnabled:m,targetLanguage:u,outputMode:_,fileTranslationAvailable:!!n,translatorSession:C,onAutoSendChange:B,onCreateBootstrap:he,onEnabledChange:H,onUpdateMemory:me,onTargetLanguageChange:z,onOutputModeChange:G,onOpenFileTranslation:j,onOpenTranslatorSession:te})}),n&&o?O.jsx(oi,{title:"Codex Review Gates",open:Me==="codex-review-gates",onOpenChange:Ee=>We("codex-review-gates",Ee),children:O.jsx(j2,{busy:M,state:c,onGateEnabledChange:J})}):null,O.jsx(oi,{title:"Gateway",open:Me==="gateway",onOpenChange:Ee=>{We("gateway",Ee),Ee&&F()},children:O.jsx(H2,{busy:M,qrCheck:A,qrLogin:y,status:g,onEnabledChange:K,onResetBinding:$,onStartQrLogin:V,onTranslationChange:W})}),n?O.jsx(oi,{title:"VCM Harness",open:Me==="vcm-harness",onOpenChange:Ee=>We("vcm-harness",Ee),children:O.jsx(w2,{status:E,bootstrapStatus:x,applyResult:b,taskSyncResult:S,canCommitAndRebaseTask:!!(b!=null&&b.changedFiles.length&&mt),busy:M,onRefresh:R,onApply:N,onCommitAndRebaseTask:I,onStartBootstrap:P})}):null,n?O.jsx(oi,{title:"New Task",open:Me==="new-task",onOpenChange:Ee=>We("new-task",Ee),children:O.jsx("div",{className:"task-create",children:O.jsxs("form",{onSubmit:Rt,children:[O.jsx("input",{value:pt,onChange:Ee=>tt(Ee.target.value),placeholder:"task name"}),O.jsxs("div",{className:"task-create-preview",children:[O.jsxs("small",{children:["branch: ",je?`feature/${je}`:"feature/<task>"]}),O.jsxs("small",{children:["worktree: ",je?`.claude/worktrees/${je}`:".claude/worktrees/<task>"]})]}),O.jsx("button",{type:"submit",disabled:M||!je,children:"Create"})]})})}):null,s.length>0?O.jsx(oi,{title:"Tasks",open:Me==="tasks",onOpenChange:Ee=>We("tasks",Ee),children:O.jsx(M2,{tasks:s,activeTaskSlug:o,onSelect:q})}):null,n&&mt?O.jsx(F2,{task:mt,roundState:a}):null,jt?O.jsx($2,{busy:M,messages:d,orchestration:v,onClose:()=>ue(!1),onMarkAllDone:()=>{o&&Kt(o)},onDeleteMessageHistory:()=>{o&&Ft(o)}}):null,ye?O.jsx(V2,{events:f,onClose:()=>ke(!1)}):null]})}function E_(n){return[n.autoOrchestration?"auto":"manual"].join(" + ")}function O2(n){const r=Object.entries(n.roles).map(([s,o])=>`${s}: ${o.permissionMode} / ${o.model} / ${o.effort}`).join("; ");return`Launch template: ${E_(n)}; ${r}`}function B2({autoSendEnabled:n,busy:r,enabled:s,fileTranslationAvailable:o,outputMode:d,targetLanguage:v,translatorSession:f,onAutoSendChange:a,onCreateBootstrap:c,onEnabledChange:h,onUpdateMemory:m,onOutputModeChange:u,onTargetLanguageChange:_,onOpenFileTranslation:C,onOpenTranslatorSession:E}){return O.jsxs("div",{className:"sidebar-settings",children:[O.jsxs("button",{"aria-pressed":s,className:s?"settings-toggle is-active":"settings-toggle",disabled:r,type:"button",onClick:()=>h(!s),children:[O.jsx("span",{children:"Conversation translation"}),O.jsx("span",{children:s?"on":"off"})]}),O.jsxs("button",{"aria-pressed":n,className:n?"settings-toggle is-active":"settings-toggle",disabled:r,type:"button",onClick:()=>a(!n),children:[O.jsx("span",{children:"Auto-send"}),O.jsx("span",{children:n?"on":"off"})]}),O.jsxs("label",{className:"settings-select-row",children:[O.jsx("span",{children:"Language"}),O.jsx("select",{value:v,disabled:r,onChange:x=>_(x.target.value),children:pg.map(x=>O.jsx("option",{value:x.value,children:x.label},x.value))})]}),O.jsxs("label",{className:"settings-select-row",children:[O.jsx("span",{children:"Reply scope"}),O.jsx("select",{value:d,disabled:r,onChange:x=>u(x.target.value),children:h1.map(x=>O.jsx("option",{value:x.value,children:x.label},x.value))})]}),O.jsxs("button",{className:"settings-toggle",disabled:r||!o,title:o?"Open file translation":"Connect a repository first",type:"button",onClick:C,children:[O.jsx("span",{children:"File translation"}),O.jsx("span",{children:"open"})]}),O.jsxs("button",{className:"settings-toggle",disabled:r||!o,title:o?"Run translation bootstrap":"Connect a repository first",type:"button",onClick:c,children:[O.jsx("span",{children:"Bootstrap"}),O.jsx("span",{children:"run"})]}),O.jsxs("button",{className:"settings-toggle",disabled:r||!o,title:o?"Compact and update translation memory":"Connect a repository first",type:"button",onClick:m,children:[O.jsx("span",{children:"Update memory"}),O.jsx("span",{children:"run"})]}),O.jsxs("div",{className:"settings-status-row",children:[O.jsx("span",{children:"Session status"}),O.jsx("strong",{children:N2(f)})]}),O.jsxs("button",{className:"settings-toggle",disabled:r||!o,title:o?"Open Codex Translator session":"Connect a repository first",type:"button",onClick:E,children:[O.jsx("span",{children:"Open Session"}),O.jsx("span",{children:"open"})]})]})}function N2(n){return n?n.status==="running"?n.activityStatus??"idle":n.status:"not started"}function j2({busy:n,onGateEnabledChange:r,state:s}){return O.jsx("div",{className:"sidebar-settings",children:b2.map(o=>{const d=s==null?void 0:s.gates[o],v=!!(d!=null&&d.required);return O.jsxs("button",{"aria-pressed":v,className:v?"settings-toggle is-active":"settings-toggle",disabled:n||!s,title:d!=null&&d.status?`status: ${d.status}`:void 0,type:"button",onClick:()=>r(o,!v),children:[O.jsx("span",{children:z2(o)}),O.jsx("span",{children:v?"on":"off"})]},o)})})}function z2(n){switch(n){case"architecture-plan":return"Architecture plan";case"validation-adequacy":return"Validation adequacy";case"final-diff":return"Final diff"}return n}function H2({busy:n,onEnabledChange:r,onResetBinding:s,onStartQrLogin:o,onTranslationChange:d,qrCheck:v,qrLogin:f,status:a}){const c=!!(a!=null&&a.binding.tokenConfigured),h=!!(a!=null&&a.binding.tokenConfigured);return O.jsxs("div",{className:"gateway-panel",children:[O.jsxs("div",{className:"gateway-actions",children:[O.jsxs("button",{"aria-pressed":!!(a!=null&&a.enabled),className:a!=null&&a.enabled?"settings-toggle is-active":"settings-toggle",disabled:n||!a||!a.enabled&&!c,title:c?"Enable or disable PM messages and task-changing Gateway commands":"Scan and confirm iLink login first",type:"button",onClick:()=>a?r(!a.enabled):void 0,children:[O.jsx("span",{children:"Gateway"}),O.jsx("span",{children:a!=null&&a.enabled?"on":"off"})]}),O.jsxs("button",{"aria-pressed":!!(a!=null&&a.translationEnabled),className:a!=null&&a.translationEnabled?"settings-toggle is-active":"settings-toggle",disabled:n||!a,type:"button",onClick:()=>a?d(!a.translationEnabled):void 0,children:[O.jsx("span",{children:"Translation"}),O.jsx("span",{children:a!=null&&a.translationEnabled?"on":"off"})]}),h?O.jsx("button",{className:"danger-button",type:"button",disabled:n,onClick:s,children:"Reset Binding"}):O.jsx("button",{type:"button",disabled:n,onClick:o,children:"Start QR Login"})]}),f?O.jsx("p",{className:"muted",children:"QR login started. Use the login dialog to confirm binding."}):null,v?O.jsxs("p",{className:"muted",children:["QR status: ",v.status,v.message?` · ${v.message}`:""]}):null]})}function I2({busy:n,onPull:r,project:s}){const o=s.pullDisabledReason,d=!!s.canPull;return O.jsxs("div",{className:"project-summary",children:[O.jsxs("dl",{children:[O.jsxs("div",{children:[O.jsx("dt",{children:"Base path"}),O.jsx("dd",{children:s.repoRoot})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Branch"}),O.jsx("dd",{children:U2(s)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Remote"}),O.jsx("dd",{children:s.upstreamBranch??"no upstream"})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Status"}),O.jsx("dd",{children:P2(s)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Commit"}),O.jsx("dd",{children:s.shortHeadCommit??s.headCommit??"unknown"})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Working tree"}),O.jsx("dd",{children:s.isDirty?"uncommitted changes":"clean"})]})]}),O.jsxs("div",{className:"connected-repo-actions",children:[O.jsx("button",{type:"button",disabled:n||!d,title:o??"Pull latest changes with git pull --ff-only",onClick:()=>void r(),children:"Pull"}),O.jsx("span",{className:"muted",children:s.checkedAt?`checked ${zu(s.checkedAt)}`:"status not refreshed"})]}),o?O.jsx("p",{className:"muted",children:o}):null,s.warnings.length>0?O.jsx("ul",{className:"warnings",children:s.warnings.map(v=>O.jsx("li",{children:v},v))}):null]})}function U2(n){return n.branch||"unknown"}function P2(n){if(!n.upstreamBranch)return"no upstream";const r=n.ahead??0,s=n.behind??0;return r===0&&s===0?"up to date":r>0&&s>0?`ahead ${r}, behind ${s}`:r>0?`ahead ${r}`:`behind ${s}`}function F2({roundState:n,task:r}){var m;const[s,o]=ae.useState(()=>Date.now()),d=!!(n!=null&&n.startedAt),v=k_(r.createdAt,s),f=rg(n,(n==null?void 0:n.totalCcActiveMs)??0,s),a=d&&n?rg(n,n.currentRoundCcActiveMs,s):0,c=d&&n?q2(n,s):0,h=((m=r.title)==null?void 0:m.trim())||r.taskSlug;return ae.useEffect(()=>{const u=window.setInterval(()=>o(Date.now()),1e3);return()=>window.clearInterval(u)},[]),O.jsxs("section",{className:"task-status-dock","aria-label":"VCM Session status",children:[O.jsxs("div",{className:"task-status-dock-title",children:[O.jsx("strong",{title:h,children:h}),O.jsx("span",{className:`status-badge status-${r.status}`,children:r.status})]}),O.jsxs("dl",{className:"task-status-stats",children:[O.jsxs("div",{children:[O.jsx("dt",{children:"Session start"}),O.jsx("dd",{children:zu(r.createdAt)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Session total"}),O.jsx("dd",{children:La(v)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Rounds"}),O.jsx("dd",{children:(n==null?void 0:n.totalRoundCount)??0})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Role runtime"}),O.jsx("dd",{children:La(f)})]})]}),d&&n?O.jsxs("div",{className:"current-round-status",children:[O.jsxs("div",{className:"current-round-title",children:[O.jsx("span",{children:n.status==="running"?"Current Round":"Last Round"}),O.jsx("span",{className:`status-badge status-${n.status}`,children:n.status})]}),O.jsxs("dl",{className:"task-status-stats",children:[O.jsxs("div",{children:[O.jsx("dt",{children:"Started"}),O.jsx("dd",{children:zu(n.startedAt)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Total"}),O.jsx("dd",{children:La(c)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Role runtime"}),O.jsx("dd",{children:La(a)})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Turn count"}),O.jsx("dd",{children:n.turnCount})]})]})]}):null]})}function rg(n,r,s){if(!(n!=null&&n.activeTurnStartedAt)||n.status!=="running")return r;const o=Date.parse(n.updatedAt);return Number.isFinite(o)?r+Math.max(0,s-o):r}function q2(n,r){const s=n.status==="running"?r:Date.parse(n.stoppedAt??n.lastTurnEndedAt??"");return k_(n.startedAt??"",Number.isFinite(s)?s:r)}function k_(n,r){const s=Date.parse(n);return Number.isFinite(s)?Math.max(0,r-s):0}function zu(n){if(!n)return"-";const r=new Date(n);return Number.isNaN(r.getTime())?"-":new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}).format(r)}function La(n){const r=Math.max(0,Math.floor(n/1e3)),s=Math.floor(r/3600),o=Math.floor(r%3600/60),d=r%60;return s>0?o>0?`${s}h ${o}m`:`${s}h`:o>0?d>0?`${o}m ${d}s`:`${o}m`:`${d}s`}function G2(n){return n==="system"?"light":n==="light"?"dark":"system"}function sg(n){return n==="system"?"System":n==="light"?"Light":"Dark"}function V2({events:n,onClose:r}){return O.jsx("div",{className:"modal-backdrop",children:O.jsxs("section",{className:"event-modal",role:"dialog","aria-modal":"true","aria-label":"Events",children:[O.jsxs("header",{children:[O.jsxs("div",{children:[O.jsx("h2",{children:"Events"}),O.jsxs("p",{className:"muted",children:[n.length," total"]})]}),O.jsx("button",{type:"button",onClick:r,children:"Close"})]}),O.jsx(C2,{events:n,maxEvents:null,showHeader:!1})]})})}function $2({busy:n,messages:r,orchestration:s,onClose:o,onMarkAllDone:d,onDeleteMessageHistory:v}){const f=oh(r);function a(){window.confirm(["Clear all pending route-file messages?","","Use this only after you manually copied or handled stuck route-file messages.","VCM will clear non-empty handoff message files so Stop-hook orchestration can continue."].join(`
|
|
92
|
+
`))&&d()}function c(){window.confirm([`Delete ${f.total} message histor${f.total===1?"y item":"y items"}?`,"","This removes message history from the Messages panel.","Pending route-file messages are not touched."].join(`
|
|
93
|
+
`))&&v()}return O.jsx("div",{className:"modal-backdrop",children:O.jsxs("section",{className:"message-modal",role:"dialog","aria-modal":"true","aria-label":"Messages",children:[O.jsxs("header",{children:[O.jsxs("div",{children:[O.jsx("h2",{children:"Messages"}),O.jsxs("p",{className:"muted",children:[f.total," total / ",f.accepted," accepted",s?` · ${s.mode}`:""]})]}),O.jsxs("div",{className:"modal-actions",children:[O.jsx("button",{type:"button",disabled:n,onClick:a,children:"Mark All Done"}),O.jsx("button",{type:"button",disabled:n||f.total===0,onClick:c,children:"Delete All"}),O.jsx("button",{type:"button",onClick:o,children:"Close"})]})]}),O.jsx(k2,{busy:n,maxMessages:null,messages:r,orchestration:s,showControls:!1,showHeader:!1})]})})}function oi({children:n,onOpenChange:r,open:s,title:o}){return O.jsxs("section",{className:"sidebar-section",children:[O.jsxs("button",{"aria-expanded":s,className:"sidebar-section-toggle",type:"button",onClick:()=>{r==null||r(!s)},children:[O.jsx("span",{children:o}),O.jsx("span",{"aria-hidden":"true",className:"sidebar-section-chevron"})]}),s?O.jsx("div",{className:"sidebar-section-content",children:n}):null]})}function A_(n,r){return n.find(s=>s.role===r)}function K2({activeRole:n,roles:r=Uu,sessions:s,onSelect:o}){return O.jsx("div",{className:"role-tabs",role:"tablist","aria-label":"Role sessions",children:r.map(d=>{const v=A_(s,d.name),f=(v==null?void 0:v.status)==="running"?v.activityStatus??"idle":(v==null?void 0:v.status)??"not_started";return O.jsxs("button",{className:d.name===n?"role-tab is-active":"role-tab",type:"button",role:"tab","aria-selected":d.name===n,onClick:()=>o(d.name),children:[O.jsx("span",{children:d.label}),O.jsx(Wr,{status:f})]},d.name)})})}function Y2({role:n,session:r,permissionMode:s,model:o,effort:d,active:v=!0,busy:f,translationEnabled:a,translationAutoSendEnabled:c,translationTargetLanguage:h,onPermissionModeChange:m,onModelChange:u,onEffortChange:_,onStart:C,onResume:E,onStop:x,onRestart:b,onTerminalEvent:S}){const g=Pu(n),y=!g&&a&&(r==null?void 0:r.status)==="running";return O.jsx("section",{className:"session-console",children:O.jsxs("div",{className:y?"session-console-body has-translation":"session-console-body",children:[O.jsxs("div",{className:"terminal-pane",children:[O.jsx(gg,{role:n,session:r,permissionMode:s,model:o,effort:d,busy:f,onPermissionModeChange:m,onModelChange:u,onEffortChange:_,onStart:C,onResume:E,onStop:x,onRestart:b}),(r==null?void 0:r.status)==="running"?O.jsx(Fu,{sessionId:r.id,active:v,onEvent:S},r.id):O.jsxs("div",{className:"terminal-empty",children:[O.jsx("strong",{children:n}),O.jsx("span",{children:g?r!=null&&r.claudeSessionId?`Resume this role to reconnect the ${n==="codex-translator"?"Codex Translator":"Codex Reviewer"} terminal.`:`Start this role to open an embedded ${n==="codex-translator"?"Codex Translator":"Codex Reviewer"} terminal.`:r!=null&&r.claudeSessionId?"Resume this role to reconnect its Claude Code conversation.":"Start this role to open an embedded Claude Code terminal."})]})]}),y?O.jsx("div",{className:"translation-pane",children:O.jsx(t2,{active:v,autoSendEnabled:c,targetLanguage:h,taskSlug:r.taskSlug,role:n,sessionId:r.id},r.id)}):null]})})}function W2(n,r,s){var v;if(!n||s.mode!=="auto")return null;const o=new Map(n.map(f=>[f.id,f])),d=r.filter(f=>{var a;return f.dispatchingAt?((a=o.get(f.id))==null?void 0:a.dispatchingAt)!==f.dispatchingAt:!1});return d.length===0?null:((v=d.sort(X2)[d.length-1])==null?void 0:v.toRole)??null}function X2(n,r){const s=n.dispatchingAt??n.deliveredAt??n.acceptedAt??"",o=r.dispatchingAt??r.deliveredAt??r.acceptedAt??"";return s!==o?s.localeCompare(o):n.createdAt.localeCompare(r.createdAt)}const Q2=2e3;function Z2({task:n,activeRole:r,codexReviewerEnabled:s,translationEnabled:o,translationAutoSendEnabled:d,translationTargetLanguage:v,refreshNonce:f=0,onTaskChanged:a,onActiveRoleChange:c,onMessagesChanged:h,onOrchestrationChanged:m,onRoundStateChanged:u,onEventsChanged:_,onLaunchStateChanged:C}){const[E,x]=ae.useState(null),[b,S]=ae.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default","codex-reviewer":"default","codex-translator":"default"}),[g,y]=ae.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default","codex-reviewer":"gpt-5.5","codex-translator":"gpt-5.5"}),[A,M]=ae.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default","codex-reviewer":"xhigh","codex-translator":"medium"}),[D,T]=ae.useState(!1),[k,R]=ae.useState(""),[N,I]=ae.useState([]),[P,F]=ae.useState(null),K=ae.useRef(null),W=ae.useRef(""),V=!!(E!=null&&E.sessions.some(Z=>Z.role==="codex-reviewer")),$=s||V,J=[...Xr,...$?[fg]:[]],H=ae.useCallback((Z,ie)=>{var we;const de=((we=K.current)==null?void 0:we.taskSlug)===n.taskSlug?K.current.messages:null,Ce=W2(de,Z,ie);K.current={taskSlug:n.taskSlug,messages:Z},F(ie),h==null||h(Z),m==null||m(ie),Ce&&(c(Ce),te(`auto switched to ${Ce} before VCM dispatch`))},[c,h,m,n.taskSlug]),B=ae.useCallback((Z,ie,de,Ce)=>{x(Z),H(ie,de),u==null||u(Ce)},[H,u]),z=ae.useCallback(async()=>{const[Z,ie,de,Ce]=await Promise.all([be.getTaskStatus(n.taskSlug),be.listMessages(n.taskSlug),be.getOrchestrationState(n.taskSlug),be.getSessionRoundState(n.taskSlug)]);B(Z,ie,de,Ce)},[B,n.taskSlug]);ae.useEffect(()=>{z().catch(Z=>R(Z.message))},[z,f]),ae.useEffect(()=>{I([]),_==null||_([])},[_,n.taskSlug]),ae.useEffect(()=>{E&&!$&&r==="codex-reviewer"&&c("project-manager"),E&&r==="codex-translator"&&c("project-manager")},[r,$,c,E]),ae.useEffect(()=>{const Z=E==null?void 0:E.task;if(!Z||Z.taskSlug!==n.taskSlug)return;const ie=lg(Z);if(ie===lg(n)){W.current="";return}W.current!==ie&&(W.current=ie,a().catch(de=>{W.current="",R(de.message)}))},[a,E==null?void 0:E.task,n]),ae.useEffect(()=>{S(Z=>{let ie=!1;const de={...Z};for(const Ce of(E==null?void 0:E.sessions)??[])de[Ce.role]!==Ce.permissionMode&&(de[Ce.role]=Ce.permissionMode,ie=!0);return ie?de:Z})},[E==null?void 0:E.sessions]),ae.useEffect(()=>{y(Z=>{let ie=!1;const de={...Z};for(const Ce of(E==null?void 0:E.sessions)??[]){const we=Ce.model??"default";de[Ce.role]!==we&&(de[Ce.role]=we,ie=!0)}return ie?de:Z})},[E==null?void 0:E.sessions]),ae.useEffect(()=>{M(Z=>{let ie=!1;const de={...Z};for(const Ce of(E==null?void 0:E.sessions)??[]){const we=Ce.effort??"default";de[Ce.role]!==we&&(de[Ce.role]=we,ie=!0)}return ie?de:Z})},[E==null?void 0:E.sessions]),ae.useEffect(()=>{const Z=(E==null?void 0:E.sessions)??[],ie=Z.filter(we=>!Pu(we.role)),de=new Set(ie.map(we=>we.role)),Ce={};for(const we of Xr)Ce[we.name]={permissionMode:b[we.name],model:g[we.name],effort:A[we.name]};C==null||C({taskSlug:n.taskSlug,roles:Ce,autoOrchestration:((P==null?void 0:P.mode)??"auto")==="auto",statusLoaded:!!E,sessionCount:Z.length,hasAnySession:Z.length>0,allRolesHaveSession:Xr.every(we=>de.has(we.name))})},[g,A,C,P==null?void 0:P.mode,b,E,n.taskSlug]),ae.useEffect(()=>{const Z=window.setInterval(()=>{Promise.all([be.getTaskStatus(n.taskSlug),be.listMessages(n.taskSlug),be.getOrchestrationState(n.taskSlug),be.getSessionRoundState(n.taskSlug)]).then(([ie,de,Ce,we])=>{B(ie,de,Ce,we)}).catch(ie=>R(ie.message))},3e3);return()=>window.clearInterval(Z)},[B,n.taskSlug]),ae.useEffect(()=>{let Z=!1,ie=!1;const de=window.setInterval(()=>{ie||(ie=!0,Promise.all([be.listMessages(n.taskSlug),be.getOrchestrationState(n.taskSlug)]).then(([Ce,we])=>{Z||H(Ce,we)}).catch(Ce=>{Z||R(Ce.message)}).finally(()=>{ie=!1}))},Q2);return()=>{Z=!0,window.clearInterval(de)}},[H,n.taskSlug]);async function G(Z){T(!0),R("");try{await Z(),await z(),await a()}catch(ie){R(ie instanceof Error?ie.message:"Action failed.")}finally{T(!1)}}async function j(){const Z=[`Close task "${n.taskSlug}"?`,"","This is destructive:","- stops VCM-managed running role sessions for this task",`- deletes the task worktree: ${n.worktreePath}`,`- deletes the Git branch: ${n.branch}`,"- deletes VCM task/session/message/orchestration state","","VCM will not check running sessions or uncommitted changes before closing."].join(`
|
|
94
|
+
`);if(window.confirm(Z)){T(!0),R("");try{await be.cleanupTask(n.taskSlug,{force:!0,forceDeleteBranch:!0}),te(`closed ${n.taskSlug}`),await a()}catch(de){R(de instanceof Error?de.message:"Close task failed.")}finally{T(!1)}}}function te(Z){I(ie=>{const de=[...ie,`${new Date().toLocaleTimeString()} ${Z}`];return _==null||_(de),de})}function he(Z,ie){S(de=>({...de,[Z]:ie}))}function me(Z,ie){y(de=>({...de,[Z]:ie}))}function Y(Z,ie){M(de=>({...de,[Z]:ie}))}async function q(Z){T(!0),R("");try{const ie=await be.updateOrchestrationState(n.taskSlug,{mode:Z});F(ie),m==null||m(ie),te(`auto orchestration ${Z==="auto"?"enabled":"disabled"}`)}catch(ie){R(ie instanceof Error?ie.message:"Failed to update orchestration mode.")}finally{T(!1)}}const oe=((P==null?void 0:P.mode)??"auto")==="auto";return O.jsxs("div",{className:"task-workspace",children:[O.jsxs("header",{className:"workspace-header",children:[O.jsx("div",{className:"workspace-title-line",children:O.jsx("h1",{children:n.title||n.taskSlug})}),O.jsx(K2,{activeRole:r,roles:J,sessions:(E==null?void 0:E.sessions)??[],onSelect:c}),O.jsxs("div",{className:"workspace-header-actions",children:[O.jsxs("button",{"aria-label":`Auto orchestration is ${oe?"on":"off"}`,"aria-pressed":oe,className:`orchestration-toggle${oe?" is-active":""}`,disabled:D,type:"button",onClick:()=>void q(oe?"manual":"auto"),children:[O.jsx("span",{children:"Auto orchestration"}),O.jsx("strong",{children:oe?"on":"off"})]}),O.jsx("button",{className:"danger-button",type:"button",disabled:D,onClick:()=>void j(),children:"Close Task"})]})]}),k?O.jsx("div",{className:"error-banner",children:k}):null,O.jsx("div",{className:"workspace-grid",children:O.jsx("div",{className:"workspace-main",children:O.jsx("div",{className:"role-console-stack",children:J.map(Z=>{const ie=Z.name,de=ie===r,Ce=A_((E==null?void 0:E.sessions)??[],ie);return O.jsx("div",{className:de?"role-console-panel is-active":"role-console-panel","aria-hidden":!de,children:O.jsx(Y2,{role:ie,session:Ce,permissionMode:b[ie],model:g[ie],effort:A[ie],active:de,busy:D,translationEnabled:o,translationAutoSendEnabled:d,translationTargetLanguage:v,onPermissionModeChange:we=>he(ie,we),onModelChange:we=>me(ie,we),onEffortChange:we=>Y(ie,we),onStart:()=>void G(async()=>{await be.startRoleSession(n.taskSlug,ie,{cols:100,rows:28,permissionMode:b[ie],model:g[ie],effort:A[ie]}),te(`started ${ie} with ${b[ie]} / ${g[ie]} / ${A[ie]}`)}),onResume:()=>void G(async()=>{await be.resumeRoleSession(n.taskSlug,ie,{cols:100,rows:28,permissionMode:b[ie],model:g[ie],effort:A[ie]}),te(`resumed ${ie} with ${b[ie]} / ${g[ie]} / ${A[ie]}`)}),onStop:()=>void G(async()=>{await be.stopRoleSession(n.taskSlug,ie),te(`stopped ${ie}`)}),onRestart:()=>void G(async()=>{await be.restartRoleSession(n.taskSlug,ie,{cols:100,rows:28,permissionMode:b[ie],model:g[ie],effort:A[ie]}),te(`restarted ${ie} with ${b[ie]} / ${g[ie]} / ${A[ie]}`)}),onTerminalEvent:we=>te(`${Z.label}: ${we}`)})},ie)})})})})]})}function lg(n){return[n.status,n.updatedAt,n.cleanupStatus??"",n.cleanedAt??""].join(":")}const J2=120*1e3,ag=1400,eE=3;function tE(){const[n,r]=ae.useState(null),[s,o]=ae.useState([]),[d,v]=ae.useState(null),[f,a]=ae.useState(null),[c,h]=ae.useState(null),[m,u]=ae.useState(null),[_,C]=ae.useState(null),[E,x]=ae.useState(null),[b,S]=ae.useState(null),[g,y]=ae.useState(!1),[A,M]=ae.useState([]),[D,T]=ae.useState(null),[k,R]=ae.useState(null),[N,I]=ae.useState(null),[P,F]=ae.useState(null),[K,W]=ae.useState(null),[V,$]=ae.useState(null),[J,H]=ae.useState("project-manager"),[B,z]=ae.useState("system"),[G,j]=ae.useState(!0),[te,he]=ae.useState("off"),[me,Y]=ae.useState(!1),[q,oe]=ae.useState(!1),[Z,ie]=ae.useState(c1),[de,Ce]=ae.useState(u1),[we,$e]=ae.useState(!1),[at,Re]=ae.useState(!1),[Bt,xt]=ae.useState(null),[Nt,Kt]=ae.useState("gpt-5.5"),[Ft,pt]=ae.useState("medium"),[tt,jt]=ae.useState(()=>f1()),[ue,ye]=ae.useState(null),[ke,Me]=ae.useState(0),[Be,ot]=ae.useState(null),[je,mt]=ae.useState(!1),[We,Rt]=ae.useState(!1),[Ee,yt]=ae.useState(""),Zt=ae.useRef({}),On=ae.useRef(null),Bn=ae.useRef(""),qn=ae.useRef(""),_e=ae.useMemo(()=>v2(A,D),[A,D]),St=(ue==null?void 0:ue.taskSlug)===(_e==null?void 0:_e.taskSlug)?ue:null,hr=!!(St!=null&&St.statusLoaded&&St.allRolesHaveSession),Fi=!!(_e&&(St!=null&&St.statusLoaded)&&!St.hasAnySession),Yt=ae.useCallback(ee=>{z(ee.themeMode),j(ee.flowPauseAlerts),he(ee.permissionRequestMode),Y(ee.translationEnabled),oe(ee.translationAutoSendEnabled),ie(ee.translationTargetLanguage),Ce(ee.translationOutputMode),jt(ee.launchTemplate)},[]),on=ae.useCallback(()=>{On.current!==null&&(window.clearInterval(On.current),On.current=null)},[]),fr=ae.useCallback((ee={})=>{on(),ee.resetAudio&&aE(),Oa(),On.current=window.setInterval(()=>{Oa()},ag)},[on]),ui=ae.useCallback(()=>{on(),ot(null);let ee=1;Oa(),On.current=window.setInterval(()=>{ee+=1,Oa(),ee>=eE&&On.current!==null&&(window.clearInterval(On.current),On.current=null)},ag)},[on]),ns=ae.useCallback((ee,Se=`manual-${Date.now()}`,ct={})=>{ot({id:Se,text:ee}),fr(ct)},[fr]),fl=ae.useCallback(()=>{on(),ot(null)},[on]),qi=ae.useCallback(()=>{on(),ot(null),j(!1)},[on]),dl=ae.useCallback(ee=>{_e!=null&&_e.taskSlug&&R({taskSlug:_e.taskSlug,messages:ee})},[_e==null?void 0:_e.taskSlug]),is=ae.useCallback(ee=>{_e!=null&&_e.taskSlug&&I({taskSlug:_e.taskSlug,orchestration:ee})},[_e==null?void 0:_e.taskSlug]),rs=ae.useCallback(ee=>{_e!=null&&_e.taskSlug&&F({taskSlug:_e.taskSlug,events:ee})},[_e==null?void 0:_e.taskSlug]),pl=ae.useCallback(ee=>{if(!(_e!=null&&_e.taskSlug)||ee.taskSlug!==_e.taskSlug||(W({taskSlug:ee.taskSlug,roundState:ee}),ee.status!=="stopped"||!ee.roundId))return;const Se=sE(ee);if(Zt.current[ee.taskSlug]===Se||(Zt.current[ee.taskSlug]=Se,!G))return;const Lt=ee.activeRole??"role";rE(ee)>=J2?ns(`No new turn started after ${Lt} stopped.`,Se):ui()},[_e==null?void 0:_e.taskSlug,G,ui,ns]),ml=ae.useCallback(ee=>{ye(Se=>(Se==null?void 0:Se.taskSlug)===ee.taskSlug&&Se.statusLoaded===ee.statusLoaded&&Se.sessionCount===ee.sessionCount&&Se.hasAnySession===ee.hasAnySession&&Se.allRolesHaveSession===ee.allRolesHaveSession&&Se.autoOrchestration===ee.autoOrchestration&&JSON.stringify(Se.roles)===JSON.stringify(ee.roles)?Se:ee)},[]);async function Wt(){const ee=await be.listTasks();return M(ee),T(Se=>{var ct;return Se&&ee.some(Lt=>Lt.taskSlug===Se)?Se:((ct=ee[0])==null?void 0:ct.taskSlug)??null}),ee}async function gt(){const ee=await be.getHarnessStatus();return v(ee),ee}async function Mt(){const ee=await be.getHarnessBootstrapStatus();return a(ee),ee}async function Nn(){const ee=await be.getGatewayStatus();return C(ee),ee}async function ss(){const ee=await be.getRecentRepositoryPaths();return o(ee),ee}async function ls(ee){const[Se,ct]=await Promise.all([be.listMessages(ee),be.getOrchestrationState(ee)]);R({taskSlug:ee,messages:Se}),I({taskSlug:ee,orchestration:ct})}async function as(ee){const Se=await be.getCodexReviewState(ee);return $({taskSlug:ee,state:Se}),Se}async function Gi(){const ee=await be.getCodexTranslatorSession();return xt(ee),ee!=null&&ee.model&&Kt(ee.model),ee!=null&&ee.effort&&pt(ee.effort),ee}ae.useEffect(()=>{Promise.all([be.getCurrentProject(),be.getRecentRepositoryPaths(),be.getAppPreferences(),be.getGatewayStatus()]).then(async([ee,Se,ct,Lt])=>{r(ee),o(Se),C(Lt),Yt(ct),ee&&await Promise.all([Wt(),gt(),Mt()])}).catch(ee=>yt(ee.message))},[Yt]),ae.useEffect(()=>{const ee=window.matchMedia("(prefers-color-scheme: dark)"),Se=()=>mt(ee.matches);return Se(),ee.addEventListener("change",Se),()=>ee.removeEventListener("change",Se)},[]),ae.useEffect(()=>()=>on(),[on]),ae.useEffect(()=>{const ee=B==="system"?je?"dark":"light":B;document.documentElement.dataset.theme=ee,document.documentElement.dataset.themeMode=B},[je,B]),ae.useEffect(()=>{!(_!=null&&_.enabled)||!G||(qi(),be.updateAppPreferences({flowPauseAlerts:!1}).then(ee=>Yt(ee)).catch(ee=>yt(ee.message)))},[Yt,qi,G,_==null?void 0:_.enabled]),ae.useEffect(()=>{if(!(_!=null&&_.enabled)||!n||!_e)return;const ee=`${n.repoRoot}:${_e.taskSlug}`;if(_.currentProjectId===n.repoRoot&&_.currentTaskSlug===_e.taskSlug){Bn.current=ee;return}Bn.current!==ee&&(Bn.current=ee,be.updateGatewaySettings({currentProjectId:n.repoRoot,currentTaskSlug:_e.taskSlug}).then(Se=>C(Se)).catch(Se=>{Bn.current===ee&&(Bn.current=""),yt(Se.message)}))},[_e==null?void 0:_e.taskSlug,_==null?void 0:_.currentProjectId,_==null?void 0:_.currentTaskSlug,_==null?void 0:_.enabled,n==null?void 0:n.repoRoot]),ae.useEffect(()=>{if(!(_e!=null&&_e.taskSlug)){$(null);return}as(_e.taskSlug).catch(ee=>yt(ee.message))},[_e==null?void 0:_e.taskSlug]),ae.useEffect(()=>{qn.current="",xt(null)},[n==null?void 0:n.repoRoot]),ae.useEffect(()=>{if(!n)return;Gi().catch(Se=>yt(Se.message));const ee=window.setInterval(()=>{Gi().catch(Se=>yt(Se.message))},3e3);return()=>window.clearInterval(ee)},[n==null?void 0:n.repoRoot]),ae.useEffect(()=>{if(!n||!me)return;const ee=n.repoRoot;qn.current===ee&&(Bt==null?void 0:Bt.status)==="running"||(qn.current=ee,be.ensureCodexTranslatorSession({model:Nt,effort:Ft}).then(Se=>{xt(Se),Se.model&&Kt(Se.model),Se.effort&&pt(Se.effort)}).catch(Se=>{qn.current="",yt(Se.message)}))},[n==null?void 0:n.repoRoot,me]),ae.useEffect(()=>{if(!(_e!=null&&_e.taskSlug))return;const ee=_e.taskSlug,Se=window.setInterval(()=>{as(ee).catch(ct=>yt(ct.message))},3e3);return()=>window.clearInterval(Se)},[_e==null?void 0:_e.taskSlug]);async function Ue(ee){Rt(!0),yt("");try{await ee()}catch(Se){yt(Se instanceof Error?Se.message:"Action failed.")}finally{Rt(!1)}}const os=k&&k.taskSlug===(_e==null?void 0:_e.taskSlug)?k.messages:[],hi=N&&N.taskSlug===(_e==null?void 0:_e.taskSlug)?N.orchestration:null,fi=P&&P.taskSlug===(_e==null?void 0:_e.taskSlug)?P.events:[],Vi=K&&K.taskSlug===(_e==null?void 0:_e.taskSlug)?K.roundState:null,jn=V&&V.taskSlug===(_e==null?void 0:_e.taskSlug)?V.state:null,bt=!!(jn&&Object.values(jn.gates).some(ee=>ee.required));return O.jsxs(d1,{sidebar:O.jsx(L2,{project:n,recentRepositoryPaths:s,tasks:A,activeTaskSlug:(_e==null?void 0:_e.taskSlug)??null,messages:os,orchestration:hi,events:fi,roundState:Vi,codexReview:jn,translationEnabled:me,translationAutoSendEnabled:q,translationTargetLanguage:Z,translationOutputMode:de,translatorSession:Bt,harnessStatus:d,harnessBootstrapStatus:f,harnessApplyResult:c,harnessTaskSyncResult:m,gatewayStatus:_,gatewayQrLogin:E,gatewayQrCheck:b,busy:We,onConnect:ee=>Ue(async()=>{const Se=await be.connectProject({repoPath:ee});r(Se),h(null),u(null),await Promise.all([Wt(),gt(),Mt(),ss()])}),onRefreshConnectedRepository:()=>Ue(async()=>{const ee=await be.getCurrentProject();r(ee)}),onPullConnectedRepository:()=>Ue(async()=>{const ee=await be.pullCurrentProject();r(ee)}),onRefreshHarness:()=>Ue(async()=>{h(null),u(null),await Promise.all([gt(),Mt()])}),onApplyHarness:()=>Ue(async()=>{u(null);const ee=await be.applyHarness();h(ee),await Promise.all([gt(),Mt()])}),onCommitAndRebaseHarnessTask:()=>Ue(async()=>{if(!_e)throw new Error("Select a task before using Commit & rebase task.");if(!(c!=null&&c.changedFiles.length))throw new Error("Apply a harness update before using Commit & rebase task.");const ee=await be.commitAndRebaseHarnessTask(_e.taskSlug,{changedFiles:c.changedFiles});u(ee);const Se=await be.getCurrentProject();r(Se),await Wt()}),onStartHarnessBootstrap:()=>Ue(async()=>{const ee=await be.startHarnessBootstrap();a(ee.status)}),onRefreshGateway:()=>Ue(async()=>{await Nn()}),onGatewayEnabledChange:ee=>{Ue(async()=>{const[Se,ct]=await Promise.all([be.updateGatewaySettings({enabled:ee,...ee&&n?{currentProjectId:n.repoRoot,currentTaskSlug:(_e==null?void 0:_e.taskSlug)??null}:{}}),ee?be.updateAppPreferences({flowPauseAlerts:!1}):Promise.resolve(null)]);ct&&Yt(ct),ee&&qi(),C(Se)})},onGatewayTranslationChange:ee=>{Ue(async()=>{const Se=await be.updateGatewaySettings({translationEnabled:ee});C(Se)})},onStartGatewayQrLogin:()=>{Ue(async()=>{const ee=await be.startGatewayQrLogin();x(ee),S(null),y(!0),await Nn()})},onResetGatewayBinding:()=>{Ue(async()=>{const ee=await be.resetGatewayBinding();C(ee),x(null),S(null),y(!1)})},onCodexGateEnabledChange:(ee,Se)=>{Ue(async()=>{if(!_e)throw new Error("Create or select a task before changing Codex Review Gates.");const ct=await be.updateCodexReviewSettings(_e.taskSlug,{gates:{[ee]:Se}});$({taskSlug:_e.taskSlug,state:ct})})},onTranslationEnabledChange:ee=>{Y(ee),Ue(async()=>{const Se=await be.updateAppPreferences({translationEnabled:ee});Yt(Se)})},onTranslationAutoSendChange:ee=>{oe(ee),Ue(async()=>{const Se=await be.updateAppPreferences({translationAutoSendEnabled:ee});Yt(Se)})},onTranslationTargetLanguageChange:ee=>{ie(ee),Ue(async()=>{const Se=await be.updateAppPreferences({translationTargetLanguage:ee});Yt(Se)})},onTranslationOutputModeChange:ee=>{Ce(ee),Ue(async()=>{const Se=await be.updateAppPreferences({translationOutputMode:ee});Yt(Se)})},onOpenFileTranslation:()=>$e(!0),onOpenTranslatorSession:()=>Re(!0),onCreateTranslationBootstrap:()=>{Ue(async()=>{if(!n)throw new Error("Connect a repository before running Translation Bootstrap.");await be.createCodexBootstrap({targetLanguage:Z}),await Gi()})},onUpdateTranslationMemory:()=>{Ue(async()=>{if(!n)throw new Error("Connect a repository before updating translation memory.");await be.createCodexMemoryUpdate({targetLanguage:Z}),await Gi()})},onCreateTask:ee=>Ue(async()=>{const Se=await be.createTask(ee);await Wt(),T(Se.taskSlug),await as(Se.taskSlug)}),onSelectTask:T,themeMode:B,onThemeModeChange:ee=>{z(ee),Ue(async()=>{const Se=await be.updateAppPreferences({themeMode:ee});Yt(Se)})},flowPauseAlerts:G,onFlowPauseAlertsChange:ee=>{if(_!=null&&_.enabled){qi();return}j(ee),ee&&lE(),Ue(async()=>{const Se=await be.updateAppPreferences({flowPauseAlerts:ee});Yt(Se)})},permissionRequestMode:te,onPermissionRequestModeChange:ee=>{he(ee),Ue(async()=>{const Se=await be.updateAppPreferences({permissionRequestMode:ee});Yt(Se)})},launchTemplate:tt,canSaveLaunchTemplate:hr,canOneClickStart:Fi,onSaveLaunchTemplate:()=>{Ue(async()=>{if(!(St!=null&&St.allRolesHaveSession))throw new Error("Start all four role sessions before saving a launch template.");const ee=await be.updateAppPreferences({launchTemplate:{version:1,roles:St.roles,autoOrchestration:St.autoOrchestration}});Yt(ee)})},onOneClickStart:()=>{Ue(async()=>{if(!_e)throw new Error("Create or select a task before one-click start.");if((await be.getTaskStatus(_e.taskSlug)).sessions.length>0)throw new Error("One-click start is only available before any role session has started.");const Se=await be.updateOrchestrationState(_e.taskSlug,{mode:tt.autoOrchestration?"auto":"manual"});I({taskSlug:_e.taskSlug,orchestration:Se});const ct=S2(tt,{codexReviewerEnabled:bt});for(const Lt of ct)await be.startRoleSession(_e.taskSlug,Lt.role,{cols:100,rows:28,permissionMode:Lt.permissionMode,model:Lt.model,effort:Lt.effort});H("project-manager"),await ls(_e.taskSlug),await Wt(),Me(Lt=>Lt+1)})},onTryFlowPauseAlert:()=>{ns("This is a test flow pause alert.",void 0,{resetAudio:!0})},onMarkAllMessagesDone:ee=>{Ue(async()=>{const Se=await be.markAllMessagesDone(ee);R({taskSlug:ee,messages:Se.messages}),await ls(ee)})},onDeleteMessageHistory:ee=>{Ue(async()=>{const Se=await be.deleteMessageHistory(ee);R({taskSlug:ee,messages:Se.messages}),await ls(ee)})}}),children:[Ee?O.jsx("div",{className:"error-banner",children:Ee}):null,Be?O.jsx("div",{className:"flow-pause-alert-backdrop",children:O.jsxs("section",{"aria-describedby":"flow-pause-alert-body flow-pause-alert-hint","aria-labelledby":"flow-pause-alert-title","aria-modal":"true",className:"flow-pause-alert",role:"alertdialog",children:[O.jsx("p",{className:"flow-pause-alert-kicker",children:"VCM needs attention"}),O.jsx("h2",{id:"flow-pause-alert-title",children:"Flow needs attention"}),O.jsx("p",{id:"flow-pause-alert-body",children:Be.text}),O.jsx("p",{id:"flow-pause-alert-hint",className:"flow-pause-alert-hint",children:"The task may be complete, waiting for your decision, or blocked by a workflow issue."}),O.jsx("button",{type:"button",autoFocus:!0,onClick:fl,children:"Confirm"})]})}):null,g&&E?O.jsx(nE,{busy:We,qrCheck:b,qrLogin:E,onCheck:()=>{Ue(async()=>{const ee=await be.checkGatewayQrLogin();S(ee),(ee.status==="confirmed"||ee.status==="binded_redirect")&&y(!1),await Nn()})},onClose:()=>y(!1)}):null,n&&_e?O.jsx(Z2,{task:_e,activeRole:J,codexReviewerEnabled:bt,translationEnabled:me,translationAutoSendEnabled:q,translationTargetLanguage:Z,refreshNonce:ke,onTaskChanged:async()=>{await Wt()},onActiveRoleChange:H,onMessagesChanged:dl,onOrchestrationChanged:is,onRoundStateChanged:pl,onEventsChanged:rs,onLaunchStateChanged:ml}):O.jsxs("section",{className:"empty-workspace",children:[O.jsx("h1",{children:n?"Create a task to open the workspace":"Connect a repository to begin"}),O.jsx("p",{children:n?"Tasks create local role commands and handoff artifacts for the selected repository.":"VibeCodingMaster will create a local task workspace, role sessions, and handoff artifacts."})]}),O.jsx(i2,{open:we,targetLanguage:Z,onClose:()=>$e(!1)}),O.jsx(D1,{open:at,busy:We,session:Bt,model:Nt,effort:Ft,onClose:()=>Re(!1),onModelChange:Kt,onEffortChange:pt,onStart:()=>{Ue(async()=>{const ee=await be.startCodexTranslatorSession({cols:100,rows:28,model:Nt,effort:Ft});xt(ee)})},onResume:()=>{Ue(async()=>{const ee=await be.resumeCodexTranslatorSession({cols:100,rows:28,model:Nt,effort:Ft});xt(ee)})},onRestart:()=>{Ue(async()=>{const ee=await be.restartCodexTranslatorSession({cols:100,rows:28,model:Nt,effort:Ft});xt(ee)})},onStop:()=>{Ue(async()=>{const ee=await be.stopCodexTranslatorSession();xt(ee)})}})]})}function nE({busy:n,onCheck:r,onClose:s,qrCheck:o,qrLogin:d}){const[v,f]=ae.useState(""),[a,c]=ae.useState("");return ae.useEffect(()=>{let h=!1;if(c(""),f(""),d.qrcodeUrl.startsWith("data:image/")){f(d.qrcodeUrl);return}try{const m=Jr(0,"M");m.addData(d.qrcodeUrl),m.make(),h||f(m.createDataURL(8,2))}catch(m){h||c(m instanceof Error?m.message:"Failed to render QR code.")}return()=>{h=!0}},[d.qrcodeUrl]),O.jsx("div",{className:"modal-backdrop",children:O.jsxs("section",{"aria-labelledby":"gateway-qr-title","aria-modal":"true",className:"gateway-qr-modal",role:"dialog",children:[O.jsxs("header",{children:[O.jsxs("div",{children:[O.jsx("h2",{id:"gateway-qr-title",children:"Weixin Gateway Login"}),O.jsx("p",{className:"muted",children:"Scan with Weixin, confirm on the phone, then click Confirm."})]}),O.jsx("button",{type:"button",onClick:s,children:"Close"})]}),O.jsxs("div",{className:"gateway-qr-modal-body",children:[O.jsx("div",{className:"gateway-qr-code-frame",children:v?O.jsx("img",{alt:"Weixin Gateway QR login",src:v}):O.jsx("div",{className:"gateway-qr-placeholder",children:a||"Rendering QR code..."})}),O.jsxs("dl",{className:"gateway-qr-meta",children:[O.jsxs("div",{children:[O.jsx("dt",{children:"Status"}),O.jsx("dd",{children:(o==null?void 0:o.status)??d.status})]}),O.jsxs("div",{children:[O.jsx("dt",{children:"Expires"}),O.jsx("dd",{children:iE(d.expiresAt)})]}),o!=null&&o.message?O.jsxs("div",{children:[O.jsx("dt",{children:"Message"}),O.jsx("dd",{children:o.message})]}):null]})]}),O.jsx("footer",{children:O.jsx("button",{type:"button",disabled:n,onClick:r,children:"Confirm"})})]})})}function iE(n){const r=new Date(n);return Number.isNaN(r.getTime())?"-":new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(r)}let Ui=null;function rE(n){const r=Date.parse(n.startedAt??""),s=Date.parse(n.stoppedAt??n.lastTurnEndedAt??"");return!Number.isFinite(r)||!Number.isFinite(s)?0:Math.max(0,s-r)}function sE(n){const r=n.roundId??n.startedAt??n.taskSlug,s=n.stoppedAt??n.lastTurnEndedAt??"stopped";return`${r}:${s}`}async function lE(){const n=T_();return n?D_(n):!1}async function Oa(){const n=T_();if(!n||!await D_(n))return!1;try{const s=n.createGain(),o=n.currentTime+.025;return s.gain.setValueAtTime(.85,n.currentTime),s.connect(n.destination),cg(n,s,{frequency:587.33,startAt:o,duration:.18,peakGain:.045}),cg(n,s,{frequency:783.99,startAt:o+.11,duration:.28,peakGain:.055}),window.setTimeout(()=>{s.disconnect()},800),!0}catch{return!1}}function T_(){const n=window.AudioContext??window.webkitAudioContext;if(!n)return null;try{return(!Ui||Ui.state==="closed")&&(Ui=new n),Ui}catch{return null}}function aE(){Hu(Ui)}function Hu(n){Ui=null,n&&n.state!=="closed"&&n.close().catch(()=>{})}async function D_(n){if(og(n))return!0;try{await n.resume();const r=og(n);return!r&&n===Ui&&Hu(n),r}catch{return n===Ui&&Hu(n),!1}}function og(n){return n.state==="running"}function cg(n,r,s){const o=n.createGain(),d=n.createOscillator(),v=n.createOscillator(),f=s.startAt+s.duration;o.gain.setValueAtTime(1e-4,s.startAt),o.gain.exponentialRampToValueAtTime(s.peakGain,s.startAt+.018),o.gain.exponentialRampToValueAtTime(1e-4,f),d.type="sine",d.frequency.setValueAtTime(s.frequency,s.startAt),v.type="triangle",v.frequency.setValueAtTime(s.frequency*2.01,s.startAt),d.connect(o),v.connect(o),o.connect(r),d.start(s.startAt),v.start(s.startAt),d.stop(f+.02),v.stop(f+.02)}const R_=document.getElementById("root");if(!R_)throw new Error("Missing #root element.");Q0.createRoot(R_).render(O.jsx(ae.StrictMode,{children:O.jsx(tE,{})}));
|