vibe-coding-master 0.2.4 → 0.2.6
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/README.md +11 -3
- package/dist/backend/adapters/claude-adapter.js +9 -2
- package/dist/backend/adapters/git-adapter.js +60 -0
- package/dist/backend/api/claude-hook-routes.js +7 -0
- package/dist/backend/api/project-routes.js +3 -0
- package/dist/backend/server.js +2 -1
- package/dist/backend/services/app-settings-service.js +49 -1
- package/dist/backend/services/claude-hook-service.js +61 -11
- package/dist/backend/services/harness-service.js +6 -5
- package/dist/backend/services/project-service.js +104 -28
- package/dist/backend/services/round-service.js +40 -7
- package/dist/backend/services/session-service.js +16 -2
- package/dist/shared/types/app-settings.js +17 -0
- package/dist/shared/types/session.js +37 -1
- package/dist-frontend/assets/index-CPXFnxAY.css +32 -0
- package/dist-frontend/assets/index-D0_02lmQ.js +90 -0
- package/dist-frontend/index.html +2 -2
- package/docs/gateway-design.md +585 -0
- package/docs/product-design.md +72 -14
- package/docs/v0.2-implementation-plan.md +78 -68
- package/docs/vcm-cc-best-practices.md +18 -4
- package/package.json +1 -1
- package/scripts/install-vcm-harness.mjs +3 -2
- package/dist-frontend/assets/index-CfZ3VYXY.js +0 -90
- package/dist-frontend/assets/index-CfqduxVB.css +0 -32
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
var _0=Object.defineProperty;var g0=(n,s,l)=>s in n?_0(n,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[s]=l;var Hp=(n,s,l)=>g0(n,typeof s!="symbol"?s+"":s,l);(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const v of document.querySelectorAll('link[rel="modulepreload"]'))a(v);new MutationObserver(v=>{for(const C of v)if(C.type==="childList")for(const m of C.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&a(m)}).observe(document,{childList:!0,subtree:!0});function l(v){const C={};return v.integrity&&(C.integrity=v.integrity),v.referrerPolicy&&(C.referrerPolicy=v.referrerPolicy),v.crossOrigin==="use-credentials"?C.credentials="include":v.crossOrigin==="anonymous"?C.credentials="omit":C.credentials="same-origin",C}function a(v){if(v.ep)return;v.ep=!0;const C=l(v);fetch(v.href,C)}})();function Vm(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Lu={exports:{}},Ds={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Np;function v0(){if(Np)return Ds;Np=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function l(a,v,C){var m=null;if(C!==void 0&&(m=""+C),v.key!==void 0&&(m=""+v.key),"key"in v){C={};for(var o in v)o!=="key"&&(C[o]=v[o])}else C=v;return v=C.ref,{$$typeof:n,type:a,key:m,ref:v!==void 0?v:null,props:C}}return Ds.Fragment=s,Ds.jsx=l,Ds.jsxs=l,Ds}var jp;function S0(){return jp||(jp=1,Lu.exports=v0()),Lu.exports}var N=S0(),Ou={exports:{}},Le={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Ip;function y0(){if(Ip)return Le;Ip=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),m=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),c=Symbol.for("react.activity"),b=Symbol.iterator;function w(L){return L===null||typeof L!="object"?null:(L=b&&L[b]||L["@@iterator"],typeof L=="function"?L:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function _(L,U,z){this.props=L,this.context=U,this.refs=S,this.updater=z||k}_.prototype.isReactComponent={},_.prototype.setState=function(L,U){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,U,"setState")},_.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function p(){}p.prototype=_.prototype;function g(L,U,z){this.props=L,this.context=U,this.refs=S,this.updater=z||k}var E=g.prototype=new p;E.constructor=g,x(E,_.prototype),E.isPureReactComponent=!0;var M=Array.isArray;function T(){}var O={H:null,A:null,T:null,S:null},A=Object.prototype.hasOwnProperty;function B(L,U,z){var Z=z.ref;return{$$typeof:n,type:L,key:U,ref:Z!==void 0?Z:null,props:z}}function j(L,U){return B(L.type,U,L.props)}function F(L){return typeof L=="object"&&L!==null&&L.$$typeof===n}function V(L){var U={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(z){return U[z]})}var q=/\/+/g;function W(L,U){return typeof L=="object"&&L!==null&&L.key!=null?V(""+L.key):U.toString(36)}function X(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(T,T):(L.status="pending",L.then(function(U){L.status==="pending"&&(L.status="fulfilled",L.value=U)},function(U){L.status==="pending"&&(L.status="rejected",L.reason=U)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function G(L,U,z,Z,pe){var me=typeof L;(me==="undefined"||me==="boolean")&&(L=null);var Y=!1;if(L===null)Y=!0;else switch(me){case"bigint":case"string":case"number":Y=!0;break;case"object":switch(L.$$typeof){case n:case s:Y=!0;break;case d:return Y=L._init,G(Y(L._payload),U,z,Z,pe)}}if(Y)return pe=pe(L),Y=Z===""?"."+W(L,0):Z,M(pe)?(z="",Y!=null&&(z=Y.replace(q,"$&/")+"/"),G(pe,U,z,"",function(ne){return ne})):pe!=null&&(F(pe)&&(pe=j(pe,z+(pe.key==null||L&&L.key===pe.key?"":(""+pe.key).replace(q,"$&/")+"/")+Y)),U.push(pe)),1;Y=0;var P=Z===""?".":Z+":";if(M(L))for(var ae=0;ae<L.length;ae++)Z=L[ae],me=P+W(Z,ae),Y+=G(Z,U,z,me,pe);else if(ae=w(L),typeof ae=="function")for(L=ae.call(L),ae=0;!(Z=L.next()).done;)Z=Z.value,me=P+W(Z,ae++),Y+=G(Z,U,z,me,pe);else if(me==="object"){if(typeof L.then=="function")return G(X(L),U,z,Z,pe);throw U=String(L),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return Y}function J(L,U,z){if(L==null)return L;var Z=[],pe=0;return G(L,Z,"","",function(me){return U.call(z,me,pe++)}),Z}function re(L){if(L._status===-1){var U=L._result;U=U(),U.then(function(z){(L._status===0||L._status===-1)&&(L._status=1,L._result=z)},function(z){(L._status===0||L._status===-1)&&(L._status=2,L._result=z)}),L._status===-1&&(L._status=0,L._result=U)}if(L._status===1)return L._result.default;throw L._result}var H=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},D={map:J,forEach:function(L,U,z){J(L,function(){U.apply(this,arguments)},z)},count:function(L){var U=0;return J(L,function(){U++}),U},toArray:function(L){return J(L,function(U){return U})||[]},only:function(L){if(!F(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Le.Activity=c,Le.Children=D,Le.Component=_,Le.Fragment=l,Le.Profiler=v,Le.PureComponent=g,Le.StrictMode=a,Le.Suspense=u,Le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,Le.__COMPILER_RUNTIME={__proto__:null,c:function(L){return O.H.useMemoCache(L)}},Le.cache=function(L){return function(){return L.apply(null,arguments)}},Le.cacheSignal=function(){return null},Le.cloneElement=function(L,U,z){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var Z=x({},L.props),pe=L.key;if(U!=null)for(me in U.key!==void 0&&(pe=""+U.key),U)!A.call(U,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&U.ref===void 0||(Z[me]=U[me]);var me=arguments.length-2;if(me===1)Z.children=z;else if(1<me){for(var Y=Array(me),P=0;P<me;P++)Y[P]=arguments[P+2];Z.children=Y}return B(L.type,pe,Z)},Le.createContext=function(L){return L={$$typeof:m,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:C,_context:L},L},Le.createElement=function(L,U,z){var Z,pe={},me=null;if(U!=null)for(Z in U.key!==void 0&&(me=""+U.key),U)A.call(U,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(pe[Z]=U[Z]);var Y=arguments.length-2;if(Y===1)pe.children=z;else if(1<Y){for(var P=Array(Y),ae=0;ae<Y;ae++)P[ae]=arguments[ae+2];pe.children=P}if(L&&L.defaultProps)for(Z in Y=L.defaultProps,Y)pe[Z]===void 0&&(pe[Z]=Y[Z]);return B(L,me,pe)},Le.createRef=function(){return{current:null}},Le.forwardRef=function(L){return{$$typeof:o,render:L}},Le.isValidElement=F,Le.lazy=function(L){return{$$typeof:d,_payload:{_status:-1,_result:L},_init:re}},Le.memo=function(L,U){return{$$typeof:h,type:L,compare:U===void 0?null:U}},Le.startTransition=function(L){var U=O.T,z={};O.T=z;try{var Z=L(),pe=O.S;pe!==null&&pe(z,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(T,H)}catch(me){H(me)}finally{U!==null&&z.types!==null&&(U.types=z.types),O.T=U}},Le.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},Le.use=function(L){return O.H.use(L)},Le.useActionState=function(L,U,z){return O.H.useActionState(L,U,z)},Le.useCallback=function(L,U){return O.H.useCallback(L,U)},Le.useContext=function(L){return O.H.useContext(L)},Le.useDebugValue=function(){},Le.useDeferredValue=function(L,U){return O.H.useDeferredValue(L,U)},Le.useEffect=function(L,U){return O.H.useEffect(L,U)},Le.useEffectEvent=function(L){return O.H.useEffectEvent(L)},Le.useId=function(){return O.H.useId()},Le.useImperativeHandle=function(L,U,z){return O.H.useImperativeHandle(L,U,z)},Le.useInsertionEffect=function(L,U){return O.H.useInsertionEffect(L,U)},Le.useLayoutEffect=function(L,U){return O.H.useLayoutEffect(L,U)},Le.useMemo=function(L,U){return O.H.useMemo(L,U)},Le.useOptimistic=function(L,U){return O.H.useOptimistic(L,U)},Le.useReducer=function(L,U,z){return O.H.useReducer(L,U,z)},Le.useRef=function(L){return O.H.useRef(L)},Le.useState=function(L){return O.H.useState(L)},Le.useSyncExternalStore=function(L,U,z){return O.H.useSyncExternalStore(L,U,z)},Le.useTransition=function(){return O.H.useTransition()},Le.version="19.2.6",Le}var Up;function vc(){return Up||(Up=1,Ou.exports=y0()),Ou.exports}var de=vc(),Bu={exports:{}},Rs={},zu={exports:{}},Hu={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Pp;function b0(){return Pp||(Pp=1,(function(n){function s(G,J){var re=G.length;G.push(J);e:for(;0<re;){var H=re-1>>>1,D=G[H];if(0<v(D,J))G[H]=J,G[re]=D,re=H;else break e}}function l(G){return G.length===0?null:G[0]}function a(G){if(G.length===0)return null;var J=G[0],re=G.pop();if(re!==J){G[0]=re;e:for(var H=0,D=G.length,L=D>>>1;H<L;){var U=2*(H+1)-1,z=G[U],Z=U+1,pe=G[Z];if(0>v(z,re))Z<D&&0>v(pe,z)?(G[H]=pe,G[Z]=re,H=Z):(G[H]=z,G[U]=re,H=U);else if(Z<D&&0>v(pe,re))G[H]=pe,G[Z]=re,H=Z;else break e}}return J}function v(G,J){var re=G.sortIndex-J.sortIndex;return re!==0?re:G.id-J.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var C=performance;n.unstable_now=function(){return C.now()}}else{var m=Date,o=m.now();n.unstable_now=function(){return m.now()-o}}var u=[],h=[],d=1,c=null,b=3,w=!1,k=!1,x=!1,S=!1,_=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;function E(G){for(var J=l(h);J!==null;){if(J.callback===null)a(h);else if(J.startTime<=G)a(h),J.sortIndex=J.expirationTime,s(u,J);else break;J=l(h)}}function M(G){if(x=!1,E(G),!k)if(l(u)!==null)k=!0,T||(T=!0,V());else{var J=l(h);J!==null&&X(M,J.startTime-G)}}var T=!1,O=-1,A=5,B=-1;function j(){return S?!0:!(n.unstable_now()-B<A)}function F(){if(S=!1,T){var G=n.unstable_now();B=G;var J=!0;try{e:{k=!1,x&&(x=!1,p(O),O=-1),w=!0;var re=b;try{t:{for(E(G),c=l(u);c!==null&&!(c.expirationTime>G&&j());){var H=c.callback;if(typeof H=="function"){c.callback=null,b=c.priorityLevel;var D=H(c.expirationTime<=G);if(G=n.unstable_now(),typeof D=="function"){c.callback=D,E(G),J=!0;break t}c===l(u)&&a(u),E(G)}else a(u);c=l(u)}if(c!==null)J=!0;else{var L=l(h);L!==null&&X(M,L.startTime-G),J=!1}}break e}finally{c=null,b=re,w=!1}J=void 0}}finally{J?V():T=!1}}}var V;if(typeof g=="function")V=function(){g(F)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,W=q.port2;q.port1.onmessage=F,V=function(){W.postMessage(null)}}else V=function(){_(F,0)};function X(G,J){O=_(function(){G(n.unstable_now())},J)}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(G){G.callback=null},n.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<G?Math.floor(1e3/G):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(G){switch(b){case 1:case 2:case 3:var J=3;break;default:J=b}var re=b;b=J;try{return G()}finally{b=re}},n.unstable_requestPaint=function(){S=!0},n.unstable_runWithPriority=function(G,J){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var re=b;b=G;try{return J()}finally{b=re}},n.unstable_scheduleCallback=function(G,J,re){var H=n.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?H+re:H):re=H,G){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=re+D,G={id:d++,callback:J,priorityLevel:G,startTime:re,expirationTime:D,sortIndex:-1},re>H?(G.sortIndex=re,s(h,G),l(u)===null&&G===l(h)&&(x?(p(O),O=-1):x=!0,X(M,re-H))):(G.sortIndex=D,s(u,G),k||w||(k=!0,T||(T=!0,V()))),G},n.unstable_shouldYield=j,n.unstable_wrapCallback=function(G){var J=b;return function(){var re=b;b=J;try{return G.apply(this,arguments)}finally{b=re}}}})(Hu)),Hu}var Fp;function C0(){return Fp||(Fp=1,zu.exports=b0()),zu.exports}var Nu={exports:{}},Nt={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var qp;function w0(){if(qp)return Nt;qp=1;var n=vc();function s(u){var h="https://react.dev/errors/"+u;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)h+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+u+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var a={d:{f:l,r:function(){throw Error(s(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},v=Symbol.for("react.portal");function C(u,h,d){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:v,key:c==null?null:""+c,children:u,containerInfo:h,implementation:d}}var m=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function o(u,h){if(u==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Nt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Nt.createPortal=function(u,h){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(s(299));return C(u,h,null,d)},Nt.flushSync=function(u){var h=m.T,d=a.p;try{if(m.T=null,a.p=2,u)return u()}finally{m.T=h,a.p=d,a.d.f()}},Nt.preconnect=function(u,h){typeof u=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(u,h))},Nt.prefetchDNS=function(u){typeof u=="string"&&a.d.D(u)},Nt.preinit=function(u,h){if(typeof u=="string"&&h&&typeof h.as=="string"){var d=h.as,c=o(d,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,w=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;d==="style"?a.d.S(u,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:c,integrity:b,fetchPriority:w}):d==="script"&&a.d.X(u,{crossOrigin:c,integrity:b,fetchPriority:w,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Nt.preinitModule=function(u,h){if(typeof u=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var d=o(h.as,h.crossOrigin);a.d.M(u,{crossOrigin:d,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(u)},Nt.preload=function(u,h){if(typeof u=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var d=h.as,c=o(d,h.crossOrigin);a.d.L(u,d,{crossOrigin:c,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})}},Nt.preloadModule=function(u,h){if(typeof u=="string")if(h){var d=o(h.as,h.crossOrigin);a.d.m(u,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:d,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(u)},Nt.requestFormReset=function(u){a.d.r(u)},Nt.unstable_batchedUpdates=function(u,h){return u(h)},Nt.useFormState=function(u,h,d){return m.H.useFormState(u,h,d)},Nt.useFormStatus=function(){return m.H.useHostTransitionStatus()},Nt.version="19.2.6",Nt}var Vp;function x0(){if(Vp)return Nu.exports;Vp=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(s){console.error(s)}}return n(),Nu.exports=w0(),Nu.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Gp;function E0(){if(Gp)return Rs;Gp=1;var n=C0(),s=vc(),l=x0();function a(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 v(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function C(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 m(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 o(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(C(e)!==e)throw Error(a(188))}function h(e){var t=e.alternate;if(!t){if(t=C(e),t===null)throw Error(a(188));return t!==e?null:e}for(var i=e,r=t;;){var f=i.return;if(f===null)break;var y=f.alternate;if(y===null){if(r=f.return,r!==null){i=r;continue}break}if(f.child===y.child){for(y=f.child;y;){if(y===i)return u(f),e;if(y===r)return u(f),t;y=y.sibling}throw Error(a(188))}if(i.return!==r.return)i=f,r=y;else{for(var R=!1,I=f.child;I;){if(I===i){R=!0,i=f,r=y;break}if(I===r){R=!0,r=f,i=y;break}I=I.sibling}if(!R){for(I=y.child;I;){if(I===i){R=!0,i=y,r=f;break}if(I===r){R=!0,r=y,i=f;break}I=I.sibling}if(!R)throw Error(a(189))}}if(i.alternate!==r)throw Error(a(190))}if(i.tag!==3)throw Error(a(188));return i.stateNode.current===i?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var c=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),g=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function V(e){return e===null||typeof e!="object"?null:(e=F&&e[F]||e["@@iterator"],typeof e=="function"?e:null)}var q=Symbol.for("react.client.reference");function W(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===q?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case x:return"Fragment";case _:return"Profiler";case S:return"StrictMode";case M:return"Suspense";case T:return"SuspenseList";case B:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case g:return e.displayName||"Context";case p:return(e._context.displayName||"Context")+".Consumer";case E:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case O:return t=e.displayName||null,t!==null?t:W(e.type)||"Memo";case A:t=e._payload,e=e._init;try{return W(e(t))}catch{}}return null}var X=Array.isArray,G=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},H=[],D=-1;function L(e){return{current:e}}function U(e){0>D||(e.current=H[D],H[D]=null,D--)}function z(e,t){D++,H[D]=e.current,e.current=t}var Z=L(null),pe=L(null),me=L(null),Y=L(null);function P(e,t){switch(z(me,t),z(pe,e),z(Z,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=lp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(Z),z(Z,e)}function ae(){U(Z),U(pe),U(me)}function ne(e){e.memoizedState!==null&&z(Y,e);var t=Z.current,i=lp(t,e.type);t!==i&&(z(pe,e),z(Z,i))}function ge(e){pe.current===e&&(U(Z),U(pe)),Y.current===e&&(U(Y),Es._currentValue=re)}var se,Oe;function Te(e){if(se===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);se=t&&t[1]||"",Oe=-1<i.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+se+e+Oe}var ve=!1;function Be(e,t){if(!e||ve)return"";ve=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(le){var ie=le}Reflect.construct(e,[],fe)}else{try{fe.call()}catch(le){ie=le}e.call(fe.prototype)}}else{try{throw Error()}catch(le){ie=le}(fe=e())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(le){if(le&&ie&&typeof le.stack=="string")return[le.stack,ie.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=r.DetermineComponentFrameRoot(),R=y[0],I=y[1];if(R&&I){var $=R.split(`
|
|
44
|
+
`),te=I.split(`
|
|
45
|
+
`);for(f=r=0;r<$.length&&!$[r].includes("DetermineComponentFrameRoot");)r++;for(;f<te.length&&!te[f].includes("DetermineComponentFrameRoot");)f++;if(r===$.length||f===te.length)for(r=$.length-1,f=te.length-1;1<=r&&0<=f&&$[r]!==te[f];)f--;for(;1<=r&&0<=f;r--,f--)if($[r]!==te[f]){if(r!==1||f!==1)do if(r--,f--,0>f||$[r]!==te[f]){var ue=`
|
|
46
|
+
`+$[r].replace(" at new "," at ");return e.displayName&&ue.includes("<anonymous>")&&(ue=ue.replace("<anonymous>",e.displayName)),ue}while(1<=r&&0<=f);break}}}finally{ve=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Te(i):""}function ye(e,t){switch(e.tag){case 26:case 27:case 5:return Te(e.type);case 16:return Te("Lazy");case 13:return e.child!==t&&t!==null?Te("Suspense Fallback"):Te("Suspense");case 19:return Te("SuspenseList");case 0:case 15:return Be(e.type,!1);case 11:return Be(e.type.render,!1);case 1:return Be(e.type,!0);case 31:return Te("Activity");default:return""}}function lt(e){try{var t="",i=null;do t+=ye(e,i),i=e,e=e.return;while(e);return t}catch(r){return`
|
|
47
|
+
Error generating stack: `+r.message+`
|
|
48
|
+
`+r.stack}}var Ye=Object.prototype.hasOwnProperty,Tt=n.unstable_scheduleCallback,Dt=n.unstable_cancelCallback,wn=n.unstable_shouldYield,Et=n.unstable_requestPaint,ht=n.unstable_now,zt=n.unstable_getCurrentPriorityLevel,oe=n.unstable_ImmediatePriority,Se=n.unstable_UserBlockingPriority,Ce=n.unstable_NormalPriority,Re=n.unstable_LowPriority,Me=n.unstable_IdlePriority,pt=n.log,Ie=n.unstable_setDisableYieldValue,We=null,mt=null;function Ht(e){if(typeof pt=="function"&&Ie(e),mt&&typeof mt.setStrictMode=="function")try{mt.setStrictMode(We,e)}catch{}}var Ze=Math.clz32?Math.clz32:Ee,xn=Math.log,he=Math.LN2;function Ee(e){return e>>>=0,e===0?32:31-(xn(e)/he|0)|0}var _t=256,vn=262144,qs=4194304;function wi(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 Vs(e,t,i){var r=e.pendingLanes;if(r===0)return 0;var f=0,y=e.suspendedLanes,R=e.pingedLanes;e=e.warmLanes;var I=r&134217727;return I!==0?(r=I&~y,r!==0?f=wi(r):(R&=I,R!==0?f=wi(R):i||(i=I&~e,i!==0&&(f=wi(i))))):(I=r&~y,I!==0?f=wi(I):R!==0?f=wi(R):i||(i=r&~e,i!==0&&(f=wi(i)))),f===0?0:t!==0&&t!==f&&(t&y)===0&&(y=f&-f,i=t&-t,y>=i||y===32&&(i&4194048)!==0)?t:f}function jr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ig(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 Ic(){var e=qs;return qs<<=1,(qs&62914560)===0&&(qs=4194304),e}function Sa(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Ir(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function rg(e,t,i,r,f,y){var R=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 I=e.entanglements,$=e.expirationTimes,te=e.hiddenUpdates;for(i=R&~i;0<i;){var ue=31-Ze(i),fe=1<<ue;I[ue]=0,$[ue]=-1;var ie=te[ue];if(ie!==null)for(te[ue]=null,ue=0;ue<ie.length;ue++){var le=ie[ue];le!==null&&(le.lane&=-536870913)}i&=~fe}r!==0&&Uc(e,r,0),y!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=y&~(R&~t))}function Uc(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|i&261930}function Pc(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var r=31-Ze(i),f=1<<r;f&t|e[r]&t&&(e[r]|=t),i&=~f}}function Fc(e,t){var i=t&-t;return i=(i&42)!==0?1:ya(i),(i&(e.suspendedLanes|t))!==0?0:i}function ya(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 ba(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function qc(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Dp(e.type))}function Vc(e,t){var i=J.p;try{return J.p=e,t()}finally{J.p=i}}var Xn=Math.random().toString(36).slice(2),Rt="__reactFiber$"+Xn,Ft="__reactProps$"+Xn,Gi="__reactContainer$"+Xn,Ca="__reactEvents$"+Xn,sg="__reactListeners$"+Xn,lg="__reactHandles$"+Xn,Gc="__reactResources$"+Xn,Ur="__reactMarker$"+Xn;function wa(e){delete e[Rt],delete e[Ft],delete e[Ca],delete e[sg],delete e[lg]}function $i(e){var t=e[Rt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Gi]||i[Rt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=dp(e);e!==null;){if(i=e[Rt])return i;e=dp(e)}return t}e=i,i=e.parentNode}return null}function Yi(e){if(e=e[Rt]||e[Gi]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Pr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function Wi(e){var t=e[Gc];return t||(t=e[Gc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function kt(e){e[Ur]=!0}var $c=new Set,Yc={};function xi(e,t){Ki(e,t),Ki(e+"Capture",t)}function Ki(e,t){for(Yc[e]=t,e=0;e<t.length;e++)$c.add(t[e])}var ag=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]*$"),Wc={},Kc={};function og(e){return Ye.call(Kc,e)?!0:Ye.call(Wc,e)?!1:ag.test(e)?Kc[e]=!0:(Wc[e]=!0,!1)}function Gs(e,t,i){if(og(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function $s(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 Mn(e,t,i,r){if(r===null)e.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+r)}}function an(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Xc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ug(e,t,i){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var f=r.get,y=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return f.call(this)},set:function(R){i=""+R,y.call(this,R)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(R){i=""+R},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xa(e){if(!e._valueTracker){var t=Xc(e)?"checked":"value";e._valueTracker=ug(e,t,""+e[t])}}function Qc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),r="";return e&&(r=Xc(e)?e.checked?"true":"false":e.value),e=r,e!==i?(t.setValue(e),!0):!1}function Ys(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 cg=/[\n"\\]/g;function on(e){return e.replace(cg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ea(e,t,i,r,f,y,R,I){e.name="",R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?e.type=R:e.removeAttribute("type"),t!=null?R==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+an(t)):e.value!==""+an(t)&&(e.value=""+an(t)):R!=="submit"&&R!=="reset"||e.removeAttribute("value"),t!=null?ka(e,R,an(t)):i!=null?ka(e,R,an(i)):r!=null&&e.removeAttribute("value"),f==null&&y!=null&&(e.defaultChecked=!!y),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?e.name=""+an(I):e.removeAttribute("name")}function Zc(e,t,i,r,f,y,R,I){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.type=y),t!=null||i!=null){if(!(y!=="submit"&&y!=="reset"||t!=null)){xa(e);return}i=i!=null?""+an(i):"",t=t!=null?""+an(t):i,I||t===e.value||(e.value=t),e.defaultValue=t}r=r??f,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=I?e.checked:!!r,e.defaultChecked=!!r,R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(e.name=R),xa(e)}function ka(e,t,i){t==="number"&&Ys(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Xi(e,t,i,r){if(e=e.options,t){t={};for(var f=0;f<i.length;f++)t["$"+i[f]]=!0;for(i=0;i<e.length;i++)f=t.hasOwnProperty("$"+e[i].value),e[i].selected!==f&&(e[i].selected=f),f&&r&&(e[i].defaultSelected=!0)}else{for(i=""+an(i),t=null,f=0;f<e.length;f++){if(e[f].value===i){e[f].selected=!0,r&&(e[f].defaultSelected=!0);return}t!==null||e[f].disabled||(t=e[f])}t!==null&&(t.selected=!0)}}function Jc(e,t,i){if(t!=null&&(t=""+an(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+an(i):""}function eh(e,t,i,r){if(t==null){if(r!=null){if(i!=null)throw Error(a(92));if(X(r)){if(1<r.length)throw Error(a(93));r=r[0]}i=r}i==null&&(i=""),t=i}i=an(t),e.defaultValue=i,r=e.textContent,r===i&&r!==""&&r!==null&&(e.value=r),xa(e)}function Qi(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var hg=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 th(e,t,i){var r=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,i):typeof i!="number"||i===0||hg.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function nh(e,t,i){if(t!=null&&typeof t!="object")throw Error(a(62));if(e=e.style,i!=null){for(var r in i)!i.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var f in t)r=t[f],t.hasOwnProperty(f)&&i[f]!==r&&th(e,f,r)}else for(var y in t)t.hasOwnProperty(y)&&th(e,y,t[y])}function Aa(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 fg=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"]]),dg=/^[\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 Ws(e){return dg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ln(){}var Ta=null;function Da(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zi=null,Ji=null;function ih(e){var t=Yi(e);if(t&&(e=t.stateNode)){var i=e[Ft]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ea(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="'+on(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var r=i[t];if(r!==e&&r.form===e.form){var f=r[Ft]||null;if(!f)throw Error(a(90));Ea(r,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(t=0;t<i.length;t++)r=i[t],r.form===e.form&&Qc(r)}break e;case"textarea":Jc(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Xi(e,!!i.multiple,t,!1)}}}var Ra=!1;function rh(e,t,i){if(Ra)return e(t,i);Ra=!0;try{var r=e(t);return r}finally{if(Ra=!1,(Zi!==null||Ji!==null)&&(zl(),Zi&&(t=Zi,e=Ji,Ji=Zi=null,ih(t),e)))for(t=0;t<e.length;t++)ih(e[t])}}function Fr(e,t){var i=e.stateNode;if(i===null)return null;var r=i[Ft]||null;if(r===null)return null;i=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(a(231,t,typeof i));return i}var On=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ma=!1;if(On)try{var qr={};Object.defineProperty(qr,"passive",{get:function(){Ma=!0}}),window.addEventListener("test",qr,qr),window.removeEventListener("test",qr,qr)}catch{Ma=!1}var Qn=null,La=null,Ks=null;function sh(){if(Ks)return Ks;var e,t=La,i=t.length,r,f="value"in Qn?Qn.value:Qn.textContent,y=f.length;for(e=0;e<i&&t[e]===f[e];e++);var R=i-e;for(r=1;r<=R&&t[i-r]===f[y-r];r++);return Ks=f.slice(e,1<r?1-r:void 0)}function Xs(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 Qs(){return!0}function lh(){return!1}function qt(e){function t(i,r,f,y,R){this._reactName=i,this._targetInst=f,this.type=r,this.nativeEvent=y,this.target=R,this.currentTarget=null;for(var I in e)e.hasOwnProperty(I)&&(i=e[I],this[I]=i?i(y):y[I]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Qs:lh,this.isPropagationStopped=lh,this}return c(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=Qs)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Qs)},persist:function(){},isPersistent:Qs}),t}var Ei={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zs=qt(Ei),Vr=c({},Ei,{view:0,detail:0}),pg=qt(Vr),Oa,Ba,Gr,Js=c({},Vr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ha,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!==Gr&&(Gr&&e.type==="mousemove"?(Oa=e.screenX-Gr.screenX,Ba=e.screenY-Gr.screenY):Ba=Oa=0,Gr=e),Oa)},movementY:function(e){return"movementY"in e?e.movementY:Ba}}),ah=qt(Js),mg=c({},Js,{dataTransfer:0}),_g=qt(mg),gg=c({},Vr,{relatedTarget:0}),za=qt(gg),vg=c({},Ei,{animationName:0,elapsedTime:0,pseudoElement:0}),Sg=qt(vg),yg=c({},Ei,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bg=qt(yg),Cg=c({},Ei,{data:0}),oh=qt(Cg),wg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xg={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"},Eg={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kg(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Eg[e])?!!t[e]:!1}function Ha(){return kg}var Ag=c({},Vr,{key:function(e){if(e.key){var t=wg[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Xs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xg[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ha,charCode:function(e){return e.type==="keypress"?Xs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Xs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Tg=qt(Ag),Dg=c({},Js,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uh=qt(Dg),Rg=c({},Vr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ha}),Mg=qt(Rg),Lg=c({},Ei,{propertyName:0,elapsedTime:0,pseudoElement:0}),Og=qt(Lg),Bg=c({},Js,{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}),zg=qt(Bg),Hg=c({},Ei,{newState:0,oldState:0}),Ng=qt(Hg),jg=[9,13,27,32],Na=On&&"CompositionEvent"in window,$r=null;On&&"documentMode"in document&&($r=document.documentMode);var Ig=On&&"TextEvent"in window&&!$r,ch=On&&(!Na||$r&&8<$r&&11>=$r),hh=" ",fh=!1;function dh(e,t){switch(e){case"keyup":return jg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ph(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var er=!1;function Ug(e,t){switch(e){case"compositionend":return ph(t);case"keypress":return t.which!==32?null:(fh=!0,hh);case"textInput":return e=t.data,e===hh&&fh?null:e;default:return null}}function Pg(e,t){if(er)return e==="compositionend"||!Na&&dh(e,t)?(e=sh(),Ks=La=Qn=null,er=!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 ch&&t.locale!=="ko"?null:t.data;default:return null}}var Fg={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 mh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Fg[e.type]:t==="textarea"}function _h(e,t,i,r){Zi?Ji?Ji.push(r):Ji=[r]:Zi=r,t=Fl(t,"onChange"),0<t.length&&(i=new Zs("onChange","change",null,i,r),e.push({event:i,listeners:t}))}var Yr=null,Wr=null;function qg(e){Jd(e,0)}function el(e){var t=Pr(e);if(Qc(t))return e}function gh(e,t){if(e==="change")return t}var vh=!1;if(On){var ja;if(On){var Ia="oninput"in document;if(!Ia){var Sh=document.createElement("div");Sh.setAttribute("oninput","return;"),Ia=typeof Sh.oninput=="function"}ja=Ia}else ja=!1;vh=ja&&(!document.documentMode||9<document.documentMode)}function yh(){Yr&&(Yr.detachEvent("onpropertychange",bh),Wr=Yr=null)}function bh(e){if(e.propertyName==="value"&&el(Wr)){var t=[];_h(t,Wr,e,Da(e)),rh(qg,t)}}function Vg(e,t,i){e==="focusin"?(yh(),Yr=t,Wr=i,Yr.attachEvent("onpropertychange",bh)):e==="focusout"&&yh()}function Gg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return el(Wr)}function $g(e,t){if(e==="click")return el(t)}function Yg(e,t){if(e==="input"||e==="change")return el(t)}function Wg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qt=typeof Object.is=="function"?Object.is:Wg;function Kr(e,t){if(Qt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(r=0;r<i.length;r++){var f=i[r];if(!Ye.call(t,f)||!Qt(e[f],t[f]))return!1}return!0}function Ch(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wh(e,t){var i=Ch(e);e=0;for(var r;i;){if(i.nodeType===3){if(r=e+i.textContent.length,e<=t&&r>=t)return{node:i,offset:t-e};e=r}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Ch(i)}}function xh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Eh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ys(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=Ys(e.document)}return t}function Ua(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 Kg=On&&"documentMode"in document&&11>=document.documentMode,tr=null,Pa=null,Xr=null,Fa=!1;function kh(e,t,i){var r=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Fa||tr==null||tr!==Ys(r)||(r=tr,"selectionStart"in r&&Ua(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Xr&&Kr(Xr,r)||(Xr=r,r=Fl(Pa,"onSelect"),0<r.length&&(t=new Zs("onSelect","select",null,t,i),e.push({event:t,listeners:r}),t.target=tr)))}function ki(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var nr={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")},qa={},Ah={};On&&(Ah=document.createElement("div").style,"AnimationEvent"in window||(delete nr.animationend.animation,delete nr.animationiteration.animation,delete nr.animationstart.animation),"TransitionEvent"in window||delete nr.transitionend.transition);function Ai(e){if(qa[e])return qa[e];if(!nr[e])return e;var t=nr[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Ah)return qa[e]=t[i];return e}var Th=Ai("animationend"),Dh=Ai("animationiteration"),Rh=Ai("animationstart"),Xg=Ai("transitionrun"),Qg=Ai("transitionstart"),Zg=Ai("transitioncancel"),Mh=Ai("transitionend"),Lh=new Map,Va="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(" ");Va.push("scrollEnd");function Sn(e,t){Lh.set(e,t),xi(t,[e])}var tl=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)},un=[],ir=0,Ga=0;function nl(){for(var e=ir,t=Ga=ir=0;t<e;){var i=un[t];un[t++]=null;var r=un[t];un[t++]=null;var f=un[t];un[t++]=null;var y=un[t];if(un[t++]=null,r!==null&&f!==null){var R=r.pending;R===null?f.next=f:(f.next=R.next,R.next=f),r.pending=f}y!==0&&Oh(i,f,y)}}function il(e,t,i,r){un[ir++]=e,un[ir++]=t,un[ir++]=i,un[ir++]=r,Ga|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function $a(e,t,i,r){return il(e,t,i,r),rl(e)}function Ti(e,t){return il(e,null,null,t),rl(e)}function Oh(e,t,i){e.lanes|=i;var r=e.alternate;r!==null&&(r.lanes|=i);for(var f=!1,y=e.return;y!==null;)y.childLanes|=i,r=y.alternate,r!==null&&(r.childLanes|=i),y.tag===22&&(e=y.stateNode,e===null||e._visibility&1||(f=!0)),e=y,y=y.return;return e.tag===3?(y=e.stateNode,f&&t!==null&&(f=31-Ze(i),e=y.hiddenUpdates,r=e[f],r===null?e[f]=[t]:r.push(t),t.lane=i|536870912),y):null}function rl(e){if(50<vs)throw vs=0,nu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var rr={};function Jg(e,t,i,r){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zt(e,t,i,r){return new Jg(e,t,i,r)}function Ya(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Bn(e,t){var i=e.alternate;return i===null?(i=Zt(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 Bh(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 sl(e,t,i,r,f,y){var R=0;if(r=e,typeof e=="function")Ya(e)&&(R=1);else if(typeof e=="string")R=r0(e,i,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case B:return e=Zt(31,i,t,f),e.elementType=B,e.lanes=y,e;case x:return Di(i.children,f,y,t);case S:R=8,f|=24;break;case _:return e=Zt(12,i,t,f|2),e.elementType=_,e.lanes=y,e;case M:return e=Zt(13,i,t,f),e.elementType=M,e.lanes=y,e;case T:return e=Zt(19,i,t,f),e.elementType=T,e.lanes=y,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case g:R=10;break e;case p:R=9;break e;case E:R=11;break e;case O:R=14;break e;case A:R=16,r=null;break e}R=29,i=Error(a(130,e===null?"null":typeof e,"")),r=null}return t=Zt(R,i,t,f),t.elementType=e,t.type=r,t.lanes=y,t}function Di(e,t,i,r){return e=Zt(7,e,r,t),e.lanes=i,e}function Wa(e,t,i){return e=Zt(6,e,null,t),e.lanes=i,e}function zh(e){var t=Zt(18,null,null,0);return t.stateNode=e,t}function Ka(e,t,i){return t=Zt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Hh=new WeakMap;function cn(e,t){if(typeof e=="object"&&e!==null){var i=Hh.get(e);return i!==void 0?i:(t={value:e,source:t,stack:lt(t)},Hh.set(e,t),t)}return{value:e,source:t,stack:lt(t)}}var sr=[],lr=0,ll=null,Qr=0,hn=[],fn=0,Zn=null,En=1,kn="";function zn(e,t){sr[lr++]=Qr,sr[lr++]=ll,ll=e,Qr=t}function Nh(e,t,i){hn[fn++]=En,hn[fn++]=kn,hn[fn++]=Zn,Zn=e;var r=En;e=kn;var f=32-Ze(r)-1;r&=~(1<<f),i+=1;var y=32-Ze(t)+f;if(30<y){var R=f-f%5;y=(r&(1<<R)-1).toString(32),r>>=R,f-=R,En=1<<32-Ze(t)+f|i<<f|r,kn=y+e}else En=1<<y|i<<f|r,kn=e}function Xa(e){e.return!==null&&(zn(e,1),Nh(e,1,0))}function Qa(e){for(;e===ll;)ll=sr[--lr],sr[lr]=null,Qr=sr[--lr],sr[lr]=null;for(;e===Zn;)Zn=hn[--fn],hn[fn]=null,kn=hn[--fn],hn[fn]=null,En=hn[--fn],hn[fn]=null}function jh(e,t){hn[fn++]=En,hn[fn++]=kn,hn[fn++]=Zn,En=t.id,kn=t.overflow,Zn=e}var Mt=null,ot=null,Ge=!1,Jn=null,dn=!1,Za=Error(a(519));function ei(e){var t=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Zr(cn(t,e)),Za}function Ih(e){var t=e.stateNode,i=e.type,r=e.memoizedProps;switch(t[Rt]=e,t[Ft]=r,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<ys.length;i++)Pe(ys[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),Zc(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Pe("invalid",t);break;case"textarea":Pe("invalid",t),eh(t,r.value,r.defaultValue,r.children)}i=r.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||r.suppressHydrationWarning===!0||ip(t.textContent,i)?(r.popover!=null&&(Pe("beforetoggle",t),Pe("toggle",t)),r.onScroll!=null&&Pe("scroll",t),r.onScrollEnd!=null&&Pe("scrollend",t),r.onClick!=null&&(t.onclick=Ln),t=!0):t=!1,t||ei(e,!0)}function Uh(e){for(Mt=e.return;Mt;)switch(Mt.tag){case 5:case 31:case 13:dn=!1;return;case 27:case 3:dn=!0;return;default:Mt=Mt.return}}function ar(e){if(e!==Mt)return!1;if(!Ge)return Uh(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")||gu(e.type,e.memoizedProps)),i=!i),i&&ot&&ei(e),Uh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));ot=fp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));ot=fp(e)}else t===27?(t=ot,pi(e.type)?(e=Cu,Cu=null,ot=e):ot=t):ot=Mt?mn(e.stateNode.nextSibling):null;return!0}function Ri(){ot=Mt=null,Ge=!1}function Ja(){var e=Jn;return e!==null&&(Yt===null?Yt=e:Yt.push.apply(Yt,e),Jn=null),e}function Zr(e){Jn===null?Jn=[e]:Jn.push(e)}var eo=L(null),Mi=null,Hn=null;function ti(e,t,i){z(eo,t._currentValue),t._currentValue=i}function Nn(e){e._currentValue=eo.current,U(eo)}function to(e,t,i){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===i)break;e=e.return}}function no(e,t,i,r){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var y=f.dependencies;if(y!==null){var R=f.child;y=y.firstContext;e:for(;y!==null;){var I=y;y=f;for(var $=0;$<t.length;$++)if(I.context===t[$]){y.lanes|=i,I=y.alternate,I!==null&&(I.lanes|=i),to(y.return,i,e),r||(R=null);break e}y=I.next}}else if(f.tag===18){if(R=f.return,R===null)throw Error(a(341));R.lanes|=i,y=R.alternate,y!==null&&(y.lanes|=i),to(R,i,e),R=null}else R=f.child;if(R!==null)R.return=f;else for(R=f;R!==null;){if(R===e){R=null;break}if(f=R.sibling,f!==null){f.return=R.return,R=f;break}R=R.return}f=R}}function or(e,t,i,r){e=null;for(var f=t,y=!1;f!==null;){if(!y){if((f.flags&524288)!==0)y=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var R=f.alternate;if(R===null)throw Error(a(387));if(R=R.memoizedProps,R!==null){var I=f.type;Qt(f.pendingProps.value,R.value)||(e!==null?e.push(I):e=[I])}}else if(f===Y.current){if(R=f.alternate,R===null)throw Error(a(387));R.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Es):e=[Es])}f=f.return}e!==null&&no(t,e,i,r),t.flags|=262144}function al(e){for(e=e.firstContext;e!==null;){if(!Qt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Li(e){Mi=e,Hn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Lt(e){return Ph(Mi,e)}function ol(e,t){return Mi===null&&Li(e),Ph(e,t)}function Ph(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Hn===null){if(e===null)throw Error(a(308));Hn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Hn=Hn.next=t;return i}var ev=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},tv=n.unstable_scheduleCallback,nv=n.unstable_NormalPriority,St={$$typeof:g,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function io(){return{controller:new ev,data:new Map,refCount:0}}function Jr(e){e.refCount--,e.refCount===0&&tv(nv,function(){e.controller.abort()})}var es=null,ro=0,ur=0,cr=null;function iv(e,t){if(es===null){var i=es=[];ro=0,ur=ou(),cr={status:"pending",value:void 0,then:function(r){i.push(r)}}}return ro++,t.then(Fh,Fh),t}function Fh(){if(--ro===0&&es!==null){cr!==null&&(cr.status="fulfilled");var e=es;es=null,ur=0,cr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function rv(e,t){var i=[],r={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var f=0;f<i.length;f++)(0,i[f])(t)},function(f){for(r.status="rejected",r.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),r}var qh=G.S;G.S=function(e,t){Ad=ht(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&iv(e,t),qh!==null&&qh(e,t)};var Oi=L(null);function so(){var e=Oi.current;return e!==null?e:rt.pooledCache}function ul(e,t){t===null?z(Oi,Oi.current):z(Oi,t.pool)}function Vh(){var e=so();return e===null?null:{parent:St._currentValue,pool:e}}var hr=Error(a(460)),lo=Error(a(474)),cl=Error(a(542)),hl={then:function(){}};function Gh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function $h(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Ln,Ln),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Wh(e),e;default:if(typeof t.status=="string")t.then(Ln,Ln);else{if(e=rt,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var f=t;f.status="fulfilled",f.value=r}},function(r){if(t.status==="pending"){var f=t;f.status="rejected",f.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Wh(e),e}throw zi=t,hr}}function Bi(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(zi=i,hr):i}}var zi=null;function Yh(){if(zi===null)throw Error(a(459));var e=zi;return zi=null,e}function Wh(e){if(e===hr||e===cl)throw Error(a(483))}var fr=null,ts=0;function fl(e){var t=ts;return ts+=1,fr===null&&(fr=[]),$h(fr,e,t)}function ns(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function dl(e,t){throw t.$$typeof===b?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Kh(e){function t(Q,K){if(e){var ee=Q.deletions;ee===null?(Q.deletions=[K],Q.flags|=16):ee.push(K)}}function i(Q,K){if(!e)return null;for(;K!==null;)t(Q,K),K=K.sibling;return null}function r(Q){for(var K=new Map;Q!==null;)Q.key!==null?K.set(Q.key,Q):K.set(Q.index,Q),Q=Q.sibling;return K}function f(Q,K){return Q=Bn(Q,K),Q.index=0,Q.sibling=null,Q}function y(Q,K,ee){return Q.index=ee,e?(ee=Q.alternate,ee!==null?(ee=ee.index,ee<K?(Q.flags|=67108866,K):ee):(Q.flags|=67108866,K)):(Q.flags|=1048576,K)}function R(Q){return e&&Q.alternate===null&&(Q.flags|=67108866),Q}function I(Q,K,ee,ce){return K===null||K.tag!==6?(K=Wa(ee,Q.mode,ce),K.return=Q,K):(K=f(K,ee),K.return=Q,K)}function $(Q,K,ee,ce){var xe=ee.type;return xe===x?ue(Q,K,ee.props.children,ce,ee.key):K!==null&&(K.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===A&&Bi(xe)===K.type)?(K=f(K,ee.props),ns(K,ee),K.return=Q,K):(K=sl(ee.type,ee.key,ee.props,null,Q.mode,ce),ns(K,ee),K.return=Q,K)}function te(Q,K,ee,ce){return K===null||K.tag!==4||K.stateNode.containerInfo!==ee.containerInfo||K.stateNode.implementation!==ee.implementation?(K=Ka(ee,Q.mode,ce),K.return=Q,K):(K=f(K,ee.children||[]),K.return=Q,K)}function ue(Q,K,ee,ce,xe){return K===null||K.tag!==7?(K=Di(ee,Q.mode,ce,xe),K.return=Q,K):(K=f(K,ee),K.return=Q,K)}function fe(Q,K,ee){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return K=Wa(""+K,Q.mode,ee),K.return=Q,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case w:return ee=sl(K.type,K.key,K.props,null,Q.mode,ee),ns(ee,K),ee.return=Q,ee;case k:return K=Ka(K,Q.mode,ee),K.return=Q,K;case A:return K=Bi(K),fe(Q,K,ee)}if(X(K)||V(K))return K=Di(K,Q.mode,ee,null),K.return=Q,K;if(typeof K.then=="function")return fe(Q,fl(K),ee);if(K.$$typeof===g)return fe(Q,ol(Q,K),ee);dl(Q,K)}return null}function ie(Q,K,ee,ce){var xe=K!==null?K.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return xe!==null?null:I(Q,K,""+ee,ce);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case w:return ee.key===xe?$(Q,K,ee,ce):null;case k:return ee.key===xe?te(Q,K,ee,ce):null;case A:return ee=Bi(ee),ie(Q,K,ee,ce)}if(X(ee)||V(ee))return xe!==null?null:ue(Q,K,ee,ce,null);if(typeof ee.then=="function")return ie(Q,K,fl(ee),ce);if(ee.$$typeof===g)return ie(Q,K,ol(Q,ee),ce);dl(Q,ee)}return null}function le(Q,K,ee,ce,xe){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return Q=Q.get(ee)||null,I(K,Q,""+ce,xe);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case w:return Q=Q.get(ce.key===null?ee:ce.key)||null,$(K,Q,ce,xe);case k:return Q=Q.get(ce.key===null?ee:ce.key)||null,te(K,Q,ce,xe);case A:return ce=Bi(ce),le(Q,K,ee,ce,xe)}if(X(ce)||V(ce))return Q=Q.get(ee)||null,ue(K,Q,ce,xe,null);if(typeof ce.then=="function")return le(Q,K,ee,fl(ce),xe);if(ce.$$typeof===g)return le(Q,K,ee,ol(K,ce),xe);dl(K,ce)}return null}function be(Q,K,ee,ce){for(var xe=null,Ke=null,we=K,He=K=0,Ve=null;we!==null&&He<ee.length;He++){we.index>He?(Ve=we,we=null):Ve=we.sibling;var Xe=ie(Q,we,ee[He],ce);if(Xe===null){we===null&&(we=Ve);break}e&&we&&Xe.alternate===null&&t(Q,we),K=y(Xe,K,He),Ke===null?xe=Xe:Ke.sibling=Xe,Ke=Xe,we=Ve}if(He===ee.length)return i(Q,we),Ge&&zn(Q,He),xe;if(we===null){for(;He<ee.length;He++)we=fe(Q,ee[He],ce),we!==null&&(K=y(we,K,He),Ke===null?xe=we:Ke.sibling=we,Ke=we);return Ge&&zn(Q,He),xe}for(we=r(we);He<ee.length;He++)Ve=le(we,Q,He,ee[He],ce),Ve!==null&&(e&&Ve.alternate!==null&&we.delete(Ve.key===null?He:Ve.key),K=y(Ve,K,He),Ke===null?xe=Ve:Ke.sibling=Ve,Ke=Ve);return e&&we.forEach(function(Si){return t(Q,Si)}),Ge&&zn(Q,He),xe}function De(Q,K,ee,ce){if(ee==null)throw Error(a(151));for(var xe=null,Ke=null,we=K,He=K=0,Ve=null,Xe=ee.next();we!==null&&!Xe.done;He++,Xe=ee.next()){we.index>He?(Ve=we,we=null):Ve=we.sibling;var Si=ie(Q,we,Xe.value,ce);if(Si===null){we===null&&(we=Ve);break}e&&we&&Si.alternate===null&&t(Q,we),K=y(Si,K,He),Ke===null?xe=Si:Ke.sibling=Si,Ke=Si,we=Ve}if(Xe.done)return i(Q,we),Ge&&zn(Q,He),xe;if(we===null){for(;!Xe.done;He++,Xe=ee.next())Xe=fe(Q,Xe.value,ce),Xe!==null&&(K=y(Xe,K,He),Ke===null?xe=Xe:Ke.sibling=Xe,Ke=Xe);return Ge&&zn(Q,He),xe}for(we=r(we);!Xe.done;He++,Xe=ee.next())Xe=le(we,Q,He,Xe.value,ce),Xe!==null&&(e&&Xe.alternate!==null&&we.delete(Xe.key===null?He:Xe.key),K=y(Xe,K,He),Ke===null?xe=Xe:Ke.sibling=Xe,Ke=Xe);return e&&we.forEach(function(m0){return t(Q,m0)}),Ge&&zn(Q,He),xe}function it(Q,K,ee,ce){if(typeof ee=="object"&&ee!==null&&ee.type===x&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case w:e:{for(var xe=ee.key;K!==null;){if(K.key===xe){if(xe=ee.type,xe===x){if(K.tag===7){i(Q,K.sibling),ce=f(K,ee.props.children),ce.return=Q,Q=ce;break e}}else if(K.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===A&&Bi(xe)===K.type){i(Q,K.sibling),ce=f(K,ee.props),ns(ce,ee),ce.return=Q,Q=ce;break e}i(Q,K);break}else t(Q,K);K=K.sibling}ee.type===x?(ce=Di(ee.props.children,Q.mode,ce,ee.key),ce.return=Q,Q=ce):(ce=sl(ee.type,ee.key,ee.props,null,Q.mode,ce),ns(ce,ee),ce.return=Q,Q=ce)}return R(Q);case k:e:{for(xe=ee.key;K!==null;){if(K.key===xe)if(K.tag===4&&K.stateNode.containerInfo===ee.containerInfo&&K.stateNode.implementation===ee.implementation){i(Q,K.sibling),ce=f(K,ee.children||[]),ce.return=Q,Q=ce;break e}else{i(Q,K);break}else t(Q,K);K=K.sibling}ce=Ka(ee,Q.mode,ce),ce.return=Q,Q=ce}return R(Q);case A:return ee=Bi(ee),it(Q,K,ee,ce)}if(X(ee))return be(Q,K,ee,ce);if(V(ee)){if(xe=V(ee),typeof xe!="function")throw Error(a(150));return ee=xe.call(ee),De(Q,K,ee,ce)}if(typeof ee.then=="function")return it(Q,K,fl(ee),ce);if(ee.$$typeof===g)return it(Q,K,ol(Q,ee),ce);dl(Q,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint"?(ee=""+ee,K!==null&&K.tag===6?(i(Q,K.sibling),ce=f(K,ee),ce.return=Q,Q=ce):(i(Q,K),ce=Wa(ee,Q.mode,ce),ce.return=Q,Q=ce),R(Q)):i(Q,K)}return function(Q,K,ee,ce){try{ts=0;var xe=it(Q,K,ee,ce);return fr=null,xe}catch(we){if(we===hr||we===cl)throw we;var Ke=Zt(29,we,null,Q.mode);return Ke.lanes=ce,Ke.return=Q,Ke}finally{}}}var Hi=Kh(!0),Xh=Kh(!1),ni=!1;function ao(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function oo(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 ii(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ri(e,t,i){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Qe&2)!==0){var f=r.pending;return f===null?t.next=t:(t.next=f.next,f.next=t),r.pending=t,t=rl(e),Oh(e,null,i),t}return il(e,r,t,i),rl(e)}function is(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,i|=r,t.lanes=i,Pc(e,i)}}function uo(e,t){var i=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,i===r)){var f=null,y=null;if(i=i.firstBaseUpdate,i!==null){do{var R={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};y===null?f=y=R:y=y.next=R,i=i.next}while(i!==null);y===null?f=y=t:y=y.next=t}else f=y=t;i={baseState:r.baseState,firstBaseUpdate:f,lastBaseUpdate:y,shared:r.shared,callbacks:r.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var co=!1;function rs(){if(co){var e=cr;if(e!==null)throw e}}function ss(e,t,i,r){co=!1;var f=e.updateQueue;ni=!1;var y=f.firstBaseUpdate,R=f.lastBaseUpdate,I=f.shared.pending;if(I!==null){f.shared.pending=null;var $=I,te=$.next;$.next=null,R===null?y=te:R.next=te,R=$;var ue=e.alternate;ue!==null&&(ue=ue.updateQueue,I=ue.lastBaseUpdate,I!==R&&(I===null?ue.firstBaseUpdate=te:I.next=te,ue.lastBaseUpdate=$))}if(y!==null){var fe=f.baseState;R=0,ue=te=$=null,I=y;do{var ie=I.lane&-536870913,le=ie!==I.lane;if(le?(qe&ie)===ie:(r&ie)===ie){ie!==0&&ie===ur&&(co=!0),ue!==null&&(ue=ue.next={lane:0,tag:I.tag,payload:I.payload,callback:null,next:null});e:{var be=e,De=I;ie=t;var it=i;switch(De.tag){case 1:if(be=De.payload,typeof be=="function"){fe=be.call(it,fe,ie);break e}fe=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=De.payload,ie=typeof be=="function"?be.call(it,fe,ie):be,ie==null)break e;fe=c({},fe,ie);break e;case 2:ni=!0}}ie=I.callback,ie!==null&&(e.flags|=64,le&&(e.flags|=8192),le=f.callbacks,le===null?f.callbacks=[ie]:le.push(ie))}else le={lane:ie,tag:I.tag,payload:I.payload,callback:I.callback,next:null},ue===null?(te=ue=le,$=fe):ue=ue.next=le,R|=ie;if(I=I.next,I===null){if(I=f.shared.pending,I===null)break;le=I,I=le.next,le.next=null,f.lastBaseUpdate=le,f.shared.pending=null}}while(!0);ue===null&&($=fe),f.baseState=$,f.firstBaseUpdate=te,f.lastBaseUpdate=ue,y===null&&(f.shared.lanes=0),ui|=R,e.lanes=R,e.memoizedState=fe}}function Qh(e,t){if(typeof e!="function")throw Error(a(191,e));e.call(t)}function Zh(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Qh(i[e],t)}var dr=L(null),pl=L(0);function Jh(e,t){e=$n,z(pl,e),z(dr,t),$n=e|t.baseLanes}function ho(){z(pl,$n),z(dr,dr.current)}function fo(){$n=pl.current,U(dr),U(pl)}var Jt=L(null),pn=null;function si(e){var t=e.alternate;z(gt,gt.current&1),z(Jt,e),pn===null&&(t===null||dr.current!==null||t.memoizedState!==null)&&(pn=e)}function po(e){z(gt,gt.current),z(Jt,e),pn===null&&(pn=e)}function ef(e){e.tag===22?(z(gt,gt.current),z(Jt,e),pn===null&&(pn=e)):li()}function li(){z(gt,gt.current),z(Jt,Jt.current)}function en(e){U(Jt),pn===e&&(pn=null),U(gt)}var gt=L(0);function ml(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||yu(i)||bu(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var jn=0,ze=null,tt=null,yt=null,_l=!1,pr=!1,Ni=!1,gl=0,ls=0,mr=null,sv=0;function ft(){throw Error(a(321))}function mo(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Qt(e[i],t[i]))return!1;return!0}function _o(e,t,i,r,f,y){return jn=y,ze=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?jf:Mo,Ni=!1,y=i(r,f),Ni=!1,pr&&(y=nf(t,i,r,f)),tf(e),y}function tf(e){G.H=us;var t=tt!==null&&tt.next!==null;if(jn=0,yt=tt=ze=null,_l=!1,ls=0,mr=null,t)throw Error(a(300));e===null||bt||(e=e.dependencies,e!==null&&al(e)&&(bt=!0))}function nf(e,t,i,r){ze=e;var f=0;do{if(pr&&(mr=null),ls=0,pr=!1,25<=f)throw Error(a(301));if(f+=1,yt=tt=null,e.updateQueue!=null){var y=e.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}G.H=If,y=t(i,r)}while(pr);return y}function lv(){var e=G.H,t=e.useState()[0];return t=typeof t.then=="function"?as(t):t,e=e.useState()[0],(tt!==null?tt.memoizedState:null)!==e&&(ze.flags|=1024),t}function go(){var e=gl!==0;return gl=0,e}function vo(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function So(e){if(_l){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_l=!1}jn=0,yt=tt=ze=null,pr=!1,ls=gl=0,mr=null}function Ut(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yt===null?ze.memoizedState=yt=e:yt=yt.next=e,yt}function vt(){if(tt===null){var e=ze.alternate;e=e!==null?e.memoizedState:null}else e=tt.next;var t=yt===null?ze.memoizedState:yt.next;if(t!==null)yt=t,tt=e;else{if(e===null)throw ze.alternate===null?Error(a(467)):Error(a(310));tt=e,e={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},yt===null?ze.memoizedState=yt=e:yt=yt.next=e}return yt}function vl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function as(e){var t=ls;return ls+=1,mr===null&&(mr=[]),e=$h(mr,e,t),t=ze,(yt===null?t.memoizedState:yt.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?jf:Mo),e}function Sl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return as(e);if(e.$$typeof===g)return Lt(e)}throw Error(a(438,String(e)))}function yo(e){var t=null,i=ze.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var r=ze.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(f){return f.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=vl(),ze.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),r=0;r<e;r++)i[r]=j;return t.index++,i}function In(e,t){return typeof t=="function"?t(e):t}function yl(e){var t=vt();return bo(t,tt,e)}function bo(e,t,i){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=i;var f=e.baseQueue,y=r.pending;if(y!==null){if(f!==null){var R=f.next;f.next=y.next,y.next=R}t.baseQueue=f=y,r.pending=null}if(y=e.baseState,f===null)e.memoizedState=y;else{t=f.next;var I=R=null,$=null,te=t,ue=!1;do{var fe=te.lane&-536870913;if(fe!==te.lane?(qe&fe)===fe:(jn&fe)===fe){var ie=te.revertLane;if(ie===0)$!==null&&($=$.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),fe===ur&&(ue=!0);else if((jn&ie)===ie){te=te.next,ie===ur&&(ue=!0);continue}else fe={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},$===null?(I=$=fe,R=y):$=$.next=fe,ze.lanes|=ie,ui|=ie;fe=te.action,Ni&&i(y,fe),y=te.hasEagerState?te.eagerState:i(y,fe)}else ie={lane:fe,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},$===null?(I=$=ie,R=y):$=$.next=ie,ze.lanes|=fe,ui|=fe;te=te.next}while(te!==null&&te!==t);if($===null?R=y:$.next=I,!Qt(y,e.memoizedState)&&(bt=!0,ue&&(i=cr,i!==null)))throw i;e.memoizedState=y,e.baseState=R,e.baseQueue=$,r.lastRenderedState=y}return f===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Co(e){var t=vt(),i=t.queue;if(i===null)throw Error(a(311));i.lastRenderedReducer=e;var r=i.dispatch,f=i.pending,y=t.memoizedState;if(f!==null){i.pending=null;var R=f=f.next;do y=e(y,R.action),R=R.next;while(R!==f);Qt(y,t.memoizedState)||(bt=!0),t.memoizedState=y,t.baseQueue===null&&(t.baseState=y),i.lastRenderedState=y}return[y,r]}function rf(e,t,i){var r=ze,f=vt(),y=Ge;if(y){if(i===void 0)throw Error(a(407));i=i()}else i=t();var R=!Qt((tt||f).memoizedState,i);if(R&&(f.memoizedState=i,bt=!0),f=f.queue,Eo(af.bind(null,r,f,e),[e]),f.getSnapshot!==t||R||yt!==null&&yt.memoizedState.tag&1){if(r.flags|=2048,_r(9,{destroy:void 0},lf.bind(null,r,f,i,t),null),rt===null)throw Error(a(349));y||(jn&127)!==0||sf(r,t,i)}return i}function sf(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=ze.updateQueue,t===null?(t=vl(),ze.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function lf(e,t,i,r){t.value=i,t.getSnapshot=r,of(t)&&uf(e)}function af(e,t,i){return i(function(){of(t)&&uf(e)})}function of(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Qt(e,i)}catch{return!0}}function uf(e){var t=Ti(e,2);t!==null&&Wt(t,e,2)}function wo(e){var t=Ut();if(typeof e=="function"){var i=e;if(e=i(),Ni){Ht(!0);try{i()}finally{Ht(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:In,lastRenderedState:e},t}function cf(e,t,i,r){return e.baseState=i,bo(e,tt,typeof r=="function"?r:In)}function av(e,t,i,r,f){if(wl(e))throw Error(a(485));if(e=t.action,e!==null){var y={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(R){y.listeners.push(R)}};G.T!==null?i(!0):y.isTransition=!1,r(y),i=t.pending,i===null?(y.next=t.pending=y,hf(t,y)):(y.next=i.next,t.pending=i.next=y)}}function hf(e,t){var i=t.action,r=t.payload,f=e.state;if(t.isTransition){var y=G.T,R={};G.T=R;try{var I=i(f,r),$=G.S;$!==null&&$(R,I),ff(e,t,I)}catch(te){xo(e,t,te)}finally{y!==null&&R.types!==null&&(y.types=R.types),G.T=y}}else try{y=i(f,r),ff(e,t,y)}catch(te){xo(e,t,te)}}function ff(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(r){df(e,t,r)},function(r){return xo(e,t,r)}):df(e,t,i)}function df(e,t,i){t.status="fulfilled",t.value=i,pf(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,hf(e,i)))}function xo(e,t,i){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=i,pf(t),t=t.next;while(t!==r)}e.action=null}function pf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function mf(e,t){return t}function _f(e,t){if(Ge){var i=rt.formState;if(i!==null){e:{var r=ze;if(Ge){if(ot){t:{for(var f=ot,y=dn;f.nodeType!==8;){if(!y){f=null;break t}if(f=mn(f.nextSibling),f===null){f=null;break t}}y=f.data,f=y==="F!"||y==="F"?f:null}if(f){ot=mn(f.nextSibling),r=f.data==="F!";break e}}ei(r)}r=!1}r&&(t=i[0])}}return i=Ut(),i.memoizedState=i.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mf,lastRenderedState:t},i.queue=r,i=zf.bind(null,ze,r),r.dispatch=i,r=wo(!1),y=Ro.bind(null,ze,!1,r.queue),r=Ut(),f={state:t,dispatch:null,action:e,pending:null},r.queue=f,i=av.bind(null,ze,f,y,i),f.dispatch=i,r.memoizedState=e,[t,i,!1]}function gf(e){var t=vt();return vf(t,tt,e)}function vf(e,t,i){if(t=bo(e,t,mf)[0],e=yl(In)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=as(t)}catch(R){throw R===hr?cl:R}else r=t;t=vt();var f=t.queue,y=f.dispatch;return i!==t.memoizedState&&(ze.flags|=2048,_r(9,{destroy:void 0},ov.bind(null,f,i),null)),[r,y,e]}function ov(e,t){e.action=t}function Sf(e){var t=vt(),i=tt;if(i!==null)return vf(t,i,e);vt(),t=t.memoizedState,i=vt();var r=i.queue.dispatch;return i.memoizedState=e,[t,r,!1]}function _r(e,t,i,r){return e={tag:e,create:i,deps:r,inst:t,next:null},t=ze.updateQueue,t===null&&(t=vl(),ze.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(r=i.next,i.next=e,e.next=r,t.lastEffect=e),e}function yf(){return vt().memoizedState}function bl(e,t,i,r){var f=Ut();ze.flags|=e,f.memoizedState=_r(1|t,{destroy:void 0},i,r===void 0?null:r)}function Cl(e,t,i,r){var f=vt();r=r===void 0?null:r;var y=f.memoizedState.inst;tt!==null&&r!==null&&mo(r,tt.memoizedState.deps)?f.memoizedState=_r(t,y,i,r):(ze.flags|=e,f.memoizedState=_r(1|t,y,i,r))}function bf(e,t){bl(8390656,8,e,t)}function Eo(e,t){Cl(2048,8,e,t)}function uv(e){ze.flags|=4;var t=ze.updateQueue;if(t===null)t=vl(),ze.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Cf(e){var t=vt().memoizedState;return uv({ref:t,nextImpl:e}),function(){if((Qe&2)!==0)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function wf(e,t){return Cl(4,2,e,t)}function xf(e,t){return Cl(4,4,e,t)}function Ef(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 kf(e,t,i){i=i!=null?i.concat([e]):null,Cl(4,4,Ef.bind(null,t,e),i)}function ko(){}function Af(e,t){var i=vt();t=t===void 0?null:t;var r=i.memoizedState;return t!==null&&mo(t,r[1])?r[0]:(i.memoizedState=[e,t],e)}function Tf(e,t){var i=vt();t=t===void 0?null:t;var r=i.memoizedState;if(t!==null&&mo(t,r[1]))return r[0];if(r=e(),Ni){Ht(!0);try{e()}finally{Ht(!1)}}return i.memoizedState=[r,t],r}function Ao(e,t,i){return i===void 0||(jn&1073741824)!==0&&(qe&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Dd(),ze.lanes|=e,ui|=e,i)}function Df(e,t,i,r){return Qt(i,t)?i:dr.current!==null?(e=Ao(e,i,r),Qt(e,t)||(bt=!0),e):(jn&42)===0||(jn&1073741824)!==0&&(qe&261930)===0?(bt=!0,e.memoizedState=i):(e=Dd(),ze.lanes|=e,ui|=e,t)}function Rf(e,t,i,r,f){var y=J.p;J.p=y!==0&&8>y?y:8;var R=G.T,I={};G.T=I,Ro(e,!1,t,i);try{var $=f(),te=G.S;if(te!==null&&te(I,$),$!==null&&typeof $=="object"&&typeof $.then=="function"){var ue=rv($,r);os(e,t,ue,rn(e))}else os(e,t,r,rn(e))}catch(fe){os(e,t,{then:function(){},status:"rejected",reason:fe},rn())}finally{J.p=y,R!==null&&I.types!==null&&(R.types=I.types),G.T=R}}function cv(){}function To(e,t,i,r){if(e.tag!==5)throw Error(a(476));var f=Mf(e).queue;Rf(e,f,t,re,i===null?cv:function(){return Lf(e),i(r)})}function Mf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:In,lastRenderedState:re},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:In,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Lf(e){var t=Mf(e);t.next===null&&(t=e.alternate.memoizedState),os(e,t.next.queue,{},rn())}function Do(){return Lt(Es)}function Of(){return vt().memoizedState}function Bf(){return vt().memoizedState}function hv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=rn();e=ii(i);var r=ri(t,e,i);r!==null&&(Wt(r,t,i),is(r,t,i)),t={cache:io()},e.payload=t;return}t=t.return}}function fv(e,t,i){var r=rn();i={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},wl(e)?Hf(t,i):(i=$a(e,t,i,r),i!==null&&(Wt(i,e,r),Nf(i,t,r)))}function zf(e,t,i){var r=rn();os(e,t,i,r)}function os(e,t,i,r){var f={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(wl(e))Hf(t,f);else{var y=e.alternate;if(e.lanes===0&&(y===null||y.lanes===0)&&(y=t.lastRenderedReducer,y!==null))try{var R=t.lastRenderedState,I=y(R,i);if(f.hasEagerState=!0,f.eagerState=I,Qt(I,R))return il(e,t,f,0),rt===null&&nl(),!1}catch{}finally{}if(i=$a(e,t,f,r),i!==null)return Wt(i,e,r),Nf(i,t,r),!0}return!1}function Ro(e,t,i,r){if(r={lane:2,revertLane:ou(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},wl(e)){if(t)throw Error(a(479))}else t=$a(e,i,r,2),t!==null&&Wt(t,e,2)}function wl(e){var t=e.alternate;return e===ze||t!==null&&t===ze}function Hf(e,t){pr=_l=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Nf(e,t,i){if((i&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,i|=r,t.lanes=i,Pc(e,i)}}var us={readContext:Lt,use:Sl,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};us.useEffectEvent=ft;var jf={readContext:Lt,use:Sl,useCallback:function(e,t){return Ut().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:bf,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,bl(4194308,4,Ef.bind(null,t,e),i)},useLayoutEffect:function(e,t){return bl(4194308,4,e,t)},useInsertionEffect:function(e,t){bl(4,2,e,t)},useMemo:function(e,t){var i=Ut();t=t===void 0?null:t;var r=e();if(Ni){Ht(!0);try{e()}finally{Ht(!1)}}return i.memoizedState=[r,t],r},useReducer:function(e,t,i){var r=Ut();if(i!==void 0){var f=i(t);if(Ni){Ht(!0);try{i(t)}finally{Ht(!1)}}}else f=t;return r.memoizedState=r.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},r.queue=e,e=e.dispatch=fv.bind(null,ze,e),[r.memoizedState,e]},useRef:function(e){var t=Ut();return e={current:e},t.memoizedState=e},useState:function(e){e=wo(e);var t=e.queue,i=zf.bind(null,ze,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:ko,useDeferredValue:function(e,t){var i=Ut();return Ao(i,e,t)},useTransition:function(){var e=wo(!1);return e=Rf.bind(null,ze,e.queue,!0,!1),Ut().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var r=ze,f=Ut();if(Ge){if(i===void 0)throw Error(a(407));i=i()}else{if(i=t(),rt===null)throw Error(a(349));(qe&127)!==0||sf(r,t,i)}f.memoizedState=i;var y={value:i,getSnapshot:t};return f.queue=y,bf(af.bind(null,r,y,e),[e]),r.flags|=2048,_r(9,{destroy:void 0},lf.bind(null,r,y,i,t),null),i},useId:function(){var e=Ut(),t=rt.identifierPrefix;if(Ge){var i=kn,r=En;i=(r&~(1<<32-Ze(r)-1)).toString(32)+i,t="_"+t+"R_"+i,i=gl++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=sv++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Do,useFormState:_f,useActionState:_f,useOptimistic:function(e){var t=Ut();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Ro.bind(null,ze,!0,i),i.dispatch=t,[e,t]},useMemoCache:yo,useCacheRefresh:function(){return Ut().memoizedState=hv.bind(null,ze)},useEffectEvent:function(e){var t=Ut(),i={impl:e};return t.memoizedState=i,function(){if((Qe&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}},Mo={readContext:Lt,use:Sl,useCallback:Af,useContext:Lt,useEffect:Eo,useImperativeHandle:kf,useInsertionEffect:wf,useLayoutEffect:xf,useMemo:Tf,useReducer:yl,useRef:yf,useState:function(){return yl(In)},useDebugValue:ko,useDeferredValue:function(e,t){var i=vt();return Df(i,tt.memoizedState,e,t)},useTransition:function(){var e=yl(In)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:as(e),t]},useSyncExternalStore:rf,useId:Of,useHostTransitionStatus:Do,useFormState:gf,useActionState:gf,useOptimistic:function(e,t){var i=vt();return cf(i,tt,e,t)},useMemoCache:yo,useCacheRefresh:Bf};Mo.useEffectEvent=Cf;var If={readContext:Lt,use:Sl,useCallback:Af,useContext:Lt,useEffect:Eo,useImperativeHandle:kf,useInsertionEffect:wf,useLayoutEffect:xf,useMemo:Tf,useReducer:Co,useRef:yf,useState:function(){return Co(In)},useDebugValue:ko,useDeferredValue:function(e,t){var i=vt();return tt===null?Ao(i,e,t):Df(i,tt.memoizedState,e,t)},useTransition:function(){var e=Co(In)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:as(e),t]},useSyncExternalStore:rf,useId:Of,useHostTransitionStatus:Do,useFormState:Sf,useActionState:Sf,useOptimistic:function(e,t){var i=vt();return tt!==null?cf(i,tt,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:yo,useCacheRefresh:Bf};If.useEffectEvent=Cf;function Lo(e,t,i,r){t=e.memoizedState,i=i(r,t),i=i==null?t:c({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Oo={enqueueSetState:function(e,t,i){e=e._reactInternals;var r=rn(),f=ii(r);f.payload=t,i!=null&&(f.callback=i),t=ri(e,f,r),t!==null&&(Wt(t,e,r),is(t,e,r))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var r=rn(),f=ii(r);f.tag=1,f.payload=t,i!=null&&(f.callback=i),t=ri(e,f,r),t!==null&&(Wt(t,e,r),is(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=rn(),r=ii(i);r.tag=2,t!=null&&(r.callback=t),t=ri(e,r,i),t!==null&&(Wt(t,e,i),is(t,e,i))}};function Uf(e,t,i,r,f,y,R){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,y,R):t.prototype&&t.prototype.isPureReactComponent?!Kr(i,r)||!Kr(f,y):!0}function Pf(e,t,i,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,r),t.state!==e&&Oo.enqueueReplaceState(t,t.state,null)}function ji(e,t){var i=t;if("ref"in t){i={};for(var r in t)r!=="ref"&&(i[r]=t[r])}if(e=e.defaultProps){i===t&&(i=c({},i));for(var f in e)i[f]===void 0&&(i[f]=e[f])}return i}function Ff(e){tl(e)}function qf(e){console.error(e)}function Vf(e){tl(e)}function xl(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function Gf(e,t,i){try{var r=e.onCaughtError;r(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Bo(e,t,i){return i=ii(i),i.tag=3,i.payload={element:null},i.callback=function(){xl(e,t)},i}function $f(e){return e=ii(e),e.tag=3,e}function Yf(e,t,i,r){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var y=r.value;e.payload=function(){return f(y)},e.callback=function(){Gf(t,i,r)}}var R=i.stateNode;R!==null&&typeof R.componentDidCatch=="function"&&(e.callback=function(){Gf(t,i,r),typeof f!="function"&&(ci===null?ci=new Set([this]):ci.add(this));var I=r.stack;this.componentDidCatch(r.value,{componentStack:I!==null?I:""})})}function dv(e,t,i,r,f){if(i.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=i.alternate,t!==null&&or(t,i,f,!0),i=Jt.current,i!==null){switch(i.tag){case 31:case 13:return pn===null?Hl():i.alternate===null&&dt===0&&(dt=3),i.flags&=-257,i.flags|=65536,i.lanes=f,r===hl?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([r]):t.add(r),su(e,r,f)),!1;case 22:return i.flags|=65536,r===hl?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([r]):i.add(r)),su(e,r,f)),!1}throw Error(a(435,i.tag))}return su(e,r,f),Hl(),!1}if(Ge)return t=Jt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=f,r!==Za&&(e=Error(a(422),{cause:r}),Zr(cn(e,i)))):(r!==Za&&(t=Error(a(423),{cause:r}),Zr(cn(t,i))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,r=cn(r,i),f=Bo(e.stateNode,r,f),uo(e,f),dt!==4&&(dt=2)),!1;var y=Error(a(520),{cause:r});if(y=cn(y,i),gs===null?gs=[y]:gs.push(y),dt!==4&&(dt=2),t===null)return!0;r=cn(r,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=f&-f,i.lanes|=e,e=Bo(i.stateNode,r,e),uo(i,e),!1;case 1:if(t=i.type,y=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(ci===null||!ci.has(y))))return i.flags|=65536,f&=-f,i.lanes|=f,f=$f(f),Yf(f,e,i,r),uo(i,f),!1}i=i.return}while(i!==null);return!1}var zo=Error(a(461)),bt=!1;function Ot(e,t,i,r){t.child=e===null?Xh(t,null,i,r):Hi(t,e.child,i,r)}function Wf(e,t,i,r,f){i=i.render;var y=t.ref;if("ref"in r){var R={};for(var I in r)I!=="ref"&&(R[I]=r[I])}else R=r;return Li(t),r=_o(e,t,i,R,y,f),I=go(),e!==null&&!bt?(vo(e,t,f),Un(e,t,f)):(Ge&&I&&Xa(t),t.flags|=1,Ot(e,t,r,f),t.child)}function Kf(e,t,i,r,f){if(e===null){var y=i.type;return typeof y=="function"&&!Ya(y)&&y.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=y,Xf(e,t,y,r,f)):(e=sl(i.type,null,r,t,t.mode,f),e.ref=t.ref,e.return=t,t.child=e)}if(y=e.child,!qo(e,f)){var R=y.memoizedProps;if(i=i.compare,i=i!==null?i:Kr,i(R,r)&&e.ref===t.ref)return Un(e,t,f)}return t.flags|=1,e=Bn(y,r),e.ref=t.ref,e.return=t,t.child=e}function Xf(e,t,i,r,f){if(e!==null){var y=e.memoizedProps;if(Kr(y,r)&&e.ref===t.ref)if(bt=!1,t.pendingProps=r=y,qo(e,f))(e.flags&131072)!==0&&(bt=!0);else return t.lanes=e.lanes,Un(e,t,f)}return Ho(e,t,i,r,f)}function Qf(e,t,i,r){var f=r.children,y=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(y=y!==null?y.baseLanes|i:i,e!==null){for(r=t.child=e.child,f=0;r!==null;)f=f|r.lanes|r.childLanes,r=r.sibling;r=f&~y}else r=0,t.child=null;return Zf(e,t,y,i,r)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ul(t,y!==null?y.cachePool:null),y!==null?Jh(t,y):ho(),ef(t);else return r=t.lanes=536870912,Zf(e,t,y!==null?y.baseLanes|i:i,i,r)}else y!==null?(ul(t,y.cachePool),Jh(t,y),li(),t.memoizedState=null):(e!==null&&ul(t,null),ho(),li());return Ot(e,t,f,i),t.child}function cs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Zf(e,t,i,r,f){var y=so();return y=y===null?null:{parent:St._currentValue,pool:y},t.memoizedState={baseLanes:i,cachePool:y},e!==null&&ul(t,null),ho(),ef(t),e!==null&&or(e,t,r,!0),t.childLanes=f,null}function El(e,t){return t=Al({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Jf(e,t,i){return Hi(t,e.child,null,i),e=El(t,t.pendingProps),e.flags|=2,en(t),t.memoizedState=null,e}function pv(e,t,i){var r=t.pendingProps,f=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ge){if(r.mode==="hidden")return e=El(t,r),t.lanes=536870912,cs(null,e);if(po(t),(e=ot)?(e=hp(e,dn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zn!==null?{id:En,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},i=zh(e),i.return=t,t.child=i,Mt=t,ot=null)):e=null,e===null)throw ei(t);return t.lanes=536870912,null}return El(t,r)}var y=e.memoizedState;if(y!==null){var R=y.dehydrated;if(po(t),f)if(t.flags&256)t.flags&=-257,t=Jf(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(bt||or(e,t,i,!1),f=(i&e.childLanes)!==0,bt||f){if(r=rt,r!==null&&(R=Fc(r,i),R!==0&&R!==y.retryLane))throw y.retryLane=R,Ti(e,R),Wt(r,e,R),zo;Hl(),t=Jf(e,t,i)}else e=y.treeContext,ot=mn(R.nextSibling),Mt=t,Ge=!0,Jn=null,dn=!1,e!==null&&jh(t,e),t=El(t,r),t.flags|=4096;return t}return e=Bn(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function kl(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(a(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Ho(e,t,i,r,f){return Li(t),i=_o(e,t,i,r,void 0,f),r=go(),e!==null&&!bt?(vo(e,t,f),Un(e,t,f)):(Ge&&r&&Xa(t),t.flags|=1,Ot(e,t,i,f),t.child)}function ed(e,t,i,r,f,y){return Li(t),t.updateQueue=null,i=nf(t,r,i,f),tf(e),r=go(),e!==null&&!bt?(vo(e,t,y),Un(e,t,y)):(Ge&&r&&Xa(t),t.flags|=1,Ot(e,t,i,y),t.child)}function td(e,t,i,r,f){if(Li(t),t.stateNode===null){var y=rr,R=i.contextType;typeof R=="object"&&R!==null&&(y=Lt(R)),y=new i(r,y),t.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Oo,t.stateNode=y,y._reactInternals=t,y=t.stateNode,y.props=r,y.state=t.memoizedState,y.refs={},ao(t),R=i.contextType,y.context=typeof R=="object"&&R!==null?Lt(R):rr,y.state=t.memoizedState,R=i.getDerivedStateFromProps,typeof R=="function"&&(Lo(t,i,R,r),y.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(R=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),R!==y.state&&Oo.enqueueReplaceState(y,y.state,null),ss(t,r,y,f),rs(),y.state=t.memoizedState),typeof y.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){y=t.stateNode;var I=t.memoizedProps,$=ji(i,I);y.props=$;var te=y.context,ue=i.contextType;R=rr,typeof ue=="object"&&ue!==null&&(R=Lt(ue));var fe=i.getDerivedStateFromProps;ue=typeof fe=="function"||typeof y.getSnapshotBeforeUpdate=="function",I=t.pendingProps!==I,ue||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(I||te!==R)&&Pf(t,y,r,R),ni=!1;var ie=t.memoizedState;y.state=ie,ss(t,r,y,f),rs(),te=t.memoizedState,I||ie!==te||ni?(typeof fe=="function"&&(Lo(t,i,fe,r),te=t.memoizedState),($=ni||Uf(t,i,$,r,ie,te,R))?(ue||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(t.flags|=4194308)):(typeof y.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=te),y.props=r,y.state=te,y.context=R,r=$):(typeof y.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{y=t.stateNode,oo(e,t),R=t.memoizedProps,ue=ji(i,R),y.props=ue,fe=t.pendingProps,ie=y.context,te=i.contextType,$=rr,typeof te=="object"&&te!==null&&($=Lt(te)),I=i.getDerivedStateFromProps,(te=typeof I=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(R!==fe||ie!==$)&&Pf(t,y,r,$),ni=!1,ie=t.memoizedState,y.state=ie,ss(t,r,y,f),rs();var le=t.memoizedState;R!==fe||ie!==le||ni||e!==null&&e.dependencies!==null&&al(e.dependencies)?(typeof I=="function"&&(Lo(t,i,I,r),le=t.memoizedState),(ue=ni||Uf(t,i,ue,r,ie,le,$)||e!==null&&e.dependencies!==null&&al(e.dependencies))?(te||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(r,le,$),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(r,le,$)),typeof y.componentDidUpdate=="function"&&(t.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof y.componentDidUpdate!="function"||R===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||R===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=le),y.props=r,y.state=le,y.context=$,r=ue):(typeof y.componentDidUpdate!="function"||R===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||R===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),r=!1)}return y=r,kl(e,t),r=(t.flags&128)!==0,y||r?(y=t.stateNode,i=r&&typeof i.getDerivedStateFromError!="function"?null:y.render(),t.flags|=1,e!==null&&r?(t.child=Hi(t,e.child,null,f),t.child=Hi(t,null,i,f)):Ot(e,t,i,f),t.memoizedState=y.state,e=t.child):e=Un(e,t,f),e}function nd(e,t,i,r){return Ri(),t.flags|=256,Ot(e,t,i,r),t.child}var No={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function jo(e){return{baseLanes:e,cachePool:Vh()}}function Io(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=nn),e}function id(e,t,i){var r=t.pendingProps,f=!1,y=(t.flags&128)!==0,R;if((R=y)||(R=e!==null&&e.memoizedState===null?!1:(gt.current&2)!==0),R&&(f=!0,t.flags&=-129),R=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ge){if(f?si(t):li(),(e=ot)?(e=hp(e,dn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zn!==null?{id:En,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},i=zh(e),i.return=t,t.child=i,Mt=t,ot=null)):e=null,e===null)throw ei(t);return bu(e)?t.lanes=32:t.lanes=536870912,null}var I=r.children;return r=r.fallback,f?(li(),f=t.mode,I=Al({mode:"hidden",children:I},f),r=Di(r,f,i,null),I.return=t,r.return=t,I.sibling=r,t.child=I,r=t.child,r.memoizedState=jo(i),r.childLanes=Io(e,R,i),t.memoizedState=No,cs(null,r)):(si(t),Uo(t,I))}var $=e.memoizedState;if($!==null&&(I=$.dehydrated,I!==null)){if(y)t.flags&256?(si(t),t.flags&=-257,t=Po(e,t,i)):t.memoizedState!==null?(li(),t.child=e.child,t.flags|=128,t=null):(li(),I=r.fallback,f=t.mode,r=Al({mode:"visible",children:r.children},f),I=Di(I,f,i,null),I.flags|=2,r.return=t,I.return=t,r.sibling=I,t.child=r,Hi(t,e.child,null,i),r=t.child,r.memoizedState=jo(i),r.childLanes=Io(e,R,i),t.memoizedState=No,t=cs(null,r));else if(si(t),bu(I)){if(R=I.nextSibling&&I.nextSibling.dataset,R)var te=R.dgst;R=te,r=Error(a(419)),r.stack="",r.digest=R,Zr({value:r,source:null,stack:null}),t=Po(e,t,i)}else if(bt||or(e,t,i,!1),R=(i&e.childLanes)!==0,bt||R){if(R=rt,R!==null&&(r=Fc(R,i),r!==0&&r!==$.retryLane))throw $.retryLane=r,Ti(e,r),Wt(R,e,r),zo;yu(I)||Hl(),t=Po(e,t,i)}else yu(I)?(t.flags|=192,t.child=e.child,t=null):(e=$.treeContext,ot=mn(I.nextSibling),Mt=t,Ge=!0,Jn=null,dn=!1,e!==null&&jh(t,e),t=Uo(t,r.children),t.flags|=4096);return t}return f?(li(),I=r.fallback,f=t.mode,$=e.child,te=$.sibling,r=Bn($,{mode:"hidden",children:r.children}),r.subtreeFlags=$.subtreeFlags&65011712,te!==null?I=Bn(te,I):(I=Di(I,f,i,null),I.flags|=2),I.return=t,r.return=t,r.sibling=I,t.child=r,cs(null,r),r=t.child,I=e.child.memoizedState,I===null?I=jo(i):(f=I.cachePool,f!==null?($=St._currentValue,f=f.parent!==$?{parent:$,pool:$}:f):f=Vh(),I={baseLanes:I.baseLanes|i,cachePool:f}),r.memoizedState=I,r.childLanes=Io(e,R,i),t.memoizedState=No,cs(e.child,r)):(si(t),i=e.child,e=i.sibling,i=Bn(i,{mode:"visible",children:r.children}),i.return=t,i.sibling=null,e!==null&&(R=t.deletions,R===null?(t.deletions=[e],t.flags|=16):R.push(e)),t.child=i,t.memoizedState=null,i)}function Uo(e,t){return t=Al({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Al(e,t){return e=Zt(22,e,null,t),e.lanes=0,e}function Po(e,t,i){return Hi(t,e.child,null,i),e=Uo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function rd(e,t,i){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),to(e.return,t,i)}function Fo(e,t,i,r,f,y){var R=e.memoizedState;R===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:i,tailMode:f,treeForkCount:y}:(R.isBackwards=t,R.rendering=null,R.renderingStartTime=0,R.last=r,R.tail=i,R.tailMode=f,R.treeForkCount=y)}function sd(e,t,i){var r=t.pendingProps,f=r.revealOrder,y=r.tail;r=r.children;var R=gt.current,I=(R&2)!==0;if(I?(R=R&1|2,t.flags|=128):R&=1,z(gt,R),Ot(e,t,r,i),r=Ge?Qr:0,!I&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rd(e,i,t);else if(e.tag===19)rd(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(f){case"forwards":for(i=t.child,f=null;i!==null;)e=i.alternate,e!==null&&ml(e)===null&&(f=i),i=i.sibling;i=f,i===null?(f=t.child,t.child=null):(f=i.sibling,i.sibling=null),Fo(t,!1,f,i,y,r);break;case"backwards":case"unstable_legacy-backwards":for(i=null,f=t.child,t.child=null;f!==null;){if(e=f.alternate,e!==null&&ml(e)===null){t.child=f;break}e=f.sibling,f.sibling=i,i=f,f=e}Fo(t,!0,i,null,y,r);break;case"together":Fo(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Un(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),ui|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(or(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,i=Bn(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Bn(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function qo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&al(e)))}function mv(e,t,i){switch(t.tag){case 3:P(t,t.stateNode.containerInfo),ti(t,St,e.memoizedState.cache),Ri();break;case 27:case 5:ne(t);break;case 4:P(t,t.stateNode.containerInfo);break;case 10:ti(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,po(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(si(t),t.flags|=128,null):(i&t.child.childLanes)!==0?id(e,t,i):(si(t),e=Un(e,t,i),e!==null?e.sibling:null);si(t);break;case 19:var f=(e.flags&128)!==0;if(r=(i&t.childLanes)!==0,r||(or(e,t,i,!1),r=(i&t.childLanes)!==0),f){if(r)return sd(e,t,i);t.flags|=128}if(f=t.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),z(gt,gt.current),r)break;return null;case 22:return t.lanes=0,Qf(e,t,i,t.pendingProps);case 24:ti(t,St,e.memoizedState.cache)}return Un(e,t,i)}function ld(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)bt=!0;else{if(!qo(e,i)&&(t.flags&128)===0)return bt=!1,mv(e,t,i);bt=(e.flags&131072)!==0}else bt=!1,Ge&&(t.flags&1048576)!==0&&Nh(t,Qr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Bi(t.elementType),t.type=e,typeof e=="function")Ya(e)?(r=ji(e,r),t.tag=1,t=td(null,t,e,r,i)):(t.tag=0,t=Ho(null,t,e,r,i));else{if(e!=null){var f=e.$$typeof;if(f===E){t.tag=11,t=Wf(null,t,e,r,i);break e}else if(f===O){t.tag=14,t=Kf(null,t,e,r,i);break e}}throw t=W(e)||e,Error(a(306,t,""))}}return t;case 0:return Ho(e,t,t.type,t.pendingProps,i);case 1:return r=t.type,f=ji(r,t.pendingProps),td(e,t,r,f,i);case 3:e:{if(P(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var y=t.memoizedState;f=y.element,oo(e,t),ss(t,r,null,i);var R=t.memoizedState;if(r=R.cache,ti(t,St,r),r!==y.cache&&no(t,[St],i,!0),rs(),r=R.element,y.isDehydrated)if(y={element:r,isDehydrated:!1,cache:R.cache},t.updateQueue.baseState=y,t.memoizedState=y,t.flags&256){t=nd(e,t,r,i);break e}else if(r!==f){f=cn(Error(a(424)),t),Zr(f),t=nd(e,t,r,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ot=mn(e.firstChild),Mt=t,Ge=!0,Jn=null,dn=!0,i=Xh(t,null,r,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Ri(),r===f){t=Un(e,t,i);break e}Ot(e,t,r,i)}t=t.child}return t;case 26:return kl(e,t),e===null?(i=gp(t.type,null,t.pendingProps,null))?t.memoizedState=i:Ge||(i=t.type,e=t.pendingProps,r=ql(me.current).createElement(i),r[Rt]=t,r[Ft]=e,Bt(r,i,e),kt(r),t.stateNode=r):t.memoizedState=gp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ne(t),e===null&&Ge&&(r=t.stateNode=pp(t.type,t.pendingProps,me.current),Mt=t,dn=!0,f=ot,pi(t.type)?(Cu=f,ot=mn(r.firstChild)):ot=f),Ot(e,t,t.pendingProps.children,i),kl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ge&&((f=r=ot)&&(r=Gv(r,t.type,t.pendingProps,dn),r!==null?(t.stateNode=r,Mt=t,ot=mn(r.firstChild),dn=!1,f=!0):f=!1),f||ei(t)),ne(t),f=t.type,y=t.pendingProps,R=e!==null?e.memoizedProps:null,r=y.children,gu(f,y)?r=null:R!==null&&gu(f,R)&&(t.flags|=32),t.memoizedState!==null&&(f=_o(e,t,lv,null,null,i),Es._currentValue=f),kl(e,t),Ot(e,t,r,i),t.child;case 6:return e===null&&Ge&&((e=i=ot)&&(i=$v(i,t.pendingProps,dn),i!==null?(t.stateNode=i,Mt=t,ot=null,e=!0):e=!1),e||ei(t)),null;case 13:return id(e,t,i);case 4:return P(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Hi(t,null,r,i):Ot(e,t,r,i),t.child;case 11:return Wf(e,t,t.type,t.pendingProps,i);case 7:return Ot(e,t,t.pendingProps,i),t.child;case 8:return Ot(e,t,t.pendingProps.children,i),t.child;case 12:return Ot(e,t,t.pendingProps.children,i),t.child;case 10:return r=t.pendingProps,ti(t,t.type,r.value),Ot(e,t,r.children,i),t.child;case 9:return f=t.type._context,r=t.pendingProps.children,Li(t),f=Lt(f),r=r(f),t.flags|=1,Ot(e,t,r,i),t.child;case 14:return Kf(e,t,t.type,t.pendingProps,i);case 15:return Xf(e,t,t.type,t.pendingProps,i);case 19:return sd(e,t,i);case 31:return pv(e,t,i);case 22:return Qf(e,t,i,t.pendingProps);case 24:return Li(t),r=Lt(St),e===null?(f=so(),f===null&&(f=rt,y=io(),f.pooledCache=y,y.refCount++,y!==null&&(f.pooledCacheLanes|=i),f=y),t.memoizedState={parent:r,cache:f},ao(t),ti(t,St,f)):((e.lanes&i)!==0&&(oo(e,t),ss(t,null,null,i),rs()),f=e.memoizedState,y=t.memoizedState,f.parent!==r?(f={parent:r,cache:r},t.memoizedState=f,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=f),ti(t,St,r)):(r=y.cache,ti(t,St,r),r!==f.cache&&no(t,[St],i,!0))),Ot(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function Pn(e){e.flags|=4}function Vo(e,t,i,r,f){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(Od())e.flags|=8192;else throw zi=hl,lo}else e.flags&=-16777217}function ad(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Cp(t))if(Od())e.flags|=8192;else throw zi=hl,lo}function Tl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ic():536870912,e.lanes|=t,yr|=t)}function hs(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 r=null;i!==null;)i.alternate!==null&&(r=i),i=i.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ut(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,r=0;if(t)for(var f=e.child;f!==null;)i|=f.lanes|f.childLanes,r|=f.subtreeFlags&65011712,r|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)i|=f.lanes|f.childLanes,r|=f.subtreeFlags,r|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=r,e.childLanes=i,t}function _v(e,t,i){var r=t.pendingProps;switch(Qa(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(t),null;case 1:return ut(t),null;case 3:return i=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Nn(St),ae(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(ar(t)?Pn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ja())),ut(t),null;case 26:var f=t.type,y=t.memoizedState;return e===null?(Pn(t),y!==null?(ut(t),ad(t,y)):(ut(t),Vo(t,f,null,r,i))):y?y!==e.memoizedState?(Pn(t),ut(t),ad(t,y)):(ut(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Pn(t),ut(t),Vo(t,f,e,r,i)),null;case 27:if(ge(t),i=me.current,f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Pn(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return ut(t),null}e=Z.current,ar(t)?Ih(t):(e=pp(f,r,i),t.stateNode=e,Pn(t))}return ut(t),null;case 5:if(ge(t),f=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Pn(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return ut(t),null}if(y=Z.current,ar(t))Ih(t);else{var R=ql(me.current);switch(y){case 1:y=R.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:y=R.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":y=R.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":y=R.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":y=R.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof r.is=="string"?R.createElement("select",{is:r.is}):R.createElement("select"),r.multiple?y.multiple=!0:r.size&&(y.size=r.size);break;default:y=typeof r.is=="string"?R.createElement(f,{is:r.is}):R.createElement(f)}}y[Rt]=t,y[Ft]=r;e:for(R=t.child;R!==null;){if(R.tag===5||R.tag===6)y.appendChild(R.stateNode);else if(R.tag!==4&&R.tag!==27&&R.child!==null){R.child.return=R,R=R.child;continue}if(R===t)break e;for(;R.sibling===null;){if(R.return===null||R.return===t)break e;R=R.return}R.sibling.return=R.return,R=R.sibling}t.stateNode=y;e:switch(Bt(y,f,r),f){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Pn(t)}}return ut(t),Vo(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Pn(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(a(166));if(e=me.current,ar(t)){if(e=t.stateNode,i=t.memoizedProps,r=null,f=Mt,f!==null)switch(f.tag){case 27:case 5:r=f.memoizedProps}e[Rt]=t,e=!!(e.nodeValue===i||r!==null&&r.suppressHydrationWarning===!0||ip(e.nodeValue,i)),e||ei(t,!0)}else e=ql(e).createTextNode(r),e[Rt]=t,t.stateNode=e}return ut(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(r=ar(t),i!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(557));e[Rt]=t}else Ri(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),e=!1}else i=Ja(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(en(t),t):(en(t),null);if((t.flags&128)!==0)throw Error(a(558))}return ut(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=ar(t),r!==null&&r.dehydrated!==null){if(e===null){if(!f)throw Error(a(318));if(f=t.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(317));f[Rt]=t}else Ri(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),f=!1}else f=Ja(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return t.flags&256?(en(t),t):(en(t),null)}return en(t),(t.flags&128)!==0?(t.lanes=i,t):(i=r!==null,e=e!==null&&e.memoizedState!==null,i&&(r=t.child,f=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(f=r.alternate.memoizedState.cachePool.pool),y=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(y=r.memoizedState.cachePool.pool),y!==f&&(r.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Tl(t,t.updateQueue),ut(t),null);case 4:return ae(),e===null&&fu(t.stateNode.containerInfo),ut(t),null;case 10:return Nn(t.type),ut(t),null;case 19:if(U(gt),r=t.memoizedState,r===null)return ut(t),null;if(f=(t.flags&128)!==0,y=r.rendering,y===null)if(f)hs(r,!1);else{if(dt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(y=ml(e),y!==null){for(t.flags|=128,hs(r,!1),e=y.updateQueue,t.updateQueue=e,Tl(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Bh(i,e),i=i.sibling;return z(gt,gt.current&1|2),Ge&&zn(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ht()>Ol&&(t.flags|=128,f=!0,hs(r,!1),t.lanes=4194304)}else{if(!f)if(e=ml(y),e!==null){if(t.flags|=128,f=!0,e=e.updateQueue,t.updateQueue=e,Tl(t,e),hs(r,!0),r.tail===null&&r.tailMode==="hidden"&&!y.alternate&&!Ge)return ut(t),null}else 2*ht()-r.renderingStartTime>Ol&&i!==536870912&&(t.flags|=128,f=!0,hs(r,!1),t.lanes=4194304);r.isBackwards?(y.sibling=t.child,t.child=y):(e=r.last,e!==null?e.sibling=y:t.child=y,r.last=y)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ht(),e.sibling=null,i=gt.current,z(gt,f?i&1|2:i&1),Ge&&zn(t,r.treeForkCount),e):(ut(t),null);case 22:case 23:return en(t),fo(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(i&536870912)!==0&&(t.flags&128)===0&&(ut(t),t.subtreeFlags&6&&(t.flags|=8192)):ut(t),i=t.updateQueue,i!==null&&Tl(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==i&&(t.flags|=2048),e!==null&&U(Oi),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Nn(St),ut(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function gv(e,t){switch(Qa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Nn(St),ae(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ge(t),null;case 31:if(t.memoizedState!==null){if(en(t),t.alternate===null)throw Error(a(340));Ri()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(en(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Ri()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(gt),null;case 4:return ae(),null;case 10:return Nn(t.type),null;case 22:case 23:return en(t),fo(),e!==null&&U(Oi),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Nn(St),null;case 25:return null;default:return null}}function od(e,t){switch(Qa(t),t.tag){case 3:Nn(St),ae();break;case 26:case 27:case 5:ge(t);break;case 4:ae();break;case 31:t.memoizedState!==null&&en(t);break;case 13:en(t);break;case 19:U(gt);break;case 10:Nn(t.type);break;case 22:case 23:en(t),fo(),e!==null&&U(Oi);break;case 24:Nn(St)}}function fs(e,t){try{var i=t.updateQueue,r=i!==null?i.lastEffect:null;if(r!==null){var f=r.next;i=f;do{if((i.tag&e)===e){r=void 0;var y=i.create,R=i.inst;r=y(),R.destroy=r}i=i.next}while(i!==f)}}catch(I){et(t,t.return,I)}}function ai(e,t,i){try{var r=t.updateQueue,f=r!==null?r.lastEffect:null;if(f!==null){var y=f.next;r=y;do{if((r.tag&e)===e){var R=r.inst,I=R.destroy;if(I!==void 0){R.destroy=void 0,f=t;var $=i,te=I;try{te()}catch(ue){et(f,$,ue)}}}r=r.next}while(r!==y)}}catch(ue){et(t,t.return,ue)}}function ud(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Zh(t,i)}catch(r){et(e,e.return,r)}}}function cd(e,t,i){i.props=ji(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(r){et(e,t,r)}}function ds(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof i=="function"?e.refCleanup=i(r):i.current=r}}catch(f){et(e,t,f)}}function An(e,t){var i=e.ref,r=e.refCleanup;if(i!==null)if(typeof r=="function")try{r()}catch(f){et(e,t,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){et(e,t,f)}else i.current=null}function hd(e){var t=e.type,i=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&r.focus();break e;case"img":i.src?r.src=i.src:i.srcSet&&(r.srcset=i.srcSet)}}catch(f){et(e,e.return,f)}}function Go(e,t,i){try{var r=e.stateNode;Iv(r,e.type,i,t),r[Ft]=t}catch(f){et(e,e.return,f)}}function fd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&pi(e.type)||e.tag===4}function $o(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fd(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&&pi(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 Yo(e,t,i){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Ln));else if(r!==4&&(r===27&&pi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Yo(e,t,i),e=e.sibling;e!==null;)Yo(e,t,i),e=e.sibling}function Dl(e,t,i){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(r!==4&&(r===27&&pi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Dl(e,t,i),e=e.sibling;e!==null;)Dl(e,t,i),e=e.sibling}function dd(e){var t=e.stateNode,i=e.memoizedProps;try{for(var r=e.type,f=t.attributes;f.length;)t.removeAttributeNode(f[0]);Bt(t,r,i),t[Rt]=e,t[Ft]=i}catch(y){et(e,e.return,y)}}var Fn=!1,Ct=!1,Wo=!1,pd=typeof WeakSet=="function"?WeakSet:Set,At=null;function vv(e,t){if(e=e.containerInfo,mu=Xl,e=Eh(e),Ua(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var r=i.getSelection&&i.getSelection();if(r&&r.rangeCount!==0){i=r.anchorNode;var f=r.anchorOffset,y=r.focusNode;r=r.focusOffset;try{i.nodeType,y.nodeType}catch{i=null;break e}var R=0,I=-1,$=-1,te=0,ue=0,fe=e,ie=null;t:for(;;){for(var le;fe!==i||f!==0&&fe.nodeType!==3||(I=R+f),fe!==y||r!==0&&fe.nodeType!==3||($=R+r),fe.nodeType===3&&(R+=fe.nodeValue.length),(le=fe.firstChild)!==null;)ie=fe,fe=le;for(;;){if(fe===e)break t;if(ie===i&&++te===f&&(I=R),ie===y&&++ue===r&&($=R),(le=fe.nextSibling)!==null)break;fe=ie,ie=fe.parentNode}fe=le}i=I===-1||$===-1?null:{start:I,end:$}}else i=null}i=i||{start:0,end:0}}else i=null;for(_u={focusedElem:e,selectionRange:i},Xl=!1,At=t;At!==null;)if(t=At,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,At=e;else for(;At!==null;){switch(t=At,y=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++)f=e[i],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&y!==null){e=void 0,i=t,f=y.memoizedProps,y=y.memoizedState,r=i.stateNode;try{var be=ji(i.type,f);e=r.getSnapshotBeforeUpdate(be,y),r.__reactInternalSnapshotBeforeUpdate=e}catch(De){et(i,i.return,De)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Su(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Su(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(a(163))}if(e=t.sibling,e!==null){e.return=t.return,At=e;break}At=t.return}}function md(e,t,i){var r=i.flags;switch(i.tag){case 0:case 11:case 15:Vn(e,i),r&4&&fs(5,i);break;case 1:if(Vn(e,i),r&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(R){et(i,i.return,R)}else{var f=ji(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(f,t,e.__reactInternalSnapshotBeforeUpdate)}catch(R){et(i,i.return,R)}}r&64&&ud(i),r&512&&ds(i,i.return);break;case 3:if(Vn(e,i),r&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{Zh(e,t)}catch(R){et(i,i.return,R)}}break;case 27:t===null&&r&4&&dd(i);case 26:case 5:Vn(e,i),t===null&&r&4&&hd(i),r&512&&ds(i,i.return);break;case 12:Vn(e,i);break;case 31:Vn(e,i),r&4&&vd(e,i);break;case 13:Vn(e,i),r&4&&Sd(e,i),r&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Av.bind(null,i),Yv(e,i))));break;case 22:if(r=i.memoizedState!==null||Fn,!r){t=t!==null&&t.memoizedState!==null||Ct,f=Fn;var y=Ct;Fn=r,(Ct=t)&&!y?Gn(e,i,(i.subtreeFlags&8772)!==0):Vn(e,i),Fn=f,Ct=y}break;case 30:break;default:Vn(e,i)}}function _d(e){var t=e.alternate;t!==null&&(e.alternate=null,_d(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&wa(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 ct=null,Vt=!1;function qn(e,t,i){for(i=i.child;i!==null;)gd(e,t,i),i=i.sibling}function gd(e,t,i){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(We,i)}catch{}switch(i.tag){case 26:Ct||An(i,t),qn(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Ct||An(i,t);var r=ct,f=Vt;pi(i.type)&&(ct=i.stateNode,Vt=!1),qn(e,t,i),Cs(i.stateNode),ct=r,Vt=f;break;case 5:Ct||An(i,t);case 6:if(r=ct,f=Vt,ct=null,qn(e,t,i),ct=r,Vt=f,ct!==null)if(Vt)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(i.stateNode)}catch(y){et(i,t,y)}else try{ct.removeChild(i.stateNode)}catch(y){et(i,t,y)}break;case 18:ct!==null&&(Vt?(e=ct,up(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Tr(e)):up(ct,i.stateNode));break;case 4:r=ct,f=Vt,ct=i.stateNode.containerInfo,Vt=!0,qn(e,t,i),ct=r,Vt=f;break;case 0:case 11:case 14:case 15:ai(2,i,t),Ct||ai(4,i,t),qn(e,t,i);break;case 1:Ct||(An(i,t),r=i.stateNode,typeof r.componentWillUnmount=="function"&&cd(i,t,r)),qn(e,t,i);break;case 21:qn(e,t,i);break;case 22:Ct=(r=Ct)||i.memoizedState!==null,qn(e,t,i),Ct=r;break;default:qn(e,t,i)}}function vd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Tr(e)}catch(i){et(t,t.return,i)}}}function Sd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Tr(e)}catch(i){et(t,t.return,i)}}function Sv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new pd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new pd),t;default:throw Error(a(435,e.tag))}}function Rl(e,t){var i=Sv(e);t.forEach(function(r){if(!i.has(r)){i.add(r);var f=Tv.bind(null,e,r);r.then(f,f)}})}function Gt(e,t){var i=t.deletions;if(i!==null)for(var r=0;r<i.length;r++){var f=i[r],y=e,R=t,I=R;e:for(;I!==null;){switch(I.tag){case 27:if(pi(I.type)){ct=I.stateNode,Vt=!1;break e}break;case 5:ct=I.stateNode,Vt=!1;break e;case 3:case 4:ct=I.stateNode.containerInfo,Vt=!0;break e}I=I.return}if(ct===null)throw Error(a(160));gd(y,R,f),ct=null,Vt=!1,y=f.alternate,y!==null&&(y.return=null),f.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yd(t,e),t=t.sibling}var yn=null;function yd(e,t){var i=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Gt(t,e),$t(e),r&4&&(ai(3,e,e.return),fs(3,e),ai(5,e,e.return));break;case 1:Gt(t,e),$t(e),r&512&&(Ct||i===null||An(i,i.return)),r&64&&Fn&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?r:i.concat(r))));break;case 26:var f=yn;if(Gt(t,e),$t(e),r&512&&(Ct||i===null||An(i,i.return)),r&4){var y=i!==null?i.memoizedState:null;if(r=e.memoizedState,i===null)if(r===null)if(e.stateNode===null){e:{r=e.type,i=e.memoizedProps,f=f.ownerDocument||f;t:switch(r){case"title":y=f.getElementsByTagName("title")[0],(!y||y[Ur]||y[Rt]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=f.createElement(r),f.head.insertBefore(y,f.querySelector("head > title"))),Bt(y,r,i),y[Rt]=e,kt(y),r=y;break e;case"link":var R=yp("link","href",f).get(r+(i.href||""));if(R){for(var I=0;I<R.length;I++)if(y=R[I],y.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&y.getAttribute("rel")===(i.rel==null?null:i.rel)&&y.getAttribute("title")===(i.title==null?null:i.title)&&y.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){R.splice(I,1);break t}}y=f.createElement(r),Bt(y,r,i),f.head.appendChild(y);break;case"meta":if(R=yp("meta","content",f).get(r+(i.content||""))){for(I=0;I<R.length;I++)if(y=R[I],y.getAttribute("content")===(i.content==null?null:""+i.content)&&y.getAttribute("name")===(i.name==null?null:i.name)&&y.getAttribute("property")===(i.property==null?null:i.property)&&y.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&y.getAttribute("charset")===(i.charSet==null?null:i.charSet)){R.splice(I,1);break t}}y=f.createElement(r),Bt(y,r,i),f.head.appendChild(y);break;default:throw Error(a(468,r))}y[Rt]=e,kt(y),r=y}e.stateNode=r}else bp(f,e.type,e.stateNode);else e.stateNode=Sp(f,r,e.memoizedProps);else y!==r?(y===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):y.count--,r===null?bp(f,e.type,e.stateNode):Sp(f,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Go(e,e.memoizedProps,i.memoizedProps)}break;case 27:Gt(t,e),$t(e),r&512&&(Ct||i===null||An(i,i.return)),i!==null&&r&4&&Go(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Gt(t,e),$t(e),r&512&&(Ct||i===null||An(i,i.return)),e.flags&32){f=e.stateNode;try{Qi(f,"")}catch(be){et(e,e.return,be)}}r&4&&e.stateNode!=null&&(f=e.memoizedProps,Go(e,f,i!==null?i.memoizedProps:f)),r&1024&&(Wo=!0);break;case 6:if(Gt(t,e),$t(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,i=e.stateNode;try{i.nodeValue=r}catch(be){et(e,e.return,be)}}break;case 3:if($l=null,f=yn,yn=Vl(t.containerInfo),Gt(t,e),yn=f,$t(e),r&4&&i!==null&&i.memoizedState.isDehydrated)try{Tr(t.containerInfo)}catch(be){et(e,e.return,be)}Wo&&(Wo=!1,bd(e));break;case 4:r=yn,yn=Vl(e.stateNode.containerInfo),Gt(t,e),$t(e),yn=r;break;case 12:Gt(t,e),$t(e);break;case 31:Gt(t,e),$t(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Rl(e,r)));break;case 13:Gt(t,e),$t(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Ll=ht()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Rl(e,r)));break;case 22:f=e.memoizedState!==null;var $=i!==null&&i.memoizedState!==null,te=Fn,ue=Ct;if(Fn=te||f,Ct=ue||$,Gt(t,e),Ct=ue,Fn=te,$t(e),r&8192)e:for(t=e.stateNode,t._visibility=f?t._visibility&-2:t._visibility|1,f&&(i===null||$||Fn||Ct||Ii(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){$=i=t;try{if(y=$.stateNode,f)R=y.style,typeof R.setProperty=="function"?R.setProperty("display","none","important"):R.display="none";else{I=$.stateNode;var fe=$.memoizedProps.style,ie=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;I.style.display=ie==null||typeof ie=="boolean"?"":(""+ie).trim()}}catch(be){et($,$.return,be)}}}else if(t.tag===6){if(i===null){$=t;try{$.stateNode.nodeValue=f?"":$.memoizedProps}catch(be){et($,$.return,be)}}}else if(t.tag===18){if(i===null){$=t;try{var le=$.stateNode;f?cp(le,!0):cp($.stateNode,!1)}catch(be){et($,$.return,be)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(i=r.retryQueue,i!==null&&(r.retryQueue=null,Rl(e,i))));break;case 19:Gt(t,e),$t(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Rl(e,r)));break;case 30:break;case 21:break;default:Gt(t,e),$t(e)}}function $t(e){var t=e.flags;if(t&2){try{for(var i,r=e.return;r!==null;){if(fd(r)){i=r;break}r=r.return}if(i==null)throw Error(a(160));switch(i.tag){case 27:var f=i.stateNode,y=$o(e);Dl(e,y,f);break;case 5:var R=i.stateNode;i.flags&32&&(Qi(R,""),i.flags&=-33);var I=$o(e);Dl(e,I,R);break;case 3:case 4:var $=i.stateNode.containerInfo,te=$o(e);Yo(e,te,$);break;default:throw Error(a(161))}}catch(ue){et(e,e.return,ue)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;bd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Vn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)md(e,t.alternate,t),t=t.sibling}function Ii(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ai(4,t,t.return),Ii(t);break;case 1:An(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&cd(t,t.return,i),Ii(t);break;case 27:Cs(t.stateNode);case 26:case 5:An(t,t.return),Ii(t);break;case 22:t.memoizedState===null&&Ii(t);break;case 30:Ii(t);break;default:Ii(t)}e=e.sibling}}function Gn(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,f=e,y=t,R=y.flags;switch(y.tag){case 0:case 11:case 15:Gn(f,y,i),fs(4,y);break;case 1:if(Gn(f,y,i),r=y,f=r.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(te){et(r,r.return,te)}if(r=y,f=r.updateQueue,f!==null){var I=r.stateNode;try{var $=f.shared.hiddenCallbacks;if($!==null)for(f.shared.hiddenCallbacks=null,f=0;f<$.length;f++)Qh($[f],I)}catch(te){et(r,r.return,te)}}i&&R&64&&ud(y),ds(y,y.return);break;case 27:dd(y);case 26:case 5:Gn(f,y,i),i&&r===null&&R&4&&hd(y),ds(y,y.return);break;case 12:Gn(f,y,i);break;case 31:Gn(f,y,i),i&&R&4&&vd(f,y);break;case 13:Gn(f,y,i),i&&R&4&&Sd(f,y);break;case 22:y.memoizedState===null&&Gn(f,y,i),ds(y,y.return);break;case 30:break;default:Gn(f,y,i)}t=t.sibling}}function Ko(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&&Jr(i))}function Xo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Jr(e))}function bn(e,t,i,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cd(e,t,i,r),t=t.sibling}function Cd(e,t,i,r){var f=t.flags;switch(t.tag){case 0:case 11:case 15:bn(e,t,i,r),f&2048&&fs(9,t);break;case 1:bn(e,t,i,r);break;case 3:bn(e,t,i,r),f&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Jr(e)));break;case 12:if(f&2048){bn(e,t,i,r),e=t.stateNode;try{var y=t.memoizedProps,R=y.id,I=y.onPostCommit;typeof I=="function"&&I(R,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch($){et(t,t.return,$)}}else bn(e,t,i,r);break;case 31:bn(e,t,i,r);break;case 13:bn(e,t,i,r);break;case 23:break;case 22:y=t.stateNode,R=t.alternate,t.memoizedState!==null?y._visibility&2?bn(e,t,i,r):ps(e,t):y._visibility&2?bn(e,t,i,r):(y._visibility|=2,gr(e,t,i,r,(t.subtreeFlags&10256)!==0||!1)),f&2048&&Ko(R,t);break;case 24:bn(e,t,i,r),f&2048&&Xo(t.alternate,t);break;default:bn(e,t,i,r)}}function gr(e,t,i,r,f){for(f=f&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var y=e,R=t,I=i,$=r,te=R.flags;switch(R.tag){case 0:case 11:case 15:gr(y,R,I,$,f),fs(8,R);break;case 23:break;case 22:var ue=R.stateNode;R.memoizedState!==null?ue._visibility&2?gr(y,R,I,$,f):ps(y,R):(ue._visibility|=2,gr(y,R,I,$,f)),f&&te&2048&&Ko(R.alternate,R);break;case 24:gr(y,R,I,$,f),f&&te&2048&&Xo(R.alternate,R);break;default:gr(y,R,I,$,f)}t=t.sibling}}function ps(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,r=t,f=r.flags;switch(r.tag){case 22:ps(i,r),f&2048&&Ko(r.alternate,r);break;case 24:ps(i,r),f&2048&&Xo(r.alternate,r);break;default:ps(i,r)}t=t.sibling}}var ms=8192;function vr(e,t,i){if(e.subtreeFlags&ms)for(e=e.child;e!==null;)wd(e,t,i),e=e.sibling}function wd(e,t,i){switch(e.tag){case 26:vr(e,t,i),e.flags&ms&&e.memoizedState!==null&&s0(i,yn,e.memoizedState,e.memoizedProps);break;case 5:vr(e,t,i);break;case 3:case 4:var r=yn;yn=Vl(e.stateNode.containerInfo),vr(e,t,i),yn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=ms,ms=16777216,vr(e,t,i),ms=r):vr(e,t,i));break;default:vr(e,t,i)}}function xd(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 _s(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var r=t[i];At=r,kd(r,e)}xd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ed(e),e=e.sibling}function Ed(e){switch(e.tag){case 0:case 11:case 15:_s(e),e.flags&2048&&ai(9,e,e.return);break;case 3:_s(e);break;case 12:_s(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ml(e)):_s(e);break;default:_s(e)}}function Ml(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var r=t[i];At=r,kd(r,e)}xd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ai(8,t,t.return),Ml(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Ml(t));break;default:Ml(t)}e=e.sibling}}function kd(e,t){for(;At!==null;){var i=At;switch(i.tag){case 0:case 11:case 15:ai(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var r=i.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Jr(i.memoizedState.cache)}if(r=i.child,r!==null)r.return=i,At=r;else e:for(i=e;At!==null;){r=At;var f=r.sibling,y=r.return;if(_d(r),r===i){At=null;break e}if(f!==null){f.return=y,At=f;break e}At=y}}}var yv={getCacheForType:function(e){var t=Lt(St),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Lt(St).controller.signal}},bv=typeof WeakMap=="function"?WeakMap:Map,Qe=0,rt=null,Ue=null,qe=0,Je=0,tn=null,oi=!1,Sr=!1,Qo=!1,$n=0,dt=0,ui=0,Ui=0,Zo=0,nn=0,yr=0,gs=null,Yt=null,Jo=!1,Ll=0,Ad=0,Ol=1/0,Bl=null,ci=null,xt=0,hi=null,br=null,Yn=0,eu=0,tu=null,Td=null,vs=0,nu=null;function rn(){return(Qe&2)!==0&&qe!==0?qe&-qe:G.T!==null?ou():qc()}function Dd(){if(nn===0)if((qe&536870912)===0||Ge){var e=vn;vn<<=1,(vn&3932160)===0&&(vn=262144),nn=e}else nn=536870912;return e=Jt.current,e!==null&&(e.flags|=32),nn}function Wt(e,t,i){(e===rt&&(Je===2||Je===9)||e.cancelPendingCommit!==null)&&(Cr(e,0),fi(e,qe,nn,!1)),Ir(e,i),((Qe&2)===0||e!==rt)&&(e===rt&&((Qe&2)===0&&(Ui|=i),dt===4&&fi(e,qe,nn,!1)),Tn(e))}function Rd(e,t,i){if((Qe&6)!==0)throw Error(a(327));var r=!i&&(t&127)===0&&(t&e.expiredLanes)===0||jr(e,t),f=r?xv(e,t):ru(e,t,!0),y=r;do{if(f===0){Sr&&!r&&fi(e,t,0,!1);break}else{if(i=e.current.alternate,y&&!Cv(i)){f=ru(e,t,!1),y=!1;continue}if(f===2){if(y=t,e.errorRecoveryDisabledLanes&y)var R=0;else R=e.pendingLanes&-536870913,R=R!==0?R:R&536870912?536870912:0;if(R!==0){t=R;e:{var I=e;f=gs;var $=I.current.memoizedState.isDehydrated;if($&&(Cr(I,R).flags|=256),R=ru(I,R,!1),R!==2){if(Qo&&!$){I.errorRecoveryDisabledLanes|=y,Ui|=y,f=4;break e}y=Yt,Yt=f,y!==null&&(Yt===null?Yt=y:Yt.push.apply(Yt,y))}f=R}if(y=!1,f!==2)continue}}if(f===1){Cr(e,0),fi(e,t,0,!0);break}e:{switch(r=e,y=f,y){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:fi(r,t,nn,!oi);break e;case 2:Yt=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(f=Ll+300-ht(),10<f)){if(fi(r,t,nn,!oi),Vs(r,0,!0)!==0)break e;Yn=t,r.timeoutHandle=ap(Md.bind(null,r,i,Yt,Bl,Jo,t,nn,Ui,yr,oi,y,"Throttled",-0,0),f);break e}Md(r,i,Yt,Bl,Jo,t,nn,Ui,yr,oi,y,null,-0,0)}}break}while(!0);Tn(e)}function Md(e,t,i,r,f,y,R,I,$,te,ue,fe,ie,le){if(e.timeoutHandle=-1,fe=t.subtreeFlags,fe&8192||(fe&16785408)===16785408){fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ln},wd(t,y,fe);var be=(y&62914560)===y?Ll-ht():(y&4194048)===y?Ad-ht():0;if(be=l0(fe,be),be!==null){Yn=y,e.cancelPendingCommit=be(Id.bind(null,e,t,y,i,r,f,R,I,$,ue,fe,null,ie,le)),fi(e,y,R,!te);return}}Id(e,t,y,i,r,f,R,I,$)}function Cv(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var r=0;r<i.length;r++){var f=i[r],y=f.getSnapshot;f=f.value;try{if(!Qt(y(),f))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 fi(e,t,i,r){t&=~Zo,t&=~Ui,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var f=t;0<f;){var y=31-Ze(f),R=1<<y;r[y]=-1,f&=~R}i!==0&&Uc(e,i,t)}function zl(){return(Qe&6)===0?(Ss(0),!1):!0}function iu(){if(Ue!==null){if(Je===0)var e=Ue.return;else e=Ue,Hn=Mi=null,So(e),fr=null,ts=0,e=Ue;for(;e!==null;)od(e.alternate,e),e=e.return;Ue=null}}function Cr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,Fv(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Yn=0,iu(),rt=e,Ue=i=Bn(e.current,null),qe=t,Je=0,tn=null,oi=!1,Sr=jr(e,t),Qo=!1,yr=nn=Zo=Ui=ui=dt=0,Yt=gs=null,Jo=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var f=31-Ze(r),y=1<<f;t|=e[f],r&=~y}return $n=t,nl(),i}function Ld(e,t){ze=null,G.H=us,t===hr||t===cl?(t=Yh(),Je=3):t===lo?(t=Yh(),Je=4):Je=t===zo?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,tn=t,Ue===null&&(dt=1,xl(e,cn(t,e.current)))}function Od(){var e=Jt.current;return e===null?!0:(qe&4194048)===qe?pn===null:(qe&62914560)===qe||(qe&536870912)!==0?e===pn:!1}function Bd(){var e=G.H;return G.H=us,e===null?us:e}function zd(){var e=G.A;return G.A=yv,e}function Hl(){dt=4,oi||(qe&4194048)!==qe&&Jt.current!==null||(Sr=!0),(ui&134217727)===0&&(Ui&134217727)===0||rt===null||fi(rt,qe,nn,!1)}function ru(e,t,i){var r=Qe;Qe|=2;var f=Bd(),y=zd();(rt!==e||qe!==t)&&(Bl=null,Cr(e,t)),t=!1;var R=dt;e:do try{if(Je!==0&&Ue!==null){var I=Ue,$=tn;switch(Je){case 8:iu(),R=6;break e;case 3:case 2:case 9:case 6:Jt.current===null&&(t=!0);var te=Je;if(Je=0,tn=null,wr(e,I,$,te),i&&Sr){R=0;break e}break;default:te=Je,Je=0,tn=null,wr(e,I,$,te)}}wv(),R=dt;break}catch(ue){Ld(e,ue)}while(!0);return t&&e.shellSuspendCounter++,Hn=Mi=null,Qe=r,G.H=f,G.A=y,Ue===null&&(rt=null,qe=0,nl()),R}function wv(){for(;Ue!==null;)Hd(Ue)}function xv(e,t){var i=Qe;Qe|=2;var r=Bd(),f=zd();rt!==e||qe!==t?(Bl=null,Ol=ht()+500,Cr(e,t)):Sr=jr(e,t);e:do try{if(Je!==0&&Ue!==null){t=Ue;var y=tn;t:switch(Je){case 1:Je=0,tn=null,wr(e,t,y,1);break;case 2:case 9:if(Gh(y)){Je=0,tn=null,Nd(t);break}t=function(){Je!==2&&Je!==9||rt!==e||(Je=7),Tn(e)},y.then(t,t);break e;case 3:Je=7;break e;case 4:Je=5;break e;case 7:Gh(y)?(Je=0,tn=null,Nd(t)):(Je=0,tn=null,wr(e,t,y,7));break;case 5:var R=null;switch(Ue.tag){case 26:R=Ue.memoizedState;case 5:case 27:var I=Ue;if(R?Cp(R):I.stateNode.complete){Je=0,tn=null;var $=I.sibling;if($!==null)Ue=$;else{var te=I.return;te!==null?(Ue=te,Nl(te)):Ue=null}break t}}Je=0,tn=null,wr(e,t,y,5);break;case 6:Je=0,tn=null,wr(e,t,y,6);break;case 8:iu(),dt=6;break e;default:throw Error(a(462))}}Ev();break}catch(ue){Ld(e,ue)}while(!0);return Hn=Mi=null,G.H=r,G.A=f,Qe=i,Ue!==null?0:(rt=null,qe=0,nl(),dt)}function Ev(){for(;Ue!==null&&!wn();)Hd(Ue)}function Hd(e){var t=ld(e.alternate,e,$n);e.memoizedProps=e.pendingProps,t===null?Nl(e):Ue=t}function Nd(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=ed(i,t,t.pendingProps,t.type,void 0,qe);break;case 11:t=ed(i,t,t.pendingProps,t.type.render,t.ref,qe);break;case 5:So(t);default:od(i,t),t=Ue=Bh(t,$n),t=ld(i,t,$n)}e.memoizedProps=e.pendingProps,t===null?Nl(e):Ue=t}function wr(e,t,i,r){Hn=Mi=null,So(t),fr=null,ts=0;var f=t.return;try{if(dv(e,f,t,i,qe)){dt=1,xl(e,cn(i,e.current)),Ue=null;return}}catch(y){if(f!==null)throw Ue=f,y;dt=1,xl(e,cn(i,e.current)),Ue=null;return}t.flags&32768?(Ge||r===1?e=!0:Sr||(qe&536870912)!==0?e=!1:(oi=e=!0,(r===2||r===9||r===3||r===6)&&(r=Jt.current,r!==null&&r.tag===13&&(r.flags|=16384))),jd(t,e)):Nl(t)}function Nl(e){var t=e;do{if((t.flags&32768)!==0){jd(t,oi);return}e=t.return;var i=_v(t.alternate,t,$n);if(i!==null){Ue=i;return}if(t=t.sibling,t!==null){Ue=t;return}Ue=t=e}while(t!==null);dt===0&&(dt=5)}function jd(e,t){do{var i=gv(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);dt=6,Ue=null}function Id(e,t,i,r,f,y,R,I,$){e.cancelPendingCommit=null;do jl();while(xt!==0);if((Qe&6)!==0)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(y=t.lanes|t.childLanes,y|=Ga,rg(e,i,y,R,I,$),e===rt&&(Ue=rt=null,qe=0),br=t,hi=e,Yn=i,eu=y,tu=f,Td=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Dv(Ce,function(){return Vd(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=G.T,G.T=null,f=J.p,J.p=2,R=Qe,Qe|=4;try{vv(e,t,i)}finally{Qe=R,J.p=f,G.T=r}}xt=1,Ud(),Pd(),Fd()}}function Ud(){if(xt===1){xt=0;var e=hi,t=br,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=G.T,G.T=null;var r=J.p;J.p=2;var f=Qe;Qe|=4;try{yd(t,e);var y=_u,R=Eh(e.containerInfo),I=y.focusedElem,$=y.selectionRange;if(R!==I&&I&&I.ownerDocument&&xh(I.ownerDocument.documentElement,I)){if($!==null&&Ua(I)){var te=$.start,ue=$.end;if(ue===void 0&&(ue=te),"selectionStart"in I)I.selectionStart=te,I.selectionEnd=Math.min(ue,I.value.length);else{var fe=I.ownerDocument||document,ie=fe&&fe.defaultView||window;if(ie.getSelection){var le=ie.getSelection(),be=I.textContent.length,De=Math.min($.start,be),it=$.end===void 0?De:Math.min($.end,be);!le.extend&&De>it&&(R=it,it=De,De=R);var Q=wh(I,De),K=wh(I,it);if(Q&&K&&(le.rangeCount!==1||le.anchorNode!==Q.node||le.anchorOffset!==Q.offset||le.focusNode!==K.node||le.focusOffset!==K.offset)){var ee=fe.createRange();ee.setStart(Q.node,Q.offset),le.removeAllRanges(),De>it?(le.addRange(ee),le.extend(K.node,K.offset)):(ee.setEnd(K.node,K.offset),le.addRange(ee))}}}}for(fe=[],le=I;le=le.parentNode;)le.nodeType===1&&fe.push({element:le,left:le.scrollLeft,top:le.scrollTop});for(typeof I.focus=="function"&&I.focus(),I=0;I<fe.length;I++){var ce=fe[I];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}Xl=!!mu,_u=mu=null}finally{Qe=f,J.p=r,G.T=i}}e.current=t,xt=2}}function Pd(){if(xt===2){xt=0;var e=hi,t=br,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=G.T,G.T=null;var r=J.p;J.p=2;var f=Qe;Qe|=4;try{md(e,t.alternate,t)}finally{Qe=f,J.p=r,G.T=i}}xt=3}}function Fd(){if(xt===4||xt===3){xt=0,Et();var e=hi,t=br,i=Yn,r=Td;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?xt=5:(xt=0,br=hi=null,qd(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(ci=null),ba(i),t=t.stateNode,mt&&typeof mt.onCommitFiberRoot=="function")try{mt.onCommitFiberRoot(We,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=G.T,f=J.p,J.p=2,G.T=null;try{for(var y=e.onRecoverableError,R=0;R<r.length;R++){var I=r[R];y(I.value,{componentStack:I.stack})}}finally{G.T=t,J.p=f}}(Yn&3)!==0&&jl(),Tn(e),f=e.pendingLanes,(i&261930)!==0&&(f&42)!==0?e===nu?vs++:(vs=0,nu=e):vs=0,Ss(0)}}function qd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Jr(t)))}function jl(){return Ud(),Pd(),Fd(),Vd()}function Vd(){if(xt!==5)return!1;var e=hi,t=eu;eu=0;var i=ba(Yn),r=G.T,f=J.p;try{J.p=32>i?32:i,G.T=null,i=tu,tu=null;var y=hi,R=Yn;if(xt=0,br=hi=null,Yn=0,(Qe&6)!==0)throw Error(a(331));var I=Qe;if(Qe|=4,Ed(y.current),Cd(y,y.current,R,i),Qe=I,Ss(0,!1),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot(We,y)}catch{}return!0}finally{J.p=f,G.T=r,qd(e,t)}}function Gd(e,t,i){t=cn(i,t),t=Bo(e.stateNode,t,2),e=ri(e,t,2),e!==null&&(Ir(e,2),Tn(e))}function et(e,t,i){if(e.tag===3)Gd(e,e,i);else for(;t!==null;){if(t.tag===3){Gd(t,e,i);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ci===null||!ci.has(r))){e=cn(i,e),i=$f(2),r=ri(t,i,2),r!==null&&(Yf(i,r,t,e),Ir(r,2),Tn(r));break}}t=t.return}}function su(e,t,i){var r=e.pingCache;if(r===null){r=e.pingCache=new bv;var f=new Set;r.set(t,f)}else f=r.get(t),f===void 0&&(f=new Set,r.set(t,f));f.has(i)||(Qo=!0,f.add(i),e=kv.bind(null,e,t,i),t.then(e,e))}function kv(e,t,i){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,rt===e&&(qe&i)===i&&(dt===4||dt===3&&(qe&62914560)===qe&&300>ht()-Ll?(Qe&2)===0&&Cr(e,0):Zo|=i,yr===qe&&(yr=0)),Tn(e)}function $d(e,t){t===0&&(t=Ic()),e=Ti(e,t),e!==null&&(Ir(e,t),Tn(e))}function Av(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),$d(e,i)}function Tv(e,t){var i=0;switch(e.tag){case 31:case 13:var r=e.stateNode,f=e.memoizedState;f!==null&&(i=f.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),$d(e,i)}function Dv(e,t){return Tt(e,t)}var Il=null,xr=null,lu=!1,Ul=!1,au=!1,di=0;function Tn(e){e!==xr&&e.next===null&&(xr===null?Il=xr=e:xr=xr.next=e),Ul=!0,lu||(lu=!0,Mv())}function Ss(e,t){if(!au&&Ul){au=!0;do for(var i=!1,r=Il;r!==null;){if(e!==0){var f=r.pendingLanes;if(f===0)var y=0;else{var R=r.suspendedLanes,I=r.pingedLanes;y=(1<<31-Ze(42|e)+1)-1,y&=f&~(R&~I),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(i=!0,Xd(r,y))}else y=qe,y=Vs(r,r===rt?y:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(y&3)===0||jr(r,y)||(i=!0,Xd(r,y));r=r.next}while(i);au=!1}}function Rv(){Yd()}function Yd(){Ul=lu=!1;var e=0;di!==0&&Pv()&&(e=di);for(var t=ht(),i=null,r=Il;r!==null;){var f=r.next,y=Wd(r,t);y===0?(r.next=null,i===null?Il=f:i.next=f,f===null&&(xr=i)):(i=r,(e!==0||(y&3)!==0)&&(Ul=!0)),r=f}xt!==0&&xt!==5||Ss(e),di!==0&&(di=0)}function Wd(e,t){for(var i=e.suspendedLanes,r=e.pingedLanes,f=e.expirationTimes,y=e.pendingLanes&-62914561;0<y;){var R=31-Ze(y),I=1<<R,$=f[R];$===-1?((I&i)===0||(I&r)!==0)&&(f[R]=ig(I,t)):$<=t&&(e.expiredLanes|=I),y&=~I}if(t=rt,i=qe,i=Vs(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,i===0||e===t&&(Je===2||Je===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Dt(r),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||jr(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(r!==null&&Dt(r),ba(i)){case 2:case 8:i=Se;break;case 32:i=Ce;break;case 268435456:i=Me;break;default:i=Ce}return r=Kd.bind(null,e),i=Tt(i,r),e.callbackPriority=t,e.callbackNode=i,t}return r!==null&&r!==null&&Dt(r),e.callbackPriority=2,e.callbackNode=null,2}function Kd(e,t){if(xt!==0&&xt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(jl()&&e.callbackNode!==i)return null;var r=qe;return r=Vs(e,e===rt?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Rd(e,r,t),Wd(e,ht()),e.callbackNode!=null&&e.callbackNode===i?Kd.bind(null,e):null)}function Xd(e,t){if(jl())return null;Rd(e,t,!0)}function Mv(){qv(function(){(Qe&6)!==0?Tt(oe,Rv):Yd()})}function ou(){if(di===0){var e=ur;e===0&&(e=_t,_t<<=1,(_t&261888)===0&&(_t=256)),di=e}return di}function Qd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ws(""+e)}function Zd(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 Lv(e,t,i,r,f){if(t==="submit"&&i&&i.stateNode===f){var y=Qd((f[Ft]||null).action),R=r.submitter;R&&(t=(t=R[Ft]||null)?Qd(t.formAction):R.getAttribute("formAction"),t!==null&&(y=t,R=null));var I=new Zs("action","action",null,r,f);e.push({event:I,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(di!==0){var $=R?Zd(f,R):new FormData(f);To(i,{pending:!0,data:$,method:f.method,action:y},null,$)}}else typeof y=="function"&&(I.preventDefault(),$=R?Zd(f,R):new FormData(f),To(i,{pending:!0,data:$,method:f.method,action:y},y,$))},currentTarget:f}]})}}for(var uu=0;uu<Va.length;uu++){var cu=Va[uu],Ov=cu.toLowerCase(),Bv=cu[0].toUpperCase()+cu.slice(1);Sn(Ov,"on"+Bv)}Sn(Th,"onAnimationEnd"),Sn(Dh,"onAnimationIteration"),Sn(Rh,"onAnimationStart"),Sn("dblclick","onDoubleClick"),Sn("focusin","onFocus"),Sn("focusout","onBlur"),Sn(Xg,"onTransitionRun"),Sn(Qg,"onTransitionStart"),Sn(Zg,"onTransitionCancel"),Sn(Mh,"onTransitionEnd"),Ki("onMouseEnter",["mouseout","mouseover"]),Ki("onMouseLeave",["mouseout","mouseover"]),Ki("onPointerEnter",["pointerout","pointerover"]),Ki("onPointerLeave",["pointerout","pointerover"]),xi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),xi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),xi("onBeforeInput",["compositionend","keypress","textInput","paste"]),xi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),xi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),xi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ys="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(" "),zv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ys));function Jd(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var r=e[i],f=r.event;r=r.listeners;e:{var y=void 0;if(t)for(var R=r.length-1;0<=R;R--){var I=r[R],$=I.instance,te=I.currentTarget;if(I=I.listener,$!==y&&f.isPropagationStopped())break e;y=I,f.currentTarget=te;try{y(f)}catch(ue){tl(ue)}f.currentTarget=null,y=$}else for(R=0;R<r.length;R++){if(I=r[R],$=I.instance,te=I.currentTarget,I=I.listener,$!==y&&f.isPropagationStopped())break e;y=I,f.currentTarget=te;try{y(f)}catch(ue){tl(ue)}f.currentTarget=null,y=$}}}}function Pe(e,t){var i=t[Ca];i===void 0&&(i=t[Ca]=new Set);var r=e+"__bubble";i.has(r)||(ep(t,e,2,!1),i.add(r))}function hu(e,t,i){var r=0;t&&(r|=4),ep(i,e,r,t)}var Pl="_reactListening"+Math.random().toString(36).slice(2);function fu(e){if(!e[Pl]){e[Pl]=!0,$c.forEach(function(i){i!=="selectionchange"&&(zv.has(i)||hu(i,!1,e),hu(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Pl]||(t[Pl]=!0,hu("selectionchange",!1,t))}}function ep(e,t,i,r){switch(Dp(t)){case 2:var f=u0;break;case 8:f=c0;break;default:f=Au}i=f.bind(null,t,i,e),f=void 0,!Ma||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(f=!0),r?f!==void 0?e.addEventListener(t,i,{capture:!0,passive:f}):e.addEventListener(t,i,!0):f!==void 0?e.addEventListener(t,i,{passive:f}):e.addEventListener(t,i,!1)}function du(e,t,i,r,f){var y=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var R=r.tag;if(R===3||R===4){var I=r.stateNode.containerInfo;if(I===f)break;if(R===4)for(R=r.return;R!==null;){var $=R.tag;if(($===3||$===4)&&R.stateNode.containerInfo===f)return;R=R.return}for(;I!==null;){if(R=$i(I),R===null)return;if($=R.tag,$===5||$===6||$===26||$===27){r=y=R;continue e}I=I.parentNode}}r=r.return}rh(function(){var te=y,ue=Da(i),fe=[];e:{var ie=Lh.get(e);if(ie!==void 0){var le=Zs,be=e;switch(e){case"keypress":if(Xs(i)===0)break e;case"keydown":case"keyup":le=Tg;break;case"focusin":be="focus",le=za;break;case"focusout":be="blur",le=za;break;case"beforeblur":case"afterblur":le=za;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":le=ah;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=_g;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=Mg;break;case Th:case Dh:case Rh:le=Sg;break;case Mh:le=Og;break;case"scroll":case"scrollend":le=pg;break;case"wheel":le=zg;break;case"copy":case"cut":case"paste":le=bg;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=uh;break;case"toggle":case"beforetoggle":le=Ng}var De=(t&4)!==0,it=!De&&(e==="scroll"||e==="scrollend"),Q=De?ie!==null?ie+"Capture":null:ie;De=[];for(var K=te,ee;K!==null;){var ce=K;if(ee=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||ee===null||Q===null||(ce=Fr(K,Q),ce!=null&&De.push(bs(K,ce,ee))),it)break;K=K.return}0<De.length&&(ie=new le(ie,be,null,i,ue),fe.push({event:ie,listeners:De}))}}if((t&7)===0){e:{if(ie=e==="mouseover"||e==="pointerover",le=e==="mouseout"||e==="pointerout",ie&&i!==Ta&&(be=i.relatedTarget||i.fromElement)&&($i(be)||be[Gi]))break e;if((le||ie)&&(ie=ue.window===ue?ue:(ie=ue.ownerDocument)?ie.defaultView||ie.parentWindow:window,le?(be=i.relatedTarget||i.toElement,le=te,be=be?$i(be):null,be!==null&&(it=C(be),De=be.tag,be!==it||De!==5&&De!==27&&De!==6)&&(be=null)):(le=null,be=te),le!==be)){if(De=ah,ce="onMouseLeave",Q="onMouseEnter",K="mouse",(e==="pointerout"||e==="pointerover")&&(De=uh,ce="onPointerLeave",Q="onPointerEnter",K="pointer"),it=le==null?ie:Pr(le),ee=be==null?ie:Pr(be),ie=new De(ce,K+"leave",le,i,ue),ie.target=it,ie.relatedTarget=ee,ce=null,$i(ue)===te&&(De=new De(Q,K+"enter",be,i,ue),De.target=ee,De.relatedTarget=it,ce=De),it=ce,le&&be)t:{for(De=Hv,Q=le,K=be,ee=0,ce=Q;ce;ce=De(ce))ee++;ce=0;for(var xe=K;xe;xe=De(xe))ce++;for(;0<ee-ce;)Q=De(Q),ee--;for(;0<ce-ee;)K=De(K),ce--;for(;ee--;){if(Q===K||K!==null&&Q===K.alternate){De=Q;break t}Q=De(Q),K=De(K)}De=null}else De=null;le!==null&&tp(fe,ie,le,De,!1),be!==null&&it!==null&&tp(fe,it,be,De,!0)}}e:{if(ie=te?Pr(te):window,le=ie.nodeName&&ie.nodeName.toLowerCase(),le==="select"||le==="input"&&ie.type==="file")var Ke=gh;else if(mh(ie))if(vh)Ke=Yg;else{Ke=Gg;var we=Vg}else le=ie.nodeName,!le||le.toLowerCase()!=="input"||ie.type!=="checkbox"&&ie.type!=="radio"?te&&Aa(te.elementType)&&(Ke=gh):Ke=$g;if(Ke&&(Ke=Ke(e,te))){_h(fe,Ke,i,ue);break e}we&&we(e,ie,te),e==="focusout"&&te&&ie.type==="number"&&te.memoizedProps.value!=null&&ka(ie,"number",ie.value)}switch(we=te?Pr(te):window,e){case"focusin":(mh(we)||we.contentEditable==="true")&&(tr=we,Pa=te,Xr=null);break;case"focusout":Xr=Pa=tr=null;break;case"mousedown":Fa=!0;break;case"contextmenu":case"mouseup":case"dragend":Fa=!1,kh(fe,i,ue);break;case"selectionchange":if(Kg)break;case"keydown":case"keyup":kh(fe,i,ue)}var He;if(Na)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 er?dh(e,i)&&(Ve="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ve="onCompositionStart");Ve&&(ch&&i.locale!=="ko"&&(er||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&er&&(He=sh()):(Qn=ue,La="value"in Qn?Qn.value:Qn.textContent,er=!0)),we=Fl(te,Ve),0<we.length&&(Ve=new oh(Ve,e,null,i,ue),fe.push({event:Ve,listeners:we}),He?Ve.data=He:(He=ph(i),He!==null&&(Ve.data=He)))),(He=Ig?Ug(e,i):Pg(e,i))&&(Ve=Fl(te,"onBeforeInput"),0<Ve.length&&(we=new oh("onBeforeInput","beforeinput",null,i,ue),fe.push({event:we,listeners:Ve}),we.data=He)),Lv(fe,e,te,i,ue)}Jd(fe,t)})}function bs(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Fl(e,t){for(var i=t+"Capture",r=[];e!==null;){var f=e,y=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||y===null||(f=Fr(e,i),f!=null&&r.unshift(bs(e,f,y)),f=Fr(e,t),f!=null&&r.push(bs(e,f,y))),e.tag===3)return r;e=e.return}return[]}function Hv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function tp(e,t,i,r,f){for(var y=t._reactName,R=[];i!==null&&i!==r;){var I=i,$=I.alternate,te=I.stateNode;if(I=I.tag,$!==null&&$===r)break;I!==5&&I!==26&&I!==27||te===null||($=te,f?(te=Fr(i,y),te!=null&&R.unshift(bs(i,te,$))):f||(te=Fr(i,y),te!=null&&R.push(bs(i,te,$)))),i=i.return}R.length!==0&&e.push({event:t,listeners:R})}var Nv=/\r\n?/g,jv=/\u0000|\uFFFD/g;function np(e){return(typeof e=="string"?e:""+e).replace(Nv,`
|
|
49
|
+
`).replace(jv,"")}function ip(e,t){return t=np(t),np(e)===t}function nt(e,t,i,r,f,y){switch(i){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Qi(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Qi(e,""+r);break;case"className":$s(e,"class",r);break;case"tabIndex":$s(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":$s(e,i,r);break;case"style":nh(e,r,y);break;case"data":if(t!=="object"){$s(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=Ws(""+r),e.setAttribute(i,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof y=="function"&&(i==="formAction"?(t!=="input"&&nt(e,t,"name",f.name,f,null),nt(e,t,"formEncType",f.formEncType,f,null),nt(e,t,"formMethod",f.formMethod,f,null),nt(e,t,"formTarget",f.formTarget,f,null)):(nt(e,t,"encType",f.encType,f,null),nt(e,t,"method",f.method,f,null),nt(e,t,"target",f.target,f,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=Ws(""+r),e.setAttribute(i,r);break;case"onClick":r!=null&&(e.onclick=Ln);break;case"onScroll":r!=null&&Pe("scroll",e);break;case"onScrollEnd":r!=null&&Pe("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(a(61));if(i=r.__html,i!=null){if(f.children!=null)throw Error(a(60));e.innerHTML=i}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}i=Ws(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,""+r):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":r===!0?e.setAttribute(i,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,r):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(i,r):e.removeAttribute(i);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(i):e.setAttribute(i,r);break;case"popover":Pe("beforetoggle",e),Pe("toggle",e),Gs(e,"popover",r);break;case"xlinkActuate":Mn(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Mn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Mn(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Mn(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Mn(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Mn(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Mn(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Mn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Mn(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Gs(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=fg.get(i)||i,Gs(e,i,r))}}function pu(e,t,i,r,f,y){switch(i){case"style":nh(e,r,y);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(a(61));if(i=r.__html,i!=null){if(f.children!=null)throw Error(a(60));e.innerHTML=i}}break;case"children":typeof r=="string"?Qi(e,r):(typeof r=="number"||typeof r=="bigint")&&Qi(e,""+r);break;case"onScroll":r!=null&&Pe("scroll",e);break;case"onScrollEnd":r!=null&&Pe("scrollend",e);break;case"onClick":r!=null&&(e.onclick=Ln);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yc.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),t=i.slice(2,f?i.length-7:void 0),y=e[Ft]||null,y=y!=null?y[i]:null,typeof y=="function"&&e.removeEventListener(t,y,f),typeof r=="function")){typeof y!="function"&&y!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,r,f);break e}i in e?e[i]=r:r===!0?e.setAttribute(i,""):Gs(e,i,r)}}}function Bt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Pe("error",e),Pe("load",e);var r=!1,f=!1,y;for(y in i)if(i.hasOwnProperty(y)){var R=i[y];if(R!=null)switch(y){case"src":r=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:nt(e,t,y,R,i,null)}}f&&nt(e,t,"srcSet",i.srcSet,i,null),r&&nt(e,t,"src",i.src,i,null);return;case"input":Pe("invalid",e);var I=y=R=f=null,$=null,te=null;for(r in i)if(i.hasOwnProperty(r)){var ue=i[r];if(ue!=null)switch(r){case"name":f=ue;break;case"type":R=ue;break;case"checked":$=ue;break;case"defaultChecked":te=ue;break;case"value":y=ue;break;case"defaultValue":I=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(a(137,t));break;default:nt(e,t,r,ue,i,null)}}Zc(e,y,I,$,te,R,f,!1);return;case"select":Pe("invalid",e),r=R=y=null;for(f in i)if(i.hasOwnProperty(f)&&(I=i[f],I!=null))switch(f){case"value":y=I;break;case"defaultValue":R=I;break;case"multiple":r=I;default:nt(e,t,f,I,i,null)}t=y,i=R,e.multiple=!!r,t!=null?Xi(e,!!r,t,!1):i!=null&&Xi(e,!!r,i,!0);return;case"textarea":Pe("invalid",e),y=f=r=null;for(R in i)if(i.hasOwnProperty(R)&&(I=i[R],I!=null))switch(R){case"value":r=I;break;case"defaultValue":f=I;break;case"children":y=I;break;case"dangerouslySetInnerHTML":if(I!=null)throw Error(a(91));break;default:nt(e,t,R,I,i,null)}eh(e,r,f,y);return;case"option":for($ in i)if(i.hasOwnProperty($)&&(r=i[$],r!=null))switch($){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:nt(e,t,$,r,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(r=0;r<ys.length;r++)Pe(ys[r],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(te in i)if(i.hasOwnProperty(te)&&(r=i[te],r!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:nt(e,t,te,r,i,null)}return;default:if(Aa(t)){for(ue in i)i.hasOwnProperty(ue)&&(r=i[ue],r!==void 0&&pu(e,t,ue,r,i,void 0));return}}for(I in i)i.hasOwnProperty(I)&&(r=i[I],r!=null&&nt(e,t,I,r,i,null))}function Iv(e,t,i,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,y=null,R=null,I=null,$=null,te=null,ue=null;for(le in i){var fe=i[le];if(i.hasOwnProperty(le)&&fe!=null)switch(le){case"checked":break;case"value":break;case"defaultValue":$=fe;default:r.hasOwnProperty(le)||nt(e,t,le,null,r,fe)}}for(var ie in r){var le=r[ie];if(fe=i[ie],r.hasOwnProperty(ie)&&(le!=null||fe!=null))switch(ie){case"type":y=le;break;case"name":f=le;break;case"checked":te=le;break;case"defaultChecked":ue=le;break;case"value":R=le;break;case"defaultValue":I=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(a(137,t));break;default:le!==fe&&nt(e,t,ie,le,r,fe)}}Ea(e,R,I,$,te,ue,y,f);return;case"select":le=R=I=ie=null;for(y in i)if($=i[y],i.hasOwnProperty(y)&&$!=null)switch(y){case"value":break;case"multiple":le=$;default:r.hasOwnProperty(y)||nt(e,t,y,null,r,$)}for(f in r)if(y=r[f],$=i[f],r.hasOwnProperty(f)&&(y!=null||$!=null))switch(f){case"value":ie=y;break;case"defaultValue":I=y;break;case"multiple":R=y;default:y!==$&&nt(e,t,f,y,r,$)}t=I,i=R,r=le,ie!=null?Xi(e,!!i,ie,!1):!!r!=!!i&&(t!=null?Xi(e,!!i,t,!0):Xi(e,!!i,i?[]:"",!1));return;case"textarea":le=ie=null;for(I in i)if(f=i[I],i.hasOwnProperty(I)&&f!=null&&!r.hasOwnProperty(I))switch(I){case"value":break;case"children":break;default:nt(e,t,I,null,r,f)}for(R in r)if(f=r[R],y=i[R],r.hasOwnProperty(R)&&(f!=null||y!=null))switch(R){case"value":ie=f;break;case"defaultValue":le=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(a(91));break;default:f!==y&&nt(e,t,R,f,r,y)}Jc(e,ie,le);return;case"option":for(var be in i)if(ie=i[be],i.hasOwnProperty(be)&&ie!=null&&!r.hasOwnProperty(be))switch(be){case"selected":e.selected=!1;break;default:nt(e,t,be,null,r,ie)}for($ in r)if(ie=r[$],le=i[$],r.hasOwnProperty($)&&ie!==le&&(ie!=null||le!=null))switch($){case"selected":e.selected=ie&&typeof ie!="function"&&typeof ie!="symbol";break;default:nt(e,t,$,ie,r,le)}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 De in i)ie=i[De],i.hasOwnProperty(De)&&ie!=null&&!r.hasOwnProperty(De)&&nt(e,t,De,null,r,ie);for(te in r)if(ie=r[te],le=i[te],r.hasOwnProperty(te)&&ie!==le&&(ie!=null||le!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(a(137,t));break;default:nt(e,t,te,ie,r,le)}return;default:if(Aa(t)){for(var it in i)ie=i[it],i.hasOwnProperty(it)&&ie!==void 0&&!r.hasOwnProperty(it)&&pu(e,t,it,void 0,r,ie);for(ue in r)ie=r[ue],le=i[ue],!r.hasOwnProperty(ue)||ie===le||ie===void 0&&le===void 0||pu(e,t,ue,ie,r,le);return}}for(var Q in i)ie=i[Q],i.hasOwnProperty(Q)&&ie!=null&&!r.hasOwnProperty(Q)&&nt(e,t,Q,null,r,ie);for(fe in r)ie=r[fe],le=i[fe],!r.hasOwnProperty(fe)||ie===le||ie==null&&le==null||nt(e,t,fe,ie,r,le)}function rp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Uv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),r=0;r<i.length;r++){var f=i[r],y=f.transferSize,R=f.initiatorType,I=f.duration;if(y&&I&&rp(R)){for(R=0,I=f.responseEnd,r+=1;r<i.length;r++){var $=i[r],te=$.startTime;if(te>I)break;var ue=$.transferSize,fe=$.initiatorType;ue&&rp(fe)&&($=$.responseEnd,R+=ue*($<I?1:(I-te)/($-te)))}if(--r,t+=8*(y+R)/(f.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 mu=null,_u=null;function ql(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 lp(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 gu(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 vu=null;function Pv(){var e=window.event;return e&&e.type==="popstate"?e===vu?!1:(vu=e,!0):(vu=null,!1)}var ap=typeof setTimeout=="function"?setTimeout:void 0,Fv=typeof clearTimeout=="function"?clearTimeout:void 0,op=typeof Promise=="function"?Promise:void 0,qv=typeof queueMicrotask=="function"?queueMicrotask:typeof op<"u"?function(e){return op.resolve(null).then(e).catch(Vv)}:ap;function Vv(e){setTimeout(function(){throw e})}function pi(e){return e==="head"}function up(e,t){var i=t,r=0;do{var f=i.nextSibling;if(e.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(r===0){e.removeChild(f),Tr(t);return}r--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")r++;else if(i==="html")Cs(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Cs(i);for(var y=i.firstChild;y;){var R=y.nextSibling,I=y.nodeName;y[Ur]||I==="SCRIPT"||I==="STYLE"||I==="LINK"&&y.rel.toLowerCase()==="stylesheet"||i.removeChild(y),y=R}}else i==="body"&&Cs(e.ownerDocument.body);i=f}while(i);Tr(t)}function cp(e,t){var i=e;e=0;do{var r=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),r&&r.nodeType===8)if(i=r.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=r}while(i)}function Su(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":Su(i),wa(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function Gv(e,t,i,r){for(;e.nodeType===1;){var f=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Ur])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(y=e.getAttribute("rel"),y==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(y!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(y=e.getAttribute("src"),(y!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&y&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var y=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===y)return e}else return e;if(e=mn(e.nextSibling),e===null)break}return null}function $v(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=mn(e.nextSibling),e===null))return null;return e}function hp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=mn(e.nextSibling),e===null))return null;return e}function yu(e){return e.data==="$?"||e.data==="$~"}function bu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Yv(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var r=function(){t(),i.removeEventListener("DOMContentLoaded",r)};i.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function mn(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 Cu=null;function fp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return mn(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function dp(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 pp(e,t,i){switch(t=ql(i),e){case"html":if(e=t.documentElement,!e)throw Error(a(452));return e;case"head":if(e=t.head,!e)throw Error(a(453));return e;case"body":if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function Cs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);wa(e)}var _n=new Map,mp=new Set;function Vl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Wn=J.d;J.d={f:Wv,r:Kv,D:Xv,C:Qv,L:Zv,m:Jv,X:t0,S:e0,M:n0};function Wv(){var e=Wn.f(),t=zl();return e||t}function Kv(e){var t=Yi(e);t!==null&&t.tag===5&&t.type==="form"?Lf(t):Wn.r(e)}var Er=typeof document>"u"?null:document;function _p(e,t,i){var r=Er;if(r&&typeof t=="string"&&t){var f=on(t);f='link[rel="'+e+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),mp.has(f)||(mp.add(f),e={rel:e,crossOrigin:i,href:t},r.querySelector(f)===null&&(t=r.createElement("link"),Bt(t,"link",e),kt(t),r.head.appendChild(t)))}}function Xv(e){Wn.D(e),_p("dns-prefetch",e,null)}function Qv(e,t){Wn.C(e,t),_p("preconnect",e,t)}function Zv(e,t,i){Wn.L(e,t,i);var r=Er;if(r&&e&&t){var f='link[rel="preload"][as="'+on(t)+'"]';t==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+on(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+on(i.imageSizes)+'"]')):f+='[href="'+on(e)+'"]';var y=f;switch(t){case"style":y=kr(e);break;case"script":y=Ar(e)}_n.has(y)||(e=c({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),_n.set(y,e),r.querySelector(f)!==null||t==="style"&&r.querySelector(ws(y))||t==="script"&&r.querySelector(xs(y))||(t=r.createElement("link"),Bt(t,"link",e),kt(t),r.head.appendChild(t)))}}function Jv(e,t){Wn.m(e,t);var i=Er;if(i&&e){var r=t&&typeof t.as=="string"?t.as:"script",f='link[rel="modulepreload"][as="'+on(r)+'"][href="'+on(e)+'"]',y=f;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Ar(e)}if(!_n.has(y)&&(e=c({rel:"modulepreload",href:e},t),_n.set(y,e),i.querySelector(f)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(xs(y)))return}r=i.createElement("link"),Bt(r,"link",e),kt(r),i.head.appendChild(r)}}}function e0(e,t,i){Wn.S(e,t,i);var r=Er;if(r&&e){var f=Wi(r).hoistableStyles,y=kr(e);t=t||"default";var R=f.get(y);if(!R){var I={loading:0,preload:null};if(R=r.querySelector(ws(y)))I.loading=5;else{e=c({rel:"stylesheet",href:e,"data-precedence":t},i),(i=_n.get(y))&&wu(e,i);var $=R=r.createElement("link");kt($),Bt($,"link",e),$._p=new Promise(function(te,ue){$.onload=te,$.onerror=ue}),$.addEventListener("load",function(){I.loading|=1}),$.addEventListener("error",function(){I.loading|=2}),I.loading|=4,Gl(R,t,r)}R={type:"stylesheet",instance:R,count:1,state:I},f.set(y,R)}}}function t0(e,t){Wn.X(e,t);var i=Er;if(i&&e){var r=Wi(i).hoistableScripts,f=Ar(e),y=r.get(f);y||(y=i.querySelector(xs(f)),y||(e=c({src:e,async:!0},t),(t=_n.get(f))&&xu(e,t),y=i.createElement("script"),kt(y),Bt(y,"link",e),i.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},r.set(f,y))}}function n0(e,t){Wn.M(e,t);var i=Er;if(i&&e){var r=Wi(i).hoistableScripts,f=Ar(e),y=r.get(f);y||(y=i.querySelector(xs(f)),y||(e=c({src:e,async:!0,type:"module"},t),(t=_n.get(f))&&xu(e,t),y=i.createElement("script"),kt(y),Bt(y,"link",e),i.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},r.set(f,y))}}function gp(e,t,i,r){var f=(f=me.current)?Vl(f):null;if(!f)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=kr(i.href),i=Wi(f).hoistableStyles,r=i.get(t),r||(r={type:"style",instance:null,count:0,state:null},i.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=kr(i.href);var y=Wi(f).hoistableStyles,R=y.get(e);if(R||(f=f.ownerDocument||f,R={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(e,R),(y=f.querySelector(ws(e)))&&!y._p&&(R.instance=y,R.state.loading=5),_n.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},_n.set(e,i),y||i0(f,e,i,R.state))),t&&r===null)throw Error(a(528,""));return R}if(t&&r!==null)throw Error(a(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ar(i),i=Wi(f).hoistableScripts,r=i.get(t),r||(r={type:"script",instance:null,count:0,state:null},i.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function kr(e){return'href="'+on(e)+'"'}function ws(e){return'link[rel="stylesheet"]['+e+"]"}function vp(e){return c({},e,{"data-precedence":e.precedence,precedence:null})}function i0(e,t,i,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),Bt(t,"link",i),kt(t),e.head.appendChild(t))}function Ar(e){return'[src="'+on(e)+'"]'}function xs(e){return"script[async]"+e}function Sp(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+on(i.href)+'"]');if(r)return t.instance=r,kt(r),r;var f=c({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),kt(r),Bt(r,"style",f),Gl(r,i.precedence,e),t.instance=r;case"stylesheet":f=kr(i.href);var y=e.querySelector(ws(f));if(y)return t.state.loading|=4,t.instance=y,kt(y),y;r=vp(i),(f=_n.get(f))&&wu(r,f),y=(e.ownerDocument||e).createElement("link"),kt(y);var R=y;return R._p=new Promise(function(I,$){R.onload=I,R.onerror=$}),Bt(y,"link",r),t.state.loading|=4,Gl(y,i.precedence,e),t.instance=y;case"script":return y=Ar(i.src),(f=e.querySelector(xs(y)))?(t.instance=f,kt(f),f):(r=i,(f=_n.get(y))&&(r=c({},i),xu(r,f)),e=e.ownerDocument||e,f=e.createElement("script"),kt(f),Bt(f,"link",r),e.head.appendChild(f),t.instance=f);case"void":return null;default:throw Error(a(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,Gl(r,i.precedence,e));return t.instance}function Gl(e,t,i){for(var r=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=r.length?r[r.length-1]:null,y=f,R=0;R<r.length;R++){var I=r[R];if(I.dataset.precedence===t)y=I;else if(y!==f)break}y?y.parentNode.insertBefore(e,y.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function wu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function xu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var $l=null;function yp(e,t,i){if($l===null){var r=new Map,f=$l=new Map;f.set(i,r)}else f=$l,r=f.get(i),r||(r=new Map,f.set(i,r));if(r.has(e))return r;for(r.set(e,null),i=i.getElementsByTagName(e),f=0;f<i.length;f++){var y=i[f];if(!(y[Ur]||y[Rt]||e==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var R=y.getAttribute(t)||"";R=e+R;var I=r.get(R);I?I.push(y):r.set(R,[y])}}return r}function bp(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function r0(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 Cp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function s0(e,t,i,r){if(i.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=kr(r.href),y=t.querySelector(ws(f));if(y){t=y._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Yl.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=y,kt(y);return}y=t.ownerDocument||t,r=vp(r),(f=_n.get(f))&&wu(r,f),y=y.createElement("link"),kt(y);var R=y;R._p=new Promise(function(I,$){R.onload=I,R.onerror=$}),Bt(y,"link",r),i.instance=y}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Yl.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Eu=0;function l0(e,t){return e.stylesheets&&e.count===0&&Kl(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var r=setTimeout(function(){if(e.stylesheets&&Kl(e,e.stylesheets),e.unsuspend){var y=e.unsuspend;e.unsuspend=null,y()}},6e4+t);0<e.imgBytes&&Eu===0&&(Eu=62500*Uv());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Kl(e,e.stylesheets),e.unsuspend)){var y=e.unsuspend;e.unsuspend=null,y()}},(e.imgBytes>Eu?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(f)}}:null}function Yl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Kl(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Wl=null;function Kl(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Wl=new Map,t.forEach(a0,e),Wl=null,Yl.call(e))}function a0(e,t){if(!(t.state.loading&4)){var i=Wl.get(e);if(i)var r=i.get(null);else{i=new Map,Wl.set(e,i);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<f.length;y++){var R=f[y];(R.nodeName==="LINK"||R.getAttribute("media")!=="not all")&&(i.set(R.dataset.precedence,R),r=R)}r&&i.set(null,r)}f=t.instance,R=f.getAttribute("data-precedence"),y=i.get(R)||r,y===r&&i.set(null,f),i.set(R,f),this.count++,r=Yl.bind(this),f.addEventListener("load",r),f.addEventListener("error",r),y?y.parentNode.insertBefore(f,y.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),t.state.loading|=4}}var Es={$$typeof:g,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function o0(e,t,i,r,f,y,R,I,$){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=Sa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sa(0),this.hiddenUpdates=Sa(null),this.identifierPrefix=r,this.onUncaughtError=f,this.onCaughtError=y,this.onRecoverableError=R,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=$,this.incompleteTransitions=new Map}function wp(e,t,i,r,f,y,R,I,$,te,ue,fe){return e=new o0(e,t,i,R,$,te,ue,fe,I),t=1,y===!0&&(t|=24),y=Zt(3,null,null,t),e.current=y,y.stateNode=e,t=io(),t.refCount++,e.pooledCache=t,t.refCount++,y.memoizedState={element:r,isDehydrated:i,cache:t},ao(y),e}function xp(e){return e?(e=rr,e):rr}function Ep(e,t,i,r,f,y){f=xp(f),r.context===null?r.context=f:r.pendingContext=f,r=ii(t),r.payload={element:i},y=y===void 0?null:y,y!==null&&(r.callback=y),i=ri(e,r,t),i!==null&&(Wt(i,e,t),is(i,e,t))}function kp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function ku(e,t){kp(e,t),(e=e.alternate)&&kp(e,t)}function Ap(e){if(e.tag===13||e.tag===31){var t=Ti(e,67108864);t!==null&&Wt(t,e,67108864),ku(e,67108864)}}function Tp(e){if(e.tag===13||e.tag===31){var t=rn();t=ya(t);var i=Ti(e,t);i!==null&&Wt(i,e,t),ku(e,t)}}var Xl=!0;function u0(e,t,i,r){var f=G.T;G.T=null;var y=J.p;try{J.p=2,Au(e,t,i,r)}finally{J.p=y,G.T=f}}function c0(e,t,i,r){var f=G.T;G.T=null;var y=J.p;try{J.p=8,Au(e,t,i,r)}finally{J.p=y,G.T=f}}function Au(e,t,i,r){if(Xl){var f=Tu(r);if(f===null)du(e,t,r,Ql,i),Rp(e,r);else if(f0(f,e,t,i,r))r.stopPropagation();else if(Rp(e,r),t&4&&-1<h0.indexOf(e)){for(;f!==null;){var y=Yi(f);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var R=wi(y.pendingLanes);if(R!==0){var I=y;for(I.pendingLanes|=2,I.entangledLanes|=2;R;){var $=1<<31-Ze(R);I.entanglements[1]|=$,R&=~$}Tn(y),(Qe&6)===0&&(Ol=ht()+500,Ss(0))}}break;case 31:case 13:I=Ti(y,2),I!==null&&Wt(I,y,2),zl(),ku(y,2)}if(y=Tu(r),y===null&&du(e,t,r,Ql,i),y===f)break;f=y}f!==null&&r.stopPropagation()}else du(e,t,r,null,i)}}function Tu(e){return e=Da(e),Du(e)}var Ql=null;function Du(e){if(Ql=null,e=$i(e),e!==null){var t=C(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=m(t),e!==null)return e;e=null}else if(i===31){if(e=o(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 Ql=e,null}function Dp(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(zt()){case oe:return 2;case Se:return 8;case Ce:case Re:return 32;case Me:return 268435456;default:return 32}default:return 32}}var Ru=!1,mi=null,_i=null,gi=null,ks=new Map,As=new Map,vi=[],h0="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 Rp(e,t){switch(e){case"focusin":case"focusout":mi=null;break;case"dragenter":case"dragleave":_i=null;break;case"mouseover":case"mouseout":gi=null;break;case"pointerover":case"pointerout":ks.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":As.delete(t.pointerId)}}function Ts(e,t,i,r,f,y){return e===null||e.nativeEvent!==y?(e={blockedOn:t,domEventName:i,eventSystemFlags:r,nativeEvent:y,targetContainers:[f]},t!==null&&(t=Yi(t),t!==null&&Ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,f!==null&&t.indexOf(f)===-1&&t.push(f),e)}function f0(e,t,i,r,f){switch(t){case"focusin":return mi=Ts(mi,e,t,i,r,f),!0;case"dragenter":return _i=Ts(_i,e,t,i,r,f),!0;case"mouseover":return gi=Ts(gi,e,t,i,r,f),!0;case"pointerover":var y=f.pointerId;return ks.set(y,Ts(ks.get(y)||null,e,t,i,r,f)),!0;case"gotpointercapture":return y=f.pointerId,As.set(y,Ts(As.get(y)||null,e,t,i,r,f)),!0}return!1}function Mp(e){var t=$i(e.target);if(t!==null){var i=C(t);if(i!==null){if(t=i.tag,t===13){if(t=m(i),t!==null){e.blockedOn=t,Vc(e.priority,function(){Tp(i)});return}}else if(t===31){if(t=o(i),t!==null){e.blockedOn=t,Vc(e.priority,function(){Tp(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 Zl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Tu(e.nativeEvent);if(i===null){i=e.nativeEvent;var r=new i.constructor(i.type,i);Ta=r,i.target.dispatchEvent(r),Ta=null}else return t=Yi(i),t!==null&&Ap(t),e.blockedOn=i,!1;t.shift()}return!0}function Lp(e,t,i){Zl(e)&&i.delete(t)}function d0(){Ru=!1,mi!==null&&Zl(mi)&&(mi=null),_i!==null&&Zl(_i)&&(_i=null),gi!==null&&Zl(gi)&&(gi=null),ks.forEach(Lp),As.forEach(Lp)}function Jl(e,t){e.blockedOn===t&&(e.blockedOn=null,Ru||(Ru=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,d0)))}var ea=null;function Op(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],r=e[t+1],f=e[t+2];if(typeof r!="function"){if(Du(r||i)===null)continue;break}var y=Yi(i);y!==null&&(e.splice(t,3),t-=3,To(y,{pending:!0,data:f,method:i.method,action:r},r,f))}}))}function Tr(e){function t($){return Jl($,e)}mi!==null&&Jl(mi,e),_i!==null&&Jl(_i,e),gi!==null&&Jl(gi,e),ks.forEach(t),As.forEach(t);for(var i=0;i<vi.length;i++){var r=vi[i];r.blockedOn===e&&(r.blockedOn=null)}for(;0<vi.length&&(i=vi[0],i.blockedOn===null);)Mp(i),i.blockedOn===null&&vi.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(r=0;r<i.length;r+=3){var f=i[r],y=i[r+1],R=f[Ft]||null;if(typeof y=="function")R||Op(i);else if(R){var I=null;if(y&&y.hasAttribute("formAction")){if(f=y,R=y[Ft]||null)I=R.formAction;else if(Du(f)!==null)continue}else I=R.action;typeof I=="function"?i[r+1]=I:(i.splice(r,3),r-=3),Op(i)}}}function Bp(){function e(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(R){return f=R})},focusReset:"manual",scroll:"manual"})}function t(){f!==null&&(f(),f=null),r||setTimeout(i,20)}function i(){if(!r&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),f!==null&&(f(),f=null)}}}function Mu(e){this._internalRoot=e}ta.prototype.render=Mu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var i=t.current,r=rn();Ep(i,r,e,t,null,null)},ta.prototype.unmount=Mu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ep(e.current,2,null,e,null,null),zl(),t[Gi]=null}};function ta(e){this._internalRoot=e}ta.prototype.unstable_scheduleHydration=function(e){if(e){var t=qc();e={blockedOn:null,target:e,priority:t};for(var i=0;i<vi.length&&t!==0&&t<vi[i].priority;i++);vi.splice(i,0,e),i===0&&Mp(e)}};var zp=s.version;if(zp!=="19.2.6")throw Error(a(527,zp,"19.2.6"));J.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=h(t),e=e!==null?d(e):null,e=e===null?null:e.stateNode,e};var p0={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var na=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!na.isDisabled&&na.supportsFiber)try{We=na.inject(p0),mt=na}catch{}}return Rs.createRoot=function(e,t){if(!v(e))throw Error(a(299));var i=!1,r="",f=Ff,y=qf,R=Vf;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(f=t.onUncaughtError),t.onCaughtError!==void 0&&(y=t.onCaughtError),t.onRecoverableError!==void 0&&(R=t.onRecoverableError)),t=wp(e,1,!1,null,null,i,r,null,f,y,R,Bp),e[Gi]=t.current,fu(e),new Mu(t)},Rs.hydrateRoot=function(e,t,i){if(!v(e))throw Error(a(299));var r=!1,f="",y=Ff,R=qf,I=Vf,$=null;return i!=null&&(i.unstable_strictMode===!0&&(r=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(y=i.onUncaughtError),i.onCaughtError!==void 0&&(R=i.onCaughtError),i.onRecoverableError!==void 0&&(I=i.onRecoverableError),i.formState!==void 0&&($=i.formState)),t=wp(e,1,!0,t,i??null,r,f,$,y,R,I,Bp),t.context=xp(null),i=t.current,r=rn(),r=ya(r),f=ii(r),f.callback=null,ri(i,f,r),i=r,t.current.lanes=i,Ir(t,i),Tn(t),e[Gi]=t.current,fu(e),new ta(t)},Rs.version="19.2.6",Rs}var $p;function k0(){if($p)return Bu.exports;$p=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(s){console.error(s)}}return n(),Bu.exports=E0(),Bu.exports}var A0=k0();const Fi=[{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}],T0=Fi.map(n=>n.name);Fi.filter(n=>n.dispatchable).map(n=>n.name);function D0(){const n={};for(const s of T0)n[s]={permissionMode:"default",model:"default"};return{version:1,roles:n,autoOrchestration:!0,translationEnabled:!0}}function R0({sidebar:n,children:s}){const[l,a]=de.useState(!1);return N.jsxs("div",{className:l?"app-shell is-sidebar-collapsed":"app-shell",children:[N.jsxs("aside",{className:"app-sidebar",children:[N.jsx("button",{className:"sidebar-toggle",type:"button","aria-label":l?"Expand sidebar":"Collapse sidebar",title:l?"Expand sidebar":"Collapse sidebar",onClick:()=>a(v=>!v)}),N.jsx("div",{className:"sidebar-content",children:n})]}),N.jsx("main",{className:"app-main",children:s})]})}function M0(n,s){return n.find(l=>l.taskSlug===s)??n[0]??null}const ke={getAppPreferences(){return je("/api/settings/preferences")},updateAppPreferences(n){return je("/api/settings/preferences",{method:"PUT",body:JSON.stringify(n)})},getCurrentProject(){return je("/api/projects/current")},pullCurrentProject(){return je("/api/projects/current/pull",{method:"POST"})},getRecentRepositoryPaths(){return je("/api/projects/recent")},connectProject(n){return je("/api/projects/connect",{method:"POST",body:JSON.stringify(n)})},listTasks(){return je("/api/tasks")},createTask(n){return je("/api/tasks",{method:"POST",body:JSON.stringify(n)})},cleanupTask(n,s={}){return je(`/api/tasks/${encodeURIComponent(n)}/cleanup`,{method:"POST",body:JSON.stringify(s)})},getHarnessStatus(){return je("/api/projects/harness")},applyHarness(){return je("/api/projects/harness/apply",{method:"POST"})},getHarnessBootstrapStatus(){return je("/api/projects/harness/bootstrap")},startHarnessBootstrap(n={}){return je("/api/projects/harness/bootstrap/start",{method:"POST",body:JSON.stringify(n)})},getTaskStatus(n){return je(`/api/tasks/${encodeURIComponent(n)}/status`)},listSessions(n){return je(`/api/tasks/${encodeURIComponent(n)}/sessions`)},startRoleSession(n,s,l={}){return je(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/start`,{method:"POST",body:JSON.stringify(l)})},stopRoleSession(n,s){return je(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/stop`,{method:"POST"})},restartRoleSession(n,s,l={}){return je(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/restart`,{method:"POST",body:JSON.stringify(l)})},resumeRoleSession(n,s,l={}){return je(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/resume`,{method:"POST",body:JSON.stringify(l)})},dispatchRoleCommand(n,s){return je(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/dispatch`,{method:"POST"})},listMessages(n){return je(`/api/tasks/${encodeURIComponent(n)}/messages`)},markAllMessagesDone(n){return je(`/api/tasks/${encodeURIComponent(n)}/messages/mark-all-done`,{method:"POST"})},deleteMessageHistory(n){return je(`/api/tasks/${encodeURIComponent(n)}/messages/history`,{method:"DELETE"})},getOrchestrationState(n){return je(`/api/tasks/${encodeURIComponent(n)}/orchestration`)},updateOrchestrationState(n,s){return je(`/api/tasks/${encodeURIComponent(n)}/orchestration`,{method:"PUT",body:JSON.stringify(s)})},getTaskRoundState(n){return je(`/api/tasks/${encodeURIComponent(n)}/round`)},getTranslationSettings(){return je("/api/translation/settings")},updateTranslationSettings(n){return je("/api/translation/settings",{method:"PUT",body:JSON.stringify(n)})},getTranslationPrompts(){return je("/api/translation/prompts")},testTranslationProvider(){return je("/api/translation/test",{method:"POST"})},startTranslationSession(n,s){return je(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/translation/start`,{method:"POST"})},pollTranslationSession(n,s,l){const a=new URLSearchParams({after:String(s)});return l!==void 0&&a.set("limit",String(l)),je(`/api/translation/sessions/${encodeURIComponent(n)}/events?${a.toString()}`)},translateUserInput(n,s,l){return je(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/translation/input`,{method:"POST",body:JSON.stringify(l)})},sendTranslatedInput(n,s,l){return je(`/api/tasks/${encodeURIComponent(n)}/sessions/${s}/translation/send`,{method:"POST",body:JSON.stringify(l)})},clearTranslationSession(n){return je(`/api/translation/sessions/${encodeURIComponent(n)}/clear`,{method:"POST"})},retryTranslation(n,s){return je(`/api/translation/sessions/${encodeURIComponent(n)}/retry/${encodeURIComponent(s)}`,{method:"POST"})},ignoreTranslationFailures(n){return je(`/api/translation/sessions/${encodeURIComponent(n)}/failures/ignore`,{method:"POST"})},retryTranslationFailures(n){return je(`/api/translation/sessions/${encodeURIComponent(n)}/failures/retry`,{method:"POST"})}};async function je(n,s={}){var v,C;const l=new Headers(s.headers);s.body!==void 0&&s.body!==null&&!l.has("content-type")&&l.set("content-type","application/json");const a=await fetch(n,{...s,headers:l});if(!a.ok){const m=await a.json().catch(()=>null),o=(v=m==null?void 0:m.error)!=null&&v.hint?`${m.error.message} ${m.error.hint}`:((C=m==null?void 0:m.error)==null?void 0:C.message)??`Request failed: ${a.status}`;throw new Error(o)}return a.json()}function L0({events:n,maxEvents:s=8,showHeader:l=!0}){const a=s===null?n:n.slice(-s);return N.jsxs("section",{className:"event-log",children:[l?N.jsx("h2",{children:"Events"}):null,n.length===0?N.jsx("p",{className:"muted",children:"No terminal events yet."}):N.jsx("ol",{children:a.map((v,C)=>N.jsx("li",{children:v},`${v}-${C}`))})]})}var ju={exports:{}},Yp;function O0(){return Yp||(Yp=1,(function(n,s){(function(l,a){n.exports=a()})(self,(()=>(()=>{var l={};return(()=>{var a=l;Object.defineProperty(a,"__esModule",{value:!0}),a.FitAddon=void 0,a.FitAddon=class{activate(v){this._terminal=v}dispose(){}fit(){const v=this.proposeDimensions();if(!v||!this._terminal||isNaN(v.cols)||isNaN(v.rows))return;const C=this._terminal._core;this._terminal.rows===v.rows&&this._terminal.cols===v.cols||(C._renderService.clear(),this._terminal.resize(v.cols,v.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const v=this._terminal._core,C=v._renderService.dimensions;if(C.css.cell.width===0||C.css.cell.height===0)return;const m=this._terminal.options.scrollback===0?0:v.viewport.scrollBarWidth,o=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(o.getPropertyValue("height")),h=Math.max(0,parseInt(o.getPropertyValue("width"))),d=window.getComputedStyle(this._terminal.element),c=u-(parseInt(d.getPropertyValue("padding-top"))+parseInt(d.getPropertyValue("padding-bottom"))),b=h-(parseInt(d.getPropertyValue("padding-right"))+parseInt(d.getPropertyValue("padding-left")))-m;return{cols:Math.max(2,Math.floor(b/C.css.cell.width)),rows:Math.max(1,Math.floor(c/C.css.cell.height))}}}})(),l})()))})(ju)),ju.exports}var B0=O0(),Iu={exports:{}},Wp;function z0(){return Wp||(Wp=1,(function(n,s){(function(l,a){n.exports=a()})(self,(()=>(()=>{var l={6:(m,o)=>{function u(d){try{const c=new URL(d),b=c.password&&c.username?`${c.protocol}//${c.username}:${c.password}@${c.host}`:c.username?`${c.protocol}//${c.username}@${c.host}`:`${c.protocol}//${c.host}`;return d.toLocaleLowerCase().startsWith(b.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(o,"__esModule",{value:!0}),o.LinkComputer=o.WebLinkProvider=void 0,o.WebLinkProvider=class{constructor(d,c,b,w={}){this._terminal=d,this._regex=c,this._handler=b,this._options=w}provideLinks(d,c){const b=h.computeLink(d,this._regex,this._terminal,this._handler);c(this._addCallbacks(b))}_addCallbacks(d){return d.map((c=>(c.leave=this._options.leave,c.hover=(b,w)=>{if(this._options.hover){const{range:k}=c;this._options.hover(b,w,k)}},c)))}};class h{static computeLink(c,b,w,k){const x=new RegExp(b.source,(b.flags||"")+"g"),[S,_]=h._getWindowedLineStrings(c-1,w),p=S.join("");let g;const E=[];for(;g=x.exec(p);){const M=g[0];if(!u(M))continue;const[T,O]=h._mapStrIdx(w,_,0,g.index),[A,B]=h._mapStrIdx(w,T,O,M.length);if(T===-1||O===-1||A===-1||B===-1)continue;const j={start:{x:O+1,y:T+1},end:{x:B,y:A+1}};E.push({range:j,text:M,activate:k})}return E}static _getWindowedLineStrings(c,b){let w,k=c,x=c,S=0,_="";const p=[];if(w=b.buffer.active.getLine(c)){const g=w.translateToString(!0);if(w.isWrapped&&g[0]!==" "){for(S=0;(w=b.buffer.active.getLine(--k))&&S<2048&&(_=w.translateToString(!0),S+=_.length,p.push(_),w.isWrapped&&_.indexOf(" ")===-1););p.reverse()}for(p.push(g),S=0;(w=b.buffer.active.getLine(++x))&&w.isWrapped&&S<2048&&(_=w.translateToString(!0),S+=_.length,p.push(_),_.indexOf(" ")===-1););}return[p,k]}static _mapStrIdx(c,b,w,k){const x=c.buffer.active,S=x.getNullCell();let _=w;for(;k;){const p=x.getLine(b);if(!p)return[-1,-1];for(let g=_;g<p.length;++g){p.getCell(g,S);const E=S.getChars();if(S.getWidth()&&(k-=E.length||1,g===p.length-1&&E==="")){const M=x.getLine(b+1);M&&M.isWrapped&&(M.getCell(0,S),S.getWidth()===2&&(k+=1))}if(k<0)return[b,g]}b++,_=0}return[b,_]}}o.LinkComputer=h}},a={};function v(m){var o=a[m];if(o!==void 0)return o.exports;var u=a[m]={exports:{}};return l[m](u,u.exports,v),u.exports}var C={};return(()=>{var m=C;Object.defineProperty(m,"__esModule",{value:!0}),m.WebLinksAddon=void 0;const o=v(6),u=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function h(d,c){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=c}else console.warn("Opening link blocked as opener could not be cleared")}m.WebLinksAddon=class{constructor(d=h,c={}){this._handler=d,this._options=c}activate(d){this._terminal=d;const c=this._options,b=c.urlRegex||u;this._linkProvider=this._terminal.registerLinkProvider(new o.WebLinkProvider(this._terminal,b,this._handler,c))}dispose(){var d;(d=this._linkProvider)==null||d.dispose()}}})(),C})()))})(Iu)),Iu.exports}var H0=z0(),Uu={exports:{}},Kp;function N0(){return Kp||(Kp=1,(function(n,s){(function(l,a){n.exports=a()})(globalThis,(()=>(()=>{var l={4567:function(m,o,u){var h=this&&this.__decorate||function(p,g,E,M){var T,O=arguments.length,A=O<3?g:M===null?M=Object.getOwnPropertyDescriptor(g,E):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(p,g,E,M);else for(var B=p.length-1;B>=0;B--)(T=p[B])&&(A=(O<3?T(A):O>3?T(g,E,A):T(g,E))||A);return O>3&&A&&Object.defineProperty(g,E,A),A},d=this&&this.__param||function(p,g){return function(E,M){g(E,M,p)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const c=u(9042),b=u(9924),w=u(844),k=u(4725),x=u(2585),S=u(3656);let _=o.AccessibilityManager=class extends w.Disposable{constructor(p,g,E,M){super(),this._terminal=p,this._coreBrowserService=E,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 T=0;T<this._terminal.rows;T++)this._rowElements[T]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[T]);if(this._topBoundaryFocusListener=T=>this._handleBoundaryFocus(T,0),this._bottomBoundaryFocusListener=T=>this._handleBoundaryFocus(T,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((T=>this._handleResize(T.rows)))),this.register(this._terminal.onRender((T=>this._refreshRows(T.start,T.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((T=>this._handleChar(T)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
50
|
+
`)))),this.register(this._terminal.onA11yTab((T=>this._handleTab(T)))),this.register(this._terminal.onKey((T=>this._handleKey(T.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,S.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,w.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(p){for(let g=0;g<p;g++)this._handleChar(" ")}_handleChar(p){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==p&&(this._charsToAnnounce+=p):this._charsToAnnounce+=p,p===`
|
|
51
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=c.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(p){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(p)||this._charsToConsume.push(p)}_refreshRows(p,g){this._liveRegionDebouncer.refresh(p,g,this._terminal.rows)}_renderRows(p,g){const E=this._terminal.buffer,M=E.lines.length.toString();for(let T=p;T<=g;T++){const O=E.lines.get(E.ydisp+T),A=[],B=(O==null?void 0:O.translateToString(!0,void 0,void 0,A))||"",j=(E.ydisp+T+1).toString(),F=this._rowElements[T];F&&(B.length===0?(F.innerText=" ",this._rowColumns.set(F,[0,1])):(F.textContent=B,this._rowColumns.set(F,A)),F.setAttribute("aria-posinset",j),F.setAttribute("aria-setsize",M))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(p,g){const E=p.target,M=this._rowElements[g===0?1:this._rowElements.length-2];if(E.getAttribute("aria-posinset")===(g===0?"1":`${this._terminal.buffer.lines.length}`)||p.relatedTarget!==M)return;let T,O;if(g===0?(T=E,O=this._rowElements.pop(),this._rowContainer.removeChild(O)):(T=this._rowElements.shift(),O=E,this._rowContainer.removeChild(T)),T.removeEventListener("focus",this._topBoundaryFocusListener),O.removeEventListener("focus",this._bottomBoundaryFocusListener),g===0){const A=this._createAccessibilityTreeNode();this._rowElements.unshift(A),this._rowContainer.insertAdjacentElement("afterbegin",A)}else{const A=this._createAccessibilityTreeNode();this._rowElements.push(A),this._rowContainer.appendChild(A)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(g===0?-1:1),this._rowElements[g===0?1:this._rowElements.length-2].focus(),p.preventDefault(),p.stopImmediatePropagation()}_handleSelectionChange(){var B;if(this._rowElements.length===0)return;const p=document.getSelection();if(!p)return;if(p.isCollapsed)return void(this._rowContainer.contains(p.anchorNode)&&this._terminal.clearSelection());if(!p.anchorNode||!p.focusNode)return void console.error("anchorNode and/or focusNode are null");let g={node:p.anchorNode,offset:p.anchorOffset},E={node:p.focusNode,offset:p.focusOffset};if((g.node.compareDocumentPosition(E.node)&Node.DOCUMENT_POSITION_PRECEDING||g.node===E.node&&g.offset>E.offset)&&([g,E]=[E,g]),g.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(g={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(g.node))return;const M=this._rowElements.slice(-1)[0];if(E.node.compareDocumentPosition(M)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(E={node:M,offset:((B=M.textContent)==null?void 0:B.length)??0}),!this._rowContainer.contains(E.node))return;const T=({node:j,offset:F})=>{const V=j instanceof Text?j.parentNode:j;let q=parseInt(V==null?void 0:V.getAttribute("aria-posinset"),10)-1;if(isNaN(q))return console.warn("row is invalid. Race condition?"),null;const W=this._rowColumns.get(V);if(!W)return console.warn("columns is null. Race condition?"),null;let X=F<W.length?W[F]:W.slice(-1)[0]+1;return X>=this._terminal.cols&&(++q,X=0),{row:q,column:X}},O=T(g),A=T(E);if(O&&A){if(O.row>A.row||O.row===A.row&&O.column>=A.column)throw new Error("invalid range");this._terminal.select(O.column,O.row,(A.row-O.row)*this._terminal.cols-O.column+A.column)}}_handleResize(p){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let g=this._rowContainer.children.length;g<this._terminal.rows;g++)this._rowElements[g]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[g]);for(;this._rowElements.length>p;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const p=this._coreBrowserService.mainDocument.createElement("div");return p.setAttribute("role","listitem"),p.tabIndex=-1,this._refreshRowDimensions(p),p}_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 p=0;p<this._terminal.rows;p++)this._refreshRowDimensions(this._rowElements[p])}}_refreshRowDimensions(p){p.style.height=`${this._renderService.dimensions.css.cell.height}px`}};o.AccessibilityManager=_=h([d(1,x.IInstantiationService),d(2,k.ICoreBrowserService),d(3,k.IRenderService)],_)},3614:(m,o)=>{function u(b){return b.replace(/\r?\n/g,"\r")}function h(b,w){return w?"\x1B[200~"+b+"\x1B[201~":b}function d(b,w,k,x){b=h(b=u(b),k.decPrivateModes.bracketedPasteMode&&x.rawOptions.ignoreBracketedPasteMode!==!0),k.triggerDataEvent(b,!0),w.value=""}function c(b,w,k){const x=k.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(o,"__esModule",{value:!0}),o.rightClickHandler=o.moveTextAreaUnderMouseCursor=o.paste=o.handlePasteEvent=o.copyHandler=o.bracketTextForPaste=o.prepareTextForTerminal=void 0,o.prepareTextForTerminal=u,o.bracketTextForPaste=h,o.copyHandler=function(b,w){b.clipboardData&&b.clipboardData.setData("text/plain",w.selectionText),b.preventDefault()},o.handlePasteEvent=function(b,w,k,x){b.stopPropagation(),b.clipboardData&&d(b.clipboardData.getData("text/plain"),w,k,x)},o.paste=d,o.moveTextAreaUnderMouseCursor=c,o.rightClickHandler=function(b,w,k,x,S){c(b,w,k),S&&x.rightClickSelect(b),w.value=x.selectionText,w.select()}},7239:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;const h=u(1505);o.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(d,c,b){this._css.set(d,c,b)}getCss(d,c){return this._css.get(d,c)}setColor(d,c,b){this._color.set(d,c,b)}getColor(d,c){return this._color.get(d,c)}clear(){this._color.clear(),this._css.clear()}}},3656:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(u,h,d,c){u.addEventListener(h,d,c);let b=!1;return{dispose:()=>{b||(b=!0,u.removeEventListener(h,d,c))}}}},3551:function(m,o,u){var h=this&&this.__decorate||function(_,p,g,E){var M,T=arguments.length,O=T<3?p:E===null?E=Object.getOwnPropertyDescriptor(p,g):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(_,p,g,E);else for(var A=_.length-1;A>=0;A--)(M=_[A])&&(O=(T<3?M(O):T>3?M(p,g,O):M(p,g))||O);return T>3&&O&&Object.defineProperty(p,g,O),O},d=this&&this.__param||function(_,p){return function(g,E){p(g,E,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier=void 0;const c=u(3656),b=u(8460),w=u(844),k=u(2585),x=u(4725);let S=o.Linkifier=class extends w.Disposable{get currentLink(){return this._currentLink}constructor(_,p,g,E,M){super(),this._element=_,this._mouseService=p,this._renderService=g,this._bufferService=E,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 T;this._lastMouseEvent=void 0,(T=this._activeProviderReplies)==null||T.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,c.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,c.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,c.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,c.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(_){this._lastMouseEvent=_;const p=this._positionFromMouseEvent(_,this._element,this._mouseService);if(!p)return;this._isMouseOut=!1;const g=_.composedPath();for(let E=0;E<g.length;E++){const M=g[E];if(M.classList.contains("xterm"))break;if(M.classList.contains("xterm-hover"))return}this._lastBufferCell&&p.x===this._lastBufferCell.x&&p.y===this._lastBufferCell.y||(this._handleHover(p),this._lastBufferCell=p)}_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(_,p){var E,M;this._activeProviderReplies&&p||((E=this._activeProviderReplies)==null||E.forEach((T=>{T==null||T.forEach((O=>{O.link.dispose&&O.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=_.y);let g=!1;for(const[T,O]of this._linkProviderService.linkProviders.entries())p?(M=this._activeProviderReplies)!=null&&M.get(T)&&(g=this._checkLinkProviderResult(T,_,g)):O.provideLinks(_.y,(A=>{var j,F;if(this._isMouseOut)return;const B=A==null?void 0:A.map((V=>({link:V})));(j=this._activeProviderReplies)==null||j.set(T,B),g=this._checkLinkProviderResult(T,_,g),((F=this._activeProviderReplies)==null?void 0:F.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(_.y,this._activeProviderReplies)}))}_removeIntersectingLinks(_,p){const g=new Set;for(let E=0;E<p.size;E++){const M=p.get(E);if(M)for(let T=0;T<M.length;T++){const O=M[T],A=O.link.range.start.y<_?0:O.link.range.start.x,B=O.link.range.end.y>_?this._bufferService.cols:O.link.range.end.x;for(let j=A;j<=B;j++){if(g.has(j)){M.splice(T--,1);break}g.add(j)}}}}_checkLinkProviderResult(_,p,g){var T;if(!this._activeProviderReplies)return g;const E=this._activeProviderReplies.get(_);let M=!1;for(let O=0;O<_;O++)this._activeProviderReplies.has(O)&&!this._activeProviderReplies.get(O)||(M=!0);if(!M&&E){const O=E.find((A=>this._linkAtPosition(A.link,p)));O&&(g=!0,this._handleNewLink(O))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!g)for(let O=0;O<this._activeProviderReplies.size;O++){const A=(T=this._activeProviderReplies.get(O))==null?void 0:T.find((B=>this._linkAtPosition(B.link,p)));if(A){g=!0,this._handleNewLink(A);break}}return g}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(_){if(!this._currentLink)return;const p=this._positionFromMouseEvent(_,this._element,this._mouseService);p&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,p)&&this._currentLink.link.activate(_,this._currentLink.link.text)}_clearCurrentLink(_,p){this._currentLink&&this._lastMouseEvent&&(!_||!p||this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=p)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,w.disposeArray)(this._linkCacheDisposables))}_handleNewLink(_){if(!this._lastMouseEvent)return;const p=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);p&&this._linkAtPosition(_.link,p)&&(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 g,E;return(E=(g=this._currentLink)==null?void 0:g.state)==null?void 0:E.decorations.pointerCursor},set:g=>{var E;(E=this._currentLink)!=null&&E.state&&this._currentLink.state.decorations.pointerCursor!==g&&(this._currentLink.state.decorations.pointerCursor=g,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",g))}},underline:{get:()=>{var g,E;return(E=(g=this._currentLink)==null?void 0:g.state)==null?void 0:E.decorations.underline},set:g=>{var E,M,T;(E=this._currentLink)!=null&&E.state&&((T=(M=this._currentLink)==null?void 0:M.state)==null?void 0:T.decorations.underline)!==g&&(this._currentLink.state.decorations.underline=g,this._currentLink.state.isHovered&&this._fireUnderlineEvent(_.link,g))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((g=>{if(!this._currentLink)return;const E=g.start===0?0:g.start+1+this._bufferService.buffer.ydisp,M=this._bufferService.buffer.ydisp+1+g.end;if(this._currentLink.link.range.start.y>=E&&this._currentLink.link.range.end.y<=M&&(this._clearCurrentLink(E,M),this._lastMouseEvent)){const T=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);T&&this._askForLink(T,!1)}}))))}_linkHover(_,p,g){var E;(E=this._currentLink)!=null&&E.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(p,!0),this._currentLink.state.decorations.pointerCursor&&_.classList.add("xterm-cursor-pointer")),p.hover&&p.hover(g,p.text)}_fireUnderlineEvent(_,p){const g=_.range,E=this._bufferService.buffer.ydisp,M=this._createLinkUnderlineEvent(g.start.x-1,g.start.y-E-1,g.end.x,g.end.y-E-1,void 0);(p?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(M)}_linkLeave(_,p,g){var E;(E=this._currentLink)!=null&&E.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(p,!1),this._currentLink.state.decorations.pointerCursor&&_.classList.remove("xterm-cursor-pointer")),p.leave&&p.leave(g,p.text)}_linkAtPosition(_,p){const g=_.range.start.y*this._bufferService.cols+_.range.start.x,E=_.range.end.y*this._bufferService.cols+_.range.end.x,M=p.y*this._bufferService.cols+p.x;return g<=M&&M<=E}_positionFromMouseEvent(_,p,g){const E=g.getCoords(_,p,this._bufferService.cols,this._bufferService.rows);if(E)return{x:E[0],y:E[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(_,p,g,E,M){return{x1:_,y1:p,x2:g,y2:E,cols:this._bufferService.cols,fg:M}}};o.Linkifier=S=h([d(1,x.IMouseService),d(2,x.IRenderService),d(3,k.IBufferService),d(4,x.ILinkProviderService)],S)},9042:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.tooMuchOutput=o.promptLabel=void 0,o.promptLabel="Terminal input",o.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(m,o,u){var h=this&&this.__decorate||function(x,S,_,p){var g,E=arguments.length,M=E<3?S:p===null?p=Object.getOwnPropertyDescriptor(S,_):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,S,_,p);else for(var T=x.length-1;T>=0;T--)(g=x[T])&&(M=(E<3?g(M):E>3?g(S,_,M):g(S,_))||M);return E>3&&M&&Object.defineProperty(S,_,M),M},d=this&&this.__param||function(x,S){return function(_,p){S(_,p,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkProvider=void 0;const c=u(511),b=u(2585);let w=o.OscLinkProvider=class{constructor(x,S,_){this._bufferService=x,this._optionsService=S,this._oscLinkService=_}provideLinks(x,S){var B;const _=this._bufferService.buffer.lines.get(x-1);if(!_)return void S(void 0);const p=[],g=this._optionsService.rawOptions.linkHandler,E=new c.CellData,M=_.getTrimmedLength();let T=-1,O=-1,A=!1;for(let j=0;j<M;j++)if(O!==-1||_.hasContent(j)){if(_.loadCell(j,E),E.hasExtendedAttrs()&&E.extended.urlId){if(O===-1){O=j,T=E.extended.urlId;continue}A=E.extended.urlId!==T}else O!==-1&&(A=!0);if(A||O!==-1&&j===M-1){const F=(B=this._oscLinkService.getLinkData(T))==null?void 0:B.uri;if(F){const V={start:{x:O+1,y:x},end:{x:j+(A||j!==M-1?0:1),y:x}};let q=!1;if(!(g!=null&&g.allowNonHttpProtocols))try{const W=new URL(F);["http:","https:"].includes(W.protocol)||(q=!0)}catch{q=!0}q||p.push({text:F,range:V,activate:(W,X)=>g?g.activate(W,X,V):k(0,X),hover:(W,X)=>{var G;return(G=g==null?void 0:g.hover)==null?void 0:G.call(g,W,X,V)},leave:(W,X)=>{var G;return(G=g==null?void 0:g.leave)==null?void 0:G.call(g,W,X,V)}})}A=!1,E.hasExtendedAttrs()&&E.extended.urlId?(O=j,T=E.extended.urlId):(O=-1,T=-1)}}S(p)}};function k(x,S){if(confirm(`Do you want to navigate to ${S}?
|
|
52
|
+
|
|
53
|
+
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")}}o.OscLinkProvider=w=h([d(0,b.IBufferService),d(1,b.IOptionsService),d(2,b.IOscLinkService)],w)},6193:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0,o.RenderDebouncer=class{constructor(u,h){this._renderCallback=u,this._coreBrowserService=h,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(u,h,d){this._rowCount=d,u=u!==void 0?u:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,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 u=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,h),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const h=u(3614),d=u(3656),c=u(3551),b=u(9042),w=u(3730),k=u(1680),x=u(3107),S=u(5744),_=u(2950),p=u(1296),g=u(428),E=u(4269),M=u(5114),T=u(8934),O=u(3230),A=u(9312),B=u(4725),j=u(6731),F=u(8055),V=u(8969),q=u(8460),W=u(844),X=u(6114),G=u(8437),J=u(2584),re=u(7399),H=u(5941),D=u(9074),L=u(2585),U=u(5435),z=u(4567),Z=u(779);class pe extends V.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=X,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new W.MutableDisposable),this._onCursorMove=this.register(new q.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new q.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new q.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new q.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new q.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new q.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new q.EventEmitter),this._onBlur=this.register(new q.EventEmitter),this._onA11yCharEmitter=this.register(new q.EventEmitter),this._onA11yTabEmitter=this.register(new q.EventEmitter),this._onWillOpen=this.register(new q.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(D.DecorationService),this._instantiationService.setService(L.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(Z.LinkProviderService),this._instantiationService.setService(B.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(w.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((P,ae)=>this.refresh(P,ae)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((P=>this._reportWindowsOptions(P)))),this.register(this._inputHandler.onColor((P=>this._handleColorEvent(P)))),this.register((0,q.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,q.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,q.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,q.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((P=>this._afterResize(P.cols,P.rows)))),this.register((0,W.toDisposable)((()=>{var P,ae;this._customKeyEventHandler=void 0,(ae=(P=this.element)==null?void 0:P.parentNode)==null||ae.removeChild(this.element)})))}_handleColorEvent(Y){if(this._themeService)for(const P of Y){let ae,ne="";switch(P.index){case 256:ae="foreground",ne="10";break;case 257:ae="background",ne="11";break;case 258:ae="cursor",ne="12";break;default:ae="ansi",ne="4;"+P.index}switch(P.type){case 0:const ge=F.color.toColorRGB(ae==="ansi"?this._themeService.colors.ansi[P.index]:this._themeService.colors[ae]);this.coreService.triggerDataEvent(`${J.C0.ESC}]${ne};${(0,H.toRgbString)(ge)}${J.C1_ESCAPED.ST}`);break;case 1:if(ae==="ansi")this._themeService.modifyColors((se=>se.ansi[P.index]=F.channels.toColor(...P.color)));else{const se=ae;this._themeService.modifyColors((Oe=>Oe[se]=F.channels.toColor(...P.color)))}break;case 2:this._themeService.restoreColor(P.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(z.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(Y){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.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(J.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,P=this.buffer.lines.get(Y);if(!P)return;const ae=Math.min(this.buffer.x,this.cols-1),ne=this._renderService.dimensions.css.cell.height,ge=P.getWidth(ae),se=this._renderService.dimensions.css.cell.width*ge,Oe=this.buffer.y*this._renderService.dimensions.css.cell.height,Te=ae*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Te+"px",this.textarea.style.top=Oe+"px",this.textarea.style.width=se+"px",this.textarea.style.height=ne+"px",this.textarea.style.lineHeight=ne+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,d.addDisposableDomListener)(this.element,"copy",(P=>{this.hasSelection()&&(0,h.copyHandler)(P,this._selectionService)})));const Y=P=>(0,h.handlePasteEvent)(P,this.textarea,this.coreService,this.optionsService);this.register((0,d.addDisposableDomListener)(this.textarea,"paste",Y)),this.register((0,d.addDisposableDomListener)(this.element,"paste",Y)),X.isFirefox?this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(P=>{P.button===2&&(0,h.rightClickHandler)(P,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,d.addDisposableDomListener)(this.element,"contextmenu",(P=>{(0,h.rightClickHandler)(P,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),X.isLinux&&this.register((0,d.addDisposableDomListener)(this.element,"auxclick",(P=>{P.button===1&&(0,h.moveTextAreaUnderMouseCursor)(P,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 ae;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"),((ae=this.element)==null?void 0:ae.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 P=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),P.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",(ne=>this.updateCursorStyle(ne)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),P.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",b.promptLabel),X.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(B.ICoreBrowserService,this._coreBrowserService),this.register((0,d.addDisposableDomListener)(this.textarea,"focus",(ne=>this._handleTextAreaFocus(ne)))),this.register((0,d.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(g.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(B.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(j.ThemeService),this._instantiationService.setService(B.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(E.CharacterJoinerService),this._instantiationService.setService(B.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(O.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(B.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((ne=>this._onRender.fire(ne)))),this.onResize((ne=>this._renderService.resize(ne.cols,ne.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(T.MouseService),this._instantiationService.setService(B.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(c.Linkifier,this.screenElement)),this.element.appendChild(P);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(k.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((ne=>this.scrollLines(ne.amount,ne.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(A.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(B.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ne=>this.scrollLines(ne.amount,ne.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ne=>this._renderService.handleSelectionChanged(ne.start,ne.end,ne.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ne=>{this.textarea.value=ne,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ne=>{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",(ne=>this._selectionService.handleMouseDown(ne)))),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(z.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ne=>this._handleScreenReaderModeOptionChange(ne)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(S.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ne=>{!this._overviewRulerRenderer&&ne&&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(p.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const Y=this,P=this.element;function ae(se){const Oe=Y._mouseService.getMouseReportCoords(se,Y.screenElement);if(!Oe)return!1;let Te,ve;switch(se.overrideType||se.type){case"mousemove":ve=32,se.buttons===void 0?(Te=3,se.button!==void 0&&(Te=se.button<3?se.button:3)):Te=1&se.buttons?0:4&se.buttons?1:2&se.buttons?2:3;break;case"mouseup":ve=0,Te=se.button<3?se.button:3;break;case"mousedown":ve=1,Te=se.button<3?se.button:3;break;case"wheel":if(Y._customWheelEventHandler&&Y._customWheelEventHandler(se)===!1||Y.viewport.getLinesScrolled(se)===0)return!1;ve=se.deltaY<0?0:1,Te=4;break;default:return!1}return!(ve===void 0||Te===void 0||Te>4)&&Y.coreMouseService.triggerMouseEvent({col:Oe.col,row:Oe.row,x:Oe.x,y:Oe.y,button:Te,action:ve,ctrl:se.ctrlKey,alt:se.altKey,shift:se.shiftKey})}const ne={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ge={mouseup:se=>(ae(se),se.buttons||(this._document.removeEventListener("mouseup",ne.mouseup),ne.mousedrag&&this._document.removeEventListener("mousemove",ne.mousedrag)),this.cancel(se)),wheel:se=>(ae(se),this.cancel(se,!0)),mousedrag:se=>{se.buttons&&ae(se)},mousemove:se=>{se.buttons||ae(se)}};this.register(this.coreMouseService.onProtocolChange((se=>{se?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(se)),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&se?ne.mousemove||(P.addEventListener("mousemove",ge.mousemove),ne.mousemove=ge.mousemove):(P.removeEventListener("mousemove",ne.mousemove),ne.mousemove=null),16&se?ne.wheel||(P.addEventListener("wheel",ge.wheel,{passive:!1}),ne.wheel=ge.wheel):(P.removeEventListener("wheel",ne.wheel),ne.wheel=null),2&se?ne.mouseup||(ne.mouseup=ge.mouseup):(this._document.removeEventListener("mouseup",ne.mouseup),ne.mouseup=null),4&se?ne.mousedrag||(ne.mousedrag=ge.mousedrag):(this._document.removeEventListener("mousemove",ne.mousedrag),ne.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,d.addDisposableDomListener)(P,"mousedown",(se=>{if(se.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(se))return ae(se),ne.mouseup&&this._document.addEventListener("mouseup",ne.mouseup),ne.mousedrag&&this._document.addEventListener("mousemove",ne.mousedrag),this.cancel(se)}))),this.register((0,d.addDisposableDomListener)(P,"wheel",(se=>{if(!ne.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(se)===!1)return!1;if(!this.buffer.hasScrollback){const Oe=this.viewport.getLinesScrolled(se);if(Oe===0)return;const Te=J.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(se.deltaY<0?"A":"B");let ve="";for(let Be=0;Be<Math.abs(Oe);Be++)ve+=Te;return this.coreService.triggerDataEvent(ve,!0),this.cancel(se,!0)}return this.viewport.handleWheel(se)?this.cancel(se):void 0}}),{passive:!1})),this.register((0,d.addDisposableDomListener)(P,"touchstart",(se=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(se),this.cancel(se)}),{passive:!0})),this.register((0,d.addDisposableDomListener)(P,"touchmove",(se=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(se)?void 0:this.cancel(se)}),{passive:!1}))}refresh(Y,P){var ae;(ae=this._renderService)==null||ae.refreshRows(Y,P)}updateCursorStyle(Y){var P;(P=this._selectionService)!=null&&P.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,P,ae=0){var ne;ae===1?(super.scrollLines(Y,P,ae),this.refresh(0,this.rows-1)):(ne=this.viewport)==null||ne.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 P=this._characterJoinerService.register(Y);return this.refresh(0,this.rows-1),P}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,P,ae){this._selectionService.setSelection(Y,P,ae)}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,P){var ae;(ae=this._selectionService)==null||ae.selectLines(Y,P)}_keyDown(Y){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1)return!1;const P=this.browser.isMac&&this.options.macOptionIsMeta&&Y.altKey;if(!P&&!this._compositionHelper.keydown(Y))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;P||Y.key!=="Dead"&&Y.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ae=(0,re.evaluateKeyboardEvent)(Y,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(Y),ae.type===3||ae.type===2){const ne=this.rows-1;return this.scrollLines(ae.type===2?-ne:ne),this.cancel(Y,!0)}return ae.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,Y)||(ae.cancel&&this.cancel(Y,!0),!ae.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):(ae.key!==J.C0.ETX&&ae.key!==J.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ae.key,domEvent:Y}),this._showCursor(),this.coreService.triggerDataEvent(ae.key,!0),!this.optionsService.rawOptions.screenReaderMode||Y.altKey||Y.ctrlKey?this.cancel(Y,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(Y,P){const ae=Y.isMac&&!this.options.macOptionIsMeta&&P.altKey&&!P.ctrlKey&&!P.metaKey||Y.isWindows&&P.altKey&&P.ctrlKey&&!P.metaKey||Y.isWindows&&P.getModifierState("AltGraph");return P.type==="keypress"?ae:ae&&(!P.keyCode||P.keyCode>47)}_keyUp(Y){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1||((function(P){return P.keyCode===16||P.keyCode===17||P.keyCode===18})(Y)||this.focus(),this.updateCursorStyle(Y),this._keyPressHandled=!1)}_keyPress(Y){let P;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1)return!1;if(this.cancel(Y),Y.charCode)P=Y.charCode;else if(Y.which===null||Y.which===void 0)P=Y.keyCode;else{if(Y.which===0||Y.charCode===0)return!1;P=Y.which}return!(!P||(Y.altKey||Y.ctrlKey||Y.metaKey)&&!this._isThirdLevelShift(this.browser,Y)||(P=String.fromCharCode(P),this._onKey.fire({key:P,domEvent:Y}),this._showCursor(),this.coreService.triggerDataEvent(P,!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 P=Y.data;return this.coreService.triggerDataEvent(P,!0),this.cancel(Y),!0}return!1}resize(Y,P){Y!==this.cols||P!==this.rows?super.resize(Y,P):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(Y,P){var ae,ne;(ae=this._charSizeService)==null||ae.measure(),(ne=this.viewport)==null||ne.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 P=1;P<this.rows;P++)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 P,ae;this.options.rows=this.rows,this.options.cols=this.cols;const Y=this._customKeyEventHandler;this._setup(),super.reset(),(P=this._selectionService)==null||P.reset(),this._decorationService.reset(),(ae=this.viewport)==null||ae.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(J.C0.ESC+"[I"):this.coreService.triggerDataEvent(J.C0.ESC+"[O")}_reportWindowsOptions(Y){if(this._renderService)switch(Y){case U.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const P=this._renderService.dimensions.css.canvas.width.toFixed(0),ae=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${J.C0.ESC}[4;${ae};${P}t`);break;case U.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ne=this._renderService.dimensions.css.cell.width.toFixed(0),ge=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${J.C0.ESC}[6;${ge};${ne}t`)}}cancel(Y,P){if(this.options.cancelEvents||P)return Y.preventDefault(),Y.stopPropagation(),!1}}o.Terminal=pe},9924:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0,o.TimeBasedDebouncer=class{constructor(u,h=1e3){this._renderCallback=u,this._debounceThresholdMS=h,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,h,d){this._rowCount=d,u=u!==void 0?u:0,h=h!==void 0?h:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,h):h;const c=Date.now();if(c-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=c,this._innerRefresh();else if(!this._additionalRefreshRequested){const b=c-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 u=Math.max(this._rowStart,0),h=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,h)}}},1680:function(m,o,u){var h=this&&this.__decorate||function(_,p,g,E){var M,T=arguments.length,O=T<3?p:E===null?E=Object.getOwnPropertyDescriptor(p,g):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(_,p,g,E);else for(var A=_.length-1;A>=0;A--)(M=_[A])&&(O=(T<3?M(O):T>3?M(p,g,O):M(p,g))||O);return T>3&&O&&Object.defineProperty(p,g,O),O},d=this&&this.__param||function(_,p){return function(g,E){p(g,E,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const c=u(3656),b=u(4725),w=u(8460),k=u(844),x=u(2585);let S=o.Viewport=class extends k.Disposable{constructor(_,p,g,E,M,T,O,A){super(),this._viewportElement=_,this._scrollArea=p,this._bufferService=g,this._optionsService=E,this._charSizeService=M,this._renderService=T,this._coreBrowserService=O,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,c.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((B=>this._activeBuffer=B.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((B=>this._renderDimensions=B))),this._handleThemeChange(A.colors),this.register(A.onChangeColors((B=>this._handleThemeChange(B)))),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 p=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==p&&(this._lastRecordedBufferHeight=p,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 p=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:p,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(_,p){const g=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(p<0&&this._viewportElement.scrollTop!==0||p>0&&g<this._lastRecordedBufferHeight)||(_.cancelable&&_.preventDefault(),!1)}handleWheel(_){const p=this._getPixelsScrolled(_);return p!==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+p:this._smoothScrollState.target+=p,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=p,this._bubbleScroll(_,p))}scrollLines(_){if(_!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const p=_*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+p,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 p=this._applyScrollModifier(_.deltaY,_);return _.deltaMode===WheelEvent.DOM_DELTA_LINE?p*=this._currentRowHeight:_.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(p*=this._currentRowHeight*this._bufferService.rows),p}getBufferElements(_,p){var A;let g,E="";const M=[],T=p??this._bufferService.buffer.lines.length,O=this._bufferService.buffer.lines;for(let B=_;B<T;B++){const j=O.get(B);if(!j)continue;const F=(A=O.get(B+1))==null?void 0:A.isWrapped;if(E+=j.translateToString(!F),!F||B===O.length-1){const V=document.createElement("div");V.textContent=E,M.push(V),E.length>0&&(g=V),E=""}}return{bufferElements:M,cursorElement:g}}getLinesScrolled(_){if(_.deltaY===0||_.shiftKey)return 0;let p=this._applyScrollModifier(_.deltaY,_);return _.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(p/=this._currentRowHeight+0,this._wheelPartialScroll+=p,p=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):_.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(p*=this._bufferService.rows),p}_applyScrollModifier(_,p){const g=this._optionsService.rawOptions.fastScrollModifier;return g==="alt"&&p.altKey||g==="ctrl"&&p.ctrlKey||g==="shift"&&p.shiftKey?_*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:_*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(_){this._lastTouchY=_.touches[0].pageY}handleTouchMove(_){const p=this._lastTouchY-_.touches[0].pageY;return this._lastTouchY=_.touches[0].pageY,p!==0&&(this._viewportElement.scrollTop+=p,this._bubbleScroll(_,p))}};o.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(m,o,u){var h=this&&this.__decorate||function(x,S,_,p){var g,E=arguments.length,M=E<3?S:p===null?p=Object.getOwnPropertyDescriptor(S,_):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,S,_,p);else for(var T=x.length-1;T>=0;T--)(g=x[T])&&(M=(E<3?g(M):E>3?g(S,_,M):g(S,_))||M);return E>3&&M&&Object.defineProperty(S,_,M),M},d=this&&this.__param||function(x,S){return function(_,p){S(_,p,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;const c=u(4725),b=u(844),w=u(2585);let k=o.BufferDecorationRenderer=class extends b.Disposable{constructor(x,S,_,p,g){super(),this._screenElement=x,this._bufferService=S,this._coreBrowserService=_,this._decorationService=p,this._renderService=g,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((E=>this._removeDecoration(E)))),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 p;const S=this._coreBrowserService.mainDocument.createElement("div");S.classList.add("xterm-decoration"),S.classList.toggle("xterm-decoration-top-layer",((p=x==null?void 0:x.options)==null?void 0:p.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()}};o.BufferDecorationRenderer=k=h([d(1,w.IBufferService),d(2,c.ICoreBrowserService),d(3,w.IDecorationService),d(4,c.IRenderService)],k)},5871:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorZoneStore=void 0,o.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(u){if(u.options.overviewRulerOptions){for(const h of this._zones)if(h.color===u.options.overviewRulerOptions.color&&h.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(h,u.marker.line))return;if(this._lineAdjacentToZone(h,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(h,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,h){return h>=u.startBufferLine&&h<=u.endBufferLine}_lineAdjacentToZone(u,h,d){return h>=u.startBufferLine-this._linePadding[d||"full"]&&h<=u.endBufferLine+this._linePadding[d||"full"]}_addLineToZone(u,h){u.startBufferLine=Math.min(u.startBufferLine,h),u.endBufferLine=Math.max(u.endBufferLine,h)}}},5744:function(m,o,u){var h=this&&this.__decorate||function(g,E,M,T){var O,A=arguments.length,B=A<3?E:T===null?T=Object.getOwnPropertyDescriptor(E,M):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(g,E,M,T);else for(var j=g.length-1;j>=0;j--)(O=g[j])&&(B=(A<3?O(B):A>3?O(E,M,B):O(E,M))||B);return A>3&&B&&Object.defineProperty(E,M,B),B},d=this&&this.__param||function(g,E){return function(M,T){E(M,T,g)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const c=u(5871),b=u(4725),w=u(844),k=u(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 p=o.OverviewRulerRenderer=class extends w.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(g,E,M,T,O,A,B){var F;super(),this._viewportElement=g,this._screenElement=E,this._bufferService=M,this._decorationService=T,this._renderService=O,this._optionsService=A,this._coreBrowserService=B,this._colorZoneStore=new c.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(),(F=this._viewportElement.parentElement)==null||F.insertBefore(this._canvas,this._viewportElement);const j=this._canvas.getContext("2d");if(!j)throw new Error("Ctx cannot be null");this._ctx=j,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,w.toDisposable)((()=>{var V;(V=this._canvas)==null||V.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 g=Math.floor(this._canvas.width/3),E=Math.ceil(this._canvas.width/3);S.full=this._canvas.width,S.left=g,S.center=E,S.right=g,this._refreshDrawHeightConstants(),_.full=0,_.left=0,_.center=S.left,_.right=S.left+S.center}_refreshDrawHeightConstants(){x.full=Math.round(2*this._coreBrowserService.dpr);const g=this._canvas.height/this._bufferService.buffer.lines.length,E=Math.round(Math.max(Math.min(g,12),6)*this._coreBrowserService.dpr);x.left=E,x.center=E,x.right=E}_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 E of this._decorationService.decorations)this._colorZoneStore.addDecoration(E);this._ctx.lineWidth=1;const g=this._colorZoneStore.zones;for(const E of g)E.position!=="full"&&this._renderColorZone(E);for(const E of g)E.position==="full"&&this._renderColorZone(E);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(g){this._ctx.fillStyle=g.color,this._ctx.fillRect(_[g.position||"full"],Math.round((this._canvas.height-1)*(g.startBufferLine/this._bufferService.buffers.active.lines.length)-x[g.position||"full"]/2),S[g.position||"full"],Math.round((this._canvas.height-1)*((g.endBufferLine-g.startBufferLine)/this._bufferService.buffers.active.lines.length)+x[g.position||"full"]))}_queueRefresh(g,E){this._shouldUpdateDimensions=g||this._shouldUpdateDimensions,this._shouldUpdateAnchor=E||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};o.OverviewRulerRenderer=p=h([d(2,k.IBufferService),d(3,k.IDecorationService),d(4,b.IRenderService),d(5,k.IOptionsService),d(6,b.ICoreBrowserService)],p)},2950:function(m,o,u){var h=this&&this.__decorate||function(x,S,_,p){var g,E=arguments.length,M=E<3?S:p===null?p=Object.getOwnPropertyDescriptor(S,_):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,S,_,p);else for(var T=x.length-1;T>=0;T--)(g=x[T])&&(M=(E<3?g(M):E>3?g(S,_,M):g(S,_))||M);return E>3&&M&&Object.defineProperty(S,_,M),M},d=this&&this.__param||function(x,S){return function(_,p){S(_,p,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;const c=u(4725),b=u(2585),w=u(2584);let k=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(x,S,_,p,g,E){this._textarea=x,this._compositionView=S,this._bufferService=_,this._optionsService=p,this._coreService=g,this._renderService=E,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,p=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,g=S*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=g+"px",this._compositionView.style.top=p+"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 E=this._compositionView.getBoundingClientRect();this._textarea.style.left=g+"px",this._textarea.style.top=p+"px",this._textarea.style.width=Math.max(E.width,1)+"px",this._textarea.style.height=Math.max(E.height,1)+"px",this._textarea.style.lineHeight=E.height+"px"}x||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};o.CompositionHelper=k=h([d(2,b.IBufferService),d(3,b.IOptionsService),d(4,b.ICoreService),d(5,c.IRenderService)],k)},9806:(m,o)=>{function u(h,d,c){const b=c.getBoundingClientRect(),w=h.getComputedStyle(c),k=parseInt(w.getPropertyValue("padding-left")),x=parseInt(w.getPropertyValue("padding-top"));return[d.clientX-b.left-k,d.clientY-b.top-x]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=u,o.getCoords=function(h,d,c,b,w,k,x,S,_){if(!k)return;const p=u(h,d,c);return p?(p[0]=Math.ceil((p[0]+(_?x/2:0))/x),p[1]=Math.ceil(p[1]/S),p[0]=Math.min(Math.max(p[0],1),b+(_?1:0)),p[1]=Math.min(Math.max(p[1],1),w),p):void 0}},9504:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const h=u(2584);function d(S,_,p,g){const E=S-c(S,p),M=_-c(_,p),T=Math.abs(E-M)-(function(O,A,B){let j=0;const F=O-c(O,B),V=A-c(A,B);for(let q=0;q<Math.abs(F-V);q++){const W=b(O,A)==="A"?-1:1,X=B.buffer.lines.get(F+W*q);X!=null&&X.isWrapped&&j++}return j})(S,_,p);return x(T,k(b(S,_),g))}function c(S,_){let p=0,g=_.buffer.lines.get(S),E=g==null?void 0:g.isWrapped;for(;E&&S>=0&&S<_.rows;)p++,g=_.buffer.lines.get(--S),E=g==null?void 0:g.isWrapped;return p}function b(S,_){return S>_?"A":"B"}function w(S,_,p,g,E,M){let T=S,O=_,A="";for(;T!==p||O!==g;)T+=E?1:-1,E&&T>M.cols-1?(A+=M.buffer.translateBufferLineToString(O,!1,S,T),T=0,S=0,O++):!E&&T<0&&(A+=M.buffer.translateBufferLineToString(O,!1,0,S+1),T=M.cols-1,S=T,O--);return A+M.buffer.translateBufferLineToString(O,!1,S,T)}function k(S,_){const p=_?"O":"[";return h.C0.ESC+p+S}function x(S,_){S=Math.floor(S);let p="";for(let g=0;g<S;g++)p+=_;return p}o.moveToCellSequence=function(S,_,p,g){const E=p.buffer.x,M=p.buffer.y;if(!p.buffer.hasScrollback)return(function(A,B,j,F,V,q){return d(B,F,V,q).length===0?"":x(w(A,B,A,B-c(B,V),!1,V).length,k("D",q))})(E,M,0,_,p,g)+d(M,_,p,g)+(function(A,B,j,F,V,q){let W;W=d(B,F,V,q).length>0?F-c(F,V):B;const X=F,G=(function(J,re,H,D,L,U){let z;return z=d(H,D,L,U).length>0?D-c(D,L):re,J<H&&z<=D||J>=H&&z<D?"C":"D"})(A,B,j,F,V,q);return x(w(A,W,j,X,G==="C",V).length,k(G,q))})(E,M,S,_,p,g);let T;if(M===_)return T=E>S?"D":"C",x(Math.abs(E-S),k(T,g));T=M>_?"D":"C";const O=Math.abs(M-_);return x((function(A,B){return B.cols-A})(M>_?S:E,p)+(O-1)*p.cols+1+((M>_?E:S)-1),k(T,g))}},1296:function(m,o,u){var h=this&&this.__decorate||function(q,W,X,G){var J,re=arguments.length,H=re<3?W:G===null?G=Object.getOwnPropertyDescriptor(W,X):G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(q,W,X,G);else for(var D=q.length-1;D>=0;D--)(J=q[D])&&(H=(re<3?J(H):re>3?J(W,X,H):J(W,X))||H);return re>3&&H&&Object.defineProperty(W,X,H),H},d=this&&this.__param||function(q,W){return function(X,G){W(X,G,q)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const c=u(3787),b=u(2550),w=u(2223),k=u(6171),x=u(6052),S=u(4725),_=u(8055),p=u(8460),g=u(844),E=u(2585),M="xterm-dom-renderer-owner-",T="xterm-rows",O="xterm-fg-",A="xterm-bg-",B="xterm-focus",j="xterm-selection";let F=1,V=o.DomRenderer=class extends g.Disposable{constructor(q,W,X,G,J,re,H,D,L,U,z,Z,pe){super(),this._terminal=q,this._document=W,this._element=X,this._screenElement=G,this._viewportElement=J,this._helperContainer=re,this._linkifier2=H,this._charSizeService=L,this._optionsService=U,this._bufferService=z,this._coreBrowserService=Z,this._themeService=pe,this._terminalClass=F++,this._rowElements=[],this._selectionRenderModel=(0,x.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new p.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(T),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(j),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,k.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=D.createInstance(c.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,g.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 q=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*q,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*q),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/q),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/q),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 X of this._rowElements)X.style.width=`${this.dimensions.css.canvas.width}px`,X.style.height=`${this.dimensions.css.cell.height}px`,X.style.lineHeight=`${this.dimensions.css.cell.height}px`,X.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const W=`${this._terminalSelector} .${T} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=W,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(q){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let W=`${this._terminalSelector} .${T} { color: ${q.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;W+=`${this._terminalSelector} .${T} .xterm-dim { color: ${_.color.multiplyOpacity(q.foreground,.5).css};}`,W+=`${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 X=`blink_underline_${this._terminalClass}`,G=`blink_bar_${this._terminalClass}`,J=`blink_block_${this._terminalClass}`;W+=`@keyframes ${X} { 50% { border-bottom-style: hidden; }}`,W+=`@keyframes ${G} { 50% { box-shadow: none; }}`,W+=`@keyframes ${J} { 0% { background-color: ${q.cursor.css}; color: ${q.cursorAccent.css}; } 50% { background-color: inherit; color: ${q.cursor.css}; }}`,W+=`${this._terminalSelector} .${T}.${B} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${X} 1s step-end infinite;}${this._terminalSelector} .${T}.${B} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${G} 1s step-end infinite;}${this._terminalSelector} .${T}.${B} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${J} 1s step-end infinite;}${this._terminalSelector} .${T} .xterm-cursor.xterm-cursor-block { background-color: ${q.cursor.css}; color: ${q.cursorAccent.css};}${this._terminalSelector} .${T} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${q.cursor.css} !important; color: ${q.cursorAccent.css} !important;}${this._terminalSelector} .${T} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${q.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${T} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${q.cursor.css} inset;}${this._terminalSelector} .${T} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${q.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,W+=`${this._terminalSelector} .${j} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${j} div { position: absolute; background-color: ${q.selectionBackgroundOpaque.css};}${this._terminalSelector} .${j} div { position: absolute; background-color: ${q.selectionInactiveBackgroundOpaque.css};}`;for(const[re,H]of q.ansi.entries())W+=`${this._terminalSelector} .${O}${re} { color: ${H.css}; }${this._terminalSelector} .${O}${re}.xterm-dim { color: ${_.color.multiplyOpacity(H,.5).css}; }${this._terminalSelector} .${A}${re} { background-color: ${H.css}; }`;W+=`${this._terminalSelector} .${O}${w.INVERTED_DEFAULT_COLOR} { color: ${_.color.opaque(q.background).css}; }${this._terminalSelector} .${O}${w.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${_.color.multiplyOpacity(_.color.opaque(q.background),.5).css}; }${this._terminalSelector} .${A}${w.INVERTED_DEFAULT_COLOR} { background-color: ${q.foreground.css}; }`,this._themeStyleElement.textContent=W}_setDefaultSpacing(){const q=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${q}px`,this._rowFactory.defaultSpacing=q}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(q,W){for(let X=this._rowElements.length;X<=W;X++){const G=this._document.createElement("div");this._rowContainer.appendChild(G),this._rowElements.push(G)}for(;this._rowElements.length>W;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(q,W){this._refreshRowElements(q,W),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(B),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(B),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(q,W,X){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(q,W,X),this.renderRows(0,this._bufferService.rows-1),!q||!W)return;this._selectionRenderModel.update(this._terminal,q,W,X);const G=this._selectionRenderModel.viewportStartRow,J=this._selectionRenderModel.viewportEndRow,re=this._selectionRenderModel.viewportCappedStartRow,H=this._selectionRenderModel.viewportCappedEndRow;if(re>=this._bufferService.rows||H<0)return;const D=this._document.createDocumentFragment();if(X){const L=q[0]>W[0];D.appendChild(this._createSelectionElement(re,L?W[0]:q[0],L?q[0]:W[0],H-re+1))}else{const L=G===re?q[0]:0,U=re===J?W[0]:this._bufferService.cols;D.appendChild(this._createSelectionElement(re,L,U));const z=H-re-1;if(D.appendChild(this._createSelectionElement(re+1,0,this._bufferService.cols,z)),re!==H){const Z=J===H?W[0]:this._bufferService.cols;D.appendChild(this._createSelectionElement(H,0,Z))}}this._selectionContainer.appendChild(D)}_createSelectionElement(q,W,X,G=1){const J=this._document.createElement("div"),re=W*this.dimensions.css.cell.width;let H=this.dimensions.css.cell.width*(X-W);return re+H>this.dimensions.css.canvas.width&&(H=this.dimensions.css.canvas.width-re),J.style.height=G*this.dimensions.css.cell.height+"px",J.style.top=q*this.dimensions.css.cell.height+"px",J.style.left=`${re}px`,J.style.width=`${H}px`,J}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 q of this._rowElements)q.replaceChildren()}renderRows(q,W){const X=this._bufferService.buffer,G=X.ybase+X.y,J=Math.min(X.x,this._bufferService.cols-1),re=this._optionsService.rawOptions.cursorBlink,H=this._optionsService.rawOptions.cursorStyle,D=this._optionsService.rawOptions.cursorInactiveStyle;for(let L=q;L<=W;L++){const U=L+X.ydisp,z=this._rowElements[L],Z=X.lines.get(U);if(!z||!Z)break;z.replaceChildren(...this._rowFactory.createRow(Z,U,U===G,H,D,J,re,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${M}${this._terminalClass}`}_handleLinkHover(q){this._setCellUnderline(q.x1,q.x2,q.y1,q.y2,q.cols,!0)}_handleLinkLeave(q){this._setCellUnderline(q.x1,q.x2,q.y1,q.y2,q.cols,!1)}_setCellUnderline(q,W,X,G,J,re){X<0&&(q=0),G<0&&(W=0);const H=this._bufferService.rows-1;X=Math.max(Math.min(X,H),0),G=Math.max(Math.min(G,H),0),J=Math.min(J,this._bufferService.cols);const D=this._bufferService.buffer,L=D.ybase+D.y,U=Math.min(D.x,J-1),z=this._optionsService.rawOptions.cursorBlink,Z=this._optionsService.rawOptions.cursorStyle,pe=this._optionsService.rawOptions.cursorInactiveStyle;for(let me=X;me<=G;++me){const Y=me+D.ydisp,P=this._rowElements[me],ae=D.lines.get(Y);if(!P||!ae)break;P.replaceChildren(...this._rowFactory.createRow(ae,Y,Y===L,Z,pe,U,z,this.dimensions.css.cell.width,this._widthCache,re?me===X?q:0:-1,re?(me===G?W:J)-1:-1))}}};o.DomRenderer=V=h([d(7,E.IInstantiationService),d(8,S.ICharSizeService),d(9,E.IOptionsService),d(10,E.IBufferService),d(11,S.ICoreBrowserService),d(12,S.IThemeService)],V)},3787:function(m,o,u){var h=this&&this.__decorate||function(T,O,A,B){var j,F=arguments.length,V=F<3?O:B===null?B=Object.getOwnPropertyDescriptor(O,A):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(T,O,A,B);else for(var q=T.length-1;q>=0;q--)(j=T[q])&&(V=(F<3?j(V):F>3?j(O,A,V):j(O,A))||V);return F>3&&V&&Object.defineProperty(O,A,V),V},d=this&&this.__param||function(T,O){return function(A,B){O(A,B,T)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const c=u(2223),b=u(643),w=u(511),k=u(2585),x=u(8055),S=u(4725),_=u(4269),p=u(6171),g=u(3734);let E=o.DomRendererRowFactory=class{constructor(T,O,A,B,j,F,V){this._document=T,this._characterJoinerService=O,this._optionsService=A,this._coreBrowserService=B,this._coreService=j,this._decorationService=F,this._themeService=V,this._workCell=new w.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(T,O,A){this._selectionStart=T,this._selectionEnd=O,this._columnSelectMode=A}createRow(T,O,A,B,j,F,V,q,W,X,G){const J=[],re=this._characterJoinerService.getJoinedCharacters(O),H=this._themeService.colors;let D,L=T.getNoBgTrimmedLength();A&&L<F+1&&(L=F+1);let U=0,z="",Z=0,pe=0,me=0,Y=!1,P=0,ae=!1,ne=0;const ge=[],se=X!==-1&&G!==-1;for(let Oe=0;Oe<L;Oe++){T.loadCell(Oe,this._workCell);let Te=this._workCell.getWidth();if(Te===0)continue;let ve=!1,Be=Oe,ye=this._workCell;if(re.length>0&&Oe===re[0][0]){ve=!0;const Ie=re.shift();ye=new _.JoinedCellData(this._workCell,T.translateToString(!0,Ie[0],Ie[1]),Ie[1]-Ie[0]),Be=Ie[1]-1,Te=ye.getWidth()}const lt=this._isCellInSelection(Oe,O),Ye=A&&Oe===F,Tt=se&&Oe>=X&&Oe<=G;let Dt=!1;this._decorationService.forEachDecorationAtCell(Oe,O,void 0,(Ie=>{Dt=!0}));let wn=ye.getChars()||b.WHITESPACE_CELL_CHAR;if(wn===" "&&(ye.isUnderline()||ye.isOverline())&&(wn=" "),ne=Te*q-W.get(wn,ye.isBold(),ye.isItalic()),D){if(U&&(lt&&ae||!lt&&!ae&&ye.bg===Z)&&(lt&&ae&&H.selectionForeground||ye.fg===pe)&&ye.extended.ext===me&&Tt===Y&&ne===P&&!Ye&&!ve&&!Dt){ye.isInvisible()?z+=b.WHITESPACE_CELL_CHAR:z+=wn,U++;continue}U&&(D.textContent=z),D=this._document.createElement("span"),U=0,z=""}else D=this._document.createElement("span");if(Z=ye.bg,pe=ye.fg,me=ye.extended.ext,Y=Tt,P=ne,ae=lt,ve&&F>=Oe&&F<=Be&&(F=Oe),!this._coreService.isCursorHidden&&Ye&&this._coreService.isCursorInitialized){if(ge.push("xterm-cursor"),this._coreBrowserService.isFocused)V&&ge.push("xterm-cursor-blink"),ge.push(B==="bar"?"xterm-cursor-bar":B==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(j)switch(j){case"outline":ge.push("xterm-cursor-outline");break;case"block":ge.push("xterm-cursor-block");break;case"bar":ge.push("xterm-cursor-bar");break;case"underline":ge.push("xterm-cursor-underline")}}if(ye.isBold()&&ge.push("xterm-bold"),ye.isItalic()&&ge.push("xterm-italic"),ye.isDim()&&ge.push("xterm-dim"),z=ye.isInvisible()?b.WHITESPACE_CELL_CHAR:ye.getChars()||b.WHITESPACE_CELL_CHAR,ye.isUnderline()&&(ge.push(`xterm-underline-${ye.extended.underlineStyle}`),z===" "&&(z=" "),!ye.isUnderlineColorDefault()))if(ye.isUnderlineColorRGB())D.style.textDecorationColor=`rgb(${g.AttributeData.toColorRGB(ye.getUnderlineColor()).join(",")})`;else{let Ie=ye.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&ye.isBold()&&Ie<8&&(Ie+=8),D.style.textDecorationColor=H.ansi[Ie].css}ye.isOverline()&&(ge.push("xterm-overline"),z===" "&&(z=" ")),ye.isStrikethrough()&&ge.push("xterm-strikethrough"),Tt&&(D.style.textDecoration="underline");let Et=ye.getFgColor(),ht=ye.getFgColorMode(),zt=ye.getBgColor(),oe=ye.getBgColorMode();const Se=!!ye.isInverse();if(Se){const Ie=Et;Et=zt,zt=Ie;const We=ht;ht=oe,oe=We}let Ce,Re,Me,pt=!1;switch(this._decorationService.forEachDecorationAtCell(Oe,O,void 0,(Ie=>{Ie.options.layer!=="top"&&pt||(Ie.backgroundColorRGB&&(oe=50331648,zt=Ie.backgroundColorRGB.rgba>>8&16777215,Ce=Ie.backgroundColorRGB),Ie.foregroundColorRGB&&(ht=50331648,Et=Ie.foregroundColorRGB.rgba>>8&16777215,Re=Ie.foregroundColorRGB),pt=Ie.options.layer==="top")})),!pt&<&&(Ce=this._coreBrowserService.isFocused?H.selectionBackgroundOpaque:H.selectionInactiveBackgroundOpaque,zt=Ce.rgba>>8&16777215,oe=50331648,pt=!0,H.selectionForeground&&(ht=50331648,Et=H.selectionForeground.rgba>>8&16777215,Re=H.selectionForeground)),pt&&ge.push("xterm-decoration-top"),oe){case 16777216:case 33554432:Me=H.ansi[zt],ge.push(`xterm-bg-${zt}`);break;case 50331648:Me=x.channels.toColor(zt>>16,zt>>8&255,255&zt),this._addStyle(D,`background-color:#${M((zt>>>0).toString(16),"0",6)}`);break;default:Se?(Me=H.foreground,ge.push(`xterm-bg-${c.INVERTED_DEFAULT_COLOR}`)):Me=H.background}switch(Ce||ye.isDim()&&(Ce=x.color.multiplyOpacity(Me,.5)),ht){case 16777216:case 33554432:ye.isBold()&&Et<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Et+=8),this._applyMinimumContrast(D,Me,H.ansi[Et],ye,Ce,void 0)||ge.push(`xterm-fg-${Et}`);break;case 50331648:const Ie=x.channels.toColor(Et>>16&255,Et>>8&255,255&Et);this._applyMinimumContrast(D,Me,Ie,ye,Ce,Re)||this._addStyle(D,`color:#${M(Et.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(D,Me,H.foreground,ye,Ce,Re)||Se&&ge.push(`xterm-fg-${c.INVERTED_DEFAULT_COLOR}`)}ge.length&&(D.className=ge.join(" "),ge.length=0),Ye||ve||Dt?D.textContent=z:U++,ne!==this.defaultSpacing&&(D.style.letterSpacing=`${ne}px`),J.push(D),Oe=Be}return D&&U&&(D.textContent=z),J}_applyMinimumContrast(T,O,A,B,j,F){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,p.treatGlyphAsBackgroundColor)(B.getCode()))return!1;const V=this._getContrastCache(B);let q;if(j||F||(q=V.getColor(O.rgba,A.rgba)),q===void 0){const W=this._optionsService.rawOptions.minimumContrastRatio/(B.isDim()?2:1);q=x.color.ensureContrastRatio(j||O,F||A,W),V.setColor((j||O).rgba,(F||A).rgba,q??null)}return!!q&&(this._addStyle(T,`color:${q.css}`),!0)}_getContrastCache(T){return T.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(T,O){T.setAttribute("style",`${T.getAttribute("style")||""}${O};`)}_isCellInSelection(T,O){const A=this._selectionStart,B=this._selectionEnd;return!(!A||!B)&&(this._columnSelectMode?A[0]<=B[0]?T>=A[0]&&O>=A[1]&&T<B[0]&&O<=B[1]:T<A[0]&&O>=A[1]&&T>=B[0]&&O<=B[1]:O>A[1]&&O<B[1]||A[1]===B[1]&&O===A[1]&&T>=A[0]&&T<B[0]||A[1]<B[1]&&O===B[1]&&T<B[0]||A[1]<B[1]&&O===A[1]&&T>=A[0])}};function M(T,O,A){for(;T.length<A;)T=O+T;return T}o.DomRendererRowFactory=E=h([d(1,S.ICharacterJoinerService),d(2,k.IOptionsService),d(3,S.ICoreBrowserService),d(4,k.ICoreService),d(5,k.IDecorationService),d(6,S.IThemeService)],E)},2550:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WidthCache=void 0,o.WidthCache=class{constructor(u,h){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const d=u.createElement("span");d.classList.add("xterm-char-measure-element");const c=u.createElement("span");c.classList.add("xterm-char-measure-element"),c.style.fontWeight="bold";const b=u.createElement("span");b.classList.add("xterm-char-measure-element"),b.style.fontStyle="italic";const w=u.createElement("span");w.classList.add("xterm-char-measure-element"),w.style.fontWeight="bold",w.style.fontStyle="italic",this._measureElements=[d,c,b,w],this._container.appendChild(d),this._container.appendChild(c),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(u,h,d,c){u===this._font&&h===this._fontSize&&d===this._weight&&c===this._weightBold||(this._font=u,this._fontSize=h,this._weight=d,this._weightBold=c,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${d}`,this._measureElements[1].style.fontWeight=`${c}`,this._measureElements[2].style.fontWeight=`${d}`,this._measureElements[3].style.fontWeight=`${c}`,this.clear())}get(u,h,d){let c=0;if(!h&&!d&&u.length===1&&(c=u.charCodeAt(0))<256){if(this._flat[c]!==-9999)return this._flat[c];const k=this._measure(u,0);return k>0&&(this._flat[c]=k),k}let b=u;h&&(b+="B"),d&&(b+="I");let w=this._holey.get(b);if(w===void 0){let k=0;h&&(k|=1),d&&(k|=2),w=this._measure(u,k),w>0&&this._holey.set(b,w)}return w}_measure(u,h){const d=this._measureElements[h];return d.textContent=u.repeat(32),d.offsetWidth/32}}},2223:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const h=u(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=h.isFirefox||h.isLegacyEdge?"bottom":"ideographic"},6171:(m,o)=>{function u(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(o,"__esModule",{value:!0}),o.computeNextVariantOffset=o.createRenderDimensions=o.treatGlyphAsBackgroundColor=o.allowRescaling=o.isEmoji=o.isRestrictedPowerlineGlyph=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(d){if(!d)throw new Error("value must not be falsy");return d},o.isPowerlineGlyph=u,o.isRestrictedPowerlineGlyph=function(d){return 57520<=d&&d<=57527},o.isEmoji=h,o.allowRescaling=function(d,c,b,w){return c===1&&b>Math.ceil(1.5*w)&&d!==void 0&&d>255&&!h(d)&&!u(d)&&!(function(k){return 57344<=k&&k<=63743})(d)},o.treatGlyphAsBackgroundColor=function(d){return u(d)||(function(c){return 9472<=c&&c<=9631})(d)},o.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}}}},o.computeNextVariantOffset=function(d,c,b=0){return(d-(2*Math.round(c)-b))%(2*Math.round(c))}},6052:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createSelectionRenderModel=void 0;class u{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(d,c,b,w=!1){if(this.selectionStart=c,this.selectionEnd=b,!c||!b||c[0]===b[0]&&c[1]===b[1])return void this.clear();const k=d.buffers.active.ydisp,x=c[1]-k,S=b[1]-k,_=Math.max(x,0),p=Math.min(S,d.rows-1);_>=d.rows||p<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=w,this.viewportStartRow=x,this.viewportEndRow=S,this.viewportCappedStartRow=_,this.viewportCappedEndRow=p,this.startCol=c[0],this.endCol=b[0])}isCellSelected(d,c,b){return!!this.hasSelection&&(b-=d.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?c>=this.startCol&&b>=this.viewportCappedStartRow&&c<this.endCol&&b<=this.viewportCappedEndRow:c<this.startCol&&b>=this.viewportCappedStartRow&&c>=this.endCol&&b<=this.viewportCappedEndRow:b>this.viewportStartRow&&b<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&b===this.viewportStartRow&&c>=this.startCol&&c<this.endCol||this.viewportStartRow<this.viewportEndRow&&b===this.viewportEndRow&&c<this.endCol||this.viewportStartRow<this.viewportEndRow&&b===this.viewportStartRow&&c>=this.startCol)}}o.createSelectionRenderModel=function(){return new u}},456:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0,o.SelectionModel=class{constructor(u){this._bufferService=u,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,h=this.selectionEnd;return!(!u||!h)&&(u[1]>h[1]||u[1]===h[1]&&u[0]>h[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(m,o,u){var h=this&&this.__decorate||function(p,g,E,M){var T,O=arguments.length,A=O<3?g:M===null?M=Object.getOwnPropertyDescriptor(g,E):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(p,g,E,M);else for(var B=p.length-1;B>=0;B--)(T=p[B])&&(A=(O<3?T(A):O>3?T(g,E,A):T(g,E))||A);return O>3&&A&&Object.defineProperty(g,E,A),A},d=this&&this.__param||function(p,g){return function(E,M){g(E,M,p)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const c=u(2585),b=u(8460),w=u(844);let k=o.CharSizeService=class extends w.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(p,g,E){super(),this._optionsService=E,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(p,g,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const p=this._measureStrategy.measure();p.width===this.width&&p.height===this.height||(this.width=p.width,this.height=p.height,this._onCharSizeChange.fire())}};o.CharSizeService=k=h([d(2,c.IOptionsService)],k);class x extends w.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(g,E){g!==void 0&&g>0&&E!==void 0&&E>0&&(this._result.width=g,this._result.height=E)}}class S extends x{constructor(g,E,M){super(),this._document=g,this._parentElement=E,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(g){super(),this._optionsService=g,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const E=this._ctx.measureText("W");if(!("width"in E&&"fontBoundingBoxAscent"in E&&"fontBoundingBoxDescent"in E))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const g=this._ctx.measureText("W");return this._validateAndSet(g.width,g.fontBoundingBoxAscent+g.fontBoundingBoxDescent),this._result}}},4269:function(m,o,u){var h=this&&this.__decorate||function(_,p,g,E){var M,T=arguments.length,O=T<3?p:E===null?E=Object.getOwnPropertyDescriptor(p,g):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(_,p,g,E);else for(var A=_.length-1;A>=0;A--)(M=_[A])&&(O=(T<3?M(O):T>3?M(p,g,O):M(p,g))||O);return T>3&&O&&Object.defineProperty(p,g,O),O},d=this&&this.__param||function(_,p){return function(g,E){p(g,E,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const c=u(3734),b=u(643),w=u(511),k=u(2585);class x extends c.AttributeData{constructor(p,g,E){super(),this.content=0,this.combinedData="",this.fg=p.fg,this.bg=p.bg,this.combinedData=g,this._width=E}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(p){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=x;let S=o.CharacterJoinerService=class Gm{constructor(p){this._bufferService=p,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new w.CellData}register(p){const g={id:this._nextCharacterJoinerId++,handler:p};return this._characterJoiners.push(g),g.id}deregister(p){for(let g=0;g<this._characterJoiners.length;g++)if(this._characterJoiners[g].id===p)return this._characterJoiners.splice(g,1),!0;return!1}getJoinedCharacters(p){if(this._characterJoiners.length===0)return[];const g=this._bufferService.buffer.lines.get(p);if(!g||g.length===0)return[];const E=[],M=g.translateToString(!0);let T=0,O=0,A=0,B=g.getFg(0),j=g.getBg(0);for(let F=0;F<g.getTrimmedLength();F++)if(g.loadCell(F,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==B||this._workCell.bg!==j){if(F-T>1){const V=this._getJoinedRanges(M,A,O,g,T);for(let q=0;q<V.length;q++)E.push(V[q])}T=F,A=O,B=this._workCell.fg,j=this._workCell.bg}O+=this._workCell.getChars().length||b.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-T>1){const F=this._getJoinedRanges(M,A,O,g,T);for(let V=0;V<F.length;V++)E.push(F[V])}return E}_getJoinedRanges(p,g,E,M,T){const O=p.substring(g,E);let A=[];try{A=this._characterJoiners[0].handler(O)}catch(B){console.error(B)}for(let B=1;B<this._characterJoiners.length;B++)try{const j=this._characterJoiners[B].handler(O);for(let F=0;F<j.length;F++)Gm._mergeRanges(A,j[F])}catch(j){console.error(j)}return this._stringRangesToCellRanges(A,M,T),A}_stringRangesToCellRanges(p,g,E){let M=0,T=!1,O=0,A=p[M];if(A){for(let B=E;B<this._bufferService.cols;B++){const j=g.getWidth(B),F=g.getString(B).length||b.WHITESPACE_CELL_CHAR.length;if(j!==0){if(!T&&A[0]<=O&&(A[0]=B,T=!0),A[1]<=O){if(A[1]=B,A=p[++M],!A)break;A[0]<=O?(A[0]=B,T=!0):T=!1}O+=F}}A&&(A[1]=this._bufferService.cols)}}static _mergeRanges(p,g){let E=!1;for(let M=0;M<p.length;M++){const T=p[M];if(E){if(g[1]<=T[0])return p[M-1][1]=g[1],p;if(g[1]<=T[1])return p[M-1][1]=Math.max(g[1],T[1]),p.splice(M,1),p;p.splice(M,1),M--}else{if(g[1]<=T[0])return p.splice(M,0,g),p;if(g[1]<=T[1])return T[0]=Math.min(g[0],T[0]),p;g[0]<T[1]&&(T[0]=Math.min(g[0],T[0]),E=!0)}}return E?p[p.length-1][1]=g[1]:p.push(g),p}};o.CharacterJoinerService=S=h([d(0,k.IBufferService)],S)},5114:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const h=u(844),d=u(8460),c=u(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((p=>this._screenDprMonitor.setWindow(p)))),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}}o.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,c.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:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LinkProviderService=void 0;const h=u(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)}}}}o.LinkProviderService=d},8934:function(m,o,u){var h=this&&this.__decorate||function(k,x,S,_){var p,g=arguments.length,E=g<3?x:_===null?_=Object.getOwnPropertyDescriptor(x,S):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(k,x,S,_);else for(var M=k.length-1;M>=0;M--)(p=k[M])&&(E=(g<3?p(E):g>3?p(x,S,E):p(x,S))||E);return g>3&&E&&Object.defineProperty(x,S,E),E},d=this&&this.__param||function(k,x){return function(S,_){x(S,_,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const c=u(4725),b=u(9806);let w=o.MouseService=class{constructor(k,x){this._renderService=k,this._charSizeService=x}getCoords(k,x,S,_,p){return(0,b.getCoords)(window,k,x,S,_,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,p)}getMouseReportCoords(k,x){const S=(0,b.getCoordsRelativeToElement)(window,k,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])}}};o.MouseService=w=h([d(0,c.IRenderService),d(1,c.ICharSizeService)],w)},3230:function(m,o,u){var h=this&&this.__decorate||function(p,g,E,M){var T,O=arguments.length,A=O<3?g:M===null?M=Object.getOwnPropertyDescriptor(g,E):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(p,g,E,M);else for(var B=p.length-1;B>=0;B--)(T=p[B])&&(A=(O<3?T(A):O>3?T(g,E,A):T(g,E))||A);return O>3&&A&&Object.defineProperty(g,E,A),A},d=this&&this.__param||function(p,g){return function(E,M){g(E,M,p)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const c=u(6193),b=u(4725),w=u(8460),k=u(844),x=u(7226),S=u(2585);let _=o.RenderService=class extends k.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(p,g,E,M,T,O,A,B){super(),this._rowCount=p,this._charSizeService=M,this._renderer=this.register(new k.MutableDisposable),this._pausedResizeTask=new x.DebouncedIdleTask,this._observerDisposable=this.register(new k.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 c.RenderDebouncer(((j,F)=>this._renderRows(j,F)),A),this.register(this._renderDebouncer),this.register(A.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(O.onResize((()=>this._fullRefresh()))),this.register(O.buffers.onBufferActivate((()=>{var j;return(j=this._renderer.value)==null?void 0:j.clear()}))),this.register(E.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(T.onDecorationRegistered((()=>this._fullRefresh()))),this.register(T.onDecorationRemoved((()=>this._fullRefresh()))),this.register(E.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(O.cols,O.rows),this._fullRefresh()}))),this.register(E.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(O.buffer.y,O.buffer.y,!0)))),this.register(B.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(A.window,g),this.register(A.onWindowChange((j=>this._registerIntersectionObserver(j,g))))}_registerIntersectionObserver(p,g){if("IntersectionObserver"in p){const E=new p.IntersectionObserver((M=>this._handleIntersectionChange(M[M.length-1])),{threshold:0});E.observe(g),this._observerDisposable.value=(0,k.toDisposable)((()=>E.disconnect()))}}_handleIntersectionChange(p){this._isPaused=p.isIntersecting===void 0?p.intersectionRatio===0:!p.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(p,g,E=!1){this._isPaused?this._needsFullRefresh=!0:(E||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(p,g,this._rowCount))}_renderRows(p,g){this._renderer.value&&(p=Math.min(p,this._rowCount-1),g=Math.min(g,this._rowCount-1),this._renderer.value.renderRows(p,g),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:p,end:g}),this._onRender.fire({start:p,end:g}),this._isNextRenderRedrawOnly=!0)}resize(p,g){this._rowCount=g,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(p){this._renderer.value=p,this._renderer.value&&(this._renderer.value.onRequestRedraw((g=>this.refreshRows(g.start,g.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(p){return this._renderDebouncer.addRefreshCallback(p)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var p,g;this._renderer.value&&((g=(p=this._renderer.value).clearTextureAtlas)==null||g.call(p),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(p,g){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var E;return(E=this._renderer.value)==null?void 0:E.handleResize(p,g)})):this._renderer.value.handleResize(p,g),this._fullRefresh())}handleCharSizeChanged(){var p;(p=this._renderer.value)==null||p.handleCharSizeChanged()}handleBlur(){var p;(p=this._renderer.value)==null||p.handleBlur()}handleFocus(){var p;(p=this._renderer.value)==null||p.handleFocus()}handleSelectionChanged(p,g,E){var M;this._selectionState.start=p,this._selectionState.end=g,this._selectionState.columnSelectMode=E,(M=this._renderer.value)==null||M.handleSelectionChanged(p,g,E)}handleCursorMove(){var p;(p=this._renderer.value)==null||p.handleCursorMove()}clear(){var p;(p=this._renderer.value)==null||p.clear()}};o.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(m,o,u){var h=this&&this.__decorate||function(A,B,j,F){var V,q=arguments.length,W=q<3?B:F===null?F=Object.getOwnPropertyDescriptor(B,j):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(A,B,j,F);else for(var X=A.length-1;X>=0;X--)(V=A[X])&&(W=(q<3?V(W):q>3?V(B,j,W):V(B,j))||W);return q>3&&W&&Object.defineProperty(B,j,W),W},d=this&&this.__param||function(A,B){return function(j,F){B(j,F,A)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const c=u(9806),b=u(9504),w=u(456),k=u(4725),x=u(8460),S=u(844),_=u(6114),p=u(4841),g=u(511),E=u(2585),M=" ",T=new RegExp(M,"g");let O=o.SelectionService=class extends S.Disposable{constructor(A,B,j,F,V,q,W,X,G){super(),this._element=A,this._screenElement=B,this._linkifier=j,this._bufferService=F,this._coreService=V,this._mouseService=q,this._optionsService=W,this._renderService=X,this._coreBrowserService=G,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new g.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=J=>this._handleMouseMove(J),this._mouseUpListener=J=>this._handleMouseUp(J),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((J=>this._handleTrim(J))),this.register(this._bufferService.buffers.onBufferActivate((J=>this._handleBufferActivate(J)))),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 A=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;return!(!A||!B||A[0]===B[0]&&A[1]===B[1])}get selectionText(){const A=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;if(!A||!B)return"";const j=this._bufferService.buffer,F=[];if(this._activeSelectionMode===3){if(A[0]===B[0])return"";const V=A[0]<B[0]?A[0]:B[0],q=A[0]<B[0]?B[0]:A[0];for(let W=A[1];W<=B[1];W++){const X=j.translateBufferLineToString(W,!0,V,q);F.push(X)}}else{const V=A[1]===B[1]?B[0]:void 0;F.push(j.translateBufferLineToString(A[1],!0,A[0],V));for(let q=A[1]+1;q<=B[1]-1;q++){const W=j.lines.get(q),X=j.translateBufferLineToString(q,!0);W!=null&&W.isWrapped?F[F.length-1]+=X:F.push(X)}if(A[1]!==B[1]){const q=j.lines.get(B[1]),W=j.translateBufferLineToString(B[1],!0,0,B[0]);q&&q.isWrapped?F[F.length-1]+=W:F.push(W)}}return F.map((V=>V.replace(T," "))).join(_.isWindows?`\r
|
|
54
|
+
`:`
|
|
55
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(A){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),_.isLinux&&A&&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(A){const B=this._getMouseBufferCoords(A),j=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!!(j&&F&&B)&&this._areCoordsInSelection(B,j,F)}isCellInSelection(A,B){const j=this._model.finalSelectionStart,F=this._model.finalSelectionEnd;return!(!j||!F)&&this._areCoordsInSelection([A,B],j,F)}_areCoordsInSelection(A,B,j){return A[1]>B[1]&&A[1]<j[1]||B[1]===j[1]&&A[1]===B[1]&&A[0]>=B[0]&&A[0]<j[0]||B[1]<j[1]&&A[1]===j[1]&&A[0]<j[0]||B[1]<j[1]&&A[1]===B[1]&&A[0]>=B[0]}_selectWordAtCursor(A,B){var V,q;const j=(q=(V=this._linkifier.currentLink)==null?void 0:V.link)==null?void 0:q.range;if(j)return this._model.selectionStart=[j.start.x-1,j.start.y-1],this._model.selectionStartLength=(0,p.getRangeLength)(j,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const F=this._getMouseBufferCoords(A);return!!F&&(this._selectWordAt(F,B),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(A,B){this._model.clearSelection(),A=Math.max(A,0),B=Math.min(B,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,A],this._model.selectionEnd=[this._bufferService.cols,B],this.refresh(),this._onSelectionChange.fire()}_handleTrim(A){this._model.handleTrim(A)&&this.refresh()}_getMouseBufferCoords(A){const B=this._mouseService.getCoords(A,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(B)return B[0]--,B[1]--,B[1]+=this._bufferService.buffer.ydisp,B}_getMouseEventScrollAmount(A){let B=(0,c.getCoordsRelativeToElement)(this._coreBrowserService.window,A,this._screenElement)[1];const j=this._renderService.dimensions.css.canvas.height;return B>=0&&B<=j?0:(B>j&&(B-=j),B=Math.min(Math.max(B,-50),50),B/=50,B/Math.abs(B)+Math.round(14*B))}shouldForceSelection(A){return _.isMac?A.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:A.shiftKey}handleMouseDown(A){if(this._mouseDownTimeStamp=A.timeStamp,(A.button!==2||!this.hasSelection)&&A.button===0){if(!this._enabled){if(!this.shouldForceSelection(A))return;A.stopPropagation()}A.preventDefault(),this._dragScrollAmount=0,this._enabled&&A.shiftKey?this._handleIncrementalClick(A):A.detail===1?this._handleSingleClick(A):A.detail===2?this._handleDoubleClick(A):A.detail===3&&this._handleTripleClick(A),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(A){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(A))}_handleSingleClick(A){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(A)?3:0,this._model.selectionStart=this._getMouseBufferCoords(A),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const B=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);B&&B.length!==this._model.selectionStart[0]&&B.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(A){this._selectWordAtCursor(A,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(A){const B=this._getMouseBufferCoords(A);B&&(this._activeSelectionMode=2,this._selectLineAt(B[1]))}shouldColumnSelect(A){return A.altKey&&!(_.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(A){if(A.stopImmediatePropagation(),!this._model.selectionStart)return;const B=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(A),!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(A),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const j=this._bufferService.buffer;if(this._model.selectionEnd[1]<j.lines.length){const F=j.lines.get(this._model.selectionEnd[1]);F&&F.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}B&&B[0]===this._model.selectionEnd[0]&&B[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 A=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(A.ydisp+this._bufferService.rows,A.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=A.ydisp),this.refresh()}}_handleMouseUp(A){const B=A.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&B<500&&A.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const j=this._mouseService.getCoords(A,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(j&&j[0]!==void 0&&j[1]!==void 0){const F=(0,b.moveToCellSequence)(j[0]-1,j[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(F,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const A=this._model.finalSelectionStart,B=this._model.finalSelectionEnd,j=!(!A||!B||A[0]===B[0]&&A[1]===B[1]);j?A&&B&&(this._oldSelectionStart&&this._oldSelectionEnd&&A[0]===this._oldSelectionStart[0]&&A[1]===this._oldSelectionStart[1]&&B[0]===this._oldSelectionEnd[0]&&B[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(A,B,j)):this._oldHasSelection&&this._fireOnSelectionChange(A,B,j)}_fireOnSelectionChange(A,B,j){this._oldSelectionStart=A,this._oldSelectionEnd=B,this._oldHasSelection=j,this._onSelectionChange.fire()}_handleBufferActivate(A){this.clearSelection(),this._trimListener.dispose(),this._trimListener=A.activeBuffer.lines.onTrim((B=>this._handleTrim(B)))}_convertViewportColToCharacterIndex(A,B){let j=B;for(let F=0;B>=F;F++){const V=A.loadCell(F,this._workCell).getChars().length;this._workCell.getWidth()===0?j--:V>1&&B!==F&&(j+=V-1)}return j}setSelection(A,B,j){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[A,B],this._model.selectionStartLength=j,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(A){this._isClickInSelection(A)||(this._selectWordAtCursor(A,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(A,B,j=!0,F=!0){if(A[0]>=this._bufferService.cols)return;const V=this._bufferService.buffer,q=V.lines.get(A[1]);if(!q)return;const W=V.translateBufferLineToString(A[1],!1);let X=this._convertViewportColToCharacterIndex(q,A[0]),G=X;const J=A[0]-X;let re=0,H=0,D=0,L=0;if(W.charAt(X)===" "){for(;X>0&&W.charAt(X-1)===" ";)X--;for(;G<W.length&&W.charAt(G+1)===" ";)G++}else{let Z=A[0],pe=A[0];q.getWidth(Z)===0&&(re++,Z--),q.getWidth(pe)===2&&(H++,pe++);const me=q.getString(pe).length;for(me>1&&(L+=me-1,G+=me-1);Z>0&&X>0&&!this._isCharWordSeparator(q.loadCell(Z-1,this._workCell));){q.loadCell(Z-1,this._workCell);const Y=this._workCell.getChars().length;this._workCell.getWidth()===0?(re++,Z--):Y>1&&(D+=Y-1,X-=Y-1),X--,Z--}for(;pe<q.length&&G+1<W.length&&!this._isCharWordSeparator(q.loadCell(pe+1,this._workCell));){q.loadCell(pe+1,this._workCell);const Y=this._workCell.getChars().length;this._workCell.getWidth()===2?(H++,pe++):Y>1&&(L+=Y-1,G+=Y-1),G++,pe++}}G++;let U=X+J-re+D,z=Math.min(this._bufferService.cols,G-X+re+H-D-L);if(B||W.slice(X,G).trim()!==""){if(j&&U===0&&q.getCodePoint(0)!==32){const Z=V.lines.get(A[1]-1);if(Z&&q.isWrapped&&Z.getCodePoint(this._bufferService.cols-1)!==32){const pe=this._getWordAt([this._bufferService.cols-1,A[1]-1],!1,!0,!1);if(pe){const me=this._bufferService.cols-pe.start;U-=me,z+=me}}}if(F&&U+z===this._bufferService.cols&&q.getCodePoint(this._bufferService.cols-1)!==32){const Z=V.lines.get(A[1]+1);if(Z!=null&&Z.isWrapped&&Z.getCodePoint(0)!==32){const pe=this._getWordAt([0,A[1]+1],!1,!1,!0);pe&&(z+=pe.length)}}return{start:U,length:z}}}_selectWordAt(A,B){const j=this._getWordAt(A,B);if(j){for(;j.start<0;)j.start+=this._bufferService.cols,A[1]--;this._model.selectionStart=[j.start,A[1]],this._model.selectionStartLength=j.length}}_selectToWordAt(A){const B=this._getWordAt(A,!0);if(B){let j=A[1];for(;B.start<0;)B.start+=this._bufferService.cols,j--;if(!this._model.areSelectionValuesReversed())for(;B.start+B.length>this._bufferService.cols;)B.length-=this._bufferService.cols,j++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?B.start:B.start+B.length,j]}}_isCharWordSeparator(A){return A.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(A.getChars())>=0}_selectLineAt(A){const B=this._bufferService.buffer.getWrappedRangeForLine(A),j={start:{x:0,y:B.first},end:{x:this._bufferService.cols-1,y:B.last}};this._model.selectionStart=[0,B.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,p.getRangeLength)(j,this._bufferService.cols)}};o.SelectionService=O=h([d(3,E.IBufferService),d(4,E.ICoreService),d(5,k.IMouseService),d(6,E.IOptionsService),d(7,k.IRenderService),d(8,k.ICoreBrowserService)],O)},4725:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ILinkProviderService=o.IThemeService=o.ICharacterJoinerService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;const h=u(8343);o.ICharSizeService=(0,h.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,h.createDecorator)("CoreBrowserService"),o.IMouseService=(0,h.createDecorator)("MouseService"),o.IRenderService=(0,h.createDecorator)("RenderService"),o.ISelectionService=(0,h.createDecorator)("SelectionService"),o.ICharacterJoinerService=(0,h.createDecorator)("CharacterJoinerService"),o.IThemeService=(0,h.createDecorator)("ThemeService"),o.ILinkProviderService=(0,h.createDecorator)("LinkProviderService")},6731:function(m,o,u){var h=this&&this.__decorate||function(O,A,B,j){var F,V=arguments.length,q=V<3?A:j===null?j=Object.getOwnPropertyDescriptor(A,B):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(O,A,B,j);else for(var W=O.length-1;W>=0;W--)(F=O[W])&&(q=(V<3?F(q):V>3?F(A,B,q):F(A,B))||q);return V>3&&q&&Object.defineProperty(A,B,q),q},d=this&&this.__param||function(O,A){return function(B,j){A(B,j,O)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const c=u(7239),b=u(8055),w=u(8460),k=u(844),x=u(2585),S=b.css.toColor("#ffffff"),_=b.css.toColor("#000000"),p=b.css.toColor("#ffffff"),g=b.css.toColor("#000000"),E={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const O=[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")],A=[0,95,135,175,215,255];for(let B=0;B<216;B++){const j=A[B/36%6|0],F=A[B/6%6|0],V=A[B%6];O.push({css:b.channels.toCss(j,F,V),rgba:b.channels.toRgba(j,F,V)})}for(let B=0;B<24;B++){const j=8+10*B;O.push({css:b.channels.toCss(j,j,j),rgba:b.channels.toRgba(j,j,j)})}return O})());let M=o.ThemeService=class extends k.Disposable{get colors(){return this._colors}constructor(O){super(),this._optionsService=O,this._contrastCache=new c.ColorContrastCache,this._halfContrastCache=new c.ColorContrastCache,this._onChangeColors=this.register(new w.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:S,background:_,cursor:p,cursorAccent:g,selectionForeground:void 0,selectionBackgroundTransparent:E,selectionBackgroundOpaque:b.color.blend(_,E),selectionInactiveBackgroundTransparent:E,selectionInactiveBackgroundOpaque:b.color.blend(_,E),ansi:o.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(O={}){const A=this._colors;if(A.foreground=T(O.foreground,S),A.background=T(O.background,_),A.cursor=T(O.cursor,p),A.cursorAccent=T(O.cursorAccent,g),A.selectionBackgroundTransparent=T(O.selectionBackground,E),A.selectionBackgroundOpaque=b.color.blend(A.background,A.selectionBackgroundTransparent),A.selectionInactiveBackgroundTransparent=T(O.selectionInactiveBackground,A.selectionBackgroundTransparent),A.selectionInactiveBackgroundOpaque=b.color.blend(A.background,A.selectionInactiveBackgroundTransparent),A.selectionForeground=O.selectionForeground?T(O.selectionForeground,b.NULL_COLOR):void 0,A.selectionForeground===b.NULL_COLOR&&(A.selectionForeground=void 0),b.color.isOpaque(A.selectionBackgroundTransparent)&&(A.selectionBackgroundTransparent=b.color.opacity(A.selectionBackgroundTransparent,.3)),b.color.isOpaque(A.selectionInactiveBackgroundTransparent)&&(A.selectionInactiveBackgroundTransparent=b.color.opacity(A.selectionInactiveBackgroundTransparent,.3)),A.ansi=o.DEFAULT_ANSI_COLORS.slice(),A.ansi[0]=T(O.black,o.DEFAULT_ANSI_COLORS[0]),A.ansi[1]=T(O.red,o.DEFAULT_ANSI_COLORS[1]),A.ansi[2]=T(O.green,o.DEFAULT_ANSI_COLORS[2]),A.ansi[3]=T(O.yellow,o.DEFAULT_ANSI_COLORS[3]),A.ansi[4]=T(O.blue,o.DEFAULT_ANSI_COLORS[4]),A.ansi[5]=T(O.magenta,o.DEFAULT_ANSI_COLORS[5]),A.ansi[6]=T(O.cyan,o.DEFAULT_ANSI_COLORS[6]),A.ansi[7]=T(O.white,o.DEFAULT_ANSI_COLORS[7]),A.ansi[8]=T(O.brightBlack,o.DEFAULT_ANSI_COLORS[8]),A.ansi[9]=T(O.brightRed,o.DEFAULT_ANSI_COLORS[9]),A.ansi[10]=T(O.brightGreen,o.DEFAULT_ANSI_COLORS[10]),A.ansi[11]=T(O.brightYellow,o.DEFAULT_ANSI_COLORS[11]),A.ansi[12]=T(O.brightBlue,o.DEFAULT_ANSI_COLORS[12]),A.ansi[13]=T(O.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),A.ansi[14]=T(O.brightCyan,o.DEFAULT_ANSI_COLORS[14]),A.ansi[15]=T(O.brightWhite,o.DEFAULT_ANSI_COLORS[15]),O.extendedAnsi){const B=Math.min(A.ansi.length-16,O.extendedAnsi.length);for(let j=0;j<B;j++)A.ansi[j+16]=T(O.extendedAnsi[j],o.DEFAULT_ANSI_COLORS[j+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(O){this._restoreColor(O),this._onChangeColors.fire(this.colors)}_restoreColor(O){if(O!==void 0)switch(O){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[O]=this._restoreColors.ansi[O]}else for(let A=0;A<this._restoreColors.ansi.length;++A)this._colors.ansi[A]=this._restoreColors.ansi[A]}modifyColors(O){O(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 T(O,A){if(O!==void 0)try{return b.css.toColor(O)}catch{}return A}o.ThemeService=M=h([d(0,x.IOptionsService)],M)},6349:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const h=u(8460),d=u(844);class c 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 k=new Array(w);for(let x=0;x<Math.min(w,this.length);x++)k[x]=this._array[this._getCyclicIndex(x)];this._array=k,this._maxLength=w,this._startIndex=0}get length(){return this._length}set length(w){if(w>this._length)for(let k=this._length;k<w;k++)this._array[k]=void 0;this._length=w}get(w){return this._array[this._getCyclicIndex(w)]}set(w,k){this._array[this._getCyclicIndex(w)]=k}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,k,...x){if(k){for(let S=w;S<this._length-k;S++)this._array[this._getCyclicIndex(S)]=this._array[this._getCyclicIndex(S+k)];this._length-=k,this.onDeleteEmitter.fire({index:w,amount:k})}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,k,x){if(!(k<=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 _=k-1;_>=0;_--)this.set(w+_+x,this.get(w+_));const S=w+k+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<k;S++)this.set(w+S+x,this.get(w+S))}}_getCyclicIndex(w){return(this._startIndex+w)%this._maxLength}}o.CircularList=c},1439:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function u(h,d=5){if(typeof h!="object")return h;const c=Array.isArray(h)?[]:{};for(const b in h)c[b]=d<=1?h[b]:h[b]&&u(h[b],d-1);return c}},8055:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=o.NULL_COLOR=void 0;let u=0,h=0,d=0,c=0;var b,w,k,x,S;function _(g){const E=g.toString(16);return E.length<2?"0"+E:E}function p(g,E){return g<E?(E+.05)/(g+.05):(g+.05)/(E+.05)}o.NULL_COLOR={css:"#00000000",rgba:0},(function(g){g.toCss=function(E,M,T,O){return O!==void 0?`#${_(E)}${_(M)}${_(T)}${_(O)}`:`#${_(E)}${_(M)}${_(T)}`},g.toRgba=function(E,M,T,O=255){return(E<<24|M<<16|T<<8|O)>>>0},g.toColor=function(E,M,T,O){return{css:g.toCss(E,M,T,O),rgba:g.toRgba(E,M,T,O)}}})(b||(o.channels=b={})),(function(g){function E(M,T){return c=Math.round(255*T),[u,h,d]=S.toChannels(M.rgba),{css:b.toCss(u,h,d,c),rgba:b.toRgba(u,h,d,c)}}g.blend=function(M,T){if(c=(255&T.rgba)/255,c===1)return{css:T.css,rgba:T.rgba};const O=T.rgba>>24&255,A=T.rgba>>16&255,B=T.rgba>>8&255,j=M.rgba>>24&255,F=M.rgba>>16&255,V=M.rgba>>8&255;return u=j+Math.round((O-j)*c),h=F+Math.round((A-F)*c),d=V+Math.round((B-V)*c),{css:b.toCss(u,h,d),rgba:b.toRgba(u,h,d)}},g.isOpaque=function(M){return(255&M.rgba)==255},g.ensureContrastRatio=function(M,T,O){const A=S.ensureContrastRatio(M.rgba,T.rgba,O);if(A)return b.toColor(A>>24&255,A>>16&255,A>>8&255)},g.opaque=function(M){const T=(255|M.rgba)>>>0;return[u,h,d]=S.toChannels(T),{css:b.toCss(u,h,d),rgba:T}},g.opacity=E,g.multiplyOpacity=function(M,T){return c=255&M.rgba,E(M,c*T/255)},g.toColorRGB=function(M){return[M.rgba>>24&255,M.rgba>>16&255,M.rgba>>8&255]}})(w||(o.color=w={})),(function(g){let E,M;try{const T=document.createElement("canvas");T.width=1,T.height=1;const O=T.getContext("2d",{willReadFrequently:!0});O&&(E=O,E.globalCompositeOperation="copy",M=E.createLinearGradient(0,0,1,1))}catch{}g.toColor=function(T){if(T.match(/#[\da-f]{3,8}/i))switch(T.length){case 4:return u=parseInt(T.slice(1,2).repeat(2),16),h=parseInt(T.slice(2,3).repeat(2),16),d=parseInt(T.slice(3,4).repeat(2),16),b.toColor(u,h,d);case 5:return u=parseInt(T.slice(1,2).repeat(2),16),h=parseInt(T.slice(2,3).repeat(2),16),d=parseInt(T.slice(3,4).repeat(2),16),c=parseInt(T.slice(4,5).repeat(2),16),b.toColor(u,h,d,c);case 7:return{css:T,rgba:(parseInt(T.slice(1),16)<<8|255)>>>0};case 9:return{css:T,rgba:parseInt(T.slice(1),16)>>>0}}const O=T.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(O)return u=parseInt(O[1]),h=parseInt(O[2]),d=parseInt(O[3]),c=Math.round(255*(O[5]===void 0?1:parseFloat(O[5]))),b.toColor(u,h,d,c);if(!E||!M)throw new Error("css.toColor: Unsupported css format");if(E.fillStyle=M,E.fillStyle=T,typeof E.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(E.fillRect(0,0,1,1),[u,h,d,c]=E.getImageData(0,0,1,1).data,c!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:b.toRgba(u,h,d,c),css:T}}})(k||(o.css=k={})),(function(g){function E(M,T,O){const A=M/255,B=T/255,j=O/255;return .2126*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))+.7152*(B<=.03928?B/12.92:Math.pow((B+.055)/1.055,2.4))+.0722*(j<=.03928?j/12.92:Math.pow((j+.055)/1.055,2.4))}g.relativeLuminance=function(M){return E(M>>16&255,M>>8&255,255&M)},g.relativeLuminance2=E})(x||(o.rgb=x={})),(function(g){function E(T,O,A){const B=T>>24&255,j=T>>16&255,F=T>>8&255;let V=O>>24&255,q=O>>16&255,W=O>>8&255,X=p(x.relativeLuminance2(V,q,W),x.relativeLuminance2(B,j,F));for(;X<A&&(V>0||q>0||W>0);)V-=Math.max(0,Math.ceil(.1*V)),q-=Math.max(0,Math.ceil(.1*q)),W-=Math.max(0,Math.ceil(.1*W)),X=p(x.relativeLuminance2(V,q,W),x.relativeLuminance2(B,j,F));return(V<<24|q<<16|W<<8|255)>>>0}function M(T,O,A){const B=T>>24&255,j=T>>16&255,F=T>>8&255;let V=O>>24&255,q=O>>16&255,W=O>>8&255,X=p(x.relativeLuminance2(V,q,W),x.relativeLuminance2(B,j,F));for(;X<A&&(V<255||q<255||W<255);)V=Math.min(255,V+Math.ceil(.1*(255-V))),q=Math.min(255,q+Math.ceil(.1*(255-q))),W=Math.min(255,W+Math.ceil(.1*(255-W))),X=p(x.relativeLuminance2(V,q,W),x.relativeLuminance2(B,j,F));return(V<<24|q<<16|W<<8|255)>>>0}g.blend=function(T,O){if(c=(255&O)/255,c===1)return O;const A=O>>24&255,B=O>>16&255,j=O>>8&255,F=T>>24&255,V=T>>16&255,q=T>>8&255;return u=F+Math.round((A-F)*c),h=V+Math.round((B-V)*c),d=q+Math.round((j-q)*c),b.toRgba(u,h,d)},g.ensureContrastRatio=function(T,O,A){const B=x.relativeLuminance(T>>8),j=x.relativeLuminance(O>>8);if(p(B,j)<A){if(j<B){const q=E(T,O,A),W=p(B,x.relativeLuminance(q>>8));if(W<A){const X=M(T,O,A);return W>p(B,x.relativeLuminance(X>>8))?q:X}return q}const F=M(T,O,A),V=p(B,x.relativeLuminance(F>>8));if(V<A){const q=E(T,O,A);return V>p(B,x.relativeLuminance(q>>8))?F:q}return F}},g.reduceLuminance=E,g.increaseLuminance=M,g.toChannels=function(T){return[T>>24&255,T>>16&255,T>>8&255,255&T]}})(S||(o.rgba=S={})),o.toPaddedHex=_,o.contrastRatio=p},8969:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const h=u(844),d=u(2585),c=u(4348),b=u(7866),w=u(744),k=u(7302),x=u(6975),S=u(8460),_=u(1753),p=u(1480),g=u(7994),E=u(9282),M=u(5435),T=u(5981),O=u(2660);let A=!1;class B extends h.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new S.EventEmitter),this._onScroll.event((F=>{var V;(V=this._onScrollApi)==null||V.fire(F.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(F){for(const V in F)this.optionsService.options[V]=F[V]}constructor(F){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 c.InstantiationService,this.optionsService=this.register(new k.OptionsService(F)),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(p.UnicodeService)),this._instantiationService.setService(d.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(g.CharsetService),this._instantiationService.setService(d.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(O.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((V=>{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((V=>{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 T.WriteBuffer(((V,q)=>this._inputHandler.parse(V,q)))),this.register((0,S.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(F,V){this._writeBuffer.write(F,V)}writeSync(F,V){this._logService.logLevel<=d.LogLevelEnum.WARN&&!A&&(this._logService.warn("writeSync is unreliable and will be removed soon."),A=!0),this._writeBuffer.writeSync(F,V)}input(F,V=!0){this.coreService.triggerDataEvent(F,V)}resize(F,V){isNaN(F)||isNaN(V)||(F=Math.max(F,w.MINIMUM_COLS),V=Math.max(V,w.MINIMUM_ROWS),this._bufferService.resize(F,V))}scroll(F,V=!1){this._bufferService.scroll(F,V)}scrollLines(F,V,q){this._bufferService.scrollLines(F,V,q)}scrollPages(F){this.scrollLines(F*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(F){const V=F-this._bufferService.buffer.ydisp;V!==0&&this.scrollLines(V)}registerEscHandler(F,V){return this._inputHandler.registerEscHandler(F,V)}registerDcsHandler(F,V){return this._inputHandler.registerDcsHandler(F,V)}registerCsiHandler(F,V){return this._inputHandler.registerCsiHandler(F,V)}registerOscHandler(F,V){return this._inputHandler.registerOscHandler(F,V)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let F=!1;const V=this.optionsService.rawOptions.windowsPty;V&&V.buildNumber!==void 0&&V.buildNumber!==void 0?F=V.backend==="conpty"&&V.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(F=!0),F?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const F=[];F.push(this.onLineFeed(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),F.push(this.registerCsiHandler({final:"H"},(()=>((0,E.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,h.toDisposable)((()=>{for(const V of F)V.dispose()}))}}}o.CoreTerminal=B},8460:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.runAndSubscribe=o.forwardEvent=o.EventEmitter=void 0,o.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let h=0;h<this._listeners.length;h++)if(this._listeners[h]===u)return void this._listeners.splice(h,1)}}})),this._event}fire(u,h){const d=[];for(let c=0;c<this._listeners.length;c++)d.push(this._listeners[c]);for(let c=0;c<d.length;c++)d[c].call(void 0,u,h)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},o.forwardEvent=function(u,h){return u((d=>h.fire(d)))},o.runAndSubscribe=function(u,h){return h(void 0),u((d=>h(d)))}},5435:function(m,o,u){var h=this&&this.__decorate||function(re,H,D,L){var U,z=arguments.length,Z=z<3?H:L===null?L=Object.getOwnPropertyDescriptor(H,D):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Z=Reflect.decorate(re,H,D,L);else for(var pe=re.length-1;pe>=0;pe--)(U=re[pe])&&(Z=(z<3?U(Z):z>3?U(H,D,Z):U(H,D))||Z);return z>3&&Z&&Object.defineProperty(H,D,Z),Z},d=this&&this.__param||function(re,H){return function(D,L){H(D,L,re)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const c=u(2584),b=u(7116),w=u(2015),k=u(844),x=u(482),S=u(8437),_=u(8460),p=u(643),g=u(511),E=u(3734),M=u(2585),T=u(1480),O=u(6242),A=u(6351),B=u(5941),j={"(":0,")":1,"*":2,"+":3,"-":1,".":2},F=131072;function V(re,H){if(re>24)return H.setWinLines||!1;switch(re){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 q;(function(re){re[re.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",re[re.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(q||(o.WindowsOptionsReportType=q={}));let W=0;class X extends k.Disposable{getAttrData(){return this._curAttrData}constructor(H,D,L,U,z,Z,pe,me,Y=new w.EscapeSequenceParser){super(),this._bufferService=H,this._charsetService=D,this._coreService=L,this._logService=U,this._optionsService=z,this._oscLinkService=Z,this._coreMouseService=pe,this._unicodeService=me,this._parser=Y,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new x.StringToUtf32,this._utf8Decoder=new x.Utf8ToUtf32,this._workCell=new g.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((P=>this._activeBuffer=P.activeBuffer))),this._parser.setCsiHandlerFallback(((P,ae)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(P),params:ae.toArray()})})),this._parser.setEscHandlerFallback((P=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(P)})})),this._parser.setExecuteHandlerFallback((P=>{this._logService.debug("Unknown EXECUTE code: ",{code:P})})),this._parser.setOscHandlerFallback(((P,ae,ne)=>{this._logService.debug("Unknown OSC code: ",{identifier:P,action:ae,data:ne})})),this._parser.setDcsHandlerFallback(((P,ae,ne)=>{ae==="HOOK"&&(ne=ne.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(P),action:ae,payload:ne})})),this._parser.setPrintHandler(((P,ae,ne)=>this.print(P,ae,ne))),this._parser.registerCsiHandler({final:"@"},(P=>this.insertChars(P))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(P=>this.scrollLeft(P))),this._parser.registerCsiHandler({final:"A"},(P=>this.cursorUp(P))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(P=>this.scrollRight(P))),this._parser.registerCsiHandler({final:"B"},(P=>this.cursorDown(P))),this._parser.registerCsiHandler({final:"C"},(P=>this.cursorForward(P))),this._parser.registerCsiHandler({final:"D"},(P=>this.cursorBackward(P))),this._parser.registerCsiHandler({final:"E"},(P=>this.cursorNextLine(P))),this._parser.registerCsiHandler({final:"F"},(P=>this.cursorPrecedingLine(P))),this._parser.registerCsiHandler({final:"G"},(P=>this.cursorCharAbsolute(P))),this._parser.registerCsiHandler({final:"H"},(P=>this.cursorPosition(P))),this._parser.registerCsiHandler({final:"I"},(P=>this.cursorForwardTab(P))),this._parser.registerCsiHandler({final:"J"},(P=>this.eraseInDisplay(P,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(P=>this.eraseInDisplay(P,!0))),this._parser.registerCsiHandler({final:"K"},(P=>this.eraseInLine(P,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(P=>this.eraseInLine(P,!0))),this._parser.registerCsiHandler({final:"L"},(P=>this.insertLines(P))),this._parser.registerCsiHandler({final:"M"},(P=>this.deleteLines(P))),this._parser.registerCsiHandler({final:"P"},(P=>this.deleteChars(P))),this._parser.registerCsiHandler({final:"S"},(P=>this.scrollUp(P))),this._parser.registerCsiHandler({final:"T"},(P=>this.scrollDown(P))),this._parser.registerCsiHandler({final:"X"},(P=>this.eraseChars(P))),this._parser.registerCsiHandler({final:"Z"},(P=>this.cursorBackwardTab(P))),this._parser.registerCsiHandler({final:"`"},(P=>this.charPosAbsolute(P))),this._parser.registerCsiHandler({final:"a"},(P=>this.hPositionRelative(P))),this._parser.registerCsiHandler({final:"b"},(P=>this.repeatPrecedingCharacter(P))),this._parser.registerCsiHandler({final:"c"},(P=>this.sendDeviceAttributesPrimary(P))),this._parser.registerCsiHandler({prefix:">",final:"c"},(P=>this.sendDeviceAttributesSecondary(P))),this._parser.registerCsiHandler({final:"d"},(P=>this.linePosAbsolute(P))),this._parser.registerCsiHandler({final:"e"},(P=>this.vPositionRelative(P))),this._parser.registerCsiHandler({final:"f"},(P=>this.hVPosition(P))),this._parser.registerCsiHandler({final:"g"},(P=>this.tabClear(P))),this._parser.registerCsiHandler({final:"h"},(P=>this.setMode(P))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(P=>this.setModePrivate(P))),this._parser.registerCsiHandler({final:"l"},(P=>this.resetMode(P))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(P=>this.resetModePrivate(P))),this._parser.registerCsiHandler({final:"m"},(P=>this.charAttributes(P))),this._parser.registerCsiHandler({final:"n"},(P=>this.deviceStatus(P))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(P=>this.deviceStatusPrivate(P))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(P=>this.softReset(P))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(P=>this.setCursorStyle(P))),this._parser.registerCsiHandler({final:"r"},(P=>this.setScrollRegion(P))),this._parser.registerCsiHandler({final:"s"},(P=>this.saveCursor(P))),this._parser.registerCsiHandler({final:"t"},(P=>this.windowOptions(P))),this._parser.registerCsiHandler({final:"u"},(P=>this.restoreCursor(P))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(P=>this.insertColumns(P))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(P=>this.deleteColumns(P))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(P=>this.selectProtected(P))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(P=>this.requestMode(P,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(P=>this.requestMode(P,!1))),this._parser.setExecuteHandler(c.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(c.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(c.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(c.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(c.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(c.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(c.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(c.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(c.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(c.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new O.OscHandler((P=>(this.setTitle(P),this.setIconName(P),!0)))),this._parser.registerOscHandler(1,new O.OscHandler((P=>this.setIconName(P)))),this._parser.registerOscHandler(2,new O.OscHandler((P=>this.setTitle(P)))),this._parser.registerOscHandler(4,new O.OscHandler((P=>this.setOrReportIndexedColor(P)))),this._parser.registerOscHandler(8,new O.OscHandler((P=>this.setHyperlink(P)))),this._parser.registerOscHandler(10,new O.OscHandler((P=>this.setOrReportFgColor(P)))),this._parser.registerOscHandler(11,new O.OscHandler((P=>this.setOrReportBgColor(P)))),this._parser.registerOscHandler(12,new O.OscHandler((P=>this.setOrReportCursorColor(P)))),this._parser.registerOscHandler(104,new O.OscHandler((P=>this.restoreIndexedColor(P)))),this._parser.registerOscHandler(110,new O.OscHandler((P=>this.restoreFgColor(P)))),this._parser.registerOscHandler(111,new O.OscHandler((P=>this.restoreBgColor(P)))),this._parser.registerOscHandler(112,new O.OscHandler((P=>this.restoreCursorColor(P)))),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 P in b.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:P},(()=>this.selectCharset("("+P))),this._parser.registerEscHandler({intermediates:")",final:P},(()=>this.selectCharset(")"+P))),this._parser.registerEscHandler({intermediates:"*",final:P},(()=>this.selectCharset("*"+P))),this._parser.registerEscHandler({intermediates:"+",final:P},(()=>this.selectCharset("+"+P))),this._parser.registerEscHandler({intermediates:"-",final:P},(()=>this.selectCharset("-"+P))),this._parser.registerEscHandler({intermediates:".",final:P},(()=>this.selectCharset("."+P))),this._parser.registerEscHandler({intermediates:"/",final:P},(()=>this.selectCharset("/"+P)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((P=>(this._logService.error("Parsing error: ",P),P))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new A.DcsHandler(((P,ae)=>this.requestStatusString(P,ae))))}_preserveStack(H,D,L,U){this._parseStack.paused=!0,this._parseStack.cursorStartX=H,this._parseStack.cursorStartY=D,this._parseStack.decodedLength=L,this._parseStack.position=U}_logSlowResolvingAsync(H){this._logService.logLevel<=M.LogLevelEnum.WARN&&Promise.race([H,new Promise(((D,L)=>setTimeout((()=>L("#SLOW_TIMEOUT")),5e3)))]).catch((D=>{if(D!=="#SLOW_TIMEOUT")throw D;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(H,D){let L,U=this._activeBuffer.x,z=this._activeBuffer.y,Z=0;const pe=this._parseStack.paused;if(pe){if(L=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,D))return this._logSlowResolvingAsync(L),L;U=this._parseStack.cursorStartX,z=this._parseStack.cursorStartY,this._parseStack.paused=!1,H.length>F&&(Z=this._parseStack.position+F)}if(this._logService.logLevel<=M.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof H=="string"?` "${H}"`:` "${Array.prototype.map.call(H,(P=>String.fromCharCode(P))).join("")}"`),typeof H=="string"?H.split("").map((P=>P.charCodeAt(0))):H),this._parseBuffer.length<H.length&&this._parseBuffer.length<F&&(this._parseBuffer=new Uint32Array(Math.min(H.length,F))),pe||this._dirtyRowTracker.clearRange(),H.length>F)for(let P=Z;P<H.length;P+=F){const ae=P+F<H.length?P+F:H.length,ne=typeof H=="string"?this._stringDecoder.decode(H.substring(P,ae),this._parseBuffer):this._utf8Decoder.decode(H.subarray(P,ae),this._parseBuffer);if(L=this._parser.parse(this._parseBuffer,ne))return this._preserveStack(U,z,ne,P),this._logSlowResolvingAsync(L),L}else if(!pe){const P=typeof H=="string"?this._stringDecoder.decode(H,this._parseBuffer):this._utf8Decoder.decode(H,this._parseBuffer);if(L=this._parser.parse(this._parseBuffer,P))return this._preserveStack(U,z,P,0),this._logSlowResolvingAsync(L),L}this._activeBuffer.x===U&&this._activeBuffer.y===z||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,D,L){let U,z;const Z=this._charsetService.charset,pe=this._optionsService.rawOptions.screenReaderMode,me=this._bufferService.cols,Y=this._coreService.decPrivateModes.wraparound,P=this._coreService.modes.insertMode,ae=this._curAttrData;let ne=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&L-D>0&&ne.getWidth(this._activeBuffer.x-1)===2&&ne.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ae);let ge=this._parser.precedingJoinState;for(let se=D;se<L;++se){if(U=H[se],U<127&&Z){const Be=Z[String.fromCharCode(U)];Be&&(U=Be.charCodeAt(0))}const Oe=this._unicodeService.charProperties(U,ge);z=T.UnicodeService.extractWidth(Oe);const Te=T.UnicodeService.extractShouldJoin(Oe),ve=Te?T.UnicodeService.extractWidth(ge):0;if(ge=Oe,pe&&this._onA11yChar.fire((0,x.stringFromCodePoint)(U)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+z-ve>me){if(Y){const Be=ne;let ye=this._activeBuffer.x-ve;for(this._activeBuffer.x=ve,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),ne=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),ve>0&&ne instanceof S.BufferLine&&ne.copyCellsFrom(Be,ye,0,ve,!1);ye<me;)Be.setCellFromCodepoint(ye++,0,1,ae)}else if(this._activeBuffer.x=me-1,z===2)continue}if(Te&&this._activeBuffer.x){const Be=ne.getWidth(this._activeBuffer.x-1)?1:2;ne.addCodepointToCell(this._activeBuffer.x-Be,U,z);for(let ye=z-ve;--ye>=0;)ne.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}else if(P&&(ne.insertCells(this._activeBuffer.x,z-ve,this._activeBuffer.getNullCell(ae)),ne.getWidth(me-1)===2&&ne.setCellFromCodepoint(me-1,p.NULL_CELL_CODE,p.NULL_CELL_WIDTH,ae)),ne.setCellFromCodepoint(this._activeBuffer.x++,U,z,ae),z>0)for(;--z;)ne.setCellFromCodepoint(this._activeBuffer.x++,0,0,ae)}this._parser.precedingJoinState=ge,this._activeBuffer.x<me&&L-D>0&&ne.getWidth(this._activeBuffer.x)===0&&!ne.hasContent(this._activeBuffer.x)&&ne.setCellFromCodepoint(this._activeBuffer.x,0,1,ae),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(H,D){return H.final!=="t"||H.prefix||H.intermediates?this._parser.registerCsiHandler(H,D):this._parser.registerCsiHandler(H,(L=>!V(L.params[0],this._optionsService.rawOptions.windowOptions)||D(L)))}registerDcsHandler(H,D){return this._parser.registerDcsHandler(H,new A.DcsHandler(D))}registerEscHandler(H,D){return this._parser.registerEscHandler(H,D)}registerOscHandler(H,D){return this._parser.registerOscHandler(H,new O.OscHandler(D))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var 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 D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);D.hasWidth(this._activeBuffer.x)&&!D.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const 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,D){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=H,this._activeBuffer.y=this._activeBuffer.scrollTop+D):(this._activeBuffer.x=H,this._activeBuffer.y=D),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(H,D){this._restrictCursor(),this._setCursor(this._activeBuffer.x+H,this._activeBuffer.y+D)}cursorUp(H){const D=this._activeBuffer.y-this._activeBuffer.scrollTop;return D>=0?this._moveCursor(0,-Math.min(D,H.params[0]||1)):this._moveCursor(0,-(H.params[0]||1)),!0}cursorDown(H){const D=this._activeBuffer.scrollBottom-this._activeBuffer.y;return D>=0?this._moveCursor(0,Math.min(D,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 D=H.params[0];return D===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:D===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(H){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let D=H.params[0]||1;for(;D--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(H){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let D=H.params[0]||1;for(;D--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(H){const D=H.params[0];return D===1&&(this._curAttrData.bg|=536870912),D!==2&&D!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(H,D,L,U=!1,z=!1){const Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);Z.replaceCells(D,L,this._activeBuffer.getNullCell(this._eraseAttrData()),z),U&&(Z.isWrapped=!1)}_resetBufferLine(H,D=!1){const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);L&&(L.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),D),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+H),L.isWrapped=!1)}eraseInDisplay(H,D=!1){let L;switch(this._restrictCursor(this._bufferService.cols),H.params[0]){case 0:for(L=this._activeBuffer.y,this._dirtyRowTracker.markDirty(L),this._eraseInBufferLine(L++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,D);L<this._bufferService.rows;L++)this._resetBufferLine(L,D);this._dirtyRowTracker.markDirty(L);break;case 1:for(L=this._activeBuffer.y,this._dirtyRowTracker.markDirty(L),this._eraseInBufferLine(L,0,this._activeBuffer.x+1,!0,D),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(L+1).isWrapped=!1);L--;)this._resetBufferLine(L,D);this._dirtyRowTracker.markDirty(0);break;case 2:for(L=this._bufferService.rows,this._dirtyRowTracker.markDirty(L-1);L--;)this._resetBufferLine(L,D);this._dirtyRowTracker.markDirty(0);break;case 3:const U=this._activeBuffer.lines.length-this._bufferService.rows;U>0&&(this._activeBuffer.lines.trimStart(U),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-U,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-U,0),this._onScroll.fire(0))}return!0}eraseInLine(H,D=!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,D);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,D);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,D)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(H){this._restrictCursor();let D=H.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=this._activeBuffer.ybase+this._activeBuffer.y,U=this._bufferService.rows-1-this._activeBuffer.scrollBottom,z=this._bufferService.rows-1+this._activeBuffer.ybase-U+1;for(;D--;)this._activeBuffer.lines.splice(z-1,1),this._activeBuffer.lines.splice(L,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 D=H.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=this._activeBuffer.ybase+this._activeBuffer.y;let U;for(U=this._bufferService.rows-1-this._activeBuffer.scrollBottom,U=this._bufferService.rows-1+this._activeBuffer.ybase-U;D--;)this._activeBuffer.lines.splice(L,1),this._activeBuffer.lines.splice(U,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 D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.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 D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.deleteCells(this._activeBuffer.x,H.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(H){let D=H.params[0]||1;for(;D--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(H){let D=H.params[0]||1;for(;D--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(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 D=H.params[0]||1;for(let L=this._activeBuffer.scrollTop;L<=this._activeBuffer.scrollBottom;++L){const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);U.deleteCells(0,D,this._activeBuffer.getNullCell(this._eraseAttrData())),U.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 D=H.params[0]||1;for(let L=this._activeBuffer.scrollTop;L<=this._activeBuffer.scrollBottom;++L){const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);U.insertCells(0,D,this._activeBuffer.getNullCell(this._eraseAttrData())),U.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 D=H.params[0]||1;for(let L=this._activeBuffer.scrollTop;L<=this._activeBuffer.scrollBottom;++L){const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);U.insertCells(this._activeBuffer.x,D,this._activeBuffer.getNullCell(this._eraseAttrData())),U.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 D=H.params[0]||1;for(let L=this._activeBuffer.scrollTop;L<=this._activeBuffer.scrollBottom;++L){const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+L);U.deleteCells(this._activeBuffer.x,D,this._activeBuffer.getNullCell(this._eraseAttrData())),U.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(H){this._restrictCursor();const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.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 D=this._parser.precedingJoinState;if(!D)return!0;const L=H.params[0]||1,U=T.UnicodeService.extractWidth(D),z=this._activeBuffer.x-U,Z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(z),pe=new Uint32Array(Z.length*L);let me=0;for(let P=0;P<Z.length;){const ae=Z.codePointAt(P)||0;pe[me++]=ae,P+=ae>65535?2:1}let Y=me;for(let P=1;P<L;++P)pe.copyWithin(Y,0,me),Y+=me;return this.print(pe,0,Y),!0}sendDeviceAttributesPrimary(H){return H.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(c.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(c.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(H){return H.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(c.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(c.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(H.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(c.C0.ESC+"[>83;40003;0c")),!0}_is(H){return(this._optionsService.rawOptions.termName+"").indexOf(H)===0}setMode(H){for(let D=0;D<H.length;D++)switch(H.params[D]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(H){for(let D=0;D<H.length;D++)switch(H.params[D]){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 D=0;D<H.length;D++)switch(H.params[D]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(H){for(let D=0;D<H.length;D++)switch(H.params[D]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),H.params[D]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(H,D){const L=this._coreService.decPrivateModes,{activeProtocol:U,activeEncoding:z}=this._coreMouseService,Z=this._coreService,{buffers:pe,cols:me}=this._bufferService,{active:Y,alt:P}=pe,ae=this._optionsService.rawOptions,ne=Te=>Te?1:2,ge=H.params[0];return se=ge,Oe=D?ge===2?4:ge===4?ne(Z.modes.insertMode):ge===12?3:ge===20?ne(ae.convertEol):0:ge===1?ne(L.applicationCursorKeys):ge===3?ae.windowOptions.setWinLines?me===80?2:me===132?1:0:0:ge===6?ne(L.origin):ge===7?ne(L.wraparound):ge===8?3:ge===9?ne(U==="X10"):ge===12?ne(ae.cursorBlink):ge===25?ne(!Z.isCursorHidden):ge===45?ne(L.reverseWraparound):ge===66?ne(L.applicationKeypad):ge===67?4:ge===1e3?ne(U==="VT200"):ge===1002?ne(U==="DRAG"):ge===1003?ne(U==="ANY"):ge===1004?ne(L.sendFocus):ge===1005?4:ge===1006?ne(z==="SGR"):ge===1015?4:ge===1016?ne(z==="SGR_PIXELS"):ge===1048?1:ge===47||ge===1047||ge===1049?ne(Y===P):ge===2004?ne(L.bracketedPasteMode):0,Z.triggerDataEvent(`${c.C0.ESC}[${D?"":"?"}${se};${Oe}$y`),!0;var se,Oe}_updateAttrColor(H,D,L,U,z){return D===2?(H|=50331648,H&=-16777216,H|=E.AttributeData.fromColorRGB([L,U,z])):D===5&&(H&=-50331904,H|=33554432|255&L),H}_extractColor(H,D,L){const U=[0,0,-1,0,0,0];let z=0,Z=0;do{if(U[Z+z]=H.params[D+Z],H.hasSubParams(D+Z)){const pe=H.getSubParams(D+Z);let me=0;do U[1]===5&&(z=1),U[Z+me+1+z]=pe[me];while(++me<pe.length&&me+Z+1+z<U.length);break}if(U[1]===5&&Z+z>=2||U[1]===2&&Z+z>=5)break;U[1]&&(z=1)}while(++Z+D<H.length&&Z+z<U.length);for(let pe=2;pe<U.length;++pe)U[pe]===-1&&(U[pe]=0);switch(U[0]){case 38:L.fg=this._updateAttrColor(L.fg,U[1],U[3],U[4],U[5]);break;case 48:L.bg=this._updateAttrColor(L.bg,U[1],U[3],U[4],U[5]);break;case 58:L.extended=L.extended.clone(),L.extended.underlineColor=this._updateAttrColor(L.extended.underlineColor,U[1],U[3],U[4],U[5])}return Z}_processUnderline(H,D){D.extended=D.extended.clone(),(!~H||H>5)&&(H=1),D.extended.underlineStyle=H,D.fg|=268435456,H===0&&(D.fg&=-268435457),D.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 D=H.length;let L;const U=this._curAttrData;for(let z=0;z<D;z++)L=H.params[z],L>=30&&L<=37?(U.fg&=-50331904,U.fg|=16777216|L-30):L>=40&&L<=47?(U.bg&=-50331904,U.bg|=16777216|L-40):L>=90&&L<=97?(U.fg&=-50331904,U.fg|=16777224|L-90):L>=100&&L<=107?(U.bg&=-50331904,U.bg|=16777224|L-100):L===0?this._processSGR0(U):L===1?U.fg|=134217728:L===3?U.bg|=67108864:L===4?(U.fg|=268435456,this._processUnderline(H.hasSubParams(z)?H.getSubParams(z)[0]:1,U)):L===5?U.fg|=536870912:L===7?U.fg|=67108864:L===8?U.fg|=1073741824:L===9?U.fg|=2147483648:L===2?U.bg|=134217728:L===21?this._processUnderline(2,U):L===22?(U.fg&=-134217729,U.bg&=-134217729):L===23?U.bg&=-67108865:L===24?(U.fg&=-268435457,this._processUnderline(0,U)):L===25?U.fg&=-536870913:L===27?U.fg&=-67108865:L===28?U.fg&=-1073741825:L===29?U.fg&=2147483647:L===39?(U.fg&=-67108864,U.fg|=16777215&S.DEFAULT_ATTR_DATA.fg):L===49?(U.bg&=-67108864,U.bg|=16777215&S.DEFAULT_ATTR_DATA.bg):L===38||L===48||L===58?z+=this._extractColor(H,z,U):L===53?U.bg|=1073741824:L===55?U.bg&=-1073741825:L===59?(U.extended=U.extended.clone(),U.extended.underlineColor=-1,U.updateExtended()):L===100?(U.fg&=-67108864,U.fg|=16777215&S.DEFAULT_ATTR_DATA.fg,U.bg&=-67108864,U.bg|=16777215&S.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",L);return!0}deviceStatus(H){switch(H.params[0]){case 5:this._coreService.triggerDataEvent(`${c.C0.ESC}[0n`);break;case 6:const D=this._activeBuffer.y+1,L=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${c.C0.ESC}[${D};${L}R`)}return!0}deviceStatusPrivate(H){if(H.params[0]===6){const D=this._activeBuffer.y+1,L=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${c.C0.ESC}[?${D};${L}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 D=H.params[0]||1;switch(D){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const L=D%2==1;return this._optionsService.options.cursorBlink=L,!0}setScrollRegion(H){const D=H.params[0]||1;let L;return(H.length<2||(L=H.params[1])>this._bufferService.rows||L===0)&&(L=this._bufferService.rows),L>D&&(this._activeBuffer.scrollTop=D-1,this._activeBuffer.scrollBottom=L-1,this._setCursor(0,0)),!0}windowOptions(H){if(!V(H.params[0],this._optionsService.rawOptions.windowOptions))return!0;const D=H.length>1?H.params[1]:0;switch(H.params[0]){case 14:D!==2&&this._onRequestWindowsOptionsReport.fire(q.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(q.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${c.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:D!==0&&D!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),D!==0&&D!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:D!==0&&D!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),D!==0&&D!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(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 D=[],L=H.split(";");for(;L.length>1;){const U=L.shift(),z=L.shift();if(/^\d+$/.exec(U)){const Z=parseInt(U);if(J(Z))if(z==="?")D.push({type:0,index:Z});else{const pe=(0,B.parseColor)(z);pe&&D.push({type:1,index:Z,color:pe})}}}return D.length&&this._onColor.fire(D),!0}setHyperlink(H){const D=H.split(";");return!(D.length<2)&&(D[1]?this._createHyperlink(D[0],D[1]):!D[0]&&this._finishHyperlink())}_createHyperlink(H,D){this._getCurrentLinkId()&&this._finishHyperlink();const L=H.split(":");let U;const z=L.findIndex((Z=>Z.startsWith("id=")));return z!==-1&&(U=L[z].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:U,uri:D}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(H,D){const L=H.split(";");for(let U=0;U<L.length&&!(D>=this._specialColors.length);++U,++D)if(L[U]==="?")this._onColor.fire([{type:0,index:this._specialColors[D]}]);else{const z=(0,B.parseColor)(L[U]);z&&this._onColor.fire([{type:1,index:this._specialColors[D],color:z}])}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 D=[],L=H.split(";");for(let U=0;U<L.length;++U)if(/^\d+$/.exec(L[U])){const z=parseInt(L[U]);J(z)&&D.push({type:2,index:z})}return D.length&&this._onColor.fire(D),!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(j[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 g.CellData;H.content=4194373,H.fg=this._curAttrData.fg,H.bg=this._curAttrData.bg,this._setCursor(0,0);for(let D=0;D<this._bufferService.rows;++D){const L=this._activeBuffer.ybase+this._activeBuffer.y+D,U=this._activeBuffer.lines.get(L);U&&(U.fill(H),U.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(H,D){const L=this._bufferService.buffer,U=this._optionsService.rawOptions;return(z=>(this._coreService.triggerDataEvent(`${c.C0.ESC}${z}${c.C0.ESC}\\`),!0))(H==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:H==='"p'?'P1$r61;1"p':H==="r"?`P1$r${L.scrollTop+1};${L.scrollBottom+1}r`:H==="m"?"P1$r0m":H===" q"?`P1$r${{block:2,underline:4,bar:6}[U.cursorStyle]-(U.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(H,D){this._dirtyRowTracker.markRangeDirty(H,D)}}o.InputHandler=X;let G=class{constructor(re){this._bufferService=re,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(re){re<this.start?this.start=re:re>this.end&&(this.end=re)}markRangeDirty(re,H){re>H&&(W=re,re=H,H=W),re<this.start&&(this.start=re),H>this.end&&(this.end=H)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function J(re){return 0<=re&&re<256}G=h([d(0,M.IBufferService)],G)},844:(m,o)=>{function u(h){for(const d of h)d.dispose();h.length=0}Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.toDisposable=o.MutableDisposable=o.Disposable=void 0,o.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)}},o.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}},o.toDisposable=function(h){return{dispose:h}},o.disposeArray=u,o.getDisposeArrayDisposable=function(h){return{dispose:()=>u(h)}}},1505:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(d,c,b){this._data[d]||(this._data[d]={}),this._data[d][c]=b}get(d,c){return this._data[d]?this._data[d][c]:void 0}clear(){this._data={}}}o.TwoKeyMap=u,o.FourKeyMap=class{constructor(){this._data=new u}set(h,d,c,b,w){this._data.get(h,d)||this._data.set(h,d,new u),this._data.get(h,d).set(c,b,w)}get(h,d,c,b){var w;return(w=this._data.get(h,d))==null?void 0:w.get(c,b)}clear(){this._data.clear()}}},6114:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isChromeOS=o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.getSafariVersion=o.isSafari=o.isLegacyEdge=o.isFirefox=o.isNode=void 0,o.isNode=typeof process<"u"&&"title"in process;const u=o.isNode?"node":navigator.userAgent,h=o.isNode?"node":navigator.platform;o.isFirefox=u.includes("Firefox"),o.isLegacyEdge=u.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(u),o.getSafariVersion=function(){if(!o.isSafari)return 0;const d=u.match(/Version\/(\d+)/);return d===null||d.length<2?0:parseInt(d[1])},o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(h),o.isIpad=h==="iPad",o.isIphone=h==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(h),o.isLinux=h.indexOf("Linux")>=0,o.isChromeOS=/\bCrOS\b/.test(u)},6106:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let u=0;o.SortedList=class{constructor(h){this._getKey=h,this._array=[]}clear(){this._array.length=0}insert(h){this._array.length!==0?(u=this._search(this._getKey(h)),this._array.splice(u,0,h)):this._array.push(h)}delete(h){if(this._array.length===0)return!1;const d=this._getKey(h);if(d===void 0||(u=this._search(d),u===-1)||this._getKey(this._array[u])!==d)return!1;do if(this._array[u]===h)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===d);return!1}*getKeyIterator(h){if(this._array.length!==0&&(u=this._search(h),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===h))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===h)}forEachByKey(h,d){if(this._array.length!==0&&(u=this._search(h),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===h))do d(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===h)}values(){return[...this._array].values()}_search(h){let d=0,c=this._array.length-1;for(;c>=d;){let b=d+c>>1;const w=this._getKey(this._array[b]);if(w>h)c=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:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const h=u(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 k=0,x=0,S=w.timeRemaining(),_=0;for(;this._i<this._tasks.length;){if(k=Date.now(),this._tasks[this._i]()||this._i++,k=Math.max(1,Date.now()-k),x=Math.max(k,x),_=w.timeRemaining(),1.5*x>_)return S-k<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(S-k))}ms`),void this._start();S=_}this.clear()}}class c extends d{_requestCallback(w){return setTimeout((()=>w(this._createDeadline(16))))}_cancelCallback(w){clearTimeout(w)}_createDeadline(w){const k=Date.now()+w;return{timeRemaining:()=>Math.max(0,k-Date.now())}}}o.PriorityTaskQueue=c,o.IdleTaskQueue=!h.isNode&&"requestIdleCallback"in window?class extends d{_requestCallback(b){return requestIdleCallback(b)}_cancelCallback(b){cancelIdleCallback(b)}}:c,o.DebouncedIdleTask=class{constructor(){this._queue=new o.IdleTaskQueue}set(b){this._queue.clear(),this._queue.enqueue(b)}flush(){this._queue.flush()}}},9282:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const h=u(643);o.updateWindowsModeWrappedState=function(d){const c=d.buffer.lines.get(d.buffer.ybase+d.buffer.y-1),b=c==null?void 0:c.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:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new h}static toColorRGB(c){return[c>>>16&255,c>>>8&255,255&c]}static fromColorRGB(c){return(255&c[0])<<16|(255&c[1])<<8|255&c[2]}clone(){const c=new u;return c.fg=this.fg,c.bg=this.bg,c.extended=this.extended.clone(),c}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}}o.AttributeData=u;class h{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(c){this._ext=c}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(c){this._ext&=-469762049,this._ext|=c<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(c){this._ext&=-67108864,this._ext|=67108863&c}get urlId(){return this._urlId}set urlId(c){this._urlId=c}get underlineVariantOffset(){const c=(3758096384&this._ext)>>29;return c<0?4294967288^c:c}set underlineVariantOffset(c){this._ext&=536870911,this._ext|=c<<29&3758096384}constructor(c=0,b=0){this._ext=0,this._urlId=0,this._ext=c,this._urlId=b}clone(){return new h(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}o.ExtendedAttrs=h},9092:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const h=u(6349),d=u(7226),c=u(3734),b=u(8437),w=u(4634),k=u(511),x=u(643),S=u(4863),_=u(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(p,g,E){this._hasScrollback=p,this._optionsService=g,this._bufferService=E,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=k.CellData.fromCharData([0,x.NULL_CELL_CHAR,x.NULL_CELL_WIDTH,x.NULL_CELL_CODE]),this._whitespaceCell=k.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(p){return p?(this._nullCell.fg=p.fg,this._nullCell.bg=p.bg,this._nullCell.extended=p.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new c.ExtendedAttrs),this._nullCell}getWhitespaceCell(p){return p?(this._whitespaceCell.fg=p.fg,this._whitespaceCell.bg=p.bg,this._whitespaceCell.extended=p.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new c.ExtendedAttrs),this._whitespaceCell}getBlankLine(p,g){return new b.BufferLine(this._bufferService.cols,this.getNullCell(p),g)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const p=this.ybase+this.y-this.ydisp;return p>=0&&p<this._rows}_getCorrectBufferLength(p){if(!this._hasScrollback)return p;const g=p+this._optionsService.rawOptions.scrollback;return g>o.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:g}fillViewportRows(p){if(this.lines.length===0){p===void 0&&(p=b.DEFAULT_ATTR_DATA);let g=this._rows;for(;g--;)this.lines.push(this.getBlankLine(p))}}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(p,g){const E=this.getNullCell(b.DEFAULT_ATTR_DATA);let M=0;const T=this._getCorrectBufferLength(g);if(T>this.lines.maxLength&&(this.lines.maxLength=T),this.lines.length>0){if(this._cols<p)for(let A=0;A<this.lines.length;A++)M+=+this.lines.get(A).resize(p,E);let O=0;if(this._rows<g)for(let A=this._rows;A<g;A++)this.lines.length<g+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(p,E)):this.ybase>0&&this.lines.length<=this.ybase+this.y+O+1?(this.ybase--,O++,this.ydisp>0&&this.ydisp--):this.lines.push(new b.BufferLine(p,E)));else for(let A=this._rows;A>g;A--)this.lines.length>g+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(T<this.lines.maxLength){const A=this.lines.length-T;A>0&&(this.lines.trimStart(A),this.ybase=Math.max(this.ybase-A,0),this.ydisp=Math.max(this.ydisp-A,0),this.savedY=Math.max(this.savedY-A,0)),this.lines.maxLength=T}this.x=Math.min(this.x,p-1),this.y=Math.min(this.y,g-1),O&&(this.y+=O),this.savedX=Math.min(this.savedX,p-1),this.scrollTop=0}if(this.scrollBottom=g-1,this._isReflowEnabled&&(this._reflow(p,g),this._cols>p))for(let O=0;O<this.lines.length;O++)M+=+this.lines.get(O).resize(p,E);this._cols=p,this._rows=g,this._memoryCleanupQueue.clear(),M>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let p=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,p=!1);let g=0;for(;this._memoryCleanupPosition<this.lines.length;)if(g+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),g>100)return!0;return p}get _isReflowEnabled(){const p=this._optionsService.rawOptions.windowsPty;return p&&p.buildNumber?this._hasScrollback&&p.backend==="conpty"&&p.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(p,g){this._cols!==p&&(p>this._cols?this._reflowLarger(p,g):this._reflowSmaller(p,g))}_reflowLarger(p,g){const E=(0,w.reflowLargerGetLinesToRemove)(this.lines,this._cols,p,this.ybase+this.y,this.getNullCell(b.DEFAULT_ATTR_DATA));if(E.length>0){const M=(0,w.reflowLargerCreateNewLayout)(this.lines,E);(0,w.reflowLargerApplyNewLayout)(this.lines,M.layout),this._reflowLargerAdjustViewport(p,g,M.countRemoved)}}_reflowLargerAdjustViewport(p,g,E){const M=this.getNullCell(b.DEFAULT_ATTR_DATA);let T=E;for(;T-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<g&&this.lines.push(new b.BufferLine(p,M))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-E,0)}_reflowSmaller(p,g){const E=this.getNullCell(b.DEFAULT_ATTR_DATA),M=[];let T=0;for(let O=this.lines.length-1;O>=0;O--){let A=this.lines.get(O);if(!A||!A.isWrapped&&A.getTrimmedLength()<=p)continue;const B=[A];for(;A.isWrapped&&O>0;)A=this.lines.get(--O),B.unshift(A);const j=this.ybase+this.y;if(j>=O&&j<O+B.length)continue;const F=B[B.length-1].getTrimmedLength(),V=(0,w.reflowSmallerGetNewLineLengths)(B,this._cols,p),q=V.length-B.length;let W;W=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+q):Math.max(0,this.lines.length-this.lines.maxLength+q);const X=[];for(let L=0;L<q;L++){const U=this.getBlankLine(b.DEFAULT_ATTR_DATA,!0);X.push(U)}X.length>0&&(M.push({start:O+B.length+T,newLines:X}),T+=X.length),B.push(...X);let G=V.length-1,J=V[G];J===0&&(G--,J=V[G]);let re=B.length-q-1,H=F;for(;re>=0;){const L=Math.min(H,J);if(B[G]===void 0)break;if(B[G].copyCellsFrom(B[re],H-L,J-L,L,!0),J-=L,J===0&&(G--,J=V[G]),H-=L,H===0){re--;const U=Math.max(re,0);H=(0,w.getWrappedLineTrimmedLength)(B,U,this._cols)}}for(let L=0;L<B.length;L++)V[L]<p&&B[L].setCell(V[L],E);let D=q-W;for(;D-- >0;)this.ybase===0?this.y<g-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+T)-g&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+q,this.ybase+g-1)}if(M.length>0){const O=[],A=[];for(let G=0;G<this.lines.length;G++)A.push(this.lines.get(G));const B=this.lines.length;let j=B-1,F=0,V=M[F];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+T);let q=0;for(let G=Math.min(this.lines.maxLength-1,B+T-1);G>=0;G--)if(V&&V.start>j+q){for(let J=V.newLines.length-1;J>=0;J--)this.lines.set(G--,V.newLines[J]);G++,O.push({index:j+1,amount:V.newLines.length}),q+=V.newLines.length,V=M[++F]}else this.lines.set(G,A[j--]);let W=0;for(let G=O.length-1;G>=0;G--)O[G].index+=W,this.lines.onInsertEmitter.fire(O[G]),W+=O[G].amount;const X=Math.max(0,B+T-this.lines.maxLength);X>0&&this.lines.onTrimEmitter.fire(X)}}translateBufferLineToString(p,g,E=0,M){const T=this.lines.get(p);return T?T.translateToString(g,E,M):""}getWrappedRangeForLine(p){let g=p,E=p;for(;g>0&&this.lines.get(g).isWrapped;)g--;for(;E+1<this.lines.length&&this.lines.get(E+1).isWrapped;)E++;return{first:g,last:E}}setupTabStops(p){for(p!=null?this.tabs[p]||(p=this.prevStop(p)):(this.tabs={},p=0);p<this._cols;p+=this._optionsService.rawOptions.tabStopWidth)this.tabs[p]=!0}prevStop(p){for(p==null&&(p=this.x);!this.tabs[--p]&&p>0;);return p>=this._cols?this._cols-1:p<0?0:p}nextStop(p){for(p==null&&(p=this.x);!this.tabs[++p]&&p<this._cols;);return p>=this._cols?this._cols-1:p<0?0:p}clearMarkers(p){this._isClearing=!0;for(let g=0;g<this.markers.length;g++)this.markers[g].line===p&&(this.markers[g].dispose(),this.markers.splice(g--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let p=0;p<this.markers.length;p++)this.markers[p].dispose(),this.markers.splice(p--,1);this._isClearing=!1}addMarker(p){const g=new S.Marker(p);return this.markers.push(g),g.register(this.lines.onTrim((E=>{g.line-=E,g.line<0&&g.dispose()}))),g.register(this.lines.onInsert((E=>{g.line>=E.index&&(g.line+=E.amount)}))),g.register(this.lines.onDelete((E=>{g.line>=E.index&&g.line<E.index+E.amount&&g.dispose(),g.line>E.index&&(g.line-=E.amount)}))),g.register(g.onDispose((()=>this._removeMarker(g)))),g}_removeMarker(p){this._isClearing||this.markers.splice(this.markers.indexOf(p),1)}}},8437:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const h=u(3734),d=u(511),c=u(643),b=u(482);o.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);let w=0;class k{constructor(S,_,p=!1){this.isWrapped=p,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*S);const g=_||d.CellData.fromCharData([0,c.NULL_CELL_CHAR,c.NULL_CELL_WIDTH,c.NULL_CELL_CODE]);for(let E=0;E<S;++E)this.setCell(E,g);this.length=S}get(S){const _=this._data[3*S+0],p=2097151&_;return[this._data[3*S+1],2097152&_?this._combined[S]:p?(0,b.stringFromCodePoint)(p):"",_>>22,2097152&_?this._combined[S].charCodeAt(this._combined[S].length-1):p]}set(S,_){this._data[3*S+1]=_[c.CHAR_DATA_ATTR_INDEX],_[c.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[S]=_[1],this._data[3*S+0]=2097152|S|_[c.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*S+0]=_[c.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|_[c.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,_,p,g){268435456&g.bg&&(this._extendedAttrs[S]=g.extended),this._data[3*S+0]=_|p<<22,this._data[3*S+1]=g.fg,this._data[3*S+2]=g.bg}addCodepointToCell(S,_,p){let g=this._data[3*S+0];2097152&g?this._combined[S]+=(0,b.stringFromCodePoint)(_):2097151&g?(this._combined[S]=(0,b.stringFromCodePoint)(2097151&g)+(0,b.stringFromCodePoint)(_),g&=-2097152,g|=2097152):g=_|4194304,p&&(g&=-12582913,g|=p<<22),this._data[3*S+0]=g}insertCells(S,_,p){if((S%=this.length)&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,p),_<this.length-S){const g=new d.CellData;for(let E=this.length-S-_-1;E>=0;--E)this.setCell(S+_+E,this.loadCell(S+E,g));for(let E=0;E<_;++E)this.setCell(S+E,p)}else for(let g=S;g<this.length;++g)this.setCell(g,p);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,p)}deleteCells(S,_,p){if(S%=this.length,_<this.length-S){const g=new d.CellData;for(let E=0;E<this.length-S-_;++E)this.setCell(S+E,this.loadCell(S+_+E,g));for(let E=this.length-_;E<this.length;++E)this.setCell(E,p)}else for(let g=S;g<this.length;++g)this.setCell(g,p);S&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,p),this.getWidth(S)!==0||this.hasContent(S)||this.setCellFromCodepoint(S,0,1,p)}replaceCells(S,_,p,g=!1){if(g)for(S&&this.getWidth(S-1)===2&&!this.isProtected(S-1)&&this.setCellFromCodepoint(S-1,0,1,p),_<this.length&&this.getWidth(_-1)===2&&!this.isProtected(_)&&this.setCellFromCodepoint(_,0,1,p);S<_&&S<this.length;)this.isProtected(S)||this.setCell(S,p),S++;else for(S&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,p),_<this.length&&this.getWidth(_-1)===2&&this.setCellFromCodepoint(_,0,1,p);S<_&&S<this.length;)this.setCell(S++,p)}resize(S,_){if(S===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const p=3*S;if(S>this.length){if(this._data.buffer.byteLength>=4*p)this._data=new Uint32Array(this._data.buffer,0,p);else{const g=new Uint32Array(p);g.set(this._data),this._data=g}for(let g=this.length;g<S;++g)this.setCell(g,_)}else{this._data=this._data.subarray(0,p);const g=Object.keys(this._combined);for(let M=0;M<g.length;M++){const T=parseInt(g[M],10);T>=S&&delete this._combined[T]}const E=Object.keys(this._extendedAttrs);for(let M=0;M<E.length;M++){const T=parseInt(E[M],10);T>=S&&delete this._extendedAttrs[T]}}return this.length=S,4*p*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 p=0;p<this.length;++p)this.isProtected(p)||this.setCell(p,S);else{this._combined={},this._extendedAttrs={};for(let p=0;p<this.length;++p)this.setCell(p,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 k(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,_,p,g,E){const M=S._data;if(E)for(let O=g-1;O>=0;O--){for(let A=0;A<3;A++)this._data[3*(p+O)+A]=M[3*(_+O)+A];268435456&M[3*(_+O)+2]&&(this._extendedAttrs[p+O]=S._extendedAttrs[_+O])}else for(let O=0;O<g;O++){for(let A=0;A<3;A++)this._data[3*(p+O)+A]=M[3*(_+O)+A];268435456&M[3*(_+O)+2]&&(this._extendedAttrs[p+O]=S._extendedAttrs[_+O])}const T=Object.keys(S._combined);for(let O=0;O<T.length;O++){const A=parseInt(T[O],10);A>=_&&(this._combined[A-_+p]=S._combined[A])}}translateToString(S,_,p,g){_=_??0,p=p??this.length,S&&(p=Math.min(p,this.getTrimmedLength())),g&&(g.length=0);let E="";for(;_<p;){const M=this._data[3*_+0],T=2097151&M,O=2097152&M?this._combined[_]:T?(0,b.stringFromCodePoint)(T):c.WHITESPACE_CELL_CHAR;if(E+=O,g)for(let A=0;A<O.length;++A)g.push(_);_+=M>>22||1}return g&&g.push(_),E}}o.BufferLine=k},4841:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(u,h){if(u.start.y>u.end.y)throw new Error(`Buffer range end (${u.end.x}, ${u.end.y}) cannot be before start (${u.start.x}, ${u.start.y})`);return h*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(m,o)=>{function u(h,d,c){if(d===h.length-1)return h[d].getTrimmedLength();const b=!h[d].hasContent(c-1)&&h[d].getWidth(c-1)===1,w=h[d+1].getWidth(0)===2;return b&&w?c-1:c}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(h,d,c,b,w){const k=[];for(let x=0;x<h.length-1;x++){let S=x,_=h.get(++S);if(!_.isWrapped)continue;const p=[h.get(x)];for(;S<h.length&&_.isWrapped;)p.push(_),_=h.get(++S);if(b>=x&&b<S){x+=p.length-1;continue}let g=0,E=u(p,g,d),M=1,T=0;for(;M<p.length;){const A=u(p,M,d),B=A-T,j=c-E,F=Math.min(B,j);p[g].copyCellsFrom(p[M],T,E,F,!1),E+=F,E===c&&(g++,E=0),T+=F,T===A&&(M++,T=0),E===0&&g!==0&&p[g-1].getWidth(c-1)===2&&(p[g].copyCellsFrom(p[g-1],c-1,E++,1,!1),p[g-1].setCell(c-1,w))}p[g].replaceCells(E,c,w);let O=0;for(let A=p.length-1;A>0&&(A>g||p[A].getTrimmedLength()===0);A--)O++;O>0&&(k.push(x+p.length-O),k.push(O)),x+=p.length-1}return k},o.reflowLargerCreateNewLayout=function(h,d){const c=[];let b=0,w=d[b],k=0;for(let x=0;x<h.length;x++)if(w===x){const S=d[++b];h.onDeleteEmitter.fire({index:x-k,amount:S}),x+=S-1,k+=S,w=d[++b]}else c.push(x);return{layout:c,countRemoved:k}},o.reflowLargerApplyNewLayout=function(h,d){const c=[];for(let b=0;b<d.length;b++)c.push(h.get(d[b]));for(let b=0;b<c.length;b++)h.set(b,c[b]);h.length=d.length},o.reflowSmallerGetNewLineLengths=function(h,d,c){const b=[],w=h.map(((_,p)=>u(h,p,d))).reduce(((_,p)=>_+p));let k=0,x=0,S=0;for(;S<w;){if(w-S<c){b.push(w-S);break}k+=c;const _=u(h,x,d);k>_&&(k-=_,x++);const p=h[x].getWidth(k-1)===2;p&&k--;const g=p?c-1:c;b.push(g),S+=g}return b},o.getWrappedLineTrimmedLength=u},5295:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const h=u(8460),d=u(844),c=u(9092);class b extends d.Disposable{constructor(k,x){super(),this._optionsService=k,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 c.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new c.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(k){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(k),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(k,x){this._normal.resize(k,x),this._alt.resize(k,x),this.setupTabStops(k)}setupTabStops(k){this._normal.setupTabStops(k),this._alt.setupTabStops(k)}}o.BufferSet=b},511:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const h=u(482),d=u(643),c=u(3734);class b extends c.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new c.ExtendedAttrs,this.combinedData=""}static fromCharData(k){const x=new b;return x.setFromCharData(k),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(k){this.fg=k[d.CHAR_DATA_ATTR_INDEX],this.bg=0;let x=!1;if(k[d.CHAR_DATA_CHAR_INDEX].length>2)x=!0;else if(k[d.CHAR_DATA_CHAR_INDEX].length===2){const S=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=S&&S<=56319){const _=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=_&&_<=57343?this.content=1024*(S-55296)+_-56320+65536|k[d.CHAR_DATA_WIDTH_INDEX]<<22:x=!0}else x=!0}else this.content=k[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|k[d.CHAR_DATA_WIDTH_INDEX]<<22;x&&(this.combinedData=k[d.CHAR_DATA_CHAR_INDEX],this.content=2097152|k[d.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.CellData=b},643:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_EXT=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=0,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.DEFAULT_EXT=0,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},4863:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const h=u(8460),d=u(844);class c{get id(){return this._id}constructor(w){this.line=w,this.isDisposed=!1,this._disposables=[],this._id=c._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}}o.Marker=c,c._nextId=1},7116:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.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:"≥","{":"π","|":"≠","}":"£","~":"·"},o.CHARSETS.A={"#":"£"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},o.CHARSETS.C=o.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},o.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},o.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},o.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},o.CHARSETS.E=o.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},o.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},o.CHARSETS.H=o.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(m,o)=>{var u,h,d;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,(function(c){c.NUL="\0",c.SOH="",c.STX="",c.ETX="",c.EOT="",c.ENQ="",c.ACK="",c.BEL="\x07",c.BS="\b",c.HT=" ",c.LF=`
|
|
56
|
+
`,c.VT="\v",c.FF="\f",c.CR="\r",c.SO="",c.SI="",c.DLE="",c.DC1="",c.DC2="",c.DC3="",c.DC4="",c.NAK="",c.SYN="",c.ETB="",c.CAN="",c.EM="",c.SUB="",c.ESC="\x1B",c.FS="",c.GS="",c.RS="",c.US="",c.SP=" ",c.DEL=""})(u||(o.C0=u={})),(function(c){c.PAD="",c.HOP="",c.BPH="",c.NBH="",c.IND="",c.NEL="
",c.SSA="",c.ESA="",c.HTS="",c.HTJ="",c.VTS="",c.PLD="",c.PLU="",c.RI="",c.SS2="",c.SS3="",c.DCS="",c.PU1="",c.PU2="",c.STS="",c.CCH="",c.MW="",c.SPA="",c.EPA="",c.SOS="",c.SGCI="",c.SCI="",c.CSI="",c.ST="",c.OSC="",c.PM="",c.APC=""})(h||(o.C1=h={})),(function(c){c.ST=`${u.ESC}\\`})(d||(o.C1_ESCAPED=d={}))},7399:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const h=u(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:["'",'"']};o.evaluateKeyboardEvent=function(c,b,w,k){const x={type:0,cancel:!1,key:void 0},S=(c.shiftKey?1:0)|(c.altKey?2:0)|(c.ctrlKey?4:0)|(c.metaKey?8:0);switch(c.keyCode){case 0:c.key==="UIKeyInputUpArrow"?x.key=b?h.C0.ESC+"OA":h.C0.ESC+"[A":c.key==="UIKeyInputLeftArrow"?x.key=b?h.C0.ESC+"OD":h.C0.ESC+"[D":c.key==="UIKeyInputRightArrow"?x.key=b?h.C0.ESC+"OC":h.C0.ESC+"[C":c.key==="UIKeyInputDownArrow"&&(x.key=b?h.C0.ESC+"OB":h.C0.ESC+"[B");break;case 8:x.key=c.ctrlKey?"\b":h.C0.DEL,c.altKey&&(x.key=h.C0.ESC+x.key);break;case 9:if(c.shiftKey){x.key=h.C0.ESC+"[Z";break}x.key=h.C0.HT,x.cancel=!0;break;case 13:x.key=c.altKey?h.C0.ESC+h.C0.CR:h.C0.CR,x.cancel=!0;break;case 27:x.key=h.C0.ESC,c.altKey&&(x.key=h.C0.ESC+h.C0.ESC),x.cancel=!0;break;case 37:if(c.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(c.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(c.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(c.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:c.shiftKey||c.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:c.shiftKey?x.type=2:c.ctrlKey?x.key=h.C0.ESC+"[5;"+(S+1)+"~":x.key=h.C0.ESC+"[5~";break;case 34:c.shiftKey?x.type=3:c.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(!c.ctrlKey||c.shiftKey||c.altKey||c.metaKey)if(w&&!k||!c.altKey||c.metaKey)!w||c.altKey||c.ctrlKey||c.shiftKey||!c.metaKey?c.key&&!c.ctrlKey&&!c.altKey&&!c.metaKey&&c.keyCode>=48&&c.key.length===1?x.key=c.key:c.key&&c.ctrlKey&&(c.key==="_"&&(x.key=h.C0.US),c.key==="@"&&(x.key=h.C0.NUL)):c.keyCode===65&&(x.type=1);else{const _=d[c.keyCode],p=_==null?void 0:_[c.shiftKey?1:0];if(p)x.key=h.C0.ESC+p;else if(c.keyCode>=65&&c.keyCode<=90){const g=c.ctrlKey?c.keyCode-64:c.keyCode+32;let E=String.fromCharCode(g);c.shiftKey&&(E=E.toUpperCase()),x.key=h.C0.ESC+E}else if(c.keyCode===32)x.key=h.C0.ESC+(c.ctrlKey?h.C0.NUL:" ");else if(c.key==="Dead"&&c.code.startsWith("Key")){let g=c.code.slice(3,4);c.shiftKey||(g=g.toLowerCase()),x.key=h.C0.ESC+g,x.cancel=!0}}else c.keyCode>=65&&c.keyCode<=90?x.key=String.fromCharCode(c.keyCode-64):c.keyCode===32?x.key=h.C0.NUL:c.keyCode>=51&&c.keyCode<=55?x.key=String.fromCharCode(c.keyCode-51+27):c.keyCode===56?x.key=h.C0.DEL:c.keyCode===219?x.key=h.C0.ESC:c.keyCode===220?x.key=h.C0.FS:c.keyCode===221&&(x.key=h.C0.GS)}return x}},482:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},o.utf32ToString=function(u,h=0,d=u.length){let c="";for(let b=h;b<d;++b){let w=u[b];w>65535?(w-=65536,c+=String.fromCharCode(55296+(w>>10))+String.fromCharCode(w%1024+56320)):c+=String.fromCharCode(w)}return c},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,h){const d=u.length;if(!d)return 0;let c=0,b=0;if(this._interim){const w=u.charCodeAt(b++);56320<=w&&w<=57343?h[c++]=1024*(this._interim-55296)+w-56320+65536:(h[c++]=this._interim,h[c++]=w),this._interim=0}for(let w=b;w<d;++w){const k=u.charCodeAt(w);if(55296<=k&&k<=56319){if(++w>=d)return this._interim=k,c;const x=u.charCodeAt(w);56320<=x&&x<=57343?h[c++]=1024*(k-55296)+x-56320+65536:(h[c++]=k,h[c++]=x)}else k!==65279&&(h[c++]=k)}return c}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,h){const d=u.length;if(!d)return 0;let c,b,w,k,x=0,S=0,_=0;if(this.interim[0]){let E=!1,M=this.interim[0];M&=(224&M)==192?31:(240&M)==224?15:7;let T,O=0;for(;(T=63&this.interim[++O])&&O<4;)M<<=6,M|=T;const A=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,B=A-O;for(;_<B;){if(_>=d)return 0;if(T=u[_++],(192&T)!=128){_--,E=!0;break}this.interim[O++]=T,M<<=6,M|=63&T}E||(A===2?M<128?_--:h[x++]=M:A===3?M<2048||M>=55296&&M<=57343||M===65279||(h[x++]=M):M<65536||M>1114111||(h[x++]=M)),this.interim.fill(0)}const p=d-4;let g=_;for(;g<d;){for(;!(!(g<p)||128&(c=u[g])||128&(b=u[g+1])||128&(w=u[g+2])||128&(k=u[g+3]));)h[x++]=c,h[x++]=b,h[x++]=w,h[x++]=k,g+=4;if(c=u[g++],c<128)h[x++]=c;else if((224&c)==192){if(g>=d)return this.interim[0]=c,x;if(b=u[g++],(192&b)!=128){g--;continue}if(S=(31&c)<<6|63&b,S<128){g--;continue}h[x++]=S}else if((240&c)==224){if(g>=d)return this.interim[0]=c,x;if(b=u[g++],(192&b)!=128){g--;continue}if(g>=d)return this.interim[0]=c,this.interim[1]=b,x;if(w=u[g++],(192&w)!=128){g--;continue}if(S=(15&c)<<12|(63&b)<<6|63&w,S<2048||S>=55296&&S<=57343||S===65279)continue;h[x++]=S}else if((248&c)==240){if(g>=d)return this.interim[0]=c,x;if(b=u[g++],(192&b)!=128){g--;continue}if(g>=d)return this.interim[0]=c,this.interim[1]=b,x;if(w=u[g++],(192&w)!=128){g--;continue}if(g>=d)return this.interim[0]=c,this.interim[1]=b,this.interim[2]=w,x;if(k=u[g++],(192&k)!=128){g--;continue}if(S=(7&c)<<18|(63&b)<<12|(63&w)<<6|63&k,S<65536||S>1114111)continue;h[x++]=S}}return x}}},225:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;const h=u(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]],c=[[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;o.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(k,x){let S,_=0,p=x.length-1;if(k<x[0][0]||k>x[p][1])return!1;for(;p>=_;)if(S=_+p>>1,k>x[S][1])_=S+1;else{if(!(k<x[S][0]))return!0;p=S-1}return!1})(w,c)?0:w>=131072&&w<=196605||w>=196608&&w<=262141?2:1}charProperties(w,k){let x=this.wcwidth(w),S=x===0&&k!==0;if(S){const _=h.UnicodeService.extractWidth(k);_===0?S=!1:_>x&&(x=_)}return h.UnicodeService.createPropertyValue(0,x,S)}}},5981:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;const h=u(8460),d=u(844);class c 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,k){if(k!==void 0&&this._syncCalls>k)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,k){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(k),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=w.length,this._writeBuffer.push(w),this._callbacks.push(k)}_innerWrite(w=0,k=!0){const x=w||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const S=this._writeBuffer[this._bufferOffset],_=this._action(S,k);if(_){const g=E=>Date.now()-x>=12?setTimeout((()=>this._innerWrite(0,E))):this._innerWrite(x,E);return void _.catch((E=>(queueMicrotask((()=>{throw E})),Promise.resolve(!1)))).then(g)}const p=this._callbacks[this._bufferOffset];if(p&&p(),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()}}o.WriteBuffer=c},5941:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;const u=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,h=/^[\da-f]+$/;function d(c,b){const w=c.toString(16),k=w.length<2?"0"+w:w;switch(b){case 4:return w[0];case 8:return k;case 12:return(k+k).slice(0,3);default:return k+k}}o.parseColor=function(c){if(!c)return;let b=c.toLowerCase();if(b.indexOf("rgb:")===0){b=b.slice(4);const w=u.exec(b);if(w){const k=w[1]?15:w[4]?255:w[7]?4095:65535;return[Math.round(parseInt(w[1]||w[4]||w[7]||w[10],16)/k*255),Math.round(parseInt(w[2]||w[5]||w[8]||w[11],16)/k*255),Math.round(parseInt(w[3]||w[6]||w[9]||w[12],16)/k*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,k=[0,0,0];for(let x=0;x<3;++x){const S=parseInt(b.slice(w*x,w*x+w),16);k[x]=w===1?S<<4:w===2?S:w===3?S>>4:S>>8}return k}},o.toRgbString=function(c,b=16){const[w,k,x]=c;return`rgb:${d(w,b)}/${d(k,b)}/${d(x,b)}`}},5770:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;const h=u(482),d=u(8742),c=u(5770),b=[];o.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(k,x){this._handlers[k]===void 0&&(this._handlers[k]=[]);const S=this._handlers[k];return S.push(x),{dispose:()=>{const _=S.indexOf(x);_!==-1&&S.splice(_,1)}}}clearHandler(k){this._handlers[k]&&delete this._handlers[k]}setHandlerFallback(k){this._handlerFb=k}reset(){if(this._active.length)for(let k=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;k>=0;--k)this._active[k].unhook(!1);this._stack.paused=!1,this._active=b,this._ident=0}hook(k,x){if(this.reset(),this._ident=k,this._active=this._handlers[k]||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(k,x,S){if(this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].put(k,x,S);else this._handlerFb(this._ident,"PUT",(0,h.utf32ToString)(k,x,S))}unhook(k,x=!0){if(this._active.length){let S=!1,_=this._active.length-1,p=!1;if(this._stack.paused&&(_=this._stack.loopPosition-1,S=x,p=this._stack.fallThrough,this._stack.paused=!1),!p&&S===!1){for(;_>=0&&(S=this._active[_].unhook(k),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",k);this._active=b,this._ident=0}};const w=new d.Params;w.addParam(0),o.DcsHandler=class{constructor(k){this._handler=k,this._data="",this._params=w,this._hitLimit=!1}hook(k){this._params=k.length>1||k.params[0]?k.clone():w,this._data="",this._hitLimit=!1}put(k,x,S){this._hitLimit||(this._data+=(0,h.utf32ToString)(k,x,S),this._data.length>c.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(k){let x=!1;if(this._hitLimit)x=!1;else if(k&&(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:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;const h=u(844),d=u(8742),c=u(6242),b=u(6351);class w{constructor(_){this.table=new Uint8Array(_)}setDefault(_,p){this.table.fill(_<<4|p)}add(_,p,g,E){this.table[p<<8|_]=g<<4|E}addMany(_,p,g,E){for(let M=0;M<_.length;M++)this.table[p<<8|_[M]]=g<<4|E}}o.TransitionTable=w;const k=160;o.VT500_TRANSITION_TABLE=(function(){const S=new w(4095),_=Array.apply(null,Array(256)).map(((O,A)=>A)),p=(O,A)=>_.slice(O,A),g=p(32,127),E=p(0,24);E.push(25),E.push.apply(E,p(28,32));const M=p(0,14);let T;for(T in S.setDefault(1,0),S.addMany(g,0,2,0),M)S.addMany([24,26,153,154],T,3,0),S.addMany(p(128,144),T,3,0),S.addMany(p(144,152),T,3,0),S.add(156,T,0,0),S.add(27,T,11,1),S.add(157,T,4,8),S.addMany([152,158,159],T,0,7),S.add(155,T,11,3),S.add(144,T,11,9);return S.addMany(E,0,3,0),S.addMany(E,1,3,1),S.add(127,1,0,1),S.addMany(E,8,0,8),S.addMany(E,3,3,3),S.add(127,3,0,3),S.addMany(E,4,3,4),S.add(127,4,0,4),S.addMany(E,6,3,6),S.addMany(E,5,3,5),S.add(127,5,0,5),S.addMany(E,2,3,2),S.add(127,2,0,2),S.add(93,1,4,8),S.addMany(g,8,5,8),S.add(127,8,5,8),S.addMany([156,27,24,26,7],8,6,0),S.addMany(p(28,32),8,0,8),S.addMany([88,94,95],1,0,7),S.addMany(g,7,0,7),S.addMany(E,7,0,7),S.add(156,7,0,0),S.add(127,7,0,7),S.add(91,1,11,3),S.addMany(p(64,127),3,7,0),S.addMany(p(48,60),3,8,4),S.addMany([60,61,62,63],3,9,4),S.addMany(p(48,60),4,8,4),S.addMany(p(64,127),4,7,0),S.addMany([60,61,62,63],4,0,6),S.addMany(p(32,64),6,0,6),S.add(127,6,0,6),S.addMany(p(64,127),6,0,0),S.addMany(p(32,48),3,9,5),S.addMany(p(32,48),5,9,5),S.addMany(p(48,64),5,0,6),S.addMany(p(64,127),5,7,0),S.addMany(p(32,48),4,9,5),S.addMany(p(32,48),1,9,2),S.addMany(p(32,48),2,9,2),S.addMany(p(48,127),2,10,0),S.addMany(p(48,80),1,10,0),S.addMany(p(81,88),1,10,0),S.addMany([89,90,92],1,10,0),S.addMany(p(96,127),1,10,0),S.add(80,1,11,9),S.addMany(E,9,0,9),S.add(127,9,0,9),S.addMany(p(28,32),9,0,9),S.addMany(p(32,48),9,9,12),S.addMany(p(48,60),9,8,10),S.addMany([60,61,62,63],9,9,10),S.addMany(E,11,0,11),S.addMany(p(32,128),11,0,11),S.addMany(p(28,32),11,0,11),S.addMany(E,10,0,10),S.add(127,10,0,10),S.addMany(p(28,32),10,0,10),S.addMany(p(48,60),10,8,10),S.addMany([60,61,62,63],10,0,11),S.addMany(p(32,48),10,9,12),S.addMany(E,12,0,12),S.add(127,12,0,12),S.addMany(p(28,32),12,0,12),S.addMany(p(32,48),12,9,12),S.addMany(p(48,64),12,0,11),S.addMany(p(64,127),12,12,13),S.addMany(p(64,127),10,12,13),S.addMany(p(64,127),9,12,13),S.addMany(E,13,13,13),S.addMany(g,13,13,13),S.add(127,13,0,13),S.addMany([27,156,24,26],13,14,0),S.add(k,0,2,0),S.add(k,8,5,8),S.add(k,6,0,6),S.add(k,11,0,11),S.add(k,13,13,13),S})();class x extends h.Disposable{constructor(_=o.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=(p,g,E)=>{},this._executeHandlerFb=p=>{},this._csiHandlerFb=(p,g)=>{},this._escHandlerFb=p=>{},this._errorHandlerFb=p=>p,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 c.OscParser),this._dcsParser=this.register(new b.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(_,p=[64,126]){let g=0;if(_.prefix){if(_.prefix.length>1)throw new Error("only one byte as prefix supported");if(g=_.prefix.charCodeAt(0),g&&60>g||g>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 T=_.intermediates.charCodeAt(M);if(32>T||T>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");g<<=8,g|=T}}if(_.final.length!==1)throw new Error("final must be a single byte");const E=_.final.charCodeAt(0);if(p[0]>E||E>p[1])throw new Error(`final must be in range ${p[0]} .. ${p[1]}`);return g<<=8,g|=E,g}identToString(_){const p=[];for(;_;)p.push(String.fromCharCode(255&_)),_>>=8;return p.reverse().join("")}setPrintHandler(_){this._printHandler=_}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(_,p){const g=this._identifier(_,[48,126]);this._escHandlers[g]===void 0&&(this._escHandlers[g]=[]);const E=this._escHandlers[g];return E.push(p),{dispose:()=>{const M=E.indexOf(p);M!==-1&&E.splice(M,1)}}}clearEscHandler(_){this._escHandlers[this._identifier(_,[48,126])]&&delete this._escHandlers[this._identifier(_,[48,126])]}setEscHandlerFallback(_){this._escHandlerFb=_}setExecuteHandler(_,p){this._executeHandlers[_.charCodeAt(0)]=p}clearExecuteHandler(_){this._executeHandlers[_.charCodeAt(0)]&&delete this._executeHandlers[_.charCodeAt(0)]}setExecuteHandlerFallback(_){this._executeHandlerFb=_}registerCsiHandler(_,p){const g=this._identifier(_);this._csiHandlers[g]===void 0&&(this._csiHandlers[g]=[]);const E=this._csiHandlers[g];return E.push(p),{dispose:()=>{const M=E.indexOf(p);M!==-1&&E.splice(M,1)}}}clearCsiHandler(_){this._csiHandlers[this._identifier(_)]&&delete this._csiHandlers[this._identifier(_)]}setCsiHandlerFallback(_){this._csiHandlerFb=_}registerDcsHandler(_,p){return this._dcsParser.registerHandler(this._identifier(_),p)}clearDcsHandler(_){this._dcsParser.clearHandler(this._identifier(_))}setDcsHandlerFallback(_){this._dcsParser.setHandlerFallback(_)}registerOscHandler(_,p){return this._oscParser.registerHandler(_,p)}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(_,p,g,E,M){this._parseStack.state=_,this._parseStack.handlers=p,this._parseStack.handlerPos=g,this._parseStack.transition=E,this._parseStack.chunkPos=M}parse(_,p,g){let E,M=0,T=0,O=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,O=this._parseStack.chunkPos+1;else{if(g===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const A=this._parseStack.handlers;let B=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(g===!1&&B>-1){for(;B>=0&&(E=A[B](this._params),E!==!0);B--)if(E instanceof Promise)return this._parseStack.handlerPos=B,E}this._parseStack.handlers=[];break;case 4:if(g===!1&&B>-1){for(;B>=0&&(E=A[B](),E!==!0);B--)if(E instanceof Promise)return this._parseStack.handlerPos=B,E}this._parseStack.handlers=[];break;case 6:if(M=_[this._parseStack.chunkPos],E=this._dcsParser.unhook(M!==24&&M!==26,g),E)return E;M===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(M=_[this._parseStack.chunkPos],E=this._oscParser.end(M!==24&&M!==26,g),E)return E;M===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,O=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let A=O;A<p;++A){switch(M=_[A],T=this._transitions.table[this.currentState<<8|(M<160?M:k)],T>>4){case 2:for(let q=A+1;;++q){if(q>=p||(M=_[q])<32||M>126&&M<k){this._printHandler(_,A,q),A=q-1;break}if(++q>=p||(M=_[q])<32||M>126&&M<k){this._printHandler(_,A,q),A=q-1;break}if(++q>=p||(M=_[q])<32||M>126&&M<k){this._printHandler(_,A,q),A=q-1;break}if(++q>=p||(M=_[q])<32||M>126&&M<k){this._printHandler(_,A,q),A=q-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:A,code:M,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const B=this._csiHandlers[this._collect<<8|M];let j=B?B.length-1:-1;for(;j>=0&&(E=B[j](this._params),E!==!0);j--)if(E instanceof Promise)return this._preserveStack(3,B,j,T,A),E;j<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(++A<p&&(M=_[A])>47&&M<60);A--;break;case 9:this._collect<<=8,this._collect|=M;break;case 10:const F=this._escHandlers[this._collect<<8|M];let V=F?F.length-1:-1;for(;V>=0&&(E=F[V](),E!==!0);V--)if(E instanceof Promise)return this._preserveStack(4,F,V,T,A),E;V<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 q=A+1;;++q)if(q>=p||(M=_[q])===24||M===26||M===27||M>127&&M<k){this._dcsParser.put(_,A,q),A=q-1;break}break;case 14:if(E=this._dcsParser.unhook(M!==24&&M!==26),E)return this._preserveStack(6,[],0,T,A),E;M===27&&(T|=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 q=A+1;;q++)if(q>=p||(M=_[q])<32||M>127&&M<k){this._oscParser.put(_,A,q),A=q-1;break}break;case 6:if(E=this._oscParser.end(M!==24&&M!==26),E)return this._preserveStack(5,[],0,T,A),E;M===27&&(T|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&T}}}o.EscapeSequenceParser=x},6242:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const h=u(5770),d=u(482),c=[];o.OscParser=class{constructor(){this._state=0,this._active=c,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 k=this._handlers[b];return k.push(w),{dispose:()=>{const x=k.indexOf(w);x!==-1&&k.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=c}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=c,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||c,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,k){if(this._active.length)for(let x=this._active.length-1;x>=0;x--)this._active[x].put(b,w,k);else this._handlerFb(this._id,"PUT",(0,d.utf32ToString)(b,w,k))}start(){this.reset(),this._state=1}put(b,w,k){if(this._state!==3){if(this._state===1)for(;w<k;){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&&k-w>0&&this._put(b,w,k)}}end(b,w=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let k=!1,x=this._active.length-1,S=!1;if(this._stack.paused&&(x=this._stack.loopPosition-1,k=w,S=this._stack.fallThrough,this._stack.paused=!1),!S&&k===!1){for(;x>=0&&(k=this._active[x].end(b),k!==!0);x--)if(k instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!1,k;x--}for(;x>=0;x--)if(k=this._active[x].end(!1),k instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=x,this._stack.fallThrough=!0,k}else this._handlerFb(this._id,"END",b);this._active=c,this._id=-1,this._state=0}}},o.OscHandler=class{constructor(b){this._handler=b,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(b,w,k){this._hitLimit||(this._data+=(0,d.utf32ToString)(b,w,k),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((k=>(this._data="",this._hitLimit=!1,k)));return this._data="",this._hitLimit=!1,w}}},8742:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;const u=2147483647;class h{static fromArray(c){const b=new h;if(!c.length)return b;for(let w=Array.isArray(c[0])?1:0;w<c.length;++w){const k=c[w];if(Array.isArray(k))for(let x=0;x<k.length;++x)b.addSubParam(k[x]);else b.addParam(k)}return b}constructor(c=32,b=32){if(this.maxLength=c,this.maxSubParamsLength=b,b>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(c),this.length=0,this._subParams=new Int32Array(b),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(c),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const c=new h(this.maxLength,this.maxSubParamsLength);return c.params.set(this.params),c.length=this.length,c._subParams.set(this._subParams),c._subParamsLength=this._subParamsLength,c._subParamsIdx.set(this._subParamsIdx),c._rejectDigits=this._rejectDigits,c._rejectSubDigits=this._rejectSubDigits,c._digitIsSub=this._digitIsSub,c}toArray(){const c=[];for(let b=0;b<this.length;++b){c.push(this.params[b]);const w=this._subParamsIdx[b]>>8,k=255&this._subParamsIdx[b];k-w>0&&c.push(Array.prototype.slice.call(this._subParams,w,k))}return c}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(c){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(c<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=c>u?u:c}}addSubParam(c){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(c<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=c>u?u:c,this._subParamsIdx[this.length-1]++}}hasSubParams(c){return(255&this._subParamsIdx[c])-(this._subParamsIdx[c]>>8)>0}getSubParams(c){const b=this._subParamsIdx[c]>>8,w=255&this._subParamsIdx[c];return w-b>0?this._subParams.subarray(b,w):null}getSubParamsAll(){const c={};for(let b=0;b<this.length;++b){const w=this._subParamsIdx[b]>>8,k=255&this._subParamsIdx[b];k-w>0&&(c[b]=this._subParams.slice(w,k))}return c}addDigit(c){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,k=w[b-1];w[b-1]=~k?Math.min(10*k+c,u):c}}o.Params=h},5741:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0,o.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,h){const d={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(d),h.dispose=()=>this._wrappedAddonDispose(d),h.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let h=-1;for(let d=0;d<this._addons.length;d++)if(this._addons[d]===u){h=d;break}if(h===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(h,1)}}},8771:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const h=u(3785),d=u(511);o.BufferApiView=class{constructor(c,b){this._buffer=c,this.type=b}init(c){return this._buffer=c,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(c){const b=this._buffer.lines.get(c);if(b)return new h.BufferLineApiView(b)}getNullCell(){return new d.CellData}}},3785:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const h=u(511);o.BufferLineApiView=class{constructor(d){this._line=d}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(d,c){if(!(d<0||d>=this._line.length))return c?(this._line.loadCell(d,c),c):this._line.loadCell(d,new h.CellData)}translateToString(d,c,b){return this._line.translateToString(d,c,b)}}},8285:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const h=u(8771),d=u(8460),c=u(844);class b extends c.Disposable{constructor(k){super(),this._core=k,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)}}o.BufferNamespaceApi=b},7975:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0,o.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,h){return this._core.registerCsiHandler(u,(d=>h(d.toArray())))}addCsiHandler(u,h){return this.registerCsiHandler(u,h)}registerDcsHandler(u,h){return this._core.registerDcsHandler(u,((d,c)=>h(d,c.toArray())))}addDcsHandler(u,h){return this.registerDcsHandler(u,h)}registerEscHandler(u,h){return this._core.registerEscHandler(u,h)}addEscHandler(u,h){return this.registerEscHandler(u,h)}registerOscHandler(u,h){return this._core.registerOscHandler(u,h)}addOscHandler(u,h){return this.registerOscHandler(u,h)}}},7090:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0,o.UnicodeApi=class{constructor(u){this._core=u}register(u){this._core.unicodeService.register(u)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(u){this._core.unicodeService.activeVersion=u}}},744:function(m,o,u){var h=this&&this.__decorate||function(S,_,p,g){var E,M=arguments.length,T=M<3?_:g===null?g=Object.getOwnPropertyDescriptor(_,p):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(S,_,p,g);else for(var O=S.length-1;O>=0;O--)(E=S[O])&&(T=(M<3?E(T):M>3?E(_,p,T):E(_,p))||T);return M>3&&T&&Object.defineProperty(_,p,T),T},d=this&&this.__param||function(S,_){return function(p,g){_(p,g,S)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;const c=u(8460),b=u(844),w=u(5295),k=u(2585);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;let x=o.BufferService=class extends b.Disposable{get buffer(){return this.buffers.active}constructor(S){super(),this.isUserScrolling=!1,this._onResize=this.register(new c.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new c.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(S.rawOptions.cols||0,o.MINIMUM_COLS),this.rows=Math.max(S.rawOptions.rows||0,o.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 p=this.buffer;let g;g=this._cachedBlankLine,g&&g.length===this.cols&&g.getFg(0)===S.fg&&g.getBg(0)===S.bg||(g=p.getBlankLine(S,_),this._cachedBlankLine=g),g.isWrapped=_;const E=p.ybase+p.scrollTop,M=p.ybase+p.scrollBottom;if(p.scrollTop===0){const T=p.lines.isFull;M===p.lines.length-1?T?p.lines.recycle().copyFrom(g):p.lines.push(g.clone()):p.lines.splice(M+1,0,g.clone()),T?this.isUserScrolling&&(p.ydisp=Math.max(p.ydisp-1,0)):(p.ybase++,this.isUserScrolling||p.ydisp++)}else{const T=M-E+1;p.lines.shiftElements(E+1,T-1,-1),p.lines.set(M,g.clone())}this.isUserScrolling||(p.ydisp=p.ybase),this._onScroll.fire(p.ydisp)}scrollLines(S,_,p){const g=this.buffer;if(S<0){if(g.ydisp===0)return;this.isUserScrolling=!0}else S+g.ydisp>=g.ybase&&(this.isUserScrolling=!1);const E=g.ydisp;g.ydisp=Math.max(Math.min(g.ydisp+S,g.ybase),0),E!==g.ydisp&&(_||this._onScroll.fire(g.ydisp))}};o.BufferService=x=h([d(0,k.IOptionsService)],x)},7994:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0,o.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,h){this._charsets[u]=h,this.glevel===u&&(this.charset=h)}}},1753:function(m,o,u){var h=this&&this.__decorate||function(g,E,M,T){var O,A=arguments.length,B=A<3?E:T===null?T=Object.getOwnPropertyDescriptor(E,M):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(g,E,M,T);else for(var j=g.length-1;j>=0;j--)(O=g[j])&&(B=(A<3?O(B):A>3?O(E,M,B):O(E,M))||B);return A>3&&B&&Object.defineProperty(E,M,B),B},d=this&&this.__param||function(g,E){return function(M,T){E(M,T,g)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;const c=u(2585),b=u(8460),w=u(844),k={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:g=>g.button!==4&&g.action===1&&(g.ctrl=!1,g.alt=!1,g.shift=!1,!0)},VT200:{events:19,restrict:g=>g.action!==32},DRAG:{events:23,restrict:g=>g.action!==32||g.button!==3},ANY:{events:31,restrict:g=>!0}};function x(g,E){let M=(g.ctrl?16:0)|(g.shift?4:0)|(g.alt?8:0);return g.button===4?(M|=64,M|=g.action):(M|=3&g.button,4&g.button&&(M|=64),8&g.button&&(M|=128),g.action===32?M|=32:g.action!==0||E||(M|=3)),M}const S=String.fromCharCode,_={DEFAULT:g=>{const E=[x(g,!1)+32,g.col+32,g.row+32];return E[0]>255||E[1]>255||E[2]>255?"":`\x1B[M${S(E[0])}${S(E[1])}${S(E[2])}`},SGR:g=>{const E=g.action===0&&g.button!==4?"m":"M";return`\x1B[<${x(g,!0)};${g.col};${g.row}${E}`},SGR_PIXELS:g=>{const E=g.action===0&&g.button!==4?"m":"M";return`\x1B[<${x(g,!0)};${g.x};${g.y}${E}`}};let p=o.CoreMouseService=class extends w.Disposable{constructor(g,E){super(),this._bufferService=g,this._coreService=E,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(k))this.addProtocol(M,k[M]);for(const M of Object.keys(_))this.addEncoding(M,_[M]);this.reset()}addProtocol(g,E){this._protocols[g]=E}addEncoding(g,E){this._encodings[g]=E}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(g){if(!this._protocols[g])throw new Error(`unknown protocol "${g}"`);this._activeProtocol=g,this._onProtocolChange.fire(this._protocols[g].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(g){if(!this._encodings[g])throw new Error(`unknown encoding "${g}"`);this._activeEncoding=g}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(g){if(g.col<0||g.col>=this._bufferService.cols||g.row<0||g.row>=this._bufferService.rows||g.button===4&&g.action===32||g.button===3&&g.action!==32||g.button!==4&&(g.action===2||g.action===3)||(g.col++,g.row++,g.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,g,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(g))return!1;const E=this._encodings[this._activeEncoding](g);return E&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(E):this._coreService.triggerDataEvent(E,!0)),this._lastEvent=g,!0}explainEvents(g){return{down:!!(1&g),up:!!(2&g),drag:!!(4&g),move:!!(8&g),wheel:!!(16&g)}}_equalEvents(g,E,M){if(M){if(g.x!==E.x||g.y!==E.y)return!1}else if(g.col!==E.col||g.row!==E.row)return!1;return g.button===E.button&&g.action===E.action&&g.ctrl===E.ctrl&&g.alt===E.alt&&g.shift===E.shift}};o.CoreMouseService=p=h([d(0,c.IBufferService),d(1,c.ICoreService)],p)},6975:function(m,o,u){var h=this&&this.__decorate||function(p,g,E,M){var T,O=arguments.length,A=O<3?g:M===null?M=Object.getOwnPropertyDescriptor(g,E):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(p,g,E,M);else for(var B=p.length-1;B>=0;B--)(T=p[B])&&(A=(O<3?T(A):O>3?T(g,E,A):T(g,E))||A);return O>3&&A&&Object.defineProperty(g,E,A),A},d=this&&this.__param||function(p,g){return function(E,M){g(E,M,p)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;const c=u(1439),b=u(8460),w=u(844),k=u(2585),x=Object.freeze({insertMode:!1}),S=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let _=o.CoreService=class extends w.Disposable{constructor(p,g,E){super(),this._bufferService=p,this._logService=g,this._optionsService=E,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,c.clone)(x),this.decPrivateModes=(0,c.clone)(S)}reset(){this.modes=(0,c.clone)(x),this.decPrivateModes=(0,c.clone)(S)}triggerDataEvent(p,g=!1){if(this._optionsService.rawOptions.disableStdin)return;const E=this._bufferService.buffer;g&&this._optionsService.rawOptions.scrollOnUserInput&&E.ybase!==E.ydisp&&this._onRequestScrollToBottom.fire(),g&&this._onUserInput.fire(),this._logService.debug(`sending data "${p}"`,(()=>p.split("").map((M=>M.charCodeAt(0))))),this._onData.fire(p)}triggerBinaryEvent(p){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${p}"`,(()=>p.split("").map((g=>g.charCodeAt(0))))),this._onBinary.fire(p))}};o.CoreService=_=h([d(0,k.IBufferService),d(1,k.ILogService),d(2,k.IOptionsService)],_)},9074:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const h=u(8055),d=u(8460),c=u(844),b=u(6106);let w=0,k=0;class x extends c.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new b.SortedList((p=>p==null?void 0:p.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,c.toDisposable)((()=>this.reset())))}registerDecoration(p){if(p.marker.isDisposed)return;const g=new S(p);if(g){const E=g.marker.onDispose((()=>g.dispose()));g.onDispose((()=>{g&&(this._decorations.delete(g)&&this._onDecorationRemoved.fire(g),E.dispose())})),this._decorations.insert(g),this._onDecorationRegistered.fire(g)}return g}reset(){for(const p of this._decorations.values())p.dispose();this._decorations.clear()}*getDecorationsAtCell(p,g,E){let M=0,T=0;for(const O of this._decorations.getKeyIterator(g))M=O.options.x??0,T=M+(O.options.width??1),p>=M&&p<T&&(!E||(O.options.layer??"bottom")===E)&&(yield O)}forEachDecorationAtCell(p,g,E,M){this._decorations.forEachByKey(g,(T=>{w=T.options.x??0,k=w+(T.options.width??1),p>=w&&p<k&&(!E||(T.options.layer??"bottom")===E)&&M(T)}))}}o.DecorationService=x;class S extends c.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(p){super(),this.options=p,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=p.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const h=u(2585),d=u(8343);class c{constructor(...w){this._entries=new Map;for(const[k,x]of w)this.set(k,x)}set(w,k){const x=this._entries.get(w);return this._entries.set(w,k),x}forEach(w){for(const[k,x]of this._entries.entries())w(k,x)}has(w){return this._entries.has(w)}get(w){return this._entries.get(w)}}o.ServiceCollection=c,o.InstantiationService=class{constructor(){this._services=new c,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 k=(0,d.getServiceDependencies)(b).sort(((_,p)=>_.index-p.index)),x=[];for(const _ of k){const p=this._services.get(_.id);if(!p)throw new Error(`[createInstance] ${b.name} depends on UNKNOWN service ${_.id}.`);x.push(p)}const S=k.length>0?k[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(m,o,u){var h=this&&this.__decorate||function(S,_,p,g){var E,M=arguments.length,T=M<3?_:g===null?g=Object.getOwnPropertyDescriptor(_,p):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(S,_,p,g);else for(var O=S.length-1;O>=0;O--)(E=S[O])&&(T=(M<3?E(T):M>3?E(_,p,T):E(_,p))||T);return M>3&&T&&Object.defineProperty(_,p,T),T},d=this&&this.__param||function(S,_){return function(p,g){_(p,g,S)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const c=u(844),b=u(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 k,x=o.LogService=class extends c.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()))),k=this}_updateLogLevel(){this._logLevel=w[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(S){for(let _=0;_<S.length;_++)typeof S[_]=="function"&&(S[_]=S[_]())}_log(S,_,p){this._evalLazyOptionalParams(p),S.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+_,...p)}trace(S,..._){var p;this._logLevel<=b.LogLevelEnum.TRACE&&this._log(((p=this._optionsService.options.logger)==null?void 0:p.trace.bind(this._optionsService.options.logger))??console.log,S,_)}debug(S,..._){var p;this._logLevel<=b.LogLevelEnum.DEBUG&&this._log(((p=this._optionsService.options.logger)==null?void 0:p.debug.bind(this._optionsService.options.logger))??console.log,S,_)}info(S,..._){var p;this._logLevel<=b.LogLevelEnum.INFO&&this._log(((p=this._optionsService.options.logger)==null?void 0:p.info.bind(this._optionsService.options.logger))??console.info,S,_)}warn(S,..._){var p;this._logLevel<=b.LogLevelEnum.WARN&&this._log(((p=this._optionsService.options.logger)==null?void 0:p.warn.bind(this._optionsService.options.logger))??console.warn,S,_)}error(S,..._){var p;this._logLevel<=b.LogLevelEnum.ERROR&&this._log(((p=this._optionsService.options.logger)==null?void 0:p.error.bind(this._optionsService.options.logger))??console.error,S,_)}};o.LogService=x=h([d(0,b.IOptionsService)],x),o.setTraceLogger=function(S){k=S},o.traceCall=function(S,_,p){if(typeof p.value!="function")throw new Error("not supported");const g=p.value;p.value=function(...E){if(k.logLevel!==b.LogLevelEnum.TRACE)return g.apply(this,E);k.trace(`GlyphRenderer#${g.name}(${E.map((T=>JSON.stringify(T))).join(", ")})`);const M=g.apply(this,E);return k.trace(`GlyphRenderer#${g.name} return`,M),M}}},7302:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=void 0;const h=u(8460),d=u(844),c=u(6114);o.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:c.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={...o.DEFAULT_OPTIONS};for(const _ in x)if(_ in S)try{const p=x[_];S[_]=this._sanitizeAndValidateOption(_,p)}catch(p){console.error(p)}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 o.DEFAULT_OPTIONS))throw new Error(`No option with key "${_}"`);return this.rawOptions[_]},S=(_,p)=>{if(!(_ in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${_}"`);p=this._sanitizeAndValidateOption(_,p),this.rawOptions[_]!==p&&(this.rawOptions[_]=p,this._onOptionChange.fire(_))};for(const _ in this.rawOptions){const p={get:x.bind(this,_),set:S.bind(this,_)};Object.defineProperty(this.options,_,p)}}_sanitizeAndValidateOption(x,S){switch(x){case"cursorStyle":if(S||(S=o.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=o.DEFAULT_OPTIONS[x]);break;case"fontWeight":case"fontWeightBold":if(typeof S=="number"&&1<=S&&S<=1e3)break;S=b.includes(S)?S:o.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}}o.OptionsService=w},2660:function(m,o,u){var h=this&&this.__decorate||function(w,k,x,S){var _,p=arguments.length,g=p<3?k:S===null?S=Object.getOwnPropertyDescriptor(k,x):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(w,k,x,S);else for(var E=w.length-1;E>=0;E--)(_=w[E])&&(g=(p<3?_(g):p>3?_(k,x,g):_(k,x))||g);return p>3&&g&&Object.defineProperty(k,x,g),g},d=this&&this.__param||function(w,k){return function(x,S){k(x,S,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkService=void 0;const c=u(2585);let b=o.OscLinkService=class{constructor(w){this._bufferService=w,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(w){const k=this._bufferService.buffer;if(w.id===void 0){const E=k.addMarker(k.ybase+k.y),M={data:w,id:this._nextId++,lines:[E]};return E.onDispose((()=>this._removeMarkerFromLink(M,E))),this._dataByLinkId.set(M.id,M),M.id}const x=w,S=this._getEntryIdKey(x),_=this._entriesWithId.get(S);if(_)return this.addLineToLink(_.id,k.ybase+k.y),_.id;const p=k.addMarker(k.ybase+k.y),g={id:this._nextId++,key:this._getEntryIdKey(x),data:x,lines:[p]};return p.onDispose((()=>this._removeMarkerFromLink(g,p))),this._entriesWithId.set(g.key,g),this._dataByLinkId.set(g.id,g),g.id}addLineToLink(w,k){const x=this._dataByLinkId.get(w);if(x&&x.lines.every((S=>S.line!==k))){const S=this._bufferService.buffer.addMarker(k);x.lines.push(S),S.onDispose((()=>this._removeMarkerFromLink(x,S)))}}getLinkData(w){var k;return(k=this._dataByLinkId.get(w))==null?void 0:k.data}_getEntryIdKey(w){return`${w.id};;${w.uri}`}_removeMarkerFromLink(w,k){const x=w.lines.indexOf(k);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)))}};o.OscLinkService=b=h([d(0,c.IBufferService)],b)},8343:(m,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const u="di$target",h="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(d){return d[h]||[]},o.createDecorator=function(d){if(o.serviceRegistry.has(d))return o.serviceRegistry.get(d);const c=function(b,w,k){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(x,S,_){S[u]===S?S[h].push({id:x,index:_}):(S[h]=[{id:x,index:_}],S[u]=S)})(c,b,k)};return c.toString=()=>d,o.serviceRegistry.set(d,c),c}},2585:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.IUnicodeService=o.IOscLinkService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;const h=u(8343);var d;o.IBufferService=(0,h.createDecorator)("BufferService"),o.ICoreMouseService=(0,h.createDecorator)("CoreMouseService"),o.ICoreService=(0,h.createDecorator)("CoreService"),o.ICharsetService=(0,h.createDecorator)("CharsetService"),o.IInstantiationService=(0,h.createDecorator)("InstantiationService"),(function(c){c[c.TRACE=0]="TRACE",c[c.DEBUG=1]="DEBUG",c[c.INFO=2]="INFO",c[c.WARN=3]="WARN",c[c.ERROR=4]="ERROR",c[c.OFF=5]="OFF"})(d||(o.LogLevelEnum=d={})),o.ILogService=(0,h.createDecorator)("LogService"),o.IOptionsService=(0,h.createDecorator)("OptionsService"),o.IOscLinkService=(0,h.createDecorator)("OscLinkService"),o.IUnicodeService=(0,h.createDecorator)("UnicodeService"),o.IDecorationService=(0,h.createDecorator)("DecorationService")},1480:(m,o,u)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;const h=u(8460),d=u(225);class c{static extractShouldJoin(w){return(1&w)!=0}static extractWidth(w){return w>>1&3}static extractCharKind(w){return w>>3}static createPropertyValue(w,k,x=!1){return(16777215&w)<<3|(3&k)<<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 k=0,x=0;const S=w.length;for(let _=0;_<S;++_){let p=w.charCodeAt(_);if(55296<=p&&p<=56319){if(++_>=S)return k+this.wcwidth(p);const M=w.charCodeAt(_);56320<=M&&M<=57343?p=1024*(p-55296)+M-56320+65536:k+=this.wcwidth(M)}const g=this.charProperties(p,x);let E=c.extractWidth(g);c.extractShouldJoin(g)&&(E-=c.extractWidth(x)),k+=E,x=g}return k}charProperties(w,k){return this._activeProvider.charProperties(w,k)}}o.UnicodeService=c}},a={};function v(m){var o=a[m];if(o!==void 0)return o.exports;var u=a[m]={exports:{}};return l[m].call(u.exports,u,u.exports,v),u.exports}var C={};return(()=>{var m=C;Object.defineProperty(m,"__esModule",{value:!0}),m.Terminal=void 0;const o=v(9042),u=v(3236),h=v(844),d=v(5741),c=v(8285),b=v(7975),w=v(7090),k=["cols","rows"];class x extends h.Disposable{constructor(_){super(),this._core=this.register(new u.Terminal(_)),this._addonManager=this.register(new d.AddonManager),this._publicOptions={...this._core.options};const p=E=>this._core.options[E],g=(E,M)=>{this._checkReadonlyOptions(E),this._core.options[E]=M};for(const E in this._core.options){const M={get:p.bind(this,E),set:g.bind(this,E)};Object.defineProperty(this._publicOptions,E,M)}}_checkReadonlyOptions(_){if(k.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 c.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const _=this._core.coreService.decPrivateModes;let p="none";switch(this._core.coreMouseService.activeProtocol){case"X10":p="x10";break;case"VT200":p="vt200";break;case"DRAG":p="drag";break;case"ANY":p="any"}return{applicationCursorKeysMode:_.applicationCursorKeys,applicationKeypadMode:_.applicationKeypad,bracketedPasteMode:_.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:p,originMode:_.origin,reverseWraparoundMode:_.reverseWraparound,sendFocusMode:_.sendFocus,wraparoundMode:_.wraparound}}get options(){return this._publicOptions}set options(_){for(const p in _)this._publicOptions[p]=_[p]}blur(){this._core.blur()}focus(){this._core.focus()}input(_,p=!0){this._core.input(_,p)}resize(_,p){this._verifyIntegers(_,p),this._core.resize(_,p)}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(_,p,g){this._verifyIntegers(_,p,g),this._core.select(_,p,g)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(_,p){this._verifyIntegers(_,p),this._core.selectLines(_,p)}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(_,p){this._core.write(_,p)}writeln(_,p){this._core.write(_),this._core.write(`\r
|
|
57
|
+
`,p)}paste(_){this._core.paste(_)}refresh(_,p){this._verifyIntegers(_,p),this._core.refresh(_,p)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(_){this._addonManager.loadAddon(this,_)}static get strings(){return o}_verifyIntegers(..._){for(const p of _)if(p===1/0||isNaN(p)||p%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(..._){for(const p of _)if(p&&(p===1/0||isNaN(p)||p%1!=0||p<0))throw new Error("This API only accepts positive integers")}}m.Terminal=x})(),C})()))})(Uu)),Uu.exports}var j0=N0();class I0{constructor(s,l){Hp(this,"socket");const a=window.location.protocol==="https:"?"wss:":"ws:";this.socket=new WebSocket(`${a}//${window.location.host}/ws/terminal/${encodeURIComponent(s)}`),this.socket.addEventListener("message",v=>{var m,o;const C=JSON.parse(v.data);C.type==="output"?l.onOutput(C.data):C.type==="error"?(m=l.onError)==null||m.call(l,C.message):(o=l.onStatus)==null||o.call(l,C)}),this.socket.addEventListener("error",()=>{var v;(v=l.onError)==null||v.call(l,"Terminal connection failed.")})}sendInput(s){this.send({type:"input",data:s})}resize(s,l){this.send({type:"resize",cols:s,rows:l})}close(){this.socket.close()}send(s){const l=JSON.stringify(s);if(this.socket.readyState===WebSocket.OPEN){this.socket.send(l);return}this.socket.addEventListener("open",()=>this.socket.send(l),{once:!0})}}function $m({sessionId:n,active:s=!0,onEvent:l}){const a=de.useRef(null),v=de.useRef(null),C=de.useRef(null),m=de.useRef(null),o=de.useRef(s),u=de.useRef(l);function h(d={}){const c=a.current,b=v.current,w=C.current,k=m.current;if(!c||!b||!w||!k)return!1;const x=c.getBoundingClientRect();return x.width<U0||x.height<P0||(w.fit(),k.cols<F0||k.rows<q0)?!1:(b.resize(k.cols,k.rows),d.focus&&k.focus(),!0)}return de.useEffect(()=>{u.current=l},[l]),de.useEffect(()=>{o.current=s},[s]),de.useEffect(()=>{if(!a.current)return;const d=new j0.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:V0}),c=new B0.FitAddon;d.loadAddon(c),d.loadAddon(new H0.WebLinksAddon),d.open(a.current),m.current=d,C.current=c;const b=new I0(n,{onOutput(g){d.write(g)},onStatus(g){var E;(E=u.current)==null||E.call(u,g.type)},onError(g){var E;d.writeln(`\r
|
|
58
|
+
[VCM] ${g}`),(E=u.current)==null||E.call(u,g)}});v.current=b;const w=d.onData(g=>{b.sendInput(g)});let k=0,x=0,S=0;const _=()=>{k&&window.cancelAnimationFrame(k),k=window.requestAnimationFrame(()=>{k=0,h({focus:o.current})})},p=new ResizeObserver(()=>{_()});return p.observe(a.current),x=window.requestAnimationFrame(_),S=window.setTimeout(_,120),()=>{k&&window.cancelAnimationFrame(k),x&&window.cancelAnimationFrame(x),S&&window.clearTimeout(S),p.disconnect(),w.dispose(),b.close(),d.dispose(),v.current=null,m.current=null,C.current=null}},[n]),de.useEffect(()=>{if(!s)return;const d=[],c=[];return d.push(window.requestAnimationFrame(()=>{h({focus:!0}),d.push(window.requestAnimationFrame(()=>h({focus:!0})))})),c.push(window.setTimeout(()=>h({focus:!0}),160)),c.push(window.setTimeout(()=>h({focus:!0}),360)),()=>{for(const b of d)window.cancelAnimationFrame(b);for(const b of c)window.clearTimeout(b)}},[s]),de.useEffect(()=>{const d=()=>{o.current&&h()};return window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]),N.jsx("div",{className:"terminal-frame",ref:a,onMouseDown:()=>{var d;return(d=m.current)==null?void 0:d.focus()}})}const U0=160,P0=80,F0=20,q0=5,V0={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 Or({status:n}){return N.jsx("span",{className:`status-badge status-${n}`,children:n.replaceAll("_"," ")})}function G0({status:n,bootstrapStatus:s,applyResult:l,busy:a=!1,onRefresh:v,onApply:C,onStartBootstrap:m}){const[o,u]=de.useState(!1),h=s==null?void 0:s.session;return de.useEffect(()=>{h||u(!1)},[h]),n?N.jsxs("section",{className:"harness-panel",children:[N.jsxs("div",{className:"harness-stage",children:[N.jsxs("div",{className:"harness-panel-header",children:[N.jsxs("div",{children:[N.jsx("strong",{children:"Fixed install"}),N.jsx("p",{className:"muted",children:n.needsApply?`${n.plannedChanges.length} planned changes`:"up to date"})]}),N.jsxs("div",{className:"harness-actions",children:[N.jsx("button",{type:"button",disabled:a,onClick:()=>void v(),children:"Refresh"}),N.jsx("button",{type:"button",disabled:a||!n.needsApply,onClick:()=>void C(),children:"Install / Update"})]})]}),N.jsx("ol",{className:"harness-file-list",children:n.files.map(d=>N.jsxs("li",{children:[N.jsx("span",{children:d.path}),N.jsx(Or,{status:d.action})]},d.path))})]}),N.jsxs("div",{className:"harness-stage",children:[N.jsxs("div",{className:"harness-panel-header",children:[N.jsxs("div",{children:[N.jsx("strong",{children:"Bootstrap"}),N.jsx("p",{className:"muted",children:s?$0(s.status):"not loaded"})]}),N.jsx("div",{className:"harness-actions",children:N.jsx("button",{type:"button",disabled:a||!(s!=null&&s.canStart),onClick:()=>{u(!0),m()},children:"Run Bootstrap"})})]}),s?N.jsxs(N.Fragment,{children:[N.jsx("ol",{className:"harness-file-list",children:s.checks.map(d=>N.jsxs("li",{title:d.detail??d.path??"",children:[N.jsx("span",{children:d.path?`${d.label}: ${d.path}`:d.label}),N.jsx(Or,{status:d.status})]},d.key))}),h?N.jsxs("div",{className:"harness-bootstrap-session",children:[N.jsxs("div",{children:[N.jsx("span",{children:h.command}),N.jsx(Or,{status:h.status})]}),N.jsx("button",{type:"button",onClick:()=>u(!0),children:"Open Terminal"})]}):null]}):N.jsx("p",{className:"muted",children:"Refresh harness status to load bootstrap checks."})]}),n.plannedChanges.length>0?N.jsxs("div",{className:"harness-changes",children:[N.jsx("h3",{children:"Planned Changes"}),N.jsx("ul",{children:n.plannedChanges.map(d=>N.jsxs("li",{children:[N.jsx("strong",{children:d.action})," ",d.path]},`${d.path}:${d.action}`))})]}):null,l?N.jsxs("div",{className:"harness-result",children:[N.jsx("p",{children:l.message}),l.changedFiles.length>0?N.jsx("ul",{children:l.changedFiles.map(d=>N.jsxs("li",{children:[N.jsx("strong",{children:d.action})," ",d.path]},`${d.path}:${d.action}`))}):null]}):null,n.warnings.length>0?N.jsx("ul",{className:"warnings",children:n.warnings.map(d=>N.jsx("li",{children:d},d))}):null,s!=null&&s.warnings.length?N.jsx("ul",{className:"warnings",children:s.warnings.map(d=>N.jsx("li",{children:d},d))}):null,o&&h?N.jsx("div",{className:"harness-bootstrap-modal",role:"dialog","aria-modal":"true","aria-label":"Harness bootstrap terminal",children:N.jsxs("div",{className:"harness-bootstrap-modal-surface",children:[N.jsxs("header",{className:"harness-bootstrap-modal-header",children:[N.jsxs("div",{children:[N.jsx("strong",{children:"Harness Bootstrap Terminal"}),N.jsx("p",{className:"muted",children:h.command})]}),N.jsxs("div",{className:"harness-bootstrap-modal-actions",children:[N.jsx(Or,{status:h.status}),N.jsx("button",{type:"button",onClick:()=>u(!1),children:"Close"})]})]}),N.jsx("div",{className:"harness-bootstrap-terminal",children:N.jsx($m,{sessionId:h.id,active:o})})]})}):null]}):null}function $0(n){return n.replaceAll("_"," ")}function Sc(n){return{total:n.length,accepted:n.filter(s=>s.acceptedAt).length,delivered:n.filter(s=>s.deliveredAt).length}}function Y0(n,s=6){const l=[...n].sort(X0).map((v,C)=>({message:v,sequence:C+1}));return[...s===null?l:l.slice(-s)].sort((v,C)=>C.sequence-v.sequence)}function W0({messages:n,orchestration:s,busy:l,maxMessages:a=6,showControls:v=!0,showHeader:C=!0,onModeChange:m,onMarkAllDone:o}){const[u,h]=de.useState(null),d=Sc(n),c=(s==null?void 0:s.mode)??"manual",b=Y0(n,a);async function w(k){await Q0(k.body),h(k.id),window.setTimeout(()=>h(x=>x===k.id?null:x),1200)}return N.jsxs("section",{className:"message-panel",children:[C?N.jsxs("div",{className:"message-panel-header",children:[N.jsxs("div",{children:[N.jsx("h2",{children:"Messages"}),N.jsxs("p",{className:"muted",children:[d.total," total / ",d.accepted," accepted"]})]}),v&&m?N.jsx("div",{className:"message-controls",children:N.jsxs("label",{className:"message-mode-toggle",children:[N.jsx("input",{type:"checkbox",checked:c==="auto",disabled:l,onChange:k=>m(k.target.checked?"auto":"manual")}),N.jsx("span",{children:"Auto orchestration"})]})}):null,v&&o?N.jsx("button",{type:"button",disabled:l,onClick:o,children:"Mark All Done"}):null]}):null,n.length===0?N.jsx("p",{className:"muted",children:"No role messages yet."}):N.jsx("ol",{className:"message-list",children:b.map(({message:k,sequence:x})=>N.jsxs("li",{className:"message-item",children:[N.jsxs("div",{className:"message-item-main",children:[N.jsxs("div",{className:"message-meta",children:[N.jsxs("span",{className:"message-sequence",children:["#",x]}),N.jsx("time",{dateTime:ua(k),children:K0(ua(k))}),N.jsxs("strong",{children:[k.fromRole," ","->"," ",k.toRole]}),N.jsx("span",{children:k.type})]}),N.jsx("p",{children:k.body}),k.failureReason?N.jsx("span",{className:"message-reason",children:k.failureReason}):null,k.bodyPath?N.jsx("span",{className:"message-path",children:k.bodyPath}):null]}),N.jsx("div",{className:"message-actions",children:N.jsx("button",{type:"button",disabled:l,onClick:()=>void w(k),children:u===k.id?"Copied":"Copy"})})]},k.id))})]})}function K0(n){const s=new Date(n);return Number.isNaN(s.getTime())?n:s.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 X0(n,s){const l=ua(n).localeCompare(ua(s));if(l!==0)return l;const a=n.createdAt.localeCompare(s.createdAt);return a!==0?a:n.id.localeCompare(s.id)}async function Q0(n){var l;if((l=navigator.clipboard)!=null&&l.writeText){await navigator.clipboard.writeText(n);return}const s=document.createElement("textarea");s.value=n,s.setAttribute("readonly","true"),s.style.position="fixed",s.style.left="-9999px",document.body.appendChild(s),s.select(),document.execCommand("copy"),s.remove()}function Z0({defaultPath:n="",recentPaths:s=[],busy:l=!1,onConnect:a}){const[v,C]=de.useState(n);de.useEffect(()=>{n&&C(n)},[n]);async function m(o){o.preventDefault(),await a(v)}return N.jsx("form",{className:"repo-connect",onSubmit:m,children:N.jsxs("div",{className:s.length>0?"inline-form has-recent-paths":"inline-form",children:[N.jsx("input",{"aria-label":"Repository path",id:"repo-path",value:v,onChange:o=>C(o.target.value),placeholder:"/path/to/repo"}),s.length>0?N.jsxs("select",{"aria-label":"Recent repositories",className:"repo-recent-select",value:"",onChange:o=>{o.target.value&&C(o.target.value)},children:[N.jsx("option",{value:"",children:"Recent"}),s.map(o=>N.jsx("option",{value:o,children:o},o))]}):null,N.jsx("button",{type:"submit",disabled:l||!v.trim(),children:"Connect"})]})})}function J0({tasks:n,activeTaskSlug:s,onSelect:l}){return N.jsx("nav",{className:"task-nav","aria-label":"Tasks",children:n.map(a=>N.jsxs("button",{className:a.taskSlug===s?"task-nav-item is-active":"task-nav-item",type:"button",onClick:()=>l(a.taskSlug),children:[N.jsx("span",{children:a.title||a.taskSlug}),N.jsx(Or,{status:a.status==="created"?"unknown":"running"})]},a.taskSlug))})}function eS({project:n,recentRepositoryPaths:s,tasks:l,activeTaskSlug:a,messages:v,orchestration:C,events:m,roundState:o,harnessStatus:u,harnessBootstrapStatus:h,harnessApplyResult:d,busy:c,onConnect:b,onRefreshConnectedRepository:w,onPullConnectedRepository:k,onRefreshHarness:x,onApplyHarness:S,onStartHarnessBootstrap:_,onCreateTask:p,onSelectTask:g,themeMode:E,onThemeModeChange:M,flowPauseAlerts:T,onFlowPauseAlertsChange:O,permissionRequestMode:A,onPermissionRequestModeChange:B,launchTemplate:j,canSaveLaunchTemplate:F,canOneClickStart:V,onSaveLaunchTemplate:q,onOneClickStart:W,onTryFlowPauseAlert:X,onMarkAllMessagesDone:G,onDeleteMessageHistory:J}){const[re,H]=de.useState(""),[D,L]=de.useState(!0),[U,z]=de.useState(!1),[Z,pe]=de.useState(!1),me=Sc(v),Y=re.trim(),P=l.find(ne=>ne.taskSlug===a)??null;async function ae(ne){ne.preventDefault(),await p({taskSlug:Y,createWorktree:D}),H(""),L(!0)}return N.jsxs("div",{className:"project-dashboard",children:[N.jsx("header",{className:"brand-header",children:N.jsx("strong",{children:"VibeCodingMaster"})}),N.jsx(Dr,{title:"Repository Path",defaultOpen:!a,children:N.jsx(Z0,{defaultPath:(n==null?void 0:n.repoRoot)??"",recentPaths:s,busy:c,onConnect:b})}),n?N.jsx(Dr,{title:"Connected Repository",onOpenChange:ne=>{ne&&w()},children:N.jsx(nS,{activeTask:P,busy:c,project:n,onPull:k})}):null,N.jsx(Dr,{title:"Settings",children:N.jsxs("div",{className:"sidebar-settings",children:[N.jsxs("button",{"aria-label":`Theme mode: ${Qp(E)}`,className:"settings-toggle theme-mode-toggle",disabled:c,title:"Cycle theme: system, light, dark",type:"button",onClick:()=>M(aS(E)),children:[N.jsx("span",{children:"Theme"}),N.jsx("span",{children:Qp(E)})]}),N.jsxs("button",{"aria-pressed":T,className:T?"settings-toggle is-active":"settings-toggle",disabled:c,type:"button",onClick:()=>O(!T),children:[N.jsx("span",{children:"Flow pause alert"}),N.jsx("span",{children:T?"on":"off"})]}),N.jsxs("button",{className:"settings-toggle",type:"button",onClick:X,children:[N.jsx("span",{children:"Try alert"}),N.jsx("span",{children:"test"})]}),N.jsxs("label",{className:"settings-select-row",children:[N.jsx("span",{children:"Permission requests"}),N.jsxs("select",{value:A,disabled:c,onChange:ne=>B(ne.target.value),children:[N.jsx("option",{value:"off",children:"off"}),N.jsx("option",{value:"allowAll",children:"allow all"})]})]}),N.jsxs("button",{className:"settings-toggle",disabled:c||!F,title:"Save the current four role launch settings",type:"button",onClick:q,children:[N.jsx("span",{children:"Save launch template"}),N.jsx("span",{children:F?"ready":"needs 4 sessions"})]}),V?N.jsxs("button",{className:"settings-toggle is-active",disabled:c,title:tS(j),type:"button",onClick:W,children:[N.jsx("span",{children:"One-click start"}),N.jsx("span",{children:Ym(j)})]}):null,a?N.jsxs(N.Fragment,{children:[N.jsxs("button",{type:"button",onClick:()=>z(!0),children:[N.jsx("span",{children:"Messages"}),N.jsxs("span",{className:"muted",children:[me.total," total"]})]}),N.jsxs("button",{type:"button",onClick:()=>pe(!0),children:[N.jsx("span",{children:"Events"}),N.jsxs("span",{className:"muted",children:[m.length," total"]})]})]}):null]})}),n?N.jsx(Dr,{title:"VCM Harness",children:N.jsx(G0,{status:u,bootstrapStatus:h,applyResult:d,busy:c,onRefresh:x,onApply:S,onStartBootstrap:_})}):null,n?N.jsx(Dr,{title:"New Task",children:N.jsx("div",{className:"task-create",children:N.jsxs("form",{onSubmit:ae,children:[N.jsx("input",{value:re,onChange:ne=>H(ne.target.value),placeholder:"task name"}),N.jsxs("label",{className:"task-create-option",children:[N.jsx("input",{type:"checkbox",checked:D,onChange:ne=>L(ne.target.checked)}),N.jsx("span",{children:"Create worktree and branch"})]}),D?N.jsxs("div",{className:"task-create-preview",children:[N.jsxs("small",{children:["branch: ",Y?`feature/${Y}`:"feature/<task>"]}),N.jsxs("small",{children:["worktree: ",Y?`.claude/worktrees/${Y}`:".claude/worktrees/<task>"]})]}):N.jsx("div",{className:"task-create-preview",children:N.jsx("small",{children:"uses current repository path and current branch"})}),N.jsx("button",{type:"submit",disabled:c||!Y,children:"Create"})]})})}):null,l.length>0?N.jsx(Dr,{title:"Tasks",children:N.jsx(J0,{tasks:l,activeTaskSlug:a,onSelect:g})}):null,n&&P?N.jsx(sS,{task:P,roundState:o}):null,U?N.jsx(uS,{busy:c,messages:v,orchestration:C,onClose:()=>z(!1),onMarkAllDone:()=>{a&&G(a)},onDeleteMessageHistory:()=>{a&&J(a)}}):null,Z?N.jsx(oS,{events:m,onClose:()=>pe(!1)}):null]})}function Ym(n){return[n.autoOrchestration?"auto":"manual",n.translationEnabled?"tx":"no tx"].join(" + ")}function tS(n){const s=Object.entries(n.roles).map(([l,a])=>`${l}: ${a.permissionMode} / ${a.model}`).join("; ");return`Launch template: ${Ym(n)}; ${s}`}function nS({activeTask:n,busy:s,onPull:l,project:a}){const v=!!(n&&!n.worktreePath&&n.cleanupStatus!=="cleaned"),C=v?`Inline task "${n==null?void 0:n.taskSlug}" uses the base repository.`:a.pullDisabledReason,m=!!(a.canPull&&!v);return N.jsxs("div",{className:"project-summary",children:[N.jsxs("dl",{children:[N.jsxs("div",{children:[N.jsx("dt",{children:"Base path"}),N.jsx("dd",{children:a.repoRoot})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Branch"}),N.jsx("dd",{children:iS(a)})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Remote"}),N.jsx("dd",{children:a.upstreamBranch??"no upstream"})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Status"}),N.jsx("dd",{children:rS(a)})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Commit"}),N.jsx("dd",{children:a.shortHeadCommit??a.headCommit??"unknown"})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Working tree"}),N.jsx("dd",{children:a.isDirty?"uncommitted changes":"clean"})]})]}),N.jsxs("div",{className:"connected-repo-actions",children:[N.jsx("button",{type:"button",disabled:s||!m,title:C??"Pull latest changes with git pull --ff-only",onClick:()=>void l(),children:"Pull"}),N.jsx("span",{className:"muted",children:a.checkedAt?`checked ${sc(a.checkedAt)}`:"status not refreshed"})]}),C?N.jsx("p",{className:"muted",children:C}):null,a.warnings.length>0?N.jsx("ul",{className:"warnings",children:a.warnings.map(o=>N.jsx("li",{children:o},o))}):null]})}function iS(n){return n.branch||"unknown"}function rS(n){if(!n.upstreamBranch)return"no upstream";const s=n.ahead??0,l=n.behind??0;return s===0&&l===0?"up to date":s>0&&l>0?`ahead ${s}, behind ${l}`:s>0?`ahead ${s}`:`behind ${l}`}function sS({roundState:n,task:s}){var h;const[l,a]=de.useState(()=>Date.now()),v=!!(n!=null&&n.startedAt&&(n.status==="active"||n.status==="settling")),C=lS(s.createdAt,l),m=Xp(n,(n==null?void 0:n.totalCcActiveMs)??0,l),o=v&&n?Xp(n,n.currentRoundCcActiveMs,l):0,u=((h=s.title)==null?void 0:h.trim())||s.taskSlug;return de.useEffect(()=>{const d=window.setInterval(()=>a(Date.now()),1e3);return()=>window.clearInterval(d)},[]),N.jsxs("section",{className:"task-status-dock","aria-label":"Task status",children:[N.jsxs("div",{className:"task-status-dock-title",children:[N.jsx("strong",{title:u,children:u}),N.jsx("span",{className:`status-badge status-${s.status}`,children:s.status})]}),N.jsxs("dl",{className:"task-status-stats",children:[N.jsxs("div",{children:[N.jsx("dt",{children:"Started"}),N.jsx("dd",{children:sc(s.createdAt)})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Total"}),N.jsx("dd",{children:Pu(C)})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Rounds"}),N.jsx("dd",{children:(n==null?void 0:n.totalRoundCount)??0})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"CC runtime"}),N.jsx("dd",{children:Pu(m)})]})]}),v&&n?N.jsxs("div",{className:"current-round-status",children:[N.jsxs("div",{className:"current-round-title",children:[N.jsx("span",{children:"Current round"}),N.jsx("span",{className:`status-badge status-${n.status}`,children:n.status})]}),N.jsxs("dl",{className:"task-status-stats",children:[N.jsxs("div",{children:[N.jsx("dt",{children:"Started"}),N.jsx("dd",{children:sc(n.startedAt)})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"CC runtime"}),N.jsx("dd",{children:Pu(o)})]})]})]}):null]})}function Xp(n,s,l){if(!(n!=null&&n.runningSince)||n.status!=="active")return s;const a=Date.parse(n.updatedAt);return Number.isFinite(a)?s+Math.max(0,l-a):s}function lS(n,s){const l=Date.parse(n);return Number.isFinite(l)?Math.max(0,s-l):0}function sc(n){if(!n)return"-";const s=new Date(n);return Number.isNaN(s.getTime())?"-":new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}).format(s)}function Pu(n){const s=Math.max(0,Math.floor(n/1e3)),l=Math.floor(s/3600),a=Math.floor(s%3600/60),v=s%60;return l>0?a>0?`${l}h ${a}m`:`${l}h`:a>0?v>0?`${a}m ${v}s`:`${a}m`:`${v}s`}function aS(n){return n==="system"?"light":n==="light"?"dark":"system"}function Qp(n){return n==="system"?"System":n==="light"?"Light":"Dark"}function oS({events:n,onClose:s}){return N.jsx("div",{className:"modal-backdrop",children:N.jsxs("section",{className:"event-modal",role:"dialog","aria-modal":"true","aria-label":"Events",children:[N.jsxs("header",{children:[N.jsxs("div",{children:[N.jsx("h2",{children:"Events"}),N.jsxs("p",{className:"muted",children:[n.length," total"]})]}),N.jsx("button",{type:"button",onClick:s,children:"Close"})]}),N.jsx(L0,{events:n,maxEvents:null,showHeader:!1})]})})}function uS({busy:n,messages:s,orchestration:l,onClose:a,onMarkAllDone:v,onDeleteMessageHistory:C}){const m=Sc(s);function o(){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(`
|
|
59
|
+
`))&&v()}function u(){window.confirm([`Delete ${m.total} message histor${m.total===1?"y item":"y items"}?`,"","This removes message history from the Messages panel.","Pending route-file messages are not touched."].join(`
|
|
60
|
+
`))&&C()}return N.jsx("div",{className:"modal-backdrop",children:N.jsxs("section",{className:"message-modal",role:"dialog","aria-modal":"true","aria-label":"Messages",children:[N.jsxs("header",{children:[N.jsxs("div",{children:[N.jsx("h2",{children:"Messages"}),N.jsxs("p",{className:"muted",children:[m.total," total / ",m.accepted," accepted",l?` · ${l.mode}`:""]})]}),N.jsxs("div",{className:"modal-actions",children:[N.jsx("button",{type:"button",disabled:n,onClick:o,children:"Mark All Done"}),N.jsx("button",{type:"button",disabled:n||m.total===0,onClick:u,children:"Delete All"}),N.jsx("button",{type:"button",onClick:a,children:"Close"})]})]}),N.jsx(W0,{busy:n,maxMessages:null,messages:s,orchestration:l,showControls:!1,showHeader:!1})]})})}function Dr({children:n,defaultOpen:s=!1,onOpenChange:l,title:a}){const[v,C]=de.useState(s);return de.useEffect(()=>{C(s)},[s]),N.jsxs("section",{className:"sidebar-section",children:[N.jsxs("button",{"aria-expanded":v,className:"sidebar-section-toggle",type:"button",onClick:()=>{C(m=>{const o=!m;return l==null||l(o),o})},children:[N.jsx("span",{children:a}),N.jsx("span",{"aria-hidden":"true",className:"sidebar-section-chevron"})]}),v?N.jsx("div",{className:"sidebar-section-content",children:n}):null]})}function Wm(n,s){return n.find(l=>l.role===s)}function cS({activeRole:n,sessions:s,onSelect:l}){return N.jsx("div",{className:"role-tabs",role:"tablist","aria-label":"Role sessions",children:Fi.map(a=>{const v=Wm(s,a.name),C=(v==null?void 0:v.status)==="running"?v.activityStatus??"idle":(v==null?void 0:v.status)??"not_started";return N.jsxs("button",{className:a.name===n?"role-tab is-active":"role-tab",type:"button",role:"tab","aria-selected":a.name===n,onClick:()=>l(a.name),children:[N.jsx("span",{children:a.label}),N.jsx(Or,{status:C})]},a.name)})})}const Km=[{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"}];function hS({role:n,session:s,permissionMode:l,model:a,busy:v=!1,onPermissionModeChange:C,onModelChange:m,onStart:o,onResume:u,onStop:h,onRestart:d}){const c=(s==null?void 0:s.status)==="running",b=!!(s!=null&&s.claudeSessionId&&!c),w=!c&&!(s!=null&&s.claudeSessionId),k=!!(s&&s.permissionMode!==l),x=(s==null?void 0:s.model)??"default",S=!!(s&&x!==a);return N.jsxs("div",{className:"session-controls",children:[N.jsxs("label",{className:"session-option-field permission-mode-field",children:[N.jsxs("span",{children:["Permission",N.jsx("small",{children:s?`current: ${s.permissionMode}${k?" / next launch":""}`:"applies on start"})]}),N.jsxs("select",{value:l,onChange:_=>C(_.target.value),children:[N.jsx("option",{value:"default",children:"默认"}),N.jsx("option",{value:"bypassPermissions",children:"bypassPermissions"})]})]}),N.jsxs("label",{className:"session-option-field model-field",children:[N.jsxs("span",{children:["Model",N.jsx("small",{children:s?`current: ${fS(x)}${S?" / next launch":""}`:"applies on start"})]}),N.jsx("select",{value:a,onChange:_=>m(_.target.value),children:Km.map(_=>N.jsx("option",{value:_.value,children:_.label},_.value))})]}),N.jsxs("div",{className:"session-toolbar",children:[N.jsx("button",{type:"button",disabled:v||!w,onClick:o,children:"Start"}),N.jsx("button",{type:"button",disabled:v||!b,onClick:u,children:"Resume"}),N.jsx("button",{type:"button",disabled:v||!s,onClick:d,children:"Restart"}),N.jsx("button",{type:"button",disabled:v||!s,onClick:h,children:"Stop"})]})]})}function fS(n){var s;return((s=Km.find(l=>l.value===n))==null?void 0:s.label)??n}function dS(n,s){const l={};return(n[n.length-1]===""?[...n,""]:n).join((l.padRight?" ":"")+","+(l.padLeft===!1?"":" ")).trim()}const pS=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mS=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_S={};function Zp(n,s){return(_S.jsx?mS:pS).test(n)}const gS=/[ \t\n\f\r]/g;function vS(n){return typeof n=="object"?n.type==="text"?Jp(n.value):!1:Jp(n)}function Jp(n){return n.replace(gS,"")===""}class Us{constructor(s,l,a){this.normal=l,this.property=s,a&&(this.space=a)}}Us.prototype.normal={};Us.prototype.property={};Us.prototype.space=void 0;function Xm(n,s){const l={},a={};for(const v of n)Object.assign(l,v.property),Object.assign(a,v.normal);return new Us(l,a,s)}function lc(n){return n.toLowerCase()}class Xt{constructor(s,l){this.attribute=l,this.property=s}}Xt.prototype.attribute="";Xt.prototype.booleanish=!1;Xt.prototype.boolean=!1;Xt.prototype.commaOrSpaceSeparated=!1;Xt.prototype.commaSeparated=!1;Xt.prototype.defined=!1;Xt.prototype.mustUseProperty=!1;Xt.prototype.number=!1;Xt.prototype.overloadedBoolean=!1;Xt.prototype.property="";Xt.prototype.spaceSeparated=!1;Xt.prototype.space=void 0;let SS=0;const Ne=Vi(),wt=Vi(),ac=Vi(),_e=Vi(),at=Vi(),Br=Vi(),sn=Vi();function Vi(){return 2**++SS}const oc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ne,booleanish:wt,commaOrSpaceSeparated:sn,commaSeparated:Br,number:_e,overloadedBoolean:ac,spaceSeparated:at},Symbol.toStringTag,{value:"Module"})),Fu=Object.keys(oc);class yc extends Xt{constructor(s,l,a,v){let C=-1;if(super(s,l),em(this,"space",v),typeof a=="number")for(;++C<Fu.length;){const m=Fu[C];em(this,Fu[C],(a&oc[m])===oc[m])}}}yc.prototype.defined=!0;function em(n,s,l){l&&(n[s]=l)}function Hr(n){const s={},l={};for(const[a,v]of Object.entries(n.properties)){const C=new yc(a,n.transform(n.attributes||{},a),v,n.space);n.mustUseProperty&&n.mustUseProperty.includes(a)&&(C.mustUseProperty=!0),s[a]=C,l[lc(a)]=a,l[lc(C.attribute)]=a}return new Us(s,l,n.space)}const Qm=Hr({properties:{ariaActiveDescendant:null,ariaAtomic:wt,ariaAutoComplete:null,ariaBusy:wt,ariaChecked:wt,ariaColCount:_e,ariaColIndex:_e,ariaColSpan:_e,ariaControls:at,ariaCurrent:null,ariaDescribedBy:at,ariaDetails:null,ariaDisabled:wt,ariaDropEffect:at,ariaErrorMessage:null,ariaExpanded:wt,ariaFlowTo:at,ariaGrabbed:wt,ariaHasPopup:null,ariaHidden:wt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:at,ariaLevel:_e,ariaLive:null,ariaModal:wt,ariaMultiLine:wt,ariaMultiSelectable:wt,ariaOrientation:null,ariaOwns:at,ariaPlaceholder:null,ariaPosInSet:_e,ariaPressed:wt,ariaReadOnly:wt,ariaRelevant:null,ariaRequired:wt,ariaRoleDescription:at,ariaRowCount:_e,ariaRowIndex:_e,ariaRowSpan:_e,ariaSelected:wt,ariaSetSize:_e,ariaSort:null,ariaValueMax:_e,ariaValueMin:_e,ariaValueNow:_e,ariaValueText:null,role:null},transform(n,s){return s==="role"?s:"aria-"+s.slice(4).toLowerCase()}});function Zm(n,s){return s in n?n[s]:s}function Jm(n,s){return Zm(n,s.toLowerCase())}const yS=Hr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Br,acceptCharset:at,accessKey:at,action:null,allow:null,allowFullScreen:Ne,allowPaymentRequest:Ne,allowUserMedia:Ne,alt:null,as:null,async:Ne,autoCapitalize:null,autoComplete:at,autoFocus:Ne,autoPlay:Ne,blocking:at,capture:null,charSet:null,checked:Ne,cite:null,className:at,cols:_e,colSpan:null,content:null,contentEditable:wt,controls:Ne,controlsList:at,coords:_e|Br,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ne,defer:Ne,dir:null,dirName:null,disabled:Ne,download:ac,draggable:wt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ne,formTarget:null,headers:at,height:_e,hidden:ac,high:_e,href:null,hrefLang:null,htmlFor:at,httpEquiv:at,id:null,imageSizes:null,imageSrcSet:null,inert:Ne,inputMode:null,integrity:null,is:null,isMap:Ne,itemId:null,itemProp:at,itemRef:at,itemScope:Ne,itemType:at,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ne,low:_e,manifest:null,max:null,maxLength:_e,media:null,method:null,min:null,minLength:_e,multiple:Ne,muted:Ne,name:null,nonce:null,noModule:Ne,noValidate:Ne,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:Ne,optimum:_e,pattern:null,ping:at,placeholder:null,playsInline:Ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ne,referrerPolicy:null,rel:at,required:Ne,reversed:Ne,rows:_e,rowSpan:_e,sandbox:at,scope:null,scoped:Ne,seamless:Ne,selected:Ne,shadowRootClonable:Ne,shadowRootDelegatesFocus:Ne,shadowRootMode:null,shape:null,size:_e,sizes:null,slot:null,span:_e,spellCheck:wt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:_e,step:null,style:null,tabIndex:_e,target:null,title:null,translate:null,type:null,typeMustMatch:Ne,useMap:null,value:wt,width:_e,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:at,axis:null,background:null,bgColor:null,border:_e,borderColor:null,bottomMargin:_e,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ne,declare:Ne,event:null,face:null,frame:null,frameBorder:null,hSpace:_e,leftMargin:_e,link:null,longDesc:null,lowSrc:null,marginHeight:_e,marginWidth:_e,noResize:Ne,noHref:Ne,noShade:Ne,noWrap:Ne,object:null,profile:null,prompt:null,rev:null,rightMargin:_e,rules:null,scheme:null,scrolling:wt,standby:null,summary:null,text:null,topMargin:_e,valueType:null,version:null,vAlign:null,vLink:null,vSpace:_e,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ne,disableRemotePlayback:Ne,prefix:null,property:null,results:_e,security:null,unselectable:null},space:"html",transform:Jm}),bS=Hr({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:sn,accentHeight:_e,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:_e,amplitude:_e,arabicForm:null,ascent:_e,attributeName:null,attributeType:null,azimuth:_e,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:_e,by:null,calcMode:null,capHeight:_e,className:at,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:_e,diffuseConstant:_e,direction:null,display:null,dur:null,divisor:_e,dominantBaseline:null,download:Ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:_e,enableBackground:null,end:null,event:null,exponent:_e,externalResourcesRequired:null,fill:null,fillOpacity:_e,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:Br,g2:Br,glyphName:Br,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:_e,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:_e,horizOriginX:_e,horizOriginY:_e,id:null,ideographic:_e,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:_e,k:_e,k1:_e,k2:_e,k3:_e,k4:_e,kernelMatrix:sn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:_e,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:_e,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:_e,overlineThickness:_e,paintOrder:null,panose1:null,path:null,pathLength:_e,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:at,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:_e,pointsAtY:_e,pointsAtZ:_e,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:sn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:sn,rev:sn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:sn,requiredFeatures:sn,requiredFonts:sn,requiredFormats:sn,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:_e,specularExponent:_e,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:_e,strikethroughThickness:_e,string:null,stroke:null,strokeDashArray:sn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:_e,strokeOpacity:_e,strokeWidth:null,style:null,surfaceScale:_e,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:sn,tabIndex:_e,tableValues:null,target:null,targetX:_e,targetY:_e,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:sn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:_e,underlineThickness:_e,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:_e,values:null,vAlphabetic:_e,vMathematical:_e,vectorEffect:null,vHanging:_e,vIdeographic:_e,version:null,vertAdvY:_e,vertOriginX:_e,vertOriginY:_e,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:_e,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Zm}),e_=Hr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,s){return"xlink:"+s.slice(5).toLowerCase()}}),t_=Hr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Jm}),n_=Hr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,s){return"xml:"+s.slice(3).toLowerCase()}}),CS={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"},wS=/[A-Z]/g,tm=/-[a-z]/g,xS=/^data[-\w.:]+$/i;function ES(n,s){const l=lc(s);let a=s,v=Xt;if(l in n.normal)return n.property[n.normal[l]];if(l.length>4&&l.slice(0,4)==="data"&&xS.test(s)){if(s.charAt(4)==="-"){const C=s.slice(5).replace(tm,AS);a="data"+C.charAt(0).toUpperCase()+C.slice(1)}else{const C=s.slice(4);if(!tm.test(C)){let m=C.replace(wS,kS);m.charAt(0)!=="-"&&(m="-"+m),s="data"+m}}v=yc}return new v(a,s)}function kS(n){return"-"+n.toLowerCase()}function AS(n){return n.charAt(1).toUpperCase()}const TS=Xm([Qm,yS,e_,t_,n_],"html"),bc=Xm([Qm,bS,e_,t_,n_],"svg");function DS(n){return n.join(" ").trim()}var Rr={},qu,nm;function RS(){if(nm)return qu;nm=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,s=/\n/g,l=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,v=/^:\s*/,C=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,m=/^[;\s]*/,o=/^\s+|\s+$/g,u=`
|
|
61
|
+
`,h="/",d="*",c="",b="comment",w="declaration";function k(S,_){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];_=_||{};var p=1,g=1;function E(W){var X=W.match(s);X&&(p+=X.length);var G=W.lastIndexOf(u);g=~G?W.length-G:g+W.length}function M(){var W={line:p,column:g};return function(X){return X.position=new T(W),B(),X}}function T(W){this.start=W,this.end={line:p,column:g},this.source=_.source}T.prototype.content=S;function O(W){var X=new Error(_.source+":"+p+":"+g+": "+W);if(X.reason=W,X.filename=_.source,X.line=p,X.column=g,X.source=S,!_.silent)throw X}function A(W){var X=W.exec(S);if(X){var G=X[0];return E(G),S=S.slice(G.length),X}}function B(){A(l)}function j(W){var X;for(W=W||[];X=F();)X!==!1&&W.push(X);return W}function F(){var W=M();if(!(h!=S.charAt(0)||d!=S.charAt(1))){for(var X=2;c!=S.charAt(X)&&(d!=S.charAt(X)||h!=S.charAt(X+1));)++X;if(X+=2,c===S.charAt(X-1))return O("End of comment missing");var G=S.slice(2,X-2);return g+=2,E(G),S=S.slice(X),g+=2,W({type:b,comment:G})}}function V(){var W=M(),X=A(a);if(X){if(F(),!A(v))return O("property missing ':'");var G=A(C),J=W({type:w,property:x(X[0].replace(n,c)),value:G?x(G[0].replace(n,c)):c});return A(m),J}}function q(){var W=[];j(W);for(var X;X=V();)X!==!1&&(W.push(X),j(W));return W}return B(),q()}function x(S){return S?S.replace(o,c):c}return qu=k,qu}var im;function MS(){if(im)return Rr;im=1;var n=Rr&&Rr.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.default=l;const s=n(RS());function l(a,v){let C=null;if(!a||typeof a!="string")return C;const m=(0,s.default)(a),o=typeof v=="function";return m.forEach(u=>{if(u.type!=="declaration")return;const{property:h,value:d}=u;o?v(h,d,u):d&&(C=C||{},C[h]=d)}),C}return Rr}var Ms={},rm;function LS(){if(rm)return Ms;rm=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,s=/-([a-z])/g,l=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,v=/^-(ms)-/,C=function(h){return!h||l.test(h)||n.test(h)},m=function(h,d){return d.toUpperCase()},o=function(h,d){return"".concat(d,"-")},u=function(h,d){return d===void 0&&(d={}),C(h)?h:(h=h.toLowerCase(),d.reactCompat?h=h.replace(v,o):h=h.replace(a,o),h.replace(s,m))};return Ms.camelCase=u,Ms}var Ls,sm;function OS(){if(sm)return Ls;sm=1;var n=Ls&&Ls.__importDefault||function(v){return v&&v.__esModule?v:{default:v}},s=n(MS()),l=LS();function a(v,C){var m={};return!v||typeof v!="string"||(0,s.default)(v,function(o,u){o&&u&&(m[(0,l.camelCase)(o,C)]=u)}),m}return a.default=a,Ls=a,Ls}var BS=OS();const zS=Vm(BS),i_=r_("end"),Cc=r_("start");function r_(n){return s;function s(l){const a=l&&l.position&&l.position[n]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function HS(n){const s=Cc(n),l=i_(n);if(s&&l)return{start:s,end:l}}function zs(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?lm(n.position):"start"in n||"end"in n?lm(n):"line"in n||"column"in n?uc(n):""}function uc(n){return am(n&&n.line)+":"+am(n&&n.column)}function lm(n){return uc(n&&n.start)+"-"+uc(n&&n.end)}function am(n){return n&&typeof n=="number"?n:1}class It extends Error{constructor(s,l,a){super(),typeof l=="string"&&(a=l,l=void 0);let v="",C={},m=!1;if(l&&("line"in l&&"column"in l?C={place:l}:"start"in l&&"end"in l?C={place:l}:"type"in l?C={ancestors:[l],place:l.position}:C={...l}),typeof s=="string"?v=s:!C.cause&&s&&(m=!0,v=s.message,C.cause=s),!C.ruleId&&!C.source&&typeof a=="string"){const u=a.indexOf(":");u===-1?C.ruleId=a:(C.source=a.slice(0,u),C.ruleId=a.slice(u+1))}if(!C.place&&C.ancestors&&C.ancestors){const u=C.ancestors[C.ancestors.length-1];u&&(C.place=u.position)}const o=C.place&&"start"in C.place?C.place.start:C.place;this.ancestors=C.ancestors||void 0,this.cause=C.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=v,this.line=o?o.line:void 0,this.name=zs(C.place)||"1:1",this.place=C.place||void 0,this.reason=this.message,this.ruleId=C.ruleId||void 0,this.source=C.source||void 0,this.stack=m&&C.cause&&typeof C.cause.stack=="string"?C.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}It.prototype.file="";It.prototype.name="";It.prototype.reason="";It.prototype.message="";It.prototype.stack="";It.prototype.column=void 0;It.prototype.line=void 0;It.prototype.ancestors=void 0;It.prototype.cause=void 0;It.prototype.fatal=void 0;It.prototype.place=void 0;It.prototype.ruleId=void 0;It.prototype.source=void 0;const wc={}.hasOwnProperty,NS=new Map,jS=/[A-Z]/g,IS=new Set(["table","tbody","thead","tfoot","tr"]),US=new Set(["td","th"]),s_="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function PS(n,s){if(!s||s.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const l=s.filePath||void 0;let a;if(s.development){if(typeof s.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=KS(l,s.jsxDEV)}else{if(typeof s.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof s.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=WS(l,s.jsx,s.jsxs)}const v={Fragment:s.Fragment,ancestors:[],components:s.components||{},create:a,elementAttributeNameCase:s.elementAttributeNameCase||"react",evaluater:s.createEvaluater?s.createEvaluater():void 0,filePath:l,ignoreInvalidStyle:s.ignoreInvalidStyle||!1,passKeys:s.passKeys!==!1,passNode:s.passNode||!1,schema:s.space==="svg"?bc:TS,stylePropertyNameCase:s.stylePropertyNameCase||"dom",tableCellAlignToStyle:s.tableCellAlignToStyle!==!1},C=l_(v,n,void 0);return C&&typeof C!="string"?C:v.create(n,v.Fragment,{children:C||void 0},void 0)}function l_(n,s,l){if(s.type==="element")return FS(n,s,l);if(s.type==="mdxFlowExpression"||s.type==="mdxTextExpression")return qS(n,s);if(s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement")return GS(n,s,l);if(s.type==="mdxjsEsm")return VS(n,s);if(s.type==="root")return $S(n,s,l);if(s.type==="text")return YS(n,s)}function FS(n,s,l){const a=n.schema;let v=a;s.tagName.toLowerCase()==="svg"&&a.space==="html"&&(v=bc,n.schema=v),n.ancestors.push(s);const C=o_(n,s.tagName,!1),m=XS(n,s);let o=Ec(n,s);return IS.has(s.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!vS(u):!0})),a_(n,m,C,s),xc(m,o),n.ancestors.pop(),n.schema=a,n.create(s,C,m,l)}function qS(n,s){if(s.data&&s.data.estree&&n.evaluater){const a=s.data.estree.body[0];return a.type,n.evaluater.evaluateExpression(a.expression)}js(n,s.position)}function VS(n,s){if(s.data&&s.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(s.data.estree);js(n,s.position)}function GS(n,s,l){const a=n.schema;let v=a;s.name==="svg"&&a.space==="html"&&(v=bc,n.schema=v),n.ancestors.push(s);const C=s.name===null?n.Fragment:o_(n,s.name,!0),m=QS(n,s),o=Ec(n,s);return a_(n,m,C,s),xc(m,o),n.ancestors.pop(),n.schema=a,n.create(s,C,m,l)}function $S(n,s,l){const a={};return xc(a,Ec(n,s)),n.create(s,n.Fragment,a,l)}function YS(n,s){return s.value}function a_(n,s,l,a){typeof l!="string"&&l!==n.Fragment&&n.passNode&&(s.node=a)}function xc(n,s){if(s.length>0){const l=s.length>1?s:s[0];l&&(n.children=l)}}function WS(n,s,l){return a;function a(v,C,m,o){const h=Array.isArray(m.children)?l:s;return o?h(C,m,o):h(C,m)}}function KS(n,s){return l;function l(a,v,C,m){const o=Array.isArray(C.children),u=Cc(a);return s(v,C,m,o,{columnNumber:u?u.column-1:void 0,fileName:n,lineNumber:u?u.line:void 0},void 0)}}function XS(n,s){const l={};let a,v;for(v in s.properties)if(v!=="children"&&wc.call(s.properties,v)){const C=ZS(n,v,s.properties[v]);if(C){const[m,o]=C;n.tableCellAlignToStyle&&m==="align"&&typeof o=="string"&&US.has(s.tagName)?a=o:l[m]=o}}if(a){const C=l.style||(l.style={});C[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return l}function QS(n,s){const l={};for(const a of s.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&n.evaluater){const C=a.data.estree.body[0];C.type;const m=C.expression;m.type;const o=m.properties[0];o.type,Object.assign(l,n.evaluater.evaluateExpression(o.argument))}else js(n,s.position);else{const v=a.name;let C;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&n.evaluater){const o=a.value.data.estree.body[0];o.type,C=n.evaluater.evaluateExpression(o.expression)}else js(n,s.position);else C=a.value===null?!0:a.value;l[v]=C}return l}function Ec(n,s){const l=[];let a=-1;const v=n.passKeys?new Map:NS;for(;++a<s.children.length;){const C=s.children[a];let m;if(n.passKeys){const u=C.type==="element"?C.tagName:C.type==="mdxJsxFlowElement"||C.type==="mdxJsxTextElement"?C.name:void 0;if(u){const h=v.get(u)||0;m=u+"-"+h,v.set(u,h+1)}}const o=l_(n,C,m);o!==void 0&&l.push(o)}return l}function ZS(n,s,l){const a=ES(n.schema,s);if(!(l==null||typeof l=="number"&&Number.isNaN(l))){if(Array.isArray(l)&&(l=a.commaSeparated?dS(l):DS(l)),a.property==="style"){let v=typeof l=="object"?l:JS(n,String(l));return n.stylePropertyNameCase==="css"&&(v=ey(v)),["style",v]}return[n.elementAttributeNameCase==="react"&&a.space?CS[a.property]||a.property:a.attribute,l]}}function JS(n,s){try{return zS(s,{reactCompat:!0})}catch(l){if(n.ignoreInvalidStyle)return{};const a=l,v=new It("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw v.file=n.filePath||void 0,v.url=s_+"#cannot-parse-style-attribute",v}}function o_(n,s,l){let a;if(!l)a={type:"Literal",value:s};else if(s.includes(".")){const v=s.split(".");let C=-1,m;for(;++C<v.length;){const o=Zp(v[C])?{type:"Identifier",name:v[C]}:{type:"Literal",value:v[C]};m=m?{type:"MemberExpression",object:m,property:o,computed:!!(C&&o.type==="Literal"),optional:!1}:o}a=m}else a=Zp(s)&&!/^[a-z]/.test(s)?{type:"Identifier",name:s}:{type:"Literal",value:s};if(a.type==="Literal"){const v=a.value;return wc.call(n.components,v)?n.components[v]:v}if(n.evaluater)return n.evaluater.evaluateExpression(a);js(n)}function js(n,s){const l=new It("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:s,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw l.file=n.filePath||void 0,l.url=s_+"#cannot-handle-mdx-estrees-without-createevaluater",l}function ey(n){const s={};let l;for(l in n)wc.call(n,l)&&(s[ty(l)]=n[l]);return s}function ty(n){let s=n.replace(jS,ny);return s.slice(0,3)==="ms-"&&(s="-"+s),s}function ny(n){return"-"+n.toLowerCase()}const Vu={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"]},iy={};function kc(n,s){const l=iy,a=typeof l.includeImageAlt=="boolean"?l.includeImageAlt:!0,v=typeof l.includeHtml=="boolean"?l.includeHtml:!0;return u_(n,a,v)}function u_(n,s,l){if(ry(n)){if("value"in n)return n.type==="html"&&!l?"":n.value;if(s&&"alt"in n&&n.alt)return n.alt;if("children"in n)return om(n.children,s,l)}return Array.isArray(n)?om(n,s,l):""}function om(n,s,l){const a=[];let v=-1;for(;++v<n.length;)a[v]=u_(n[v],s,l);return a.join("")}function ry(n){return!!(n&&typeof n=="object")}const um=document.createElement("i");function Ac(n){const s="&"+n+";";um.innerHTML=s;const l=um.textContent;return l.charCodeAt(l.length-1)===59&&n!=="semi"||l===s?!1:l}function ln(n,s,l,a){const v=n.length;let C=0,m;if(s<0?s=-s>v?0:v+s:s=s>v?v:s,l=l>0?l:0,a.length<1e4)m=Array.from(a),m.unshift(s,l),n.splice(...m);else for(l&&n.splice(s,l);C<a.length;)m=a.slice(C,C+1e4),m.unshift(s,0),n.splice(...m),C+=1e4,s+=1e4}function gn(n,s){return n.length>0?(ln(n,n.length,0,s),n):s}const cm={}.hasOwnProperty;function c_(n){const s={};let l=-1;for(;++l<n.length;)sy(s,n[l]);return s}function sy(n,s){let l;for(l in s){const v=(cm.call(n,l)?n[l]:void 0)||(n[l]={}),C=s[l];let m;if(C)for(m in C){cm.call(v,m)||(v[m]=[]);const o=C[m];ly(v[m],Array.isArray(o)?o:o?[o]:[])}}}function ly(n,s){let l=-1;const a=[];for(;++l<s.length;)(s[l].add==="after"?n:a).push(s[l]);ln(n,0,0,a)}function h_(n,s){const l=Number.parseInt(n,s);return l<9||l===11||l>13&&l<32||l>126&&l<160||l>55295&&l<57344||l>64975&&l<65008||(l&65535)===65535||(l&65535)===65534||l>1114111?"�":String.fromCodePoint(l)}function Cn(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Pt=Ci(/[A-Za-z]/),jt=Ci(/[\dA-Za-z]/),ay=Ci(/[#-'*+\--9=?A-Z^-~]/);function ca(n){return n!==null&&(n<32||n===127)}const cc=Ci(/\d/),oy=Ci(/[\dA-Fa-f]/),uy=Ci(/[!-/:-@[-`{-~]/);function Ae(n){return n!==null&&n<-2}function st(n){return n!==null&&(n<0||n===32)}function Fe(n){return n===-2||n===-1||n===32}const pa=Ci(new RegExp("\\p{P}|\\p{S}","u")),qi=Ci(/\s/);function Ci(n){return s;function s(l){return l!==null&&l>-1&&n.test(String.fromCharCode(l))}}function Nr(n){const s=[];let l=-1,a=0,v=0;for(;++l<n.length;){const C=n.charCodeAt(l);let m="";if(C===37&&jt(n.charCodeAt(l+1))&&jt(n.charCodeAt(l+2)))v=2;else if(C<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(C))||(m=String.fromCharCode(C));else if(C>55295&&C<57344){const o=n.charCodeAt(l+1);C<56320&&o>56319&&o<57344?(m=String.fromCharCode(C,o),v=1):m="�"}else m=String.fromCharCode(C);m&&(s.push(n.slice(a,l),encodeURIComponent(m)),a=l+v+1,m=""),v&&(l+=v,v=0)}return s.join("")+n.slice(a)}function $e(n,s,l,a){const v=a?a-1:Number.POSITIVE_INFINITY;let C=0;return m;function m(u){return Fe(u)?(n.enter(l),o(u)):s(u)}function o(u){return Fe(u)&&C++<v?(n.consume(u),o):(n.exit(l),s(u))}}const cy={tokenize:hy};function hy(n){const s=n.attempt(this.parser.constructs.contentInitial,a,v);let l;return s;function a(o){if(o===null){n.consume(o);return}return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),$e(n,s,"linePrefix")}function v(o){return n.enter("paragraph"),C(o)}function C(o){const u=n.enter("chunkText",{contentType:"text",previous:l});return l&&(l.next=u),l=u,m(o)}function m(o){if(o===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(o);return}return Ae(o)?(n.consume(o),n.exit("chunkText"),C):(n.consume(o),m)}}const fy={tokenize:dy},hm={tokenize:py};function dy(n){const s=this,l=[];let a=0,v,C,m;return o;function o(g){if(a<l.length){const E=l[a];return s.containerState=E[1],n.attempt(E[0].continuation,u,h)(g)}return h(g)}function u(g){if(a++,s.containerState._closeFlow){s.containerState._closeFlow=void 0,v&&p();const E=s.events.length;let M=E,T;for(;M--;)if(s.events[M][0]==="exit"&&s.events[M][1].type==="chunkFlow"){T=s.events[M][1].end;break}_(a);let O=E;for(;O<s.events.length;)s.events[O][1].end={...T},O++;return ln(s.events,M+1,0,s.events.slice(E)),s.events.length=O,h(g)}return o(g)}function h(g){if(a===l.length){if(!v)return b(g);if(v.currentConstruct&&v.currentConstruct.concrete)return k(g);s.interrupt=!!(v.currentConstruct&&!v._gfmTableDynamicInterruptHack)}return s.containerState={},n.check(hm,d,c)(g)}function d(g){return v&&p(),_(a),b(g)}function c(g){return s.parser.lazy[s.now().line]=a!==l.length,m=s.now().offset,k(g)}function b(g){return s.containerState={},n.attempt(hm,w,k)(g)}function w(g){return a++,l.push([s.currentConstruct,s.containerState]),b(g)}function k(g){if(g===null){v&&p(),_(0),n.consume(g);return}return v=v||s.parser.flow(s.now()),n.enter("chunkFlow",{_tokenizer:v,contentType:"flow",previous:C}),x(g)}function x(g){if(g===null){S(n.exit("chunkFlow"),!0),_(0),n.consume(g);return}return Ae(g)?(n.consume(g),S(n.exit("chunkFlow")),a=0,s.interrupt=void 0,o):(n.consume(g),x)}function S(g,E){const M=s.sliceStream(g);if(E&&M.push(null),g.previous=C,C&&(C.next=g),C=g,v.defineSkip(g.start),v.write(M),s.parser.lazy[g.start.line]){let T=v.events.length;for(;T--;)if(v.events[T][1].start.offset<m&&(!v.events[T][1].end||v.events[T][1].end.offset>m))return;const O=s.events.length;let A=O,B,j;for(;A--;)if(s.events[A][0]==="exit"&&s.events[A][1].type==="chunkFlow"){if(B){j=s.events[A][1].end;break}B=!0}for(_(a),T=O;T<s.events.length;)s.events[T][1].end={...j},T++;ln(s.events,A+1,0,s.events.slice(O)),s.events.length=T}}function _(g){let E=l.length;for(;E-- >g;){const M=l[E];s.containerState=M[1],M[0].exit.call(s,n)}l.length=g}function p(){v.write([null]),C=void 0,v=void 0,s.containerState._closeFlow=void 0}}function py(n,s,l){return $e(n,n.attempt(this.parser.constructs.document,s,l),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function zr(n){if(n===null||st(n)||qi(n))return 1;if(pa(n))return 2}function ma(n,s,l){const a=[];let v=-1;for(;++v<n.length;){const C=n[v].resolveAll;C&&!a.includes(C)&&(s=C(s,l),a.push(C))}return s}const hc={name:"attention",resolveAll:my,tokenize:_y};function my(n,s){let l=-1,a,v,C,m,o,u,h,d;for(;++l<n.length;)if(n[l][0]==="enter"&&n[l][1].type==="attentionSequence"&&n[l][1]._close){for(a=l;a--;)if(n[a][0]==="exit"&&n[a][1].type==="attentionSequence"&&n[a][1]._open&&s.sliceSerialize(n[a][1]).charCodeAt(0)===s.sliceSerialize(n[l][1]).charCodeAt(0)){if((n[a][1]._close||n[l][1]._open)&&(n[l][1].end.offset-n[l][1].start.offset)%3&&!((n[a][1].end.offset-n[a][1].start.offset+n[l][1].end.offset-n[l][1].start.offset)%3))continue;u=n[a][1].end.offset-n[a][1].start.offset>1&&n[l][1].end.offset-n[l][1].start.offset>1?2:1;const c={...n[a][1].end},b={...n[l][1].start};fm(c,-u),fm(b,u),m={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...n[a][1].end}},o={type:u>1?"strongSequence":"emphasisSequence",start:{...n[l][1].start},end:b},C={type:u>1?"strongText":"emphasisText",start:{...n[a][1].end},end:{...n[l][1].start}},v={type:u>1?"strong":"emphasis",start:{...m.start},end:{...o.end}},n[a][1].end={...m.start},n[l][1].start={...o.end},h=[],n[a][1].end.offset-n[a][1].start.offset&&(h=gn(h,[["enter",n[a][1],s],["exit",n[a][1],s]])),h=gn(h,[["enter",v,s],["enter",m,s],["exit",m,s],["enter",C,s]]),h=gn(h,ma(s.parser.constructs.insideSpan.null,n.slice(a+1,l),s)),h=gn(h,[["exit",C,s],["enter",o,s],["exit",o,s],["exit",v,s]]),n[l][1].end.offset-n[l][1].start.offset?(d=2,h=gn(h,[["enter",n[l][1],s],["exit",n[l][1],s]])):d=0,ln(n,a-1,l-a+3,h),l=a+h.length-d-2;break}}for(l=-1;++l<n.length;)n[l][1].type==="attentionSequence"&&(n[l][1].type="data");return n}function _y(n,s){const l=this.parser.constructs.attentionMarkers.null,a=this.previous,v=zr(a);let C;return m;function m(u){return C=u,n.enter("attentionSequence"),o(u)}function o(u){if(u===C)return n.consume(u),o;const h=n.exit("attentionSequence"),d=zr(u),c=!d||d===2&&v||l.includes(u),b=!v||v===2&&d||l.includes(a);return h._open=!!(C===42?c:c&&(v||!b)),h._close=!!(C===42?b:b&&(d||!c)),s(u)}}function fm(n,s){n.column+=s,n.offset+=s,n._bufferIndex+=s}const gy={name:"autolink",tokenize:vy};function vy(n,s,l){let a=0;return v;function v(w){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),C}function C(w){return Pt(w)?(n.consume(w),m):w===64?l(w):h(w)}function m(w){return w===43||w===45||w===46||jt(w)?(a=1,o(w)):h(w)}function o(w){return w===58?(n.consume(w),a=0,u):(w===43||w===45||w===46||jt(w))&&a++<32?(n.consume(w),o):(a=0,h(w))}function u(w){return w===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.exit("autolink"),s):w===null||w===32||w===60||ca(w)?l(w):(n.consume(w),u)}function h(w){return w===64?(n.consume(w),d):ay(w)?(n.consume(w),h):l(w)}function d(w){return jt(w)?c(w):l(w)}function c(w){return w===46?(n.consume(w),a=0,d):w===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(w),n.exit("autolinkMarker"),n.exit("autolink"),s):b(w)}function b(w){if((w===45||jt(w))&&a++<63){const k=w===45?b:c;return n.consume(w),k}return l(w)}}const Ps={partial:!0,tokenize:Sy};function Sy(n,s,l){return a;function a(C){return Fe(C)?$e(n,v,"linePrefix")(C):v(C)}function v(C){return C===null||Ae(C)?s(C):l(C)}}const f_={continuation:{tokenize:by},exit:Cy,name:"blockQuote",tokenize:yy};function yy(n,s,l){const a=this;return v;function v(m){if(m===62){const o=a.containerState;return o.open||(n.enter("blockQuote",{_container:!0}),o.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(m),n.exit("blockQuoteMarker"),C}return l(m)}function C(m){return Fe(m)?(n.enter("blockQuotePrefixWhitespace"),n.consume(m),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),s):(n.exit("blockQuotePrefix"),s(m))}}function by(n,s,l){const a=this;return v;function v(m){return Fe(m)?$e(n,C,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(m):C(m)}function C(m){return n.attempt(f_,s,l)(m)}}function Cy(n){n.exit("blockQuote")}const d_={name:"characterEscape",tokenize:wy};function wy(n,s,l){return a;function a(C){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(C),n.exit("escapeMarker"),v}function v(C){return uy(C)?(n.enter("characterEscapeValue"),n.consume(C),n.exit("characterEscapeValue"),n.exit("characterEscape"),s):l(C)}}const p_={name:"characterReference",tokenize:xy};function xy(n,s,l){const a=this;let v=0,C,m;return o;function o(c){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(c),n.exit("characterReferenceMarker"),u}function u(c){return c===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(c),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),C=31,m=jt,d(c))}function h(c){return c===88||c===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(c),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),C=6,m=oy,d):(n.enter("characterReferenceValue"),C=7,m=cc,d(c))}function d(c){if(c===59&&v){const b=n.exit("characterReferenceValue");return m===jt&&!Ac(a.sliceSerialize(b))?l(c):(n.enter("characterReferenceMarker"),n.consume(c),n.exit("characterReferenceMarker"),n.exit("characterReference"),s)}return m(c)&&v++<C?(n.consume(c),d):l(c)}}const dm={partial:!0,tokenize:ky},pm={concrete:!0,name:"codeFenced",tokenize:Ey};function Ey(n,s,l){const a=this,v={partial:!0,tokenize:M};let C=0,m=0,o;return u;function u(T){return h(T)}function h(T){const O=a.events[a.events.length-1];return C=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,o=T,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),d(T)}function d(T){return T===o?(m++,n.consume(T),d):m<3?l(T):(n.exit("codeFencedFenceSequence"),Fe(T)?$e(n,c,"whitespace")(T):c(T))}function c(T){return T===null||Ae(T)?(n.exit("codeFencedFence"),a.interrupt?s(T):n.check(dm,x,E)(T)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),b(T))}function b(T){return T===null||Ae(T)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),c(T)):Fe(T)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),$e(n,w,"whitespace")(T)):T===96&&T===o?l(T):(n.consume(T),b)}function w(T){return T===null||Ae(T)?c(T):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),k(T))}function k(T){return T===null||Ae(T)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),c(T)):T===96&&T===o?l(T):(n.consume(T),k)}function x(T){return n.attempt(v,E,S)(T)}function S(T){return n.enter("lineEnding"),n.consume(T),n.exit("lineEnding"),_}function _(T){return C>0&&Fe(T)?$e(n,p,"linePrefix",C+1)(T):p(T)}function p(T){return T===null||Ae(T)?n.check(dm,x,E)(T):(n.enter("codeFlowValue"),g(T))}function g(T){return T===null||Ae(T)?(n.exit("codeFlowValue"),p(T)):(n.consume(T),g)}function E(T){return n.exit("codeFenced"),s(T)}function M(T,O,A){let B=0;return j;function j(X){return T.enter("lineEnding"),T.consume(X),T.exit("lineEnding"),F}function F(X){return T.enter("codeFencedFence"),Fe(X)?$e(T,V,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):V(X)}function V(X){return X===o?(T.enter("codeFencedFenceSequence"),q(X)):A(X)}function q(X){return X===o?(B++,T.consume(X),q):B>=m?(T.exit("codeFencedFenceSequence"),Fe(X)?$e(T,W,"whitespace")(X):W(X)):A(X)}function W(X){return X===null||Ae(X)?(T.exit("codeFencedFence"),O(X)):A(X)}}}function ky(n,s,l){const a=this;return v;function v(m){return m===null?l(m):(n.enter("lineEnding"),n.consume(m),n.exit("lineEnding"),C)}function C(m){return a.parser.lazy[a.now().line]?l(m):s(m)}}const Gu={name:"codeIndented",tokenize:Ty},Ay={partial:!0,tokenize:Dy};function Ty(n,s,l){const a=this;return v;function v(h){return n.enter("codeIndented"),$e(n,C,"linePrefix",5)(h)}function C(h){const d=a.events[a.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?m(h):l(h)}function m(h){return h===null?u(h):Ae(h)?n.attempt(Ay,m,u)(h):(n.enter("codeFlowValue"),o(h))}function o(h){return h===null||Ae(h)?(n.exit("codeFlowValue"),m(h)):(n.consume(h),o)}function u(h){return n.exit("codeIndented"),s(h)}}function Dy(n,s,l){const a=this;return v;function v(m){return a.parser.lazy[a.now().line]?l(m):Ae(m)?(n.enter("lineEnding"),n.consume(m),n.exit("lineEnding"),v):$e(n,C,"linePrefix",5)(m)}function C(m){const o=a.events[a.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?s(m):Ae(m)?v(m):l(m)}}const Ry={name:"codeText",previous:Ly,resolve:My,tokenize:Oy};function My(n){let s=n.length-4,l=3,a,v;if((n[l][1].type==="lineEnding"||n[l][1].type==="space")&&(n[s][1].type==="lineEnding"||n[s][1].type==="space")){for(a=l;++a<s;)if(n[a][1].type==="codeTextData"){n[l][1].type="codeTextPadding",n[s][1].type="codeTextPadding",l+=2,s-=2;break}}for(a=l-1,s++;++a<=s;)v===void 0?a!==s&&n[a][1].type!=="lineEnding"&&(v=a):(a===s||n[a][1].type==="lineEnding")&&(n[v][1].type="codeTextData",a!==v+2&&(n[v][1].end=n[a-1][1].end,n.splice(v+2,a-v-2),s-=a-v-2,a=v+2),v=void 0);return n}function Ly(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Oy(n,s,l){let a=0,v,C;return m;function m(c){return n.enter("codeText"),n.enter("codeTextSequence"),o(c)}function o(c){return c===96?(n.consume(c),a++,o):(n.exit("codeTextSequence"),u(c))}function u(c){return c===null?l(c):c===32?(n.enter("space"),n.consume(c),n.exit("space"),u):c===96?(C=n.enter("codeTextSequence"),v=0,d(c)):Ae(c)?(n.enter("lineEnding"),n.consume(c),n.exit("lineEnding"),u):(n.enter("codeTextData"),h(c))}function h(c){return c===null||c===32||c===96||Ae(c)?(n.exit("codeTextData"),u(c)):(n.consume(c),h)}function d(c){return c===96?(n.consume(c),v++,d):v===a?(n.exit("codeTextSequence"),n.exit("codeText"),s(c)):(C.type="codeTextData",h(c))}}class By{constructor(s){this.left=s?[...s]:[],this.right=[]}get(s){if(s<0||s>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+s+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return s<this.left.length?this.left[s]:this.right[this.right.length-s+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(s,l){const a=l??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(s,a):s>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-s+this.left.length).reverse():this.left.slice(s).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(s,l,a){const v=l||0;this.setCursor(Math.trunc(s));const C=this.right.splice(this.right.length-v,Number.POSITIVE_INFINITY);return a&&Os(this.left,a),C.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(s){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(s)}pushMany(s){this.setCursor(Number.POSITIVE_INFINITY),Os(this.left,s)}unshift(s){this.setCursor(0),this.right.push(s)}unshiftMany(s){this.setCursor(0),Os(this.right,s.reverse())}setCursor(s){if(!(s===this.left.length||s>this.left.length&&this.right.length===0||s<0&&this.left.length===0))if(s<this.left.length){const l=this.left.splice(s,Number.POSITIVE_INFINITY);Os(this.right,l.reverse())}else{const l=this.right.splice(this.left.length+this.right.length-s,Number.POSITIVE_INFINITY);Os(this.left,l.reverse())}}}function Os(n,s){let l=0;if(s.length<1e4)n.push(...s);else for(;l<s.length;)n.push(...s.slice(l,l+1e4)),l+=1e4}function m_(n){const s={};let l=-1,a,v,C,m,o,u,h;const d=new By(n);for(;++l<d.length;){for(;l in s;)l=s[l];if(a=d.get(l),l&&a[1].type==="chunkFlow"&&d.get(l-1)[1].type==="listItemPrefix"&&(u=a[1]._tokenizer.events,C=0,C<u.length&&u[C][1].type==="lineEndingBlank"&&(C+=2),C<u.length&&u[C][1].type==="content"))for(;++C<u.length&&u[C][1].type!=="content";)u[C][1].type==="chunkText"&&(u[C][1]._isInFirstContentOfListItem=!0,C++);if(a[0]==="enter")a[1].contentType&&(Object.assign(s,zy(d,l)),l=s[l],h=!0);else if(a[1]._container){for(C=l,v=void 0;C--;)if(m=d.get(C),m[1].type==="lineEnding"||m[1].type==="lineEndingBlank")m[0]==="enter"&&(v&&(d.get(v)[1].type="lineEndingBlank"),m[1].type="lineEnding",v=C);else if(!(m[1].type==="linePrefix"||m[1].type==="listItemIndent"))break;v&&(a[1].end={...d.get(v)[1].start},o=d.slice(v,l),o.unshift(a),d.splice(v,l-v+1,o))}}return ln(n,0,Number.POSITIVE_INFINITY,d.slice(0)),!h}function zy(n,s){const l=n.get(s)[1],a=n.get(s)[2];let v=s-1;const C=[];let m=l._tokenizer;m||(m=a.parser[l.contentType](l.start),l._contentTypeTextTrailing&&(m._contentTypeTextTrailing=!0));const o=m.events,u=[],h={};let d,c,b=-1,w=l,k=0,x=0;const S=[x];for(;w;){for(;n.get(++v)[1]!==w;);C.push(v),w._tokenizer||(d=a.sliceStream(w),w.next||d.push(null),c&&m.defineSkip(w.start),w._isInFirstContentOfListItem&&(m._gfmTasklistFirstContentOfListItem=!0),m.write(d),w._isInFirstContentOfListItem&&(m._gfmTasklistFirstContentOfListItem=void 0)),c=w,w=w.next}for(w=l;++b<o.length;)o[b][0]==="exit"&&o[b-1][0]==="enter"&&o[b][1].type===o[b-1][1].type&&o[b][1].start.line!==o[b][1].end.line&&(x=b+1,S.push(x),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(m.events=[],w?(w._tokenizer=void 0,w.previous=void 0):S.pop(),b=S.length;b--;){const _=o.slice(S[b],S[b+1]),p=C.pop();u.push([p,p+_.length-1]),n.splice(p,2,_)}for(u.reverse(),b=-1;++b<u.length;)h[k+u[b][0]]=k+u[b][1],k+=u[b][1]-u[b][0]-1;return h}const Hy={resolve:jy,tokenize:Iy},Ny={partial:!0,tokenize:Uy};function jy(n){return m_(n),n}function Iy(n,s){let l;return a;function a(o){return n.enter("content"),l=n.enter("chunkContent",{contentType:"content"}),v(o)}function v(o){return o===null?C(o):Ae(o)?n.check(Ny,m,C)(o):(n.consume(o),v)}function C(o){return n.exit("chunkContent"),n.exit("content"),s(o)}function m(o){return n.consume(o),n.exit("chunkContent"),l.next=n.enter("chunkContent",{contentType:"content",previous:l}),l=l.next,v}}function Uy(n,s,l){const a=this;return v;function v(m){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(m),n.exit("lineEnding"),$e(n,C,"linePrefix")}function C(m){if(m===null||Ae(m))return l(m);const o=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?s(m):n.interrupt(a.parser.constructs.flow,l,s)(m)}}function __(n,s,l,a,v,C,m,o,u){const h=u||Number.POSITIVE_INFINITY;let d=0;return c;function c(_){return _===60?(n.enter(a),n.enter(v),n.enter(C),n.consume(_),n.exit(C),b):_===null||_===32||_===41||ca(_)?l(_):(n.enter(a),n.enter(m),n.enter(o),n.enter("chunkString",{contentType:"string"}),x(_))}function b(_){return _===62?(n.enter(C),n.consume(_),n.exit(C),n.exit(v),n.exit(a),s):(n.enter(o),n.enter("chunkString",{contentType:"string"}),w(_))}function w(_){return _===62?(n.exit("chunkString"),n.exit(o),b(_)):_===null||_===60||Ae(_)?l(_):(n.consume(_),_===92?k:w)}function k(_){return _===60||_===62||_===92?(n.consume(_),w):w(_)}function x(_){return!d&&(_===null||_===41||st(_))?(n.exit("chunkString"),n.exit(o),n.exit(m),n.exit(a),s(_)):d<h&&_===40?(n.consume(_),d++,x):_===41?(n.consume(_),d--,x):_===null||_===32||_===40||ca(_)?l(_):(n.consume(_),_===92?S:x)}function S(_){return _===40||_===41||_===92?(n.consume(_),x):x(_)}}function g_(n,s,l,a,v,C){const m=this;let o=0,u;return h;function h(w){return n.enter(a),n.enter(v),n.consume(w),n.exit(v),n.enter(C),d}function d(w){return o>999||w===null||w===91||w===93&&!u||w===94&&!o&&"_hiddenFootnoteSupport"in m.parser.constructs?l(w):w===93?(n.exit(C),n.enter(v),n.consume(w),n.exit(v),n.exit(a),s):Ae(w)?(n.enter("lineEnding"),n.consume(w),n.exit("lineEnding"),d):(n.enter("chunkString",{contentType:"string"}),c(w))}function c(w){return w===null||w===91||w===93||Ae(w)||o++>999?(n.exit("chunkString"),d(w)):(n.consume(w),u||(u=!Fe(w)),w===92?b:c)}function b(w){return w===91||w===92||w===93?(n.consume(w),o++,c):c(w)}}function v_(n,s,l,a,v,C){let m;return o;function o(b){return b===34||b===39||b===40?(n.enter(a),n.enter(v),n.consume(b),n.exit(v),m=b===40?41:b,u):l(b)}function u(b){return b===m?(n.enter(v),n.consume(b),n.exit(v),n.exit(a),s):(n.enter(C),h(b))}function h(b){return b===m?(n.exit(C),u(m)):b===null?l(b):Ae(b)?(n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),$e(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),d(b))}function d(b){return b===m||b===null||Ae(b)?(n.exit("chunkString"),h(b)):(n.consume(b),b===92?c:d)}function c(b){return b===m||b===92?(n.consume(b),d):d(b)}}function Hs(n,s){let l;return a;function a(v){return Ae(v)?(n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),l=!0,a):Fe(v)?$e(n,a,l?"linePrefix":"lineSuffix")(v):s(v)}}const Py={name:"definition",tokenize:qy},Fy={partial:!0,tokenize:Vy};function qy(n,s,l){const a=this;let v;return C;function C(w){return n.enter("definition"),m(w)}function m(w){return g_.call(a,n,o,l,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function o(w){return v=Cn(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),w===58?(n.enter("definitionMarker"),n.consume(w),n.exit("definitionMarker"),u):l(w)}function u(w){return st(w)?Hs(n,h)(w):h(w)}function h(w){return __(n,d,l,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function d(w){return n.attempt(Fy,c,c)(w)}function c(w){return Fe(w)?$e(n,b,"whitespace")(w):b(w)}function b(w){return w===null||Ae(w)?(n.exit("definition"),a.parser.defined.push(v),s(w)):l(w)}}function Vy(n,s,l){return a;function a(o){return st(o)?Hs(n,v)(o):l(o)}function v(o){return v_(n,C,l,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function C(o){return Fe(o)?$e(n,m,"whitespace")(o):m(o)}function m(o){return o===null||Ae(o)?s(o):l(o)}}const Gy={name:"hardBreakEscape",tokenize:$y};function $y(n,s,l){return a;function a(C){return n.enter("hardBreakEscape"),n.consume(C),v}function v(C){return Ae(C)?(n.exit("hardBreakEscape"),s(C)):l(C)}}const Yy={name:"headingAtx",resolve:Wy,tokenize:Ky};function Wy(n,s){let l=n.length-2,a=3,v,C;return n[a][1].type==="whitespace"&&(a+=2),l-2>a&&n[l][1].type==="whitespace"&&(l-=2),n[l][1].type==="atxHeadingSequence"&&(a===l-1||l-4>a&&n[l-2][1].type==="whitespace")&&(l-=a+1===l?2:4),l>a&&(v={type:"atxHeadingText",start:n[a][1].start,end:n[l][1].end},C={type:"chunkText",start:n[a][1].start,end:n[l][1].end,contentType:"text"},ln(n,a,l-a+1,[["enter",v,s],["enter",C,s],["exit",C,s],["exit",v,s]])),n}function Ky(n,s,l){let a=0;return v;function v(d){return n.enter("atxHeading"),C(d)}function C(d){return n.enter("atxHeadingSequence"),m(d)}function m(d){return d===35&&a++<6?(n.consume(d),m):d===null||st(d)?(n.exit("atxHeadingSequence"),o(d)):l(d)}function o(d){return d===35?(n.enter("atxHeadingSequence"),u(d)):d===null||Ae(d)?(n.exit("atxHeading"),s(d)):Fe(d)?$e(n,o,"whitespace")(d):(n.enter("atxHeadingText"),h(d))}function u(d){return d===35?(n.consume(d),u):(n.exit("atxHeadingSequence"),o(d))}function h(d){return d===null||d===35||st(d)?(n.exit("atxHeadingText"),o(d)):(n.consume(d),h)}}const Xy=["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"],mm=["pre","script","style","textarea"],Qy={concrete:!0,name:"htmlFlow",resolveTo:e1,tokenize:t1},Zy={partial:!0,tokenize:i1},Jy={partial:!0,tokenize:n1};function e1(n){let s=n.length;for(;s--&&!(n[s][0]==="enter"&&n[s][1].type==="htmlFlow"););return s>1&&n[s-2][1].type==="linePrefix"&&(n[s][1].start=n[s-2][1].start,n[s+1][1].start=n[s-2][1].start,n.splice(s-2,2)),n}function t1(n,s,l){const a=this;let v,C,m,o,u;return h;function h(z){return d(z)}function d(z){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(z),c}function c(z){return z===33?(n.consume(z),b):z===47?(n.consume(z),C=!0,x):z===63?(n.consume(z),v=3,a.interrupt?s:D):Pt(z)?(n.consume(z),m=String.fromCharCode(z),S):l(z)}function b(z){return z===45?(n.consume(z),v=2,w):z===91?(n.consume(z),v=5,o=0,k):Pt(z)?(n.consume(z),v=4,a.interrupt?s:D):l(z)}function w(z){return z===45?(n.consume(z),a.interrupt?s:D):l(z)}function k(z){const Z="CDATA[";return z===Z.charCodeAt(o++)?(n.consume(z),o===Z.length?a.interrupt?s:V:k):l(z)}function x(z){return Pt(z)?(n.consume(z),m=String.fromCharCode(z),S):l(z)}function S(z){if(z===null||z===47||z===62||st(z)){const Z=z===47,pe=m.toLowerCase();return!Z&&!C&&mm.includes(pe)?(v=1,a.interrupt?s(z):V(z)):Xy.includes(m.toLowerCase())?(v=6,Z?(n.consume(z),_):a.interrupt?s(z):V(z)):(v=7,a.interrupt&&!a.parser.lazy[a.now().line]?l(z):C?p(z):g(z))}return z===45||jt(z)?(n.consume(z),m+=String.fromCharCode(z),S):l(z)}function _(z){return z===62?(n.consume(z),a.interrupt?s:V):l(z)}function p(z){return Fe(z)?(n.consume(z),p):j(z)}function g(z){return z===47?(n.consume(z),j):z===58||z===95||Pt(z)?(n.consume(z),E):Fe(z)?(n.consume(z),g):j(z)}function E(z){return z===45||z===46||z===58||z===95||jt(z)?(n.consume(z),E):M(z)}function M(z){return z===61?(n.consume(z),T):Fe(z)?(n.consume(z),M):g(z)}function T(z){return z===null||z===60||z===61||z===62||z===96?l(z):z===34||z===39?(n.consume(z),u=z,O):Fe(z)?(n.consume(z),T):A(z)}function O(z){return z===u?(n.consume(z),u=null,B):z===null||Ae(z)?l(z):(n.consume(z),O)}function A(z){return z===null||z===34||z===39||z===47||z===60||z===61||z===62||z===96||st(z)?M(z):(n.consume(z),A)}function B(z){return z===47||z===62||Fe(z)?g(z):l(z)}function j(z){return z===62?(n.consume(z),F):l(z)}function F(z){return z===null||Ae(z)?V(z):Fe(z)?(n.consume(z),F):l(z)}function V(z){return z===45&&v===2?(n.consume(z),G):z===60&&v===1?(n.consume(z),J):z===62&&v===4?(n.consume(z),L):z===63&&v===3?(n.consume(z),D):z===93&&v===5?(n.consume(z),H):Ae(z)&&(v===6||v===7)?(n.exit("htmlFlowData"),n.check(Zy,U,q)(z)):z===null||Ae(z)?(n.exit("htmlFlowData"),q(z)):(n.consume(z),V)}function q(z){return n.check(Jy,W,U)(z)}function W(z){return n.enter("lineEnding"),n.consume(z),n.exit("lineEnding"),X}function X(z){return z===null||Ae(z)?q(z):(n.enter("htmlFlowData"),V(z))}function G(z){return z===45?(n.consume(z),D):V(z)}function J(z){return z===47?(n.consume(z),m="",re):V(z)}function re(z){if(z===62){const Z=m.toLowerCase();return mm.includes(Z)?(n.consume(z),L):V(z)}return Pt(z)&&m.length<8?(n.consume(z),m+=String.fromCharCode(z),re):V(z)}function H(z){return z===93?(n.consume(z),D):V(z)}function D(z){return z===62?(n.consume(z),L):z===45&&v===2?(n.consume(z),D):V(z)}function L(z){return z===null||Ae(z)?(n.exit("htmlFlowData"),U(z)):(n.consume(z),L)}function U(z){return n.exit("htmlFlow"),s(z)}}function n1(n,s,l){const a=this;return v;function v(m){return Ae(m)?(n.enter("lineEnding"),n.consume(m),n.exit("lineEnding"),C):l(m)}function C(m){return a.parser.lazy[a.now().line]?l(m):s(m)}}function i1(n,s,l){return a;function a(v){return n.enter("lineEnding"),n.consume(v),n.exit("lineEnding"),n.attempt(Ps,s,l)}}const r1={name:"htmlText",tokenize:s1};function s1(n,s,l){const a=this;let v,C,m;return o;function o(D){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(D),u}function u(D){return D===33?(n.consume(D),h):D===47?(n.consume(D),M):D===63?(n.consume(D),g):Pt(D)?(n.consume(D),A):l(D)}function h(D){return D===45?(n.consume(D),d):D===91?(n.consume(D),C=0,k):Pt(D)?(n.consume(D),p):l(D)}function d(D){return D===45?(n.consume(D),w):l(D)}function c(D){return D===null?l(D):D===45?(n.consume(D),b):Ae(D)?(m=c,J(D)):(n.consume(D),c)}function b(D){return D===45?(n.consume(D),w):c(D)}function w(D){return D===62?G(D):D===45?b(D):c(D)}function k(D){const L="CDATA[";return D===L.charCodeAt(C++)?(n.consume(D),C===L.length?x:k):l(D)}function x(D){return D===null?l(D):D===93?(n.consume(D),S):Ae(D)?(m=x,J(D)):(n.consume(D),x)}function S(D){return D===93?(n.consume(D),_):x(D)}function _(D){return D===62?G(D):D===93?(n.consume(D),_):x(D)}function p(D){return D===null||D===62?G(D):Ae(D)?(m=p,J(D)):(n.consume(D),p)}function g(D){return D===null?l(D):D===63?(n.consume(D),E):Ae(D)?(m=g,J(D)):(n.consume(D),g)}function E(D){return D===62?G(D):g(D)}function M(D){return Pt(D)?(n.consume(D),T):l(D)}function T(D){return D===45||jt(D)?(n.consume(D),T):O(D)}function O(D){return Ae(D)?(m=O,J(D)):Fe(D)?(n.consume(D),O):G(D)}function A(D){return D===45||jt(D)?(n.consume(D),A):D===47||D===62||st(D)?B(D):l(D)}function B(D){return D===47?(n.consume(D),G):D===58||D===95||Pt(D)?(n.consume(D),j):Ae(D)?(m=B,J(D)):Fe(D)?(n.consume(D),B):G(D)}function j(D){return D===45||D===46||D===58||D===95||jt(D)?(n.consume(D),j):F(D)}function F(D){return D===61?(n.consume(D),V):Ae(D)?(m=F,J(D)):Fe(D)?(n.consume(D),F):B(D)}function V(D){return D===null||D===60||D===61||D===62||D===96?l(D):D===34||D===39?(n.consume(D),v=D,q):Ae(D)?(m=V,J(D)):Fe(D)?(n.consume(D),V):(n.consume(D),W)}function q(D){return D===v?(n.consume(D),v=void 0,X):D===null?l(D):Ae(D)?(m=q,J(D)):(n.consume(D),q)}function W(D){return D===null||D===34||D===39||D===60||D===61||D===96?l(D):D===47||D===62||st(D)?B(D):(n.consume(D),W)}function X(D){return D===47||D===62||st(D)?B(D):l(D)}function G(D){return D===62?(n.consume(D),n.exit("htmlTextData"),n.exit("htmlText"),s):l(D)}function J(D){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(D),n.exit("lineEnding"),re}function re(D){return Fe(D)?$e(n,H,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):H(D)}function H(D){return n.enter("htmlTextData"),m(D)}}const Tc={name:"labelEnd",resolveAll:u1,resolveTo:c1,tokenize:h1},l1={tokenize:f1},a1={tokenize:d1},o1={tokenize:p1};function u1(n){let s=-1;const l=[];for(;++s<n.length;){const a=n[s][1];if(l.push(n[s]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const v=a.type==="labelImage"?4:2;a.type="data",s+=v}}return n.length!==l.length&&ln(n,0,n.length,l),n}function c1(n,s){let l=n.length,a=0,v,C,m,o;for(;l--;)if(v=n[l][1],C){if(v.type==="link"||v.type==="labelLink"&&v._inactive)break;n[l][0]==="enter"&&v.type==="labelLink"&&(v._inactive=!0)}else if(m){if(n[l][0]==="enter"&&(v.type==="labelImage"||v.type==="labelLink")&&!v._balanced&&(C=l,v.type!=="labelLink")){a=2;break}}else v.type==="labelEnd"&&(m=l);const u={type:n[C][1].type==="labelLink"?"link":"image",start:{...n[C][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[C][1].start},end:{...n[m][1].end}},d={type:"labelText",start:{...n[C+a+2][1].end},end:{...n[m-2][1].start}};return o=[["enter",u,s],["enter",h,s]],o=gn(o,n.slice(C+1,C+a+3)),o=gn(o,[["enter",d,s]]),o=gn(o,ma(s.parser.constructs.insideSpan.null,n.slice(C+a+4,m-3),s)),o=gn(o,[["exit",d,s],n[m-2],n[m-1],["exit",h,s]]),o=gn(o,n.slice(m+1)),o=gn(o,[["exit",u,s]]),ln(n,C,n.length,o),n}function h1(n,s,l){const a=this;let v=a.events.length,C,m;for(;v--;)if((a.events[v][1].type==="labelImage"||a.events[v][1].type==="labelLink")&&!a.events[v][1]._balanced){C=a.events[v][1];break}return o;function o(b){return C?C._inactive?c(b):(m=a.parser.defined.includes(Cn(a.sliceSerialize({start:C.end,end:a.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(b),n.exit("labelMarker"),n.exit("labelEnd"),u):l(b)}function u(b){return b===40?n.attempt(l1,d,m?d:c)(b):b===91?n.attempt(a1,d,m?h:c)(b):m?d(b):c(b)}function h(b){return n.attempt(o1,d,c)(b)}function d(b){return s(b)}function c(b){return C._balanced=!0,l(b)}}function f1(n,s,l){return a;function a(c){return n.enter("resource"),n.enter("resourceMarker"),n.consume(c),n.exit("resourceMarker"),v}function v(c){return st(c)?Hs(n,C)(c):C(c)}function C(c){return c===41?d(c):__(n,m,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function m(c){return st(c)?Hs(n,u)(c):d(c)}function o(c){return l(c)}function u(c){return c===34||c===39||c===40?v_(n,h,l,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):d(c)}function h(c){return st(c)?Hs(n,d)(c):d(c)}function d(c){return c===41?(n.enter("resourceMarker"),n.consume(c),n.exit("resourceMarker"),n.exit("resource"),s):l(c)}}function d1(n,s,l){const a=this;return v;function v(o){return g_.call(a,n,C,m,"reference","referenceMarker","referenceString")(o)}function C(o){return a.parser.defined.includes(Cn(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?s(o):l(o)}function m(o){return l(o)}}function p1(n,s,l){return a;function a(C){return n.enter("reference"),n.enter("referenceMarker"),n.consume(C),n.exit("referenceMarker"),v}function v(C){return C===93?(n.enter("referenceMarker"),n.consume(C),n.exit("referenceMarker"),n.exit("reference"),s):l(C)}}const m1={name:"labelStartImage",resolveAll:Tc.resolveAll,tokenize:_1};function _1(n,s,l){const a=this;return v;function v(o){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(o),n.exit("labelImageMarker"),C}function C(o){return o===91?(n.enter("labelMarker"),n.consume(o),n.exit("labelMarker"),n.exit("labelImage"),m):l(o)}function m(o){return o===94&&"_hiddenFootnoteSupport"in a.parser.constructs?l(o):s(o)}}const g1={name:"labelStartLink",resolveAll:Tc.resolveAll,tokenize:v1};function v1(n,s,l){const a=this;return v;function v(m){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(m),n.exit("labelMarker"),n.exit("labelLink"),C}function C(m){return m===94&&"_hiddenFootnoteSupport"in a.parser.constructs?l(m):s(m)}}const $u={name:"lineEnding",tokenize:S1};function S1(n,s){return l;function l(a){return n.enter("lineEnding"),n.consume(a),n.exit("lineEnding"),$e(n,s,"linePrefix")}}const oa={name:"thematicBreak",tokenize:y1};function y1(n,s,l){let a=0,v;return C;function C(h){return n.enter("thematicBreak"),m(h)}function m(h){return v=h,o(h)}function o(h){return h===v?(n.enter("thematicBreakSequence"),u(h)):a>=3&&(h===null||Ae(h))?(n.exit("thematicBreak"),s(h)):l(h)}function u(h){return h===v?(n.consume(h),a++,u):(n.exit("thematicBreakSequence"),Fe(h)?$e(n,o,"whitespace")(h):o(h))}}const Kt={continuation:{tokenize:x1},exit:k1,name:"list",tokenize:w1},b1={partial:!0,tokenize:A1},C1={partial:!0,tokenize:E1};function w1(n,s,l){const a=this,v=a.events[a.events.length-1];let C=v&&v[1].type==="linePrefix"?v[2].sliceSerialize(v[1],!0).length:0,m=0;return o;function o(w){const k=a.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!a.containerState.marker||w===a.containerState.marker:cc(w)){if(a.containerState.type||(a.containerState.type=k,n.enter(k,{_container:!0})),k==="listUnordered")return n.enter("listItemPrefix"),w===42||w===45?n.check(oa,l,h)(w):h(w);if(!a.interrupt||w===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),u(w)}return l(w)}function u(w){return cc(w)&&++m<10?(n.consume(w),u):(!a.interrupt||m<2)&&(a.containerState.marker?w===a.containerState.marker:w===41||w===46)?(n.exit("listItemValue"),h(w)):l(w)}function h(w){return n.enter("listItemMarker"),n.consume(w),n.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||w,n.check(Ps,a.interrupt?l:d,n.attempt(b1,b,c))}function d(w){return a.containerState.initialBlankLine=!0,C++,b(w)}function c(w){return Fe(w)?(n.enter("listItemPrefixWhitespace"),n.consume(w),n.exit("listItemPrefixWhitespace"),b):l(w)}function b(w){return a.containerState.size=C+a.sliceSerialize(n.exit("listItemPrefix"),!0).length,s(w)}}function x1(n,s,l){const a=this;return a.containerState._closeFlow=void 0,n.check(Ps,v,C);function v(o){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,$e(n,s,"listItemIndent",a.containerState.size+1)(o)}function C(o){return a.containerState.furtherBlankLines||!Fe(o)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,m(o)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,n.attempt(C1,s,m)(o))}function m(o){return a.containerState._closeFlow=!0,a.interrupt=void 0,$e(n,n.attempt(Kt,s,l),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function E1(n,s,l){const a=this;return $e(n,v,"listItemIndent",a.containerState.size+1);function v(C){const m=a.events[a.events.length-1];return m&&m[1].type==="listItemIndent"&&m[2].sliceSerialize(m[1],!0).length===a.containerState.size?s(C):l(C)}}function k1(n){n.exit(this.containerState.type)}function A1(n,s,l){const a=this;return $e(n,v,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function v(C){const m=a.events[a.events.length-1];return!Fe(C)&&m&&m[1].type==="listItemPrefixWhitespace"?s(C):l(C)}}const _m={name:"setextUnderline",resolveTo:T1,tokenize:D1};function T1(n,s){let l=n.length,a,v,C;for(;l--;)if(n[l][0]==="enter"){if(n[l][1].type==="content"){a=l;break}n[l][1].type==="paragraph"&&(v=l)}else n[l][1].type==="content"&&n.splice(l,1),!C&&n[l][1].type==="definition"&&(C=l);const m={type:"setextHeading",start:{...n[a][1].start},end:{...n[n.length-1][1].end}};return n[v][1].type="setextHeadingText",C?(n.splice(v,0,["enter",m,s]),n.splice(C+1,0,["exit",n[a][1],s]),n[a][1].end={...n[C][1].end}):n[a][1]=m,n.push(["exit",m,s]),n}function D1(n,s,l){const a=this;let v;return C;function C(h){let d=a.events.length,c;for(;d--;)if(a.events[d][1].type!=="lineEnding"&&a.events[d][1].type!=="linePrefix"&&a.events[d][1].type!=="content"){c=a.events[d][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||c)?(n.enter("setextHeadingLine"),v=h,m(h)):l(h)}function m(h){return n.enter("setextHeadingLineSequence"),o(h)}function o(h){return h===v?(n.consume(h),o):(n.exit("setextHeadingLineSequence"),Fe(h)?$e(n,u,"lineSuffix")(h):u(h))}function u(h){return h===null||Ae(h)?(n.exit("setextHeadingLine"),s(h)):l(h)}}const R1={tokenize:M1};function M1(n){const s=this,l=n.attempt(Ps,a,n.attempt(this.parser.constructs.flowInitial,v,$e(n,n.attempt(this.parser.constructs.flow,v,n.attempt(Hy,v)),"linePrefix")));return l;function a(C){if(C===null){n.consume(C);return}return n.enter("lineEndingBlank"),n.consume(C),n.exit("lineEndingBlank"),s.currentConstruct=void 0,l}function v(C){if(C===null){n.consume(C);return}return n.enter("lineEnding"),n.consume(C),n.exit("lineEnding"),s.currentConstruct=void 0,l}}const L1={resolveAll:y_()},O1=S_("string"),B1=S_("text");function S_(n){return{resolveAll:y_(n==="text"?z1:void 0),tokenize:s};function s(l){const a=this,v=this.parser.constructs[n],C=l.attempt(v,m,o);return m;function m(d){return h(d)?C(d):o(d)}function o(d){if(d===null){l.consume(d);return}return l.enter("data"),l.consume(d),u}function u(d){return h(d)?(l.exit("data"),C(d)):(l.consume(d),u)}function h(d){if(d===null)return!0;const c=v[d];let b=-1;if(c)for(;++b<c.length;){const w=c[b];if(!w.previous||w.previous.call(a,a.previous))return!0}return!1}}}function y_(n){return s;function s(l,a){let v=-1,C;for(;++v<=l.length;)C===void 0?l[v]&&l[v][1].type==="data"&&(C=v,v++):(!l[v]||l[v][1].type!=="data")&&(v!==C+2&&(l[C][1].end=l[v-1][1].end,l.splice(C+2,v-C-2),v=C+2),C=void 0);return n?n(l,a):l}}function z1(n,s){let l=0;for(;++l<=n.length;)if((l===n.length||n[l][1].type==="lineEnding")&&n[l-1][1].type==="data"){const a=n[l-1][1],v=s.sliceStream(a);let C=v.length,m=-1,o=0,u;for(;C--;){const h=v[C];if(typeof h=="string"){for(m=h.length;h.charCodeAt(m-1)===32;)o++,m--;if(m)break;m=-1}else if(h===-2)u=!0,o++;else if(h!==-1){C++;break}}if(s._contentTypeTextTrailing&&l===n.length&&(o=0),o){const h={type:l===n.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:C?m:a.start._bufferIndex+m,_index:a.start._index+C,line:a.end.line,column:a.end.column-o,offset:a.end.offset-o},end:{...a.end}};a.end={...h.start},a.start.offset===a.end.offset?Object.assign(a,h):(n.splice(l,0,["enter",h,s],["exit",h,s]),l+=2)}l++}return n}const H1={42:Kt,43:Kt,45:Kt,48:Kt,49:Kt,50:Kt,51:Kt,52:Kt,53:Kt,54:Kt,55:Kt,56:Kt,57:Kt,62:f_},N1={91:Py},j1={[-2]:Gu,[-1]:Gu,32:Gu},I1={35:Yy,42:oa,45:[_m,oa],60:Qy,61:_m,95:oa,96:pm,126:pm},U1={38:p_,92:d_},P1={[-5]:$u,[-4]:$u,[-3]:$u,33:m1,38:p_,42:hc,60:[gy,r1],91:g1,92:[Gy,d_],93:Tc,95:hc,96:Ry},F1={null:[hc,L1]},q1={null:[42,95]},V1={null:[]},G1=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:q1,contentInitial:N1,disable:V1,document:H1,flow:I1,flowInitial:j1,insideSpan:F1,string:U1,text:P1},Symbol.toStringTag,{value:"Module"}));function $1(n,s,l){let a={_bufferIndex:-1,_index:0,line:l&&l.line||1,column:l&&l.column||1,offset:l&&l.offset||0};const v={},C=[];let m=[],o=[];const u={attempt:O(M),check:O(T),consume:p,enter:g,exit:E,interrupt:O(T,{interrupt:!0})},h={code:null,containerState:{},defineSkip:x,events:[],now:k,parser:n,previous:null,sliceSerialize:b,sliceStream:w,write:c};let d=s.tokenize.call(h,u);return s.resolveAll&&C.push(s),h;function c(F){return m=gn(m,F),S(),m[m.length-1]!==null?[]:(A(s,0),h.events=ma(C,h.events,h),h.events)}function b(F,V){return W1(w(F),V)}function w(F){return Y1(m,F)}function k(){const{_bufferIndex:F,_index:V,line:q,column:W,offset:X}=a;return{_bufferIndex:F,_index:V,line:q,column:W,offset:X}}function x(F){v[F.line]=F.column,j()}function S(){let F;for(;a._index<m.length;){const V=m[a._index];if(typeof V=="string")for(F=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===F&&a._bufferIndex<V.length;)_(V.charCodeAt(a._bufferIndex));else _(V)}}function _(F){d=d(F)}function p(F){Ae(F)?(a.line++,a.column=1,a.offset+=F===-3?2:1,j()):F!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===m[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=F}function g(F,V){const q=V||{};return q.type=F,q.start=k(),h.events.push(["enter",q,h]),o.push(q),q}function E(F){const V=o.pop();return V.end=k(),h.events.push(["exit",V,h]),V}function M(F,V){A(F,V.from)}function T(F,V){V.restore()}function O(F,V){return q;function q(W,X,G){let J,re,H,D;return Array.isArray(W)?U(W):"tokenize"in W?U([W]):L(W);function L(me){return Y;function Y(P){const ae=P!==null&&me[P],ne=P!==null&&me.null,ge=[...Array.isArray(ae)?ae:ae?[ae]:[],...Array.isArray(ne)?ne:ne?[ne]:[]];return U(ge)(P)}}function U(me){return J=me,re=0,me.length===0?G:z(me[re])}function z(me){return Y;function Y(P){return D=B(),H=me,me.partial||(h.currentConstruct=me),me.name&&h.parser.constructs.disable.null.includes(me.name)?pe():me.tokenize.call(V?Object.assign(Object.create(h),V):h,u,Z,pe)(P)}}function Z(me){return F(H,D),X}function pe(me){return D.restore(),++re<J.length?z(J[re]):G}}}function A(F,V){F.resolveAll&&!C.includes(F)&&C.push(F),F.resolve&&ln(h.events,V,h.events.length-V,F.resolve(h.events.slice(V),h)),F.resolveTo&&(h.events=F.resolveTo(h.events,h))}function B(){const F=k(),V=h.previous,q=h.currentConstruct,W=h.events.length,X=Array.from(o);return{from:W,restore:G};function G(){a=F,h.previous=V,h.currentConstruct=q,h.events.length=W,o=X,j()}}function j(){a.line in v&&a.column<2&&(a.column=v[a.line],a.offset+=v[a.line]-1)}}function Y1(n,s){const l=s.start._index,a=s.start._bufferIndex,v=s.end._index,C=s.end._bufferIndex;let m;if(l===v)m=[n[l].slice(a,C)];else{if(m=n.slice(l,v),a>-1){const o=m[0];typeof o=="string"?m[0]=o.slice(a):m.shift()}C>0&&m.push(n[v].slice(0,C))}return m}function W1(n,s){let l=-1;const a=[];let v;for(;++l<n.length;){const C=n[l];let m;if(typeof C=="string")m=C;else switch(C){case-5:{m="\r";break}case-4:{m=`
|
|
62
|
+
`;break}case-3:{m=`\r
|
|
63
|
+
`;break}case-2:{m=s?" ":" ";break}case-1:{if(!s&&v)continue;m=" ";break}default:m=String.fromCharCode(C)}v=C===-2,a.push(m)}return a.join("")}function K1(n){const a={constructs:c_([G1,...(n||{}).extensions||[]]),content:v(cy),defined:[],document:v(fy),flow:v(R1),lazy:{},string:v(O1),text:v(B1)};return a;function v(C){return m;function m(o){return $1(a,C,o)}}}function X1(n){for(;!m_(n););return n}const gm=/[\0\t\n\r]/g;function Q1(){let n=1,s="",l=!0,a;return v;function v(C,m,o){const u=[];let h,d,c,b,w;for(C=s+(typeof C=="string"?C.toString():new TextDecoder(m||void 0).decode(C)),c=0,s="",l&&(C.charCodeAt(0)===65279&&c++,l=void 0);c<C.length;){if(gm.lastIndex=c,h=gm.exec(C),b=h&&h.index!==void 0?h.index:C.length,w=C.charCodeAt(b),!h){s=C.slice(c);break}if(w===10&&c===b&&a)u.push(-3),a=void 0;else switch(a&&(u.push(-5),a=void 0),c<b&&(u.push(C.slice(c,b)),n+=b-c),w){case 0:{u.push(65533),n++;break}case 9:{for(d=Math.ceil(n/4)*4,u.push(-2);n++<d;)u.push(-1);break}case 10:{u.push(-4),n=1;break}default:a=!0,n=1}c=b+1}return o&&(a&&u.push(-5),s&&u.push(s),u.push(null)),u}}const Z1=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function J1(n){return n.replace(Z1,eb)}function eb(n,s,l){if(s)return s;if(l.charCodeAt(0)===35){const v=l.charCodeAt(1),C=v===120||v===88;return h_(l.slice(C?2:1),C?16:10)}return Ac(l)||n}const b_={}.hasOwnProperty;function tb(n,s,l){return s&&typeof s=="object"&&(l=s,s=void 0),nb(l)(X1(K1(l).document().write(Q1()(n,s,!0))))}function nb(n){const s={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:C(Ye),autolinkProtocol:B,autolinkEmail:B,atxHeading:C(ve),blockQuote:C(ne),characterEscape:B,characterReference:B,codeFenced:C(ge),codeFencedFenceInfo:m,codeFencedFenceMeta:m,codeIndented:C(ge,m),codeText:C(se,m),codeTextData:B,data:B,codeFlowValue:B,definition:C(Oe),definitionDestinationString:m,definitionLabelString:m,definitionTitleString:m,emphasis:C(Te),hardBreakEscape:C(Be),hardBreakTrailing:C(Be),htmlFlow:C(ye,m),htmlFlowData:B,htmlText:C(ye,m),htmlTextData:B,image:C(lt),label:m,link:C(Ye),listItem:C(Dt),listItemValue:b,listOrdered:C(Tt,c),listUnordered:C(Tt),paragraph:C(wn),reference:z,referenceString:m,resourceDestinationString:m,resourceTitleString:m,setextHeading:C(ve),strong:C(Et),thematicBreak:C(zt)},exit:{atxHeading:u(),atxHeadingSequence:M,autolink:u(),autolinkEmail:ae,autolinkProtocol:P,blockQuote:u(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:me,characterReference:Y,codeFenced:u(S),codeFencedFence:x,codeFencedFenceInfo:w,codeFencedFenceMeta:k,codeFlowValue:j,codeIndented:u(_),codeText:u(X),codeTextData:j,data:j,definition:u(),definitionDestinationString:E,definitionLabelString:p,definitionTitleString:g,emphasis:u(),hardBreakEscape:u(V),hardBreakTrailing:u(V),htmlFlow:u(q),htmlFlowData:j,htmlText:u(W),htmlTextData:j,image:u(J),label:H,labelText:re,lineEnding:F,link:u(G),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Z,resourceDestinationString:D,resourceTitleString:L,resource:U,setextHeading:u(A),setextHeadingLineSequence:O,setextHeadingText:T,strong:u(),thematicBreak:u()}};C_(s,(n||{}).mdastExtensions||[]);const l={};return a;function a(oe){let Se={type:"root",children:[]};const Ce={stack:[Se],tokenStack:[],config:s,enter:o,exit:h,buffer:m,resume:d,data:l},Re=[];let Me=-1;for(;++Me<oe.length;)if(oe[Me][1].type==="listOrdered"||oe[Me][1].type==="listUnordered")if(oe[Me][0]==="enter")Re.push(Me);else{const pt=Re.pop();Me=v(oe,pt,Me)}for(Me=-1;++Me<oe.length;){const pt=s[oe[Me][0]];b_.call(pt,oe[Me][1].type)&&pt[oe[Me][1].type].call(Object.assign({sliceSerialize:oe[Me][2].sliceSerialize},Ce),oe[Me][1])}if(Ce.tokenStack.length>0){const pt=Ce.tokenStack[Ce.tokenStack.length-1];(pt[1]||vm).call(Ce,void 0,pt[0])}for(Se.position={start:yi(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:yi(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},Me=-1;++Me<s.transforms.length;)Se=s.transforms[Me](Se)||Se;return Se}function v(oe,Se,Ce){let Re=Se-1,Me=-1,pt=!1,Ie,We,mt,Ht;for(;++Re<=Ce;){const Ze=oe[Re];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?Me++:Me--,Ht=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(Ie&&!Ht&&!Me&&!mt&&(mt=Re),Ht=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ht=void 0}if(!Me&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||Me===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(Ie){let xn=Re;for(We=void 0;xn--;){const he=oe[xn];if(he[1].type==="lineEnding"||he[1].type==="lineEndingBlank"){if(he[0]==="exit")continue;We&&(oe[We][1].type="lineEndingBlank",pt=!0),he[1].type="lineEnding",We=xn}else if(!(he[1].type==="linePrefix"||he[1].type==="blockQuotePrefix"||he[1].type==="blockQuotePrefixWhitespace"||he[1].type==="blockQuoteMarker"||he[1].type==="listItemIndent"))break}mt&&(!We||mt<We)&&(Ie._spread=!0),Ie.end=Object.assign({},We?oe[We][1].start:Ze[1].end),oe.splice(We||Re,0,["exit",Ie,Ze[2]]),Re++,Ce++}if(Ze[1].type==="listItemPrefix"){const xn={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};Ie=xn,oe.splice(Re,0,["enter",xn,Ze[2]]),Re++,Ce++,mt=void 0,Ht=!0}}}return oe[Se][1]._spread=pt,Ce}function C(oe,Se){return Ce;function Ce(Re){o.call(this,oe(Re),Re),Se&&Se.call(this,Re)}}function m(){this.stack.push({type:"fragment",children:[]})}function o(oe,Se,Ce){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([Se,Ce||void 0]),oe.position={start:yi(Se.start),end:void 0}}function u(oe){return Se;function Se(Ce){oe&&oe.call(this,Ce),h.call(this,Ce)}}function h(oe,Se){const Ce=this.stack.pop(),Re=this.tokenStack.pop();if(Re)Re[0].type!==oe.type&&(Se?Se.call(this,oe,Re[0]):(Re[1]||vm).call(this,oe,Re[0]));else throw new Error("Cannot close `"+oe.type+"` ("+zs({start:oe.start,end:oe.end})+"): it’s not open");Ce.position.end=yi(oe.end)}function d(){return kc(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function b(oe){if(this.data.expectingFirstListItemValue){const Se=this.stack[this.stack.length-2];Se.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function w(){const oe=this.resume(),Se=this.stack[this.stack.length-1];Se.lang=oe}function k(){const oe=this.resume(),Se=this.stack[this.stack.length-1];Se.meta=oe}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const oe=this.resume(),Se=this.stack[this.stack.length-1];Se.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const oe=this.resume(),Se=this.stack[this.stack.length-1];Se.value=oe.replace(/(\r?\n|\r)$/g,"")}function p(oe){const Se=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=Se,Ce.identifier=Cn(this.sliceSerialize(oe)).toLowerCase()}function g(){const oe=this.resume(),Se=this.stack[this.stack.length-1];Se.title=oe}function E(){const oe=this.resume(),Se=this.stack[this.stack.length-1];Se.url=oe}function M(oe){const Se=this.stack[this.stack.length-1];if(!Se.depth){const Ce=this.sliceSerialize(oe).length;Se.depth=Ce}}function T(){this.data.setextHeadingSlurpLineEnding=!0}function O(oe){const Se=this.stack[this.stack.length-1];Se.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function B(oe){const Ce=this.stack[this.stack.length-1].children;let Re=Ce[Ce.length-1];(!Re||Re.type!=="text")&&(Re=ht(),Re.position={start:yi(oe.start),end:void 0},Ce.push(Re)),this.stack.push(Re)}function j(oe){const Se=this.stack.pop();Se.value+=this.sliceSerialize(oe),Se.position.end=yi(oe.end)}function F(oe){const Se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=Se.children[Se.children.length-1];Ce.position.end=yi(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&s.canContainEols.includes(Se.type)&&(B.call(this,oe),j.call(this,oe))}function V(){this.data.atHardBreak=!0}function q(){const oe=this.resume(),Se=this.stack[this.stack.length-1];Se.value=oe}function W(){const oe=this.resume(),Se=this.stack[this.stack.length-1];Se.value=oe}function X(){const oe=this.resume(),Se=this.stack[this.stack.length-1];Se.value=oe}function G(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const Se=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=Se,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function J(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const Se=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=Se,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function re(oe){const Se=this.sliceSerialize(oe),Ce=this.stack[this.stack.length-2];Ce.label=J1(Se),Ce.identifier=Cn(Se).toLowerCase()}function H(){const oe=this.stack[this.stack.length-1],Se=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Re=oe.children;Ce.children=Re}else Ce.alt=Se}function D(){const oe=this.resume(),Se=this.stack[this.stack.length-1];Se.url=oe}function L(){const oe=this.resume(),Se=this.stack[this.stack.length-1];Se.title=oe}function U(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function Z(oe){const Se=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=Se,Ce.identifier=Cn(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function pe(oe){this.data.characterReferenceType=oe.type}function me(oe){const Se=this.sliceSerialize(oe),Ce=this.data.characterReferenceType;let Re;Ce?(Re=h_(Se,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Re=Ac(Se);const Me=this.stack[this.stack.length-1];Me.value+=Re}function Y(oe){const Se=this.stack.pop();Se.position.end=yi(oe.end)}function P(oe){j.call(this,oe);const Se=this.stack[this.stack.length-1];Se.url=this.sliceSerialize(oe)}function ae(oe){j.call(this,oe);const Se=this.stack[this.stack.length-1];Se.url="mailto:"+this.sliceSerialize(oe)}function ne(){return{type:"blockquote",children:[]}}function ge(){return{type:"code",lang:null,meta:null,value:""}}function se(){return{type:"inlineCode",value:""}}function Oe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Te(){return{type:"emphasis",children:[]}}function ve(){return{type:"heading",depth:0,children:[]}}function Be(){return{type:"break"}}function ye(){return{type:"html",value:""}}function lt(){return{type:"image",title:null,url:"",alt:null}}function Ye(){return{type:"link",title:null,url:"",children:[]}}function Tt(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function Dt(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function wn(){return{type:"paragraph",children:[]}}function Et(){return{type:"strong",children:[]}}function ht(){return{type:"text",value:""}}function zt(){return{type:"thematicBreak"}}}function yi(n){return{line:n.line,column:n.column,offset:n.offset}}function C_(n,s){let l=-1;for(;++l<s.length;){const a=s[l];Array.isArray(a)?C_(n,a):ib(n,a)}}function ib(n,s){let l;for(l in s)if(b_.call(s,l))switch(l){case"canContainEols":{const a=s[l];a&&n[l].push(...a);break}case"transforms":{const a=s[l];a&&n[l].push(...a);break}case"enter":case"exit":{const a=s[l];a&&Object.assign(n[l],a);break}}}function vm(n,s){throw n?new Error("Cannot close `"+n.type+"` ("+zs({start:n.start,end:n.end})+"): a different token (`"+s.type+"`, "+zs({start:s.start,end:s.end})+") is open"):new Error("Cannot close document, a token (`"+s.type+"`, "+zs({start:s.start,end:s.end})+") is still open")}function rb(n){const s=this;s.parser=l;function l(a){return tb(a,{...s.data("settings"),...n,extensions:s.data("micromarkExtensions")||[],mdastExtensions:s.data("fromMarkdownExtensions")||[]})}}function sb(n,s){const l={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(s),!0)};return n.patch(s,l),n.applyData(s,l)}function lb(n,s){const l={type:"element",tagName:"br",properties:{},children:[]};return n.patch(s,l),[n.applyData(s,l),{type:"text",value:`
|
|
64
|
+
`}]}function ab(n,s){const l=s.value?s.value+`
|
|
65
|
+
`:"",a={},v=s.lang?s.lang.split(/\s+/):[];v.length>0&&(a.className=["language-"+v[0]]);let C={type:"element",tagName:"code",properties:a,children:[{type:"text",value:l}]};return s.meta&&(C.data={meta:s.meta}),n.patch(s,C),C=n.applyData(s,C),C={type:"element",tagName:"pre",properties:{},children:[C]},n.patch(s,C),C}function ob(n,s){const l={type:"element",tagName:"del",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function ub(n,s){const l={type:"element",tagName:"em",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function cb(n,s){const l=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",a=String(s.identifier).toUpperCase(),v=Nr(a.toLowerCase()),C=n.footnoteOrder.indexOf(a);let m,o=n.footnoteCounts.get(a);o===void 0?(o=0,n.footnoteOrder.push(a),m=n.footnoteOrder.length):m=C+1,o+=1,n.footnoteCounts.set(a,o);const u={type:"element",tagName:"a",properties:{href:"#"+l+"fn-"+v,id:l+"fnref-"+v+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(m)}]};n.patch(s,u);const h={type:"element",tagName:"sup",properties:{},children:[u]};return n.patch(s,h),n.applyData(s,h)}function hb(n,s){const l={type:"element",tagName:"h"+s.depth,properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function fb(n,s){if(n.options.allowDangerousHtml){const l={type:"raw",value:s.value};return n.patch(s,l),n.applyData(s,l)}}function w_(n,s){const l=s.referenceType;let a="]";if(l==="collapsed"?a+="[]":l==="full"&&(a+="["+(s.label||s.identifier)+"]"),s.type==="imageReference")return[{type:"text",value:"!["+s.alt+a}];const v=n.all(s),C=v[0];C&&C.type==="text"?C.value="["+C.value:v.unshift({type:"text",value:"["});const m=v[v.length-1];return m&&m.type==="text"?m.value+=a:v.push({type:"text",value:a}),v}function db(n,s){const l=String(s.identifier).toUpperCase(),a=n.definitionById.get(l);if(!a)return w_(n,s);const v={src:Nr(a.url||""),alt:s.alt};a.title!==null&&a.title!==void 0&&(v.title=a.title);const C={type:"element",tagName:"img",properties:v,children:[]};return n.patch(s,C),n.applyData(s,C)}function pb(n,s){const l={src:Nr(s.url)};s.alt!==null&&s.alt!==void 0&&(l.alt=s.alt),s.title!==null&&s.title!==void 0&&(l.title=s.title);const a={type:"element",tagName:"img",properties:l,children:[]};return n.patch(s,a),n.applyData(s,a)}function mb(n,s){const l={type:"text",value:s.value.replace(/\r?\n|\r/g," ")};n.patch(s,l);const a={type:"element",tagName:"code",properties:{},children:[l]};return n.patch(s,a),n.applyData(s,a)}function _b(n,s){const l=String(s.identifier).toUpperCase(),a=n.definitionById.get(l);if(!a)return w_(n,s);const v={href:Nr(a.url||"")};a.title!==null&&a.title!==void 0&&(v.title=a.title);const C={type:"element",tagName:"a",properties:v,children:n.all(s)};return n.patch(s,C),n.applyData(s,C)}function gb(n,s){const l={href:Nr(s.url)};s.title!==null&&s.title!==void 0&&(l.title=s.title);const a={type:"element",tagName:"a",properties:l,children:n.all(s)};return n.patch(s,a),n.applyData(s,a)}function vb(n,s,l){const a=n.all(s),v=l?Sb(l):x_(s),C={},m=[];if(typeof s.checked=="boolean"){const d=a[0];let c;d&&d.type==="element"&&d.tagName==="p"?c=d:(c={type:"element",tagName:"p",properties:{},children:[]},a.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:s.checked,disabled:!0},children:[]}),C.className=["task-list-item"]}let o=-1;for(;++o<a.length;){const d=a[o];(v||o!==0||d.type!=="element"||d.tagName!=="p")&&m.push({type:"text",value:`
|
|
66
|
+
`}),d.type==="element"&&d.tagName==="p"&&!v?m.push(...d.children):m.push(d)}const u=a[a.length-1];u&&(v||u.type!=="element"||u.tagName!=="p")&&m.push({type:"text",value:`
|
|
67
|
+
`});const h={type:"element",tagName:"li",properties:C,children:m};return n.patch(s,h),n.applyData(s,h)}function Sb(n){let s=!1;if(n.type==="list"){s=n.spread||!1;const l=n.children;let a=-1;for(;!s&&++a<l.length;)s=x_(l[a])}return s}function x_(n){const s=n.spread;return s??n.children.length>1}function yb(n,s){const l={},a=n.all(s);let v=-1;for(typeof s.start=="number"&&s.start!==1&&(l.start=s.start);++v<a.length;){const m=a[v];if(m.type==="element"&&m.tagName==="li"&&m.properties&&Array.isArray(m.properties.className)&&m.properties.className.includes("task-list-item")){l.className=["contains-task-list"];break}}const C={type:"element",tagName:s.ordered?"ol":"ul",properties:l,children:n.wrap(a,!0)};return n.patch(s,C),n.applyData(s,C)}function bb(n,s){const l={type:"element",tagName:"p",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function Cb(n,s){const l={type:"root",children:n.wrap(n.all(s))};return n.patch(s,l),n.applyData(s,l)}function wb(n,s){const l={type:"element",tagName:"strong",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}function xb(n,s){const l=n.all(s),a=l.shift(),v=[];if(a){const m={type:"element",tagName:"thead",properties:{},children:n.wrap([a],!0)};n.patch(s.children[0],m),v.push(m)}if(l.length>0){const m={type:"element",tagName:"tbody",properties:{},children:n.wrap(l,!0)},o=Cc(s.children[1]),u=i_(s.children[s.children.length-1]);o&&u&&(m.position={start:o,end:u}),v.push(m)}const C={type:"element",tagName:"table",properties:{},children:n.wrap(v,!0)};return n.patch(s,C),n.applyData(s,C)}function Eb(n,s,l){const a=l?l.children:void 0,C=(a?a.indexOf(s):1)===0?"th":"td",m=l&&l.type==="table"?l.align:void 0,o=m?m.length:s.children.length;let u=-1;const h=[];for(;++u<o;){const c=s.children[u],b={},w=m?m[u]:void 0;w&&(b.align=w);let k={type:"element",tagName:C,properties:b,children:[]};c&&(k.children=n.all(c),n.patch(c,k),k=n.applyData(c,k)),h.push(k)}const d={type:"element",tagName:"tr",properties:{},children:n.wrap(h,!0)};return n.patch(s,d),n.applyData(s,d)}function kb(n,s){const l={type:"element",tagName:"td",properties:{},children:n.all(s)};return n.patch(s,l),n.applyData(s,l)}const Sm=9,ym=32;function Ab(n){const s=String(n),l=/\r?\n|\r/g;let a=l.exec(s),v=0;const C=[];for(;a;)C.push(bm(s.slice(v,a.index),v>0,!0),a[0]),v=a.index+a[0].length,a=l.exec(s);return C.push(bm(s.slice(v),v>0,!1)),C.join("")}function bm(n,s,l){let a=0,v=n.length;if(s){let C=n.codePointAt(a);for(;C===Sm||C===ym;)a++,C=n.codePointAt(a)}if(l){let C=n.codePointAt(v-1);for(;C===Sm||C===ym;)v--,C=n.codePointAt(v-1)}return v>a?n.slice(a,v):""}function Tb(n,s){const l={type:"text",value:Ab(String(s.value))};return n.patch(s,l),n.applyData(s,l)}function Db(n,s){const l={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(s,l),n.applyData(s,l)}const Rb={blockquote:sb,break:lb,code:ab,delete:ob,emphasis:ub,footnoteReference:cb,heading:hb,html:fb,imageReference:db,image:pb,inlineCode:mb,linkReference:_b,link:gb,listItem:vb,list:yb,paragraph:bb,root:Cb,strong:wb,table:xb,tableCell:kb,tableRow:Eb,text:Tb,thematicBreak:Db,toml:ia,yaml:ia,definition:ia,footnoteDefinition:ia};function ia(){}const E_=-1,_a=0,Ns=1,ha=2,Dc=3,Rc=4,Mc=5,Lc=6,k_=7,A_=8,Mb=typeof self=="object"?self:globalThis,Cm=(n,s)=>{switch(n){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+n)}return new Mb[n](s)},Lb=(n,s)=>{const l=(v,C)=>(n.set(C,v),v),a=v=>{if(n.has(v))return n.get(v);const[C,m]=s[v];switch(C){case _a:case E_:return l(m,v);case Ns:{const o=l([],v);for(const u of m)o.push(a(u));return o}case ha:{const o=l({},v);for(const[u,h]of m)o[a(u)]=a(h);return o}case Dc:return l(new Date(m),v);case Rc:{const{source:o,flags:u}=m;return l(new RegExp(o,u),v)}case Mc:{const o=l(new Map,v);for(const[u,h]of m)o.set(a(u),a(h));return o}case Lc:{const o=l(new Set,v);for(const u of m)o.add(a(u));return o}case k_:{const{name:o,message:u}=m;return l(Cm(o,u),v)}case A_:return l(BigInt(m),v);case"BigInt":return l(Object(BigInt(m)),v);case"ArrayBuffer":return l(new Uint8Array(m).buffer,m);case"DataView":{const{buffer:o}=new Uint8Array(m);return l(new DataView(o),m)}}return l(Cm(C,m),v)};return a},wm=n=>Lb(new Map,n)(0),Mr="",{toString:Ob}={},{keys:Bb}=Object,Bs=n=>{const s=typeof n;if(s!=="object"||!n)return[_a,s];const l=Ob.call(n).slice(8,-1);switch(l){case"Array":return[Ns,Mr];case"Object":return[ha,Mr];case"Date":return[Dc,Mr];case"RegExp":return[Rc,Mr];case"Map":return[Mc,Mr];case"Set":return[Lc,Mr];case"DataView":return[Ns,l]}return l.includes("Array")?[Ns,l]:l.includes("Error")?[k_,l]:[ha,l]},ra=([n,s])=>n===_a&&(s==="function"||s==="symbol"),zb=(n,s,l,a)=>{const v=(m,o)=>{const u=a.push(m)-1;return l.set(o,u),u},C=m=>{if(l.has(m))return l.get(m);let[o,u]=Bs(m);switch(o){case _a:{let d=m;switch(u){case"bigint":o=A_,d=m.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return v([E_],m)}return v([o,d],m)}case Ns:{if(u){let b=m;return u==="DataView"?b=new Uint8Array(m.buffer):u==="ArrayBuffer"&&(b=new Uint8Array(m)),v([u,[...b]],m)}const d=[],c=v([o,d],m);for(const b of m)d.push(C(b));return c}case ha:{if(u)switch(u){case"BigInt":return v([u,m.toString()],m);case"Boolean":case"Number":case"String":return v([u,m.valueOf()],m)}if(s&&"toJSON"in m)return C(m.toJSON());const d=[],c=v([o,d],m);for(const b of Bb(m))(n||!ra(Bs(m[b])))&&d.push([C(b),C(m[b])]);return c}case Dc:return v([o,m.toISOString()],m);case Rc:{const{source:d,flags:c}=m;return v([o,{source:d,flags:c}],m)}case Mc:{const d=[],c=v([o,d],m);for(const[b,w]of m)(n||!(ra(Bs(b))||ra(Bs(w))))&&d.push([C(b),C(w)]);return c}case Lc:{const d=[],c=v([o,d],m);for(const b of m)(n||!ra(Bs(b)))&&d.push(C(b));return c}}const{message:h}=m;return v([o,{name:u,message:h}],m)};return C},xm=(n,{json:s,lossy:l}={})=>{const a=[];return zb(!(s||l),!!s,new Map,a)(n),a},fa=typeof structuredClone=="function"?(n,s)=>s&&("json"in s||"lossy"in s)?wm(xm(n,s)):structuredClone(n):(n,s)=>wm(xm(n,s));function Hb(n,s){const l=[{type:"text",value:"↩"}];return s>1&&l.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(s)}]}),l}function Nb(n,s){return"Back to reference "+(n+1)+(s>1?"-"+s:"")}function jb(n){const s=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",l=n.options.footnoteBackContent||Hb,a=n.options.footnoteBackLabel||Nb,v=n.options.footnoteLabel||"Footnotes",C=n.options.footnoteLabelTagName||"h2",m=n.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<n.footnoteOrder.length;){const h=n.footnoteById.get(n.footnoteOrder[u]);if(!h)continue;const d=n.all(h),c=String(h.identifier).toUpperCase(),b=Nr(c.toLowerCase());let w=0;const k=[],x=n.footnoteCounts.get(c);for(;x!==void 0&&++w<=x;){k.length>0&&k.push({type:"text",value:" "});let p=typeof l=="string"?l:l(u,w);typeof p=="string"&&(p={type:"text",value:p}),k.push({type:"element",tagName:"a",properties:{href:"#"+s+"fnref-"+b+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(u,w),className:["data-footnote-backref"]},children:Array.isArray(p)?p:[p]})}const S=d[d.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const p=S.children[S.children.length-1];p&&p.type==="text"?p.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...k)}else d.push(...k);const _={type:"element",tagName:"li",properties:{id:s+"fn-"+b},children:n.wrap(d,!0)};n.patch(h,_),o.push(_)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:C,properties:{...fa(m),id:"footnote-label"},children:[{type:"text",value:v}]},{type:"text",value:`
|
|
68
|
+
`},{type:"element",tagName:"ol",properties:{},children:n.wrap(o,!0)},{type:"text",value:`
|
|
69
|
+
`}]}}const ga=(function(n){if(n==null)return Fb;if(typeof n=="function")return va(n);if(typeof n=="object")return Array.isArray(n)?Ib(n):Ub(n);if(typeof n=="string")return Pb(n);throw new Error("Expected function, string, or object as test")});function Ib(n){const s=[];let l=-1;for(;++l<n.length;)s[l]=ga(n[l]);return va(a);function a(...v){let C=-1;for(;++C<s.length;)if(s[C].apply(this,v))return!0;return!1}}function Ub(n){const s=n;return va(l);function l(a){const v=a;let C;for(C in n)if(v[C]!==s[C])return!1;return!0}}function Pb(n){return va(s);function s(l){return l&&l.type===n}}function va(n){return s;function s(l,a,v){return!!(qb(l)&&n.call(this,l,typeof a=="number"?a:void 0,v||void 0))}}function Fb(){return!0}function qb(n){return n!==null&&typeof n=="object"&&"type"in n}const T_=[],Vb=!0,fc=!1,Gb="skip";function D_(n,s,l,a){let v;typeof s=="function"&&typeof l!="function"?(a=l,l=s):v=s;const C=ga(v),m=a?-1:1;o(n,void 0,[])();function o(u,h,d){const c=u&&typeof u=="object"?u:{};if(typeof c.type=="string"){const w=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(u.type+(w?"<"+w+">":""))+")"})}return b;function b(){let w=T_,k,x,S;if((!s||C(u,h,d[d.length-1]||void 0))&&(w=$b(l(u,d)),w[0]===fc))return w;if("children"in u&&u.children){const _=u;if(_.children&&w[0]!==Gb)for(x=(a?_.children.length:-1)+m,S=d.concat(_);x>-1&&x<_.children.length;){const p=_.children[x];if(k=o(p,x,S)(),k[0]===fc)return k;x=typeof k[1]=="number"?k[1]:x+m}}return w}}}function $b(n){return Array.isArray(n)?n:typeof n=="number"?[Vb,n]:n==null?T_:[n]}function Oc(n,s,l,a){let v,C,m;typeof s=="function"&&typeof l!="function"?(C=void 0,m=s,v=l):(C=s,m=l,v=a),D_(n,C,o,v);function o(u,h){const d=h[h.length-1],c=d?d.children.indexOf(u):void 0;return m(u,c,d)}}const dc={}.hasOwnProperty,Yb={};function Wb(n,s){const l=s||Yb,a=new Map,v=new Map,C=new Map,m={...Rb,...l.handlers},o={all:h,applyData:Xb,definitionById:a,footnoteById:v,footnoteCounts:C,footnoteOrder:[],handlers:m,one:u,options:l,patch:Kb,wrap:Zb};return Oc(n,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const c=d.type==="definition"?a:v,b=String(d.identifier).toUpperCase();c.has(b)||c.set(b,d)}}),o;function u(d,c){const b=d.type,w=o.handlers[b];if(dc.call(o.handlers,b)&&w)return w(o,d,c);if(o.options.passThrough&&o.options.passThrough.includes(b)){if("children"in d){const{children:x,...S}=d,_=fa(S);return _.children=o.all(d),_}return fa(d)}return(o.options.unknownHandler||Qb)(o,d,c)}function h(d){const c=[];if("children"in d){const b=d.children;let w=-1;for(;++w<b.length;){const k=o.one(b[w],d);if(k){if(w&&b[w-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=Em(k.value)),!Array.isArray(k)&&k.type==="element")){const x=k.children[0];x&&x.type==="text"&&(x.value=Em(x.value))}Array.isArray(k)?c.push(...k):c.push(k)}}}return c}}function Kb(n,s){n.position&&(s.position=HS(n))}function Xb(n,s){let l=s;if(n&&n.data){const a=n.data.hName,v=n.data.hChildren,C=n.data.hProperties;if(typeof a=="string")if(l.type==="element")l.tagName=a;else{const m="children"in l?l.children:[l];l={type:"element",tagName:a,properties:{},children:m}}l.type==="element"&&C&&Object.assign(l.properties,fa(C)),"children"in l&&l.children&&v!==null&&v!==void 0&&(l.children=v)}return l}function Qb(n,s){const l=s.data||{},a="value"in s&&!(dc.call(l,"hProperties")||dc.call(l,"hChildren"))?{type:"text",value:s.value}:{type:"element",tagName:"div",properties:{},children:n.all(s)};return n.patch(s,a),n.applyData(s,a)}function Zb(n,s){const l=[];let a=-1;for(s&&l.push({type:"text",value:`
|
|
70
|
+
`});++a<n.length;)a&&l.push({type:"text",value:`
|
|
71
|
+
`}),l.push(n[a]);return s&&n.length>0&&l.push({type:"text",value:`
|
|
72
|
+
`}),l}function Em(n){let s=0,l=n.charCodeAt(s);for(;l===9||l===32;)s++,l=n.charCodeAt(s);return n.slice(s)}function km(n,s){const l=Wb(n,s),a=l.one(n,void 0),v=jb(l),C=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return v&&C.children.push({type:"text",value:`
|
|
73
|
+
`},v),C}function Jb(n,s){return n&&"run"in n?async function(l,a){const v=km(l,{file:a,...s});await n.run(v,a)}:function(l,a){return km(l,{file:a,...n||s})}}function Am(n){if(n)throw n}var Yu,Tm;function eC(){if(Tm)return Yu;Tm=1;var n=Object.prototype.hasOwnProperty,s=Object.prototype.toString,l=Object.defineProperty,a=Object.getOwnPropertyDescriptor,v=function(h){return typeof Array.isArray=="function"?Array.isArray(h):s.call(h)==="[object Array]"},C=function(h){if(!h||s.call(h)!=="[object Object]")return!1;var d=n.call(h,"constructor"),c=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!d&&!c)return!1;var b;for(b in h);return typeof b>"u"||n.call(h,b)},m=function(h,d){l&&d.name==="__proto__"?l(h,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):h[d.name]=d.newValue},o=function(h,d){if(d==="__proto__")if(n.call(h,d)){if(a)return a(h,d).value}else return;return h[d]};return Yu=function u(){var h,d,c,b,w,k,x=arguments[0],S=1,_=arguments.length,p=!1;for(typeof x=="boolean"&&(p=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)c=o(x,d),b=o(h,d),x!==b&&(p&&b&&(C(b)||(w=v(b)))?(w?(w=!1,k=c&&v(c)?c:[]):k=c&&C(c)?c:{},m(x,{name:d,newValue:u(p,k,b)})):typeof b<"u"&&m(x,{name:d,newValue:b}));return x},Yu}var tC=eC();const Wu=Vm(tC);function pc(n){if(typeof n!="object"||n===null)return!1;const s=Object.getPrototypeOf(n);return(s===null||s===Object.prototype||Object.getPrototypeOf(s)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function nC(){const n=[],s={run:l,use:a};return s;function l(...v){let C=-1;const m=v.pop();if(typeof m!="function")throw new TypeError("Expected function as last argument, not "+m);o(null,...v);function o(u,...h){const d=n[++C];let c=-1;if(u){m(u);return}for(;++c<v.length;)(h[c]===null||h[c]===void 0)&&(h[c]=v[c]);v=h,d?iC(d,o)(...h):m(null,...h)}}function a(v){if(typeof v!="function")throw new TypeError("Expected `middelware` to be a function, not "+v);return n.push(v),s}}function iC(n,s){let l;return a;function a(...m){const o=n.length>m.length;let u;o&&m.push(v);try{u=n.apply(this,m)}catch(h){const d=h;if(o&&l)throw d;return v(d)}o||(u&&u.then&&typeof u.then=="function"?u.then(C,v):u instanceof Error?v(u):C(u))}function v(m,...o){l||(l=!0,s(m,...o))}function C(m){v(null,m)}}const Dn={basename:rC,dirname:sC,extname:lC,join:aC,sep:"/"};function rC(n,s){if(s!==void 0&&typeof s!="string")throw new TypeError('"ext" argument must be a string');Fs(n);let l=0,a=-1,v=n.length,C;if(s===void 0||s.length===0||s.length>n.length){for(;v--;)if(n.codePointAt(v)===47){if(C){l=v+1;break}}else a<0&&(C=!0,a=v+1);return a<0?"":n.slice(l,a)}if(s===n)return"";let m=-1,o=s.length-1;for(;v--;)if(n.codePointAt(v)===47){if(C){l=v+1;break}}else m<0&&(C=!0,m=v+1),o>-1&&(n.codePointAt(v)===s.codePointAt(o--)?o<0&&(a=v):(o=-1,a=m));return l===a?a=m:a<0&&(a=n.length),n.slice(l,a)}function sC(n){if(Fs(n),n.length===0)return".";let s=-1,l=n.length,a;for(;--l;)if(n.codePointAt(l)===47){if(a){s=l;break}}else a||(a=!0);return s<0?n.codePointAt(0)===47?"/":".":s===1&&n.codePointAt(0)===47?"//":n.slice(0,s)}function lC(n){Fs(n);let s=n.length,l=-1,a=0,v=-1,C=0,m;for(;s--;){const o=n.codePointAt(s);if(o===47){if(m){a=s+1;break}continue}l<0&&(m=!0,l=s+1),o===46?v<0?v=s:C!==1&&(C=1):v>-1&&(C=-1)}return v<0||l<0||C===0||C===1&&v===l-1&&v===a+1?"":n.slice(v,l)}function aC(...n){let s=-1,l;for(;++s<n.length;)Fs(n[s]),n[s]&&(l=l===void 0?n[s]:l+"/"+n[s]);return l===void 0?".":oC(l)}function oC(n){Fs(n);const s=n.codePointAt(0)===47;let l=uC(n,!s);return l.length===0&&!s&&(l="."),l.length>0&&n.codePointAt(n.length-1)===47&&(l+="/"),s?"/"+l:l}function uC(n,s){let l="",a=0,v=-1,C=0,m=-1,o,u;for(;++m<=n.length;){if(m<n.length)o=n.codePointAt(m);else{if(o===47)break;o=47}if(o===47){if(!(v===m-1||C===1))if(v!==m-1&&C===2){if(l.length<2||a!==2||l.codePointAt(l.length-1)!==46||l.codePointAt(l.length-2)!==46){if(l.length>2){if(u=l.lastIndexOf("/"),u!==l.length-1){u<0?(l="",a=0):(l=l.slice(0,u),a=l.length-1-l.lastIndexOf("/")),v=m,C=0;continue}}else if(l.length>0){l="",a=0,v=m,C=0;continue}}s&&(l=l.length>0?l+"/..":"..",a=2)}else l.length>0?l+="/"+n.slice(v+1,m):l=n.slice(v+1,m),a=m-v-1;v=m,C=0}else o===46&&C>-1?C++:C=-1}return l}function Fs(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const cC={cwd:hC};function hC(){return"/"}function mc(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function fC(n){if(typeof n=="string")n=new URL(n);else if(!mc(n)){const s=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw s.code="ERR_INVALID_ARG_TYPE",s}if(n.protocol!=="file:"){const s=new TypeError("The URL must be of scheme file");throw s.code="ERR_INVALID_URL_SCHEME",s}return dC(n)}function dC(n){if(n.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const s=n.pathname;let l=-1;for(;++l<s.length;)if(s.codePointAt(l)===37&&s.codePointAt(l+1)===50){const a=s.codePointAt(l+2);if(a===70||a===102){const v=new TypeError("File URL path must not include encoded / characters");throw v.code="ERR_INVALID_FILE_URL_PATH",v}}return decodeURIComponent(s)}const Ku=["history","path","basename","stem","extname","dirname"];class R_{constructor(s){let l;s?mc(s)?l={path:s}:typeof s=="string"||pC(s)?l={value:s}:l=s:l={},this.cwd="cwd"in l?"":cC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Ku.length;){const C=Ku[a];C in l&&l[C]!==void 0&&l[C]!==null&&(this[C]=C==="history"?[...l[C]]:l[C])}let v;for(v in l)Ku.includes(v)||(this[v]=l[v])}get basename(){return typeof this.path=="string"?Dn.basename(this.path):void 0}set basename(s){Qu(s,"basename"),Xu(s,"basename"),this.path=Dn.join(this.dirname||"",s)}get dirname(){return typeof this.path=="string"?Dn.dirname(this.path):void 0}set dirname(s){Dm(this.basename,"dirname"),this.path=Dn.join(s||"",this.basename)}get extname(){return typeof this.path=="string"?Dn.extname(this.path):void 0}set extname(s){if(Xu(s,"extname"),Dm(this.dirname,"extname"),s){if(s.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(s.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Dn.join(this.dirname,this.stem+(s||""))}get path(){return this.history[this.history.length-1]}set path(s){mc(s)&&(s=fC(s)),Qu(s,"path"),this.path!==s&&this.history.push(s)}get stem(){return typeof this.path=="string"?Dn.basename(this.path,this.extname):void 0}set stem(s){Qu(s,"stem"),Xu(s,"stem"),this.path=Dn.join(this.dirname||"",s+(this.extname||""))}fail(s,l,a){const v=this.message(s,l,a);throw v.fatal=!0,v}info(s,l,a){const v=this.message(s,l,a);return v.fatal=void 0,v}message(s,l,a){const v=new It(s,l,a);return this.path&&(v.name=this.path+":"+v.name,v.file=this.path),v.fatal=!1,this.messages.push(v),v}toString(s){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(s||void 0).decode(this.value)}}function Xu(n,s){if(n&&n.includes(Dn.sep))throw new Error("`"+s+"` cannot be a path: did not expect `"+Dn.sep+"`")}function Qu(n,s){if(!n)throw new Error("`"+s+"` cannot be empty")}function Dm(n,s){if(!n)throw new Error("Setting `"+s+"` requires `path` to be set too")}function pC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const mC=(function(n){const a=this.constructor.prototype,v=a[n],C=function(){return v.apply(C,arguments)};return Object.setPrototypeOf(C,a),C}),_C={}.hasOwnProperty;class Bc extends mC{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=nC()}copy(){const s=new Bc;let l=-1;for(;++l<this.attachers.length;){const a=this.attachers[l];s.use(...a)}return s.data(Wu(!0,{},this.namespace)),s}data(s,l){return typeof s=="string"?arguments.length===2?(ec("data",this.frozen),this.namespace[s]=l,this):_C.call(this.namespace,s)&&this.namespace[s]||void 0:s?(ec("data",this.frozen),this.namespace=s,this):this.namespace}freeze(){if(this.frozen)return this;const s=this;for(;++this.freezeIndex<this.attachers.length;){const[l,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const v=l.call(s,...a);typeof v=="function"&&this.transformers.use(v)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(s){this.freeze();const l=sa(s),a=this.parser||this.Parser;return Zu("parse",a),a(String(l),l)}process(s,l){const a=this;return this.freeze(),Zu("process",this.parser||this.Parser),Ju("process",this.compiler||this.Compiler),l?v(void 0,l):new Promise(v);function v(C,m){const o=sa(s),u=a.parse(o);a.run(u,o,function(d,c,b){if(d||!c||!b)return h(d);const w=c,k=a.stringify(w,b);SC(k)?b.value=k:b.result=k,h(d,b)});function h(d,c){d||!c?m(d):C?C(c):l(void 0,c)}}}processSync(s){let l=!1,a;return this.freeze(),Zu("processSync",this.parser||this.Parser),Ju("processSync",this.compiler||this.Compiler),this.process(s,v),Mm("processSync","process",l),a;function v(C,m){l=!0,Am(C),a=m}}run(s,l,a){Rm(s),this.freeze();const v=this.transformers;return!a&&typeof l=="function"&&(a=l,l=void 0),a?C(void 0,a):new Promise(C);function C(m,o){const u=sa(l);v.run(s,u,h);function h(d,c,b){const w=c||s;d?o(d):m?m(w):a(void 0,w,b)}}}runSync(s,l){let a=!1,v;return this.run(s,l,C),Mm("runSync","run",a),v;function C(m,o){Am(m),v=o,a=!0}}stringify(s,l){this.freeze();const a=sa(l),v=this.compiler||this.Compiler;return Ju("stringify",v),Rm(s),v(s,a)}use(s,...l){const a=this.attachers,v=this.namespace;if(ec("use",this.frozen),s!=null)if(typeof s=="function")u(s,l);else if(typeof s=="object")Array.isArray(s)?o(s):m(s);else throw new TypeError("Expected usable value, not `"+s+"`");return this;function C(h){if(typeof h=="function")u(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[d,...c]=h;u(d,c)}else m(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function m(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");o(h.plugins),h.settings&&(v.settings=Wu(!0,v.settings,h.settings))}function o(h){let d=-1;if(h!=null)if(Array.isArray(h))for(;++d<h.length;){const c=h[d];C(c)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function u(h,d){let c=-1,b=-1;for(;++c<a.length;)if(a[c][0]===h){b=c;break}if(b===-1)a.push([h,...d]);else if(d.length>0){let[w,...k]=d;const x=a[b][1];pc(x)&&pc(w)&&(w=Wu(!0,x,w)),a[b]=[h,w,...k]}}}}const gC=new Bc().freeze();function Zu(n,s){if(typeof s!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function Ju(n,s){if(typeof s!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function ec(n,s){if(s)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Rm(n){if(!pc(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function Mm(n,s,l){if(!l)throw new Error("`"+n+"` finished async. Use `"+s+"` instead")}function sa(n){return vC(n)?n:new R_(n)}function vC(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function SC(n){return typeof n=="string"||yC(n)}function yC(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const bC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Lm=[],Om={allowDangerousHtml:!0},CC=/^(https?|ircs?|mailto|xmpp)$/i,wC=[{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 xC(n){const s=EC(n),l=kC(n);return AC(s.runSync(s.parse(l),l),n)}function EC(n){const s=n.rehypePlugins||Lm,l=n.remarkPlugins||Lm,a=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...Om}:Om;return gC().use(rb).use(l).use(Jb,a).use(s)}function kC(n){const s=n.children||"",l=new R_;return typeof s=="string"&&(l.value=s),l}function AC(n,s){const l=s.allowedElements,a=s.allowElement,v=s.components,C=s.disallowedElements,m=s.skipHtml,o=s.unwrapDisallowed,u=s.urlTransform||TC;for(const d of wC)Object.hasOwn(s,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+bC+d.id,void 0);return Oc(n,h),PS(n,{Fragment:N.Fragment,components:v,ignoreInvalidStyle:!0,jsx:N.jsx,jsxs:N.jsxs,passKeys:!0,passNode:!0});function h(d,c,b){if(d.type==="raw"&&b&&typeof c=="number")return m?b.children.splice(c,1):b.children[c]={type:"text",value:d.value},c;if(d.type==="element"){let w;for(w in Vu)if(Object.hasOwn(Vu,w)&&Object.hasOwn(d.properties,w)){const k=d.properties[w],x=Vu[w];(x===null||x.includes(d.tagName))&&(d.properties[w]=u(String(k||""),w,d))}}if(d.type==="element"){let w=l?!l.includes(d.tagName):C?C.includes(d.tagName):!1;if(!w&&a&&typeof c=="number"&&(w=!a(d,c,b)),w&&b&&typeof c=="number")return o&&d.children?b.children.splice(c,1,...d.children):b.children.splice(c,1),c}}}function TC(n){const s=n.indexOf(":"),l=n.indexOf("?"),a=n.indexOf("#"),v=n.indexOf("/");return s===-1||v!==-1&&s>v||l!==-1&&s>l||a!==-1&&s>a||CC.test(n.slice(0,s))?n:""}function Bm(n,s){const l=String(n);if(typeof s!="string")throw new TypeError("Expected character");let a=0,v=l.indexOf(s);for(;v!==-1;)a++,v=l.indexOf(s,v+s.length);return a}function DC(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function RC(n,s,l){const v=ga((l||{}).ignore||[]),C=MC(s);let m=-1;for(;++m<C.length;)D_(n,"text",o);function o(h,d){let c=-1,b;for(;++c<d.length;){const w=d[c],k=b?b.children:void 0;if(v(w,k?k.indexOf(w):void 0,b))return;b=w}if(b)return u(h,d)}function u(h,d){const c=d[d.length-1],b=C[m][0],w=C[m][1];let k=0;const S=c.children.indexOf(h);let _=!1,p=[];b.lastIndex=0;let g=b.exec(h.value);for(;g;){const E=g.index,M={index:g.index,input:g.input,stack:[...d,h]};let T=w(...g,M);if(typeof T=="string"&&(T=T.length>0?{type:"text",value:T}:void 0),T===!1?b.lastIndex=E+1:(k!==E&&p.push({type:"text",value:h.value.slice(k,E)}),Array.isArray(T)?p.push(...T):T&&p.push(T),k=E+g[0].length,_=!0),!b.global)break;g=b.exec(h.value)}return _?(k<h.value.length&&p.push({type:"text",value:h.value.slice(k)}),c.children.splice(S,1,...p)):p=[h],S+p.length}}function MC(n){const s=[];if(!Array.isArray(n))throw new TypeError("Expected find and replace tuple or list of tuples");const l=!n[0]||Array.isArray(n[0])?n:[n];let a=-1;for(;++a<l.length;){const v=l[a];s.push([LC(v[0]),OC(v[1])])}return s}function LC(n){return typeof n=="string"?new RegExp(DC(n),"g"):n}function OC(n){return typeof n=="function"?n:function(){return n}}const tc="phrasing",nc=["autolink","link","image","label"];function BC(){return{transforms:[PC],enter:{literalAutolink:HC,literalAutolinkEmail:ic,literalAutolinkHttp:ic,literalAutolinkWww:ic},exit:{literalAutolink:UC,literalAutolinkEmail:IC,literalAutolinkHttp:NC,literalAutolinkWww:jC}}}function zC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:tc,notInConstruct:nc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:tc,notInConstruct:nc},{character:":",before:"[ps]",after:"\\/",inConstruct:tc,notInConstruct:nc}]}}function HC(n){this.enter({type:"link",title:null,url:"",children:[]},n)}function ic(n){this.config.enter.autolinkProtocol.call(this,n)}function NC(n){this.config.exit.autolinkProtocol.call(this,n)}function jC(n){this.config.exit.data.call(this,n);const s=this.stack[this.stack.length-1];s.type,s.url="http://"+this.sliceSerialize(n)}function IC(n){this.config.exit.autolinkEmail.call(this,n)}function UC(n){this.exit(n)}function PC(n){RC(n,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,FC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),qC]],{ignore:["link","linkReference"]})}function FC(n,s,l,a,v){let C="";if(!M_(v)||(/^w/i.test(s)&&(l=s+l,s="",C="http://"),!VC(l)))return!1;const m=GC(l+a);if(!m[0])return!1;const o={type:"link",title:null,url:C+s+m[0],children:[{type:"text",value:s+m[0]}]};return m[1]?[o,{type:"text",value:m[1]}]:o}function qC(n,s,l,a){return!M_(a,!0)||/[-\d_]$/.test(l)?!1:{type:"link",title:null,url:"mailto:"+s+"@"+l,children:[{type:"text",value:s+"@"+l}]}}function VC(n){const s=n.split(".");return!(s.length<2||s[s.length-1]&&(/_/.test(s[s.length-1])||!/[a-zA-Z\d]/.test(s[s.length-1]))||s[s.length-2]&&(/_/.test(s[s.length-2])||!/[a-zA-Z\d]/.test(s[s.length-2])))}function GC(n){const s=/[!"&'),.:;<>?\]}]+$/.exec(n);if(!s)return[n,void 0];n=n.slice(0,s.index);let l=s[0],a=l.indexOf(")");const v=Bm(n,"(");let C=Bm(n,")");for(;a!==-1&&v>C;)n+=l.slice(0,a+1),l=l.slice(a+1),a=l.indexOf(")"),C++;return[n,l]}function M_(n,s){const l=n.input.charCodeAt(n.index-1);return(n.index===0||qi(l)||pa(l))&&(!s||l!==47)}L_.peek=ew;function $C(){this.buffer()}function YC(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function WC(){this.buffer()}function KC(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function XC(n){const s=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=Cn(this.sliceSerialize(n)).toLowerCase(),l.label=s}function QC(n){this.exit(n)}function ZC(n){const s=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=Cn(this.sliceSerialize(n)).toLowerCase(),l.label=s}function JC(n){this.exit(n)}function ew(){return"["}function L_(n,s,l,a){const v=l.createTracker(a);let C=v.move("[^");const m=l.enter("footnoteReference"),o=l.enter("reference");return C+=v.move(l.safe(l.associationId(n),{after:"]",before:C})),o(),m(),C+=v.move("]"),C}function tw(){return{enter:{gfmFootnoteCallString:$C,gfmFootnoteCall:YC,gfmFootnoteDefinitionLabelString:WC,gfmFootnoteDefinition:KC},exit:{gfmFootnoteCallString:XC,gfmFootnoteCall:QC,gfmFootnoteDefinitionLabelString:ZC,gfmFootnoteDefinition:JC}}}function nw(n){let s=!1;return n&&n.firstLineBlank&&(s=!0),{handlers:{footnoteDefinition:l,footnoteReference:L_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function l(a,v,C,m){const o=C.createTracker(m);let u=o.move("[^");const h=C.enter("footnoteDefinition"),d=C.enter("label");return u+=o.move(C.safe(C.associationId(a),{before:u,after:"]"})),d(),u+=o.move("]:"),a.children&&a.children.length>0&&(o.shift(4),u+=o.move((s?`
|
|
74
|
+
`:" ")+C.indentLines(C.containerFlow(a,o.current()),s?O_:iw))),h(),u}}function iw(n,s,l){return s===0?n:O_(n,s,l)}function O_(n,s,l){return(l?"":" ")+n}const rw=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];B_.peek=uw;function sw(){return{canContainEols:["delete"],enter:{strikethrough:aw},exit:{strikethrough:ow}}}function lw(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:rw}],handlers:{delete:B_}}}function aw(n){this.enter({type:"delete",children:[]},n)}function ow(n){this.exit(n)}function B_(n,s,l,a){const v=l.createTracker(a),C=l.enter("strikethrough");let m=v.move("~~");return m+=l.containerPhrasing(n,{...v.current(),before:m,after:"~"}),m+=v.move("~~"),C(),m}function uw(){return"~"}function cw(n){return n.length}function hw(n,s){const l=s||{},a=(l.align||[]).concat(),v=l.stringLength||cw,C=[],m=[],o=[],u=[];let h=0,d=-1;for(;++d<n.length;){const x=[],S=[];let _=-1;for(n[d].length>h&&(h=n[d].length);++_<n[d].length;){const p=fw(n[d][_]);if(l.alignDelimiters!==!1){const g=v(p);S[_]=g,(u[_]===void 0||g>u[_])&&(u[_]=g)}x.push(p)}m[d]=x,o[d]=S}let c=-1;if(typeof a=="object"&&"length"in a)for(;++c<h;)C[c]=zm(a[c]);else{const x=zm(a);for(;++c<h;)C[c]=x}c=-1;const b=[],w=[];for(;++c<h;){const x=C[c];let S="",_="";x===99?(S=":",_=":"):x===108?S=":":x===114&&(_=":");let p=l.alignDelimiters===!1?1:Math.max(1,u[c]-S.length-_.length);const g=S+"-".repeat(p)+_;l.alignDelimiters!==!1&&(p=S.length+p+_.length,p>u[c]&&(u[c]=p),w[c]=p),b[c]=g}m.splice(1,0,b),o.splice(1,0,w),d=-1;const k=[];for(;++d<m.length;){const x=m[d],S=o[d];c=-1;const _=[];for(;++c<h;){const p=x[c]||"";let g="",E="";if(l.alignDelimiters!==!1){const M=u[c]-(S[c]||0),T=C[c];T===114?g=" ".repeat(M):T===99?M%2?(g=" ".repeat(M/2+.5),E=" ".repeat(M/2-.5)):(g=" ".repeat(M/2),E=g):E=" ".repeat(M)}l.delimiterStart!==!1&&!c&&_.push("|"),l.padding!==!1&&!(l.alignDelimiters===!1&&p==="")&&(l.delimiterStart!==!1||c)&&_.push(" "),l.alignDelimiters!==!1&&_.push(g),_.push(p),l.alignDelimiters!==!1&&_.push(E),l.padding!==!1&&_.push(" "),(l.delimiterEnd!==!1||c!==h-1)&&_.push("|")}k.push(l.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return k.join(`
|
|
75
|
+
`)}function fw(n){return n==null?"":String(n)}function zm(n){const s=typeof n=="string"?n.codePointAt(0):0;return s===67||s===99?99:s===76||s===108?108:s===82||s===114?114:0}function dw(n,s,l,a){const v=l.enter("blockquote"),C=l.createTracker(a);C.move("> "),C.shift(2);const m=l.indentLines(l.containerFlow(n,C.current()),pw);return v(),m}function pw(n,s,l){return">"+(l?"":" ")+n}function mw(n,s){return Hm(n,s.inConstruct,!0)&&!Hm(n,s.notInConstruct,!1)}function Hm(n,s,l){if(typeof s=="string"&&(s=[s]),!s||s.length===0)return l;let a=-1;for(;++a<s.length;)if(n.includes(s[a]))return!0;return!1}function Nm(n,s,l,a){let v=-1;for(;++v<l.unsafe.length;)if(l.unsafe[v].character===`
|
|
76
|
+
`&&mw(l.stack,l.unsafe[v]))return/[ \t]/.test(a.before)?"":" ";return`\\
|
|
77
|
+
`}function _w(n,s){const l=String(n);let a=l.indexOf(s),v=a,C=0,m=0;if(typeof s!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===v?++C>m&&(m=C):C=1,v=a+s.length,a=l.indexOf(s,v);return m}function gw(n,s){return!!(s.options.fences===!1&&n.value&&!n.lang&&/[^ \r\n]/.test(n.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(n.value))}function vw(n){const s=n.options.fence||"`";if(s!=="`"&&s!=="~")throw new Error("Cannot serialize code with `"+s+"` for `options.fence`, expected `` ` `` or `~`");return s}function Sw(n,s,l,a){const v=vw(l),C=n.value||"",m=v==="`"?"GraveAccent":"Tilde";if(gw(n,l)){const c=l.enter("codeIndented"),b=l.indentLines(C,yw);return c(),b}const o=l.createTracker(a),u=v.repeat(Math.max(_w(C,v)+1,3)),h=l.enter("codeFenced");let d=o.move(u);if(n.lang){const c=l.enter(`codeFencedLang${m}`);d+=o.move(l.safe(n.lang,{before:d,after:" ",encode:["`"],...o.current()})),c()}if(n.lang&&n.meta){const c=l.enter(`codeFencedMeta${m}`);d+=o.move(" "),d+=o.move(l.safe(n.meta,{before:d,after:`
|
|
78
|
+
`,encode:["`"],...o.current()})),c()}return d+=o.move(`
|
|
79
|
+
`),C&&(d+=o.move(C+`
|
|
80
|
+
`)),d+=o.move(u),h(),d}function yw(n,s,l){return(l?"":" ")+n}function zc(n){const s=n.options.quote||'"';if(s!=='"'&&s!=="'")throw new Error("Cannot serialize title with `"+s+"` for `options.quote`, expected `\"`, or `'`");return s}function bw(n,s,l,a){const v=zc(l),C=v==='"'?"Quote":"Apostrophe",m=l.enter("definition");let o=l.enter("label");const u=l.createTracker(a);let h=u.move("[");return h+=u.move(l.safe(l.associationId(n),{before:h,after:"]",...u.current()})),h+=u.move("]: "),o(),!n.url||/[\0- \u007F]/.test(n.url)?(o=l.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(l.safe(n.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(o=l.enter("destinationRaw"),h+=u.move(l.safe(n.url,{before:h,after:n.title?" ":`
|
|
81
|
+
`,...u.current()}))),o(),n.title&&(o=l.enter(`title${C}`),h+=u.move(" "+v),h+=u.move(l.safe(n.title,{before:h,after:v,...u.current()})),h+=u.move(v),o()),m(),h}function Cw(n){const s=n.options.emphasis||"*";if(s!=="*"&&s!=="_")throw new Error("Cannot serialize emphasis with `"+s+"` for `options.emphasis`, expected `*`, or `_`");return s}function Is(n){return"&#x"+n.toString(16).toUpperCase()+";"}function da(n,s,l){const a=zr(n),v=zr(s);return a===void 0?v===void 0?l==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:v===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?v===void 0?{inside:!1,outside:!1}:v===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:v===void 0?{inside:!1,outside:!1}:v===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}z_.peek=ww;function z_(n,s,l,a){const v=Cw(l),C=l.enter("emphasis"),m=l.createTracker(a),o=m.move(v);let u=m.move(l.containerPhrasing(n,{after:v,before:o,...m.current()}));const h=u.charCodeAt(0),d=da(a.before.charCodeAt(a.before.length-1),h,v);d.inside&&(u=Is(h)+u.slice(1));const c=u.charCodeAt(u.length-1),b=da(a.after.charCodeAt(0),c,v);b.inside&&(u=u.slice(0,-1)+Is(c));const w=m.move(v);return C(),l.attentionEncodeSurroundingInfo={after:b.outside,before:d.outside},o+u+w}function ww(n,s,l){return l.options.emphasis||"*"}function xw(n,s){let l=!1;return Oc(n,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return l=!0,fc}),!!((!n.depth||n.depth<3)&&kc(n)&&(s.options.setext||l))}function Ew(n,s,l,a){const v=Math.max(Math.min(6,n.depth||1),1),C=l.createTracker(a);if(xw(n,l)){const d=l.enter("headingSetext"),c=l.enter("phrasing"),b=l.containerPhrasing(n,{...C.current(),before:`
|
|
82
|
+
`,after:`
|
|
83
|
+
`});return c(),d(),b+`
|
|
84
|
+
`+(v===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
85
|
+
`))+1))}const m="#".repeat(v),o=l.enter("headingAtx"),u=l.enter("phrasing");C.move(m+" ");let h=l.containerPhrasing(n,{before:"# ",after:`
|
|
86
|
+
`,...C.current()});return/^[\t ]/.test(h)&&(h=Is(h.charCodeAt(0))+h.slice(1)),h=h?m+" "+h:m,l.options.closeAtx&&(h+=" "+m),u(),o(),h}H_.peek=kw;function H_(n){return n.value||""}function kw(){return"<"}N_.peek=Aw;function N_(n,s,l,a){const v=zc(l),C=v==='"'?"Quote":"Apostrophe",m=l.enter("image");let o=l.enter("label");const u=l.createTracker(a);let h=u.move("![");return h+=u.move(l.safe(n.alt,{before:h,after:"]",...u.current()})),h+=u.move("]("),o(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(o=l.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(l.safe(n.url,{before:h,after:">",...u.current()})),h+=u.move(">")):(o=l.enter("destinationRaw"),h+=u.move(l.safe(n.url,{before:h,after:n.title?" ":")",...u.current()}))),o(),n.title&&(o=l.enter(`title${C}`),h+=u.move(" "+v),h+=u.move(l.safe(n.title,{before:h,after:v,...u.current()})),h+=u.move(v),o()),h+=u.move(")"),m(),h}function Aw(){return"!"}j_.peek=Tw;function j_(n,s,l,a){const v=n.referenceType,C=l.enter("imageReference");let m=l.enter("label");const o=l.createTracker(a);let u=o.move("![");const h=l.safe(n.alt,{before:u,after:"]",...o.current()});u+=o.move(h+"]["),m();const d=l.stack;l.stack=[],m=l.enter("reference");const c=l.safe(l.associationId(n),{before:u,after:"]",...o.current()});return m(),l.stack=d,C(),v==="full"||!h||h!==c?u+=o.move(c+"]"):v==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function Tw(){return"!"}I_.peek=Dw;function I_(n,s,l){let a=n.value||"",v="`",C=-1;for(;new RegExp("(^|[^`])"+v+"([^`]|$)").test(a);)v+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++C<l.unsafe.length;){const m=l.unsafe[C],o=l.compilePattern(m);let u;if(m.atBreak)for(;u=o.exec(a);){let h=u.index;a.charCodeAt(h)===10&&a.charCodeAt(h-1)===13&&h--,a=a.slice(0,h)+" "+a.slice(u.index+1)}}return v+a+v}function Dw(){return"`"}function U_(n,s){const l=kc(n);return!!(!s.options.resourceLink&&n.url&&!n.title&&n.children&&n.children.length===1&&n.children[0].type==="text"&&(l===n.url||"mailto:"+l===n.url)&&/^[a-z][a-z+.-]+:/i.test(n.url)&&!/[\0- <>\u007F]/.test(n.url))}P_.peek=Rw;function P_(n,s,l,a){const v=zc(l),C=v==='"'?"Quote":"Apostrophe",m=l.createTracker(a);let o,u;if(U_(n,l)){const d=l.stack;l.stack=[],o=l.enter("autolink");let c=m.move("<");return c+=m.move(l.containerPhrasing(n,{before:c,after:">",...m.current()})),c+=m.move(">"),o(),l.stack=d,c}o=l.enter("link"),u=l.enter("label");let h=m.move("[");return h+=m.move(l.containerPhrasing(n,{before:h,after:"](",...m.current()})),h+=m.move("]("),u(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(u=l.enter("destinationLiteral"),h+=m.move("<"),h+=m.move(l.safe(n.url,{before:h,after:">",...m.current()})),h+=m.move(">")):(u=l.enter("destinationRaw"),h+=m.move(l.safe(n.url,{before:h,after:n.title?" ":")",...m.current()}))),u(),n.title&&(u=l.enter(`title${C}`),h+=m.move(" "+v),h+=m.move(l.safe(n.title,{before:h,after:v,...m.current()})),h+=m.move(v),u()),h+=m.move(")"),o(),h}function Rw(n,s,l){return U_(n,l)?"<":"["}F_.peek=Mw;function F_(n,s,l,a){const v=n.referenceType,C=l.enter("linkReference");let m=l.enter("label");const o=l.createTracker(a);let u=o.move("[");const h=l.containerPhrasing(n,{before:u,after:"]",...o.current()});u+=o.move(h+"]["),m();const d=l.stack;l.stack=[],m=l.enter("reference");const c=l.safe(l.associationId(n),{before:u,after:"]",...o.current()});return m(),l.stack=d,C(),v==="full"||!h||h!==c?u+=o.move(c+"]"):v==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function Mw(){return"["}function Hc(n){const s=n.options.bullet||"*";if(s!=="*"&&s!=="+"&&s!=="-")throw new Error("Cannot serialize items with `"+s+"` for `options.bullet`, expected `*`, `+`, or `-`");return s}function Lw(n){const s=Hc(n),l=n.options.bulletOther;if(!l)return s==="*"?"-":"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(l===s)throw new Error("Expected `bullet` (`"+s+"`) and `bulletOther` (`"+l+"`) to be different");return l}function Ow(n){const s=n.options.bulletOrdered||".";if(s!=="."&&s!==")")throw new Error("Cannot serialize items with `"+s+"` for `options.bulletOrdered`, expected `.` or `)`");return s}function q_(n){const s=n.options.rule||"*";if(s!=="*"&&s!=="-"&&s!=="_")throw new Error("Cannot serialize rules with `"+s+"` for `options.rule`, expected `*`, `-`, or `_`");return s}function Bw(n,s,l,a){const v=l.enter("list"),C=l.bulletCurrent;let m=n.ordered?Ow(l):Hc(l);const o=n.ordered?m==="."?")":".":Lw(l);let u=s&&l.bulletLastUsed?m===l.bulletLastUsed:!1;if(!n.ordered){const d=n.children?n.children[0]:void 0;if((m==="*"||m==="-")&&d&&(!d.children||!d.children[0])&&l.stack[l.stack.length-1]==="list"&&l.stack[l.stack.length-2]==="listItem"&&l.stack[l.stack.length-3]==="list"&&l.stack[l.stack.length-4]==="listItem"&&l.indexStack[l.indexStack.length-1]===0&&l.indexStack[l.indexStack.length-2]===0&&l.indexStack[l.indexStack.length-3]===0&&(u=!0),q_(l)===m&&d){let c=-1;for(;++c<n.children.length;){const b=n.children[c];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(m=o),l.bulletCurrent=m;const h=l.containerFlow(n,a);return l.bulletLastUsed=m,l.bulletCurrent=C,v(),h}function zw(n){const s=n.options.listItemIndent||"one";if(s!=="tab"&&s!=="one"&&s!=="mixed")throw new Error("Cannot serialize items with `"+s+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return s}function Hw(n,s,l,a){const v=zw(l);let C=l.bulletCurrent||Hc(l);s&&s.type==="list"&&s.ordered&&(C=(typeof s.start=="number"&&s.start>-1?s.start:1)+(l.options.incrementListMarker===!1?0:s.children.indexOf(n))+C);let m=C.length+1;(v==="tab"||v==="mixed"&&(s&&s.type==="list"&&s.spread||n.spread))&&(m=Math.ceil(m/4)*4);const o=l.createTracker(a);o.move(C+" ".repeat(m-C.length)),o.shift(m);const u=l.enter("listItem"),h=l.indentLines(l.containerFlow(n,o.current()),d);return u(),h;function d(c,b,w){return b?(w?"":" ".repeat(m))+c:(w?C:C+" ".repeat(m-C.length))+c}}function Nw(n,s,l,a){const v=l.enter("paragraph"),C=l.enter("phrasing"),m=l.containerPhrasing(n,a);return C(),v(),m}const jw=ga(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Iw(n,s,l,a){return(n.children.some(function(m){return jw(m)})?l.containerPhrasing:l.containerFlow).call(l,n,a)}function Uw(n){const s=n.options.strong||"*";if(s!=="*"&&s!=="_")throw new Error("Cannot serialize strong with `"+s+"` for `options.strong`, expected `*`, or `_`");return s}V_.peek=Pw;function V_(n,s,l,a){const v=Uw(l),C=l.enter("strong"),m=l.createTracker(a),o=m.move(v+v);let u=m.move(l.containerPhrasing(n,{after:v,before:o,...m.current()}));const h=u.charCodeAt(0),d=da(a.before.charCodeAt(a.before.length-1),h,v);d.inside&&(u=Is(h)+u.slice(1));const c=u.charCodeAt(u.length-1),b=da(a.after.charCodeAt(0),c,v);b.inside&&(u=u.slice(0,-1)+Is(c));const w=m.move(v+v);return C(),l.attentionEncodeSurroundingInfo={after:b.outside,before:d.outside},o+u+w}function Pw(n,s,l){return l.options.strong||"*"}function Fw(n,s,l,a){return l.safe(n.value,a)}function qw(n){const s=n.options.ruleRepetition||3;if(s<3)throw new Error("Cannot serialize rules with repetition `"+s+"` for `options.ruleRepetition`, expected `3` or more");return s}function Vw(n,s,l){const a=(q_(l)+(l.options.ruleSpaces?" ":"")).repeat(qw(l));return l.options.ruleSpaces?a.slice(0,-1):a}const G_={blockquote:dw,break:Nm,code:Sw,definition:bw,emphasis:z_,hardBreak:Nm,heading:Ew,html:H_,image:N_,imageReference:j_,inlineCode:I_,link:P_,linkReference:F_,list:Bw,listItem:Hw,paragraph:Nw,root:Iw,strong:V_,text:Fw,thematicBreak:Vw};function Gw(){return{enter:{table:$w,tableData:jm,tableHeader:jm,tableRow:Ww},exit:{codeText:Kw,table:Yw,tableData:rc,tableHeader:rc,tableRow:rc}}}function $w(n){const s=n._align;this.enter({type:"table",align:s.map(function(l){return l==="none"?null:l}),children:[]},n),this.data.inTable=!0}function Yw(n){this.exit(n),this.data.inTable=void 0}function Ww(n){this.enter({type:"tableRow",children:[]},n)}function rc(n){this.exit(n)}function jm(n){this.enter({type:"tableCell",children:[]},n)}function Kw(n){let s=this.resume();this.data.inTable&&(s=s.replace(/\\([\\|])/g,Xw));const l=this.stack[this.stack.length-1];l.type,l.value=s,this.exit(n)}function Xw(n,s){return s==="|"?s:n}function Qw(n){const s=n||{},l=s.tableCellPadding,a=s.tablePipeAlign,v=s.stringLength,C=l?" ":"|";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:b,table:m,tableCell:u,tableRow:o}};function m(w,k,x,S){return h(d(w,x,S),w.align)}function o(w,k,x,S){const _=c(w,x,S),p=h([_]);return p.slice(0,p.indexOf(`
|
|
88
|
+
`))}function u(w,k,x,S){const _=x.enter("tableCell"),p=x.enter("phrasing"),g=x.containerPhrasing(w,{...S,before:C,after:C});return p(),_(),g}function h(w,k){return hw(w,{align:k,alignDelimiters:a,padding:l,stringLength:v})}function d(w,k,x){const S=w.children;let _=-1;const p=[],g=k.enter("table");for(;++_<S.length;)p[_]=c(S[_],k,x);return g(),p}function c(w,k,x){const S=w.children;let _=-1;const p=[],g=k.enter("tableRow");for(;++_<S.length;)p[_]=u(S[_],w,k,x);return g(),p}function b(w,k,x){let S=G_.inlineCode(w,k,x);return x.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Zw(){return{exit:{taskListCheckValueChecked:Im,taskListCheckValueUnchecked:Im,paragraph:ex}}}function Jw(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:tx}}}function Im(n){const s=this.stack[this.stack.length-2];s.type,s.checked=n.type==="taskListCheckValueChecked"}function ex(n){const s=this.stack[this.stack.length-2];if(s&&s.type==="listItem"&&typeof s.checked=="boolean"){const l=this.stack[this.stack.length-1];l.type;const a=l.children[0];if(a&&a.type==="text"){const v=s.children;let C=-1,m;for(;++C<v.length;){const o=v[C];if(o.type==="paragraph"){m=o;break}}m===l&&(a.value=a.value.slice(1),a.value.length===0?l.children.shift():l.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,l.position.start=Object.assign({},a.position.start)))}}this.exit(n)}function tx(n,s,l,a){const v=n.children[0],C=typeof n.checked=="boolean"&&v&&v.type==="paragraph",m="["+(n.checked?"x":" ")+"] ",o=l.createTracker(a);C&&o.move(m);let u=G_.listItem(n,s,l,{...a,...o.current()});return C&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),u;function h(d){return d+m}}function nx(){return[BC(),tw(),sw(),Gw(),Zw()]}function ix(n){return{extensions:[zC(),nw(n),lw(),Qw(n),Jw()]}}const rx={tokenize:cx,partial:!0},$_={tokenize:hx,partial:!0},Y_={tokenize:fx,partial:!0},W_={tokenize:dx,partial:!0},sx={tokenize:px,partial:!0},K_={name:"wwwAutolink",tokenize:ox,previous:Q_},X_={name:"protocolAutolink",tokenize:ux,previous:Z_},Kn={name:"emailAutolink",tokenize:ax,previous:J_},Rn={};function lx(){return{text:Rn}}let Pi=48;for(;Pi<123;)Rn[Pi]=Kn,Pi++,Pi===58?Pi=65:Pi===91&&(Pi=97);Rn[43]=Kn;Rn[45]=Kn;Rn[46]=Kn;Rn[95]=Kn;Rn[72]=[Kn,X_];Rn[104]=[Kn,X_];Rn[87]=[Kn,K_];Rn[119]=[Kn,K_];function ax(n,s,l){const a=this;let v,C;return m;function m(c){return!_c(c)||!J_.call(a,a.previous)||Nc(a.events)?l(c):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),o(c))}function o(c){return _c(c)?(n.consume(c),o):c===64?(n.consume(c),u):l(c)}function u(c){return c===46?n.check(sx,d,h)(c):c===45||c===95||jt(c)?(C=!0,n.consume(c),u):d(c)}function h(c){return n.consume(c),v=!0,u}function d(c){return C&&v&&Pt(a.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),s(c)):l(c)}}function ox(n,s,l){const a=this;return v;function v(m){return m!==87&&m!==119||!Q_.call(a,a.previous)||Nc(a.events)?l(m):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(rx,n.attempt($_,n.attempt(Y_,C),l),l)(m))}function C(m){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),s(m)}}function ux(n,s,l){const a=this;let v="",C=!1;return m;function m(c){return(c===72||c===104)&&Z_.call(a,a.previous)&&!Nc(a.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),v+=String.fromCodePoint(c),n.consume(c),o):l(c)}function o(c){if(Pt(c)&&v.length<5)return v+=String.fromCodePoint(c),n.consume(c),o;if(c===58){const b=v.toLowerCase();if(b==="http"||b==="https")return n.consume(c),u}return l(c)}function u(c){return c===47?(n.consume(c),C?h:(C=!0,u)):l(c)}function h(c){return c===null||ca(c)||st(c)||qi(c)||pa(c)?l(c):n.attempt($_,n.attempt(Y_,d),l)(c)}function d(c){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),s(c)}}function cx(n,s,l){let a=0;return v;function v(m){return(m===87||m===119)&&a<3?(a++,n.consume(m),v):m===46&&a===3?(n.consume(m),C):l(m)}function C(m){return m===null?l(m):s(m)}}function hx(n,s,l){let a,v,C;return m;function m(h){return h===46||h===95?n.check(W_,u,o)(h):h===null||st(h)||qi(h)||h!==45&&pa(h)?u(h):(C=!0,n.consume(h),m)}function o(h){return h===95?a=!0:(v=a,a=void 0),n.consume(h),m}function u(h){return v||a||!C?l(h):s(h)}}function fx(n,s){let l=0,a=0;return v;function v(m){return m===40?(l++,n.consume(m),v):m===41&&a<l?C(m):m===33||m===34||m===38||m===39||m===41||m===42||m===44||m===46||m===58||m===59||m===60||m===63||m===93||m===95||m===126?n.check(W_,s,C)(m):m===null||st(m)||qi(m)?s(m):(n.consume(m),v)}function C(m){return m===41&&a++,n.consume(m),v}}function dx(n,s,l){return a;function a(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(n.consume(o),a):o===38?(n.consume(o),C):o===93?(n.consume(o),v):o===60||o===null||st(o)||qi(o)?s(o):l(o)}function v(o){return o===null||o===40||o===91||st(o)||qi(o)?s(o):a(o)}function C(o){return Pt(o)?m(o):l(o)}function m(o){return o===59?(n.consume(o),a):Pt(o)?(n.consume(o),m):l(o)}}function px(n,s,l){return a;function a(C){return n.consume(C),v}function v(C){return jt(C)?l(C):s(C)}}function Q_(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||st(n)}function Z_(n){return!Pt(n)}function J_(n){return!(n===47||_c(n))}function _c(n){return n===43||n===45||n===46||n===95||jt(n)}function Nc(n){let s=n.length,l=!1;for(;s--;){const a=n[s][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){l=!0;break}if(a._gfmAutolinkLiteralWalkedInto){l=!1;break}}return n.length>0&&!l&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),l}const mx={tokenize:wx,partial:!0};function _x(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:yx,continuation:{tokenize:bx},exit:Cx}},text:{91:{name:"gfmFootnoteCall",tokenize:Sx},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:gx,resolveTo:vx}}}}function gx(n,s,l){const a=this;let v=a.events.length;const C=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let m;for(;v--;){const u=a.events[v][1];if(u.type==="labelImage"){m=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!m||!m._balanced)return l(u);const h=Cn(a.sliceSerialize({start:m.end,end:a.now()}));return h.codePointAt(0)!==94||!C.includes(h.slice(1))?l(u):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),s(u))}}function vx(n,s){let l=n.length;for(;l--;)if(n[l][1].type==="labelImage"&&n[l][0]==="enter"){n[l][1];break}n[l+1][1].type="data",n[l+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},n[l+3][1].start),end:Object.assign({},n[n.length-1][1].end)},v={type:"gfmFootnoteCallMarker",start:Object.assign({},n[l+3][1].end),end:Object.assign({},n[l+3][1].end)};v.end.column++,v.end.offset++,v.end._bufferIndex++;const C={type:"gfmFootnoteCallString",start:Object.assign({},v.end),end:Object.assign({},n[n.length-1][1].start)},m={type:"chunkString",contentType:"string",start:Object.assign({},C.start),end:Object.assign({},C.end)},o=[n[l+1],n[l+2],["enter",a,s],n[l+3],n[l+4],["enter",v,s],["exit",v,s],["enter",C,s],["enter",m,s],["exit",m,s],["exit",C,s],n[n.length-2],n[n.length-1],["exit",a,s]];return n.splice(l,n.length-l+1,...o),n}function Sx(n,s,l){const a=this,v=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let C=0,m;return o;function o(c){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(c),n.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?l(c):(n.enter("gfmFootnoteCallMarker"),n.consume(c),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",h)}function h(c){if(C>999||c===93&&!m||c===null||c===91||st(c))return l(c);if(c===93){n.exit("chunkString");const b=n.exit("gfmFootnoteCallString");return v.includes(Cn(a.sliceSerialize(b)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(c),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),s):l(c)}return st(c)||(m=!0),C++,n.consume(c),c===92?d:h}function d(c){return c===91||c===92||c===93?(n.consume(c),C++,h):h(c)}}function yx(n,s,l){const a=this,v=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let C,m=0,o;return u;function u(k){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",d):l(k)}function d(k){if(m>999||k===93&&!o||k===null||k===91||st(k))return l(k);if(k===93){n.exit("chunkString");const x=n.exit("gfmFootnoteDefinitionLabelString");return C=Cn(a.sliceSerialize(x)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(k),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),b}return st(k)||(o=!0),m++,n.consume(k),k===92?c:d}function c(k){return k===91||k===92||k===93?(n.consume(k),m++,d):d(k)}function b(k){return k===58?(n.enter("definitionMarker"),n.consume(k),n.exit("definitionMarker"),v.includes(C)||v.push(C),$e(n,w,"gfmFootnoteDefinitionWhitespace")):l(k)}function w(k){return s(k)}}function bx(n,s,l){return n.check(Ps,s,n.attempt(mx,s,l))}function Cx(n){n.exit("gfmFootnoteDefinition")}function wx(n,s,l){const a=this;return $e(n,v,"gfmFootnoteDefinitionIndent",5);function v(C){const m=a.events[a.events.length-1];return m&&m[1].type==="gfmFootnoteDefinitionIndent"&&m[2].sliceSerialize(m[1],!0).length===4?s(C):l(C)}}function xx(n){let l=(n||{}).singleTilde;const a={name:"strikethrough",tokenize:C,resolveAll:v};return l==null&&(l=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function v(m,o){let u=-1;for(;++u<m.length;)if(m[u][0]==="enter"&&m[u][1].type==="strikethroughSequenceTemporary"&&m[u][1]._close){let h=u;for(;h--;)if(m[h][0]==="exit"&&m[h][1].type==="strikethroughSequenceTemporary"&&m[h][1]._open&&m[u][1].end.offset-m[u][1].start.offset===m[h][1].end.offset-m[h][1].start.offset){m[u][1].type="strikethroughSequence",m[h][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},m[h][1].start),end:Object.assign({},m[u][1].end)},c={type:"strikethroughText",start:Object.assign({},m[h][1].end),end:Object.assign({},m[u][1].start)},b=[["enter",d,o],["enter",m[h][1],o],["exit",m[h][1],o],["enter",c,o]],w=o.parser.constructs.insideSpan.null;w&&ln(b,b.length,0,ma(w,m.slice(h+1,u),o)),ln(b,b.length,0,[["exit",c,o],["enter",m[u][1],o],["exit",m[u][1],o],["exit",d,o]]),ln(m,h-1,u-h+3,b),u=h+b.length-2;break}}for(u=-1;++u<m.length;)m[u][1].type==="strikethroughSequenceTemporary"&&(m[u][1].type="data");return m}function C(m,o,u){const h=this.previous,d=this.events;let c=0;return b;function b(k){return h===126&&d[d.length-1][1].type!=="characterEscape"?u(k):(m.enter("strikethroughSequenceTemporary"),w(k))}function w(k){const x=zr(h);if(k===126)return c>1?u(k):(m.consume(k),c++,w);if(c<2&&!l)return u(k);const S=m.exit("strikethroughSequenceTemporary"),_=zr(k);return S._open=!_||_===2&&!!x,S._close=!x||x===2&&!!_,o(k)}}}class Ex{constructor(){this.map=[]}add(s,l,a){kx(this,s,l,a)}consume(s){if(this.map.sort(function(C,m){return C[0]-m[0]}),this.map.length===0)return;let l=this.map.length;const a=[];for(;l>0;)l-=1,a.push(s.slice(this.map[l][0]+this.map[l][1]),this.map[l][2]),s.length=this.map[l][0];a.push(s.slice()),s.length=0;let v=a.pop();for(;v;){for(const C of v)s.push(C);v=a.pop()}this.map.length=0}}function kx(n,s,l,a){let v=0;if(!(l===0&&a.length===0)){for(;v<n.map.length;){if(n.map[v][0]===s){n.map[v][1]+=l,n.map[v][2].push(...a);return}v+=1}n.map.push([s,l,a])}}function Ax(n,s){let l=!1;const a=[];for(;s<n.length;){const v=n[s];if(l){if(v[0]==="enter")v[1].type==="tableContent"&&a.push(n[s+1][1].type==="tableDelimiterMarker"?"left":"none");else if(v[1].type==="tableContent"){if(n[s-1][1].type==="tableDelimiterMarker"){const C=a.length-1;a[C]=a[C]==="left"?"center":"right"}}else if(v[1].type==="tableDelimiterRow")break}else v[0]==="enter"&&v[1].type==="tableDelimiterRow"&&(l=!0);s+=1}return a}function Tx(){return{flow:{null:{name:"table",tokenize:Dx,resolveAll:Rx}}}}function Dx(n,s,l){const a=this;let v=0,C=0,m;return o;function o(j){let F=a.events.length-1;for(;F>-1;){const W=a.events[F][1].type;if(W==="lineEnding"||W==="linePrefix")F--;else break}const V=F>-1?a.events[F][1].type:null,q=V==="tableHead"||V==="tableRow"?T:u;return q===T&&a.parser.lazy[a.now().line]?l(j):q(j)}function u(j){return n.enter("tableHead"),n.enter("tableRow"),h(j)}function h(j){return j===124||(m=!0,C+=1),d(j)}function d(j){return j===null?l(j):Ae(j)?C>1?(C=0,a.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(j),n.exit("lineEnding"),w):l(j):Fe(j)?$e(n,d,"whitespace")(j):(C+=1,m&&(m=!1,v+=1),j===124?(n.enter("tableCellDivider"),n.consume(j),n.exit("tableCellDivider"),m=!0,d):(n.enter("data"),c(j)))}function c(j){return j===null||j===124||st(j)?(n.exit("data"),d(j)):(n.consume(j),j===92?b:c)}function b(j){return j===92||j===124?(n.consume(j),c):c(j)}function w(j){return a.interrupt=!1,a.parser.lazy[a.now().line]?l(j):(n.enter("tableDelimiterRow"),m=!1,Fe(j)?$e(n,k,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):k(j))}function k(j){return j===45||j===58?S(j):j===124?(m=!0,n.enter("tableCellDivider"),n.consume(j),n.exit("tableCellDivider"),x):M(j)}function x(j){return Fe(j)?$e(n,S,"whitespace")(j):S(j)}function S(j){return j===58?(C+=1,m=!0,n.enter("tableDelimiterMarker"),n.consume(j),n.exit("tableDelimiterMarker"),_):j===45?(C+=1,_(j)):j===null||Ae(j)?E(j):M(j)}function _(j){return j===45?(n.enter("tableDelimiterFiller"),p(j)):M(j)}function p(j){return j===45?(n.consume(j),p):j===58?(m=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(j),n.exit("tableDelimiterMarker"),g):(n.exit("tableDelimiterFiller"),g(j))}function g(j){return Fe(j)?$e(n,E,"whitespace")(j):E(j)}function E(j){return j===124?k(j):j===null||Ae(j)?!m||v!==C?M(j):(n.exit("tableDelimiterRow"),n.exit("tableHead"),s(j)):M(j)}function M(j){return l(j)}function T(j){return n.enter("tableRow"),O(j)}function O(j){return j===124?(n.enter("tableCellDivider"),n.consume(j),n.exit("tableCellDivider"),O):j===null||Ae(j)?(n.exit("tableRow"),s(j)):Fe(j)?$e(n,O,"whitespace")(j):(n.enter("data"),A(j))}function A(j){return j===null||j===124||st(j)?(n.exit("data"),O(j)):(n.consume(j),j===92?B:A)}function B(j){return j===92||j===124?(n.consume(j),A):A(j)}}function Rx(n,s){let l=-1,a=!0,v=0,C=[0,0,0,0],m=[0,0,0,0],o=!1,u=0,h,d,c;const b=new Ex;for(;++l<n.length;){const w=n[l],k=w[1];w[0]==="enter"?k.type==="tableHead"?(o=!1,u!==0&&(Um(b,s,u,h,d),d=void 0,u=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(l,0,[["enter",h,s]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(a=!0,c=void 0,C=[0,0,0,0],m=[0,l+1,0,0],o&&(o=!1,d={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(l,0,[["enter",d,s]])),v=k.type==="tableDelimiterRow"?2:d?3:1):v&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(a=!1,m[2]===0&&(C[1]!==0&&(m[0]=m[1],c=la(b,s,C,v,void 0,c),C=[0,0,0,0]),m[2]=l)):k.type==="tableCellDivider"&&(a?a=!1:(C[1]!==0&&(m[0]=m[1],c=la(b,s,C,v,void 0,c)),C=m,m=[C[1],l,0,0])):k.type==="tableHead"?(o=!0,u=l):k.type==="tableRow"||k.type==="tableDelimiterRow"?(u=l,C[1]!==0?(m[0]=m[1],c=la(b,s,C,v,l,c)):m[1]!==0&&(c=la(b,s,m,v,l,c)),v=0):v&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(m[3]=l)}for(u!==0&&Um(b,s,u,h,d),b.consume(s.events),l=-1;++l<s.events.length;){const w=s.events[l];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=Ax(s.events,l))}return n}function la(n,s,l,a,v,C){const m=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",o="tableContent";l[0]!==0&&(C.end=Object.assign({},Lr(s.events,l[0])),n.add(l[0],0,[["exit",C,s]]));const u=Lr(s.events,l[1]);if(C={type:m,start:Object.assign({},u),end:Object.assign({},u)},n.add(l[1],0,[["enter",C,s]]),l[2]!==0){const h=Lr(s.events,l[2]),d=Lr(s.events,l[3]),c={type:o,start:Object.assign({},h),end:Object.assign({},d)};if(n.add(l[2],0,[["enter",c,s]]),a!==2){const b=s.events[l[2]],w=s.events[l[3]];if(b[1].end=Object.assign({},w[1].end),b[1].type="chunkText",b[1].contentType="text",l[3]>l[2]+1){const k=l[2]+1,x=l[3]-l[2]-1;n.add(k,x,[])}}n.add(l[3]+1,0,[["exit",c,s]])}return v!==void 0&&(C.end=Object.assign({},Lr(s.events,v)),n.add(v,0,[["exit",C,s]]),C=void 0),C}function Um(n,s,l,a,v){const C=[],m=Lr(s.events,l);v&&(v.end=Object.assign({},m),C.push(["exit",v,s])),a.end=Object.assign({},m),C.push(["exit",a,s]),n.add(l+1,0,C)}function Lr(n,s){const l=n[s],a=l[0]==="enter"?"start":"end";return l[1][a]}const Mx={name:"tasklistCheck",tokenize:Ox};function Lx(){return{text:{91:Mx}}}function Ox(n,s,l){const a=this;return v;function v(u){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?l(u):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(u),n.exit("taskListCheckMarker"),C)}function C(u){return st(u)?(n.enter("taskListCheckValueUnchecked"),n.consume(u),n.exit("taskListCheckValueUnchecked"),m):u===88||u===120?(n.enter("taskListCheckValueChecked"),n.consume(u),n.exit("taskListCheckValueChecked"),m):l(u)}function m(u){return u===93?(n.enter("taskListCheckMarker"),n.consume(u),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),o):l(u)}function o(u){return Ae(u)?s(u):Fe(u)?n.check({tokenize:Bx},s,l)(u):l(u)}}function Bx(n,s,l){return $e(n,a,"whitespace");function a(v){return v===null?l(v):s(v)}}function zx(n){return c_([lx(),_x(),xx(n),Tx(),Lx()])}const Hx={};function Nx(n){const s=this,l=n||Hx,a=s.data(),v=a.micromarkExtensions||(a.micromarkExtensions=[]),C=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),m=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);v.push(zx(l)),C.push(nx()),m.push(ix(l))}const jx=500;function Ix({settings:n,busy:s=!1,promptPreviews:l,testResult:a,onSave:v,onTest:C,onClose:m}){const[o,u]=de.useState(n),[h,d]=de.useState(n.apiKey??"");return de.useEffect(()=>{u(n),d(n.apiKey??"")},[n]),N.jsx("div",{className:"modal-backdrop",children:N.jsxs("section",{className:"translation-settings-modal",role:"dialog","aria-modal":"true","aria-label":"Translation Settings",children:[N.jsxs("header",{children:[N.jsxs("div",{children:[N.jsx("h2",{children:"Translation Settings"}),N.jsx("p",{children:"Use an OpenAI-compatible endpoint for the embedded translation panel."})]}),N.jsx("button",{type:"button",onClick:m,children:"Close"})]}),N.jsxs("div",{className:"translation-settings-grid",children:[N.jsxs("label",{children:[N.jsx("span",{children:"Base URL"}),N.jsx("input",{value:o.baseUrl,onChange:c=>u({...o,baseUrl:c.target.value}),placeholder:"https://api.openai.com/v1"})]}),N.jsxs("label",{children:[N.jsx("span",{children:"API key"}),N.jsx("input",{value:h,onChange:c=>d(c.target.value),placeholder:"API key",autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,type:"text"})]}),N.jsxs("label",{children:[N.jsx("span",{children:"Model"}),N.jsx("input",{value:o.model,onChange:c=>u({...o,model:c.target.value})})]}),N.jsxs("label",{children:[N.jsx("span",{children:"Target language"}),N.jsx("input",{value:o.targetLanguage,onChange:c=>u({...o,targetLanguage:c.target.value})})]}),N.jsxs("label",{children:[N.jsx("span",{children:"Use context"}),N.jsx("input",{checked:o.contextEnabled,type:"checkbox",onChange:c=>u({...o,contextEnabled:c.target.checked})})]}),N.jsxs("label",{children:[N.jsx("span",{children:"Timeout ms"}),N.jsx("input",{min:3e3,type:"number",value:o.requestTimeoutMs,onChange:c=>u({...o,requestTimeoutMs:Number(c.target.value)})})]}),N.jsxs("label",{children:[N.jsx("span",{children:"Temperature"}),N.jsx("input",{min:0,max:1,step:.1,type:"number",value:o.temperature,onChange:c=>u({...o,temperature:Number(c.target.value)})})]})]}),N.jsxs("section",{className:"translation-prompt-settings",children:[N.jsxs("header",{children:[N.jsxs("div",{children:[N.jsx("h3",{children:"Translation Prompts"}),N.jsx("p",{children:"Edit the three cc-pm style prompt slots directly."})]}),N.jsx("button",{type:"button",disabled:s,onClick:()=>u({...o,prompts:void 0}),children:"Reset prompts"})]}),N.jsx("div",{className:"translation-prompt-stack",children:l.map(c=>N.jsxs("label",{children:[N.jsx("span",{children:c.label}),N.jsx("textarea",{value:Px(o,c),onChange:b=>u({...o,prompts:Ux(o.prompts,c.key,b.target.value,c.defaultPrompt)})})]},c.key))})]}),a?N.jsx("div",{className:a.ok?"translation-test-result is-ok":"translation-test-result is-error",children:a.ok?`Connection ok: ${a.model} in ${a.elapsedMs}ms`:a.error}):null,N.jsxs("footer",{children:[N.jsx("button",{type:"button",disabled:s,onClick:C,children:"Test Connection"}),N.jsx("button",{type:"button",disabled:s,onClick:()=>void v({...o,enabled:!0,translateOutput:!0,translateUserInput:!0,inputMode:"review-before-send"},h.trim()),children:"Save"})]})]})})}function Ux(n,s,l,a){const v={...n??{}};return l.trim()&&l!==a?v[s]=l:delete v[s],Object.keys(v).length>0?v:void 0}function Px(n,s){var l;return((l=n.prompts)==null?void 0:l[s.key])??s.defaultPrompt}function Fx({active:n=!0,taskSlug:s,role:l,sessionId:a}){const[v,C]=de.useState(null),[m,o]=de.useState([]),[u,h]=de.useState([]),[d,c]=de.useState(""),[b,w]=de.useState(!1),[k,x]=de.useState(!1),[S,_]=de.useState(!1),[p,g]=de.useState("ready"),[E,M]=de.useState(""),[T,O]=de.useState(Date.now()),[A,B]=de.useState(!1),[j,F]=de.useState(""),[V,q]=de.useState(!1),[W,X]=de.useState([]),[G,J]=de.useState(),[re,H]=de.useState(0),D=de.useRef(n),L=de.useRef(1),U=de.useRef(null);de.useEffect(()=>{D.current=n},[n]),de.useEffect(()=>{Promise.all([ke.getTranslationSettings(),ke.getTranslationPrompts()]).then(([ve,Be])=>{C(ve),X(Be)}).catch(ve=>F(ve.message))},[]),de.useEffect(()=>{o([]),h([]),F(""),g("ready"),M(""),L.current=1;let ve=!1,Be;const ye=()=>{ve||(Be=window.setTimeout(lt,D.current?200:1e3))},lt=async()=>{if(!ve)try{const Ye=await ke.pollTranslationSession(a,L.current);if(ve)return;pe(Ye.events),L.current=Ye.nextCursor,g(Ye.status),D.current&&M(Zx(new Date().toISOString()))}catch(Ye){ve||F(Ye instanceof Error?Ye.message:"Translation poll failed.")}finally{ye()}};return ke.startTranslationSession(s,l).then(Ye=>{ve||(g(Ye.status),L.current=Ye.nextCursor,lt())}).catch(Ye=>{ve||F(Ye instanceof Error?Ye.message:"Translation start failed.")}),()=>{ve=!0,Be!==void 0&&window.clearTimeout(Be)}},[a,s,l,re]),de.useEffect(()=>{var ve;n&&((ve=U.current)==null||ve.scrollIntoView({block:"nearest"}))},[n,m.length]);const z=Gx(m);de.useEffect(()=>{if(!z)return;O(Date.now());const ve=window.setInterval(()=>O(Date.now()),250);return()=>window.clearInterval(ve)},[z]);async function Z(ve=!1){if(v){B(!0),F(""),w(!1);try{const Be=await ke.translateUserInput(s,l,{text:d,mode:ve?"auto-send":"review-before-send",useContext:v.contextEnabled,send:ve});_(Be.contextUsed),Be.sent?(c(""),w(!1)):(c(Be.englishPreview),w(!0))}catch(Be){F(Be instanceof Error?Be.message:"Translation failed.")}finally{B(!1)}}}function pe(ve){if(ve.length===0)return;for(const ye of ve)ye.type==="status"?g(ye.status):ye.type==="error"?F(ye.message):ye.type==="failures"&&h(ye.failures);const Be=ve.filter(ye=>ye.type==="entry");Be.length>0&&o(ye=>{const lt=Be.reduce((Tt,Dt)=>Xx(Tt,Dt.entry),ye),Ye=Yx(lt);return Ye.removedIds.size>0&&h(Tt=>Tt.filter(Dt=>!Ye.removedIds.has(Dt.translationId))),Ye.entries})}async function me(){if(d.trim()){B(!0),F("");try{await ke.sendTranslatedInput(s,l,{englishText:d}),c(""),w(!1),_(!1)}catch(ve){F(ve instanceof Error?ve.message:"Failed to send English input.")}finally{B(!1)}}}function Y(ve){ve.key!=="Enter"||ve.shiftKey||ve.nativeEvent.isComposing||(ve.preventDefault(),!A&&d.trim()&&(b?me():Z(k)))}async function P(ve,Be){B(!0),F("");try{const ye=await ke.updateTranslationSettings({...ve,...Be!==void 0?{apiKey:Be}:{}}),lt=await ke.getTranslationPrompts();C(ye),X(lt),q(!1),H(Ye=>Ye+1)}catch(ye){F(ye instanceof Error?ye.message:"Failed to save translation settings.")}finally{B(!1)}}async function ae(){B(!0),F("");try{J(await ke.testTranslationProvider())}catch(ve){F(ve instanceof Error?ve.message:"Provider test failed.")}finally{B(!1)}}async function ne(){o([]),h([]),L.current=1,await ke.clearTranslationSession(a).catch(ve=>F(ve.message))}async function ge(){B(!0),F("");try{const ve=await ke.ignoreTranslationFailures(a);h(ve.failures)}catch(ve){F(ve instanceof Error?ve.message:"Failed to ignore translation failures.")}finally{B(!1)}}async function se(){B(!0),F("");try{const ve=await ke.retryTranslationFailures(a);h(ve.failures)}catch(ve){F(ve instanceof Error?ve.message:"Failed to retry translation failures.")}finally{B(!1)}}if(!v)return N.jsx("aside",{className:"translation-panel",children:N.jsx("p",{className:"muted",children:"Loading translation settings..."})});const Oe=$x(m,p,T),Te=u.length;return N.jsxs("aside",{className:"translation-panel",children:[N.jsxs("header",{className:"translation-panel-header",children:[N.jsxs("div",{className:"translation-panel-titlebar",children:[N.jsx("h2",{children:"Translation"}),N.jsxs("div",{className:"translation-panel-actions",children:[N.jsx("button",{"aria-pressed":k,className:`auto-send-toggle${k?" is-active":""}`,type:"button",onClick:()=>x(ve=>!ve),children:k?"✅ Auto-send":"× Auto-send"}),Te>0?N.jsxs(N.Fragment,{children:[N.jsxs("button",{type:"button",disabled:A,onClick:()=>void ge(),children:["Ignore ",Te]}),N.jsxs("button",{type:"button",disabled:A,onClick:()=>void se(),children:["Retry ",Te]})]}):null,N.jsx("button",{type:"button",onClick:()=>q(!0),children:"Settings"}),N.jsx("button",{type:"button",onClick:()=>void ne(),children:"Clear"})]})]}),N.jsxs("div",{className:"translation-status-row",children:[N.jsxs("p",{children:[v.model," · ",Oe,S?" · context used":""]}),N.jsx("p",{children:E?`poll ${E}`:"poll -"})]})]}),j?N.jsx("div",{className:"error-banner",children:j}):null,N.jsxs("div",{className:"translation-entry-list",children:[m.length===0?N.jsx("p",{className:"muted",children:"Translated Claude Code output will appear here."}):null,m.map(ve=>N.jsx(qx,{entry:ve},ve.id)),N.jsx("div",{ref:U})]}),N.jsx("div",{className:"translation-composer",children:N.jsxs("div",{className:"translation-composer-row",children:[N.jsx("textarea",{value:d,onChange:ve=>{c(ve.target.value),ve.target.value.trim()||w(!1)},onKeyDown:Y,placeholder:"输入中文,先翻译成英文工程指令..."}),N.jsx("div",{className:"translation-composer-actions",children:N.jsx("button",{type:"button",disabled:A||!b||!d.trim(),onClick:()=>void me(),children:"Send English"})})]})}),V?N.jsx(Ix,{settings:v,busy:A,promptPreviews:W,testResult:G,onSave:P,onTest:ae,onClose:()=>q(!1)}):null]})}function qx({entry:n}){if(n.sourceKind==="conversation-boundary")return N.jsx(Vx,{entry:n});const s=Kx(n),l=n.sourceKind==="tool-output",a=n.direction==="user-input-to-english",v=["translation-entry",`is-${n.sourceKind}`,a?"is-user-input":""].filter(Boolean).join(" ");return N.jsxs("article",{className:v,children:[l?N.jsx("pre",{children:s}):N.jsx("div",{className:"translation-markdown",children:N.jsx(xC,{remarkPlugins:[Nx],children:s})}),n.warning?N.jsx("p",{className:"translation-entry-note",children:n.warning}):null,n.error?N.jsx("p",{className:"translation-entry-note is-error",children:n.error}):null]})}function Vx({entry:n}){const s=n.boundaryKind==="end"?"结束":"开始",l=n.conversationTurn??0,a=Jx(n.occurredAt??n.createdAt);return N.jsxs("div",{className:"translation-conversation-boundary","aria-label":`${s} 第 ${l} 轮 ${a}`,children:[N.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"}),N.jsx("span",{children:s}),N.jsxs("span",{children:["第 ",l," 轮"]}),N.jsx("time",{children:a}),N.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"})]})}function Gx(n){const s=n.find(jc);return(s==null?void 0:s.translationStartedAt)??(s==null?void 0:s.createdAt)}function $x(n,s,l){const a=n.find(jc);if(a)return`translating ${Qx(Math.max(0,l-Wx(a)))}`;const v=n.at(-1);return(v==null?void 0:v.status)==="failed"||s==="failed"?"error":s}function jc(n){return n.status==="queued"||n.status==="translating"}function Yx(n){const s=n.length-jx;if(s<=0)return{entries:n,removedIds:new Set};const l=new Set;for(const a of n){if(l.size>=s)break;jc(a)||l.add(a.id)}return l.size===0?{entries:n,removedIds:l}:{entries:n.filter(a=>!l.has(a.id)),removedIds:l}}function Wx(n){const s=Date.parse(n.translationStartedAt??n.createdAt);return Number.isFinite(s)?s:Date.now()}function Kx(n){return n.status==="queued"||n.status==="translating"?n.sourceText:n.status==="translated"?n.translatedText:n.translatedText||n.sourceText}function Xx(n,s){return n.findIndex(a=>a.id===s.id)===-1?[...n,s]:n.map(a=>a.id===s.id?s:a)}function Qx(n){if(n<1e3)return`${Math.max(.1,n/1e3).toFixed(1)}s`;const s=n/1e3;if(s<60)return`${s.toFixed(1)}s`;const l=Math.floor(s/60),a=Math.floor(s%60).toString().padStart(2,"0");return`${l}:${a}`}function Zx(n){const s=new Date(n);return Number.isNaN(s.getTime())?n:s.toLocaleTimeString()}function Jx(n){const s=new Date(n);return Number.isNaN(s.getTime())?n:s.toLocaleTimeString()}function eE({role:n,session:s,permissionMode:l,model:a,active:v=!0,busy:C,orchestrationMode:m,translationEnabled:o,onPermissionModeChange:u,onModelChange:h,onOrchestrationModeChange:d,onStart:c,onResume:b,onStop:w,onRestart:k,onTerminalEvent:x}){const S=m==="auto";return N.jsxs("section",{className:"session-console",children:[N.jsxs("div",{className:"session-console-top",children:[N.jsx(hS,{role:n,session:s,permissionMode:l,model:a,busy:C,onPermissionModeChange:u,onModelChange:h,onStart:c,onResume:b,onStop:w,onRestart:k}),N.jsx("div",{className:"session-console-actions",children:N.jsx("button",{"aria-label":`Auto orchestration is ${S?"on":"off"}`,"aria-pressed":S,className:`translation-toggle${S?" is-active":""}`,disabled:C,type:"button",onClick:()=>d(S?"manual":"auto"),children:S?"✅ Auto orchestration":"× Auto orchestration"})})]}),(s==null?void 0:s.status)==="running"?N.jsx(tE,{active:v,onTerminalEvent:x,role:n,session:s,taskSlug:s.taskSlug,translationEnabled:o}):N.jsxs("div",{className:"terminal-empty",children:[N.jsx("strong",{children:n}),N.jsx("span",{children:s!=null&&s.claudeSessionId?"Resume this role to reconnect its Claude Code conversation.":"Start this role to open an embedded Claude Code terminal."})]})]})}function tE({active:n,onTerminalEvent:s,role:l,session:a,taskSlug:v,translationEnabled:C}){return N.jsxs("div",{className:C?"session-console-body has-translation":"session-console-body",children:[N.jsx("div",{className:"terminal-pane",children:N.jsx($m,{sessionId:a.id,active:n,onEvent:s},a.id)}),C?N.jsx("div",{className:"translation-pane",children:N.jsx(Fx,{active:n,taskSlug:v,role:l,sessionId:a.id},a.id)}):null]})}function nE(n,s,l){var C;if(!n||l.mode!=="auto")return null;const a=new Map(n.map(m=>[m.id,m])),v=s.filter(m=>{var o;return m.dispatchingAt?((o=a.get(m.id))==null?void 0:o.dispatchingAt)!==m.dispatchingAt:!1});return v.length===0?null:((C=v.sort(iE)[v.length-1])==null?void 0:C.toRole)??null}function iE(n,s){const l=n.dispatchingAt??n.deliveredAt??n.acceptedAt??"",a=s.dispatchingAt??s.deliveredAt??s.acceptedAt??"";return l!==a?l.localeCompare(a):n.createdAt.localeCompare(s.createdAt)}function rE({task:n,activeRole:s,translationEnabled:l,refreshNonce:a=0,onTaskChanged:v,onActiveRoleChange:C,onTranslationEnabledChange:m,onMessagesChanged:o,onOrchestrationChanged:u,onRoundStateChanged:h,onEventsChanged:d,onLaunchStateChanged:c}){const[b,w]=de.useState(null),[k,x]=de.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default"}),[S,_]=de.useState({"project-manager":"default",architect:"default",coder:"default",reviewer:"default"}),[p,g]=de.useState(!1),[E,M]=de.useState(""),[T,O]=de.useState([]),[A,B]=de.useState(null),j=de.useRef(null),F=de.useCallback((D,L)=>{var Z;const U=((Z=j.current)==null?void 0:Z.taskSlug)===n.taskSlug?j.current.messages:null,z=nE(U,D,L);j.current={taskSlug:n.taskSlug,messages:D},B(L),o==null||o(D),u==null||u(L),z&&(C(z),G(`auto switched to ${z} before VCM dispatch`))},[C,o,u,n.taskSlug]),V=de.useCallback((D,L,U,z)=>{w(D),F(L,U),h==null||h(z)},[F,h]),q=de.useCallback(async()=>{const[D,L,U,z]=await Promise.all([ke.getTaskStatus(n.taskSlug),ke.listMessages(n.taskSlug),ke.getOrchestrationState(n.taskSlug),ke.getTaskRoundState(n.taskSlug)]);V(D,L,U,z)},[V,n.taskSlug]);de.useEffect(()=>{q().catch(D=>M(D.message))},[q,a]),de.useEffect(()=>{O([]),d==null||d([])},[d,n.taskSlug]),de.useEffect(()=>{x(D=>{let L=!1;const U={...D};for(const z of(b==null?void 0:b.sessions)??[])U[z.role]!==z.permissionMode&&(U[z.role]=z.permissionMode,L=!0);return L?U:D})},[b==null?void 0:b.sessions]),de.useEffect(()=>{_(D=>{let L=!1;const U={...D};for(const z of(b==null?void 0:b.sessions)??[]){const Z=z.model??"default";U[z.role]!==Z&&(U[z.role]=Z,L=!0)}return L?U:D})},[b==null?void 0:b.sessions]),de.useEffect(()=>{const D=(b==null?void 0:b.sessions)??[],L=new Set(D.map(z=>z.role)),U={};for(const z of Fi)U[z.name]={permissionMode:k[z.name],model:S[z.name]};c==null||c({taskSlug:n.taskSlug,roles:U,autoOrchestration:((A==null?void 0:A.mode)??"manual")==="auto",translationEnabled:l,statusLoaded:!!b,sessionCount:D.length,hasAnySession:D.length>0,allRolesHaveSession:Fi.every(z=>L.has(z.name))})},[S,c,A==null?void 0:A.mode,k,b,n.taskSlug,l]),de.useEffect(()=>{const D=window.setInterval(()=>{Promise.all([ke.getTaskStatus(n.taskSlug),ke.listMessages(n.taskSlug),ke.getOrchestrationState(n.taskSlug),ke.getTaskRoundState(n.taskSlug)]).then(([L,U,z,Z])=>{V(L,U,z,Z)}).catch(L=>M(L.message))},3e3);return()=>window.clearInterval(D)},[V,n.taskSlug]),de.useEffect(()=>{let D=!1,L=!1;const U=window.setInterval(()=>{L||(L=!0,Promise.all([ke.listMessages(n.taskSlug),ke.getOrchestrationState(n.taskSlug)]).then(([z,Z])=>{D||F(z,Z)}).catch(z=>{D||M(z.message)}).finally(()=>{L=!1}))},200);return()=>{D=!0,window.clearInterval(U)}},[F,n.taskSlug]);async function W(D){g(!0),M("");try{await D(),await q(),await v()}catch(L){M(L instanceof Error?L.message:"Action failed.")}finally{g(!1)}}async function X(){const D=n.worktreePath?[`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(`
|
|
89
|
+
`):[`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(`
|
|
90
|
+
`);if(window.confirm(D)){g(!0),M("");try{await ke.cleanupTask(n.taskSlug,{force:!0,deleteBranch:!!n.worktreePath,forceDeleteBranch:!0}),G(`closed ${n.taskSlug}`),await v()}catch(U){M(U instanceof Error?U.message:"Close task failed.")}finally{g(!1)}}}function G(D){O(L=>{const U=[...L,`${new Date().toLocaleTimeString()} ${D}`];return d==null||d(U),U})}function J(D,L){x(U=>({...U,[D]:L}))}function re(D,L){_(U=>({...U,[D]:L}))}async function H(D){g(!0),M("");try{const L=await ke.updateOrchestrationState(n.taskSlug,{mode:D});B(L),u==null||u(L),G(`auto orchestration ${D==="auto"?"enabled":"disabled"}`)}catch(L){M(L instanceof Error?L.message:"Failed to update orchestration mode.")}finally{g(!1)}}return N.jsxs("div",{className:"task-workspace",children:[N.jsxs("header",{className:"workspace-header",children:[N.jsx("div",{className:"workspace-title-line",children:N.jsx("h1",{children:n.title||n.taskSlug})}),N.jsx(cS,{activeRole:s,sessions:(b==null?void 0:b.sessions)??[],onSelect:C}),N.jsxs("div",{className:"workspace-header-actions",children:[N.jsx("button",{"aria-pressed":l,className:`translation-toggle${l?" is-active":""}`,type:"button",onClick:()=>m(!l),children:l?"✅ Translate":"× Translate"}),N.jsx("button",{className:"danger-button",type:"button",disabled:p,onClick:()=>void X(),children:"Close Task"})]})]}),E?N.jsx("div",{className:"error-banner",children:E}):null,N.jsx("div",{className:"workspace-grid",children:N.jsx("div",{className:"workspace-main",children:N.jsx("div",{className:"role-console-stack",children:Fi.map(D=>{const L=D.name,U=L===s,z=Wm((b==null?void 0:b.sessions)??[],L);return N.jsx("div",{className:U?"role-console-panel is-active":"role-console-panel","aria-hidden":!U,children:N.jsx(eE,{role:L,session:z,permissionMode:k[L],model:S[L],active:U,busy:p,orchestrationMode:(A==null?void 0:A.mode)??"manual",translationEnabled:l,onPermissionModeChange:Z=>J(L,Z),onModelChange:Z=>re(L,Z),onOrchestrationModeChange:Z=>void H(Z),onStart:()=>void W(async()=>{await ke.startRoleSession(n.taskSlug,L,{cols:100,rows:28,permissionMode:k[L],model:S[L]}),G(`started ${L} with ${k[L]} / ${S[L]}`)}),onResume:()=>void W(async()=>{await ke.resumeRoleSession(n.taskSlug,L,{cols:100,rows:28,permissionMode:k[L],model:S[L]}),G(`resumed ${L} with ${k[L]} / ${S[L]}`)}),onStop:()=>void W(async()=>{await ke.stopRoleSession(n.taskSlug,L),G(`stopped ${L}`)}),onRestart:()=>void W(async()=>{await ke.restartRoleSession(n.taskSlug,L,{cols:100,rows:28,permissionMode:k[L],model:S[L]}),G(`restarted ${L} with ${k[L]} / ${S[L]}`)}),onTerminalEvent:Z=>G(`${D.label}: ${Z}`)})},L)})})})})]})}const sE=120*1e3,Pm=1400,lE=3;function aE(){const[n,s]=de.useState(null),[l,a]=de.useState([]),[v,C]=de.useState(null),[m,o]=de.useState(null),[u,h]=de.useState(null),[d,c]=de.useState([]),[b,w]=de.useState(null),[k,x]=de.useState(null),[S,_]=de.useState(null),[p,g]=de.useState(null),[E,M]=de.useState(null),[T,O]=de.useState("project-manager"),[A,B]=de.useState("system"),[j,F]=de.useState(!0),[V,q]=de.useState("off"),[W,X]=de.useState(()=>D0()),[G,J]=de.useState(null),[re,H]=de.useState({}),[D,L]=de.useState(0),[U,z]=de.useState(null),[Z,pe]=de.useState(!1),[me,Y]=de.useState(!1),[P,ae]=de.useState(""),ne=de.useRef({}),ge=de.useRef(null),se=de.useMemo(()=>M0(d,b),[d,b]),Oe=se?re[se.taskSlug]??!1:!1,Te=(G==null?void 0:G.taskSlug)===(se==null?void 0:se.taskSlug)?G:null,ve=!!(Te!=null&&Te.statusLoaded&&Te.allRolesHaveSession),Be=!!(se&&(Te!=null&&Te.statusLoaded)&&!Te.hasAnySession),ye=de.useCallback(he=>{B(he.themeMode),F(he.flowPauseAlerts),q(he.permissionRequestMode),X(he.launchTemplate)},[]),lt=de.useCallback(()=>{ge.current!==null&&(window.clearInterval(ge.current),ge.current=null)},[]),Ye=de.useCallback((he={})=>{lt(),he.resetAudio&&hE(),aa(),ge.current=window.setInterval(()=>{aa()},Pm)},[lt]),Tt=de.useCallback(()=>{lt(),z(null);let he=1;aa(),ge.current=window.setInterval(()=>{he+=1,aa(),he>=lE&&ge.current!==null&&(window.clearInterval(ge.current),ge.current=null)},Pm)},[lt]),Dt=de.useCallback((he,Ee=`manual-${Date.now()}`,_t={})=>{z({id:Ee,text:he}),Ye(_t)},[Ye]),wn=de.useCallback(()=>{lt(),z(null)},[lt]),Et=de.useCallback(he=>{se!=null&&se.taskSlug&&x({taskSlug:se.taskSlug,messages:he})},[se==null?void 0:se.taskSlug]),ht=de.useCallback(he=>{se!=null&&se.taskSlug&&_({taskSlug:se.taskSlug,orchestration:he})},[se==null?void 0:se.taskSlug]),zt=de.useCallback(he=>{se!=null&&se.taskSlug&&g({taskSlug:se.taskSlug,events:he})},[se==null?void 0:se.taskSlug]),oe=de.useCallback(he=>{if(!(se!=null&&se.taskSlug)||he.taskSlug!==se.taskSlug||(M({taskSlug:he.taskSlug,roundState:he}),he.status!=="paused"))return;const Ee=uE(he);if(ne.current[he.taskSlug]===Ee||!j)return;const vn=he.activeRole??"role";oE(he)>=sE?Dt(`No new turn started after ${vn} stopped.`,Ee):Tt(),ne.current[he.taskSlug]=Ee},[se==null?void 0:se.taskSlug,j,Tt,Dt]),Se=de.useCallback(he=>{J(Ee=>(Ee==null?void 0:Ee.taskSlug)===he.taskSlug&&Ee.statusLoaded===he.statusLoaded&&Ee.sessionCount===he.sessionCount&&Ee.hasAnySession===he.hasAnySession&&Ee.allRolesHaveSession===he.allRolesHaveSession&&Ee.autoOrchestration===he.autoOrchestration&&Ee.translationEnabled===he.translationEnabled&&JSON.stringify(Ee.roles)===JSON.stringify(he.roles)?Ee:he)},[]);async function Ce(){const he=await ke.listTasks();return c(he),w(Ee=>{var _t;return Ee&&he.some(vn=>vn.taskSlug===Ee)?Ee:((_t=he[0])==null?void 0:_t.taskSlug)??null}),he}async function Re(){const he=await ke.getHarnessStatus();return C(he),he}async function Me(){const he=await ke.getHarnessBootstrapStatus();return o(he),he}async function pt(){const he=await ke.getRecentRepositoryPaths();return a(he),he}async function Ie(he){const[Ee,_t]=await Promise.all([ke.listMessages(he),ke.getOrchestrationState(he)]);x({taskSlug:he,messages:Ee}),_({taskSlug:he,orchestration:_t})}de.useEffect(()=>{Promise.all([ke.getCurrentProject(),ke.getRecentRepositoryPaths(),ke.getAppPreferences()]).then(async([he,Ee,_t])=>{s(he),a(Ee),ye(_t),he&&await Promise.all([Ce(),Re(),Me()])}).catch(he=>ae(he.message))},[ye]),de.useEffect(()=>{const he=window.matchMedia("(prefers-color-scheme: dark)"),Ee=()=>pe(he.matches);return Ee(),he.addEventListener("change",Ee),()=>he.removeEventListener("change",Ee)},[]),de.useEffect(()=>()=>lt(),[lt]),de.useEffect(()=>{const he=A==="system"?Z?"dark":"light":A;document.documentElement.dataset.theme=he,document.documentElement.dataset.themeMode=A},[Z,A]);async function We(he){Y(!0),ae("");try{await he()}catch(Ee){ae(Ee instanceof Error?Ee.message:"Action failed.")}finally{Y(!1)}}const mt=k&&k.taskSlug===(se==null?void 0:se.taskSlug)?k.messages:[],Ht=S&&S.taskSlug===(se==null?void 0:se.taskSlug)?S.orchestration:null,Ze=p&&p.taskSlug===(se==null?void 0:se.taskSlug)?p.events:[],xn=E&&E.taskSlug===(se==null?void 0:se.taskSlug)?E.roundState:null;return N.jsxs(R0,{sidebar:N.jsx(eS,{project:n,recentRepositoryPaths:l,tasks:d,activeTaskSlug:(se==null?void 0:se.taskSlug)??null,messages:mt,orchestration:Ht,events:Ze,roundState:xn,harnessStatus:v,harnessBootstrapStatus:m,harnessApplyResult:u,busy:me,onConnect:he=>We(async()=>{const Ee=await ke.connectProject({repoPath:he});s(Ee),h(null),await Promise.all([Ce(),Re(),Me(),pt()])}),onRefreshConnectedRepository:()=>We(async()=>{const he=await ke.getCurrentProject();s(he)}),onPullConnectedRepository:()=>We(async()=>{const he=await ke.pullCurrentProject();s(he)}),onRefreshHarness:()=>We(async()=>{h(null),await Promise.all([Re(),Me()])}),onApplyHarness:()=>We(async()=>{const he=await ke.applyHarness();h(he),await Promise.all([Re(),Me()])}),onStartHarnessBootstrap:()=>We(async()=>{const he=await ke.startHarnessBootstrap();o(he.status)}),onCreateTask:he=>We(async()=>{const Ee=await ke.createTask(he);await Ce(),w(Ee.taskSlug)}),onSelectTask:w,themeMode:A,onThemeModeChange:he=>{B(he),We(async()=>{const Ee=await ke.updateAppPreferences({themeMode:he});ye(Ee)})},flowPauseAlerts:j,onFlowPauseAlertsChange:he=>{F(he),he&&cE(),We(async()=>{const Ee=await ke.updateAppPreferences({flowPauseAlerts:he});ye(Ee)})},permissionRequestMode:V,onPermissionRequestModeChange:he=>{q(he),We(async()=>{const Ee=await ke.updateAppPreferences({permissionRequestMode:he});ye(Ee)})},launchTemplate:W,canSaveLaunchTemplate:ve,canOneClickStart:Be,onSaveLaunchTemplate:()=>{We(async()=>{if(!(Te!=null&&Te.allRolesHaveSession))throw new Error("Start all four role sessions before saving a launch template.");const he=await ke.updateAppPreferences({launchTemplate:{version:1,roles:Te.roles,autoOrchestration:Te.autoOrchestration,translationEnabled:Te.translationEnabled}});ye(he)})},onOneClickStart:()=>{We(async()=>{if(!se)throw new Error("Create or select a task before one-click start.");if((await ke.getTaskStatus(se.taskSlug)).sessions.length>0)throw new Error("One-click start is only available before any role session has started.");H(_t=>({..._t,[se.taskSlug]:W.translationEnabled}));const Ee=await ke.updateOrchestrationState(se.taskSlug,{mode:W.autoOrchestration?"auto":"manual"});_({taskSlug:se.taskSlug,orchestration:Ee});for(const _t of Fi){const vn=W.roles[_t.name];await ke.startRoleSession(se.taskSlug,_t.name,{cols:100,rows:28,permissionMode:vn.permissionMode,model:vn.model})}O("project-manager"),await Ie(se.taskSlug),await Ce(),L(_t=>_t+1)})},onTryFlowPauseAlert:()=>{Dt("This is a test flow pause alert.",void 0,{resetAudio:!0})},onMarkAllMessagesDone:he=>{We(async()=>{const Ee=await ke.markAllMessagesDone(he);x({taskSlug:he,messages:Ee.messages}),await Ie(he)})},onDeleteMessageHistory:he=>{We(async()=>{const Ee=await ke.deleteMessageHistory(he);x({taskSlug:he,messages:Ee.messages}),await Ie(he)})}}),children:[P?N.jsx("div",{className:"error-banner",children:P}):null,U?N.jsx("div",{className:"flow-pause-alert-backdrop",children:N.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:[N.jsx("p",{className:"flow-pause-alert-kicker",children:"VCM needs attention"}),N.jsx("h2",{id:"flow-pause-alert-title",children:"Flow paused"}),N.jsx("p",{id:"flow-pause-alert-body",children:U.text}),N.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."}),N.jsx("button",{type:"button",autoFocus:!0,onClick:wn,children:"Confirm"})]})}):null,n&&se?N.jsx(rE,{task:se,activeRole:T,translationEnabled:Oe,refreshNonce:D,onTaskChanged:async()=>{await Ce()},onActiveRoleChange:O,onTranslationEnabledChange:he=>{H(Ee=>({...Ee,[se.taskSlug]:he}))},onMessagesChanged:Et,onOrchestrationChanged:ht,onRoundStateChanged:oe,onEventsChanged:zt,onLaunchStateChanged:Se}):N.jsxs("section",{className:"empty-workspace",children:[N.jsx("h1",{children:n?"Create a task to open the workspace":"Connect a repository to begin"}),N.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."})]})]})}let bi=null;function oE(n){const s=Date.parse(n.startedAt??""),l=Date.parse(n.pausedAt??n.lastStopAt??"");return!Number.isFinite(s)||!Number.isFinite(l)?0:Math.max(0,l-s)}function uE(n){const s=n.roundId??n.startedAt??n.taskSlug,l=n.pausedAt??n.lastStopAt??"paused";return`${s}:${l}`}async function cE(){const n=eg();return n?tg(n):!1}async function aa(){const n=eg();if(!n||!await tg(n))return!1;try{const l=n.createGain(),a=n.currentTime+.025;return l.gain.setValueAtTime(.85,n.currentTime),l.connect(n.destination),qm(n,l,{frequency:587.33,startAt:a,duration:.18,peakGain:.045}),qm(n,l,{frequency:783.99,startAt:a+.11,duration:.28,peakGain:.055}),window.setTimeout(()=>{l.disconnect()},800),!0}catch{return!1}}function eg(){const n=window.AudioContext??window.webkitAudioContext;if(!n)return null;try{return(!bi||bi.state==="closed")&&(bi=new n),bi}catch{return null}}function hE(){gc(bi)}function gc(n){bi=null,n&&n.state!=="closed"&&n.close().catch(()=>{})}async function tg(n){if(Fm(n))return!0;try{await n.resume();const s=Fm(n);return!s&&n===bi&&gc(n),s}catch{return n===bi&&gc(n),!1}}function Fm(n){return n.state==="running"}function qm(n,s,l){const a=n.createGain(),v=n.createOscillator(),C=n.createOscillator(),m=l.startAt+l.duration;a.gain.setValueAtTime(1e-4,l.startAt),a.gain.exponentialRampToValueAtTime(l.peakGain,l.startAt+.018),a.gain.exponentialRampToValueAtTime(1e-4,m),v.type="sine",v.frequency.setValueAtTime(l.frequency,l.startAt),C.type="triangle",C.frequency.setValueAtTime(l.frequency*2.01,l.startAt),v.connect(a),C.connect(a),a.connect(s),v.start(l.startAt),C.start(l.startAt),v.stop(m+.02),C.stop(m+.02)}const ng=document.getElementById("root");if(!ng)throw new Error("Missing #root element.");A0.createRoot(ng).render(N.jsx(de.StrictMode,{children:N.jsx(aE,{})}));
|